/* =====================================================================
   IMPOSTER · WORD GENERATOR
   A premium dark theme — aurora ambience, glassmorphism, gold + violet.
   ===================================================================== */

:root {
  --bg:        #0a0712;
  --bg-2:      #0f0a1c;
  --ink:       #f4f0ff;
  --ink-soft:  #b6abce;
  --ink-dim:   #7d7295;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.14);

  --gold:      #e8c275;
  --gold-2:    #f6dea1;
  --violet:    #8b5cf6;
  --violet-2:  #b794ff;
  --magenta:   #e0488f;
  --teal:      #43e0c4;
  --danger:    #ff5d73;
  --good:      #4be38a;

  --glass:     rgba(255,255,255,.045);
  --glass-2:   rgba(255,255,255,.07);
  --card:      rgba(22,16,38,.72);

  --grad-main: linear-gradient(120deg, var(--violet) 0%, var(--magenta) 55%, var(--gold) 120%);
  --grad-gold: linear-gradient(120deg, var(--gold-2), var(--gold));
  --shadow:    0 30px 80px -30px rgba(0,0,0,.85);
  --shadow-sm: 0 12px 34px -16px rgba(0,0,0,.7);
  --ring:      0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(139,92,246,.0);

  --r:   18px;
  --r-lg: 26px;
  --r-sm: 12px;

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif:"Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139,92,246,.4); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; }

/* ---------------- Ambient background ---------------- */
.aurora {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(224,72,143,.14), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 60%, #08060f);
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 460px; height: 460px; top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(139,92,246,.55), transparent 70%); }
.orb-2 { width: 520px; height: 520px; bottom: -160px; right: -120px;
  background: radial-gradient(circle, rgba(224,72,143,.42), transparent 70%); animation-delay: -6s; }
.orb-3 { width: 380px; height: 380px; top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(232,194,117,.30), transparent 70%); animation-delay: -11s; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,-30px) scale(1.08); }
  66%     { transform: translate(-30px,25px) scale(.95); }
}
.grain {
  position: absolute; inset: 0; opacity: .04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------- Top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px);
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,7,18,.7), rgba(10,7,18,0));
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  color: var(--gold); background: var(--card); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
.brand-mark.sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-text { font-size: 1.05rem; letter-spacing: .2px; }
.brand-text b {
  font-weight: 700;
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a { color: var(--ink-soft); font-size: .94rem; font-weight: 500; transition: color .2s; }
.topnav a:hover { color: var(--ink); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-sm); font-weight: 700; font-size: .98rem;
  letter-spacing: .2px; transition: transform .12s ease, box-shadow .25s, background .25s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: #1a0f2e; background: var(--grad-main); background-size: 180% 180%;
  box-shadow: 0 14px 40px -12px rgba(139,92,246,.6), inset 0 1px 0 rgba(255,255,255,.3);
  animation: shimmer 6s ease infinite;
}
@keyframes shimmer { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.btn-primary:hover { box-shadow: 0 18px 50px -10px rgba(224,72,143,.65), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost {
  background: var(--glass); border: 1px solid var(--line-2); color: var(--ink-soft);
}
.btn-ghost:hover { background: var(--glass-2); color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 26px; font-size: 1.08rem; border-radius: var(--r); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* ---------------- Stage (game-first) ---------------- */
.stage {
  display: flex; flex-direction: column; align-items: center; gap: clamp(12px, 2vh, 20px);
  padding: clamp(12px, 2.4vh, 26px) clamp(18px, 5vw, 64px) clamp(36px, 6vh, 72px);
  max-width: 1280px; margin: 0 auto;
}
.stage-head { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-2);
}
.eyebrow.center { justify-content: center; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }

.hero-title {
  font-family: var(--serif); font-weight: 600; line-height: 1.04;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem); margin: 8px 0 0; letter-spacing: -.5px;
}
.hero-title .grad {
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust-strip {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 10px; margin: 16px auto 0; max-width: 640px; padding: 0;
}
.trust-strip li {
  font-size: .78rem; font-weight: 700; color: var(--ink-soft);
  padding: 5px 13px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-2);
}
.hero-sub { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 48ch; }
.hero-sub b { color: var(--ink); }
.hero-points { list-style: none; margin: 26px 0 28px; display: grid; gap: 13px; }
.hero-points li { display: flex; align-items: center; gap: 13px; color: var(--ink-soft); font-weight: 500; }
.hero-points i { font-style: normal; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: var(--glass); border: 1px solid var(--line); font-size: 1.05rem; }
.trust { display: flex; align-items: center; gap: 12px; color: var(--ink-dim); font-size: .9rem; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1rem; }

/* ---------------- Play surface ---------------- */
.play { position: relative; min-height: 460px; display: grid; width: 100%; max-width: 660px; min-width: 0; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.08), transparent 40%);
  -webkit-mask: linear-gradient(#000,#000); padding: 1px;
}

/* Screen switching */
.screen { grid-area: 1 / 1; min-width: 0; max-width: 100%; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.99);
  transition: opacity .35s ease, transform .35s ease, visibility .35s; pointer-events: none; }
.screen.is-active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.card-head-icon { font-size: 1.4rem; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 13px; background: var(--glass-2); border: 1px solid var(--line-2); flex-shrink: 0; }
.card-head h2 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; letter-spacing: -.3px; }
.card-head p { color: var(--ink-dim); font-size: .9rem; }

/* Fields */
.field { margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field { margin-bottom: 15px; }
.field > label {
  display: block; font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 8px;
}

/* Stepper */
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 7px; gap: 8px;
}
.step-btn {
  width: 42px; height: 42px; border-radius: 12px; font-size: 1.35rem; font-weight: 600;
  background: var(--glass-2); border: 1px solid var(--line-2); color: var(--ink); flex-shrink: 0;
  transition: background .2s, transform .1s;
}
.step-btn:hover { background: rgba(139,92,246,.22); }
.step-btn:active { transform: scale(.9); }
.step-value { text-align: center; }
.step-value span { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.step-value small { color: var(--ink-dim); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }

/* Pack dropdown (setup) */
.pack-picker { position: relative; }
.pack-picker::after {
  content: "⌄";
  position: absolute; right: 16px; top: 50%; transform: translateY(-54%);
  color: var(--ink-dim); font-size: 1.25rem; pointer-events: none;
}
.pack-select {
  width: 100%; height: 56px; border-radius: var(--r);
  padding: 0 46px 0 15px;
  background: var(--glass); border: 1px solid var(--line-2);
  color: var(--ink); font: inherit; font-size: .98rem; font-weight: 700;
  outline: none; cursor: pointer; appearance: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.pack-select:hover,
.pack-select:focus {
  background: var(--glass-2);
  border-color: rgba(183,148,255,.6);
  box-shadow: 0 0 0 3px rgba(139,92,246,.14);
}
.pack-select option {
  background: #111827;
  color: #f8fafc;
  font-weight: 600;
}

/* Options / switches */
.options { display: grid; gap: 4px; background: var(--glass); border: 1px solid var(--line);
  border-radius: var(--r); padding: 4px 15px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--line); }
.opt:last-child { border-bottom: none; }
.opt-title { display: block; font-weight: 700; font-size: .94rem; }
.opt-sub { display: block; color: var(--ink-dim); font-size: .8rem; }
.switch {
  width: 50px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.12);
  border: 1px solid var(--line-2); position: relative; flex-shrink: 0; transition: background .25s;
}
.switch span { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .25s cubic-bezier(.4,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch.is-on { background: var(--grad-main); border-color: transparent; }
.switch.is-on span { transform: translateX(22px); }

.fine-print { text-align: center; color: var(--ink-dim); font-size: .8rem; margin-top: 11px; }

/* ---------------- Pass screen ---------------- */
#screen-pass { text-align: center; }
.pass-art { margin: 6px auto 20px; }
.pass-orb {
  width: 110px; height: 110px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.6rem; font-weight: 800; color: var(--violet-2);
  background: radial-gradient(circle at 35% 30%, rgba(139,92,246,.35), rgba(20,14,36,.6));
  border: 2px dashed rgba(183,148,255,.6);
  animation: passPulse 2.4s ease-in-out infinite;
}
@keyframes passPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(139,92,246,.4); transform: scale(1); }
  50%     { box-shadow: 0 0 0 14px rgba(139,92,246,0); transform: scale(1.04); }
}
.pass-name { font-family: var(--serif); font-weight: 600; font-size: 2rem; margin-bottom: 6px; }
.pass-name span { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pass-sub { color: var(--ink-soft); margin-bottom: 26px; }
#screen-pass .btn-block + .btn-block { margin-top: 12px; }

/* ---------------- Reveal (instant) ---------------- */
#screen-reveal { text-align: center; animation: revealIn .4s ease; }
@keyframes revealIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal-avatar {
  width: 96px; height: 96px; margin: 4px auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 3rem;
  background: radial-gradient(circle at 35% 30%, rgba(139,92,246,.4), rgba(20,14,36,.85));
  border: 3px solid; border-image: var(--grad-main) 1; box-shadow: var(--shadow-sm);
}
.reveal-pname { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin-bottom: 4px; }
.reveal-subtitle { color: var(--ink-soft); margin-bottom: 22px; font-size: 1rem; }
.reveal-wordbox {
  border-radius: var(--r); padding: 22px 18px; margin-bottom: 22px;
  display: grid; gap: 8px; justify-items: center;
  background: linear-gradient(150deg, rgba(139,92,246,.18), rgba(224,72,143,.1));
  border: 1px solid rgba(183,148,255,.45);
}
.reveal-wordbox.is-imposter { background: linear-gradient(150deg, rgba(255,93,115,.2), rgba(120,20,40,.22)); border-color: rgba(255,93,115,.55); }
.reveal-wordbox.is-white { background: linear-gradient(150deg, rgba(255,255,255,.12), rgba(180,180,200,.06)); border-color: rgba(255,255,255,.35); }
.role-tag { font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.reveal-wordbox.is-imposter .role-tag { color: #ffb3bc; }
.reveal-word { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.05;
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal-wordbox.is-imposter .reveal-word { background: linear-gradient(120deg, #ff8a9b, #ff5d73); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal-hint { color: var(--ink-soft); font-size: .92rem; max-width: 32ch; margin: 0 auto; }

/* ---------------- Discuss ---------------- */
.speak-order { list-style: none; display: grid; gap: 9px; margin-bottom: 22px; }
.speak-order li {
  display: flex; align-items: center; gap: 13px; padding: 12px 15px; border-radius: 13px;
  background: var(--glass); border: 1px solid var(--line); font-weight: 600;
}
.speak-order .seat-no {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: var(--grad-main); color: #1a0f2e; font-weight: 800; font-size: .9rem; flex-shrink: 0;
}
.timer-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); margin-bottom: 20px; }
.timer { font-family: var(--serif); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.warn { color: var(--danger); }
.timer-ctl { display: flex; gap: 8px; }

.vote-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-main); color: #1a0f2e; font-weight: 800; flex-shrink: 0; }

/* Discussion Time header */
#screen-discuss { text-align: center; }
.discuss-orb {
  width: 86px; height: 86px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.4rem; background: radial-gradient(circle at 35% 30%, rgba(139,92,246,.4), rgba(20,14,36,.8));
  border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.discuss-title { font-family: var(--serif); font-weight: 700; font-size: 2rem; margin-bottom: 8px; }
.discuss-lead { font-size: 1.05rem; margin-bottom: 4px; }
.discuss-lead span { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.discuss-sub { color: var(--ink-dim); font-size: .9rem; margin-bottom: 20px; }
.speak-order { text-align: left; }

/* ---------------- Game Over / Results ---------------- */
#screen-results { text-align: center; }
.gameover-title { font-family: var(--serif); font-weight: 900; font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 1px; margin-bottom: 22px; }
.btn-reveal {
  background: var(--glass); border: 1px solid rgba(255,93,115,.5); color: var(--ink);
  margin-bottom: 14px; transition: all .2s;
}
.btn-reveal:hover { background: rgba(255,93,115,.14); border-color: rgba(255,93,115,.8); }
#reveal-result { animation: revealIn .45s ease; }
.imposter-reveal {
  border-radius: var(--r); padding: 20px; margin-bottom: 16px;
  background: linear-gradient(150deg, rgba(255,93,115,.18), rgba(120,20,40,.2));
  border: 1px solid rgba(255,93,115,.55);
}
.imposter-reveal small { display: block; color: #ffb3bc; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.imposter-reveal strong { font-family: var(--serif); font-size: 1.9rem;
  background: linear-gradient(120deg, #ff8a9b, #ff5d73); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-word { background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 16px; margin-bottom: 16px; }
.result-word small { display: block; color: var(--ink-dim); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.result-word strong { font-family: var(--serif); font-size: 2rem; background: var(--grad-gold);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-roles { display: grid; gap: 8px; margin-bottom: 22px; text-align: left; }
.result-roles .rr {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line); font-weight: 600; font-size: .92rem;
}
.result-roles .rr.imp { border-color: rgba(255,93,115,.5); background: rgba(255,93,115,.1); }
.result-roles .rr .tag { margin-left: auto; font-size: .74rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 8px; background: var(--glass-2); }
.result-roles .rr.imp .tag { background: rgba(255,93,115,.25); color: #ffc1ca; }
#screen-results .btn-block + .btn-block { margin-top: 11px; }

/* ---------------- Quick rules (under the tool) ---------------- */
.quick-rules {
  width: 100%; max-width: 660px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px);
}
.quick-rules h3 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; margin-bottom: 14px; }
.quick-rules h3 span { color: var(--ink-soft); font-weight: 500; }
.quick-rules ol { list-style: none; display: grid; gap: 11px; }
.quick-rules li { display: flex; gap: 9px; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.quick-rules .qr-no { color: var(--violet-2); font-weight: 800; flex-shrink: 0; }
.quick-rules strong { color: var(--danger); font-weight: 800; }

/* ---------------- Section heads ---------------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; padding: 0 18px; }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -.5px; margin: 14px 0 12px; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------------- How it works diagram ---------------- */
.how { padding: clamp(50px, 9vh, 110px) clamp(18px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.diagram { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.steps { list-style: none; display: grid; gap: 12px; }
.dstep {
  display: flex; gap: 16px; padding: 18px 20px; border-radius: var(--r);
  background: var(--glass); border: 1px solid var(--line); cursor: pointer; transition: all .25s;
}
.dstep:hover { background: var(--glass-2); }
.dstep.is-active {
  background: linear-gradient(120deg, rgba(139,92,246,.18), rgba(224,72,143,.1));
  border-color: rgba(183,148,255,.5); box-shadow: var(--shadow-sm);
}
.dstep-no {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
  background: var(--glass-2); border: 1px solid var(--line-2); color: var(--ink-soft); transition: all .25s;
}
.dstep.is-active .dstep-no { background: var(--grad-main); color: #1a0f2e; border-color: transparent; }
.dstep h3 { font-size: 1.1rem; margin-bottom: 3px; }
.dstep p { color: var(--ink-dim); font-size: .92rem; line-height: 1.5; }

.diagram-stage {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.table-ring {
  position: relative; width: min(380px, 78vw); aspect-ratio: 1; margin: 0 auto 22px;
}
.table-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 44%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(139,92,246,.4), rgba(20,14,36,.9));
  border: 1px solid var(--line-2); display: grid; place-content: center; text-align: center;
  box-shadow: inset 0 0 40px rgba(139,92,246,.3), var(--shadow-sm); transition: all .4s;
}
.table-core-word { font-family: var(--serif); font-weight: 700; font-size: clamp(1.2rem, 3.6vw, 1.7rem);
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .5px; }
.table-core-label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); margin-top: 4px; }
.table-core.hidden-word .table-core-word { background: none; color: var(--ink-dim); -webkit-text-fill-color: var(--ink-dim); filter: blur(0); }

.seat {
  position: absolute; width: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; gap: 5px; text-align: center; transition: all .4s;
}
.seat-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
  background: var(--glass-2); border: 1px solid var(--line-2); transition: all .4s; position: relative;
}
.seat-name { font-size: .72rem; color: var(--ink-dim); font-weight: 600; white-space: nowrap; }
.seat.active .seat-avatar {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,194,117,.25), 0 0 26px rgba(232,194,117,.45);
  transform: scale(1.12);
}
.seat.imposter .seat-avatar { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255,93,115,.25), 0 0 24px rgba(255,93,115,.5); }
.seat.revealed-imp .seat-avatar { background: rgba(255,93,115,.3); }
.seat-bubble {
  position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -6px) scale(.7);
  background: #fff; color: #1a0f2e; font-weight: 800; font-size: .72rem; padding: 4px 10px;
  border-radius: 999px; white-space: nowrap; opacity: 0; transition: all .3s; pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.seat-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #fff; }
.seat.show-bubble .seat-bubble { opacity: 1; transform: translate(-50%, -6px) scale(1); }
.seat.imposter .seat-bubble { background: var(--danger); color: #fff; }
.seat.imposter .seat-bubble::after { border-top-color: var(--danger); }

.diagram-caption { text-align: center; color: var(--ink-soft); min-height: 2.6em; font-size: .98rem;
  display: flex; align-items: center; justify-content: center; }
.diagram-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.diagram-dots { display: flex; gap: 7px; }
.diagram-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: all .3s; }
.diagram-dots span.on { background: var(--grad-main); width: 24px; border-radius: 999px; }

/* ---------------- Packs showcase ---------------- */
.packs { padding: clamp(40px, 7vh, 90px) clamp(18px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.pack-showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.showcase-card {
  position: relative; overflow: hidden; padding: 22px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  transition: transform .25s, border-color .25s; cursor: default;
}
.showcase-card:hover { transform: translateY(-6px); border-color: rgba(183,148,255,.5); }
.showcase-card .sc-emoji { font-size: 2rem; margin-bottom: 12px; }
.showcase-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.showcase-card p { color: var(--ink-dim); font-size: .85rem; }
.showcase-card .sc-count { display: inline-block; margin-top: 12px; font-size: .78rem; font-weight: 700;
  color: var(--gold-2); background: rgba(232,194,117,.12); padding: 4px 10px; border-radius: 999px; }
.showcase-card.spicy { border-color: rgba(224,72,143,.4); }

/* ---------------- CTA ---------------- */
.cta { padding: clamp(40px, 8vh, 100px) clamp(18px, 5vw, 64px); }
.cta-inner {
  max-width: 760px; margin: 0 auto; text-align: center; padding: clamp(36px, 6vw, 64px);
  border-radius: var(--r-lg); position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(224,72,143,.16), rgba(232,194,117,.1));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.cta-inner h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.5px; }
.cta-inner p { color: var(--ink-soft); margin: 14px 0 28px; font-size: 1.08rem; }

/* ---------------- Play online: Create / Join ---------------- */
.online { padding: clamp(24px, 5vh, 60px) clamp(18px, 5vw, 64px); max-width: 1100px; margin: 0 auto; }
.online .section-head { margin-bottom: 32px; }
.online-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 24px);
  max-width: 920px; margin: 0 auto;
}
.online-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(139,92,246,.16), rgba(22,16,38,.72) 70%);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(18px);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.online-card:hover { transform: translateY(-4px); border-color: rgba(183,148,255,.5); box-shadow: var(--shadow); }
.online-join { background: linear-gradient(160deg, rgba(224,72,143,.14), rgba(22,16,38,.72) 70%); }
.online-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: var(--violet-2); background: var(--glass-2); border: 1px solid var(--line-2);
}
.online-join .online-icon { color: var(--magenta); }
.online-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -.3px; }
.online-card p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; flex: 1; }
.online-card .btn-block { margin-top: 6px; }

.join-row { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.join-input {
  flex: 1; min-width: 0; height: 54px; border-radius: var(--r);
  padding: 0 18px; font: inherit; font-size: 1rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line-2); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.join-input::placeholder { color: var(--ink-dim); letter-spacing: .12em; font-weight: 600; }
.join-input:focus { background: var(--glass-2); border-color: rgba(224,72,143,.6); box-shadow: 0 0 0 3px rgba(224,72,143,.16); }
.join-btn { height: 54px; flex-shrink: 0; }

@media (max-width: 720px) {
  .online-grid { grid-template-columns: 1fr; }
  .join-row { flex-direction: column; }
  .join-btn { width: 100%; }
}

/* ---------------- Footer ---------------- */
.footer { text-align: center; padding: 40px 18px 56px; color: var(--ink-dim);
  border-top: 1px solid var(--line); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 8px; }
.footer p { font-size: .88rem; }

/* ---------------- Confetti ---------------- */
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 999; pointer-events: none;
  border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 940px) {
  .play { min-height: auto; }
  .diagram { grid-template-columns: 1fr; }
  .diagram-stage { order: -1; }
}
@media (max-width: 640px) {
  .topnav a { display: none; }
  .brand-text b { display: none; }
  /* Layout stays identical to desktop — just tighten sizes so the two
     side-by-side steppers and the 2-col pack grid fit narrow phones. */
  .stage { padding-left: 14px; padding-right: 14px; }
  .field-row { gap: 9px; }
  .step-btn { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 11px; }
  .step-value span { font-size: 1.3rem; }
  .step-value small { font-size: .66rem; white-space: nowrap; }
  .pack-select { height: 54px; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .12s !important; }
  .orb { animation: none; }
}
