    :root {
      --purple:        #302682;
      --purple-mid:    #4A3AA8;
      --purple-light:  #7B6FD4;
      --purple-dark:   #1E1655;
      --pink:          #ff3d79;
      --pink-light:    #ff6d99;
      --yellow:        #ffe08f;
      --yellow-dim:    #C9A020;
      --bg:            #09071A;
      --bg2:           #100E24;
      --bg3:           #18153A;
      --text:          #EDE8FF;
      --muted:         #7A6FAA;
      --border:        rgba(48,38,130,0.45);
      --border-hover:  rgba(123,111,212,0.6);
      --success:       #3FCFC8;
      --warning:       #ffe08f;
      --danger:        #ff3d79;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: 'Syne', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

    #stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; width: 100%; height: 100%; }

    /* ── KNC site header ── */
    .knc-site-header {
      position: relative; z-index: 2;
      text-align: center; padding: 36px 2rem 28px;
      border-bottom: 1px solid var(--border);
    }
    .knc-logo-wrap { display: inline-block; position: relative; margin-bottom: 1rem; }
    .knc-logo-wrap::before {
      content: ''; position: absolute; inset: -24px; border-radius: 50%;
      background: radial-gradient(ellipse at center,
        rgba(255,224,143,0.32) 0%, rgba(255,224,143,0.12) 45%, rgba(255,224,143,0) 72%);
      pointer-events: none; animation: halo-pulse 4s ease-in-out infinite;
    }
    @keyframes halo-pulse { 0%,100%{opacity:0.7;transform:scale(1)} 50%{opacity:1;transform:scale(1.07)} }
    .knc-logo-wrap img {
      display: block; max-width: 240px; height: auto;
      position: relative; z-index: 1;
      filter: drop-shadow(0 0 14px rgba(255,224,143,0.4));
    }
    .knc-nav {
      display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap;
      font-family: 'Syne', sans-serif; font-size: 0.82rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.1em;
    }
    .knc-nav a { color: rgba(237,232,255,0.5); text-decoration: none; transition: color 0.2s; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
    .knc-nav a:hover { color: var(--yellow); }
    .knc-nav a.active { color: var(--yellow); border-bottom-color: rgba(255,224,143,0.4); }

    /* ── Landing / narrative section ── */
    .landing-section {
      position: relative; z-index: 1;
      margin: 0 auto;
      padding: 56px 2rem 48px; text-align: center;
      border-bottom: 1px solid var(--border);
      transition: opacity 0.6s ease, max-height 0.8s ease;
      max-height: 9999px; overflow: hidden;
    }
    .landing-section.collapsing { opacity: 0; max-height: 0; padding: 0; border: none; }
    .landing-section .live-pill { margin-bottom: 1.5rem; }

    /* ── Live pill ── */
    .live-pill { display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pink-light); border: 1px solid rgba(255,61,121,0.3); background: rgba(255,61,121,0.07); border-radius: 99px; padding: 0.3rem 0.9rem; margin-bottom: 1.25rem; }
    .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 6px var(--pink); animation: blink 2s ease-in-out infinite; }
    @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }
    .sim-header { position: relative; z-index: 1; text-align: center; padding: 48px 2rem 40px; border-bottom: 1px solid var(--border); }
    .sim-header h1 { font-size: clamp(2rem,5vw,3.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
    .sim-header h1 em { font-style: normal; background: linear-gradient(100deg, var(--yellow), var(--pink-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .sim-header p { color: var(--muted); font-size: 0.95rem; max-width: 500px; margin: 0 auto; line-height: 1.65; }
    .landing-section h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1rem; }
    .landing-section h2 em { font-style: normal; background: linear-gradient(100deg, var(--yellow), var(--pink-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .landing-section p { font-size: 1.05rem; color: rgba(237,232,255,0.75); line-height: 1.75; max-width: 580px; margin: 0 auto 1.25rem; }
    .landing-section p strong { color: var(--yellow); font-weight: 600; }
    .landing-cta { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem; letter-spacing: 0.05em; }

    /* ── Hero game cards ── */
    .game-hero {
      position: relative; z-index: 1;
      display: flex; gap: 20px; justify-content: center;
      padding: 3rem 1.5rem 2.5rem; margin: 0 auto; flex-wrap: wrap;
      transition: opacity 0.6s ease, max-height 0.8s ease;
      max-height: 9999px; overflow: hidden;
    }
    .game-hero.collapsing { opacity: 0; max-height: 0; padding: 0; }
    .game-card {
      flex: 1; min-width: 280px; max-width: 420px;
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 20px; padding: 2.25rem 2rem;
      cursor: pointer; transition: all 0.3s ease;
      text-align: left; position: relative; overflow: hidden;
    }
    .game-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; opacity: 0.5; transition: opacity 0.3s; }
    .game-card.card-alert::before { background: linear-gradient(90deg, var(--purple), var(--pink)); }
    .game-card.card-bogus::before { background: linear-gradient(90deg, var(--success), var(--purple-light)); }
    .game-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(48,38,130,0.35); }
    .game-card:hover::before { opacity: 1; }
    .game-card-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
    .game-card-label { font-family: 'DM Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 0.4rem; }
    .game-card-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
    .game-card-desc { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: rgba(237,232,255,0.65); line-height: 1.7; margin-bottom: 1rem; }
    .game-card-badge { display: inline-block; font-family: 'DM Mono', monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--success); border: 1px solid rgba(63,207,200,0.3); background: rgba(63,207,200,0.07); border-radius: 99px; padding: 0.3rem 0.85rem; margin-bottom: 1rem; }
    .game-card-start { display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'Syne', sans-serif; font-size: 0.85rem; font-weight: 700; color: var(--yellow); letter-spacing: 0.05em; }

    /* ── Slim browser tab bar ── */
    .game-tabs-bar {
      display: none;
      position: relative; z-index: 1;
      max-width: 900px; margin: 0 auto;
      padding: 1.25rem 1.5rem 0; gap: 8px;
      /* Fade in smoothly */
      opacity: 0; transition: opacity 0.5s ease;
    }
    .game-tabs-bar.visible { display: flex; }
    .game-tabs-bar.visible.ready { opacity: 1; }
    .game-slim-tab {
      flex: 1; display: flex; align-items: center; gap: 0.7rem;
      background: var(--bg2); border: 1px solid var(--border);
      border-bottom: none; border-radius: 10px 10px 0 0;
      padding: 0.85rem 1.4rem;
      cursor: pointer; transition: all 0.25s ease;
      font-size: 0.92rem; font-weight: 700; position: relative;
    }
    .game-slim-tab .slim-icon { font-size: 1.1rem; }
    .game-slim-tab .slim-name { flex: 1; }
    .game-slim-tab.slim-active { background: var(--bg3); border-color: var(--purple-light); color: var(--text); }
    .game-slim-tab.slim-inactive { color: var(--muted); }
    .game-slim-tab.slim-inactive:hover { border-color: var(--border-hover); color: var(--text); }

    /* ── Side-by-side Q layout (data ref left, question right) ── */
    .q-layout {
      display: grid;
      grid-template-columns: 340px 1fr;
      gap: 16px;
      align-items: start;
      margin-bottom: 1.25rem;
    }
    @media (max-width: 700px) { .q-layout { grid-template-columns: 1fr; } }

    /* ── Data reference panel (left column) ── */
    .data-ref-panel {
      background: var(--bg3); border: 1px solid var(--border);
      border-radius: 14px; padding: 1.2rem 1.4rem;
      display: none; /* JS adds .visible */
      position: sticky; top: 12px;
    }
    .data-ref-panel.visible { display: block; }
    .data-ref-header {
      font-family: 'DM Mono', monospace; font-size: 0.8rem;
      font-weight: 600; color: var(--text);
      margin-bottom: 1rem;
      display: flex; align-items: center; justify-content: space-between;
    }
    .data-ref-back {
      font-family: 'DM Mono', monospace; font-size: 0.72rem;
      color: var(--purple-light); cursor: pointer;
      text-decoration: underline; white-space: nowrap;
    }
    /* Triplet — stacked vertically in sidebar */
    .data-ref-triplet {
      display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
      margin-bottom: 0.85rem;
    }
    .data-ref-frame {
      aspect-ratio: 1; border-radius: 7px; overflow: hidden;
      border: 1px solid var(--border); position: relative;
      background: var(--bg);
    }
    .data-ref-frame canvas { display: block; width: 100%; height: 100%; }
    .data-ref-frame-label {
      position: absolute; bottom: 0; left: 0; right: 0;
      font-family: 'DM Mono', monospace; font-size: 0.62rem;
      text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
      background: linear-gradient(transparent, rgba(9,7,26,0.9)); padding: 3px 5px;
    }
    .data-ref-meta {
      font-family: 'DM Mono', monospace; font-size: 0.8rem;
      line-height: 1.8; color: rgba(237,232,255,0.7);
    }
    .data-ref-meta strong { color: var(--pink-light); }
    .data-ref-meta .ref-note { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.6; }

    /* ── Font size fixes for all Game 2 small text ── */
    .rb-card-title { font-family: 'DM Mono', monospace; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
    .rb-card-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
    .triplet-label { position: absolute; bottom: 0; left: 0; right: 0; padding: 5px 9px; font-family: 'DM Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(237,232,255,0.7); background: linear-gradient(transparent, rgba(9,7,26,0.85)); }
    .meta-strip { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.2rem; font-family: 'DM Mono', monospace; font-size: 0.85rem; line-height: 2; margin-bottom: 1.25rem; }
    .meta-key { color: var(--pink-light); min-width: 130px; flex-shrink: 0; font-size: 0.85rem; }
    .meta-val { color: var(--text); font-size: 0.85rem; }
    .decision-prompt { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.6rem; }
    .decision-sub { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.75; }
    .ml-bar-header { display: flex; justify-content: space-between; align-items: center; font-family: 'DM Mono', monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.65rem; }
    .ml-agreement { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.7; }
    .ml-agreement .agree   { color: var(--success); font-weight: 500; }
    .ml-agreement .disagree{ color: var(--yellow);  font-weight: 500; }
    .outcome-text { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--muted); max-width: 540px; margin: 0 auto 1.25rem; line-height: 1.9; }
    .outcome-fact { display: inline-block; background: rgba(48,38,130,0.2); border: 1px solid rgba(123,111,212,0.3); border-radius: 10px; padding: 1rem 1.4rem; font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--muted); line-height: 1.8; max-width: 540px; }
    .outcome-fact strong { color: var(--purple-light); }
    .gcn-ticker { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 1.25rem; overflow: hidden; font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
    .score-cell-label { font-family: 'DM Mono', monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.35rem; }
    .ticker-type { font-family: 'DM Mono', monospace; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
    .rb-final-msg { font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--muted); max-width: 480px; margin: 0 auto 2rem; line-height: 1.9; }
    .ml-agree-label { font-family: 'DM Mono', monospace; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
    .plot-legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
    .leg-item { display: flex; align-items: center; gap: 0.4rem; font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--muted); }
    .leg-line  { width: 22px; height: 2.5px; border-radius: 2px; flex-shrink: 0; }
    @media (max-width: 480px) { .data-ref-panel { position: static; } }

    .sim-container { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

    .score-bar { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 2rem; }
    .score-cell { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.25rem; position: relative; overflow: hidden; }
    .score-cell::after { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 2px; border-radius: 0 0 2px 2px; opacity: 0.7; }
    .score-cell.c-yellow::after { background: var(--yellow); }
    .score-cell.c-pink::after   { background: var(--pink); }
    .score-cell.c-teal::after   { background: var(--success); }
    .score-cell-label { font-family: 'DM Mono', monospace; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.35rem; }
    .score-cell-value { font-family: 'DM Mono', monospace; font-size: 1.4rem; font-weight: 500; line-height: 1; }
    .score-cell.c-yellow .score-cell-value { color: var(--yellow); }
    .score-cell.c-pink   .score-cell-value { color: var(--pink-light); }
    .score-cell.c-teal   .score-cell-value { color: var(--success); }

    .progress-strip { display: flex; align-items: center; justify-content: center; gap: 0.4rem; margin-bottom: 2rem; flex-wrap: wrap; }
    .prog-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: 1px solid var(--border); transition: all 0.3s ease; flex-shrink: 0; }
    .prog-dot.done    { background: var(--pink); border-color: var(--pink); }
    .prog-dot.current { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 8px rgba(255,224,143,0.6); transform: scale(1.35); }
    .prog-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--muted); margin-left: 0.75rem; white-space: nowrap; }

    .steps { display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }
    .step-item { display: flex; align-items: center; gap: 0.5rem; font-family: 'DM Mono', monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); transition: color 0.3s; }
    .step-item.active { color: var(--purple-light); }
    .step-item.done   { color: var(--pink-light); }
    .step-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; background: var(--bg3); border: 1px solid var(--border); flex-shrink: 0; transition: all 0.3s; }
    .step-item.active .step-dot { background: var(--purple); border-color: var(--purple-light); color: #fff; box-shadow: 0 0 0 4px rgba(48,38,130,0.35); }
    .step-item.done   .step-dot { background: var(--pink); border-color: var(--pink-light); color: #fff; }
    .step-line { width: 40px; height: 2px; background: var(--border); flex-shrink: 0; transition: background 0.3s; }
    .step-line.done { background: var(--pink); }

    .card { background: var(--bg2); border: 1px solid var(--border); border-radius: 18px; padding: 1.75rem 2rem; margin-bottom: 1.25rem; position: relative; overflow: hidden; animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1); }
    .card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--purple), var(--pink), var(--yellow)); }
    @keyframes fadeUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
    .card-title { font-family: 'DM Mono', monospace; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem; }
    .card-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

    .gcn-ticker span { display: inline-block; animation: scrolltick 22s linear infinite; }
    .gcn-ticker .hl { color: var(--yellow); }
    .gcn-ticker .hl-pink { color: var(--pink-light); }
    @keyframes scrolltick { 0%{transform:translateX(100%)} 100%{transform:translateX(-100%)} }

    .alert-box { background: var(--bg3); border: 1px solid rgba(48,38,130,0.5); border-radius: 12px; padding: 1.5rem; font-family: 'DM Mono', monospace; font-size: 0.75rem; line-height: 1.9; }
    .alert-label { font-size: 0.72rem; color: var(--yellow); font-weight: 500; letter-spacing: 0.08em; margin-bottom: 0.85rem; display: flex; align-items: center; gap: 0.6rem; }
    .blink-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 5px var(--yellow); animation: blink 1.2s ease-in-out infinite; }
    .alert-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
    .alert-key { color: var(--pink-light); min-width: 140px; flex-shrink: 0; }
    .alert-val { color: var(--text); }
    .pri-high    { color: var(--yellow);       font-weight: 700; }
    .pri-med     { color: var(--purple-light); font-weight: 700; }
    .pri-retract { color: var(--pink);         font-weight: 700; }

    .skymap-wrap { margin-top: 1.25rem; background: var(--bg3); border: 1px solid var(--purple-light); border-radius: 14px; padding: 1rem 1rem 0.75rem; box-shadow: 0 0 24px rgba(48,38,130,0.25); }
    .skymap-label { font-family: 'DM Mono', monospace; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--purple-light); margin-bottom: 0.75rem; display: flex; align-items: center; justify-content: space-between; font-weight: 600; flex-wrap: wrap; gap: 0.5rem; }
    .skymap-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
    .skymap-leg-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; color: rgba(237,232,255,0.65); }
    .leg-swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
    #skymap { width: 100%; min-height: 360px; display: block; border-radius: 10px; cursor: crosshair; border: 1px solid rgba(123,111,212,0.2); }
    .leg-swatch { width: 10px; height: 10px; border-radius: 2px; }
    #skymap { width: 100%; display: block; border-radius: 8px; cursor: crosshair; }

    .conditions-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 1rem; }
    .condition-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; transition: border-color 0.2s; }
    .condition-item:hover { border-color: var(--border-hover); }
    .condition-item label { display: block; font-family: 'DM Mono', monospace; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
    .condition-val { font-family: 'DM Mono', monospace; font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; }
    .condition-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; }
    .condition-bar-fill { height: 100%; border-radius: 2px; }
    .good .condition-val      { color: var(--success); }
    .good .condition-bar-fill { background: linear-gradient(90deg, var(--purple-light), var(--success)); }
    .okay .condition-val      { color: var(--yellow); }
    .okay .condition-bar-fill { background: linear-gradient(90deg, var(--purple-light), var(--yellow)); }
    .poor .condition-val      { color: var(--pink); }
    .poor .condition-bar-fill { background: linear-gradient(90deg, var(--purple), var(--pink)); }

    .btn { font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700; cursor: pointer; border-radius: 10px; border: 1px solid transparent; padding: 0.85rem 1.75rem; display: inline-flex; align-items: center; gap: 0.5rem; transition: all 0.2s ease; letter-spacing: 0.02em; }
    .btn-primary { background: linear-gradient(135deg, var(--purple), var(--purple-mid)); color: #fff; border-color: var(--purple-mid); box-shadow: 0 4px 20px rgba(48,38,130,0.35); }
    .btn-primary:hover { background: linear-gradient(135deg, var(--purple-mid), var(--purple-light)); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(48,38,130,0.5); }
    .btn-observe { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; border: none; box-shadow: 0 4px 20px rgba(255,61,121,0.25); }
    .btn-observe:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,61,121,0.4); }
    .btn-ghost { background: var(--bg3); color: var(--text); border-color: var(--border); }
    .btn-ghost:hover { border-color: var(--border-hover); transform: translateY(-2px); }

    .decision-section { text-align: center; padding: 0.5rem 0; }
    .decision-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

    .outcome-panel { border-radius: 16px; padding: 2rem; text-align: center; margin-bottom: 1.25rem; animation: fadeUp 0.4s ease; position: relative; overflow: hidden; }
    .outcome-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
    .outcome-panel.success { background: rgba(63,207,200,0.07); border: 1px solid rgba(63,207,200,0.25); }
    .outcome-panel.success::before { background: linear-gradient(90deg, var(--success), var(--purple-light)); }
    .outcome-panel.missed  { background: rgba(255,61,121,0.07); border: 1px solid rgba(255,61,121,0.25); }
    .outcome-panel.missed::before  { background: linear-gradient(90deg, var(--pink), var(--purple)); }
    .outcome-panel.skip    { background: rgba(255,224,143,0.07); border: 1px solid rgba(255,224,143,0.25); }
    .outcome-panel.skip::before    { background: linear-gradient(90deg, var(--yellow), var(--pink)); }
    .outcome-icon { font-size: 2.8rem; margin-bottom: 0.85rem; }
    .outcome-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.6rem; }

    .final-screen { text-align: center; padding: 1rem 0; }
    .final-screen h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
    .final-screen h2 em { font-style: normal; background: linear-gradient(100deg, var(--yellow), var(--pink-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .final-score-box { display: inline-block; background: var(--bg3); border: 1px solid var(--border); border-radius: 18px; padding: 2rem 3.5rem; margin: 1.5rem 0; position: relative; overflow: hidden; }
    .final-score-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--purple), var(--pink), var(--yellow)); }
    .final-big-num { font-family: 'DM Mono', monospace; font-size: 3.5rem; font-weight: 500; color: var(--yellow); line-height: 1; margin-bottom: 0.35rem; }
    .final-big-label { font-family: 'DM Mono', monospace; font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
    .rank-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink-light); border: 1px solid rgba(255,61,121,0.3); background: rgba(255,61,121,0.07); border-radius: 99px; padding: 0.35rem 1rem; margin-bottom: 1.25rem; }
    .final-msg { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--muted); max-width: 460px; margin: 0 auto 2rem; line-height: 1.8; }
    .final-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
    .btn-join { background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; border: none; border-radius: 10px; padding: 0.95rem 2rem; font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 20px rgba(255,61,121,0.25); }
    .btn-join:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,61,121,0.4); }
    .btn-replay { background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 0.9rem 1.75rem; font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
    .btn-replay:hover { border-color: var(--border-hover); transform: translateY(-2px); }

    .text-center { text-align: center; }
    .hidden { display: none !important; }

    /* ── Game selector ── */

    /* ── How to Play modal ── */
    .htp-overlay {
      position: fixed; inset: 0; z-index: 100;
      background: rgba(9,7,26,0.92); backdrop-filter: blur(8px);
      display: flex; align-items: center; justify-content: center;
      padding: 1rem;
    }
    .htp-overlay.hidden { display: none !important; }
    .htp-modal {
      background: var(--bg2); border: 1px solid var(--purple-light);
      border-radius: 20px; padding: 2.5rem 2.5rem 2rem;
      width: min(700px, 96vw);
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 24px 80px rgba(48,38,130,0.55);
      animation: fadeUp 0.35s ease;
    }
    @media (max-width: 600px) {
      .htp-modal {
        width: 100vw; max-height: 100dvh; border-radius: 0;
        padding: 1.5rem 1.25rem 1.5rem;
        border: none;
      }
    }
    .htp-modal::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, var(--purple), var(--pink), var(--yellow));
      border-radius: 20px 20px 0 0;
    }
    .htp-close {
      position: absolute; top: 1.1rem; right: 1.4rem;
      background: rgba(255,255,255,0.06); border: 1px solid var(--border);
      border-radius: 50%; width: 34px; height: 34px;
      color: var(--muted); font-size: 1.1rem; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.2s; line-height: 1;
    }
    .htp-close:hover { color: var(--text); background: rgba(255,255,255,0.12); }
    .htp-modal h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); font-weight: 800; margin-bottom: 0.3rem; line-height: 1.2; }
    .htp-modal h2 em { font-style: normal; background: linear-gradient(100deg, var(--yellow), var(--pink-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .htp-subtitle { font-family: 'DM Mono', monospace; font-size: 0.88rem; color: var(--muted); margin-bottom: 1.75rem; line-height: 1.6; }
    .htp-steps { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 1.75rem; }
    .htp-step { display: flex; gap: 1rem; align-items: flex-start; }
    .htp-step-num {
      flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
      background: linear-gradient(135deg, var(--purple), var(--purple-mid));
      display: flex; align-items: center; justify-content: center;
      font-family: 'DM Mono', monospace; font-size: 0.8rem; font-weight: 700; color: #fff;
      margin-top: 2px;
    }
    .htp-step-body h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text); }
    .htp-step-body p { font-family: 'DM Mono', monospace; font-size: 0.88rem; color: rgba(237,232,255,0.75); line-height: 1.75; margin: 0; }
    .htp-lc-section { background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
    .htp-lc-title { font-family: 'DM Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--purple-light); font-weight: 700; margin-bottom: 1rem; }
    .htp-lc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; }
    .htp-lc-item { background: var(--bg2); border-radius: 10px; padding: 0.85rem 0.9rem; border: 1px solid var(--border); }
    .htp-lc-item .lc-type { font-size: 0.82rem; font-weight: 700; color: var(--yellow); margin-bottom: 0.4rem; }
    .htp-lc-item .lc-desc { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: rgba(237,232,255,0.6); line-height: 1.65; }
    /* Mini lightcurve preview canvas inside HTP */
    .htp-lc-canvas-wrap { margin-bottom: 0.5rem; border-radius: 6px; overflow: hidden; background: var(--bg); }
    .htp-lc-canvas-wrap canvas { display: block; width: 100%; }
    .htp-tip { background: rgba(255,224,143,0.07); border: 1px solid rgba(255,224,143,0.22); border-radius: 10px; padding: 1rem 1.25rem; font-family: 'DM Mono', monospace; font-size: 0.85rem; color: var(--yellow); line-height: 1.75; margin-bottom: 1.5rem; }
    /* ── Persistent info/rules floating button ── */
    .info-fab {
      position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 50;
      background: linear-gradient(135deg, var(--purple), var(--purple-mid));
      border: 1px solid var(--purple-light); border-radius: 50%;
      width: 50px; height: 50px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.2rem; cursor: pointer;
      box-shadow: 0 4px 20px rgba(48,38,130,0.45);
      transition: all 0.2s ease;
    }
    .info-fab:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(48,38,130,0.65); }
    .info-fab.hidden { display: none !important; }
    /* ── End-of-game nav buttons ── */
    .game-end-nav { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }
    .btn-home { background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 0.9rem 1.75rem; font-family: 'Syne', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; }
    .btn-home:hover { border-color: var(--purple-light); transform: translateY(-2px); }
    .btn-next-game { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; border: none; border-radius: 10px; padding: 0.9rem 1.75rem; font-family: 'Syne', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; box-shadow: 0 4px 20px rgba(255,61,121,0.2); }
    .btn-next-game:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,61,121,0.35); }
    .btn-register { background: linear-gradient(135deg, var(--yellow-dim), var(--yellow)); color: var(--bg); border: none; border-radius: 10px; padding: 0.9rem 1.75rem; font-family: 'Syne', sans-serif; font-size: 0.88rem; font-weight: 800; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; }
    .btn-register:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,224,143,0.3); }
    .rb-outcome.wrong { background: rgba(255,61,121,0.07); border: 1px solid rgba(255,61,121,0.25); }
    .rb-outcome.wrong::before { background: linear-gradient(90deg, var(--pink), var(--purple)); }

    .rb-card {
      background: var(--bg2); border: 1px solid var(--border);
      border-radius: 18px; padding: 1.75rem 2rem;
      margin-bottom: 1.25rem; position: relative; overflow: hidden;
      animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1);
    }
    .rb-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: linear-gradient(90deg, var(--success), var(--purple-light), var(--yellow));
    }

    /* Image triplet */
    .triplet-wrap { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 1.25rem; }
    .triplet-frame { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; aspect-ratio: 1; position: relative; }
    .triplet-frame canvas { display: block; width: 100%; height: 100%; }

    .meta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

    /* Classification buttons */
    .rb-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 0.5rem; }
    .btn-real  { background: linear-gradient(135deg, var(--purple), var(--success)); color: #fff; border: none; box-shadow: 0 4px 20px rgba(63,207,200,0.2); }
    .btn-real:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(63,207,200,0.35); }
    .btn-bogus { background: linear-gradient(135deg, var(--purple-dark), var(--pink)); color: #fff; border: none; box-shadow: 0 4px 20px rgba(255,61,121,0.2); }
    .btn-bogus:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,61,121,0.35); }

    /* ML confidence bar */
    .ml-bar-wrap { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
    .ml-bar-track { height: 8px; background: rgba(255,255,255,0.07); border-radius: 4px; overflow: hidden; position: relative; }
    .ml-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s cubic-bezier(0.16,1,0.3,1); width: 0%; }
    .ml-bar-fill.real-fill { background: linear-gradient(90deg, var(--purple-light), var(--success)); }
    .ml-bar-fill.bogus-fill { background: linear-gradient(90deg, var(--purple), var(--pink)); }
    .ml-agreement .agree   { color: var(--success); font-weight: 500; }
    .ml-agreement .disagree{ color: var(--yellow);  font-weight: 500; }

    /* Outcome panels for RB game */
    .rb-outcome {
      border-radius: 16px; padding: 1.75rem; text-align: center;
      margin-bottom: 1.25rem; animation: fadeUp 0.4s ease;
      position: relative; overflow: hidden;
    }
    .rb-outcome::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
    .rb-outcome.real-correct  { background: rgba(63,207,200,0.07);  border: 1px solid rgba(63,207,200,0.25); }
    .rb-outcome.real-correct::before { background: linear-gradient(90deg, var(--success), var(--purple-light)); }
    .rb-outcome.bogus-correct { background: rgba(255,224,143,0.07); border: 1px solid rgba(255,224,143,0.25); }
    .rb-outcome.bogus-correct::before { background: linear-gradient(90deg, var(--yellow), var(--purple-light)); }
    .rb-outcome.wrong { background: rgba(255,61,121,0.07); border: 1px solid rgba(255,61,121,0.25); }
    .rb-outcome.wrong::before { background: linear-gradient(90deg, var(--pink), var(--purple)); }

    /* RB final screen */
    .rb-final { text-align: center; padding: 1rem 0; }
    .rb-final h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
    .rb-final h2 em { font-style: normal; background: linear-gradient(100deg, var(--success), var(--purple-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
    .ml-score-box {
      display: inline-block; background: var(--bg3); border: 1px solid var(--border);
      border-radius: 18px; padding: 1.75rem 3rem; margin: 1.5rem 0; position: relative; overflow: hidden;
    }
    .ml-score-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--success), var(--purple-light), var(--yellow)); }
    .ml-agree-pct { font-family: 'DM Mono', monospace; font-size: 3rem; font-weight: 500; color: var(--success); line-height: 1; margin-bottom: 0.25rem; }
    .ml-agree-label { font-family: 'DM Mono', monospace; font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
    .tier-pill {
      display: inline-flex; align-items: center; gap: 0.4rem;
      font-family: 'DM Mono', monospace; font-size: 0.7rem;
      letter-spacing: 0.12em; text-transform: uppercase;
      color: var(--success); border: 1px solid rgba(63,207,200,0.3);
      background: rgba(63,207,200,0.07); border-radius: 99px;
      padding: 0.35rem 1rem; margin-bottom: 1.25rem;
    }
    .rb-final-msg { font-family: 'DM Mono', monospace; font-size: 0.75rem; color: var(--muted); max-width: 460px; margin: 0 auto 2rem; line-height: 1.8; }
