/* Sneaky Gecko styles. Base pieces (buttons, sheets, lists) are shared with the other card-room games. */
:root {
  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 24px; --fs-2xl: 34px;

  /* palette */
  --gold: #e8b64a;
  --gold-hi: #f8dc8e;
  --gold-lo: #a8741a;
  --ink: #f4ecd8;
  --ink-dim: #c9b894;
  --panel: #1b1109;
  --panel-2: #2a190c;
  --good: #7ee2a0;
  --bad: #ff8f84;

  /* table theme (green felt default) */
  --felt-1: #9a2c3e; --felt-2: #681828; --felt-3: #350812;
  --rail-1: #8a5530; --rail-2: #5a3418; --rail-3: #2e1809;
  --brass: #d9a22f;
  --room-1: #2a190c; --room-2: #120a05;

  /* deck theme (classic) */
  --paper-1: #fffdf6; --paper-2: #efe6cf; --card-line: rgba(0,0,0,.35);
  --face-bg: #fff8e6;
  --c-S: #17171c; --c-C: #17171c; --c-H: #c2352b; --c-D: #c2352b;

  /* sizing */
  --cw: clamp(42px, min(12.5vw, 7.6vh), 72px);
  --ch: calc(var(--cw) * 1.4);
  --hw: clamp(52px, min(15.5vw, 9.6vh), 92px);
  --hand-h: calc(var(--hw) * 1.4 + 46px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--room-2); overscroll-behavior: none; }
body {
  font-family: var(--font-ui); color: var(--ink); touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
.hidden { display: none !important; }
.play { position: fixed; inset: 0; max-width: 640px; margin: 0 auto; overflow: hidden; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* =========================================================
   Buttons
   ========================================================= */
.primary {
  font-weight: 800; font-size: var(--fs-lg); letter-spacing: .02em; color: #3a2605; border: 0; border-radius: 16px; padding: 15px 18px;
  background: linear-gradient(#fbe39a, #e1a93a 55%, #c28a22); cursor: pointer; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(120,70,0,.35), 0 5px 0 #8e5f12, 0 12px 20px rgba(0,0,0,.4);
  transition: transform .08s, box-shadow .08s;
}
.primary:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #8e5f12, 0 6px 10px rgba(0,0,0,.4); }
.primary:disabled { filter: grayscale(.8) brightness(.7); }
.ghost {
  font-weight: 700; font-size: var(--fs-md); color: var(--ink); background: rgba(255,255,255,.05); border: 1px solid rgba(232,182,74,.45);
  border-radius: 14px; padding: 13px 16px; cursor: pointer; transition: background .15s, transform .08s;
}
.ghost:active { background: rgba(232,182,74,.18); transform: scale(.98); }
.chip-btn {
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink); background: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.2); border-radius: 11px; padding: 8px 11px; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.chip-btn:active { transform: translateY(1px); box-shadow: none; }
.chip-btn.small { padding: 6px 9px; font-size: 12px; }
.chip-btn:disabled { opacity: .35; }
.hintbtn:not(:disabled) { border-color: var(--gold); color: var(--gold-hi); }
.linkish { background: none; border: 0; color: #bfe3cd; text-decoration: underline; font-size: var(--fs-md); cursor: pointer; }

/* =========================================================
   Title + setup screens
   ========================================================= */
.title, .setup {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.14), transparent 55%),
    radial-gradient(ellipse at 50% 35%, var(--felt-1) 0%, var(--felt-2) 50%, var(--felt-3) 100%);
  padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom)); overflow-y: auto;
}
.title::before, .setup::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: var(--felt-noise);
}
.title::after, .setup::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0,0,0,.55) 100%);
}
.title > *, .setup > * { position: relative; z-index: 1; }
.title { align-items: center; justify-content: center; text-align: center; gap: 0; }
.logo {
  margin: 0; font-family: var(--font-display); font-size: clamp(38px, 12vw, 54px); line-height: .95; letter-spacing: -.5px; font-weight: 700;
  background: linear-gradient(#fff6d2, #f0c250 55%, #b57d1a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)) drop-shadow(0 8px 14px rgba(0,0,0,.4));
}
.logo small { display: block; margin-top: 8px; font-size: .48em; font-style: italic; font-weight: 400; letter-spacing: .02em; }
.menu-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(340px, 100%); }
.menu-row { display: flex; gap: 10px; }
.menu-row > * { flex: 1; }
.record { text-align: center; color: #a9d4ba; font-size: var(--fs-sm); margin: 16px 0 0; min-height: 1.2em; }
.resume-card {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 18px; color: #3a2605; border: 0; border-radius: 16px;
  background: linear-gradient(#fbe39a, #e1a93a 55%, #c28a22); cursor: pointer; text-align: left; font-size: var(--fs-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 5px 0 #8e5f12, 0 12px 20px rgba(0,0,0,.4);
}
.resume-card span { display: grid; gap: 2px; }
.resume-card small { font-size: 12px; opacity: .8; font-weight: 600; }
.resume-card b { font-size: 26px; }

.back-link { color: #bfe3cd; text-decoration: none; font-size: var(--fs-md); display: inline-block; padding: 4px 0; background: none; border: 0; cursor: pointer; text-align: left; }
.setup h2 { font-family: var(--font-display); font-size: var(--fs-2xl); margin: 10px 0 14px; color: #fff4d6; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button, .segmented button {
  font-weight: 700; color: #fff; background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.05)); border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.stepper button { width: 46px; height: 46px; font-size: 22px; }
.stepper output { min-width: 42px; text-align: center; font-size: var(--fs-xl); font-weight: 800; letter-spacing: 0; color: #fff; font-family: var(--font-display); }
.segmented { display: flex; gap: 8px; }
.segmented button { flex: 1; padding: 12px 0; font-size: var(--fs-md); }
.segmented button.on { background: linear-gradient(#fbe39a, #d9a22f); color: #3a2605; border-color: var(--gold); box-shadow: 0 2px 0 #8e5f12; }
.hint { margin: 0; font-size: var(--fs-sm); color: #9fcbb2; min-height: 1.2em; }
.friends { font-weight: 800; font-size: var(--fs-md); color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid rgba(232,182,74,.55); border-radius: 14px; padding: 13px; cursor: pointer; }
/* =========================================================
   Sheets
   ========================================================= */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.62); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet-body {
  width: 100%; max-width: 640px; max-height: 88dvh; display: flex; flex-direction: column; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(#241509, #150c05); border-top: 2px solid var(--gold); box-shadow: 0 -10px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1);
  animation: rise .3s cubic-bezier(.2,.9,.3,1.1);
}
.sheet-body::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 6px; min-height: 48px; }
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--fs-xl); color: #fff4d6; }
.sheet-content { overflow: auto; padding: 4px 18px 20px; }
.scroll-x { overflow-x: auto; }
.sheet-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.sheet-content th, .sheet-content td { padding: 6px 5px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.sheet-content th { color: var(--ink-dim); font-weight: 700; font-size: var(--fs-xs); position: sticky; top: 0; background: #1b1109; }
.sheet-content td:first-child, .sheet-content th:first-child { text-align: left; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rank-row.res { animation: slidein .4s cubic-bezier(.2,.9,.3,1) backwards; animation-delay: var(--d, 0ms); }
.rank-row.me { background: linear-gradient(90deg, rgba(232,182,74,.18), rgba(232,182,74,.04)); border-radius: 12px; }
@keyframes slidein { from { opacity: 0; transform: translateX(-20px); } }
.rank-row .n { width: 30px; font-weight: 800; color: var(--gold); font-size: var(--fs-lg); }
.rank-row .mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; flex: none; }
.mark.ok { background: linear-gradient(#2fa564, #1a6a3d); color: #fff; animation: popin .45s ease-out backwards; animation-delay: calc(var(--d, 0ms) + 250ms); box-shadow: 0 0 10px rgba(126,226,160,.5); }
.mark.no { background: linear-gradient(#a8382c, #6a1c14); color: #fff; }
@keyframes popin { from { transform: scale(0); } 70% { transform: scale(1.3); } }
.rank-row .nm { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .d { font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.rank-row .s { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.medal { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--font-display); font-weight: 900; font-size: 15px; color: #3a2605; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 4px rgba(0,0,0,.5); }
.medal.m1 { background: linear-gradient(#fbe39a, #c28a22); } .medal.m2 { background: linear-gradient(#f2f4f8, #98a2b3); } .medal.m3 { background: linear-gradient(#f0c09a, #a8642c); }
.leader { text-align: center; color: var(--ink-dim); margin: 14px 0 0; font-size: var(--fs-md); }
.sheet-actions { display: grid; gap: 10px; margin-top: 16px; position: sticky; bottom: -2px; padding-top: 12px; background: linear-gradient(rgba(21,12,5,0), #150c05 28%); }
.banner { text-align: center; font-family: var(--font-display); font-size: 34px; margin: 4px 0 10px; background: linear-gradient(#fff6d2, #f0c250, #b57d1a); -webkit-background-clip: text; background-clip: text; color: transparent; animation: bidpop .7s ease-out; }
.last-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 8px 0; }
.last-card { display: grid; gap: 6px; justify-items: center; font-size: 12px; color: var(--ink-dim); --cw: 58px; --ch: 81px; }
.last-card.w .card { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(232,182,74,.8); }
.last-card.w span { color: var(--gold-hi); font-weight: 800; }
.rules h3 { margin: 14px 0 4px; color: var(--gold); font-size: var(--fs-md); font-family: var(--font-display); }
.rules p, .rules li { font-size: 14px; line-height: 1.5; color: #e8dcc0; margin: 0 0 6px; }
.rules ul { margin: 0; padding-left: 18px; }
.code-big { text-align: center; font-family: var(--font-display); font-size: 48px; letter-spacing: .18em; margin: 4px 0 2px; background: linear-gradient(#fff6d2, #f0c250, #b57d1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.seat-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.seat-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; box-shadow: 0 0 8px var(--good); }
.seat-row .dot.off { background: #777; box-shadow: none; }
.seat-row .nm { flex: 1; font-weight: 700; }
.seat-row .tag { font-size: var(--fs-xs); color: var(--gold); letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.seat-row .avatar { width: 30px; height: 30px; margin: 0; border-width: 2px; }
.join-row { display: flex; gap: 8px; }
.join-row input { flex: 1; min-width: 0; font: inherit; font-size: 22px; letter-spacing: .2em; text-transform: uppercase; text-align: center; color: #fff; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 10px; -webkit-user-select: text; user-select: text; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; }
.mini-row .stepper button { width: 38px; height: 38px; font-size: 18px; }
.mini-row .stepper output { font-size: 20px; min-width: 32px; }
.mini-row .segmented button { padding: 8px 10px; font-size: 13px; }
.err { color: var(--bad); font-size: var(--fs-sm); min-height: 1.2em; text-align: center; margin: 8px 0 0; }

.avatar {
  position: relative; width: 50px; height: 50px; margin: 0 auto; border-radius: 50%; overflow: visible;
  background: radial-gradient(circle at 35% 28%, var(--c1), var(--c2)); border: 2.5px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 9px rgba(0,0,0,.55), inset 0 -4px 8px rgba(0,0,0,.25);
}
.avatar .av-svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: calc(var(--hand-h) + 78px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: 90%; padding: 10px 16px; border-radius: 14px; background: rgba(10,6,2,.94); border: 1px solid rgba(232,182,74,.6); color: var(--ink); font-size: var(--fs-sm); text-align: center; animation: bub 3.6s ease-out forwards; }
#turn-timer { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); transform: translateX(-50%); z-index: 40; padding: 4px 12px; border-radius: 999px; background: rgba(18,10,5,.8); color: #f4e6bf; font: 600 13px system-ui; border: 1px solid rgba(232,182,74,.4); pointer-events: none; }
#turn-timer.me { border-color: #e8b64a; color: #ffe39a; }
#turn-timer.low { background: #8f2a1c; color: #fff; border-color: #ff8a78; animation: tt 1s infinite; }
@keyframes tt { 50% { transform: translateX(-50%) scale(1.08); } }
/* light effects */
html[data-fx="low"] .table > .felt-fx { mix-blend-mode: normal; }
html[data-fx="low"] .seat.active .avatar, html[data-fx="low"] .dir-ring { animation: none; }
html[data-fx="low"] .sheet, html[data-fx="low"] .setup-card { backdrop-filter: none; }
html[data-fx="low"] .logo { filter: none; }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; } }
.hub-btn { text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; }

/* =========================================================
   Sneaky Gecko: palettes ("table" styles) and background
   ========================================================= */
:root {
  --lime: #8be05a; --lime-dk: #3f9a2e; --lime-lt: #dcf7ae;
  --felt-1: #1f7a44; --felt-2: #0f4f2c; --felt-3: #072816;
  --room-1: #0f3a22; --room-2: #061a0f;
  --tile: rgba(255,255,255,.07); --tile-line: rgba(220,247,174,.3);
}
html[data-table="jungle"] { --felt-1: #1f7a44; --felt-2: #0f4f2c; --felt-3: #072816; --room-1: #0f3a22; --room-2: #061a0f; --lime: #8be05a; }
html[data-table="dusk"] { --felt-1: #5b3fa3; --felt-2: #34216e; --felt-3: #150c36; --room-1: #261552; --room-2: #0d0720; --lime: #c9a8ff; --lime-dk: #6b43b8; --lime-lt: #eadfff; }
html[data-table="reef"] { --felt-1: #168a96; --felt-2: #0b5662; --felt-3: #04272e; --room-1: #0b3b45; --room-2: #031419; --lime: #62e0d6; --lime-dk: #1f8a86; --lime-lt: #c8f5ef; }
html[data-table="ember"] { --felt-1: #b4532c; --felt-2: #7a2f14; --felt-3: #3a1306; --room-1: #4a1d0c; --room-2: #1b0803; --lime: #ffb070; --lime-dk: #c2573a; --lime-lt: #ffe0d2; }
html[data-table="chameleon"] { --felt-1: #1f7a44; --felt-2: #0f4f2c; --felt-3: #072816; --room-1: #0f3a22; --room-2: #061a0f; }

body { background: var(--room-2); }
.play { overflow: hidden; }
.bgfx {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.16), transparent 55%),
    radial-gradient(ellipse at 50% 40%, var(--felt-1) 0%, var(--felt-2) 52%, var(--felt-3) 100%);
}
.bgfx::before { content: ""; position: absolute; inset: 0; background-image: var(--scales); background-size: 46px 40px; opacity: 1; }
.bgfx::after { content: ""; position: absolute; inset: 0; background-image: var(--felt-noise); mix-blend-mode: overlay; opacity: .45; }
html[data-table="chameleon"] .bgfx { animation: shift 36s linear infinite; }
@keyframes shift { to { filter: hue-rotate(360deg); } }
.screen { z-index: 1; }
.title, .setup { background: none; }
.title::before, .title::after { display: none; }

/* =========================================================
   Title
   ========================================================= */
.title { align-items: center; justify-content: center; text-align: center; padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; }
.mascot { width: min(48vw, 200px); aspect-ratio: 200 / 224; margin-bottom: 4px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.45)); animation: bob 4s ease-in-out infinite; }
.mascot svg, .gecko { display: block; width: 100%; height: 100%; }
html[data-table="chameleon"] .mascot { animation: bob 4s ease-in-out infinite, shift 12s linear infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
.logo { font-size: clamp(38px, 12vw, 58px); background: linear-gradient(#f4ffd8, var(--lime) 55%, var(--lime-dk)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo small { font-size: .3em; letter-spacing: .04em; margin-top: 10px; background: none; -webkit-text-fill-color: var(--lime-lt); }
.join-inline { display: flex; gap: 8px; }
.join-inline input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; letter-spacing: .2em; text-align: center; text-transform: uppercase; color: #fff; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 10px; -webkit-user-select: text; user-select: text; }
.join-inline input::placeholder { letter-spacing: .08em; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.45); }
.record { color: var(--lime-lt); }
.fineprint { margin: 10px 0 0; font-size: 11px; color: rgba(220,247,174,.62); max-width: 300px; }
.back-link { color: var(--lime-lt); }
.menu-col { margin-top: 18px; }

/* =========================================================
   Game screen
   ========================================================= */
.game { background: none; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 10px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; z-index: 5; background: linear-gradient(rgba(6,26,15,.92), rgba(6,26,15,.8)); border-bottom: 1px solid rgba(220,247,174,.2); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.round-info { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.round-info strong { font-family: var(--font-display); font-size: var(--fs-lg); white-space: nowrap; }
.round-info span { font-size: 12px; color: var(--lime-lt); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timebar { height: 4px; background: rgba(0,0,0,.35); flex: none; }
.timebar i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--lime), #f3c94f); transition: width 1s linear; }
.timebar.low i { background: linear-gradient(90deg, #ff8f84, #e24a3c); }
.timebar.off { visibility: hidden; }

/* players strip */
.players { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 4px; padding: 8px 6px 4px; flex: none; }
.pl { position: relative; width: 62px; text-align: center; transition: opacity .3s, transform .3s; }
.pl .avatar { width: 40px; height: 40px; border-width: 2px; }
.pl .nm { display: block; margin-top: 3px; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; }
.pl .sc { display: block; font-size: 10px; color: var(--lime-lt); opacity: .85; line-height: 1.1; }
.pl.off { opacity: .45; }
.pl.turn .avatar { box-shadow: 0 0 0 3px var(--gold), 0 0 18px 4px rgba(232,182,74,.8); animation: pulse 1.1s ease-in-out infinite; }
.pl.me .nm { color: var(--gold-hi); }
.pl .badge { position: absolute; right: 3px; top: -3px; z-index: 3; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 900; color: #0d2a1a; background: linear-gradient(#e8ffc8, var(--lime)); border: 1.5px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.5); animation: popin .35s ease-out; }
.pl .badge.gk { background: linear-gradient(#e8ffc8, var(--lime)); font-size: 12px; }
.pl .badge.no { background: linear-gradient(#ffb0a8, #e24a3c); color: #fff; }
.pl.gecko .avatar { box-shadow: 0 0 0 3px var(--lime), 0 0 20px 5px color-mix(in srgb, var(--lime) 80%, transparent); }
@keyframes popin { from { transform: scale(0); } 70% { transform: scale(1.3); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 28px 9px rgba(232,182,74,.95); } }

/* stage + dock */
.stage { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 14px; -webkit-overflow-scrolling: touch; }
.stage > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.dock { flex: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; background: linear-gradient(rgba(6,26,15,.82), rgba(6,26,15,.96)); border-top: 1px solid rgba(220,247,174,.22); z-index: 4; }
.dock > * { max-width: 560px; width: 100%; margin: 0 auto; }
.dock .wait { text-align: center; color: var(--lime-lt); font-size: var(--fs-sm); font-style: italic; min-height: 20px; }
.dock .row { display: flex; gap: 8px; align-items: stretch; }
.dock .row > .primary { flex: 1; }
.dock .primary { padding: 13px 16px; font-size: 17px; }
.dock .ghost { padding: 12px 14px; }
.dock .primary.lime { color: #0d2a1a; background: linear-gradient(#e8ffc8, var(--lime) 55%, var(--lime-dk)); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 5px 0 #1f5a14, 0 12px 20px rgba(0,0,0,.4); }
.dock .primary.lime:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #1f5a14; }
.clue-input { flex: 1; min-width: 0; font: inherit; font-size: 20px; font-weight: 700; color: #fff; background: rgba(0,0,0,.35); border: 2px solid var(--lime); border-radius: 14px; padding: 11px 14px; -webkit-user-select: text; user-select: text; text-transform: none; letter-spacing: 0; }
.clue-input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 40%, transparent); }
.mini-timer { text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .04em; color: var(--gold-hi); }
.mini-timer.low { color: #ff8f84; animation: tt 1s infinite; }
@keyframes tt { 50% { transform: scale(1.12); } }

/* category plate + twist */
.plate-cat { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0 8px; }
.plate-cat .ic { font-size: 34px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.plate-cat h2 { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 7vw, 30px); line-height: 1.05; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.plate-cat small { display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
.twist { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.35; text-align: center; color: #3a2605; font-weight: 700; background: linear-gradient(#fbe39a, #e1a93a); box-shadow: 0 3px 0 #8e5f12; }
.twist b { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; display: block; opacity: .8; }

/* the 16-word board */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tile {
  position: relative; display: grid; place-items: center; text-align: center; min-height: 58px; padding: 6px 4px; border-radius: 12px; overflow: hidden;
  font: 800 12.5px/1.15 var(--font-ui); color: #f3fbe6; letter-spacing: .01em; word-break: break-word; hyphens: auto;
  background: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.04)), var(--scales) center / 46px 40px; background-color: rgba(0,0,0,.32);
  border: 1.5px solid var(--tile-line); box-shadow: 0 3px 0 rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .2s, background-color .2s, border-color .2s; -webkit-user-select: none; user-select: none;
}
.tile .tw { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.tile.sel { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(232,182,74,.7); transform: translateY(-3px) scale(1.04); z-index: 2; }
.tile.secret { border-color: var(--lime); background-color: color-mix(in srgb, var(--lime) 40%, #0a2a12); box-shadow: 0 0 0 3px var(--lime), 0 0 22px 4px color-mix(in srgb, var(--lime) 85%, transparent); animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 3px var(--lime), 0 0 34px 10px color-mix(in srgb, var(--lime) 95%, transparent); } }
.tile.camo { animation: camo 1.4s ease-in-out infinite; }
@keyframes camo { 50% { background-color: color-mix(in srgb, var(--lime) 18%, #000); border-color: rgba(220,247,174,.6); } }
.tile.right { border-color: #7ee2a0; background-color: rgba(47,165,100,.5); box-shadow: 0 0 0 3px #7ee2a0, 0 0 18px rgba(126,226,160,.8); animation: pop .5s ease-out; }
.tile.wrong { border-color: #ff8f84; background-color: rgba(168,56,44,.55); box-shadow: 0 0 0 3px #ff8f84; }
.tile.dim { opacity: .45; }
.board.pick .tile { cursor: pointer; }
.board.pick .tile:active { transform: scale(.96); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } }

/* peek button + role banner */
.peek { -webkit-touch-callout: none; width: 100%; margin-top: 10px; padding: 14px; font-size: 16px; font-weight: 800; color: #0d2a1a; border: 0; border-radius: 16px; cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: none;
  background: linear-gradient(#e8ffc8, var(--lime) 55%, var(--lime-dk)); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 5px 0 #1f5a14, 0 12px 20px rgba(0,0,0,.35); }
.peek.on { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 0 #1f5a14; }
.role { margin-top: 10px; padding: 12px 14px; border-radius: 16px; text-align: center; font-size: 15px; line-height: 1.35; background: rgba(0,0,0,.45); border: 1.5px solid var(--lime); animation: popin2 .25s ease-out; }
.role b { color: var(--lime); font-family: var(--font-display); font-size: 1.25em; }
.role.gk { border-color: var(--gold); background: linear-gradient(rgba(232,182,74,.25), rgba(0,0,0,.5)); }
.role.gk b { color: var(--gold-hi); }
@keyframes popin2 { from { opacity: 0; transform: scale(.94); } }

/* reveal card */
.flip { perspective: 900px; margin: 8px auto 6px; width: min(92%, 340px); aspect-ratio: 5 / 6; cursor: pointer; }
.flip-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.2,.4,1); }
.flip.up .flip-in { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; display: grid; place-items: center; text-align: center; padding: 18px; overflow: hidden; box-shadow: 0 16px 30px rgba(0,0,0,.55), inset 0 0 0 3px rgba(255,255,255,.3); }
.face.front { background: radial-gradient(circle at 50% 35%, var(--lime), var(--lime-dk) 75%), var(--lime-dk); color: #0d2a1a; }
.face.front::before { content: ""; position: absolute; inset: 0; background-image: var(--scales); background-size: 46px 40px; filter: invert(1) opacity(.45); }
.face.front > * { position: relative; }
.face.front .q { font-family: var(--font-display); font-size: 58px; line-height: 1; margin-bottom: 4px; }
.face.front p { margin: 0; font-weight: 800; font-size: 16px; }
.face.front small { display: block; margin-top: 6px; font-size: 12px; opacity: .75; font-weight: 600; }
.face.back { transform: rotateY(180deg); background: linear-gradient(#fffdf0, #f3ecd2); color: #1d2b12; align-content: center; gap: 4px; }
.face.back.gk { background: linear-gradient(#f2ffd8, #c9f09a); }
.face.back .kicker { font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #5b7a2a; }
.face.back h3 { margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 1; word-break: break-word; }
.face.back .gecko { width: 70%; margin: 0 auto; }
.face.back p { margin: 4px 0 0; font-size: 14px; line-height: 1.35; color: #394d22; }
.face.back .cat { margin-top: 6px; font-size: 13px; font-weight: 800; color: #5b7a2a; }

/* clue list */
.clues { display: grid; gap: 6px; margin-top: 12px; }
.clue-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.08); transition: background .2s, border-color .2s; }
.clue-row .avatar { width: 32px; height: 32px; margin: 0; border-width: 2px; flex: none; }
.clue-row .who { width: 74px; flex: none; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clue-row .say { flex: 1; min-width: 0; padding: 6px 12px; border-radius: 14px 14px 14px 4px; background: #fff4d6; color: #2b1c08; font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: bub2 .35s cubic-bezier(.2,.9,.3,1.3); }
.clue-row .say.skip { background: rgba(255,255,255,.12); color: var(--lime-lt); font-style: italic; font-weight: 600; font-size: 14px; }
.clue-row .say.later { background: none; color: rgba(220,247,174,.5); font-weight: 600; font-size: 15px; letter-spacing: .3em; padding-left: 4px; animation: none; }
.clue-row.now { background: rgba(232,182,74,.18); border-color: var(--gold); }
.clue-row.me .who { color: var(--gold-hi); }
@keyframes bub2 { from { opacity: 0; transform: translateX(-12px) scale(.8); } }
.section-h { margin: 14px 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); text-align: center; }
.tipline { margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--lime-lt); opacity: .9; }

/* voting */
.vote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.vcard { position: relative; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 8px; padding: 8px; border-radius: 16px; text-align: left; color: var(--ink); cursor: pointer; font: inherit;
  background: linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.03)); border: 1.5px solid rgba(255,255,255,.2); box-shadow: 0 3px 0 rgba(0,0,0,.4); transition: transform .12s, border-color .15s, box-shadow .15s; }
.vcard .avatar { width: 44px; height: 44px; margin: 0; border-width: 2px; }
.vcard .nm { display: block; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard .cl { display: block; font-size: 12px; color: var(--lime-lt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard.sel { border-color: #ff8f84; box-shadow: 0 0 0 3px #ff8f84, 0 0 22px rgba(255,120,110,.75); transform: translateY(-2px); background: linear-gradient(rgba(226,74,60,.3), rgba(226,74,60,.1)); }
.vcard.me { opacity: .4; cursor: default; }
.vcard.locked { cursor: default; }
.vcard.voted::after { content: "🔒"; position: absolute; right: 8px; top: 6px; font-size: 14px; }
.vcard .gk-pin { position: absolute; right: 6px; top: 4px; font-size: 18px; }

/* result */
.verdict { text-align: center; margin: 6px 0 10px; }
.verdict h2 { margin: 0; font-family: var(--font-display); font-size: clamp(28px, 9vw, 40px); line-height: 1.05; background: linear-gradient(#f4ffd8, var(--lime) 55%, var(--lime-dk)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); animation: bidpop .7s ease-out; }
.verdict p { margin: 4px 0 0; color: var(--lime-lt); font-size: 15px; }
@keyframes bidpop { 0% { transform: scale(1.5); opacity: 0; } 60% { transform: scale(.95); } 100% { transform: scale(1); opacity: 1; } }
.gk-reveal { display: flex; justify-content: center; gap: 14px; margin: 30px 0 10px; flex-wrap: wrap; }
.gk-card { text-align: center; width: 110px; animation: dropin .6s cubic-bezier(.2,1.2,.4,1) backwards; animation-delay: var(--d, 0ms); }
.gk-card .avatar { width: 76px; height: 76px; border-width: 3px; box-shadow: 0 0 0 4px var(--lime), 0 0 26px 6px color-mix(in srgb, var(--lime) 85%, transparent); }
.gk-card .gecko-hat { position: absolute; left: 50%; top: -20px; width: 44px; transform: translateX(-50%) rotate(-10deg); z-index: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.gk-card b { display: block; margin-top: 6px; font-size: 15px; }
.gk-card small { display: block; font-size: 12px; color: var(--lime-lt); }
@keyframes dropin { from { opacity: 0; transform: translateY(-40px) scale(.6); } }
.secret-line { text-align: center; margin: 6px 0 8px; font-size: 14px; color: var(--lime-lt); }
.secret-line b { display: inline-block; padding: 3px 12px; border-radius: 99px; margin-left: 4px; color: #0d2a1a; background: linear-gradient(#e8ffc8, var(--lime)); font-size: 16px; }
.vote-lines { display: grid; gap: 5px; margin-top: 4px; }
.vote-line { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 8px; border-radius: 10px; background: rgba(0,0,0,.22); }
.vote-line .avatar { width: 24px; height: 24px; margin: 0; border-width: 1.5px; flex: none; }
.vote-line .arrow { color: var(--lime); font-weight: 900; }
.vote-line .hit { margin-left: auto; font-size: 11px; font-weight: 900; color: #0d2a1a; background: var(--lime); border-radius: 99px; padding: 1px 8px; }
.pts-table { margin-top: 6px; }
.rank-row .n { color: var(--lime); }
.rank-row.res .add { font-size: 13px; font-weight: 800; color: var(--lime); min-width: 34px; text-align: right; }
.rank-row .tagr { font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #0d2a1a; background: var(--lime); border-radius: 99px; padding: 1px 7px; margin-left: 6px; }

/* waiting / spinner */
.centerbox { text-align: center; padding: 16px 8px; color: var(--lime-lt); }
.centerbox .big { font-family: var(--font-display); font-size: 26px; color: #fff; margin-bottom: 6px; }
.dots i { display: inline-block; width: 8px; height: 8px; margin: 0 3px; border-radius: 50%; background: var(--lime); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%,80%,100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* reactions */
.react-bar { display: flex; justify-content: center; gap: 6px; }
.react-bar button { width: 44px; height: 40px; font-size: 21px; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.react-bar button:active { transform: translateY(1px) scale(.94); }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.floater { position: absolute; font-size: 34px; will-change: transform, opacity; animation: floatup 1.9s ease-out forwards; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.floater small { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font: 800 10px var(--font-ui); color: #fff; background: rgba(0,0,0,.6); border-radius: 99px; padding: 1px 6px; white-space: nowrap; }
@keyframes floatup { 0% { opacity: 0; transform: translateY(0) scale(.5); } 15% { opacity: 1; transform: translateY(-14px) scale(1.2); } 100% { opacity: 0; transform: translateY(-120px) scale(1); } }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 25; }

/* lobby extras */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.chip { font: 700 13px var(--font-ui); color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); border-radius: 99px; padding: 7px 12px; cursor: pointer; }
.chip.on { color: #0d2a1a; background: linear-gradient(#e8ffc8, var(--lime)); border-color: #fff; }
.lobby-note { text-align: center; color: var(--ink-dim); font-size: 13px; margin: 8px 0 0; }
.mini-row select { font-size: 16px; padding: 6px 8px; border-radius: 8px; }
.deck-form { display: grid; gap: 8px; margin-top: 6px; }
.deck-form input, .deck-form textarea { width: 100%; font: inherit; font-size: 16px; color: #fff; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 10px 12px; -webkit-user-select: text; user-select: text; }
.deck-form textarea { min-height: 220px; resize: vertical; line-height: 1.4; }
.deck-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.deck-row span { flex: 1; font-weight: 700; }
.toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
.howtip { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; margin: 10px 0; }
.howtip .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #0d2a1a; background: var(--lime); }
.howtip p { margin: 0; font-size: 14px; line-height: 1.45; color: #e8f2d8; }
.howtip b { color: var(--lime); }

@media (max-width: 380px) {
  .tile { font-size: 11.5px; min-height: 54px; }
  .pl { width: 56px; } .pl .avatar { width: 36px; height: 36px; }
  .clue-row .who { width: 60px; }
  .vote-grid { gap: 6px; } .vcard { grid-template-columns: 38px 1fr; padding: 6px; } .vcard .avatar { width: 38px; height: 38px; }
}
@media (max-height: 640px) { .mascot { width: 130px; } .face.front .q { font-size: 44px; } .flip { width: min(70%, 260px); } }
@media (min-width: 700px) { .tile { font-size: 14px; min-height: 66px; } .pl { width: 74px; } .pl .avatar { width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .bgfx, .mascot, .tile.secret, .tile.camo { animation: none !important; } }

.mini-row select { color: #fff; background: #2a190c; border: 1px solid rgba(232,182,74,.45); max-width: 55%; }
.mini-row .chk { width: 24px; height: 24px; accent-color: var(--lime); flex: none; }
.sheet-actions .menu-row { display: flex; gap: 10px; }
.sheet-actions .menu-row > * { flex: 1; }

.tile.l1 { font-size: 11.5px; } .tile.l2 { font-size: 10.5px; letter-spacing: -.01em; } .tile.l3 { font-size: 9.5px; letter-spacing: -.02em; }
.clue-row { padding: 4px 8px; } .clue-row .avatar { width: 28px; height: 28px; } .clue-row .say { padding: 4px 12px; font-size: 16px; }
.stage, .play { overflow-x: hidden; }
