:root {
  --black: #0b0410;
  --night: #1a0820;
  --plum: #2a0c2e;
  --rose: #ff3fa4;
  --rose-2: #ff8fcf;
  --rose-dark: #a01866;
  --white: #fdf2fa;
  --cyan: #63e6ff;
  --gold: #ffd84a;
  --win-top: #3a0f44;
  --win-bot: #12041a;
  --px: 4px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: hidden;
  image-rendering: pixelated;
}
button, input { font: inherit; color: inherit; }
img { image-rendering: pixelated; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; image-rendering: pixelated; }
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ---------- Pantalla de título ---------- */
.title-screen {
  min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 24px;
  text-align: center; padding: 24px 16px;
}
.logo { font-size: clamp(28px, 7vw, 72px); letter-spacing: 4px; line-height: 1.1; }
.logo-black {
  color: var(--white);
  text-shadow: 4px 4px 0 var(--rose-dark), 8px 8px 0 #000;
}
.logo-rose {
  color: var(--rose);
  text-shadow: 4px 4px 0 var(--white), 8px 8px 0 #000;
  animation: glow 2s steps(4) infinite;
}
.logo small { display: block; font-size: clamp(10px, 2vw, 16px); color: var(--cyan); margin-top: 18px; letter-spacing: 2px; }
.title-sprite { height: min(46vh, 420px); filter: drop-shadow(6px 6px 0 rgba(0,0,0,.7)); animation: bob 1.2s steps(2) infinite; }
#press-start {
  background: none; border: 0; cursor: pointer; color: var(--gold); font-size: clamp(14px, 2.4vw, 22px);
  text-shadow: 3px 3px 0 #000; padding: 8px 16px;
}
.copy { font-size: 9px; color: var(--rose-2); margin: 0; text-shadow: 2px 2px 0 #000; }

@keyframes glow { 50% { color: var(--rose-2); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Ventanas SNES ---------- */
.window {
  position: relative;
  background: linear-gradient(to bottom, var(--win-top), var(--win-bot));
  border: var(--px) solid var(--white);
  border-radius: 8px;
  box-shadow:
    0 0 0 var(--px) #000,
    inset 0 0 0 var(--px) var(--rose-dark),
    8px 8px 0 var(--px) rgba(0,0,0,.6);
  padding: 20px;
}
.win-title {
  font-size: 11px; margin: 0 0 14px; color: var(--gold); letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000;
}

.btn {
  cursor: pointer; background: var(--plum); border: 3px solid var(--white);
  box-shadow: 0 0 0 3px #000, 4px 4px 0 3px #000; padding: 10px 14px; font-size: 10px;
  transition: transform .05s steps(1);
}
.btn:hover, .btn:focus-visible { background: var(--rose-dark); outline: none; }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 3px #000; }
.btn.small { padding: 8px 10px; font-size: 9px; }
.btn.pink { background: var(--rose); color: #000; }
.btn.pink:hover { background: var(--rose-2); }

/* ---------- Layout del juego ---------- */
.game { max-width: 1200px; margin: 0 auto; padding: 16px; display: grid; gap: 22px; animation: wipe .5s steps(8); }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }

.hud {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  background: rgba(11,4,16,.85); border: 4px solid var(--white); box-shadow: 0 0 0 4px #000; padding: 10px 16px;
}
.hud-name { font-size: 12px; color: var(--white); white-space: nowrap; }
.lv { color: var(--gold); margin-right: 6px; }
.bars { display: grid; gap: 4px; max-width: 360px; width: 100%; }
.bar { display: grid; grid-template-columns: 28px 1fr; align-items: center; font-size: 9px; }
.bar i {
  display: block; height: 10px; border: 2px solid var(--white); background: #000; position: relative;
}
.bar i::after {
  content: ""; position: absolute; inset: 0; width: var(--v);
  background: repeating-linear-gradient(90deg, #4cff7a 0 6px, #2bc456 6px 8px);
  transition: width .6s steps(10);
}
.bar.mp i::after { background: repeating-linear-gradient(90deg, var(--cyan) 0 6px, #2a9bc4 6px 8px); }
.bar.xp i::after { background: repeating-linear-gradient(90deg, var(--rose) 0 6px, var(--rose-dark) 6px 8px); }

.hud-counter { display: grid; justify-items: end; gap: 4px; }
.hud-counter .label { font-size: 8px; color: var(--rose-2); }
.odometer {
  display: inline-flex; gap: 2px; font-family: "VT323", monospace; font-size: 30px; line-height: 1;
}
.odometer span {
  display: inline-block; width: 22px; text-align: center; padding: 2px 0;
  background: linear-gradient(#000 0 48%, #1b1b1b 52% 100%);
  color: var(--gold); border: 2px solid #555; text-shadow: 0 0 6px var(--gold);
}
.odometer span.roll { animation: roll .25s steps(3); }
@keyframes roll { from { transform: translateY(-40%); opacity: .2; } }

.stage { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }

/* Personaje */
.char-window { display: grid; gap: 14px; }
.char-frame {
  position: relative; height: 470px; display: grid; place-items: end center; overflow: hidden;
  background:
    linear-gradient(to bottom, transparent 82%, rgba(255,63,164,.25) 82%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 16px, transparent 16px 32px);
  border: 3px solid #000;
}
.avatar { height: 440px; position: relative; z-index: 1; animation: idle 1.6s steps(2) infinite; cursor: pointer; }
.avatar.hd { image-rendering: auto; }
.avatar.hit { animation: hit .4s steps(4); }
.shadow { position: absolute; bottom: 8px; width: 120px; height: 14px; background: rgba(0,0,0,.6); border-radius: 50%; }
@keyframes idle { 50% { transform: translateY(-4px); } }
@keyframes hit { 25% { transform: translateX(-6px); filter: brightness(2); } 75% { transform: translateX(6px); } }
.char-frame { cursor: pointer; }
.vrm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.vrm-canvas.pixel { image-rendering: pixelated; }
.vrm-loading {
  position: absolute; left: 16px; right: 16px; bottom: 24px; z-index: 3; display: grid; gap: 6px;
  font-size: 9px; color: var(--gold); text-shadow: 2px 2px 0 #000;
}
.vrm-loading span { animation: blink 1s steps(1) infinite; }
.vrm-loading b { display: block; height: 12px; border: 2px solid var(--white); background: #000; }
.vrm-loading i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--rose) 0 6px, var(--rose-dark) 6px 8px); }
.emote-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emote-bar button {
  cursor: pointer; background: #000; border: 2px solid var(--rose-dark); padding: 6px 0;
  font-family: "VT323", monospace; font-size: 16px; color: var(--rose-2);
}
.emote-bar button:hover, .emote-bar button:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }
.emote-bar button:active { transform: translate(2px, 2px); }
.char-actions { display: flex; gap: 10px; justify-content: space-between; }
.stats { margin: 0; display: grid; gap: 6px; font-size: 9px; }
.stats div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px dotted rgba(255,255,255,.2); padding-bottom: 4px; }
.stats dt { color: var(--cyan); }
.stats dd { margin: 0; text-align: right; }

/* Menú de mundos */
.menu-window { min-height: 600px; display: grid; grid-template-rows: auto auto 1fr; }
.world-menu { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.world-menu li {
  cursor: pointer; padding: 10px 10px 10px 28px; position: relative; font-size: 10px;
  border: 2px solid transparent; outline: none;
}
.world-menu li .icon { margin-right: 8px; font-family: system-ui, sans-serif; }
.world-menu li.active, .world-menu li:hover, .world-menu li:focus-visible {
  border-color: var(--rose); background: rgba(255,63,164,.12);
}
.world-menu li.active::before, .world-menu li:focus-visible::before {
  content: "▶"; position: absolute; left: 8px; color: var(--gold); animation: nudge .5s steps(2) infinite;
}
@keyframes nudge { 50% { transform: translateX(3px); } }

.world-panel {
  border-top: 4px dashed rgba(255,255,255,.25); padding-top: 18px; font-size: 11px; line-height: 2;
  animation: fadein .35s steps(5);
}
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.world-panel h3 { font-size: 16px; color: var(--rose); margin: 0 0 12px; text-shadow: 3px 3px 0 #000; }
.world-panel p { margin: 0 0 12px; font-family: "VT323", monospace; font-size: 22px; line-height: 1.25; }
.world-panel .quests { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.world-panel .quests li { font-family: "VT323", monospace; font-size: 20px; line-height: 1.2; }
.world-panel .quests li::before { content: "◆ "; color: var(--gold); }
.terminal {
  background: #000; border: 3px solid var(--cyan); padding: 12px; font-family: "VT323", monospace;
  font-size: 20px; color: #7dff9b; white-space: pre-wrap; min-height: 120px;
}
.terminal .cursor { animation: blink 1s steps(1) infinite; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 8px; padding: 6px 8px; background: #000; border: 2px solid var(--rose); }

/* Libro de visitas */
.gb-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; margin-bottom: 14px; }
.gb-form input {
  background: #000; border: 3px solid var(--white); padding: 10px; font-size: 10px; min-width: 0;
}
.gb-form input:focus { outline: none; border-color: var(--rose); }
.gb-error { grid-column: 1 / -1; color: var(--gold); font-size: 9px; margin: 0; min-height: 1em; }
.gb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.gb-list li { background: rgba(0,0,0,.45); border-left: 4px solid var(--rose); padding: 8px 12px; }
.gb-list b { color: var(--cyan); font-size: 10px; }
.gb-list time { font-size: 8px; color: var(--rose-2); margin-left: 8px; }
.gb-list p { margin: 4px 0 0; font-family: "VT323", monospace; font-size: 20px; line-height: 1.2; word-break: break-word; }

/* Votación */
.poll { display: grid; gap: 10px; }
.poll button {
  display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; text-align: left;
  background: none; border: 2px solid transparent; padding: 6px; cursor: pointer; font-size: 9px;
}
.poll button:hover, .poll button:focus-visible { border-color: var(--rose); outline: none; }
.poll button.mine { border-color: var(--gold); }
.poll .meter { height: 14px; background: #000; border: 2px solid var(--white); position: relative; }
.poll .meter i { position: absolute; inset: 0; width: var(--v); background: repeating-linear-gradient(90deg, var(--rose) 0 6px, var(--rose-dark) 6px 8px); transition: width .5s steps(8); }

/* Diálogo */
.dialog { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; min-height: 120px; }
.portrait { width: 96px; height: 96px; border: 3px solid var(--white); box-shadow: 0 0 0 3px #000; }
.speaker { margin: 0 0 8px; color: var(--rose); font-size: 10px; }
.dialog-text { margin: 0; font-family: "VT323", monospace; font-size: 24px; line-height: 1.25; min-height: 2.5em; }
.next { position: absolute; right: 16px; bottom: 10px; color: var(--gold); }

.controls { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: 8px; color: var(--rose-2); padding-bottom: 16px; }
.controls b { color: var(--gold); }

/* Partículas de corazones */
.float-heart { position: fixed; pointer-events: none; color: var(--rose); font-size: 18px; z-index: 60; animation: floatup 1s steps(8) forwards; text-shadow: 2px 2px 0 #000; }
@keyframes floatup { to { transform: translateY(-80px); opacity: 0; } }

/* Konami */
body.rainbow .logo-rose, body.rainbow .world-panel h3 { animation: rainbow 1s steps(6) infinite; }
@keyframes rainbow { 0%{color:#ff3fa4} 20%{color:#ffd84a} 40%{color:#4cff7a} 60%{color:#63e6ff} 80%{color:#b47cff} }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; }
  .char-frame { height: 360px; }
  .avatar { height: 340px; }
  .menu-window { min-height: 0; }
  .hud { grid-template-columns: 1fr auto; }
  .bars { grid-column: 1 / -1; grid-row: 2; max-width: none; }
}
@media (max-width: 560px) {
  .game { padding: 12px 16px; }
  .window { padding: 14px; }
  .gb-form { grid-template-columns: 1fr; }
  .poll button { grid-template-columns: 100px 1fr 30px; }
  .portrait { width: 64px; height: 64px; }
  .dialog-text { font-size: 20px; }
  .odometer { font-size: 22px; }
  .odometer span { width: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Ficha VTuberDex */
.stats dd a { color: var(--gold); }
.dex-head { color: var(--gold); }
.dex-head b { color: var(--rose); }
.dex-bars { display: grid; gap: 6px; margin-bottom: 16px; }
.dex-bar { display: grid; grid-template-columns: 130px 1fr 80px; gap: 10px; align-items: center; font-size: 8px; }
.dex-bar .val { font-family: "VT323", monospace; font-size: 20px; text-align: right; }
.dex-bar .meter { height: 14px; background: #000; border: 2px solid var(--white); position: relative; }
.dex-bar .meter i { position: absolute; inset: 0; width: var(--v); background: repeating-linear-gradient(90deg, var(--rose) 0 6px, var(--rose-dark) 6px 8px); }
.dex-bar.hp .meter i { background: repeating-linear-gradient(90deg, #4cff7a 0 6px, #1f9a45 6px 8px); }
.dex-bar.mp .meter i, .dex-bar.magicAttack .meter i, .dex-bar.magicDefense .meter i { background: repeating-linear-gradient(90deg, var(--cyan) 0 6px, #2a9bc4 6px 8px); }
.dex-bar.luck .meter i, .dex-bar.critic .meter i { background: repeating-linear-gradient(90deg, var(--gold) 0 6px, #b8901a 6px 8px); }
.world-panel h4 { font-size: 10px; color: var(--cyan); margin: 0 0 8px; }
.dex-profile { margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.dex-profile div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px dotted rgba(255,255,255,.2); font-family: "VT323", monospace; font-size: 18px; }
.dex-profile dt { color: var(--cyan); }
.dex-profile dd { margin: 0; text-align: right; }
.dex-skills { display: grid; gap: 10px; }
.skill { background: #000; border: 3px solid var(--rose-dark); padding: 10px 12px; }
.skill.passive { border-color: #2a9bc4; }
.skill.ultimate { border-color: var(--gold); box-shadow: 0 0 0 3px #000, 0 0 12px var(--gold); }
.skill header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.skill header b { font-size: 10px; color: var(--white); }
.skill .kind { font-size: 7px; padding: 3px 5px; background: var(--rose-dark); }
.skill.passive .kind { background: #2a9bc4; }
.skill.ultimate .kind { background: var(--gold); color: #000; }
.skill .effect { font-family: "VT323", monospace; font-size: 19px; line-height: 1.2; }
.status { font-weight: bold; }
.st-para { color: #e0c020; } .st-frac { color: #ff3060; } .st-sev { color: #00c2a8; } .st-sync { color: #ff4fd8; }
.st-over { color: #e8e8e8; text-shadow: 0 0 6px #fff; }
.dex-phrase { color: var(--gold); font-size: 24px !important; }
.dex-lore p { text-align: justify; }
.dex-link { display: inline-block; margin-top: 12px; font-size: 8px; color: var(--gold); }
@media (max-width: 560px) {
  .dex-bar { grid-template-columns: 90px 1fr 60px; font-size: 7px; }
}

/* Barra de amor del HUD */
.bar.love i::after { background: repeating-linear-gradient(90deg, #ff4fd8 0 6px, var(--rose-dark) 6px 8px); }
.world-menu li.doll-item { border-color: var(--gold); }

/* La muñeca */
.doll-energy { display: flex; align-items: center; gap: 10px; font-size: 8px !important; font-family: "Press Start 2P", monospace !important; }
.doll-energy .meter { flex: 1; height: 14px; background: #000; border: 2px solid var(--white); position: relative; }
.doll-energy .meter i { position: absolute; inset: 0; width: 20%; background: repeating-linear-gradient(90deg, #ff4fd8 0 6px, var(--rose-dark) 6px 8px); transition: width .6s steps(10); }
.doll-form { display: grid; gap: 8px; margin-bottom: 10px; }
.doll-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.doll-kinds button { cursor: pointer; font-family: "Press Start 2P", monospace; font-size: 7px; padding: 7px 8px; background: #000; color: var(--rose-2); border: 2px solid var(--rose-dark); }
.doll-kinds button.on, .doll-kinds button:hover { border-color: var(--gold); color: var(--gold); }
.doll-form input, .doll-form textarea, .doll-form select { font-family: "VT323", monospace; font-size: 20px; background: #000; color: var(--white); border: 3px solid var(--rose-dark); padding: 6px 8px; resize: vertical; }
.doll-form button[disabled] { opacity: .6; cursor: wait; }
.doll-note { font-size: 16px !important; color: #c9b3c9; }
.doll-note a { color: var(--gold); }

/* Streams de cada mundo */
.streams { margin-top: 16px; display: grid; gap: 12px; }
.streams h4 { margin: 0; }
.stream { display: grid; grid-template-columns: 200px 1fr; gap: 12px; background: #000; border: 3px solid var(--rose-dark); padding: 8px; }
.stream-thumb { position: relative; display: block; }
.stream-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border: 2px solid var(--white); }
.stream-thumb .dur { position: absolute; right: 4px; bottom: 4px; background: #000c; font-family: "VT323", monospace; font-size: 16px; padding: 0 4px; }
.stream-title { color: var(--white); font-family: "VT323", monospace; font-size: 19px; line-height: 1.15; text-decoration: none; display: block; margin-bottom: 6px; }
.stream-title:hover { color: var(--gold); }
.stream-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stream-shots a { position: relative; display: block; color: var(--white); }
.stream-shots img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; border: 2px solid var(--rose-dark); image-rendering: auto; }
.stream-shots a:hover img { border-color: var(--gold); }
.stream-shots span { position: absolute; left: 2px; bottom: 2px; background: #000c; font-family: "VT323", monospace; font-size: 14px; padding: 0 3px; }
@media (max-width: 560px) {
  .stream { grid-template-columns: 1fr; }
}

/* Intro: disquete 5¼ en la Multivac de válvulas */
body.intro-on { overflow: hidden; }
.intro { position: fixed; inset: 0; z-index: 50; background: #0a0705; display: grid; place-items: center; align-content: center; gap: 14px; padding: 16px; transition: opacity .6s steps(6); }
.intro.bye { opacity: 0; pointer-events: none; }
.intro-stage { position: relative; width: min(960px, 100%, calc((100dvh - 180px) * 16 / 9)); aspect-ratio: 16 / 9; }
.intro canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; border: 4px solid #2a2016; box-shadow: 0 0 0 4px #000, 0 0 40px #ff9a2a33; }
.intro.y2k canvas { border-color: #ff8fcf; box-shadow: 0 0 0 4px #000, 0 0 50px #ff4fd866; }
.intro-year { position: absolute; top: 4%; right: 3%; font-size: clamp(18px, 5vw, 44px); color: #ffb347; text-shadow: 3px 3px 0 #000; }
.intro.y2k .intro-year { color: #fff; text-shadow: 0 0 8px #ff4fd8, 3px 3px 0 #a01866; }
.floppy { position: absolute; left: 20%; top: 58%; width: clamp(92px, 16vw, 160px); aspect-ratio: 1; cursor: grab; touch-action: none; z-index: 2;
  background: none; border: none; padding: 0; filter: drop-shadow(5px 6px 0 rgba(0,0,0,.6)); transition: left .6s ease-in, top .6s ease-in, transform .3s steps(3); transform: rotate(-8deg); }
.floppy svg { width: 100%; height: 100%; display: block; }
.floppy:hover:not(.held) { transform: rotate(-4deg) translateY(-3px); }
.floppy.held { cursor: grabbing; transition: none; transform: rotate(0) scale(1.08); }
.floppy.inserting { transform: rotate(0); }
.floppy:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.intro-hint { position: absolute; left: 0; right: 0; bottom: -2px; margin: 0; text-align: center; font-size: clamp(7px, 1.4vw, 11px); color: #ffd84a; text-shadow: 2px 2px 0 #000; }
.intro-caption { margin: 0; width: min(960px, 100%); min-height: 3.2em; font-family: "VT323", monospace; font-size: clamp(18px, 2.6vw, 26px); line-height: 1.2; color: #ffd9a8; }
.intro.y2k .intro-caption { color: #ffd6f3; }
.intro-skip { position: fixed; right: 16px; bottom: 16px; font-family: "Press Start 2P", monospace; font-size: 9px; background: #000; color: #ccc; border: 2px solid #555; padding: 8px 10px; cursor: pointer; }
.intro-skip:hover { color: #fff; border-color: var(--rose); }

/* Y2K rosadito: cromo, glitter y ventanas de vidrio rosado */
:root { --win-top: #5a1050; --win-bot: #1e0624; }
.logo-black {
  background: linear-gradient(180deg, #ffffff 0%, #f2e6ff 40%, #9a88b0 52%, #ffffff 62%, #d8c8ec 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 #a01866) drop-shadow(4px 4px 0 #000);
  text-shadow: none;
}
.logo-rose {
  background: linear-gradient(100deg, #ff3fa4 0%, #ff9ad8 30%, #fff 38%, #ff4fd8 46%, #ff3fa4 70%, #ffb3e6 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(3px 3px 0 #fff) drop-shadow(4px 4px 0 #000);
  text-shadow: none;
  animation: shine 3s steps(12) infinite;
}
@keyframes shine { to { background-position: -250% 0; } }
.logo small::before, .logo small::after { content: " ✦ "; color: #fff; }
.window { border-color: #ffd6f3; box-shadow: 0 0 0 var(--px) #000, 0 0 18px #ff4fd855; }
.win-title { display: inline-block; padding: 6px 10px; background: linear-gradient(90deg, #ff3fa4, #ff9ad8, #ff3fa4); color: #2a0020; text-shadow: 1px 1px 0 #fff; }
.char-frame { background: linear-gradient(#ffb0d8 0%, #ff6fb8 45%, #4a0f4a 46%, #2a0838 100%); }
.st-op { color: #ffd84a; text-shadow: 0 0 6px #ffb300; } .st-tired { color: #9a8aa8; }
.st-bsod { color: #fff; background: #0a3dff; padding: 0 4px; }

/* Rombo de stats */
.radar-box { margin: 0 0 12px; text-align: center; }
.radar-box svg { width: 100%; max-width: 240px; display: block; margin: 0 auto; overflow: visible; }
.radar-ring { fill: none; stroke: #ffd6f333; stroke-width: 1; }
.radar-axis { stroke: #ffd6f322; stroke-width: 1; }
.radar-label { fill: var(--cyan); font-family: "Press Start 2P", monospace; font-size: 7px; }
.radar-base { fill: #63e6ff22; stroke: #63e6ff88; stroke-width: 1; stroke-dasharray: 3 2; }
.radar-now { fill: #ff4fd855; stroke: #ff9ad8; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 4px #ff4fd8); }
.radar-box figcaption { font-size: 8px; color: #ffd6f3; }
.radar-box figcaption b { color: var(--gold); }
.radar-box.lvlup .radar-now { stroke: #fff; filter: drop-shadow(0 0 8px #fff); }
.dex-bar .bonus { color: #ff4fd8; font-size: 16px; }

/* Radio lofi flotante */
.radio { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: grid; gap: 8px; justify-items: start; }
.radio-btn { cursor: pointer; font-family: "Press Start 2P", monospace; font-size: 8px; padding: 9px 10px; color: #2a0020;
  background: linear-gradient(180deg, #ffd6f3, #ff8fcf); border: 3px solid #fff; box-shadow: 0 0 0 3px #000, 0 0 14px #ff4fd8; }
.radio-btn[aria-expanded="true"] { animation: glow 1.2s steps(3) infinite; }
.radio-box { background: linear-gradient(#5a1050, #1e0624); border: 3px solid #ffd6f3; box-shadow: 0 0 0 3px #000; padding: 10px; width: min(320px, calc(100vw - 32px)); }
.radio-title { margin: 0 0 8px; font-size: 7px; color: #ffd6f3; }
.radio-player iframe { width: 100%; height: 200px; border: 0; display: block; }
.radio-box .btn { margin-top: 8px; }
.radio-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.radio-stations button { cursor: pointer; font-family: "Press Start 2P", monospace; font-size: 7px; padding: 8px 6px; background: #000; color: #ffd6f3; border: 2px solid #a01866; }
.radio-stations button.on, .radio-stations button:hover { border-color: var(--gold); color: var(--gold); }
.radio-note { font-family: "VT323", monospace; font-size: 15px; color: #c9b3c9; margin: 8px 0; line-height: 1.1; }
.radio-player:empty { display: none; }
.radio-btn.playing::after { content: " ▮▮▯▮"; animation: blink 1s steps(2) infinite; }
.intro3d { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); image-rendering: pixelated; z-index: 1; animation: q-in .8s steps(8); }
@keyframes q-in { from { opacity: 0; filter: hue-rotate(90deg) contrast(2); } to { opacity: 1; } }
.intro-year { z-index: 3; }
.intro-hud { position: absolute; left: 3%; top: 4%; z-index: 3; display: none; font-size: clamp(6px, 1.1vw, 10px); line-height: 1.8; color: #ffd6f3; background: #0a080ecc; padding: 6px 10px; text-shadow: 0 0 6px #ff4fd8; }
.intro.has3d .intro-hud { display: block; }
.intro3d { opacity: 0; pointer-events: none; animation: none; }
.intro.has3d .intro3d { opacity: 1; animation: q-in .8s steps(8); }
