
    :root {
      --sky-top: #98c5da;
      --sky-mid: #b9d9ea;
      --sky-low: #dcf0f9;
      --water-top: #1c4e75;
      --water-mid: #0e2c47;
      --water-deep: #061526;
      --water-abyss: #020810;
      --panel-bg: rgba(9, 20, 35, 0.96);
      --panel-border: #2c4e72;
      --cyan: #5ce1e6;
      --cyan-bright: #00f5ff;
      --pink: #ff3b72;
      --pink-glow: #ff759f;
      --gold: #ffd166;
      --green: #4ade80;
      --purple: #c084fc;
      --orange: #fb923c;
      --text-main: #f0f8ff;
      --text-muted: #8ab0d0;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    html, body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: var(--water-abyss);
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-main);
    }

    :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
    input, textarea { user-select: text; }
    #marineGuideDialog { margin: auto; width: min(760px, 94vw); max-height: 88vh; overflow: auto; padding: 0; color: var(--text-main); background: var(--panel-bg); border: 2px solid var(--panel-border); border-radius: 12px; font-family: inherit; }
    #marineGuideDialog h2 { font-size: clamp(16px, 4vw, 22px); }
    #marineGuideDialog::backdrop { background: rgba(0, 4, 12, .82); }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    }

    /* CRT SCANLINES SUAVIZADO */
    .crt-overlay {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 999;
      background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.055) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.006), rgba(0, 255, 0, 0.004), rgba(0, 0, 255, 0.006));
      background-size: 100% 4px, 6px 100%;
      opacity: 0.65;
    }

    /* VIEWPORT E CÂMERA VERTICAL DO OCEANO */
    .world-viewport {
      position: relative;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    .world-camera {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 560vh;
      transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: transform;
    }

    /* CÉU E BARCO NA SUPERFÍCIE 0m */
    .sky-zone {
      position: relative;
      width: 100%;
      height: 19vh;
      background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-low) 96%, #7fd1db 100%);
      overflow: hidden;
      transition: height 0.65s ease;
    }

    .sky-Zone-home {
      height: 54vh;
    }

    .pixel-cloud {
      position: absolute;
      background: rgba(255, 255, 255, 0.88);
      box-shadow:
        16px 0 0 rgba(255,255,255,0.88),
        -16px 8px 0 rgba(255,255,255,0.88),
        0 8px 0 rgba(255,255,255,0.88),
        16px 8px 0 rgba(255,255,255,0.88),
        32px 8px 0 rgba(255,255,255,0.88),
        -24px 16px 0 rgba(235,248,255,0.92),
        -8px 16px 0 rgba(235,248,255,0.92),
        8px 16px 0 rgba(235,248,255,0.92),
        24px 16px 0 rgba(235,248,255,0.92),
        40px 16px 0 rgba(235,248,255,0.92);
      width: 24px;
      height: 12px;
      animation: driftCloud 75s linear infinite;
    }

    @keyframes driftCloud {
      0% { transform: translateX(-140px); }
      100% { transform: translateX(calc(100vw + 180px)); }
    }

    .boat-wrapper {
      position: absolute;
      bottom: -5px;
      left: 20%;
      width: 128px;
      height: 84px;
      z-index: 15;
      animation: bobBoat 3.4s ease-in-out infinite;
    }

    @keyframes bobBoat {
      0%, 100% { transform: translateY(0px) rotate(-1deg); }
      50% { transform: translateY(4px) rotate(1.4deg); }
    }

    /* ZONA DO OCEANO */
    .ocean-zone {
      position: relative;
      width: 100%;
      height: 500vh;
      background: linear-gradient(
        180deg,
        #1e4d73 0%,
        #163d5e 6%,
        #0f2c46 18%,
        #091e32 36%,
        #051220 58%,
        #020912 80%,
        #010409 100%
      );
    }

    .waves-strip {
      position: absolute;
      top: -12px;
      left: 0;
      width: 100%;
      height: 24px;
      background: radial-gradient(circle at 50% 18px, transparent 18px, #1e4d73 19px);
      background-size: 64px 24px;
      z-index: 12;
    }

    .sun-rays {
      position: absolute;
      top: 0;
      left: 12%;
      width: 76%;
      height: 85vh;
      background:
        repeating-linear-gradient(
          104deg,
          rgba(130, 220, 255, 0.065) 0px,
          rgba(130, 220, 255, 0.065) 42px,
          transparent 42px,
          transparent 115px
        );
      pointer-events: none;
      mask-image: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%);
      -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    }

    .ocean-tier-band {
      position: absolute;
      left: 18px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: 'VT323', monospace;
      font-size: 17px;
      color: rgba(165, 215, 245, 0.45);
      letter-spacing: 2px;
      pointer-events: none;
      border-left: 3px solid rgba(92, 225, 230, 0.35);
      padding-left: 10px;
      text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    }

    /* RÉGUA VERTICAL DE PROFUNDIDADE */
    .depth-ruler {
      position: absolute;
      top: 0;
      right: 0;
      width: 68px;
      height: 100%;
      border-left: 1px solid rgba(142, 198, 230, 0.28);
      z-index: 25;
      pointer-events: none;
    }

    .ruler-tick {
      position: absolute;
      right: 0;
      width: 10px;
      height: 1px;
      background: rgba(142, 198, 230, 0.38);
    }

    .ruler-tick.major {
      width: 18px;
      height: 2px;
      background: rgba(142, 198, 230, 0.72);
    }

    .ruler-label {
      position: absolute;
      right: 22px;
      transform: translateY(-50%);
      font-family: 'VT323', monospace;
      font-size: 15px;
      color: rgba(190, 228, 250, 0.75);
    }

    /* PERSONAGEM DO JOGADOR NO OCEANO (KRILL OU AVATAR COMPRADO) */
    .krill-actor {
      position: absolute;
      left: 72%;
      top: 48px;
      width: 54px;
      height: 54px;
      z-index: 38;
      transition: top 1.15s cubic-bezier(0.22, 1, 0.36, 1), left 0.9s ease;
      filter: drop-shadow(0 0 12px rgba(255, 59, 114, 0.95)) drop-shadow(0 0 22px rgba(0, 245, 255, 0.45));
      animation: swimKrill 2.4s ease-in-out infinite;
      display: grid;
      place-items: center;
    }

    @keyframes swimKrill {
      0%, 100% { transform: translateY(0px) rotate(-5deg); }
      50% { transform: translateY(-7px) rotate(7deg); }
    }

    .krill-bubble {
      position: absolute;
      top: -12px;
      left: 20px;
      width: 7px;
      height: 7px;
      border: 1.5px solid rgba(200, 245, 255, 0.85);
      border-radius: 50%;
      animation: riseBubble 2.1s ease-out infinite;
    }

    @keyframes riseBubble {
      0% { transform: translateY(0) scale(0.8); opacity: 0.95; }
      100% { transform: translateY(-30px) scale(1.35); opacity: 0; }
    }

    .sonar-wave-ring {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      transform: translate(-50%, -50%) scale(0.4);
      pointer-events: none;
      opacity: 0;
    }

    .sonar-wave-ring.ping-hit {
      border: 3px solid var(--cyan-bright);
      box-shadow: 0 0 24px var(--cyan-bright);
      animation: sonarExpand 1.1s ease-out forwards;
    }

    .sonar-wave-ring.ping-error {
      border: 3px solid var(--pink);
      box-shadow: 0 0 24px var(--pink);
      animation: sonarExpand 0.85s ease-out forwards;
    }

    @keyframes sonarExpand {
      0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
      100% { transform: translate(-50%, -50%) scale(7.2); opacity: 0; }
    }

    .krill-depth-pin {
      position: absolute;
      right: 62px;
      top: 8px;
      background: rgba(7, 18, 34, 0.96);
      border: 2px solid var(--cyan-bright);
      padding: 4px 11px;
      white-space: nowrap;
      font-family: 'VT323', monospace;
      font-size: 17px;
      letter-spacing: 1.2px;
      color: #fff;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
      opacity: 0;
      transform: translateX(8px);
      transition: all 0.28s ease;
      pointer-events: none;
    }

    .krill-depth-pin.visible {
      opacity: 1;
      transform: translateX(0);
    }

    .shadow-fish {
      position: absolute;
      fill: rgba(4, 13, 23, 0.7);
      pointer-events: none;
      animation: swimFish linear infinite;
    }

    /* PEIXES COMPRÁVEIS DA LOJA NADANDO ALEATORIAMENTE NO MAR */
    .ambient-shop-fish {
      position: absolute;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      pointer-events: none;
      z-index: 20;
      animation: swimShopFish linear infinite;
      filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.25));
      opacity: 0.86;
    }

    .ambient-shop-fish.reverse-dir {
      animation-name: swimShopFishReverse;
    }

    .ambient-shop-fish-sprite {
      font-size: 24px;
      line-height: 1;
    }

    .ambient-shop-fish.reverse-dir .ambient-shop-fish-sprite {
      transform: scaleX(-1);
      display: inline-block;
    }

    .ambient-shop-fish-tag {
      font-family: 'VT323', monospace;
      font-size: 13px;
      letter-spacing: 1px;
      padding: 1px 6px;
      background: rgba(5, 14, 26, 0.72);
      border: 1px solid rgba(92, 225, 230, 0.35);
      color: #cfe9ff;
      white-space: nowrap;
      border-radius: 3px;
    }

    @keyframes swimShopFish {
      0% { transform: translateX(-18vw) translateY(0px); }
      50% { transform: translateX(46vw) translateY(-8px); }
      100% { transform: translateX(115vw) translateY(3px); }
    }

    @keyframes swimShopFishReverse {
      0% { transform: translateX(115vw) translateY(0px); }
      50% { transform: translateX(46vw) translateY(8px); }
      100% { transform: translateX(-18vw) translateY(-3px); }
    }

    @keyframes swimFish {
      0% { transform: translateX(-10vw); }
      100% { transform: translateX(110vw); }
    }

    /* BARRA SUPERIOR DE NAVEGAÇÃO ARCADE (SEMPRE VISÍVEL) */
    .top-arcade-bar {
      position: fixed;
      top: 10px;
      left: 12px;
      right: 12px;
      z-index: 160;
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
      flex-wrap: wrap;
      gap: 8px;
    }

    .top-nav-group {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      pointer-events: auto;
      align-items: center;
    }

    .arcade-btn {
      height: 36px;
      padding: 0 11px;
      background: rgba(10, 22, 38, 0.94);
      border: 2px solid #35587a;
      color: #d6ecff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
      font-family: 'VT323', monospace;
      font-size: 17px;
      letter-spacing: 1.4px;
      box-shadow: 0 3px 0 #050d17;
      transition: all 0.14s ease;
      text-transform: uppercase;
    }

    .arcade-btn:hover {
      background: #1a3756;
      color: #ffffff;
      border-color: var(--cyan-bright);
      transform: translateY(-1px);
    }

    .arcade-btn.btn-home {
      border-color: var(--cyan-bright);
      color: var(--cyan-bright);
      background: rgba(8, 33, 52, 0.95);
    }

    .arcade-btn.btn-puffer {
      border-color: var(--pink);
      color: #ffc2d4;
      background: rgba(74, 15, 38, 0.92);
    }

    .arcade-btn.btn-puffer:hover {
      background: var(--pink);
      color: #fff;
    }

    .arcade-btn.btn-shop {
      border-color: var(--gold);
      color: var(--gold);
      background: rgba(52, 36, 8, 0.92);
    }

    .arcade-btn.btn-archive {
      border-color: var(--purple);
      color: #e9d5ff;
      background: rgba(48, 20, 74, 0.92);
    }

    /* BANCO ACUMULADO DE PROFUNDIDADE TOTAL (CARTEIRA DO JOGADOR) */
    .bank-pill {
      height: 36px;
      padding: 0 12px;
      background: rgba(7, 17, 30, 0.96);
      border: 2px solid var(--gold);
      color: var(--gold);
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-family: 'VT323', monospace;
      font-size: 18px;
      letter-spacing: 1.5px;
      box-shadow: 0 0 14px rgba(255, 209, 102, 0.25);
      cursor: pointer;
    }

    /* HUD DE PARTIDA CENTRALIZADO */
    .hud-top-bar {
      position: fixed;
      top: 54px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 120;
      display: flex;
      align-items: center;
      gap: 18px;
      pointer-events: none;
    }

    .hud-stat-box {
      background: rgba(9, 20, 35, 0.95);
      border: 2px solid #2b4c6e;
      padding: 5px 15px;
      min-width: 118px;
      box-shadow: 0 5px 0 rgba(0,0,0,0.55);
      display: flex;
      flex-direction: column;
    }

    .hud-stat-box.right {
      text-align: right;
    }

    .hud-stat-label {
      font-family: 'VT323', monospace;
      font-size: 13px;
      letter-spacing: 2px;
      color: var(--text-muted);
    }

    .hud-stat-value {
      font-family: 'VT323', monospace;
      font-size: 28px;
      line-height: 1;
      margin-top: 2px;
    }

    .hud-stat-value.cyan {
      color: var(--cyan-bright);
      text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    }

    .hud-stat-value.pink {
      color: var(--pink);
      text-shadow: 0 0 10px rgba(255, 59, 114, 0.5);
    }

    .hud-progress-center {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      background: rgba(9, 20, 35, 0.88);
      padding: 6px 12px;
      border: 1px solid #24405e;
    }

    .prompt-squares {
      display: flex;
      gap: 5px;
    }

    .prompt-sq {
      width: 14px;
      height: 14px;
      background: #0d1a2b;
      border: 1px solid #355270;
    }

    .prompt-sq.active {
      background: var(--pink);
      border-color: #ff9ebb;
      box-shadow: 0 0 8px rgba(255, 59, 114, 0.8);
    }

    .prompt-sq.done {
      background: var(--cyan-bright);
      border-color: #ffffff;
    }

    .prompt-counter-txt {
      font-family: 'VT323', monospace;
      font-size: 14px;
      letter-spacing: 2px;
      color: #a3c9e8;
    }

    /* TELA INICIAL (HOME) */
    .home-overlay {
      position: fixed;
      inset: 0;
      z-index: 85;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      padding: 10vh 18px 20px;
      pointer-events: none;
    }

    .brand-hero {
      text-align: center;
      pointer-events: auto;
    }

    .krillion-title {
      font-family: 'Press Start 2P', monospace;
      font-size: clamp(32px, 5.2vw, 56px);
      letter-spacing: 6px;
      color: #ffffff;
      text-shadow:
        -4px 0 0 var(--cyan-bright),
        4px 4px 0 var(--pink),
        0 8px 22px rgba(0, 0, 0, 0.35);
      margin-bottom: 10px;
    }

    .krillion-sub {
      font-family: 'VT323', monospace;
      font-size: 24px;
      letter-spacing: 5px;
      color: #166596;
      text-transform: uppercase;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .krillion-tagline {
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 1px;
      color: #1e496b;
      background: rgba(255, 255, 255, 0.55);
      padding: 4px 12px;
      display: inline-block;
    }

    .home-bottom-cta {
      width: min(640px, 95vw);
      pointer-events: auto;
      display: flex;
      flex-direction: column;
      gap: 9px;
      background: rgba(7, 16, 29, 0.92);
      border: 2px solid #294a6b;
      padding: 16px 18px;
      box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75);
    }

    .home-avatar-showcase {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: rgba(13, 28, 48, 0.9);
      border: 1px solid #284b6e;
      padding: 8px 12px;
      flex-wrap: wrap;
      gap: 8px;
    }

    .home-main-buttons {
      display: grid;
      grid-template-columns: 1.25fr 1fr;
      gap: 10px;
    }

    @media (max-width: 580px) {
      .home-main-buttons {
        grid-template-columns: 1fr;
      }
    }

    .begin-descent-btn {
      width: 100%;
      padding: 15px 16px;
      background: linear-gradient(180deg, #112a46 0%, #0a192b 100%);
      border: 2px solid var(--cyan-bright);
      color: #ffffff;
      font-family: 'VT323', monospace;
      font-size: 24px;
      letter-spacing: 3px;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow: 0 0 20px rgba(0, 245, 255, 0.3), inset 0 0 12px rgba(0, 245, 255, 0.12);
      transition: all 0.16s ease;
    }

    .begin-descent-btn:hover {
      background: #173a61;
      box-shadow: 0 0 30px rgba(0, 245, 255, 0.6);
      transform: translateY(-2px);
    }

    .begin-puffer-btn {
      width: 100%;
      padding: 15px 14px;
      background: linear-gradient(180deg, #4f122d 0%, #2d0919 100%);
      border: 2px solid var(--pink);
      color: #ffe0ea;
      font-family: 'VT323', monospace;
      font-size: 23px;
      letter-spacing: 2px;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow: 0 0 20px rgba(255, 59, 114, 0.32);
      transition: all 0.16s ease;
    }

    .begin-puffer-btn:hover {
      background: #6b173c;
      color: #ffffff;
      box-shadow: 0 0 28px rgba(255, 59, 114, 0.65);
      transform: translateY(-2px);
    }

    .home-secondary-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
    }

    @media (max-width: 620px) {
      .home-secondary-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    .small-outline-btn {
      background: rgba(12, 25, 43, 0.92);
      border: 1px solid #2e5175;
      color: #a5cae8;
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 1.4px;
      padding: 7px 10px;
      cursor: pointer;
      text-transform: uppercase;
      transition: all 0.14s;
      text-align: center;
    }

    .small-outline-btn:hover {
      border-color: var(--cyan-bright);
      color: #ffffff;
      background: #183454;
    }

    /* STAGE CENTRAL DE PERGUNTA + ARENA CIRCULAR DO BAIACU */
    .prompt-stage {
      position: fixed;
      top: 112px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 95;
      width: min(620px, 95vw);
      display: flex;
      flex-direction: column;
      align-items: center;
      max-height: calc(100vh - 188px);
      overflow-y: auto;
      padding-bottom: 6px;
    }

    .prompt-box {
      width: 100%;
      background: rgba(10, 21, 37, 0.96);
      border: 2px solid #2e5278;
      box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78), inset 0 0 22px rgba(0, 0, 0, 0.5);
      padding: 14px 20px;
      position: relative;
      transition: transform 0.15s, border-color 0.2s;
    }

    .prompt-box.shake {
      animation: shakeCard 0.35s ease;
      border-color: var(--pink);
    }

    .prompt-box.sonar-hit-glow {
      border-color: var(--cyan-bright);
      box-shadow: 0 0 32px rgba(0, 245, 255, 0.6);
    }

    @keyframes shakeCard {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-8px); }
      40%, 80% { transform: translateX(8px); }
    }

    .prompt-step-tag {
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 2px;
      color: var(--pink-glow);
      text-transform: uppercase;
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
    }

    .prompt-question-text {
      font-family: 'JetBrains Mono', monospace;
      font-size: clamp(15px, 2.1vw, 20px);
      font-weight: 800;
      color: #ffffff;
      line-height: 1.3;
      margin-bottom: 10px;
      text-shadow: 0 2px 0 rgba(0,0,0,0.7);
    }

    .prompt-helper-line {
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 1.6px;
      color: #8ab4d8;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 8px;
    }

    /* RODA DE PEIXES (ARENA CIRCULAR DO MODO BAIACU BATATA QUENTE) */
    .puffer-circle-arena {
      width: 100%;
      margin-top: 8px;
      background: radial-gradient(circle at center, rgba(20, 45, 76, 0.96) 0%, rgba(8, 19, 34, 0.98) 100%);
      border: 2px solid #355d87;
      padding: 10px 14px;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.65);
    }

    .puffer-arena-header {
      width: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 1.5px;
      color: var(--gold);
      margin-bottom: 4px;
      flex-wrap: wrap;
      gap: 6px;
    }

    .fish-wheel-stage {
      position: relative;
      width: 270px;
      height: 215px;
      margin: 2px auto;
    }

    /* O BAIACU-BOMBA NO CENTRO DA RODA */
    .wheel-center-bomb {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 82px;
      height: 82px;
      transform: translate(-50%, -50%);
      z-index: 10;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* PEIXE ASSENTADO NA RODA CIRCULAR */
    .wheel-fish-seat {
      position: absolute;
      width: 82px;
      padding: 4px 5px;
      background: rgba(7, 16, 29, 0.94);
      border: 2px solid #274769;
      transform: translate(-50%, -50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      transition: all 0.28s ease;
      z-index: 12;
    }

    .wheel-fish-seat.holding-bomb {
      border-color: var(--gold);
      background: rgba(66, 32, 6, 0.92);
      box-shadow: 0 0 18px rgba(255, 209, 102, 0.75);
      transform: translate(-50%, -50%) scale(1.1);
      z-index: 18;
    }

    .wheel-fish-seat.eliminated {
      opacity: 0.32;
      filter: grayscale(1);
      border-color: #3b1c26;
    }

    .seat-avatar-icon {
      font-size: 22px;
      line-height: 1;
      margin-bottom: 2px;
    }

    .seat-player-name {
      font-family: 'VT323', monospace;
      font-size: 14px;
      color: #ffffff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 74px;
    }

    .seat-hearts-row {
      font-size: 10px;
      line-height: 1;
      margin-top: 1px;
    }

    /* PÍLULAS DE TENTATIVAS E PALAVRAS USADAS */
    .attempts-tray {
      width: 100%;
      margin-top: 6px;
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      justify-content: center;
      max-height: 68px;
      overflow-y: auto;
    }

    .attempt-pill {
      background: rgba(255, 59, 114, 0.16);
      border: 1px solid rgba(255, 59, 114, 0.6);
      color: #ffadc5;
      font-family: 'VT323', monospace;
      font-size: 15px;
      padding: 2px 8px;
    }

    .used-hotpotato-pill {
      background: rgba(74, 222, 128, 0.16);
      border: 1px solid rgba(74, 222, 128, 0.6);
      color: #86efac;
      font-family: 'VT323', monospace;
      font-size: 15px;
      padding: 2px 8px;
    }

    /* BANNER DO CORRETOR ORTOGRÁFICO */
    .spellcheck-banner {
      width: 100%;
      margin-top: 8px;
      background: rgba(16, 33, 56, 0.98);
      border: 2px solid var(--gold);
      box-shadow: 0 8px 26px rgba(0, 0, 0, 0.85);
      padding: 11px 15px;
      display: none;
      flex-direction: column;
      gap: 8px;
    }

    .spellcheck-banner.show {
      display: flex;
    }

    .spellcheck-title {
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 2px;
      color: var(--gold);
      display: flex;
      justify-content: space-between;
    }

    .spellcheck-body {
      font-size: 13px;
      color: #e2f1ff;
    }

    .spellcheck-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
    }

    .spell-btn {
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 1.5px;
      padding: 5px 13px;
      cursor: pointer;
      border: 1px solid transparent;
      text-transform: uppercase;
    }

    .spell-btn.confirm {
      background: var(--cyan-bright);
      color: #03101c;
      font-weight: 700;
    }

    .spell-btn.cancel {
      background: rgba(255,255,255,0.08);
      border-color: #416385;
      color: #b8d4ec;
    }

    /* BARRA DE DIGITAÇÃO INFERIOR */
    .bottom-input-dock {
      position: fixed;
      bottom: 12px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 130;
      display: flex;
      align-items: center;
      gap: 10px;
      width: min(580px, 95vw);
    }

    .timer-orb {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: radial-gradient(circle, #0e2439 0%, #071320 100%);
      border: 2px solid var(--cyan-bright);
      box-shadow: 0 0 15px rgba(0, 245, 255, 0.35);
      display: grid;
      place-items: center;
      font-family: 'VT323', monospace;
      font-size: 25px;
      color: var(--cyan-bright);
      flex-shrink: 0;
    }

    .timer-orb.paused {
      border-color: var(--gold);
      color: var(--gold);
    }

    .timer-orb.danger {
      border-color: var(--pink);
      color: var(--pink);
      box-shadow: 0 0 18px rgba(255, 59, 114, 0.75);
      animation: pulseOrb 0.45s infinite alternate;
    }

    @keyframes pulseOrb {
      from { transform: scale(1); }
      to { transform: scale(1.1); }
    }

    .answer-input-wrap {
      position: relative;
      flex: 1;
      background: rgba(6, 14, 25, 0.96);
      border: 2px solid #2b4f73;
      height: 50px;
      display: flex;
      align-items: center;
    }

    .answer-input-wrap:focus-within {
      border-color: var(--cyan-bright);
      box-shadow: 0 0 16px rgba(0, 245, 255, 0.25);
    }

    .answer-input {
      width: 100%;
      height: 100%;
      background: transparent;
      border: none;
      outline: none;
      padding: 0 16px;
      color: #ffffff;
      font-family: 'JetBrains Mono', monospace;
      font-size: 15px;
      font-weight: 600;
    }

    .answer-input::placeholder {
      color: #4d7396;
    }

    .input-timer-progress {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 3px;
      background: var(--cyan-bright);
      width: 100%;
      transition: width 0.2s linear;
    }

    .dive-submit-btn {
      height: 50px;
      padding: 0 20px;
      background: linear-gradient(180deg, #9e2a50 0%, #6e1834 100%);
      border: 2px solid #ff759f;
      color: #ffffff;
      font-family: 'VT323', monospace;
      font-size: 22px;
      letter-spacing: 2px;
      text-transform: uppercase;
      cursor: pointer;
      flex-shrink: 0;
    }

    .dive-submit-btn:hover:not(:disabled) {
      background: var(--pink);
      box-shadow: 0 0 18px rgba(255, 59, 114, 0.6);
    }

    .dive-submit-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    /* TOAST DE SONAR */
    .sonar-toast {
      position: fixed;
      bottom: 72px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 220;
      background: rgba(8, 19, 34, 0.98);
      border: 2px solid var(--cyan-bright);
      color: #ffffff;
      font-family: 'VT323', monospace;
      font-size: 19px;
      letter-spacing: 1.3px;
      padding: 8px 18px;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s;
      text-align: center;
      box-shadow: 0 8px 28px rgba(0,0,0,0.85);
    }

    .sonar-toast.show {
      opacity: 1;
    }

    /* MODAIS GERAIS (REVELAÇÃO, LOJA DE AVATARES, ARQUIVO DIÁRIO, CATÁLOGO) */
    .reveal-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 190;
      background: rgba(2, 8, 16, 0.84);
      backdrop-filter: blur(5px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 14px;
    }

    .reveal-card {
      width: min(740px, 96vw);
      max-height: 90vh;
      background: #091525;
      border: 2px solid #32587e;
      box-shadow: 0 22px 65px rgba(0,0,0,0.9);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .reveal-header {
      padding: 14px 20px;
      border-bottom: 1px solid #1e3854;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #0d1e33;
      gap: 10px;
      flex-wrap: wrap;
    }

    .reveal-verdict {
      font-family: 'VT323', monospace;
      font-size: 25px;
      letter-spacing: 2px;
      text-transform: uppercase;
    }

    .reveal-tier-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px 12px;
      border: 1.5px solid currentColor;
      font-family: 'VT323', monospace;
      font-size: 18px;
      letter-spacing: 1.5px;
      background: rgba(0, 0, 0, 0.4);
    }

    .reveal-body {
      padding: 16px 20px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .marine-tiers-legend {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 5px;
      background: #06101c;
      padding: 8px;
      border: 1px solid #1b334d;
    }

    @media (max-width: 620px) {
      .marine-tiers-legend {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .tier-legend-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 5px 4px;
      border: 1px solid rgba(255,255,255,0.06);
      font-family: 'VT323', monospace;
    }

    .tier-legend-item.current-tier {
      border-color: #ffffff;
      background: rgba(255,255,255,0.12);
      box-shadow: 0 0 12px rgba(0, 245, 255, 0.35);
    }

    .answers-pool-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
      gap: 6px;
    }

    .pool-answer-item {
      padding: 8px 10px;
      background: #0d1f36;
      border: 1px solid #213e5e;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      gap: 6px;
    }

    .pool-answer-item.picked {
      border-color: var(--cyan-bright);
      background: rgba(0, 245, 255, 0.16);
      box-shadow: 0 0 12px rgba(0, 245, 255, 0.3);
    }

    .pool-depth-tag {
      font-family: 'VT323', monospace;
      font-size: 17px;
      letter-spacing: 1px;
      white-space: nowrap;
    }

    .reveal-footer {
      padding: 12px 20px;
      border-top: 1px solid #1e3854;
      background: #0d1e33;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
    }

    /* CARDS DA LOJA DE PEIXES (AVATARES POR TIER) */
    .avatar-shop-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
      gap: 10px;
    }

    .avatar-shop-card {
      background: #0d1e34;
      border: 2px solid #254566;
      padding: 12px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 8px;
      position: relative;
    }

    .avatar-shop-card.equipped {
      border-color: var(--cyan-bright);
      box-shadow: 0 0 16px rgba(0, 245, 255, 0.28);
    }

    /* ESTÚDIO & PASTAS */
    .studio-input, .studio-select {
      width: 100%;
      background: #06101d;
      border: 1px solid #2b4d70;
      color: #fff;
      padding: 8px 11px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 12px;
      outline: none;
    }

    .studio-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      border-bottom: 1px solid #1e3854;
      padding-bottom: 10px;
    }

    .studio-tab {
      background: #0e2036;
      border: 1px solid #274869;
      color: #93b8d8;
      font-family: 'VT323', monospace;
      font-size: 16px;
      letter-spacing: 1.5px;
      padding: 6px 12px;
      cursor: pointer;
      text-transform: uppercase;
    }

    .studio-tab.active {
      background: var(--cyan-bright);
      color: #03101c;
      font-weight: 700;
    }

    .folder-card {
      background: #0d1e33;
      border: 1px solid #254668;
      padding: 11px 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .folder-header-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-family: 'VT323', monospace;
      font-size: 18px;
      color: var(--gold);
      letter-spacing: 1.4px;
    }

    .answer-builder-row {
      display: grid;
      grid-template-columns: 1.3fr 1.3fr 85px 34px;
      gap: 6px;
      align-items: center;
    }

    .hidden {
      display: none !important;
    }
  
/* Local edition: arcade ocean */
:root { --panel-bg: #081a2bf5; --panel-border: #31566e; }
.pixel-creature { display:inline-block; width:56px; height:42px; position:relative; vertical-align:middle; }
.pixel-creature svg { width:100%; height:100%; overflow:visible; animation:pixelPaddle .65s steps(2,end) infinite; filter:drop-shadow(0 3px 0 #03101a); }
.creature-jelly svg,.creature-squid svg { animation:pixelFloat 1.5s steps(4,end) infinite; }
.pixel-bubble { position:absolute; width:3px; height:3px; border:1px solid #b4f8ff; top:13px; right:-2px; animation:pixelBubble 2.4s steps(6,end) infinite; }
@keyframes pixelPaddle { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-2px) rotate(2deg)} }
@keyframes pixelFloat { 0%,100%{transform:translateY(2px) scaleY(.95)} 50%{transform:translateY(-4px) scaleY(1.04)} }
@keyframes pixelBubble {0%{transform:translate(0,0);opacity:0}30%{opacity:.7}100%{transform:translate(8px,-18px);opacity:0}}
.ambient-shop-fish-sprite {display:inline-block;transform:none;}
.ambient-shop-fish.reverse-dir .ambient-shop-fish-sprite {transform:scaleX(-1)}
.ambient-shop-fish-tag {display:none}
.ambient-shop-fish {opacity:.9;filter:drop-shadow(0 0 5px #56bcd422)}
.ambient-shop-fish .pixel-creature {width:64px;height:48px}
.seat-avatar-icon .pixel-creature {width:42px;height:32px}
.sonar-wave-ring {width:160px;height:160px}
.sonar-wave-ring.ping-hit,.sonar-wave-ring.ping-error {border-width:1px;box-shadow:0 0 8px #5ce1e633}
@keyframes sonarExpand {from{transform:translate(-50%,-50%) scale(.12);opacity:.7}to{transform:translate(-50%,-50%) scale(1.25);opacity:0}}
.avatar-shop-card {background:linear-gradient(145deg,#102c40,#071722);border-radius:8px;transition:transform .2s,border-color .2s}
.avatar-shop-card:hover {transform:translateY(-3px);border-color:var(--cyan)}
.question-search {display:flex;flex-direction:column;gap:8px;color:#9ec5d2;font-size:11px;letter-spacing:2px}
.question-search input {width:100%;padding:14px 16px;background:#05111e;border:1px solid #3a6073;border-radius:6px;color:#fff;font:15px inherit;letter-spacing:normal}
.question-count {font-size:12px;color:var(--cyan);margin:8px 0}
.question-card {background:#0b2234;border:1px solid #24485b;border-radius:6px;overflow:hidden}
.question-card summary {display:flex;align-items:center;gap:14px;cursor:pointer;padding:16px;list-style:none}
.question-card summary::-webkit-details-marker {display:none}
.question-card small {display:block;color:#86b4c5;font-size:10px;margin-bottom:6px;letter-spacing:1px}
.question-card strong {font-size:14px;line-height:1.5;display:block}
.question-number {font-family:monospace;font-size:22px;color:#5ce1e6;opacity:.65}
.question-expand {margin-left:auto;color:var(--gold);font-size:24px}
.question-card[open] .question-expand {transform:rotate(45deg)}
.question-answers {display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 16px}
.question-answers>span {background:#051623;border:1px solid #274558;padding:7px 9px;font-size:12px}
.question-answers b {color:var(--gold);margin-left:5px}
.empty-state {padding:28px;color:#a4c9d4;text-align:center;line-height:1.7}
#catalogExplorerList {max-height:45vh!important}
body:has(#homeScreen:not(.hidden)) #topHomeBtn,
body:has(#homeScreen:not(.hidden)) #topPufferModeBtn,
body:has(#homeScreen:not(.hidden)) #topAvatarShopBtn,
body:has(#homeScreen:not(.hidden)) #topDailyArchiveBtn,
body:has(#homeScreen:not(.hidden)) #openStudioQuickBtn {display:none}
body.panel-open #homeScreen,body.panel-open #promptStage,body.panel-open #inputDock,body.panel-open #gameHud {visibility:hidden}
.reveal-modal-backdrop {backdrop-filter:blur(8px);background:#020b15d9}
.reveal-card {box-shadow:0 24px 100px #0009;border-radius:12px;max-height:88dvh}
.top-arcade-bar {gap:6px}
@media(max-width:620px){.top-arcade-bar{flex-wrap:wrap}.arcade-btn{font-size:10px!important;padding:7px!important}.reveal-card{width:96vw!important}.question-card summary{padding:12px;gap:8px}.question-card strong{font-size:12px}.pixel-creature{width:44px;height:33px}}
@media(prefers-reduced-motion:reduce){.pixel-creature svg,.pixel-bubble,.ambient-shop-fish,.shadow-fish{animation:none!important}}

#homeOpenShopQuick {display:none}
body.panel-open .top-arcade-bar {visibility:hidden}
body:has(#marineGuideDialog[open]) .reveal-modal-backdrop {visibility:hidden}
.pixel-puffer {position:relative;width:100%;height:100%;display:grid;place-items:center;transform:scale(var(--inflate));transition:transform .3s steps(3,end)}
.pixel-puffer>.pixel-creature {width:90%;height:85%}
.pixel-hat {position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.puffer-direction {position:absolute;inset:0;text-align:center;color:var(--gold);font-size:22px}
.puffer-danger {filter:drop-shadow(0 0 7px #ff4c77)}
#homeScreen {max-height:calc(100dvh - 64px);overflow:auto}
/* Navigation stays in one reserved row, including narrow viewports. */
.top-arcade-bar {flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-width:calc(100vw - 24px);padding-bottom:4px;pointer-events:auto;scrollbar-width:thin;scrollbar-color:#31566e transparent;}
.top-nav-group {flex-wrap:nowrap;flex:0 0 auto;}
.top-nav-group .arcade-btn {white-space:nowrap;flex-shrink:0;}
.hud-top-bar {top:62px;width:min(620px,95vw);justify-content:space-between;gap:8px;}
.prompt-stage {top:124px;max-height:calc(100dvh - 216px);}
@media(max-width:620px){.top-arcade-bar{flex-wrap:nowrap}.hud-stat-box{min-width:78px;padding:5px 8px}.hud-stat-label{font-size:9px}.hud-top-bar{gap:4px}.home-overlay{padding-top:88px}.krillion-sub{font-size:17px;letter-spacing:2px}.brand-hero{width:100%}.home-secondary-grid{gap:5px}.home-avatar-showcase{padding:10px}.prompt-box{padding:12px}.prompt-question-text{font-size:18px}.bottom-input-dock{width:96vw;gap:6px}.answer-input{font-size:15px}.dive-submit-btn{padding:10px;font-size:14px}}
.question-card {flex:0 0 auto;min-height:76px;} .question-card summary {min-height:74px;}
