/* =========================================================
   FamGames — play area (all 9 games). Mobile-first.
========================================================= */

html.fg-playing,
html.fg-playing body{ overscroll-behavior:none; }
html.fg-playing .site-nav{ display:none; }
html.fg-playing #fg3d,
html.fg-playing .fg-play-pill,
html.fg-playing .fg-progress{ display:none !important; }
html.fg-playing .consent-banner{ bottom:calc(12px + env(safe-area-inset-bottom)); }

.pl{
  --accent:#79dba8;
  --glass:rgba(12,35,25,.72);
  --glass2:rgba(16,43,32,.86);
  --edge:rgba(232,244,238,.12);
  position:relative;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  isolation:isolate;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
.pl-3d{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:-1;
  opacity:0;
  pointer-events:none;
  transition:opacity 1s ease;
}
.pl-3d.on{ opacity:.9; }
.pl[data-status="playing"] .pl-3d.on{ opacity:.45; }
.pl.intro-on .pl-3d.on{ opacity:1; }

/* ---------- top bar ---------- */

.pl-top{
  position:sticky;
  top:0;
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  background:linear-gradient(180deg, rgba(6,20,14,.92), rgba(6,20,14,.6));
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,.04);
}
.pl-titlebox{ display:flex; flex-direction:column; line-height:1.1; min-width:0; flex:1; }
.pl-titlebox b{ font-size:17px; letter-spacing:-.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pl-top-r{ display:flex; gap:8px; align-items:center; }
.pl-kicker{
  font-size:10px;
  letter-spacing:.16em;
  font-weight:700;
  color:#7f988c;
  text-transform:uppercase;
}
.pl-icon{
  width:40px;
  height:40px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid var(--edge);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:16px;
  position:relative;
}
.pl-icon.sm{ width:34px; height:34px; font-size:13px; }
.pl-icon:hover{ border-color:rgba(121,219,168,.4); }
.pl-people i{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:18px;
  height:18px;
  border-radius:9px;
  font-size:10px;
  font-style:normal;
  font-weight:700;
  display:grid;
  place-items:center;
  background:var(--green);
  color:#04130c;
}
.pl-code{
  border:1px solid rgba(121,219,168,.3);
  background:rgba(64,201,133,.08);
  color:#9aa9a2;
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
  border-radius:999px;
  padding:0 12px;
  height:36px;
}
.pl-code b{ color:var(--green2); font-size:14px; letter-spacing:.14em; margin-left:4px; }

/* ---------- layout ---------- */

.pl-body{
  flex:1;
  display:grid;
  grid-template-columns:1fr;
  min-height:0;
}
.pl-stage{
  padding:16px 14px 28px;
  min-width:0;
  max-width:980px;
  width:100%;
  margin:0 auto;
}
.pl-side{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:30;
  max-height:72vh;
  display:flex;
  flex-direction:column;
  background:rgba(8,26,19,.97);
  border-top:1px solid var(--edge);
  border-radius:24px 24px 0 0;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom));
  transform:translateY(105%);
  transition:transform .45s cubic-bezier(.16,1,.3,1);
  box-shadow:0 -30px 80px rgba(0,0,0,.45);
}
.pl.side-open .pl-side{ transform:none; }
.pl-side-head{ display:flex; justify-content:space-between; align-items:center; font-size:10px; letter-spacing:.16em; font-weight:700; color:#7f988c; margin-bottom:8px; }
.pl-players{ display:grid; gap:6px; overflow:auto; max-height:32vh; }
.pl-prow{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:14px; background:rgba(255,255,255,.03); }
.pl-prow.me{ background:rgba(64,201,133,.08); }
.pl-prow b{ flex:1; font-size:14px; font-weight:600; }
.pl-prow small{ color:#7f988c; font-weight:500; }
.pl-score{ font-weight:700; color:var(--green2); font-variant-numeric:tabular-nums; }
.pl-tag{ font-size:9px; letter-spacing:.12em; font-weight:700; color:var(--gold); border:1px solid rgba(228,196,111,.35); border-radius:6px; padding:2px 6px; }
.pl-chat{ margin-top:12px; display:flex; flex-direction:column; min-height:0; flex:1; }
.pl-chat-log{ flex:1; overflow:auto; max-height:24vh; font-size:13px; line-height:1.45; display:grid; gap:4px; align-content:start; padding-right:4px; }
.pl-chat-log p{ margin:0; }
.pl-chat-log .sys{ color:#687971; font-size:12px; }
.pl-chat-form{ display:flex; gap:8px; margin-top:8px; }
.pl-chat-form input,
.pl-answer input,
.pl-code-input,
.pl-setting select{
  flex:1;
  min-width:0;
  min-height:48px;
  border-radius:14px;
  border:1px solid var(--edge);
  background:rgba(4,14,10,.6);
  color:var(--text);
  font:inherit;
  font-size:16px; /* no iOS zoom */
  padding:0 14px;
  outline:none;
  transition:border-color .2s, box-shadow .2s;
}
.pl-chat-form input{ min-height:40px; }
.pl-chat-form input:focus,
.pl-answer input:focus,
.pl-code-input:focus{
  border-color:rgba(121,219,168,.55);
  box-shadow:0 0 0 4px rgba(64,201,133,.12), 0 0 30px -8px rgba(64,201,133,.6);
}

/* tablet + desktop: side panel becomes a column */
@media (min-width:1000px){
  .pl-body{ grid-template-columns:minmax(0,1fr) 300px; }
  .pl-side{
    position:sticky;
    top:62px;
    transform:none;
    max-height:calc(100dvh - 62px);
    height:calc(100dvh - 62px);
    border-radius:0;
    border-top:0;
    border-left:1px solid var(--edge);
    background:rgba(6,20,14,.55);
    backdrop-filter:blur(10px);
    box-shadow:none;
  }
  .pl-side-head .pl-icon,
  .pl-people{ display:none; }
  .pl-players{ max-height:40vh; }
  .pl-chat-log{ max-height:none; }
  .pl-stage{ padding:26px 28px 40px; }
}
@media (min-width:700px) and (max-width:999px){
  .pl-side{ left:auto; right:14px; bottom:14px; width:360px; border-radius:24px; border:1px solid var(--edge); }
  .pl-stage{ padding:22px 24px 36px; }
}

/* ---------- screens ---------- */

.pl-screen{
  opacity:0;
  transform:perspective(1200px) rotateX(8deg) translateY(18px);
  transform-origin:50% 0;
  transition:opacity .5s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.pl-screen.in{ opacity:1; transform:none; }

.pl-card{
  position:relative;
  border:1px solid var(--edge);
  border-radius:24px;
  background:linear-gradient(150deg, rgba(17,49,37,.85), rgba(7,22,16,.85));
  padding:20px;
  box-shadow:0 30px 70px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter:blur(8px);
}
.pl-card h3{ margin:6px 0 8px; font-size:22px; letter-spacing:-.03em; }
.pl-card p{ color:#91a29a; margin:0 0 14px; font-size:14px; line-height:1.55; }
.pl-muted{ color:#7d8f86; font-size:13px; }
.pl-warn{ color:#ffb0b3; background:rgba(255,107,113,.08); border:1px solid rgba(255,107,113,.25); padding:10px 14px; border-radius:12px; }
.pl-center{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:18px; }
.pl-center-text{ text-align:center; }
.pl-link{ background:none; border:0; color:var(--green2); padding:8px 0; font-size:13px; text-decoration:underline; text-underline-offset:3px; }

.pl-phasebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.pl-phasebar h3{ margin:4px 0 0; font-size:clamp(20px,4.6vw,30px); letter-spacing:-.04em; line-height:1.1; }
.pl-phasebar h3 em,
.pl-entry-hero h2 em{ font-style:normal; color:var(--accent); filter:drop-shadow(0 0 18px rgba(64,201,133,.35)); }
.pl-phasebar-r{ display:flex; align-items:center; gap:10px; flex:none; }

/* timer ring */
.pl-timer{
  --p:1;
  width:52px;
  height:52px;
  position:relative;
  display:grid;
  place-items:center;
  flex:none;
}
.pl-timer svg{ position:absolute; inset:0; transform:rotate(-90deg); }
.pl-timer circle{ fill:none; stroke-width:3.5; }
.pl-timer .t-bg{ stroke:rgba(255,255,255,.08); }
.pl-timer .t-fg{
  stroke:var(--accent);
  stroke-linecap:round;
  stroke-dasharray:119.4;
  stroke-dashoffset:calc(119.4 * (1 - var(--p)));
  transition:stroke-dashoffset .2s linear, stroke .3s;
  filter:drop-shadow(0 0 6px var(--accent));
}
.pl-timer b{ font-size:17px; font-variant-numeric:tabular-nums; }
.pl-timer.low .t-fg{ stroke:#ff6b71; filter:drop-shadow(0 0 8px #ff6b71); }
.pl-timer.low b{ color:#ffb0b3; animation:pl-throb .5s ease-in-out infinite alternate; }
@keyframes pl-throb{ to{ transform:scale(1.15); } }

/* avatars */
.pl-av{
  --av:#3cc47c;
  width:34px;
  height:34px;
  flex:none;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  font-weight:700;
  font-size:14px;
  color:#04130c;
  background:radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--av) 60%, white), var(--av) 60%, color-mix(in srgb, var(--av) 70%, black));
  box-shadow:0 0 0 2px rgba(6,20,14,.9), 0 0 18px -4px var(--av);
}
.pl-av.xs{ width:22px; height:22px; font-size:10px; }
.pl-av.sm{ width:28px; height:28px; font-size:12px; }
.pl-av.lg{ width:56px; height:56px; font-size:22px; }
.pl-av.xl{ width:88px; height:88px; font-size:34px; box-shadow:0 0 0 3px rgba(6,20,14,.9), 0 0 50px -6px var(--av); }
.pl-av.ghost{ background:rgba(255,255,255,.04); color:#687971; border:1px dashed rgba(255,255,255,.15); box-shadow:none; }

.pl-waitrow{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:16px; justify-content:center; }
.pl-wait-av{ opacity:.35; filter:grayscale(1); transition:.4s; }
.pl-wait-av.done{ opacity:1; filter:none; transform:translateY(-3px); }
.pl-waitrow small{ width:100%; text-align:center; color:#7d8f86; font-size:12px; margin-top:4px; }
.pl-waiting{ display:flex; align-items:center; gap:10px; color:#91a29a; font-size:14px; justify-content:center; padding:14px; }
.pl-dots{ display:inline-flex; gap:4px; }
.pl-dots i{ width:6px; height:6px; border-radius:50%; background:var(--accent); animation:pl-dot 1.2s ease-in-out infinite; }
.pl-dots i:nth-child(2){ animation-delay:.15s; }
.pl-dots i:nth-child(3){ animation-delay:.3s; }
@keyframes pl-dot{ 0%,100%{ opacity:.3; transform:translateY(0); } 50%{ opacity:1; transform:translateY(-4px); } }

.pl-answer{ display:flex; gap:8px; margin-top:16px; }
.pl-answer .btn{ min-height:48px; flex:none; }
.pl-choices{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:16px; }
.pl-choice{
  min-height:58px;
  border-radius:16px;
  border:1px solid var(--edge);
  background:var(--glass);
  color:var(--text);
  font-weight:600;
  font-size:15px;
}
.pl-choice.on{ border-color:var(--accent); box-shadow:0 0 30px -6px var(--accent); }

/* ---------- intro ---------- */

.pl-intro{
  position:fixed;
  inset:0;
  z-index:60;
  display:grid;
  place-items:end center;
  padding:0 20px calc(12vh + env(safe-area-inset-bottom));
  background:radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(4,14,10,.7));
  transition:opacity .7s ease, filter .7s ease;
}
.pl-intro.out{ opacity:0; filter:blur(10px); pointer-events:none; }
.pl-intro-copy{ text-align:center; }
.pl-intro h1{
  margin:10px 0 8px;
  font-size:clamp(44px,11vw,110px);
  letter-spacing:-.06em;
  line-height:.95;
  opacity:0;
  filter:blur(12px);
  animation:pl-intro-in 1.1s cubic-bezier(.16,1,.3,1) .5s forwards;
  text-shadow:0 0 50px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pl-intro p{ color:#b7c7bf; font-size:clamp(15px,3.6vw,19px); margin:0; opacity:0; animation:pl-intro-in .9s ease .9s forwards; }
.pl-intro .pl-kicker{ opacity:0; animation:pl-intro-in .8s ease .3s forwards; }
@keyframes pl-intro-in{ to{ opacity:1; filter:none; } }
.pl-intro-skip{
  position:absolute;
  right:18px;
  top:calc(16px + env(safe-area-inset-top));
  border:1px solid var(--edge);
  background:rgba(255,255,255,.04);
  color:#9aa9a2;
  border-radius:999px;
  padding:8px 14px;
  font-size:12px;
}
.pl.intro-on .pl-body,
.pl.intro-on .pl-top{ opacity:0; }
.pl-body, .pl-top{ transition:opacity .8s ease .1s; }

/* ---------- modal (how to play) ---------- */

.pl-modal{
  position:fixed;
  inset:0;
  z-index:70;
  display:grid;
  place-items:end center;
  background:rgba(2,8,5,.6);
  backdrop-filter:blur(6px);
}
.pl-modal[hidden]{ display:none; }
.pl-modal-card{
  position:relative;
  width:min(620px,100%);
  max-height:88dvh;
  overflow:auto;
  background:linear-gradient(160deg, #0f2a1f, #07170f);
  border:1px solid var(--edge);
  border-radius:26px 26px 0 0;
  padding:24px 20px calc(24px + env(safe-area-inset-bottom));
  animation:pl-sheet .5s cubic-bezier(.16,1,.3,1);
  box-shadow:0 -30px 90px rgba(0,0,0,.5), 0 0 80px -30px var(--accent);
}
@media (min-width:700px){
  .pl-modal{ place-items:center; }
  .pl-modal-card{ border-radius:26px; }
}
@keyframes pl-sheet{ from{ transform:translateY(60px); opacity:0; } }
.pl-modal-x{ position:absolute; top:14px; right:14px; }
.ht-head h2{ margin:6px 0 4px; font-size:30px; letter-spacing:-.04em; }
.ht-head p{ color:#91a29a; margin:0; }
.ht-meta{ display:flex; gap:8px; margin-top:10px; }
.ht-meta span{ font-size:11px; font-weight:700; color:var(--accent); border:1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius:999px; padding:4px 10px; }
.ht-steps{ list-style:none; margin:20px 0; padding:0; display:grid; gap:10px; }
.ht-steps li{
  display:flex;
  gap:14px;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  opacity:0;
  transform:perspective(800px) rotateX(-30deg) translateY(10px);
  animation:ht-in .6s cubic-bezier(.16,1,.3,1) forwards;
  animation-delay:calc(var(--i) * 80ms + 100ms);
}
@keyframes ht-in{ to{ opacity:1; transform:none; } }
.ht-num{
  width:38px;
  height:38px;
  flex:none;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:13px;
  color:var(--accent);
  background:radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  box-shadow:0 0 22px -6px var(--accent);
}
.ht-steps strong{ display:block; margin-bottom:3px; }
.ht-steps p{ margin:0; color:#91a29a; font-size:14px; line-height:1.5; }
.ht-score{ border-radius:16px; padding:14px; background:rgba(228,196,111,.06); border:1px solid rgba(228,196,111,.2); }
.ht-score span{ font-size:10px; letter-spacing:.16em; font-weight:700; color:var(--gold); }
.ht-score p{ margin:6px 0 0; color:#d9ccb0; font-size:14px; line-height:1.5; }
.ht-tips p{ color:#91a29a; font-size:13px; margin:10px 0 0; }

/* ---------- entry ---------- */

.pl-entry-hero{ text-align:center; padding:16px 0 20px; }
.pl-entry-hero h2{ font-size:clamp(40px,10vw,76px); letter-spacing:-.06em; margin:8px 0 6px; line-height:.95; text-shadow:0 0 60px color-mix(in srgb, var(--accent) 30%, transparent); }
.pl-entry-hero p{ color:#a4b3ab; margin:0 auto; max-width:460px; }
.pl-entry-grid{ display:grid; gap:14px; }
@media (min-width:700px){ .pl-entry-grid{ grid-template-columns:1fr 1fr; } }
.pl-seg{ display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:5px; background:rgba(0,0,0,.25); border-radius:14px; margin-bottom:14px; }
.pl-seg button{ min-height:40px; border-radius:10px; border:0; background:transparent; color:#91a29a; font-weight:600; }
.pl-seg button.on{ background:rgba(64,201,133,.16); color:var(--text); box-shadow:inset 0 0 0 1px rgba(121,219,168,.35); }
.pl-join-form{ display:grid; gap:10px; }
.pl-code-input{ text-align:center; font-size:26px !important; letter-spacing:.35em; text-transform:uppercase; font-weight:700; min-height:60px; }
.pl-mini-steps{ margin:0 0 14px; padding-left:20px; color:#91a29a; font-size:14px; line-height:1.8; }
.pl-howcard.wide{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:22px; }
.pl-howcard.wide h3{ margin:4px 0 0; font-size:18px; }

/* ---------- lobby ---------- */

.pl-lobby-code{ text-align:center; padding:10px 0 18px; }
.pl-bigcode{
  display:inline-flex;
  gap:6px;
  background:none;
  border:0;
  margin:10px 0 6px;
  perspective:600px;
}
.pl-bigcode span{
  width:clamp(46px,13vw,68px);
  height:clamp(58px,16vw,84px);
  display:grid;
  place-items:center;
  border-radius:16px;
  font-size:clamp(30px,8vw,46px);
  font-weight:700;
  color:var(--text);
  background:linear-gradient(160deg, rgba(20,64,45,.9), rgba(6,22,16,.9));
  border:1px solid rgba(121,219,168,.28);
  box-shadow:0 18px 40px rgba(0,0,0,.35), 0 0 30px -10px var(--accent), inset 0 1px 0 rgba(255,255,255,.08);
  animation:pl-flipin .8s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i) * 70ms);
}
@keyframes pl-flipin{ from{ transform:rotateX(-90deg); opacity:0; } }
.pl-lobby-players{ display:grid; grid-template-columns:repeat(auto-fill, minmax(96px,1fr)); gap:10px; margin:10px 0 18px; }
.pl-lp{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:14px 8px;
  border-radius:20px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.06);
  text-align:center;
}
.pl-lp b{ font-size:13px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pl-lp.me{ border-color:rgba(121,219,168,.3); background:rgba(64,201,133,.06); }
.pl-lp.pop{ animation:pl-pop .7s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pl-pop{ from{ transform:scale(.4) rotateY(90deg); opacity:0; } }
.pl-lp.empty b{ color:#687971; font-weight:500; }
.pl-kick{ position:absolute; top:6px; right:6px; width:24px; height:24px; border-radius:50%; border:0; background:rgba(255,107,113,.12); color:#ffb0b3; font-size:11px; }
.pl-lobby-foot{ display:grid; gap:12px; justify-items:center; }
.pl-host-tools{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.pl-setting{ display:flex; align-items:center; gap:8px; font-size:12px; color:#91a29a; font-weight:600; }
.pl-setting select{ min-height:40px; flex:none; font-size:14px; padding:0 10px; }
.pl-start{ min-width:min(320px,100%); }
.pl-credit-note{ margin:0; font-size:12px; }

/* ---------- results ---------- */

.pl-results{ text-align:center; }
.pl-results h2{ font-size:clamp(34px,8vw,60px); letter-spacing:-.05em; margin:8px 0; }
.pl-recap{ color:#c9d6cf; margin-bottom:10px; }
.pl-podium{ display:grid; grid-template-columns:repeat(3,1fr); align-items:end; gap:10px; max-width:520px; margin:26px auto 10px; perspective:900px; }
.pl-pod{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.pl-pod b{ font-size:14px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pl-pod > span{ font-size:13px; color:var(--green2); font-weight:700; }
.pl-pod-block{
  width:100%;
  display:grid;
  place-items:start center;
  padding-top:10px;
  font-size:28px;
  font-weight:700;
  border-radius:16px 16px 6px 6px;
  background:linear-gradient(180deg, rgba(64,201,133,.35), rgba(12,40,29,.9));
  border:1px solid rgba(121,219,168,.35);
  box-shadow:0 0 50px -12px var(--accent), inset 0 1px 0 rgba(255,255,255,.15);
  transform-origin:bottom;
  animation:pl-rise 1s cubic-bezier(.16,1,.3,1) both;
  animation-delay:var(--d);
}
.pl-pod.p1 .pl-pod-block{ height:150px; background:linear-gradient(180deg, rgba(228,196,111,.55), rgba(40,34,12,.9)); border-color:rgba(228,196,111,.5); box-shadow:0 0 70px -10px rgba(228,196,111,.7); }
.pl-pod.p2 .pl-pod-block{ height:105px; }
.pl-pod.p3 .pl-pod-block{ height:75px; }
.pl-pod .pl-av{ animation:pl-pop .8s cubic-bezier(.34,1.56,.64,1) both; animation-delay:calc(var(--d) + .5s); }
@keyframes pl-rise{ from{ transform:scaleY(0) rotateX(40deg); } }
.pl-rank{ list-style:none; margin:10px auto; padding:0; max-width:420px; display:grid; gap:6px; }
.pl-rank li{ display:flex; align-items:center; gap:10px; padding:8px 12px; background:rgba(255,255,255,.03); border-radius:12px; }
.pl-rank em{ font-style:normal; color:#687971; width:18px; }
.pl-rank b{ flex:1; text-align:left; }
.pl-rank span{ color:var(--green2); font-weight:700; }
.pl-results-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:18px; }

/* ---------- fx ---------- */

.pl-confetti{ position:fixed; inset:0; pointer-events:none; z-index:80; overflow:hidden; }
.pl-confetti i{
  position:absolute;
  top:-20px;
  left:var(--x);
  width:8px;
  height:14px;
  border-radius:2px;
  animation:pl-fall var(--d) cubic-bezier(.25,.6,.4,1) var(--delay) forwards;
}
@keyframes pl-fall{ to{ transform:translate(var(--dx), 110vh) rotate(var(--r)); opacity:.6; } }
.pl-flash{
  position:fixed;
  left:50%;
  top:38%;
  z-index:75;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.pl-flash span{
  display:block;
  font-size:clamp(28px,7vw,54px);
  font-weight:700;
  letter-spacing:-.04em;
  white-space:nowrap;
  color:var(--text);
  text-shadow:0 0 40px var(--accent);
  animation:pl-flashin 1.6s cubic-bezier(.16,1,.3,1) forwards;
}
.pl-flash.bad span{ color:#ffb0b3; text-shadow:0 0 40px #ff6b71; }
.pl-flash.warm span{ color:#ffd9a0; text-shadow:0 0 40px #ff9f5a; }
.pl-flash.good span{ color:#c8f5dc; text-shadow:0 0 40px #40c985; }
@keyframes pl-flashin{
  0%{ opacity:0; transform:scale(.5) rotateX(60deg); }
  20%{ opacity:1; transform:scale(1.08); }
  70%{ opacity:1; transform:scale(1); }
  100%{ opacity:0; transform:scale(1.1) translateY(-20px); }
}
.pl-count{ position:fixed; inset:0; z-index:78; display:grid; place-items:center; background:rgba(3,10,7,.55); backdrop-filter:blur(4px); }
.pl-count span{ font-size:clamp(120px,30vw,220px); font-weight:700; color:var(--text); text-shadow:0 0 80px var(--accent); animation:pl-count .65s cubic-bezier(.16,1,.3,1) both; }
@keyframes pl-count{ from{ transform:scale(2.2); opacity:0; filter:blur(10px); } }
.shake{ animation:pl-shake .35s; }
@keyframes pl-shake{ 20%,60%{ transform:translateX(-8px); } 40%,80%{ transform:translateX(8px); } }

/* =========================================================
   GAME-SPECIFIC
========================================================= */

/* Imposter */
.imp-card-wrap{ perspective:1400px; display:grid; place-items:center; margin:10px 0; }
.imp-card{
  width:min(340px,86vw);
  aspect-ratio:3/4;
  border:0;
  padding:0;
  background:none;
  position:relative;
  transform-style:preserve-3d;
  transition:transform .9s cubic-bezier(.16,1,.3,1);
  animation:imp-float 4s ease-in-out infinite;
}
@keyframes imp-float{ 50%{ translate:0 -8px; } }
.imp-card.flipped{ transform:rotateY(180deg); }
.imp-face{
  position:absolute;
  inset:0;
  border-radius:28px;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:26px;
  text-align:center;
  color:var(--text);
  border:1px solid rgba(121,219,168,.28);
  background:
    radial-gradient(circle at 50% 30%, rgba(64,201,133,.22), transparent 55%),
    linear-gradient(160deg, #13402d, #06170f);
  box-shadow:0 40px 90px rgba(0,0,0,.45), 0 0 70px -20px var(--accent), inset 0 1px 0 rgba(255,255,255,.1);
}
.imp-face.back{ transform:rotateY(180deg); }
.imp-face.back.bad{
  border-color:rgba(255,107,113,.4);
  background:radial-gradient(circle at 50% 30%, rgba(255,107,113,.25), transparent 55%), linear-gradient(160deg, #3a1216, #120607);
  box-shadow:0 40px 90px rgba(0,0,0,.45), 0 0 80px -16px #ff6b71;
}
.imp-q{ font-size:90px; font-weight:700; color:var(--green2); text-shadow:0 0 40px var(--green); }
.imp-face small{ color:#7f988c; }
.imp-word{ font-size:clamp(34px,9vw,48px); font-weight:700; letter-spacing:-.04em; text-shadow:0 0 30px rgba(64,201,133,.6); }
.imp-role{ font-size:24px; font-weight:700; color:#ffb0b3; }
.imp-face p{ color:#b7c7bf; font-size:14px; margin:0; }
.imp-peek{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 auto 14px;
  border:1px solid var(--edge);
  background:var(--glass);
  color:#91a29a;
  border-radius:999px;
  padding:8px 16px;
  font-size:12px;
}
.imp-peek b{ color:var(--text); font-size:15px; letter-spacing:.04em; }
.imp-board{ display:grid; gap:8px; }
.imp-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  transition:.4s;
}
.imp-row > b{ width:90px; flex:none; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.imp-row.now{ border-color:rgba(121,219,168,.45); background:rgba(64,201,133,.08); box-shadow:0 0 40px -16px var(--accent); }
.imp-row.gone{ opacity:.4; }
.imp-clues{ display:flex; flex-wrap:wrap; gap:6px; flex:1; }
.imp-clue{ padding:5px 12px; border-radius:999px; background:rgba(121,219,168,.12); color:#dff7ea; font-weight:600; font-size:14px; animation:pl-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
.imp-clue.skip{ background:rgba(255,255,255,.05); color:#687971; }
.imp-typing{ display:inline-flex; gap:4px; }
.imp-typing i{ width:6px; height:6px; border-radius:50%; background:var(--green2); animation:pl-dot 1.2s infinite; }
.imp-typing i:nth-child(2){ animation-delay:.15s; } .imp-typing i:nth-child(3){ animation-delay:.3s; }
.imp-vote-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(130px,1fr)); gap:10px; }
.imp-vote{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  padding:16px 10px;
  border-radius:20px;
  border:1px solid var(--edge);
  background:var(--glass);
  color:var(--text);
  transition:transform .3s, border-color .3s, box-shadow .3s;
}
.imp-vote small{ color:#7f988c; font-size:12px; min-height:16px; }
.imp-vote:disabled{ opacity:.4; }
.imp-vote.on{ border-color:#ff6b71; box-shadow:0 0 40px -10px #ff6b71; transform:translateY(-4px) scale(1.03); }
.imp-caught{ display:flex; flex-direction:column; align-items:center; gap:10px; margin:10px 0; text-align:center; color:#b7c7bf; }
.imp-reveal{ text-align:center; }
.imp-reveal-who{ display:flex; justify-content:center; gap:20px; margin:10px 0; }
.imp-mask{ display:flex; flex-direction:column; align-items:center; gap:6px; animation:pl-pop .9s cubic-bezier(.34,1.56,.64,1) both; }
.imp-mask small{ color:#ffb0b3; }
.imp-reveal p{ color:#b7c7bf; }
.imp-word-reveal{ display:inline-flex; flex-direction:column; gap:4px; padding:14px 24px; border-radius:18px; background:rgba(64,201,133,.08); border:1px solid rgba(121,219,168,.25); margin:8px 0; }
.imp-word-reveal b{ font-size:30px; letter-spacing:-.03em; }
.imp-word-reveal small{ color:#91a29a; }
.imp-tally{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:10px; }
.imp-tally span{ display:inline-flex; align-items:center; gap:6px; padding:6px 12px; background:rgba(255,255,255,.04); border-radius:999px; font-size:13px; }

/* Drawing (shared canvas) */
.dr-layout{ display:grid; gap:12px; }
@media (min-width:900px){ .dr-layout{ grid-template-columns:minmax(0,1.6fr) minmax(240px,1fr); align-items:start; } }
.dr-canvas-wrap{
  position:relative;
  border-radius:20px;
  overflow:hidden;
  aspect-ratio:4/3;
  background:#f6f4ec;
  box-shadow:0 30px 70px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1), 0 0 60px -20px var(--accent);
}
.dr-canvas{ width:100%; height:100%; display:block; touch-action:none; cursor:crosshair; }
.dr-end-badge{ position:absolute; left:50%; bottom:14px; transform:translateX(-50%); background:rgba(6,20,14,.85); padding:8px 18px; border-radius:999px; font-weight:700; animation:pl-pop .6s both; }
.dr-by{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:#91a29a; }
.dr-mask{ display:flex; justify-content:center; flex-wrap:wrap; gap:5px; margin-bottom:10px; align-items:flex-end; }
.dr-mask span{
  width:clamp(20px,5.2vw,30px);
  height:clamp(28px,7vw,38px);
  border-bottom:3px solid rgba(121,219,168,.5);
  display:grid;
  place-items:center;
  font-size:clamp(17px,4.4vw,24px);
  font-weight:700;
  text-transform:uppercase;
}
.dr-mask span.on{ color:var(--green2); border-color:var(--green2); animation:pl-pop .5s both; }
.dr-mask i.sp{ width:12px; }
.dr-mask small{ color:#687971; margin-left:6px; font-size:12px; }
.dr-got{ color:#c8f5dc; font-weight:600; }
.dr-feed{
  display:grid;
  gap:4px;
  align-content:start;
  max-height:220px;
  overflow:auto;
  padding:12px;
  border-radius:16px;
  background:rgba(4,14,10,.5);
  border:1px solid rgba(255,255,255,.05);
  font-size:14px;
}
.dr-feed:empty{ display:none; }
.dr-feed p{ margin:0; }
.dr-feed .sys{ color:#7d8f86; font-size:12px; }
.dr-feed .ok{ color:#9ff0c4; font-weight:600; display:flex; align-items:center; gap:6px; }
.dr-feed .warm{ color:#ffd9a0; }
.dr-options{ display:grid; gap:12px; perspective:900px; }
@media (min-width:700px){ .dr-options{ grid-template-columns:repeat(3,1fr); } }
.dr-option{
  min-height:110px;
  border-radius:22px;
  border:1px solid rgba(121,219,168,.28);
  background:linear-gradient(160deg, rgba(20,64,45,.9), rgba(6,22,16,.9));
  color:var(--text);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  box-shadow:0 20px 50px rgba(0,0,0,.3);
  animation:pl-flipin .7s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i) * 90ms);
  transition:transform .3s, box-shadow .3s;
}
.dr-option span{ font-size:24px; font-weight:700; letter-spacing:-.02em; text-transform:capitalize; }
.dr-option small{ color:#7f988c; }
.dr-option:hover,
.dr-option.on{ transform:translateY(-4px) rotateX(6deg); box-shadow:0 30px 60px rgba(0,0,0,.35), 0 0 50px -14px var(--accent); }
.dr-waiting{ display:flex; flex-direction:column; align-items:center; gap:12px; padding:30px 0; color:#91a29a; }
.dr-waiting .pl-av{ animation:imp-float 2.4s ease-in-out infinite; }
.dr-gains{ display:grid; gap:6px; }
.dr-gains span{ display:flex; align-items:center; gap:8px; padding:8px 12px; background:rgba(255,255,255,.03); border-radius:12px; font-size:14px; }
.dr-gains b{ margin-left:auto; color:var(--green2); }

.pad-tools{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
  padding:10px;
  border-radius:18px;
  background:rgba(4,14,10,.6);
  border:1px solid rgba(255,255,255,.06);
}
.pad-colors, .pad-sizes, .pad-actions{ display:flex; gap:6px; flex-wrap:wrap; }
.pad-color{ width:32px; height:32px; border-radius:50%; border:2px solid rgba(255,255,255,.15); background:var(--c); }
.pad-color.eraser{ background:repeating-conic-gradient(#f6f4ec 0 25%, #d9d4c4 0 50%) 50%/12px 12px; }
.pad-color.on{ border-color:#fff; box-shadow:0 0 0 2px var(--accent), 0 0 16px var(--accent); transform:scale(1.1); }
.pad-size, .pad-act{ width:38px; height:38px; border-radius:12px; border:1px solid var(--edge); background:rgba(255,255,255,.04); color:var(--text); display:grid; place-items:center; }
.pad-size i{ width:var(--s); height:var(--s); border-radius:50%; background:currentColor; }
.pad-size.on{ border-color:var(--accent); box-shadow:0 0 14px -2px var(--accent); }

/* Emoji */
.em-stage{
  text-align:center;
  padding:28px 12px;
  border-radius:28px;
  background:radial-gradient(circle at 50% 40%, rgba(228,196,111,.16), transparent 60%), var(--glass);
  border:1px solid rgba(228,196,111,.2);
  box-shadow:0 0 80px -30px rgba(228,196,111,.6);
  perspective:800px;
}
.em-emojis{ font-size:clamp(52px,15vw,96px); line-height:1.1; display:flex; justify-content:center; flex-wrap:wrap; gap:6px; }
.em-emojis span{ display:inline-block; animation:em-in .8s cubic-bezier(.34,1.56,.64,1) both, em-bob 3s ease-in-out infinite; animation-delay:calc(var(--i) * 120ms), calc(var(--i) * 200ms + .8s); filter:drop-shadow(0 16px 20px rgba(0,0,0,.35)); }
.em-emojis.small{ font-size:48px; }
@keyframes em-in{ from{ transform:translateZ(-300px) rotateY(180deg) scale(.2); opacity:0; } }
@keyframes em-bob{ 50%{ transform:translateY(-8px) rotate(-4deg); } }
.em-mask{ margin-top:18px; font-size:clamp(18px,5vw,26px); letter-spacing:.3em; font-weight:700; color:#e8dcb8; font-family:ui-monospace, "SF Mono", Menlo, monospace; word-break:break-word; }
.em-answer{ margin-top:14px; font-size:clamp(28px,7vw,44px); font-weight:700; letter-spacing:-.03em; color:var(--gold); text-shadow:0 0 30px rgba(228,196,111,.6); animation:pl-pop .7s both; }
.em-win{ text-align:center; margin-top:14px; font-size:18px; padding:14px; border-radius:18px; background:rgba(64,201,133,.1); border:1px solid rgba(121,219,168,.3); animation:pl-pop .6s both; }
.em-win span{ color:var(--green2); font-weight:700; }
.em-solved{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; margin-top:16px; }
.em-solved .pl-kicker{ width:100%; text-align:center; }
.em-solver{ display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; background:rgba(255,255,255,.04); font-size:13px; animation:pl-pop .5s both; }
.em-results{ display:grid; gap:6px; margin-top:16px; max-width:420px; margin-inline:auto; }
.em-results span{ display:flex; align-items:center; gap:8px; padding:8px 12px; background:rgba(255,255,255,.03); border-radius:12px; }
.em-results b{ margin-left:auto; color:var(--green2); }
.em-results small{ color:#687971; }

/* CategorySwap */
.cat-letter{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  border-radius:16px;
  font-size:34px;
  font-weight:700;
  color:#04130c;
  background:linear-gradient(160deg, #bdf5d6, #40c985);
  box-shadow:0 0 40px -6px var(--green), inset 0 -4px 0 rgba(0,0,0,.2);
  animation:pl-flipin .8s cubic-bezier(.16,1,.3,1) both;
}
.cat-swap-note{ font-size:13px; padding:10px 14px; border-radius:14px; background:rgba(255,159,90,.1); border:1px solid rgba(255,159,90,.3); color:#ffd9a0; margin-bottom:12px; }
.cat-swap-note.soon{ background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.07); color:#91a29a; }
.cat-list{ display:grid; gap:10px; perspective:1000px; }
.cat-item{
  display:grid;
  gap:6px;
  padding:12px;
  border-radius:18px;
  background:var(--glass);
  border:1px solid var(--edge);
  animation:pl-flipin .6s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i) * 60ms);
}
.cat-item > span{ font-size:13px; font-weight:700; color:#b7c7bf; }
.cat-item input{ min-height:46px; border-radius:12px; border:1px solid var(--edge); background:rgba(4,14,10,.6); color:var(--text); font:inherit; font-size:16px; padding:0 12px; }
.cat-item input:focus{ outline:none; border-color:rgba(121,219,168,.55); box-shadow:0 0 0 4px rgba(64,201,133,.12); }
.cat-item.swapped{ border-color:rgba(255,159,90,.5); box-shadow:0 0 40px -14px #ff9f5a; animation:cat-swap 1s cubic-bezier(.16,1,.3,1) both; }
@keyframes cat-swap{ from{ transform:rotateX(180deg); } }
.cat-review{ display:grid; gap:10px; }
@media (min-width:700px){ .cat-review{ grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); } }
.cat-rcard{ padding:12px; border-radius:18px; background:var(--glass); border:1px solid var(--edge); }
.cat-rcard h4{ margin:0 0 8px; font-size:14px; color:#b7c7bf; }
.cat-ans{
  width:100%;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  margin-top:4px;
  border-radius:12px;
  border:1px solid transparent;
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-align:left;
  font-size:14px;
}
.cat-ans > span:not(.pl-av){ flex:1; }
.cat-ans small{ color:#ffb0b3; font-size:11px; }
.cat-ans.out span{ text-decoration:line-through; color:#687971; }
.cat-ans.mine{ border-color:rgba(255,107,113,.4); }
.cat-ans.empty{ opacity:.45; }
.cat-pts{ font-size:12px; padding:2px 8px; border-radius:999px; background:rgba(255,255,255,.06); }
.cat-pts.p2{ background:rgba(64,201,133,.2); color:#9ff0c4; }
.cat-pts.p1{ background:rgba(228,196,111,.18); color:#f1dcb0; }

/* Word Rush */
.rush{
  position:relative;
  width:min(520px,100%);
  aspect-ratio:1;
  margin:0 auto;
}
.rush-ring{ position:absolute; inset:0; }
.rush-p{
  --r:42%;
  position:absolute;
  left:calc(50% + var(--x) * var(--r));
  top:calc(50% + var(--y) * var(--r));
  transform:translate(-50%,-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  transition:transform .4s, opacity .4s;
}
.rush-p b{ font-size:12px; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rush-lives{ font-size:11px; letter-spacing:-2px; }
.rush-p.now{ transform:translate(-50%,-50%) scale(1.18); }
.rush-p.now .pl-av{ box-shadow:0 0 0 3px #ff9f5a, 0 0 30px #ff9f5a; animation:pl-throb .45s ease-in-out infinite alternate; }
.rush-p.out{ opacity:.3; filter:grayscale(1); }
.rush-core{
  position:absolute;
  inset:26%;
  border-radius:50%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:4px;
}
.rush-core .pl-kicker{ font-size:8px; }
.rush-syl{
  font-size:clamp(40px,12vw,72px);
  font-weight:700;
  letter-spacing:.04em;
  color:#fff1dc;
  text-shadow:0 0 30px #ff9f5a, 0 0 70px rgba(255,107,61,.6);
}
.rush-typing{ min-height:22px; font-size:18px; font-weight:600; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.rush-typing mark{ background:none; color:#ffb347; }
.rush-last{ min-height:18px; font-size:13px; }
.rush-last .ok{ color:#9ff0c4; }
.rush-last .bad{ color:#ffb0b3; }
.pl-screen.myturn .rush-form input{ border-color:#ff9f5a; box-shadow:0 0 0 4px rgba(255,159,90,.15), 0 0 40px -8px #ff9f5a; }
.rush-alpha{ margin-top:14px; text-align:center; }
.rush-alpha div{ display:flex; flex-wrap:wrap; justify-content:center; gap:4px; margin-top:6px; }
.rush-alpha i{ font-style:normal; width:22px; height:24px; display:grid; place-items:center; border-radius:6px; font-size:11px; font-weight:700; background:rgba(255,255,255,.04); color:#687971; }
.rush-alpha i.on{ background:rgba(64,201,133,.2); color:#9ff0c4; box-shadow:0 0 10px -2px var(--green); }

/* Sketch relay */
.sk-show{ border-radius:20px; overflow:hidden; aspect-ratio:4/3; box-shadow:0 30px 70px rgba(0,0,0,.4); margin-bottom:6px; }
.sk-canvas{ width:100%; height:100%; display:block; aspect-ratio:4/3; }
.sk-sent{ text-align:center; padding:18px; border-radius:18px; background:rgba(64,201,133,.08); border:1px solid rgba(121,219,168,.25); margin-top:16px; animation:pl-pop .6s both; }
.sk-chain{ display:grid; gap:14px; max-width:560px; margin:0 auto; perspective:1200px; }
.sk-page{
  padding:14px;
  border-radius:22px;
  background:var(--glass2);
  border:1px solid var(--edge);
  opacity:0;
  transform:rotateX(-70deg) translateY(30px);
  transform-origin:50% 0;
  transition:opacity .6s ease, transform .9s cubic-bezier(.16,1,.3,1);
}
.sk-page.in{ opacity:1; transform:none; }
.sk-page p{ font-size:20px; font-weight:600; margin:6px 0 0; }
.sk-page canvas{ border-radius:14px; margin-top:8px; }
.sk-page-by{ display:flex; align-items:center; gap:6px; font-size:12px; color:#7f988c; }
.sk-rx{ min-height:18px; margin-top:6px; font-size:18px; letter-spacing:2px; }
.sk-react{ position:sticky; bottom:calc(10px + env(safe-area-inset-bottom)); display:flex; justify-content:center; gap:10px; margin-top:14px; }
.sk-react button{ width:56px; height:56px; border-radius:50%; font-size:26px; border:1px solid var(--edge); background:rgba(8,26,19,.9); backdrop-filter:blur(8px); transition:transform .2s; }
.sk-react button.pop{ transform:scale(1.3); }

/* Would you rather */
.wyr-split{ display:grid; gap:12px; perspective:1200px; position:relative; }
@media (min-width:700px){ .wyr-split{ grid-template-columns:1fr auto 1fr; align-items:stretch; } }
.wyr-opt{
  position:relative;
  min-height:150px;
  border-radius:26px;
  padding:22px;
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  text-align:left;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:8px;
  transition:transform .5s cubic-bezier(.16,1,.3,1), box-shadow .4s, border-color .3s;
}
.wyr-opt.a{ background:radial-gradient(circle at 20% 20%, rgba(64,201,133,.35), transparent 60%), linear-gradient(160deg, #134a33, #06170f); }
.wyr-opt.b{ background:radial-gradient(circle at 80% 20%, rgba(228,196,111,.35), transparent 60%), linear-gradient(160deg, #4a3f13, #171306); }
.wyr-opt b{ font-size:clamp(20px,5vw,28px); letter-spacing:-.03em; line-height:1.15; }
.wyr-l{ position:absolute; top:16px; right:18px; font-size:40px; font-weight:700; opacity:.25; }
.wyr-opt:hover{ transform:translateY(-4px) rotateX(5deg); }
.wyr-opt.a.mine{ border-color:#40c985; box-shadow:0 0 60px -12px #40c985; }
.wyr-opt.b.mine{ border-color:#e4c46f; box-shadow:0 0 60px -12px #e4c46f; }
.wyr-opt.pred:after{ content:"👥 your prediction"; position:absolute; left:18px; top:16px; font-size:11px; font-weight:700; letter-spacing:.06em; color:#fff; background:rgba(0,0,0,.35); padding:4px 10px; border-radius:999px; }
.wyr-opt.mine:before{ content:"✓ your pick"; position:absolute; right:18px; bottom:18px; font-size:11px; font-weight:700; color:#fff; opacity:.8; }
.wyr-or{ align-self:center; justify-self:center; font-weight:700; font-size:13px; letter-spacing:.2em; color:#7f988c; }
.wyr-reveal{ display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:end; min-height:300px; }
.wyr-col{
  --p:50;
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:8px;
  padding:16px;
  border-radius:24px;
  min-height:calc(90px + var(--p) * 2.1px);
  animation:pl-rise 1.1s cubic-bezier(.16,1,.3,1) both;
  transform-origin:bottom;
}
.wyr-col.a{ background:linear-gradient(180deg, rgba(64,201,133,.45), rgba(8,30,20,.9)); }
.wyr-col.b{ background:linear-gradient(180deg, rgba(228,196,111,.45), rgba(30,25,8,.9)); animation-delay:.15s; }
.wyr-col.win{ box-shadow:0 0 70px -10px var(--accent); outline:1px solid rgba(255,255,255,.25); }
.wyr-pct{ font-size:clamp(34px,9vw,56px); font-weight:700; letter-spacing:-.05em; }
.wyr-col b{ font-size:14px; line-height:1.3; }
.wyr-avs{ display:flex; flex-wrap:wrap; gap:4px; }
.wyr-gain{ text-align:center; margin-top:16px; color:#91a29a; font-weight:600; }
.wyr-gain.good{ color:#9ff0c4; font-size:18px; }

/* Trivia */
.tv-cat{ font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--gold); border:1px solid rgba(228,196,111,.35); padding:4px 10px; border-radius:999px; }
.tv-streak{ font-weight:700; color:#ffb347; }
.tv-q{ font-size:clamp(24px,6vw,40px); letter-spacing:-.04em; line-height:1.15; margin:6px 0 18px; }
.tv-q.small{ font-size:clamp(18px,4.5vw,24px); color:#b7c7bf; }
.tv-answers{ display:grid; gap:10px; perspective:1000px; }
@media (min-width:700px){ .tv-answers{ grid-template-columns:1fr 1fr; } }
.tv-a{
  --tc:#40c985;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:12px;
  min-height:64px;
  padding:12px 16px;
  border-radius:18px;
  border:1px solid color-mix(in srgb, var(--tc) 40%, transparent);
  background:linear-gradient(135deg, color-mix(in srgb, var(--tc) 22%, #07170f), #07170f);
  color:var(--text);
  text-align:left;
  font-size:16px;
  animation:pl-flipin .6s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i, 0) * 70ms);
  transition:transform .25s, opacity .3s, box-shadow .3s;
}
.tv-a.c1{ --tc:#8fb8ff; } .tv-a.c2{ --tc:#e4c46f; } .tv-a.c3{ --tc:#ff6b71; }
.tv-a span{ width:34px; height:34px; flex:none; border-radius:10px; display:grid; place-items:center; font-weight:700; background:color-mix(in srgb, var(--tc) 35%, transparent); }
.tv-a b{ font-weight:600; flex:1; }
.tv-a:active{ transform:scale(.97); }
.locked .tv-a:not(.mine){ opacity:.4; }
.tv-a.mine{ box-shadow:0 0 0 2px var(--tc), 0 0 40px -8px var(--tc); }
.tv-answers.rev .tv-a:before{ content:""; position:absolute; inset:0; width:var(--w); background:color-mix(in srgb, var(--tc) 18%, transparent); transition:width 1s cubic-bezier(.16,1,.3,1); }
.tv-answers.rev .tv-a{ opacity:.45; }
.tv-answers.rev .tv-a.right{ opacity:1; box-shadow:0 0 0 2px #40c985, 0 0 50px -8px #40c985; }
.tv-answers.rev .tv-a.wrong{ opacity:1; box-shadow:0 0 0 2px #ff6b71; }
.tv-a em{ font-style:normal; font-weight:700; position:relative; }
.tv-a > *{ position:relative; }
.tv-board{ list-style:none; padding:0; margin:18px auto 0; max-width:420px; display:grid; gap:6px; }
.tv-board li{ display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:12px; background:rgba(255,255,255,.03); animation:pl-pop .5s both; animation-delay:calc(var(--i) * 70ms); }
.tv-board em{ font-style:normal; color:#687971; width:16px; }
.tv-board b{ flex:1; }
.tv-board span{ font-weight:700; font-variant-numeric:tabular-nums; }
.tv-board small{ color:#9ff0c4; font-weight:700; }

/* Hot seat */
.hs-spot{
  display:grid;
  place-items:center;
  padding:26px 0 10px;
  position:relative;
}
.hs-spot:before{
  content:"";
  position:absolute;
  width:220px;
  height:220px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,241,201,.22), transparent 65%);
  filter:blur(6px);
  animation:fg-breathe 3s ease-in-out infinite;
}
.hs-prompt{ text-align:center; font-size:clamp(24px,6vw,38px); letter-spacing:-.04em; line-height:1.15; margin:8px 0 6px; }
.hs-prompt.small{ font-size:clamp(18px,4.5vw,24px); color:#b7c7bf; margin-bottom:16px; }
.hs-options{ display:grid; gap:10px; perspective:1000px; }
@media (min-width:700px){ .hs-options{ grid-template-columns:1fr 1fr; } }
.hs-opt{
  position:relative;
  min-height:70px;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--edge);
  background:var(--glass);
  color:var(--text);
  font-size:17px;
  font-weight:600;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:6px;
  animation:pl-flipin .6s cubic-bezier(.16,1,.3,1) both;
  animation-delay:calc(var(--i) * 70ms);
  transition:transform .3s, box-shadow .3s, border-color .3s;
}
.hs-opt small{ font-size:11px; color:#7f988c; font-weight:600; }
.hs-opt.own{ opacity:.55; }
.hs-opt.on{ border-color:var(--accent); box-shadow:0 0 40px -10px var(--accent); transform:translateY(-3px); }
.hs-options.rev .hs-opt{ opacity:.7; }
.hs-options.rev .hs-opt.real{ opacity:1; border-color:#40c985; box-shadow:0 0 60px -12px #40c985; }
.hs-real{ font-size:11px; font-weight:700; letter-spacing:.12em; color:#9ff0c4; }
.hs-bluff{ font-size:11px; color:#7f988c; }
.hs-pickers{ display:flex; gap:4px; flex-wrap:wrap; min-height:22px; }
.hs-gains{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:16px; }
.hs-gains span{ display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; background:rgba(255,255,255,.04); font-size:13px; }
.hs-gains b{ color:var(--green2); }

/* Pass & play */
.pass-names{ display:grid; gap:8px; margin:14px 0; }
.pass-name{ display:flex; gap:8px; }
.pass-name input{ flex:1; min-height:48px; border-radius:14px; border:1px solid var(--edge); background:rgba(4,14,10,.6); color:var(--text); font:inherit; font-size:16px; padding:0 14px; }
.pass-row{ display:flex; gap:10px; justify-content:space-between; flex-wrap:wrap; margin-top:14px; }
.pass-big{ font-size:20px; line-height:1.5; padding:22px; border-radius:22px; background:var(--glass); border:1px solid var(--edge); text-align:center; }

/* tablets in landscape: give the stage more room */
@media (min-width:700px) and (orientation:landscape) and (max-height:820px){
  .imp-card{ width:min(300px,40vh); }
  .rush{ width:min(460px,70vh); }
}

@media (prefers-reduced-motion:reduce){
  .pl-screen{ transform:none; transition:opacity .2s; }
  .imp-card{ animation:none; }
}

/* phones: the 3D object floats at the top — soften it behind text-heavy screens */
@media (max-width:999px){
  .pl[data-status="lobby"] .pl-3d.on,
  .pl[data-status="results"] .pl-3d.on{ opacity:.38; }
  .pl:not([data-status]) .pl-3d.on{ opacity:.55; }
  .pl[data-status="playing"] .pl-3d.on{ opacity:.28; }
}
@media (max-width:480px){
  .pl-code{ font-size:0; padding:0 10px; }
  .pl-code b{ margin:0; font-size:13px; }
  .pl-top{ gap:8px; padding:10px; }
  .pl-top-r{ gap:6px; }
}
