* { box-sizing: border-box; image-rendering: pixelated; }

    :root {
      --bg-0: #06060a;
      --bg-1: #0b0b12;
      --bg-2: #11111a;
      --panel: rgba(18, 18, 26, 0.82);
      --panel-strong: rgba(12, 12, 18, 0.92);
      --line: rgba(255, 255, 255, 0.08);
      --line-strong: rgba(255, 255, 255, 0.14);
      --text: #edf0f7;
      --muted: #9aa1b5;
      --muted-2: #6f7690;
      --accent: #b77cff;
      --accent-2: #8d5cff;
      --accent-soft: rgba(183, 124, 255, 0.16);
      --success: #3f9f56;
      --success-soft: #4bb468;
      --danger: #d34b57;
      --danger-soft: #ef6b73;
      --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
      --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
      --radius-xl: 28px;
      --radius-lg: 22px;
      --radius-md: 16px;
      --radius-sm: 12px;
    }

    html, body { min-height: 100%; }

    body {
      background: #06060a;
      color: white;
      font-family: 'Inter', sans-serif;
      margin: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-height: 100vh;
      padding: 80px 20px 0 20px;
      overflow-x: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: -5%;
      background: url('../../../bg.png') center/cover no-repeat;
      filter: blur(5px) brightness(0.55) saturate(1.25);
      animation: bgDrift 55s ease-in-out infinite;
      z-index: -1;
    }

    @keyframes bgDrift {
      0% {
        transform: scale(1.06) translate(0px, 0px);
        filter: blur(5px) brightness(0.55) saturate(1.25);
      }

      50% {
        transform: scale(1.075) translate(-8px, 6px);
        filter: blur(5.5px) brightness(0.57) saturate(1.25);
      }

      100% {
        transform: scale(1.06) translate(0px, 0px);
        filter: blur(5px) brightness(0.55) saturate(1.25);
      }
    }

    body::after {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 20% 30%, rgba(183,124,255,0.12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(141,92,255,0.10), transparent 45%);
      mix-blend-mode: screen;
      opacity: 0.6;
      animation: energyShift 18s ease-in-out infinite alternate;
      z-index: 0;
    }

    @keyframes energyShift {
      0% {
        transform: translate(0px, 0px) scale(1);
        opacity: 0.5;
      }
      50% {
        transform: translate(-20px, 10px) scale(1.1);
        opacity: 0.7;
      }
      100% {
        transform: translate(15px, -15px) scale(1.05);
        opacity: 0.55;
      }
    }

    #notification {
      position: fixed;
      top: -120px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(10, 10, 14, 0.95);
      border: 1px solid rgba(183, 124, 255, 0.72);
      color: var(--text);
      padding: 14px 18px;
      border-radius: 999px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      letter-spacing: 0.5px;
      z-index: 6000;
      box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03) inset;
      transition: top 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.2), opacity 0.35s ease;
      opacity: 0;
      white-space: nowrap;
    }

    #notification.show {
      top: 24px;
      opacity: 1;
    }

    body.guide-open {
      overflow: hidden;
    }

    .guide-scrim {
      position: fixed;
      inset: 0;
      z-index: 2300;
      background: rgba(0,0,0,0.54);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.16s ease, visibility 0s linear 0.16s;
    }

    body.guide-open .guide-scrim {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition-delay: 0s;
    }

    .category-guide {
      display: none;
      position: fixed;
      top: 82px;
      left: 50%;
      transform: translateX(-50%) translateY(-8px);
      z-index: 2400;
      width: min(820px, calc(100vw - 32px));
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      padding: 22px;
      border-radius: 18px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
        rgba(10,10,16,0.97);
      border: 1px solid rgba(183,124,255,0.30);
      box-shadow:
        0 26px 70px rgba(0,0,0,0.58),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 0 28px rgba(183,124,255,0.10);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .category-guide.show {
      display: block;
      animation: guidePop 0.18s ease-out both;
    }

    @keyframes guidePop {
      from { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.98); }
      to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    }

    .guide-title {
      margin: 0 0 12px;
      font-family: 'Press Start 2P', cursive;
      font-size: 16px;
      line-height: 1.5;
      color: var(--accent);
      text-shadow: 0 2px 0 #000;
      text-align: center;
    }

    .guide-copy {
      margin: 0 auto 16px;
      max-width: 680px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.7;
      color: rgba(237,240,247,0.55);
      text-shadow: 0 2px 0 #000;
      text-align: center;
    }

    .guide-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 48px;
      height: 48px;
      border: 0;
      border-radius: 14px;
      background: transparent;
      color: rgba(255,255,255,0.55);
      font-size: 28px;
      font-weight: 900;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      user-select: none;
      transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .guide-close:hover,
    .guide-close:focus-visible {
      color: var(--accent);
      background: rgba(255,255,255,0.08);
      transform: scale(1.05);
      outline: none;
    }

    .guide-section {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    .guide-section-title {
      margin: 0 0 10px;
      font-family: 'Press Start 2P', cursive;
      font-size: 10px;
      line-height: 1.6;
      color: rgba(237,240,247,0.74);
      text-shadow: 0 2px 0 #000;
    }

    .palette-row {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .palette-card {
      min-height: 92px;
      padding: 15px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.09);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 24px rgba(0,0,0,0.22);
    }

    .palette-card.correct-swatch {
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06), transparent 45%),
        linear-gradient(180deg, rgba(29, 100, 51, 0.95), rgba(23, 74, 38, 0.98));
      border-color: rgba(115, 223, 135, 0.22);
    }

    .palette-card.incorrect-swatch {
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05), transparent 45%),
        linear-gradient(180deg, rgba(150, 33, 44, 0.95), rgba(101, 24, 32, 0.98));
      border-color: rgba(255, 125, 138, 0.18);
    }

    .palette-name {
      display: block;
      margin-bottom: 9px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.5;
      color: #fff;
      text-shadow: 0 2px 0 #000;
    }

    .palette-desc {
      display: block;
      font-family: 'Press Start 2P', cursive;
      font-size: 7px;
      line-height: 1.7;
      color: rgba(237,240,247,0.70);
      text-shadow: 0 2px 0 #000;
    }

    .guide-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 2px 4px 2px 0;
    }

    .guide-pill {
      flex: 0 0 auto;
      padding: 8px 10px;
      border-radius: 10px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.08);
      color: rgba(237,240,247,0.82);
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.4;
      text-shadow: 0 2px 0 #000;
    }

    .shell {
      width: 100%;
      max-width: 1120px;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      z-index: 5;
    }

    .title-wrap {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      margin-bottom: 42px;
    }

    .title-wrap::before {
      content: "";
      position: absolute;
      width: 420px;
      height: 140px;
      background: radial-gradient(circle, rgba(183,124,255,0.30) 0%, rgba(183,124,255,0.12) 40%, transparent 75%);
      filter: blur(26px);
      z-index: 0;
      pointer-events: none;
    }

    .logo {
      position: relative;
      z-index: 1;
      width: min(680px, 92vw);
      filter:
        drop-shadow(0 10px 0 rgba(0,0,0,0.9))
        drop-shadow(0 18px 35px rgba(0,0,0,0.55))
        drop-shadow(0 0 18px rgba(183,124,255,0.35));
      animation: logoFloat 4s ease-in-out infinite;
    }

    .home-link {
      position: relative;
      z-index: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 0;
      cursor: pointer;
      transform-origin: center;
      transition: transform 0.22s ease, filter 0.22s ease;
    }

    .home-link:hover,
    .home-link:focus-visible {
      transform: scale(1.035);
      filter: brightness(1.04);
    }

    .home-link:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 8px;
      border-radius: 12px;
    }

    @keyframes logoFloat {
      0%, 100% { transform: translateY(0px); }
      50% { transform: translateY(-4px); }
    }

    .quote-card {
      width: 100%;
      max-width: 760px;
      margin-bottom: 28px;
      padding: 24px 24px 28px;
      border-radius: var(--radius-xl);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
        var(--panel);
      border: 1px solid rgba(183,124,255,0.22);
      box-shadow:
        0 0 0 1px rgba(183,124,255,0.08),
        0 0 28px rgba(183,124,255,0.10),
        var(--shadow);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      position: relative;
      overflow: hidden;
      text-align: center;
    }

    .top-actions {
      position: absolute;
      top: 14px;
      right: 14px;
      z-index: 2;
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .how-to-btn {
      flex: 0 0 auto;
      min-height: 34px;
      border: 1px solid rgba(183,124,255,0.24);
      border-radius: 12px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.05), transparent),
        linear-gradient(90deg, rgba(26,20,40,0.96), rgba(10,10,18,0.96));
      color: #ead8ff;
      font-family: 'Press Start 2P', cursive;
      font-size: 6px;
      line-height: 1.6;
      padding: 8px 10px;
      cursor: pointer;
      text-shadow: 0 2px 0 #000;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 8px 18px rgba(0,0,0,0.22),
        0 0 20px rgba(183,124,255,0.08);
      transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    }

    .how-to-btn:hover,
    .how-to-btn:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(183,124,255,0.42);
      filter: brightness(1.05);
      outline: none;
    }

    .stats-scrim {
      position: fixed;
      inset: 0;
      z-index: 2490;
      background: rgba(3,3,8,0.66);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.16s ease, visibility 0s linear 0.16s;
    }

    body.stats-open {
      overflow: hidden;
    }

    body.stats-open .stats-scrim {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition-delay: 0s;
    }

    .stats-panel {
      display: none;
      position: fixed;
      top: 82px;
      left: 50%;
      transform: translateX(-50%) translateY(-8px);
      z-index: 2500;
      width: min(720px, calc(100vw - 32px));
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      padding: 30px;
      border-radius: 22px;
      background:
        radial-gradient(circle at 50% -10%, rgba(183,124,255,0.22), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,0.06), transparent 34%),
        rgba(10,10,16,0.97);
      border: 1px solid rgba(183,124,255,0.30);
      box-shadow:
        0 26px 70px rgba(0,0,0,0.58),
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 0 28px rgba(183,124,255,0.10);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }

    .stats-panel::before {
      content: "";
      position: absolute;
      inset: 10px;
      pointer-events: none;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.05);
      box-shadow: inset 0 0 34px rgba(183,124,255,0.07);
    }

    .stats-panel.show {
      display: block;
      animation: guidePop 0.18s ease-out both;
    }

    .stats-heading {
      position: relative;
      z-index: 1;
      margin: 0 44px 24px;
      padding-bottom: 18px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      text-align: center;
    }

    .stats-kicker {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      margin-bottom: 12px;
      padding: 7px 10px;
      border-radius: 999px;
      background: rgba(183,124,255,0.12);
      border: 1px solid rgba(183,124,255,0.22);
      color: rgba(237,240,247,0.70);
      font-family: 'Press Start 2P', cursive;
      font-size: 6px;
      line-height: 1.5;
      text-shadow: 0 2px 0 #000;
    }

    .stats-title {
      margin: 0;
      font-family: 'Press Start 2P', cursive;
      font-size: 21px;
      line-height: 1.5;
      color: var(--accent);
      text-shadow: 0 2px 0 #000, 0 0 18px rgba(183,124,255,0.32);
      text-align: center;
    }

    .stats-close {
      position: absolute;
      top: 10px;
      right: 10px;
      width: 48px;
      height: 48px;
      border: 0;
      border-radius: 14px;
      background: transparent;
      color: rgba(255,255,255,0.55);
      font-size: 28px;
      font-weight: 900;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      padding: 0;
      user-select: none;
      transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    }

    .stats-close:hover,
    .stats-close:focus-visible {
      color: var(--accent);
      background: rgba(255,255,255,0.08);
      transform: scale(1.05);
      outline: none;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      position: relative;
      z-index: 1;
    }

    .stats-card {
      position: relative;
      min-height: 112px;
      padding: 20px 16px;
      border-radius: 16px;
      background:
        linear-gradient(90deg, rgba(183,124,255,0.18), transparent 34%),
        radial-gradient(circle at 50% 0%, rgba(183,124,255,0.14), transparent 52%),
        linear-gradient(180deg, rgba(24,24,34,0.99), rgba(11,11,18,0.99));
      border: 1px solid rgba(183,124,255,0.22);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        inset 0 -18px 28px rgba(0,0,0,0.18),
        0 14px 26px rgba(0,0,0,0.28);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      text-align: center;
      overflow: hidden;
    }

    .stats-card::before {
      content: "";
      position: absolute;
      left: 0;
      top: 14px;
      bottom: 14px;
      width: 3px;
      border-radius: 0 999px 999px 0;
      background: linear-gradient(180deg, #d6b3ff, #8d5cff);
      box-shadow: 0 0 16px rgba(183,124,255,0.42);
    }

    .stats-card-wide {
      grid-column: 1 / -1;
    }

    .stats-card span {
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.6;
      color: rgba(237,240,247,0.64);
      text-shadow: 0 2px 0 #000;
      text-transform: uppercase;
    }

    .stats-card b {
      font-family: 'Press Start 2P', cursive;
      font-size: 26px;
      line-height: 1;
      color: #fff;
      text-shadow: 0 2px 0 #000, 0 0 16px rgba(183,124,255,0.25);
    }

    .stats-footer {
      position: relative;
      z-index: 1;
      margin-top: 20px;
      padding-top: 18px;
      border-top: 1px solid rgba(255,255,255,0.08);
    }

    .copy-stats-btn {
      width: 100%;
      margin-top: 0;
      border: 1px solid rgba(255,255,255,0.14);
      background: linear-gradient(180deg, rgba(183,124,255,1), rgba(141,92,255,1));
      color: #0b0912;
      padding: 16px 18px;
      border-radius: 14px;
      font-family: 'Press Start 2P', cursive;
      font-size: 9px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 24px rgba(141,92,255,0.18);
      transition: transform 0.15s ease, filter 0.15s ease;
    }

    .copy-stats-btn:hover,
    .copy-stats-btn:focus-visible {
      transform: translateY(-1px);
      filter: brightness(1.08);
      outline: none;
    }

    .quote-card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 12% 0%, rgba(183,124,255,0.12), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(141,92,255,0.08), transparent 35%);
      opacity: 0.95;
    }

    .quote-kicker {
      position: relative;
      z-index: 1;
      margin-bottom: 18px;
      font-family: 'Press Start 2P', cursive;
      font-size: 9px;
      line-height: 1.8;
      letter-spacing: 1px;
      color: rgba(237,240,247,0.62);
      text-shadow: 0 2px 0 #000;
    }

    .quote-title {
      position: relative;
      z-index: 1;
      margin: 14px auto 20px;
      font-family: 'Press Start 2P', cursive;
      max-width: 580px;
      font-size: 13px;
      line-height: 1.7;
      color: var(--accent);
      text-shadow:
        0 2px 0 #000,
        0 0 14px rgba(183,124,255,0.28);
    }

        .quote-text {
        position: relative;
        z-index: 1;
        max-width: 610px;
        margin: 0 auto;
        font-size: clamp(15px, 1.9vw, 23px);
        line-height: 1.45;
        font-weight: 900;
        color: var(--text);
        text-shadow: 0 3px 0 #000;

        overflow-wrap: anywhere;
        word-break: normal;
        }

        .quote-text.long {
        font-size: clamp(13px, 1.5vw, 18px);
        line-height: 1.55;
        }

        .quote-text.extra-long {
        font-size: clamp(11px, 1.2vw, 15px);
        line-height: 1.65;
        }

    .quote-note {
      position: relative;
      z-index: 1;
      margin-top: 20px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 12px;
      font-family: 'Press Start 2P', cursive;
      font-size: 9px;
      line-height: 1.7;
      color: rgba(237,240,247,0.62);
      text-align: center;
      text-shadow: 0 2px 0 #000;
    }

    .quote-note span {
      color: rgba(183,124,255,0.86);
    }

    .quote-hint-row {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      max-width: 520px;
      margin: 18px auto 0;
    }

    .quote-hint-tile {
      min-height: 132px;
      border-radius: var(--radius-lg);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
        linear-gradient(180deg, rgba(12, 12, 18, 0.98), rgba(9, 9, 14, 0.98));
      border: 1px solid rgba(183,124,255,0.18);
      box-shadow:
        0 0 0 1px rgba(183,124,255,0.07),
        inset 0 1px 0 rgba(255,255,255,0.03),
        inset 0 -1px 0 rgba(0,0,0,0.35),
        0 14px 26px rgba(0,0,0,0.28),
        0 0 22px rgba(183,124,255,0.06);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 16px;
      position: relative;
      overflow: hidden;
    }

    .quote-hint-tile::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(183,124,255,0.08), transparent 30%, transparent 70%, rgba(255,255,255,0.03));
      opacity: 0.55;
    }

    .quote-hint-label {
      position: relative;
      z-index: 1;
      display: block;
      width: 100%;
      margin: 0 auto 10px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.8;
      color: #aaa;
      text-transform: uppercase;
      text-align: center;
      text-shadow: 0 2px 0 #000;
    }

    .quote-hint-icon {
      position: relative;
      z-index: 1;
      width: 64px;
      height: 52px;
      border-radius: 18px;
      border: 1px solid rgba(183,124,255,0.22);
      background:
        radial-gradient(circle at 34% 20%, rgba(255,255,255,0.24), transparent 26%),
        linear-gradient(180deg, rgba(183,124,255,0.96), rgba(141,92,255,0.96));
      opacity: 0.82;
      line-height: 1;
      margin-bottom: 14px;
      box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.18),
        0 8px 18px rgba(141,92,255,0.18);
    }

    .quote-hint-icon::before {
      content: "";
      position: absolute;
      left: 12px;
      bottom: -5px;
      width: 13px;
      height: 13px;
      background: rgba(141,92,255,0.96);
      border-left: 1px solid rgba(183,124,255,0.22);
      border-bottom: 1px solid rgba(183,124,255,0.22);
      border-bottom-left-radius: 8px;
      border-top-right-radius: 3px;
      transform: rotate(45deg);
    }

    .quote-hint-icon::after {
      content: "";
      position: absolute;
      left: 1px;
      right: 1px;
      bottom: 0;
      height: 16px;
      border-radius: 0 0 17px 14px;
      background: linear-gradient(180deg, rgba(148,96,255,0.98), rgba(141,92,255,0.96));
      pointer-events: none;
    }

    .quote-hint-icon .dot {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 1;
      display: block;
      width: 6px;
      height: 6px;
      border-radius: 999px;
      background: rgba(255,255,255,0.88);
      box-shadow: 0 2px 0 rgba(76,36,139,0.55);
    }

    .quote-hint-icon .dot:nth-child(1) {
      transform: translate(-16px, -50%);
    }

    .quote-hint-icon .dot:nth-child(2) {
      transform: translate(-50%, -50%);
    }

    .quote-hint-icon .dot:nth-child(3) {
      transform: translate(10px, -50%);
    }

    .quote-hint-reveal {
      position: relative;
      z-index: 1;
      border: 1px solid rgba(255,255,255,0.14);
      background: linear-gradient(180deg, rgba(183,124,255,1), rgba(141,92,255,1));
      color: #0b0912;
      padding: 12px 16px;
      border-radius: 14px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      font-weight: 900;
      cursor: pointer;
      box-shadow: 0 10px 24px rgba(141,92,255,0.18);
      transition: transform 0.15s ease, filter 0.15s ease;
    }

    .quote-hint-reveal:hover,
    .quote-hint-reveal:focus-visible {
      transform: translateY(-1px);
      filter: brightness(1.08);
      outline: none;
    }

    .quote-hint-content {
      position: relative;
      z-index: 1;
      display: none;
      align-items: center;
      justify-content: center;
      gap: 14px;
      width: 100%;
    }

    .quote-hint-avatar {
      width: 62px;
      height: 62px;
      border-radius: 15px;
      border: 1px solid rgba(255,255,255,0.10);
      box-shadow: 0 12px 26px rgba(0,0,0,0.35);
      background: rgba(255,255,255,0.05);
      object-fit: cover;
    }

    .quote-hint-text {
      min-width: 0;
      text-align: left;
    }

    .quote-hint-name {
      font-size: 19px;
      line-height: 1.05;
      font-weight: 900;
      color: var(--text);
      text-shadow: 0 2px 0 #000;
      word-break: break-word;
    }

    .quote-hint-tile.unlocked {
      outline: 1px solid rgba(183,124,255,0.22);
      box-shadow: 0 0 0 1px rgba(183,124,255,0.10) inset, 0 14px 26px rgba(0,0,0,0.26);
    }

    .xp-container {
      width: 100%;
      max-width: 540px;
      margin-bottom: 28px;
      text-align: center;
    }

    .xp-level {
      font-family: 'Press Start 2P', cursive;
      font-size: 12px;
      color: var(--accent);
      text-shadow:
        -1px -1px 0 #08070d,
        1px -1px 0 #08070d,
        -1px 1px 0 #08070d,
        1px 1px 0 #08070d,
        0 2px 0 #000,
        0 0 8px rgba(183,124,255,0.34);
      margin-bottom: 7px;
    }

    .xp-bar-outer {
      width: 100%;
      height: 14px;
      background: rgba(7,7,12,0.76);
      border: 1px solid rgba(183,124,255,0.10);
      border-radius: 999px;
      overflow: hidden;
      box-shadow:
        inset 0 1px 2px rgba(0,0,0,0.62),
        0 8px 18px rgba(0,0,0,0.24);
    }

    .xp-bar-fill {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, #8c4dff, #bd6cff, #d491ff);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.20),
        0 0 10px rgba(183,124,255,0.42);
      transition: width 0.8s ease;
    }

    .xp-actions {
      display: flex;
      justify-content: center;
      align-items: stretch;
      gap: 12px;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .stats-open-btn {
      flex: 0 1 200px;
      min-width: 180px;
      min-height: 42px;
      border: 1px solid rgba(183,124,255,0.30);
      border-radius: 14px;
      background:
        radial-gradient(circle at 50% 0%, rgba(183,124,255,0.18), transparent 50%),
        linear-gradient(180deg, rgba(255,255,255,0.06), transparent),
        linear-gradient(90deg, rgba(26,20,40,0.98), rgba(10,10,18,0.98));
      color: #f3e7ff;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.5;
      padding: 11px 18px;
      cursor: pointer;
      text-shadow: 0 2px 0 #000;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 10px 24px rgba(0,0,0,0.26),
        0 0 24px rgba(183,124,255,0.12);
      transition: transform 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
    }

    .stats-open-btn:hover,
    .stats-open-btn:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(183,124,255,0.50);
      filter: brightness(1.07);
      outline: none;
    }

    .search-wrapper {
      width: 100%;
      max-width: 540px;
      margin-bottom: 30px;
      position: relative;
      z-index: 12;
    }

    .search-wrapper.suggestions-open {
      z-index: 120;
    }

    .search-container {
      display: flex;
      align-items: stretch;
      width: 100%;
      background: rgba(10, 10, 14, 0.85);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 20px;
      overflow: hidden;
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }

    #guessInput {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: 0;
      outline: none;
      color: var(--text);
      font-size: 16px;
      padding: 18px 18px;
      font-weight: 700;
      letter-spacing: 0.2px;
    }

    #guessInput::placeholder {
      color: var(--muted-2);
    }

    #guessInput:disabled {
      opacity: 0.55;
      color: #7b8095;
    }

    .guess-btn {
      flex: 0 0 auto;
      min-width: 132px;
      padding: 0 20px;
      border: 0;
      border-left: 1px solid rgba(255,255,255,0.08);
      background: linear-gradient(180deg, rgba(183,124,255,1), rgba(141,92,255,1));
      color: #0d0912;
      font-family: 'Press Start 2P', cursive;
      font-size: 10px;
      font-weight: 900;
      cursor: pointer;
      transition: transform 0.15s ease, filter 0.15s ease;
    }

    .guess-btn:hover {
      filter: brightness(1.07);
    }

    .guess-btn:active {
      transform: translateY(1px);
    }

    .guess-btn:disabled {
      background: #1b1b24;
      color: #5e6377;
      cursor: not-allowed;
    }

    .give-up-btn {
      display: block;
      margin: 10px auto 0;
      padding: 10px 14px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      background: rgba(10, 10, 14, 0.58);
      color: rgba(233,236,247,0.66);
      font-family: 'Press Start 2P', cursive;
      font-size: 7px;
      cursor: pointer;
      transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    }

    .give-up-btn:hover {
      color: #ffffff;
      border-color: rgba(255,125,138,0.34);
      background: rgba(120, 26, 36, 0.42);
    }

    .give-up-btn:active { transform: translateY(1px); }
    .give-up-btn:disabled { opacity: 0.42; cursor: not-allowed; }

    .xp-actions .give-up-btn {
      flex: 0 1 200px;
      min-width: 180px;
      min-height: 42px;
      margin: 0;
      padding: 11px 18px;
      border-color: rgba(255,125,138,0.20);
      background:
        radial-gradient(circle at 50% 0%, rgba(255,125,138,0.12), transparent 50%),
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
        rgba(10, 10, 14, 0.58);
      color: rgba(233,236,247,0.74);
      font-size: 8px;
      line-height: 1.5;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 10px 24px rgba(0,0,0,0.24);
    }

    .yesterday-answer {
      width: max-content;
      max-width: 100%;
      margin: 12px auto 0;
      padding: 0;
      border: 0;
      background: transparent;
      color: rgba(237,240,247,0.68);
      font-family: 'Press Start 2P', cursive;
      font-size: 9px;
      line-height: 1.7;
      text-align: center;
      text-shadow: 0 2px 0 #000;
      box-shadow: none;
    }

    .yesterday-answer span {
      color: #b77cff;
      font-size: 12px;
      text-shadow: 0 2px 0 #000, 0 0 12px rgba(183,124,255,0.36);
    }

    .suggestions-box {
      position: absolute;
      top: calc(100% + 12px);
      left: 0;
      right: 0;
      z-index: 120;
      width: 100%;
      margin-top: 0;
      display: none;
      background: rgba(11, 11, 17, 0.98);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 24px 60px rgba(0,0,0,0.55);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      max-height: 360px;
      overflow-y: auto;
    }

    .suggestion-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px 14px;
      cursor: pointer;
      color: var(--text);
      border-bottom: 1px solid rgba(255,255,255,0.06);
      transition: background 0.12s ease;
    }

    .suggestion-item:hover {
      background: rgba(255,255,255,0.05);
    }

    .suggestion-item img {
      width: 38px;
      height: 38px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.08);
      flex: 0 0 auto;
    }

    img.image-failed {
      visibility: hidden;
    }

    .suggestion-info {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 2px;
    }

    .suggestion-info b {
      display: block;
      font-size: 14px;
      margin: 0;
      line-height: 1.2;
    }

    .alias {
      font-size: 10px;
      color: #95a0b8;
      opacity: 0.8;
      line-height: 1;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .result-area {
      width: 100%;
      max-width: 650px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      position: relative;
      z-index: 2;
    }

    .quote-result {
      width: 100%;
      min-height: 118px;
      border-radius: 22px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 18px;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        inset 0 -1px 0 rgba(0,0,0,0.4),
        0 14px 26px rgba(0,0,0,0.26);
      border: 1px solid rgba(255,255,255,0.08);
      animation: resultIn 0.38s cubic-bezier(0.18, 0.89, 0.32, 1.2) both;
      position: relative;
      overflow: hidden;
    }

    .quote-result.no-anim {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    }

    .quote-result::before {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 32%, transparent 70%, rgba(255,255,255,0.02));
      pointer-events: none;
    }

    @keyframes resultIn {
      from {
        opacity: 0;
        transform: translateY(8px) scale(0.96);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .quote-result.correct {
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.06), transparent 45%),
        linear-gradient(180deg, rgba(29, 100, 51, 0.95), rgba(23, 74, 38, 0.98));
      border-color: rgba(115, 223, 135, 0.22);
    }

    .quote-result.incorrect {
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.05), transparent 45%),
        linear-gradient(180deg, rgba(150, 33, 44, 0.95), rgba(101, 24, 32, 0.98));
      border-color: rgba(255, 125, 138, 0.18);
    }

    .result-img {
      width: 82px;
      height: 82px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 12px 26px rgba(0,0,0,0.32);
      position: relative;
      z-index: 1;
      flex: 0 0 auto;
    }

    .result-text {
      position: relative;
      z-index: 1;
      min-width: 0;
      flex: 1;
    }

    .result-label {
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      color: rgba(237,240,247,0.68);
      text-shadow: 0 2px 0 #000;
      margin-bottom: 10px;
      line-height: 1.6;
    }

    .result-name {
      font-size: 28px;
      font-weight: 900;
      color: var(--text);
      text-shadow: 0 2px 0 #000;
      line-height: 1.05;
    }

    .result-alias {
      margin-top: 6px;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      color: rgba(237,240,247,0.78);
      line-height: 1.5;
    }

    .footer-fade {
      position: relative;
      width: 100%;
      height: 250px;
      pointer-events: none;
      z-index: 0;
      margin-top: auto;
      margin-left: 0;
      margin-right: 0;
      display: flex;
      align-items: flex-end;
      justify-content: center;
      padding-bottom: 30px;
      background: linear-gradient(
        to top,
        rgba(0,0,0,0.95) 0%,
        rgba(0,0,0,0.75) 30%,
        rgba(0,0,0,0.35) 65%,
        rgba(0,0,0,0.0) 100%
      );
    }

    .footer-links {
      pointer-events: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      font-family: 'Press Start 2P', cursive;
      font-size: 7px;
      color: rgba(233,236,247,0.40);
      letter-spacing: 0.6px;
      user-select: none;
    }

    .footer-links a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 30px;
      padding: 8px 11px;
      color: rgba(233,236,247,0.58);
      text-decoration: none;
    }

    .footer-links a:hover,
    .footer-links a:focus-visible {
      color: rgba(233,236,247,0.88);
      text-decoration: underline;
      outline: 0;
    }

.found-counter {
  margin: -10px 0 28px;
  text-align: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: rgba(237,240,247,0.72);
  text-shadow: 0 2px 0 #000;
  position: relative;
  z-index: 2;
}

#quoteFoundCount {
  color: #b77cff;
  font-size: 10px;
  margin-right: 6px;
  font-weight: 800;
  text-shadow:
    0 2px 0 #000,
    0 0 10px rgba(183,124,255,0.55);
}

#winOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 8, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  padding: clamp(8px, 2.5dvh, 18px);
}

.win-card {
  width: min(480px, calc(100vw - 20px));
  max-height: calc(100dvh - clamp(16px, 5dvh, 36px));
  background:
    radial-gradient(circle at 50% 0%, rgba(183,124,255,0.08), transparent 28%),
    linear-gradient(180deg, rgba(18,18,27,0.98), rgba(10,10,16,0.98));
  border: 1px solid rgba(183,124,255,0.22);
  border-radius: 30px;
  box-shadow:
    0 0 0 1px rgba(183,124,255,0.08),
    0 0 30px rgba(183,124,255,0.10),
    0 30px 80px rgba(0,0,0,0.62);
  padding: clamp(16px, 4dvh, 30px);
  position: relative;
  animation: winPop 1s ease-out;
  overflow-x: hidden;
  overflow-y: auto;
}

.win-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 18%, transparent 72%, rgba(255,255,255,0.02));
}

@keyframes winPop {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 14px;
  z-index: 20;
  user-select: none;
  pointer-events: auto;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.close-x:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.08);
  transform: scale(1.05);
}

.win-card h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(18px, 4.8dvh, 30px);
  color: var(--accent);
  line-height: 1.25;
  text-shadow: 0 2px 0 #000;
}

.win-main-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.5dvh, 18px);
  align-items: center;
  margin: clamp(12px, 3.4dvh, 28px) 0 clamp(10px, 3dvh, 24px);
  text-align: center;
}

.win-main-info img {
  width: clamp(64px, 14dvh, 106px);
  height: clamp(64px, 14dvh, 106px);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  object-fit: cover;
}

.win-text-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.win-answer-block,
.solved-answer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.win-card .label {
  margin: 0 0 8px;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.win-card .char-name {
  margin: 0;
  font-size: clamp(22px, 4.5dvh, 30px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 2px 0 #000;
}

#winAlias,
#solvedAlias {
  color: var(--accent);
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  margin: 5px auto 0;
  line-height: 1.4;
  text-align: center;
  width: fit-content;
  max-width: 100%;
  display: block;
  overflow-wrap: anywhere;
}

.stats-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.stat-line {
  font-family: 'Press Start 2P', cursive;
  font-size: 11px;
  text-align: center;
  line-height: 1.8;
  text-shadow: 0 2px 0 #000;
}

    .stat-line b {
  display: block;
  font-size: 18px;
  margin-top: 6px;
  color: var(--accent);
}

#winStreak,
#solvedStreak {
  display: block;
  font-size: 18px;
  margin-top: 6px;
  color: var(--accent);
}

.found-place-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  line-height: 1.8;
  text-align: center;
  max-width: 360px;
  word-break: break-word;
  color: rgba(237,240,247,0.78);
  text-shadow: 0 2px 0 #000;
}

.found-place-text span {
  color: var(--accent);
  font-size: 14px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-shadow:
    0 2px 0 #000,
    0 0 10px rgba(183,124,255,0.55);
}

.next-mode {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.next-mode-label {
  margin: 0 0 12px;
  font-family: 'Press Start 2P', cursive;
  font-size: 9px;
  line-height: 1.6;
  color: rgba(237,240,247,0.72);
  text-align: center;
  text-shadow: 0 2px 0 #000;
}

.mode-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 11px 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent),
    linear-gradient(90deg, rgba(26,20,40,0.98), rgba(10,10,18,0.98));
  border: 1px solid rgba(183,124,255,0.18);
  box-shadow:
    0 0 0 1px rgba(183,124,255,0.07),
    inset 0 1px 0 rgba(255,255,255,0.03),
    inset 0 -1px 0 rgba(0,0,0,0.35),
    0 14px 26px rgba(0,0,0,0.28),
    0 0 22px rgba(183,124,255,0.06);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(183,124,255,0.05), transparent 22%, transparent 78%, rgba(141,92,255,0.05));
  opacity: 0.8;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(183,124,255,0.24);
  box-shadow:
    0 0 0 1px rgba(183,124,255,0.10),
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(0,0,0,0.38),
    0 18px 34px rgba(0,0,0,0.34),
    0 0 0 1px rgba(183,124,255,0.08);
}

.mode-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    linear-gradient(180deg, rgba(33,26,52,0.98), rgba(16,13,28,0.98));
  border: 1px solid rgba(183,124,255,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.28);
  position: relative;
  z-index: 1;
}

.icon-grid {
  width: 25px;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.icon-grid span {
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}

.icon-grid span:nth-child(1),
.icon-grid span:nth-child(4) {
  background: #4bb468;
}

.icon-grid span:nth-child(2),
.icon-grid span:nth-child(3) {
  background: #d34b57;
}

.mode-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}

.mode-card .mode-name {
  margin: 0 0 4px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  color: #ead8ff;
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(183,124,255,0.12);
}

.mode-card .mode-desc {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(237,240,247,0.72);
}

#winOverlay .mode-text,
#solvedSummary .mode-text {
  gap: 3px;
  align-items: flex-start;
  text-align: left;
}

#winOverlay .mode-card .mode-name,
#solvedSummary .mode-card .mode-name {
  font-size: 19px;
  white-space: nowrap;
  text-align: left;
  width: 100%;
}

#winOverlay .mode-card .mode-desc,
#solvedSummary .mode-card .mode-desc {
  font-size: 9px;
  text-align: left;
  width: 100%;
}

.mode-enter {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 62px;
  text-align: center;
  padding: 10px 10px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(183,124,255,1), rgba(141,92,255,1));
  color: #12081f;
  font-family: 'Press Start 2P', cursive;
  font-size: 7px;
  line-height: 1;
  box-shadow: 0 4px 0 #4c248b, 0 12px 24px rgba(141,92,255,0.16);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.mode-card:hover .mode-enter {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.share-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(183,124,255,1), rgba(141,92,255,1));
  color: #0c0912;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(141,92,255,0.16);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at 50% 36%, rgba(183,124,255,0.16), transparent 28%),
    rgba(6,6,10,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0s linear 0.16s;
}

body:not(.page-ready) .loading-screen,
body.is-loading .loading-screen {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

body.midnight-reloading .loading-screen {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

body:not(.page-ready) .shell,
body:not(.page-ready) .footer-fade,
body.is-loading .shell,
body.is-loading .footer-fade,
body.midnight-reloading .shell,
body.midnight-reloading .footer-fade {
  opacity: 0;
  transition: opacity 0.12s ease;
}

html.skip-initial-loader body:not(.is-loading):not(.midnight-reloading) .loading-screen {
  opacity: 0;
  visibility: hidden;
  transition: none;
}

html.skip-initial-loader body:not(.is-loading):not(.midnight-reloading) .shell,
html.skip-initial-loader body:not(.is-loading):not(.midnight-reloading) .footer-fade {
  opacity: 1;
  transition: none;
}

.loading-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 18px;
  line-height: 1.7;
  color: var(--accent);
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(183,124,255,0.32);
}

.loading-dots {
  display: flex;
  gap: 10px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(237,240,247,0.75);
  animation: loadingDot 0.84s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.12s; }
.loading-dots span:nth-child(3) { animation-delay: 0.24s; }

@keyframes loadingDot {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-8px); opacity: 1; }
}

    .solved-countdown-label {
    margin-top: 18px;
    }

    .solved-countdown {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: var(--accent);
    text-align: center;
    margin-top: 4px;
    text-shadow: 0 2px 0 #000;
    }

    .countdown-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    opacity: 0.6;
    text-align: center;
    }

    #countdown,
    #solvedCountdown {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: var(--accent);
    text-align: center;
    margin-top: 4px;
    }

    .timezone-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    opacity: 0.6;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 0.5px;
    }

    .solved-summary {
    width: min(480px, calc(100% - 28px));
    margin: 28px auto 34px;
    padding: clamp(16px, 4dvh, 30px);
    scroll-margin-top: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(183,124,255,0.08), transparent 28%),
        linear-gradient(180deg, rgba(18,18,27,0.98), rgba(10,10,16,0.98));
    border: 1px solid rgba(183,124,255,0.22);
    border-radius: 30px;
    box-shadow:
        0 0 0 1px rgba(183,124,255,0.08),
        0 0 30px rgba(183,124,255,0.10),
        0 30px 80px rgba(0,0,0,0.62);
    animation: winPop 1s ease-out;
    position: relative;
    z-index: 2;
    overflow: hidden;
    overflow-x: hidden;
    }

    .solved-summary::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.05),
        transparent 18%,
        transparent 72%,
        rgba(255,255,255,0.02)
    );
    }

    @keyframes solvedSlideIn {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    }

    .solved-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(18px, 4.8dvh, 30px);
    line-height: 1.25;
    color: var(--accent);
    text-align: center;
    text-shadow: 0 2px 0 #000;
    margin-bottom: 18px;
    }

    .solved-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    }

    .solved-main img {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 12px 26px rgba(0,0,0,0.35);
    }

    .solved-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    color: rgba(237,240,247,0.55);
    margin-bottom: 8px;
    }

    .solved-name {
    font-size: 24px;
    font-weight: 900;
    color: var(--text);
    text-shadow: 0 2px 0 #000;
    line-height: 1.05;
    }

    .solved-alias {
      font-family: 'Press Start 2P', cursive;
      font-size: 7px;
      color: var(--accent);
      opacity: 0.85;
      margin: 6px auto 0;
      line-height: 1.5;
      width: fit-content;
      max-width: 100%;
      text-align: center;
      overflow-wrap: anywhere;
    }

    .solved-stats {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: rgba(237,240,247,0.72);
    text-shadow: 0 2px 0 #000;
    }

    .solved-stats b {
    color: var(--accent);
    font-size: 11px;
    }

    .solved-place-text {
    margin-top: 16px;
    font-family: 'Press Start 2P', cursive;
    font-size: 9px;
    line-height: 1.8;
    text-align: center;
    color: rgba(237,240,247,0.78);
    text-shadow: 0 2px 0 #000;
    }

    .solved-place-text span {
    color: var(--accent);
    font-size: 12px;
    text-shadow:
        0 2px 0 #000,
        0 0 10px rgba(183,124,255,0.55);
    }

    @media (max-height: 780px) {
      body {
        padding-top: 34px;
      }

      .title-wrap {
        margin-bottom: 24px;
      }

      .logo {
        width: min(560px, 88vw);
      }

      .quote-card {
        margin-bottom: 20px;
        padding-block: 20px 22px;
      }

      .xp-container {
        margin-bottom: 20px;
      }

      #winOverlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 8px;
      }

      .win-card {
        width: min(430px, calc(100vw - 16px));
        max-height: calc(100dvh - 16px);
        margin: 0 auto;
        padding: 14px;
        border-radius: 22px;
      }

      .win-card h2,
      .solved-summary h2 {
        font-size: clamp(16px, 4.2dvh, 20px);
        line-height: 1.2;
      }

      .win-main-info,
      .solved-summary .win-main-info {
        gap: 7px;
        margin: 10px 0 8px;
      }

      .win-main-info img,
      .solved-summary .win-main-info img {
        width: clamp(54px, 12dvh, 72px);
        height: clamp(54px, 12dvh, 72px);
        border-radius: 12px;
      }

      .win-card .char-name,
      .solved-summary .char-name {
        font-size: clamp(20px, 4dvh, 23px);
      }

      .stats-group {
        margin-top: 9px;
        padding-top: 9px;
        gap: 6px;
      }

      .stat-line {
        font-size: 8px;
        line-height: 1.4;
      }

      .stat-line b,
      #winStreak,
      #solvedStreak {
        font-size: 14px;
        margin-top: 2px;
      }

      #countdown,
      #solvedCountdown {
        font-size: clamp(15px, 3.8dvh, 18px);
        line-height: 1.15;
      }

      .solved-countdown-label {
        margin-top: 7px;
      }

      .next-mode {
        margin-top: 9px;
        padding-top: 9px;
      }

      .next-mode-label {
        margin-bottom: 6px;
        font-size: 6px;
      }

      .mode-card {
        min-height: 52px;
        padding: 7px 9px;
        gap: 8px;
        border-radius: 14px;
      }

      .mode-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 12px;
      }

      #winOverlay .mode-card .mode-name,
      #solvedSummary .mode-card .mode-name {
        font-size: 15px;
      }

      .share-btn {
        margin-top: 9px;
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 7px;
      }

      .solved-summary {
        width: min(430px, calc(100% - 16px));
        margin: 12px auto 18px;
        padding: 14px;
        border-radius: 22px;
      }
    }

    @media (max-height: 620px) {
      .close-x {
        top: 6px;
        right: 6px;
        width: 36px;
        height: 36px;
        font-size: 22px;
      }

      .win-card .label,
      .solved-label,
      .countdown-label,
      .timezone-text {
        font-size: 7px;
      }

      .found-place-text,
      .solved-place-text {
        font-size: 8px;
        line-height: 1.45;
      }

      .found-place-text span,
      .solved-place-text span {
        font-size: 11px;
      }
    }

    @media (max-width: 780px) {
      body {
        padding: 34px 14px 0;
      }

      .top-actions {
        position: static;
        display: flex;
        justify-content: center;
        margin: -4px 0 14px;
      }

      .quote-card {
        padding: 22px 16px 24px;
        border-radius: 24px;
      }

      .quote-title {
        font-size: 11px;
        line-height: 1.7;
      }

      .quote-note {
        font-size: 8px;
      }

      .quote-hint-tile {
        min-height: 124px;
        padding: 14px;
      }

      .quote-hint-label {
        font-size: 7px;
      }

      .quote-hint-avatar {
        width: 58px;
        height: 58px;
      }

      .quote-hint-name {
        font-size: 17px;
      }

      .quote-text {
        font-size: 18px;
      }

      .mode-card { gap: 9px; padding: 10px; min-height: 68px; }
      .mode-icon { width: 44px; height: 44px; flex-basis: 44px; }
      .mode-card .mode-name { font-size: 15px; }
      .mode-card .mode-desc { font-size: 6px; }
      #winOverlay .mode-card .mode-name,
      #solvedSummary .mode-card .mode-name {
        font-size: 18px;
      }
      #winOverlay .mode-card .mode-desc,
      #solvedSummary .mode-card .mode-desc {
        font-size: 9px;
      }
      .mode-enter { min-width: 54px; padding: 9px 8px; font-size: 6px; }

      .guess-btn {
        min-width: 112px;
        font-size: 8px;
      }

      .footer-fade {
        height: 150px;
      }
    }

    @media (max-width: 560px) {
      .logo {
        width: min(420px, 100%);
      }

      .stats-panel {
        top: 56px;
        max-height: calc(100vh - 78px);
        padding: 18px;
      }

      .stats-heading {
        margin: 0 34px 18px 0;
        padding-bottom: 14px;
      }

      .stats-title {
        font-size: 15px;
      }

      .stats-grid {
        grid-template-columns: 1fr;
      }

      .stats-card-wide {
        grid-column: auto;
      }

      .quote-text {
        font-size: 16px;
      }

      #guessInput {
        font-size: 15px;
        padding: 16px 14px;
      }

      .quote-result {
        flex-direction: column;
        text-align: center;
        padding: 18px;
      }

      .result-name {
        font-size: 24px;
      }

      .quote-hint-content {
        gap: 12px;
      }

      .quote-hint-avatar {
        width: 58px;
        height: 58px;
      }

      .quote-hint-name {
        font-size: 17px;
      }

      .palette-row {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 560px) {
      body {
        padding: 38px 10px 0;
      }

      .title-wrap {
        margin-bottom: 24px;
      }

      .title-wrap::before {
        width: min(360px, 96vw);
        height: 104px;
      }

      .logo {
        width: min(430px, 96vw);
      }

      .quote-card {
        padding: 18px 14px 20px;
      }

      .quote-title {
        font-size: 10px;
        line-height: 1.75;
      }

      .quote-note {
        font-size: 7px;
      }

      .quote-hint-tile {
        min-height: 116px;
      }

      .search-wrapper,
      .xp-container {
        max-width: 100%;
      }

      .search-container {
        border-radius: 17px;
      }

      .guess-btn {
        min-width: 96px;
        padding: 0 12px;
        font-size: 7px;
      }

      .suggestions-box {
        max-height: min(300px, 46vh);
      }

      #winOverlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 8px;
      }

      .win-card {
        width: 100%;
        margin: 0 auto;
        padding: 14px 12px;
      }

      .win-card h2,
      .solved-summary h2 {
        font-size: 16px;
      }

      .win-main-info img,
      .solved-main img {
        width: clamp(56px, 12dvh, 72px);
        height: clamp(56px, 12dvh, 72px);
      }

      .footer-links {
        font-size: 6px;
        line-height: 1.7;
      }
    }

    @media (max-width: 380px) {
      .search-container {
        flex-direction: column;
        overflow: visible;
      }

      .guess-btn {
        width: 100%;
        min-height: 44px;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,0.08);
      }
    }

    @media (max-width: 780px) {
      #notification {
        width: calc(100vw - 28px);
        max-width: 420px;
        white-space: normal;
        text-align: center;
        line-height: 1.6;
      }

      .category-guide {
        top: 56px;
        max-height: calc(100vh - 78px);
        padding: 54px 18px 18px;
      }
    }

    @media (max-width: 560px) {
      .quote-hint-content {
        min-width: 0;
      }

      .quote-hint-name,
      .result-name,
      .win-card .char-name,
      .solved-summary .char-name {
        overflow-wrap: anywhere;
      }

      .win-card {
        max-height: calc(100dvh - 24px);
      }

      .win-card h2,
      .solved-summary h2 {
        font-size: 15px;
      }

      .stat-line,
      .timezone-text,
      .countdown-label,
      .found-place-text {
        font-size: 8px;
      }

      #countdown,
      #solvedCountdown {
        font-size: 18px;
        line-height: 1.45;
        overflow-wrap: anywhere;
      }

      .mode-card {
        min-width: 0;
      }

      #winOverlay .mode-card .mode-name,
      #solvedSummary .mode-card .mode-name {
        white-space: normal;
        font-size: 15px;
        overflow-wrap: anywhere;
      }

      #winOverlay .mode-card .mode-desc,
      #solvedSummary .mode-card .mode-desc {
        font-size: 8px;
      }
    }

    @media (max-width: 380px) {
      .mode-card {
        flex-wrap: wrap;
      }

      .mode-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
      }

      .mode-enter {
        width: 100%;
        min-height: 38px;
      }

      .loading-title {
        max-width: calc(100vw - 28px);
        font-size: 13px;
        text-align: center;
      }
    }

    #winOverlay .win-card > h2,
    #solvedSummary > h2 {
      position: relative;
      z-index: 1;
      width: 100%;
      margin: 0;
      text-align: center;
      font-family: 'Press Start 2P', cursive;
      font-size: clamp(18px, 4.8dvh, 30px);
      line-height: 1.25;
      color: var(--accent);
      text-shadow: 0 2px 0 #000;
    }

    #winOverlay .win-main-info,
    #solvedSummary .win-main-info {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: clamp(8px, 2.5dvh, 18px);
      width: 100%;
      margin: clamp(12px, 3.4dvh, 28px) 0 clamp(10px, 3dvh, 24px);
      text-align: center;
    }

    #winOverlay .win-text-side,
    #solvedSummary .win-text-side {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      text-align: center;
    }

    #winOverlay .label,
    #solvedSummary .label {
      margin: 0 0 8px;
      text-align: center;
      font-family: 'Press Start 2P', cursive;
      font-size: 10px;
      line-height: 1.5;
      color: var(--muted);
      letter-spacing: 0.5px;
      text-shadow: 0 2px 0 #000;
    }

    #winOverlay #winName,
    #solvedSummary #solvedName {
      display: block;
      width: 100%;
      margin: 0;
      text-align: center;
      font-family: 'Inter', sans-serif;
      font-size: clamp(22px, 4.5dvh, 30px);
      font-weight: 900;
      line-height: 1.05;
      color: var(--text);
      text-shadow: 0 2px 0 #000;
    }

    #winOverlay #winAlias,
    #solvedSummary #solvedAlias {
      display: block;
      width: fit-content;
      max-width: 100%;
      margin: 5px auto 0;
      text-align: center;
      font-family: 'Press Start 2P', cursive;
      font-size: 8px;
      line-height: 1.4;
      color: var(--accent);
      overflow-wrap: anywhere;
      text-shadow: 0 2px 0 #000;
    }

    @media (max-height: 780px) {
      #winOverlay .win-card > h2,
      #solvedSummary > h2 {
        font-size: clamp(16px, 4.2dvh, 20px);
        line-height: 1.2;
      }

      #winOverlay .win-main-info,
      #solvedSummary .win-main-info {
        gap: 7px;
        margin: 10px 0 8px;
      }

      #winOverlay #winName,
      #solvedSummary #solvedName {
        font-size: clamp(20px, 4dvh, 23px);
      }
    }

    @media (max-width: 560px) {
      #winOverlay .win-card > h2,
      #solvedSummary > h2 {
        font-size: clamp(16px, 4.2dvh, 20px);
      }
    }
