:root {
  --bg: #060611;
  --bg-2: #0c0820;
  --panel: rgba(14, 16, 34, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --ink: #fbf8ff;
  --muted: #bbb4dd;
  --muted-2: #8d86af;
  --pink: #ff3fd7;
  --cyan: #39f6ff;
  --purple: #8d5cff;
  --yellow: #ffe45c;
  --green: #5dffb3;
  --danger: #ff6767;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.36), 0 0 32px rgba(57, 246, 255, 0.12), 0 0 58px rgba(255, 63, 215, 0.1);
  --card-shadow: 0 18px 50px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 63, 215, 0.22), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(57, 246, 255, 0.18), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(141, 92, 255, 0.14), transparent 34%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 48%, #080918 100%);
  overflow-x: hidden;
}
body::selection { background: var(--pink); color: #fff; }
button, input { font: inherit; }
button { color: inherit; }
.ambient, .bg-grid, .scanlines { pointer-events: none; position: fixed; inset: 0; z-index: -2; }
.ambient-one, .ambient-two { width: 42vmax; height: 42vmax; border-radius: 50%; filter: blur(50px); opacity: 0.26; animation: floatGlow 10s ease-in-out infinite alternate; }
.ambient-one { inset: 8% auto auto -14%; background: var(--pink); }
.ambient-two { inset: auto -14% 3% auto; background: var(--cyan); animation-delay: -3s; }
.bg-grid { z-index: -1; background-image: linear-gradient(rgba(57,246,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,63,215,0.08) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, transparent, black 11%, black 80%, transparent); }
.scanlines { z-index: 0; background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, transparent 1px 7px); mix-blend-mode: overlay; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-180%); padding: 10px 14px; border-radius: 999px; background: var(--cyan); color: #06111a; font-weight: 900; }
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; max-width: 1340px; margin: 0 auto; padding: 28px 18px 12px; }
.brand-lockup { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 74px; height: 74px; border: 2px solid var(--cyan); border-radius: 24px; color: var(--yellow); font-size: 28px; font-weight: 1000; letter-spacing: -2px; background: linear-gradient(135deg, rgba(255,63,215,0.32), rgba(57,246,255,0.2)); box-shadow: var(--shadow); text-shadow: 0 0 16px var(--yellow); }
.header-actions, .button-row, .section-title-row, .phase-header, .turn-meta { display: flex; align-items: center; gap: 12px; }
.header-actions { flex-wrap: wrap; justify-content: flex-end; gap: 10px 14px; }
/* Grouped header: navigation, table settings, and utilities read as three
   distinct clusters instead of one long undifferentiated button row. */
.header-cluster { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-cluster + .header-cluster { position: relative; padding-left: 14px; }
.header-cluster + .header-cluster::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 20px; width: 1px; background: rgba(255,255,255,0.16); }
/* Icon-only toggles: tidy, roughly-square, centered pills on one tight row. */
.header-settings { gap: 6px; }
.header-settings .icon-btn, #text-size-toggle {
  font-size: 15px;
  line-height: 1;
  padding: 9px;
  min-width: 40px;
  justify-content: center;
  text-align: center;
}
.icon-btn.strong { background: linear-gradient(180deg, rgba(141,92,255,0.35), rgba(141,92,255,0.14)); border-color: rgba(141,92,255,0.5); }
@media (max-width: 760px) {
  .header-cluster + .header-cluster { padding-left: 0; }
  .header-cluster + .header-cluster::before { display: none; }
  .header-cluster { gap: 6px; }
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(28px, 5vw, 68px); line-height: 0.9; letter-spacing: -3px; text-shadow: 0 0 22px rgba(255,63,215,0.4); }
h2 { font-size: clamp(30px, 4.4vw, 64px); line-height: 0.96; letter-spacing: -2.6px; margin-bottom: 14px; }
h3 { font-size: clamp(20px, 2vw, 26px); margin-bottom: 12px; line-height: 1.1; }
.subtitle, .muted, .fine-print, .helper-text { color: var(--muted); }
.fine-print, .helper-text { font-size: 13px; line-height: 1.55; }
.eyebrow, .kicker, .card-label { color: var(--cyan); font-size: 12px; font-weight: 1000; letter-spacing: 0.16em; text-transform: uppercase; }
.app-shell { position: relative; z-index: 1; width: min(1340px, calc(100% - 28px)); margin: 0 auto 70px; }
.screen { display: none; animation: screenIn 260ms ease both; }
.screen.active { display: block; }
.panel { border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)), var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.glow-panel { position: relative; overflow: hidden; }
.glow-panel::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, rgba(255,63,215,0.3), transparent 32%, rgba(57,246,255,0.28)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; padding: 1px; }
.setup-hero { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 26px; align-items: center; padding: clamp(24px, 4vw, 48px); }
.hero-copy p:not(.kicker) { max-width: 760px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.hero-metrics, .final-highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-metrics span, .final-highlights span, .status-chip, .judge-pill, .mode-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(255,255,255,0.14); border-radius: 999px; background: rgba(255,255,255,0.07); color: var(--muted); font-size: 13px; font-weight: 800; }
.hero-metrics strong, .final-highlights strong { color: var(--yellow); }
.sample-table { position: relative; min-height: 360px; display: grid; place-items: center; perspective: 1200px; }
.card { position: relative; width: min(100%, 340px); min-height: 238px; padding: 24px; border-radius: 26px; box-shadow: var(--card-shadow); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 16%, rgba(255,255,255,0.18), transparent 20%), linear-gradient(135deg, rgba(255,255,255,0.08), transparent 44%); pointer-events: none; }
.card p { position: relative; margin: 24px 0 0; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -1px; font-weight: 950; }
.card-label { position: relative; display: inline-flex; }
.prompt-card { color: #060713; background: linear-gradient(145deg, #fffaf7, #ded9ff); }
.prompt-card .card-label { color: #6a3dce; }
.answer-card { color: #f8f6ff; background: linear-gradient(145deg, #11142d 0%, #211038 44%, #0a1c2a 100%); border: 1px solid rgba(57,246,255,0.26); }
.answer-card .card-label { color: var(--cyan); }
.tilt-left { transform: rotate(-8deg) translate(-58px, 8px); }
.tilt-right { position: absolute; transform: rotate(8deg) translate(68px, 54px); }
.coin-orbit { position: absolute; right: 8%; top: 8%; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--yellow); background: rgba(255,228,92,0.12); box-shadow: 0 0 30px rgba(255,228,92,0.3); animation: orbitBob 2.6s ease-in-out infinite; }
.coin-orbit span { font-weight: 1000; color: var(--yellow); text-shadow: 0 0 12px var(--yellow); }
.resume-banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; margin-top: 18px; border-color: rgba(93,255,179,0.3); }
.hidden { display: none !important; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 0.52fr); gap: 18px; margin-top: 18px; }
.setup-panel { padding: 24px; }
.setup-grid .players-panel { grid-column: 1 / 2; }
.setup-grid .rules-panel { grid-column: 2 / 3; grid-row: 1 / span 3; align-self: start; position: sticky; top: 18px; }
.section-title-row { justify-content: space-between; align-items: flex-start; }
.section-title-row h3 { margin-bottom: 0; }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 18px; }
.field-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.055); }
.field-card span { color: var(--muted); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.field-card strong { color: var(--yellow); }
.field-card small { color: var(--muted-2); }
input[type="text"], input[type="number"] { width: 100%; border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; padding: 13px 14px; color: var(--ink); background: rgba(4,5,14,0.72); outline: none; }
input[type="text"]:focus, input[type="number"]:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(57,246,255,0.12); }
input[type="range"] { width: 100%; accent-color: var(--pink); }
.mode-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.mode-pill { cursor: pointer; color: var(--ink); }
.mode-pill:hover, .mode-pill.selected { border-color: var(--cyan); transform: translateY(-1px); color: var(--yellow); }
.pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.pack-card { position: relative; min-height: 190px; display: grid; align-content: start; gap: 9px; padding: 18px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.055); cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.pack-card:hover { transform: translateY(-3px); border-color: rgba(57,246,255,0.44); }
.pack-card.selected { background: rgba(57,246,255,0.08); border-color: rgba(57,246,255,0.45); }
.pack-card input { position: absolute; opacity: 0; pointer-events: none; }
.pack-card strong { font-size: 17px; }
.pack-card small { color: var(--muted); line-height: 1.45; }
.pack-card em { color: var(--yellow); font-style: normal; font-size: 12px; font-weight: 900; }
.pack-icon, .avatar, .privacy-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(135deg, rgba(255,63,215,0.24), rgba(57,246,255,0.16)); border: 1px solid rgba(255,255,255,0.16); color: var(--yellow); font-weight: 1000; box-shadow: 0 0 18px rgba(255,63,215,0.14); }
.player-list { display: grid; gap: 10px; margin-top: 16px; }
.player-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.1); }
.rules-list { padding-left: 21px; color: var(--muted); line-height: 1.62; }
.rules-list li { margin-bottom: 10px; }
.rules-list strong { color: var(--ink); }
.start-btn { width: 100%; margin-top: 18px; }
.btn, .icon-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 1000; letter-spacing: 0.01em; cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease, border-color 140ms ease; user-select: none; }
.btn:hover, .icon-btn:hover { transform: translateY(-1px); }
.btn:active, .icon-btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.primary { color: #080713; background: linear-gradient(135deg, var(--yellow), #ff9ff0 55%, var(--cyan)); box-shadow: 0 0 26px rgba(255,63,215,0.18), 0 0 28px rgba(57,246,255,0.12); }
.secondary { color: #06111a; background: var(--cyan); }
.ghost, .icon-btn { color: var(--ink); border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.07); }
.small { padding: 9px 12px; font-size: 13px; }
.tight { gap: 8px; }
.danger { color: #ffd9d9; border-color: rgba(255,103,103,0.34); }
.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; }
.game-topbar h2 { margin-bottom: 4px; }
.turn-strip { padding: 14px 18px; margin-top: 14px; }
.turn-meta { justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.judge-pill { border-color: rgba(255,228,92,0.34); color: var(--yellow); }
.progress-track { height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--cyan)); transition: width 220ms ease; }
.game-layout { display: grid; grid-template-columns: minmax(280px, 0.32fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.scoreboard-panel { padding: 20px; position: sticky; top: 18px; }
.scoreboard { display: grid; gap: 10px; margin-top: 16px; }
.score-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px; background: rgba(255,255,255,0.055); }
.score-row.leader { border-color: rgba(255,228,92,0.38); background: rgba(255,228,92,0.07); }
.score-row.judge { border-color: rgba(57,246,255,0.32); }
.score-rank { color: var(--muted-2); font-weight: 1000; }
.score-name { font-weight: 950; }
.score-points { color: var(--yellow); font-weight: 1000; }
.score-meter { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.score-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.turn-order { display: grid; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.turn-order span { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.045); }
.turn-order em { color: var(--ink); font-style: normal; font-weight: 850; text-align: right; }
.play-area { display: grid; gap: 18px; }
.big-card { width: 100%; min-height: 250px; }
.big-card p { font-size: clamp(28px, 4.2vw, 58px); }
.phase { display: none; padding: 24px; }
.phase.active-phase { display: block; animation: screenIn 240ms ease both; }
.privacy-panel { text-align: center; padding: clamp(28px, 4vw, 54px); }
.privacy-icon { margin: 0 auto 16px; width: 68px; height: 68px; border-radius: 22px; font-size: 28px; }
.privacy-panel h3 { font-size: clamp(24px, 3vw, 38px); }
.hand-grid, .submission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 18px; }
.play-card-button { position: relative; min-height: 188px; padding: 20px; border: 1px solid rgba(57,246,255,0.22); border-radius: 24px; color: var(--ink); background: linear-gradient(145deg, #11142d 0%, #211038 48%, #0a1c2a 100%); box-shadow: var(--card-shadow); text-align: left; font-size: 20px; line-height: 1.14; font-weight: 950; cursor: pointer; overflow: hidden; }
.play-card-button::before { content: "$MEMO CARD"; display: block; margin-bottom: 16px; color: var(--cyan); font-size: 11px; font-weight: 1000; letter-spacing: 0.14em; }
.play-card-button:hover, .play-card-button.selected { transform: translateY(-4px) rotate(-0.5deg); border-color: var(--yellow); box-shadow: 0 20px 60px rgba(0,0,0,0.42), 0 0 30px rgba(255,228,92,0.16); }
/* Selected: a readable highlight - tinted dark body, bright ring, light text.
   The text must stay legible, so never fill the card with a solid bright color. */
.play-card-button.selected { background: linear-gradient(145deg, #1d1636 0%, #2c1a3f 48%, #10202f 100%); border-color: var(--yellow); box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 0 2px rgba(255,228,92,0.55), 0 0 34px rgba(255,228,92,0.22); }
.play-card-button.selected, .play-card-button.selected::before { color: var(--ink); }
.play-card-button.selected::after { content: "Selected"; position: absolute; inset: auto; top: 14px; right: 14px; bottom: auto; left: auto; width: auto; height: auto; padding: 6px 10px; border-radius: 999px; background: var(--yellow); color: #110b16; font-size: 11px; font-weight: 1000; }
.submission-button::before { content: "ANONYMOUS SUBMISSION"; }

/* ---- House Rules picker --------------------------------------------------- */
.house-rules { margin-top: 14px; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 4px 14px; background: rgba(255,255,255,0.03); }
.house-rules > summary { cursor: pointer; padding: 10px 0; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 10px; }
.house-rules > summary::-webkit-details-marker { display: none; }
.house-rules > summary::before { content: '▸'; opacity: 0.6; transition: transform 160ms ease; }
.house-rules[open] > summary::before { transform: rotate(90deg); }
.house-rules-hint { font-size: 12px; font-weight: 600; opacity: 0.55; }
.house-rules-grid { display: grid; gap: 8px; padding: 6px 0 12px; }
.house-rule { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); cursor: pointer; }
.house-rule:hover { border-color: rgba(141,92,255,0.4); }
.house-rule input { margin-top: 3px; }
.house-rule span { display: grid; gap: 1px; }
.house-rule small { opacity: 0.66; font-size: 12px; }

/* ---- Judge Performance Mode ---------------------------------------------- */
.judge-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.judge-tools .hidden { display: none; }
.submission-grid.perform-mode .perform-card { display: flex; flex-direction: column; justify-content: flex-start; cursor: default; }
.perform-card.facedown { align-items: center; justify-content: center; text-align: center; background: linear-gradient(150deg, #140f2e 0%, #1c1140 55%, #0b1626 100%); border-style: dashed; border-color: rgba(141,92,255,0.4); }
.perform-card.facedown::before { content: ""; margin: 0; }
.perform-back { font-size: 15px; font-weight: 1000; letter-spacing: 0.06em; color: var(--muted); }
.perform-card.revealed { animation: perform-flip 380ms ease both; }
@keyframes perform-flip { from { transform: rotateY(90deg); opacity: 0; } to { transform: rotateY(0); opacity: 1; } }
.perform-card.finalist { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,228,92,0.5), 0 0 26px rgba(255,228,92,0.2); }
.perform-text { margin: 0; font-size: 20px; line-height: 1.16; font-weight: 950; }
.perform-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.perform-actions .btn { flex: 1; }
/* Mic mode: enlarge the reading text so the judge can perform to the room. */
.submission-grid.mic-mode .perform-text,
.submission-grid.mic-mode .submission-button { font-size: 26px; line-height: 1.22; }
@media (prefers-reduced-motion: reduce) { .perform-card.revealed { animation: none; } }
.sticky-action { position: sticky; bottom: 12px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 12px; border: 1px solid rgba(255,255,255,0.14); border-radius: 22px; background: rgba(7,7,19,0.88); backdrop-filter: blur(16px); }
#selected-card-label { color: var(--muted); font-weight: 850; }
.result-panel { text-align: center; }
.winner-card-slot { display: grid; place-items: center; margin: 18px 0; }
.winner-card-slot .card { width: min(100%, 460px); text-align: left; }
.winner-reveal { color: var(--muted); }
.final-grid { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.7fr); gap: 18px; align-items: start; }
.final-copy, .receipt { padding: clamp(24px, 4vw, 42px); }
.receipt { border-color: rgba(255,228,92,0.28); background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04)), radial-gradient(circle at 30% 10%, rgba(255,228,92,0.12), transparent 34%), rgba(14,16,34,0.88); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.receipt h3 { color: var(--yellow); text-align: center; letter-spacing: 0.08em; text-transform: uppercase; }
.receipt-line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.16); }
.receipt-line span:first-child { color: var(--muted); }
.receipt-line span:last-child { text-align: right; font-weight: 900; }
.toast { position: fixed; left: 50%; bottom: 18px; z-index: 20; transform: translate(-50%, 120%); max-width: min(520px, calc(100% - 30px)); padding: 12px 16px; border: 1px solid rgba(57,246,255,0.24); border-radius: 999px; background: rgba(7,7,19,0.92); color: var(--ink); box-shadow: var(--shadow); opacity: 0; transition: transform 180ms ease, opacity 180ms ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatGlow { from { transform: translate3d(0,0,0) scale(0.96); } to { transform: translate3d(4%,-3%,0) scale(1.04); } }
@keyframes orbitBob { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-12px) rotate(8deg); } }
@media (max-width: 1080px) { .setup-hero, .setup-grid, .game-layout, .final-grid { grid-template-columns: 1fr; } .setup-grid .rules-panel, .setup-grid .players-panel { grid-column: auto; grid-row: auto; position: static; } .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scoreboard-panel { position: static; } }
@media (max-width: 760px) { .site-header { align-items: flex-start; flex-direction: column; } .brand-mark { width: 58px; height: 58px; border-radius: 18px; } h1 { letter-spacing: -1.6px; } h2 { letter-spacing: -1.6px; } .setup-hero { padding: 22px; } .sample-table { min-height: 290px; } .card { min-height: 210px; } .tilt-left { transform: rotate(-5deg) translate(-26px, 0); } .tilt-right { transform: rotate(6deg) translate(34px, 44px); } .field-grid, .pack-grid { grid-template-columns: 1fr; } .game-topbar, .resume-banner, .phase-header, .sticky-action { align-items: stretch; flex-direction: column; } .hud-actions, .button-row { flex-wrap: wrap; } .btn { width: 100%; } .player-row { grid-template-columns: auto minmax(0, 1fr); } .player-row .remove-player { grid-column: 1 / -1; } .hand-grid, .submission-grid { grid-template-columns: 1fr; } .play-card-button { min-height: 154px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.001ms !important; } }

/* Cinematic full-send upgrade */
body.cinematic-mode {
  /* Push page content below the fixed top letterbox bar (::before) so the
     header eyebrow is not clipped. The near-black page bg hides any seam. */
  padding-top: clamp(18px, 4.5vh, 52px);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 228, 92, 0.12), transparent 28%),
    radial-gradient(circle at 14% 22%, rgba(255, 63, 215, 0.28), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(57, 246, 255, 0.24), transparent 28%),
    radial-gradient(circle at 50% 108%, rgba(141, 92, 255, 0.26), transparent 34%),
    linear-gradient(135deg, #04030c 0%, #0b0620 46%, #050915 100%);
}
body.cinematic-mode::before,
body.cinematic-mode::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  height: clamp(18px, 4.5vh, 52px);
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(180deg, #020208, rgba(2,2,8,0.86));
  box-shadow: 0 0 38px rgba(0,0,0,0.8);
}
body.cinematic-mode::before { top: 0; }
body.cinematic-mode::after { bottom: 0; transform: rotate(180deg); }
body.cinematic-off .stage-lights,
body.cinematic-off .laser-field,
body.cinematic-off .cinema-vignette,
body.cinematic-off .scene-cue,
body.cinematic-off::before,
body.cinematic-off::after { display: none; }
.cinema-vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 40%, transparent 0 42%, rgba(0,0,0,0.24) 70%, rgba(0,0,0,0.7) 100%),
    linear-gradient(90deg, rgba(255,63,215,0.05), transparent 22%, transparent 78%, rgba(57,246,255,0.05));
  mix-blend-mode: multiply;
}
.stage-lights {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.stage-lights span {
  position: absolute;
  top: -14%;
  width: 22vmax;
  height: 120vh;
  opacity: 0.26;
  filter: blur(18px);
  transform-origin: top center;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(57,246,255,0.15) 38%, transparent 76%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  animation: sweepLight 11s ease-in-out infinite alternate;
}
.stage-lights span:nth-child(1) { left: 6%; transform: rotate(17deg); }
.stage-lights span:nth-child(2) { left: 42%; animation-delay: -3s; background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,63,215,0.13) 42%, transparent 78%); }
.stage-lights span:nth-child(3) { right: 4%; transform: rotate(-18deg); animation-delay: -6s; }
.laser-field {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.74;
}
.laser {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,246,255,0.72), rgba(255,63,215,0.55), transparent);
  box-shadow: 0 0 18px rgba(57,246,255,0.62), 0 0 34px rgba(255,63,215,0.34);
  transform-origin: center;
  animation: laserDrift 8s linear infinite;
}
.laser-a { top: 24%; transform: rotate(-11deg); }
.laser-b { top: 58%; transform: rotate(7deg); animation-delay: -2.8s; }
.laser-c { top: 82%; transform: rotate(-4deg); animation-delay: -5.6s; }
.icon-btn.active {
  border-color: rgba(255,228,92,0.5);
  color: var(--yellow);
  box-shadow: 0 0 24px rgba(255,228,92,0.15);
}
.director-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 4px;
}
.director-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  background: linear-gradient(135deg, rgba(255,63,215,0.14), rgba(57,246,255,0.1));
  border: 1px solid rgba(255,255,255,0.13);
}
.cinema-poster::before {
  content: "";
  position: absolute;
  inset: 10% 5% auto;
  height: 56%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,228,92,0.22), rgba(255,63,215,0.12) 38%, transparent 68%);
  filter: blur(14px);
}
.poster-marquee {
  position: absolute;
  left: 50%;
  top: 4px;
  z-index: 3;
  transform: translateX(-50%) rotate(-2deg);
  display: grid;
  gap: 2px;
  min-width: 230px;
  padding: 10px 16px;
  border-radius: 16px;
  text-align: center;
  color: #080713;
  background: linear-gradient(135deg, var(--yellow), #fff2a7 52%, var(--cyan));
  box-shadow: 0 16px 44px rgba(0,0,0,0.34), 0 0 34px rgba(255,228,92,0.2);
}
.poster-marquee span {
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.2em;
}
.poster-marquee strong {
  font-size: 13px;
  letter-spacing: 0.08em;
}
.cinema-arena {
  position: relative;
}
.cinema-arena::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 36px;
  background:
    radial-gradient(circle at 50% 2%, rgba(255,228,92,0.14), transparent 24%),
    radial-gradient(circle at 4% 42%, rgba(255,63,215,0.14), transparent 30%),
    radial-gradient(circle at 96% 52%, rgba(57,246,255,0.14), transparent 30%);
  filter: blur(8px);
}
.scene-cue {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-top: -8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(4,5,14,0.68);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 12px 32px rgba(0,0,0,0.26);
  color: var(--muted);
}
.scene-cue strong { color: var(--ink); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.scene-cue em { font-style: normal; font-size: 13px; }
.cue-light {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green), 0 0 26px rgba(93,255,179,0.42);
  animation: cuePulse 1.2s ease-in-out infinite;
}
.phase.active-phase {
  animation: sceneRise 360ms cubic-bezier(.16,1,.3,1) both;
}
.big-card {
  transform-style: preserve-3d;
  animation: cardPremiere 520ms cubic-bezier(.2,.9,.25,1.2) both;
}
.big-card::after,
.play-card-button::after,
.receipt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 35%, rgba(255,255,255,0.16) 43%, transparent 52% 100%);
  transform: translateX(-125%);
  animation: sheen 5.8s ease-in-out infinite;
}
.play-card-button::after { border-radius: inherit; }
.play-card-button.selected::after { animation: none; transform: none; }
.play-card-button {
  transform-style: preserve-3d;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}
.play-card-button:hover {
  filter: saturate(1.15) brightness(1.08);
}
.submission-button {
  animation: submissionFlip 360ms cubic-bezier(.2,.9,.25,1.2) both;
}
.submission-button:nth-child(2n) { animation-delay: 45ms; }
.submission-button:nth-child(3n) { animation-delay: 90ms; }
.result-panel {
  position: relative;
  overflow: hidden;
}
.result-panel::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(255,228,92,0.15), transparent, rgba(57,246,255,0.13), transparent, rgba(255,63,215,0.14), transparent);
  animation: slowSpin 8s linear infinite;
  opacity: 0.82;
}
.result-panel > * { position: relative; z-index: 1; }
.winner-card-slot .card {
  animation: winnerZoom 580ms cubic-bezier(.16,1,.3,1) both;
}
.final-grid {
  perspective: 1200px;
}
.final-copy {
  animation: sceneRise 460ms ease both;
}
.receipt {
  position: relative;
  overflow: hidden;
  transform-origin: top center;
  animation: receiptPrint 820ms cubic-bezier(.2,.9,.18,1) both;
}
.receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0 1px, transparent 1px 8px);
  opacity: 0.5;
}
.confetti-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  border-radius: 3px;
  background: var(--yellow);
  box-shadow: 0 0 10px currentColor;
  animation: confettiFall var(--fall-duration, 1.9s) cubic-bezier(.17,.67,.38,.99) forwards;
}
.scene-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(57,246,255,0.18), transparent 34%),
    radial-gradient(circle at 50% 52%, rgba(255,63,215,0.16), transparent 42%),
    rgba(2,2,10,0.72);
  backdrop-filter: blur(8px) saturate(1.2);
  transition: opacity 180ms ease, visibility 180ms ease;
}
.scene-overlay.show {
  opacity: 1;
  visibility: visible;
}
.clapboard {
  width: min(720px, 100%);
  padding: clamp(24px, 6vw, 56px);
  border-radius: 34px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)),
    radial-gradient(circle at 20% 0%, rgba(255,228,92,0.16), transparent 26%),
    rgba(10, 11, 28, 0.92);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 32px 120px rgba(0,0,0,0.62), 0 0 60px rgba(255,63,215,0.18), 0 0 70px rgba(57,246,255,0.14);
  transform: translateY(18px) scale(0.96) rotateX(10deg);
}
.scene-overlay.show .clapboard {
  animation: clapIn 720ms cubic-bezier(.16,1,.3,1) both;
}
.clapboard::before {
  content: "";
  display: block;
  height: 44px;
  margin: -18px -18px 26px;
  border-radius: 22px 22px 10px 10px;
  background:
    repeating-linear-gradient(135deg, #fbf8ff 0 24px, #11142d 24px 48px);
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: inset 0 -8px 18px rgba(0,0,0,0.22);
}
.clapboard span {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.clapboard h2 {
  margin-bottom: 10px;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(255,63,215,0.5);
}
.clapboard p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 800;
}
body.phase-pass .scene-cue .cue-light { background: var(--yellow); box-shadow: 0 0 14px var(--yellow), 0 0 30px rgba(255,228,92,0.42); }
body.phase-play .scene-cue .cue-light { background: var(--pink); box-shadow: 0 0 14px var(--pink), 0 0 30px rgba(255,63,215,0.42); }
body.phase-judge .scene-cue .cue-light { background: var(--cyan); box-shadow: 0 0 14px var(--cyan), 0 0 30px rgba(57,246,255,0.42); }
body.phase-result .scene-cue .cue-light { background: var(--green); box-shadow: 0 0 14px var(--green), 0 0 30px rgba(93,255,179,0.42); }

@keyframes sweepLight {
  0% { transform: rotate(-18deg) translateX(-6%); opacity: 0.18; }
  50% { opacity: 0.32; }
  100% { transform: rotate(18deg) translateX(8%); opacity: 0.22; }
}
@keyframes laserDrift {
  0% { translate: -8% 0; opacity: 0; }
  12%, 76% { opacity: 0.75; }
  100% { translate: 8% 0; opacity: 0; }
}
@keyframes cuePulse { 0%,100% { transform: scale(0.92); } 50% { transform: scale(1.18); } }
@keyframes sceneRise { from { opacity: 0; transform: translateY(24px) scale(0.985); filter: blur(5px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes cardPremiere { from { opacity: 0; transform: translateY(26px) rotateX(8deg) scale(0.98); } to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); } }
@keyframes sheen { 0%, 62% { transform: translateX(-130%); } 76%, 100% { transform: translateX(130%); } }
@keyframes submissionFlip { from { opacity: 0; transform: rotateY(-18deg) translateY(20px); } to { opacity: 1; transform: rotateY(0) translateY(0); } }
@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes winnerZoom { 0% { opacity: 0; transform: scale(0.72) rotate(-4deg); } 70% { opacity: 1; transform: scale(1.04) rotate(1deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes receiptPrint { 0% { opacity: 0; transform: rotateX(-10deg) translateY(-32px); max-height: 0; } 100% { opacity: 1; transform: rotateX(0) translateY(0); max-height: 1200px; } }
@keyframes clapIn { 0% { opacity: 0; transform: translateY(26px) scale(0.92) rotateX(12deg); } 58% { opacity: 1; transform: translateY(0) scale(1.02) rotateX(0); } 100% { transform: translateY(0) scale(1) rotateX(0); } }
@keyframes confettiFall { 0% { opacity: 1; transform: translate3d(0,0,0) rotate(0); } 100% { opacity: 0; transform: translate3d(var(--fall-x, 0px), 105vh, 0) rotate(760deg); } }

@media (max-width: 760px) {
  .director-strip { gap: 8px; }
  .director-strip span { width: 100%; justify-content: center; }
  .poster-marquee { top: -8px; min-width: 200px; }
  .scene-cue { align-items: flex-start; border-radius: 20px; flex-direction: column; }
  .clapboard::before { height: 34px; margin-bottom: 18px; }
}

/* Async community mode */
.community-shell { padding-bottom: 72px; }
.community-hero .hero-copy { max-width: 860px; }
.community-poster .prompt-card p { font-size: clamp(20px, 2.2vw, 30px); }
.community-setup-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); }
.community-setup-grid .community-rules { grid-column: 1 / -1; position: static; }
.field-grid.single { grid-template-columns: 1fr; }
.field-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pack-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.stacked-actions { margin-top: 18px; }
.community-topbar h2 { max-width: 720px; }
.community-clockbar { margin-top: 14px; }
.community-code-panel { display: grid; grid-template-columns: minmax(180px, auto) minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 14px; padding: 18px 20px; }
.community-code-panel h3 { margin: 2px 0 0; font-size: clamp(28px, 4vw, 52px); color: var(--yellow); letter-spacing: 0.08em; }
.copy-box { min-width: 0; padding: 12px 14px; border: 1px dashed rgba(57,246,255,0.32); border-radius: 16px; color: var(--muted); background: rgba(255,255,255,0.055); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }
.community-layout { grid-template-columns: minmax(280px, 0.34fr) minmax(0, 1fr); }
.community-phase .phase-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.community-player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.community-player-card { display: grid; gap: 8px; justify-items: center; padding: 16px; border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; background: rgba(255,255,255,0.055); text-align: center; }
.community-player-card .avatar { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-weight: 1000; color: #050611; background: linear-gradient(135deg, var(--pink), var(--cyan)); box-shadow: 0 0 22px rgba(255,63,215,0.2); }
.community-player-card small { color: var(--muted); }
.community-player-card.is-ready { border-color: rgba(90,255,170,0.34); box-shadow: 0 0 18px rgba(90,255,170,0.12); }
.community-player-card.is-ready small { color: #7dffb8; }
.lobby-card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lobby-card-actions .btn { padding: 6px 10px; font-size: 0.72rem; }
.lobby-settings { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.lobby-settings span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; background: rgba(255,255,255,0.05); color: var(--muted); font-size: 0.8rem; }
.lobby-settings span strong { color: var(--ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.lobby-settings .lobby-packs { border-radius: 18px; max-width: 100%; overflow-wrap: anywhere; }
.lobby-invite-row { display: flex; align-items: center; gap: 16px; margin: 16px 0 6px; }
.lobby-invite-row p { max-width: 260px; }
.lobby-qr { flex: 0 0 auto; border-radius: 14px; overflow: hidden; line-height: 0; border: 1px solid rgba(255,255,255,0.16); box-shadow: 0 0 26px rgba(57,246,255,0.14); }
.lobby-qr svg { display: block; width: 132px; height: 132px; }
.join-preview { display: grid; gap: 5px; margin: 4px 0 14px; padding: 14px 16px; border: 1px solid rgba(57,246,255,0.22); border-radius: 18px; background: rgba(57,246,255,0.06); font-size: 0.85rem; }
.join-preview strong { font-size: 0.98rem; }
.join-preview span { color: var(--muted); }
.join-preview .join-preview-packs { font-size: 0.78rem; overflow-wrap: anywhere; }
.join-preview em { color: #7dffb8; font-style: normal; font-weight: 800; font-size: 0.8rem; }
.public-lobby-list { display: grid; gap: 12px; margin-top: 12px; }
.public-lobby-card { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 14px 16px; border: 1px solid rgba(57,246,255,0.18); border-radius: 16px; background: rgba(57,246,255,0.05); }
.public-lobby-card__body { display: grid; gap: 4px; min-width: 0; }
.public-lobby-card h4 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.public-lobby-meta { margin: 0; color: var(--muted); font-size: 0.8rem; }
.public-lobby-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.lobby-badge { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(125,255,184,0.14); color: #7dffb8; }
.lobby-badge.adult { background: rgba(255,105,180,0.16); color: #ff8ec8; }
.lobby-mood { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); color: var(--muted); }
.public-lobby-card .join-public { flex: 0 0 auto; }
.chat-block { margin-top: 18px; display: grid; gap: 10px; }
.chat-log { max-height: 280px; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; background: rgba(4,6,18,0.5); scrollbar-width: thin; }
.chat-empty { margin: auto; color: var(--muted); font-size: 0.85rem; text-align: center; }
.chat-msg { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; font-size: 0.86rem; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,0.045); }
.chat-msg strong { color: var(--cyan); font-size: 0.78rem; white-space: nowrap; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.chat-msg span { overflow-wrap: anywhere; }
.chat-msg em { color: var(--muted); font-style: normal; font-size: 0.68rem; white-space: nowrap; }
.chat-msg.own { background: rgba(57,246,255,0.09); border: 1px solid rgba(57,246,255,0.16); }
.chat-msg.own strong { color: var(--pink); }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; min-width: 0; border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 10px 12px; color: var(--ink); background: rgba(9,10,28,0.76); outline: none; font: inherit; font-size: 0.88rem; }
.chat-form input:focus { border-color: rgba(57,246,255,0.55); box-shadow: 0 0 0 4px rgba(57,246,255,0.1); }
.chat-form input:disabled { opacity: 0.5; }
/* --- Creator Studio: a lit stage for the live card preview --- */
.studio { display: grid; gap: 18px; }
.studio-stage { position: relative; display: grid; place-items: center; padding: 26px 12px 30px; border-radius: 22px; background: radial-gradient(ellipse at 50% 0%, rgba(141,92,255,0.22), rgba(4,6,18,0.6) 70%); border: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.studio-spotlight { position: absolute; inset: -40% -20% auto; height: 120%; background: conic-gradient(from 180deg at 50% 0%, transparent 42%, rgba(57,246,255,0.14) 50%, transparent 58%); pointer-events: none; animation: studio-sweep 7s ease-in-out infinite alternate; }
@keyframes studio-sweep { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.studio-card { position: relative; z-index: 1; width: min(420px, 92%); min-height: 180px; transform: rotate(-1.2deg); transition: transform 200ms ease, box-shadow 200ms ease; }
.studio-card.studio-ready { transform: rotate(0.6deg) translateY(-4px); box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 0 34px rgba(94,255,180,0.22); }
.studio-card .studio-preview-text { overflow-wrap: anywhere; }
.studio-controls { display: grid; gap: 12px; }
.studio-input { width: 100%; resize: vertical; min-height: 74px; border: 1px solid rgba(255,255,255,0.16); border-radius: 16px; padding: 12px 14px; color: var(--ink); background: rgba(9,10,28,0.8); outline: none; font: inherit; font-size: 16px; font-weight: 800; }
.studio-input:focus { border-color: rgba(57,246,255,0.55); box-shadow: 0 0 0 4px rgba(57,246,255,0.1); }
.studio-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.studio-count { color: var(--muted); font-size: 0.78rem; margin-left: auto; }
.studio-lint { font-size: 0.8rem; font-weight: 900; color: var(--yellow); }
.studio-lint.ok { color: #7dffb8; }
.studio-shelf { margin-top: 6px; }
.pb-empty { color: var(--muted); font-size: 0.85rem; list-style: none; }
@media (prefers-reduced-motion: reduce) { .studio-spotlight { animation: none; } }

.discord-auth { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discord-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(88,101,242,0.6); }
.discord-name { font-size: 0.85rem; }
.discord-display-name { display: inline-flex; flex-direction: column; gap: 2px; font-size: 0.7rem; }
.discord-display-name .muted { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; }
.discord-display-input { width: 140px; padding: 4px 8px; font-size: 0.85rem; border-radius: 8px; border: 1px solid rgba(88,101,242,0.5); background: rgba(10,12,24,0.6); color: inherit; }
/* Organized grids stack their category sections and full-width tools row. The
   `.compact.organized` selector must out-specify the later `.pack-grid.compact`
   snap-rail rule, or on community the tools land in a single grid cell. */
.pack-grid.organized,
.pack-grid.compact.organized { display: block; grid-template-columns: none; grid-auto-flow: row; overflow: visible; }
.pack-category { margin-top: 14px; border: 1px solid rgba(255,255,255,0.1); border-radius: 18px; background: rgba(255,255,255,0.028); overflow: hidden; }
.pack-category.cat-empty { display: none; }
.pack-category-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: rgba(255,255,255,0.045); border: 0; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.pack-category-head:hover { background: rgba(57,246,255,0.08); }
.pack-category-head .cat-title { font-weight: 900; font-size: 0.95rem; letter-spacing: 0.01em; }
.pack-category-head .cat-meta { margin-left: auto; color: var(--muted); font-size: 0.76rem; white-space: nowrap; }
.pack-category-head .cat-chevron { color: var(--muted); transition: transform 160ms ease; }
.pack-category.collapsed .cat-chevron { transform: rotate(-90deg); }
.pack-category-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.pack-category.collapsed .pack-category-body { display: none; }
.pack-grid.compact .pack-category-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1080px) { .pack-category-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pack-category-body { grid-template-columns: 1fr; } }
.empty-notice { grid-column: 1 / -1; min-height: 132px; display: grid; place-items: center; padding: 20px; border: 1px dashed rgba(255,255,255,0.18); border-radius: 22px; color: var(--muted); background: rgba(255,255,255,0.045); text-align: center; }
.community-page .status-chip { white-space: nowrap; }
.community-page select { width: 100%; border: 1px solid rgba(255,255,255,0.14); border-radius: 14px; padding: 12px 13px; color: var(--ink); background: rgba(9,10,28,0.76); outline: none; font: inherit; font-weight: 850; }
.community-page select:focus { border-color: rgba(57,246,255,0.55); box-shadow: 0 0 0 4px rgba(57,246,255,0.1); }
.community-page a.btn, .site-header a.icon-btn { text-decoration: none; }
.community-page .sticky-action { z-index: 8; }
.community-page .receipt-line span:last-child { max-width: 58%; overflow-wrap: anywhere; }
@media (max-width: 1080px) {
  .community-setup-grid, .community-layout, .community-code-panel { grid-template-columns: 1fr; }
  .community-setup-grid .community-rules { grid-column: auto; }
}
@media (max-width: 760px) {
  .field-grid.two-up, .pack-grid.compact { grid-template-columns: 1fr; }
  .community-phase .phase-header { flex-direction: column; }
  .community-code-panel { text-align: left; }
  .copy-box { font-size: 12px; }
}


/* Community speed scoring */
.speed-rule-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 20px;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(255,228,92,0.10), rgba(57,246,255,0.08));
  border: 1px solid rgba(255,228,92,0.20);
  line-height: 1.55;
}
.speed-rule-card strong { color: var(--yellow); }
.speed-scoring-panel {
  margin-top: 14px;
  padding: 18px 20px;
  border-color: rgba(255,228,92,0.22);
}
.speed-scoring-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.speed-scoring-header h3 { margin-bottom: 0; }
.speed-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.speed-chip-grid span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  font-weight: 850;
}
.speed-chip-grid strong { color: var(--yellow); }
.speed-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.speed-feed-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.11);
}
.speed-feed-item span {
  color: var(--ink);
  font-weight: 950;
}
.speed-feed-item strong {
  color: var(--yellow);
  font-size: 15px;
}
.speed-feed-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}
.speed-feed-item.submit { border-color: rgba(57,246,255,0.24); }
.speed-feed-item.judge { border-color: rgba(141,92,255,0.30); }
.speed-feed-item.winner { border-color: rgba(255,228,92,0.32); }
.empty-notice.compact { min-height: 72px; padding: 14px; }
.score-name, .score-points { display: grid; gap: 2px; }
.score-name small, .score-points small {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}
.winner-reveal span { color: var(--muted); }
@media (max-width: 760px) {
  .speed-scoring-header { flex-direction: column; }
  .speed-feed { grid-template-columns: 1fr; }
}

/* Pretty pass: community deluxe skin */
:root {
  --hot-pink: #ff4fd8;
  --neon-blue: #35e8ff;
  --deep-plum: #160928;
  --glass: rgba(12, 13, 33, 0.70);
  --glass-strong: rgba(18, 18, 43, 0.86);
  --gold-glow: rgba(255, 228, 92, 0.34);
}

body.community-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 79, 216, 0.22), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(53, 232, 255, 0.19), transparent 28%),
    radial-gradient(circle at 50% 94%, rgba(141, 92, 255, 0.20), transparent 35%),
    linear-gradient(135deg, #03020a 0%, #10051f 42%, #050b18 100%);
}

body.community-page .bg-grid {
  background-image:
    linear-gradient(rgba(53,232,255,0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,79,216,0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(255,228,92,0.10), transparent 42%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
  mask-image: linear-gradient(to bottom, transparent, black 9%, black 82%, transparent);
}

body.community-page .site-header {
  padding-top: 36px;
}

body.community-page .brand-mark {
  position: relative;
  border: 1px solid rgba(57,246,255,0.56);
  background:
    linear-gradient(135deg, rgba(255,79,216,0.34), rgba(53,232,255,0.20)),
    radial-gradient(circle at 35% 20%, rgba(255,228,92,0.32), transparent 36%);
  box-shadow:
    0 0 0 8px rgba(57,246,255,0.045),
    0 0 30px rgba(57,246,255,0.22),
    0 0 42px rgba(255,79,216,0.18),
    0 28px 90px rgba(0,0,0,0.42);
}

body.community-page .brand-mark::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 30px;
  border: 1px solid rgba(255,228,92,0.24);
  opacity: 0.82;
}

body.community-page .panel {
  border-color: rgba(255,255,255,0.155);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.105), rgba(255,255,255,0.034)),
    radial-gradient(circle at 18% 0%, rgba(255,79,216,0.075), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(53,232,255,0.070), transparent 30%),
    var(--glass);
  box-shadow:
    0 30px 110px rgba(0,0,0,0.46),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 34px rgba(53,232,255,0.08),
    0 0 46px rgba(255,79,216,0.07);
}

body.community-page .community-hero {
  position: relative;
  border-radius: 38px;
  border-color: rgba(57,246,255,0.24);
  background:
    linear-gradient(140deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    radial-gradient(circle at 14% 0%, rgba(255,79,216,0.18), transparent 34%),
    radial-gradient(circle at 100% 22%, rgba(53,232,255,0.16), transparent 34%),
    linear-gradient(135deg, rgba(15,18,50,0.86), rgba(13,6,28,0.86));
  box-shadow:
    0 32px 120px rgba(0,0,0,0.52),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 70px rgba(255,79,216,0.14),
    0 0 80px rgba(53,232,255,0.11);
}

body.community-page .community-hero::before {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.075);
  background:
    linear-gradient(110deg, transparent 0 34%, rgba(255,255,255,0.08) 42%, transparent 52% 100%);
  opacity: 0.72;
}

body.community-page .community-hero h2 {
  max-width: 980px;
  background: linear-gradient(90deg, #fff, #ffe45c 34%, #39f6ff 72%, #ff7ce5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

body.community-page .director-strip {
  margin-top: 20px;
}

body.community-page .director-strip span,
body.community-page .hero-metrics span,
body.community-page .status-chip,
body.community-page .judge-pill {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 0 18px rgba(57,246,255,0.055);
}

.community-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.feature-tile {
  position: relative;
  min-height: 132px;
  padding: 16px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.13);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035)),
    rgba(5, 7, 20, 0.48);
}

.feature-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(57,246,255,0.13), transparent 40%),
    linear-gradient(135deg, rgba(255,63,215,0.08), transparent 46%);
  pointer-events: none;
}

.feature-tile span,
.feature-tile strong,
.feature-tile small { position: relative; }
.feature-tile span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.16em;
}
.feature-tile strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 18px;
}
.feature-tile small {
  display: block;
  color: var(--muted);
  line-height: 1.42;
}

body.community-page .community-poster {
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,228,92,0.12), transparent 22%),
    radial-gradient(circle at 25% 28%, rgba(255,63,215,0.22), transparent 25%),
    radial-gradient(circle at 76% 62%, rgba(57,246,255,0.18), transparent 28%),
    rgba(4,5,18,0.42);
}

body.community-page .community-poster::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background-image: radial-gradient(rgba(255,255,255,0.22) 1px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle, black 18%, transparent 72%);
}

body.community-page .poster-marquee {
  border-color: rgba(255,228,92,0.30);
  box-shadow: 0 0 24px rgba(255,228,92,0.10), inset 0 1px 0 rgba(255,255,255,0.12);
}

body.community-page .card {
  border-radius: 30px;
}

body.community-page .prompt-card {
  background:
    radial-gradient(circle at 18% 10%, rgba(255,255,255,0.94), transparent 22%),
    linear-gradient(145deg, #fffdfa, #ebe5ff 58%, #d9f8ff);
  box-shadow:
    0 24px 70px rgba(0,0,0,0.38),
    0 0 44px rgba(255,255,255,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.55);
}

body.community-page .answer-card,
body.community-page .play-card-button,
body.community-page .submission-button {
  background:
    radial-gradient(circle at 16% 0%, rgba(255,63,215,0.24), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(57,246,255,0.18), transparent 30%),
    linear-gradient(145deg, #10142d 0%, #241039 46%, #071b2a 100%);
  border-color: rgba(57,246,255,0.30);
}

body.community-page .field-card,
body.community-page .pack-card,
body.community-page .score-row,
body.community-page .speed-feed-item,
body.community-page .community-player-card,
body.community-page .empty-notice,
body.community-page .copy-box {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.082), rgba(255,255,255,0.035)),
    rgba(4,6,18,0.42);
  border-color: rgba(255,255,255,0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}

body.community-page input[type="text"],
body.community-page input[type="number"],
body.community-page select {
  border-color: rgba(57,246,255,0.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025)),
    rgba(3, 5, 16, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

body.community-page input[type="text"]:focus,
body.community-page input[type="number"]:focus,
body.community-page select:focus {
  border-color: rgba(255,228,92,0.70);
  box-shadow: 0 0 0 4px rgba(255,228,92,0.10), 0 0 24px rgba(255,228,92,0.08);
}

body.community-page .pack-card {
  min-height: 148px;
}

body.community-page .pack-card.selected {
  border-color: rgba(57,246,255,0.52);
  background:
    linear-gradient(180deg, rgba(57,246,255,0.12), rgba(255,63,215,0.055)),
    rgba(7,8,24,0.58);
}

body.community-page .pack-card.selected::after {
  content: "LIVE";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #080713;
  background: linear-gradient(135deg, var(--yellow), var(--cyan));
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.10em;
}

body.community-page .btn,
body.community-page .icon-btn {
  min-height: 42px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 16px 34px rgba(0,0,0,0.18);
}

body.community-page .btn.primary {
  background:
    linear-gradient(135deg, #ffe45c 0%, #ff7ce5 52%, #39f6ff 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.18) inset,
    0 0 30px rgba(255,63,215,0.23),
    0 18px 46px rgba(0,0,0,0.25);
}

body.community-page .btn.secondary {
  background: linear-gradient(135deg, #39f6ff, #8ef9ff);
}

body.community-page .community-topbar {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,228,92,0.18);
}

body.community-page .community-topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,63,215,0.08), transparent 30%, rgba(57,246,255,0.08));
}

body.community-page .community-clockbar .progress-track {
  height: 16px;
  background: rgba(255,255,255,0.07);
  box-shadow: inset 0 0 18px rgba(0,0,0,0.28);
}

body.community-page .community-clockbar .progress-track span {
  background:
    linear-gradient(90deg, #ff3fd7, #ffe45c 50%, #39f6ff),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.24) 0 8px, transparent 8px 16px);
  box-shadow: 0 0 20px rgba(255,228,92,0.22), 0 0 34px rgba(57,246,255,0.18);
}

body.community-page .speed-scoring-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,228,92,0.26);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,228,92,0.15), transparent 26%),
    radial-gradient(circle at 80% 8%, rgba(57,246,255,0.12), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.034)),
    rgba(11, 12, 31, 0.78);
}

body.community-page .speed-scoring-panel::before {
  content: "⚡";
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  top: -24px;
  color: rgba(255,228,92,0.12);
  font-size: clamp(110px, 15vw, 190px);
  line-height: 1;
  transform: rotate(10deg);
  pointer-events: none;
}

.speed-spotlight-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.speed-spotlight-row div {
  position: relative;
  min-height: 104px;
  padding: 16px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.095), rgba(255,255,255,0.028)),
    rgba(5, 7, 20, 0.44);
  border: 1px solid rgba(255,255,255,0.13);
}

.speed-spotlight-row div::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% -20%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(255,228,92,0.16), transparent 64%);
  pointer-events: none;
}

.speed-spotlight-row span,
.speed-spotlight-row strong,
.speed-spotlight-row small { position: relative; }
.speed-spotlight-row span {
  display: block;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.speed-spotlight-row strong {
  display: block;
  margin-top: 8px;
  color: var(--yellow);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.04em;
}
.speed-spotlight-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

body.community-page .speed-chip-grid span {
  background: rgba(255,255,255,0.075);
  border-color: rgba(255,255,255,0.145);
}

body.community-page .speed-feed-item {
  position: relative;
  overflow: hidden;
}

body.community-page .speed-feed-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pink), var(--cyan));
  opacity: 0.75;
}

body.community-page .community-code-panel {
  border-style: solid;
  border-color: rgba(57,246,255,0.20);
  background:
    linear-gradient(90deg, rgba(57,246,255,0.10), rgba(255,63,215,0.06)),
    rgba(8, 9, 26, 0.78);
}

body.community-page .community-code-panel h3 {
  color: transparent;
  background: linear-gradient(90deg, var(--yellow), #fff5aa, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
}

body.community-page .scoreboard-panel {
  border-color: rgba(255,228,92,0.16);
}

body.community-page .score-row {
  position: relative;
  overflow: hidden;
  padding: 14px;
}

body.community-page .score-row::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 92% 0%, rgba(57,246,255,0.09), transparent 30%);
}

body.community-page .score-row.leader {
  border-color: rgba(255,228,92,0.48);
  background:
    linear-gradient(135deg, rgba(255,228,92,0.14), rgba(255,63,215,0.055)),
    rgba(8, 8, 22, 0.62);
}

body.community-page .score-row.leader .score-rank::before {
  content: "👑";
  margin-right: 5px;
}

body.community-page .score-meter {
  height: 10px;
  background: rgba(0,0,0,0.28);
}

body.community-page .score-meter span {
  background: linear-gradient(90deg, #ff3fd7, #ffe45c 56%, #39f6ff);
  box-shadow: 0 0 18px rgba(255,228,92,0.22);
}

body.community-page .turn-order span {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

body.community-page .cinema-arena {
  position: relative;
}

body.community-page .cinema-arena::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,228,92,0.10), transparent 26%),
    linear-gradient(135deg, rgba(255,63,215,0.09), rgba(57,246,255,0.07));
  filter: blur(10px);
  opacity: 0.9;
}

body.community-page .big-card {
  min-height: 292px;
  border-radius: 34px;
}

body.community-page .big-card p {
  letter-spacing: -0.055em;
}

body.community-page .phase {
  border-radius: 30px;
}

body.community-page .community-player-card .avatar,
body.community-page .pack-icon,
body.community-page .avatar,
body.community-page .privacy-icon {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.28), transparent 28%),
    linear-gradient(135deg, rgba(255,63,215,0.52), rgba(57,246,255,0.34));
  border-color: rgba(255,255,255,0.20);
}

body.community-page .play-card-button {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.community-page .play-card-button:hover,
body.community-page .play-card-button.selected,
body.community-page .submission-button:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: rgba(255,228,92,0.70);
  box-shadow:
    0 26px 80px rgba(0,0,0,0.42),
    0 0 36px rgba(255,228,92,0.18),
    0 0 50px rgba(57,246,255,0.10);
}

body.community-page .sticky-action {
  border-radius: 26px;
  border-color: rgba(255,228,92,0.20);
  background:
    linear-gradient(90deg, rgba(255,228,92,0.10), rgba(57,246,255,0.07)),
    rgba(5, 6, 18, 0.92);
  box-shadow: 0 20px 70px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.10);
}

body.community-page .scene-cue {
  border-color: rgba(57,246,255,0.18);
  background:
    linear-gradient(90deg, rgba(57,246,255,0.10), rgba(255,63,215,0.07)),
    rgba(7, 8, 22, 0.78);
}

body.community-page .receipt {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border-color: rgba(255,228,92,0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.13), rgba(255,255,255,0.05)),
    radial-gradient(circle at 50% 0%, rgba(255,228,92,0.18), transparent 32%),
    rgba(13, 14, 31, 0.92);
}

body.community-page .receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 100% 14px;
  opacity: 0.48;
}

body.community-page .receipt > * {
  position: relative;
}

body.community-page .toast {
  border-color: rgba(255,228,92,0.30);
  background:
    linear-gradient(90deg, rgba(255,228,92,0.13), rgba(57,246,255,0.09)),
    rgba(6, 7, 18, 0.94);
}

@media (max-width: 1180px) {
  .community-feature-grid,
  .speed-spotlight-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body.community-page .site-header { padding-top: 22px; }
  .community-feature-grid,
  .speed-spotlight-row { grid-template-columns: 1fr; }
  .feature-tile { min-height: auto; }
  body.community-page .community-hero { border-radius: 28px; }
  body.community-page .big-card { min-height: 230px; }
  body.community-page .speed-scoring-panel::before { opacity: 0.07; }
}


/* Mobile-first overhaul */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --touch-target: 48px;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior-y: contain;
}

button,
.btn,
.icon-btn,
input,
select,
a {
  touch-action: manipulation;
}

@media (max-width: 900px) {
  body.cinematic-mode::before,
  body.cinematic-mode::after {
    display: none;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 25;
    margin-bottom: 10px;
    padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 12px calc(12px + var(--safe-left));
    background: linear-gradient(180deg, rgba(6, 6, 17, 0.96), rgba(6, 6, 17, 0.72));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .app-shell {
    width: min(100%, calc(100% - 16px));
    margin-bottom: calc(78px + var(--safe-bottom));
  }

  /* Header actions layout is owned by the mobile-first .header-actions rules
     below (stacked cluster rows); keep only the shared scrollbar hiding here. */
  .mode-row::-webkit-scrollbar,
  .hero-metrics::-webkit-scrollbar,
  .director-strip::-webkit-scrollbar,
  .final-highlights::-webkit-scrollbar,
  .turn-order::-webkit-scrollbar,
  .speed-chip-grid::-webkit-scrollbar {
    display: none;
  }

  .header-actions .icon-btn {
    flex: 0 0 auto;
    min-height: var(--touch-target);
    white-space: nowrap;
  }

  .setup-hero,
  .setup-panel,
  .panel,
  .phase,
  .receipt,
  .final-copy,
  .community-code-panel,
  .speed-scoring-panel {
    border-radius: 24px;
  }

  .setup-hero {
    gap: 18px;
    padding: 18px;
  }

  .hero-copy p:not(.kicker) {
    font-size: 16px;
    line-height: 1.55;
  }

  .director-strip,
  .hero-metrics,
  .final-highlights,
  .turn-order,
  .speed-chip-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .director-strip span,
  .hero-metrics span,
  .final-highlights span,
  .turn-order span,
  .speed-chip-grid span {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .game-layout,
  .community-layout,
  .final-grid,
  .setup-grid,
  .community-setup-grid,
  .field-grid.two-up {
    grid-template-columns: 1fr;
  }

  .game-layout,
  .community-layout {
    gap: 14px;
  }

  .game-layout .scoreboard-panel,
  .community-layout .scoreboard-panel {
    order: 2;
    position: static;
  }

  .game-layout .play-area,
  .community-layout .play-area {
    order: 1;
  }

  .play-area,
  .cinema-arena {
    gap: 14px;
  }

  .game-topbar,
  .community-topbar {
    position: sticky;
    top: calc(88px + var(--safe-top));
    z-index: 18;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(9, 10, 28, 0.96), rgba(9, 10, 28, 0.82));
    backdrop-filter: blur(14px);
  }

  .game-topbar .button-row,
  .community-topbar .button-row,
  .hud-actions {
    width: 100%;
  }

  .button-row,
  .hud-actions,
  .phase-header,
  .resume-banner,
  .sticky-action,
  .speed-scoring-header {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row > *,
  .hud-actions > *,
  .sticky-action > * {
    width: 100%;
  }

  .scoreboard-panel {
    padding: 16px;
  }

  .scoreboard {
    gap: 10px;
  }

  .score-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    row-gap: 8px;
  }

  .score-points,
  .score-meter {
    grid-column: 2 / -1;
  }

  .prompt-card.big-card,
  body.community-page .big-card {
    min-height: 220px;
  }

  .card,
  .play-card-button {
    border-radius: 22px;
  }

  .card p {
    font-size: clamp(22px, 6vw, 30px);
  }

  .hand-grid,
  .submission-grid,
  .speed-feed,
  .community-player-grid {
    grid-template-columns: 1fr;
  }

  .play-card-button {
    min-height: 168px;
    padding: 18px;
    font-size: 18px;
  }

  .sticky-action {
    position: sticky;
    bottom: calc(10px + var(--safe-bottom));
    margin-top: 16px;
    padding: 12px;
    border-radius: 18px;
  }

  .community-code-panel {
    gap: 12px;
    padding: 16px;
  }

  .copy-box {
    font-size: 12px;
  }

  .community-feature-grid,
  .speed-spotlight-row,
  .pack-grid,
  .pack-grid.compact {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    grid-template-columns: none;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .community-feature-grid > *,
  .speed-spotlight-row > *,
  .pack-grid > * {
    scroll-snap-align: start;
  }

  .feature-tile,
  .pack-card,
  .speed-spotlight-row div {
    min-height: unset;
  }

  .sample-table {
    min-height: 250px;
  }

  .tilt-left {
    transform: rotate(-5deg) translate(-20px, 0);
  }

  .tilt-right {
    transform: rotate(6deg) translate(24px, 30px);
  }

  .coin-orbit {
    right: 3%;
    top: 2%;
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    gap: 10px;
  }

  /* The pinned mobile header keeps branding + controls compact; the marketing
     subtitle is repeated in the scrolling hero, so drop it here to keep the
     sticky header height reasonable. */
  .site-header > .brand-lockup .subtitle { display: none; }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 24px;
  }

  h1 {
    font-size: clamp(26px, 8vw, 40px);
    letter-spacing: -1.5px;
  }

  h2 {
    font-size: clamp(23px, 6.2vw, 32px);
    letter-spacing: -1.2px;
  }

  h3 {
    font-size: clamp(20px, 6vw, 26px);
  }

  .app-shell {
    width: min(100%, calc(100% - 12px));
  }

  .setup-hero,
  .setup-panel,
  .phase,
  .final-copy,
  .receipt,
  .scoreboard-panel,
  .community-code-panel,
  .speed-scoring-panel {
    padding: 16px;
  }

  .field-card,
  .player-row,
  .feature-tile,
  .community-player-card,
  .speed-feed-item,
  .speed-spotlight-row div,
  .pack-card {
    padding: 14px;
    border-radius: 18px;
  }

  .player-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-row .remove-player {
    grid-column: 1 / -1;
  }

  .field-grid,
  .pack-grid,
  .pack-grid.compact {
    gap: 10px;
  }

  .poster-marquee {
    min-width: 190px;
    padding: 8px 12px;
  }

  .sample-table {
    min-height: 220px;
  }

  .card {
    min-height: 190px;
    padding: 18px;
  }

  .card p {
    margin-top: 18px;
  }

  .scene-cue {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .phase-header .status-chip,
  .section-title-row .status-chip,
  .turn-meta .status-chip,
  .submit-status-chip,
  #submit-status-chip {
    align-self: flex-start;
  }

  .play-card-button::before {
    margin-bottom: 12px;
  }

  .play-card-button.selected::after {
    top: 10px;
    right: 10px;
  }

  .community-feature-grid,
  .speed-spotlight-row,
  .pack-grid,
  .pack-grid.compact {
    grid-auto-columns: 88%;
  }

  .receipt-line {
    gap: 10px;
    font-size: 13px;
  }

  .receipt-line span:last-child {
    max-width: 56%;
  }

  .toast {
    bottom: calc(12px + var(--safe-bottom));
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(100%, calc(100% - 10px));
  }

  .site-header {
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }

  .setup-hero,
  .setup-panel,
  .phase,
  .scoreboard-panel,
  .final-copy,
  .receipt,
  .community-code-panel,
  .speed-scoring-panel {
    border-radius: 20px;
    padding: 14px;
  }

  .hero-copy p:not(.kicker) {
    font-size: 15px;
  }

  .community-feature-grid,
  .speed-spotlight-row,
  .pack-grid,
  .pack-grid.compact {
    grid-auto-columns: 92%;
  }

  .play-card-button {
    min-height: 156px;
    font-size: 17px;
  }

  .sticky-action {
    left: 0;
    right: 0;
  }

  .btn,
  .icon-btn,
  input[type="text"],
  input[type="number"],
  select {
    min-height: var(--touch-target);
  }

  .coin-orbit {
    width: 58px;
    height: 58px;
  }
}

@media (pointer: coarse) {
  .btn,
  .icon-btn,
  .play-card-button,
  .pack-card,
  .mode-pill,
  .feature-tile {
    -webkit-tap-highlight-color: transparent;
  }

  .btn:hover,
  .icon-btn:hover,
  .play-card-button:hover,
  .pack-card:hover {
    transform: none;
  }
}


/* Math-driven motion layer */
.math-motion-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: calc(0.44 + (var(--math-pulse, 0.5) * 0.18));
  mix-blend-mode: screen;
}

.cinema-poster .card,
.big-card,
.feature-tile,
.speed-spotlight-row div {
  transform-style: preserve-3d;
}

.cinema-poster .card,
.big-card,
.play-card-button,
.feature-tile,
.speed-spotlight-row div {
  translate: 0 var(--math-float-y, 0px);
}

.big-card,
.feature-tile,
.speed-spotlight-row div {
  transform: perspective(900px) rotateX(var(--math-tilt-x, 0deg)) rotateY(var(--math-tilt-y, 0deg));
}

.play-card-button {
  transform: perspective(900px) rotateX(var(--math-small-tilt-x, 0deg)) rotateY(var(--math-small-tilt-y, 0deg));
}

.play-card-button:hover,
.play-card-button.selected {
  transform: perspective(900px) translateY(-4px) rotateX(var(--math-small-tilt-x, 0deg)) rotateY(var(--math-small-tilt-y, 0deg)) rotate(-0.5deg);
}

.brand-mark,
.coin-orbit,
.pack-icon,
.avatar {
  box-shadow:
    0 0 calc(14px + (var(--math-pulse, 0.5) * 18px)) rgba(255,63,215,0.18),
    0 0 calc(12px + (var(--math-pulse, 0.5) * 16px)) rgba(57,246,255,0.12);
}

.glow-panel::before {
  opacity: calc(0.36 + (var(--math-pulse, 0.5) * 0.18));
}

@media (max-width: 900px) {
  .math-motion-canvas {
    opacity: calc(0.25 + (var(--math-pulse, 0.5) * 0.12));
  }

  .big-card,
  .play-card-button,
  .feature-tile,
  .speed-spotlight-row div {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .math-motion-canvas { display: none; }
  .cinema-poster .card,
  .big-card,
  .play-card-button,
  .feature-tile,
  .speed-spotlight-row div {
    translate: none;
    transform: none;
  }
}

/* Winner spotlight: dim the table into a pool of light while the math coin
   shower (rendered on the burst canvas above) rains down. The dim sits below
   the confetti/scene layers so the celebration and clapboard stay bright. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 40%, transparent 0 18%, rgba(3,3,12,0.62) 74%);
  transition: opacity 420ms ease;
}
body.winner-spotlight::after { opacity: 1; }
.math-burst-canvas { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  body::after { transition: none; }
  body.winner-spotlight::after { opacity: 0; }
}

/* ==========================================================================
   MOBILE-FIRST OVERHAUL
   Phones are the primary target. Single-column is the base for every
   structural grid; hand/submission/pack become horizontal snap rails;
   controls get 44px+ touch targets and 16px fields (no iOS focus-zoom).
   Desktop layouts are re-introduced with min-width queries. All motion still
   lives on the math canvas engine; scroll-snap is stripped under reduced-motion.
   ========================================================================== */

/* --- Viewport frame: svh/dvh floor + safe-area gutters --- */
body {
  min-height: 100vh;   /* fallback */
  min-height: 100svh;  /* no jump when the mobile URL bar hides */
}
@supports (min-height: 100dvh) {
  body { min-height: 100dvh; }
}
.app-shell {
  padding-left: max(env(safe-area-inset-left), 0px);
  padding-right: max(env(safe-area-inset-right), 0px);
  margin-bottom: calc(70px + env(safe-area-inset-bottom));
}
/* Scoped to .active-phase so this never overrides the .phase display:none
   hiding of inactive panels. */
.privacy-panel.active-phase { min-height: 58svh; display: grid; align-content: center; }
@media (min-width: 720px) { .privacy-panel.active-phase { min-height: 0; } }

/* --- Layout grids: single-column base, enhance up --- */
.setup-hero,
.setup-grid,
.community-setup-grid,
.game-layout,
.community-layout,
.final-grid,
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
/* Let grid items shrink below their content width so the horizontal rails
   scroll internally instead of forcing the whole page wide. */
.setup-hero > *,
.setup-grid > *,
.community-setup-grid > *,
.game-layout > *,
.community-layout > *,
.final-grid > *,
.field-grid > * { min-width: 0; }
.hand-grid,
.submission-grid,
.pack-grid,
.pack-grid.compact { min-width: 0; max-width: 100%; }
.game-layout .scoreboard-panel,
.community-layout .scoreboard-panel { order: 2; position: static; }
.game-layout .play-area,
.community-layout .play-area { order: 1; }
.setup-grid .players-panel,
.setup-grid .rules-panel { grid-column: auto; grid-row: auto; position: static; }

@media (min-width: 720px) {
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 960px) {
  .setup-hero { grid-template-columns: 1.12fr 0.88fr; gap: 26px; align-items: center; }
  .setup-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 0.52fr); gap: 18px; }
  .community-setup-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); }
  .setup-grid .players-panel { grid-column: 1 / 2; }
  .setup-grid .rules-panel { grid-column: 2 / 3; grid-row: 1 / span 3; align-self: start; position: sticky; top: 18px; }
  .game-layout,
  .community-layout { grid-template-columns: minmax(280px, 0.32fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .game-layout .scoreboard-panel { order: 0; position: sticky; top: 18px; }
  .game-layout .play-area,
  .community-layout .play-area,
  .community-layout .scoreboard-panel { order: 0; }
  .final-grid { grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.7fr); align-items: start; }
}

/* --- Hand & submissions: horizontal snap rails on phones --- */
.hand-grid,
.submission-grid {
  display: grid;
  /* Kill any earlier explicit template: with flow:column an inherited 1fr
     template creates one crushed first column while the rest take 82%. */
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.hand-grid::-webkit-scrollbar,
.submission-grid::-webkit-scrollbar { display: none; }
.hand-grid > *,
.submission-grid > * { scroll-snap-align: center; }
@media (min-width: 720px) {
  .hand-grid,
  .submission-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    overflow: visible;
    scroll-snap-type: none;
  }
}

/* --- Content packs: snap rail base, 2-up then 4-up --- */
.pack-grid,
.pack-grid.compact {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 84%;
  gap: 12px;
  margin-top: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.pack-grid::-webkit-scrollbar,
.pack-grid.compact::-webkit-scrollbar { display: none; }
.pack-grid > *,
.pack-grid.compact > * { scroll-snap-align: start; }
@media (min-width: 560px) {
  .pack-grid,
  .pack-grid.compact {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    scroll-snap-type: none;
  }
}
@media (min-width: 960px) {
  .pack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pack-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Universal 44px+ touch targets --- */
:root { --touch-target: 48px; }
.btn,
.icon-btn,
.mode-pill,
input[type="text"],
input[type="number"],
select,
.remove-player { min-height: var(--touch-target); }
.icon-btn { min-width: var(--touch-target); }
.pack-card { min-height: 172px; }
input[type="range"] { height: var(--touch-target); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 12px rgba(255,63,215,0.5); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--pink); cursor: pointer;
}

/* --- Native <select> skin + 16px fields (kills iOS focus-zoom) --- */
input[type="text"],
input[type="number"],
select,
textarea { font-size: 16px; }
select {
  width: 100%;
  padding: 13px 40px 13px 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, var(--cyan) 50%) calc(100% - 18px) 55% / 8px 8px no-repeat,
    rgba(4,5,14,0.72);
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(57,246,255,0.12); }

/* --- Fluid type --- */
.hero-copy p:not(.kicker) { font-size: clamp(15px, 3.6vw, 18px); line-height: 1.6; }
.btn, .icon-btn { font-size: clamp(14px, 3.4vw, 16px); }
.card p { font-size: clamp(22px, 6vw, 34px); }
.big-card p { font-size: clamp(26px, 7.4vw, 58px); }
.play-card-button { font-size: clamp(16px, 4.4vw, 20px); }
.field-card span { font-size: clamp(11px, 3vw, 13px); }

/* --- Sticky thumb-docked setup CTA --- */
.stacked-actions {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin: 20px -16px 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6,6,17,0), rgba(6,6,17,0.94) 32%);
  backdrop-filter: blur(12px);
  border-radius: 0 0 20px 20px;
}
@media (min-width: 720px) {
  .stacked-actions { position: static; margin: 0; padding: 0; background: none; backdrop-filter: none; }
}

/* --- Mobile-first sticky, compact header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 25;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(180deg, rgba(6,6,17,0.98), rgba(6,6,17,0.9));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
/* Mobile header actions: three clusters stack as tidy, full-width rows
   (nav pills / setting toggles / utility) instead of cramming side-by-side
   into narrow shrunken columns. Each cluster is a centered, even row. */
.header-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
  overflow: visible;
}
.header-actions > .header-cluster {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-left: 0;
}
.header-actions > .header-cluster + .header-cluster::before { display: none; }
/* Nav: two equal, thumb-friendly pills sharing the row. */
.header-actions > nav.header-cluster .icon-btn { flex: 1 1 0; min-width: 0; justify-content: center; }
/* Setting toggles: one even row of roughly-square icon buttons. */
.header-actions > .header-settings .icon-btn { flex: 1 1 0; min-width: 0; max-width: 76px; }
/* Utility: install / help / text-size / language wrap neatly, centered.
   Constrain the language <select> so its long option names never bleed
   past the viewport edge. */
.header-actions > .header-utility { gap: 8px; }
.header-actions > .header-utility .lang-btn { flex: 0 1 auto; }
.header-actions > .header-utility .lang-btn select { width: auto; max-width: 42vw; }
.header-actions .icon-btn { flex: 0 0 auto; min-height: var(--touch-target); white-space: nowrap; }
@media (min-width: 900px) {
  .site-header {
    position: static; flex-direction: row; align-items: center; justify-content: space-between;
    padding: 28px 18px 12px; background: none; backdrop-filter: none; border-bottom: 0;
  }
  /* Restore the desktop inline three-cluster header row. */
  .header-actions {
    width: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    justify-content: flex-end; gap: 10px 14px; overflow: visible;
  }
  .header-actions > .header-cluster {
    width: auto; display: inline-flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px;
  }
  .header-actions > .header-cluster + .header-cluster { padding-left: 14px; }
  .header-actions > .header-cluster + .header-cluster::before { display: block; }
  .header-actions > nav.header-cluster .icon-btn,
  .header-actions > .header-settings .icon-btn { flex: 0 0 auto; max-width: none; }
  .header-actions > .header-utility .lang-btn select { max-width: none; }
}

/* --- Reduced-motion: rails free-scroll, no snap --- */
.hand-grid,
.submission-grid,
.pack-grid,
.pack-grid.compact,
.header-actions { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .hand-grid,
  .submission-grid,
  .pack-grid,
  .pack-grid.compact,
  .header-actions {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}

/* Clip decorative horizontal bleed (lasers, ambient blobs, action rails) so a
   phone never side-scrolls. `clip` (not `hidden`) preserves position: sticky. */
html, body { overflow-x: clip; }

/* Damped-spring card deal, driven by --math-deal-* from the motion engine.
   Uses the independent translate/scale/opacity properties so it COMPOSES with
   the ambient tilt transform on the same card rather than overriding it. */
.bab-deal {
  translate: var(--math-deal-x, 0px) calc(var(--math-float-y, 0px) + var(--math-deal-y, 0px));
  scale: var(--math-deal-scale, 1);
  opacity: var(--math-deal-fade, 1);
  will-change: transform, opacity, translate, scale;
}
@media (prefers-reduced-motion: reduce) {
  .bab-deal { translate: 0 var(--math-float-y, 0px); scale: 1; opacity: 1; }
}

/* ==========================================================================
   GAME-FIRST HIERARCHY
   When a match is live (body.screen-round-live / screen-final-live), the
   chrome shrinks and the game owns the screen: slim one-line header, compact
   topbar, capped prompt card, and (on desktop) the active phase sits BESIDE
   the prompt so judging and the winner reveal never fall below the fold.
   ========================================================================== */

/* --- Slim in-game header (both pages) --- */
body.screen-round-live .site-header,
body.screen-final-live .site-header {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
}
body.screen-round-live .site-header .eyebrow,
body.screen-final-live .site-header .eyebrow,
body.screen-round-live .site-header .subtitle,
body.screen-final-live .site-header .subtitle {
  display: none;
}
body.screen-round-live .site-header h1,
body.screen-final-live .site-header h1 {
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: -0.4px;
  white-space: nowrap;
  text-shadow: none;
}
body.screen-round-live .brand-mark,
body.screen-final-live .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 15px;
}
body.screen-round-live .brand-lockup,
body.screen-final-live .brand-lockup {
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
}
body.screen-round-live .header-actions,
body.screen-final-live .header-actions {
  width: auto;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* Mid-round the clusters collapse back to inline groups so the slim header
   stays a single compact row beside the wordmark. */
body.screen-round-live .header-actions > .header-cluster,
body.screen-final-live .header-actions > .header-cluster {
  width: auto;
  justify-content: flex-end;
}
body.screen-round-live .header-actions > nav.header-cluster .icon-btn,
body.screen-final-live .header-actions > nav.header-cluster .icon-btn,
body.screen-round-live .header-actions > .header-settings .icon-btn,
body.screen-final-live .header-actions > .header-settings .icon-btn {
  flex: 0 0 auto;
  max-width: none;
}
body.screen-round-live .header-actions .icon-btn,
body.screen-final-live .header-actions .icon-btn {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}
/* Phones mid-round: icon-only brand. The nowrap wordmark otherwise crushes
   into a sliver between the mark and the action rail. */
@media (max-width: 640px) {
  body.screen-round-live .site-header h1,
  body.screen-final-live .site-header h1 { display: none; }
}
/* iOS zooms any focused input under 16px - keep mobile inputs at 16px so
   tapping the chat or a name field doesn't lurch the whole viewport. */
@media (max-width: 760px) {
  input[type="text"], input[type="password"], select, textarea { font-size: 16px; }
  .sticky-action { bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* --- Compact topbar: round meta, not a headline --- */
body.screen-round-live .game-topbar {
  flex-direction: row;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}
body.screen-round-live .game-topbar h2 {
  font-size: clamp(17px, 2vw, 21px);
  margin-bottom: 0;
  letter-spacing: -0.4px;
}
body.screen-round-live .game-topbar .eyebrow { font-size: 11px; }
body.screen-round-live .game-topbar .muted { font-size: 13px; }
body.screen-round-live .hud-actions {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
}
body.screen-round-live .hud-actions .btn {
  width: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}

/* --- Prompt card: dramatic but capped --- */
body.screen-round-live .big-card { min-height: 150px; }
body.screen-round-live .big-card p { font-size: clamp(19px, 4.6vw, 34px); }
@media (min-width: 960px) {
  body.screen-round-live .big-card p { font-size: clamp(20px, 2.2vw, 32px); }
}

/* --- Desktop: active phase sits beside the prompt --- */
@media (min-width: 960px) {
  .cinema-arena {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 16px;
    align-items: start;
  }
  .cinema-arena > .big-card,
  .cinema-arena > .scene-cue { grid-column: 1; }
  .cinema-arena > .big-card { position: sticky; top: 14px; }
  .cinema-arena > .phase {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* --- Legible eyebrow on the landing header --- */
.site-header .eyebrow {
  color: #7deeff;
  text-shadow: 0 0 12px rgba(57, 246, 255, 0.35);
}

/* --- Hero poster: fan the sample cards so both stay readable --- */
@media (min-width: 761px) {
  .tilt-left { transform: rotate(-7deg) translate(-74px, -14px); }
  .tilt-right { transform: rotate(7deg) translate(104px, 118px); }
}

/* Slim in-game header rides above the vignette/scanline overlays on its own
   glass strip so the brand and toggles stay bright at any size. */
body.screen-round-live .site-header,
body.screen-final-live .site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 7, 19, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.screen-round-live .site-header h1,
body.screen-final-live .site-header h1 {
  color: #ffffff;
}

/* In-game the topbar must never float over the phase content: the old mobile
   sticky treatment put it at z-18 over the hand after the auto-scroll. */
body.screen-round-live .game-topbar,
body.screen-round-live .community-topbar {
  position: static;
}
body.screen-round-live .game-topbar > div { min-width: 0; }

/* Slim header: let the wordmark truncate instead of painting under the
   action buttons; on small phones the $M mark alone carries the brand. */
body.screen-round-live .brand-lockup,
body.screen-final-live .brand-lockup,
body.screen-round-live .brand-lockup > div,
body.screen-final-live .brand-lockup > div { min-width: 0; }
body.screen-round-live .site-header h1,
body.screen-final-live .site-header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 599px) {
  body.screen-round-live .site-header h1,
  body.screen-final-live .site-header h1 { display: none; }
}

/* ---- Career progression: HUD, pack locks, pack library ------------------ */
.career-hud { display: grid; gap: 10px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid rgba(141,92,255,0.32); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(141,92,255,0.14), rgba(57,246,255,0.06)); }
.career-level { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.career-level-num { font-size: 20px; font-weight: 1000; letter-spacing: -0.5px; color: var(--ink); }
.career-xp { font-size: 13px; font-weight: 800; color: var(--muted); }
.career-bar { position: relative; height: 10px; border-radius: 999px; background: rgba(4,5,14,0.7); border: 1px solid rgba(255,255,255,0.12); overflow: hidden; }
.career-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 500ms ease; box-shadow: 0 0 14px rgba(255,63,215,0.5); }
.career-next { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.career-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.career-packs { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }

/* Locked pack tiles */
.pack-card.locked { opacity: 0.66; cursor: default; filter: saturate(0.7); }
.pack-card.locked:hover { transform: none; border-color: rgba(255,255,255,0.12); }
.pack-lock { display: inline-block; margin-top: 4px; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255,103,103,0.4); background: rgba(255,103,103,0.12); color: #ffb3b3; font-size: 11px; font-weight: 800; }
.pack-preview-btn { position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(57,246,255,0.4); background: rgba(4,5,14,0.72); color: var(--cyan); font-size: 11px; font-weight: 900; cursor: pointer; z-index: 2; transition: background 140ms ease; }
.pack-preview-btn:hover { background: rgba(57,246,255,0.18); }

/* Pack library modal */
body.modal-open { overflow: hidden; }
.pack-library-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(3,3,10,0.78); backdrop-filter: blur(8px); }
.pack-library-overlay.hidden { display: none; }
.pack-library { width: min(920px, 100%); max-height: 88vh; display: flex; flex-direction: column; border: 1px solid rgba(141,92,255,0.4); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(20,18,42,0.98), rgba(10,9,24,0.98)); box-shadow: var(--shadow); overflow: hidden; }
.pack-library-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.pack-library-title { flex: 1; margin: 0; font-size: 18px; }
.pack-library-body { padding: 18px; overflow-y: auto; }
.pack-library-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.pack-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pack-library-card { display: grid; gap: 6px; padding: 14px; text-align: left; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: var(--ink); cursor: pointer; transition: transform 150ms ease, border-color 150ms ease; }
.pack-library-card:hover { transform: translateY(-2px); border-color: rgba(57,246,255,0.45); }
.pack-library-card strong { font-size: 15px; }
.pack-library-card small { color: var(--muted-2); font-size: 12px; }
.pack-library-card em { font-size: 11px; font-weight: 800; font-style: normal; color: var(--cyan); }
.pack-library-card.locked em { color: #ffb3b3; }
.pack-library-card .pack-icon { font-size: 22px; }
.pack-preview-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pack-preview-columns h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pack-preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-preview-list li { padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; border: 1px solid rgba(255,255,255,0.1); }
.pack-preview-list.prompts li { background: rgba(141,92,255,0.1); }
.pack-preview-list.answers li { background: rgba(57,246,255,0.07); }
@media (max-width: 640px) { .pack-preview-columns { grid-template-columns: 1fr; } }

/* ---- Personal pack builder ---------------------------------------------- */
.pack-builder-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(3,3,10,0.78); backdrop-filter: blur(8px); }
.pack-builder-overlay.hidden { display: none; }
.pack-builder { position: relative; width: min(880px, 100%); max-height: 88vh; display: flex; flex-direction: column; border: 1px solid rgba(255,63,215,0.4); border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(24,16,38,0.98), rgba(10,9,24,0.98)); box-shadow: var(--shadow); overflow: hidden; }
.pack-builder-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.pack-builder-title { flex: 1; margin: 0; font-size: 18px; }
.pack-builder-body { padding: 18px; overflow-y: auto; }
.pack-builder-note { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.pack-builder-create { display: flex; gap: 10px; margin-bottom: 16px; }
.pack-builder-create input { flex: 1; }
.pack-builder-list { display: grid; gap: 10px; }
.pack-builder-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); }
.pack-builder-row strong { display: block; font-size: 15px; }
.pack-builder-row small { color: var(--muted-2); font-size: 12px; }
.pack-builder-row-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.pack-builder-empty { color: var(--muted-2); text-align: center; padding: 18px; }
.pack-builder-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pack-builder-editor h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pb-add { display: flex; gap: 8px; margin-bottom: 12px; }
.pb-add input { flex: 1; }
.pb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pb-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; border: 1px solid rgba(255,255,255,0.1); }
.pb-prompts li { background: rgba(141,92,255,0.1); }
.pb-answers li { background: rgba(57,246,255,0.07); }
.pb-list li button { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; border: 1px solid rgba(255,103,103,0.4); background: rgba(255,103,103,0.12); color: #ffb3b3; cursor: pointer; font-weight: 900; }
.pack-builder-flash { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 999px; background: var(--danger); color: #2a0000; font-weight: 900; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms ease; }
.pack-builder-flash.show { opacity: 1; transform: translate(-50%, 0); }
.pack-card.personal { border-color: rgba(255,63,215,0.4); }
.pack-card.personal.selected { background: rgba(255,63,215,0.1); border-color: rgba(255,63,215,0.55); }
@media (max-width: 640px) { .pack-builder-editor { grid-template-columns: 1fr; } .pack-builder-create { flex-direction: column; } }

/* ---- Community catalog: submit + vote ----------------------------------- */
.catalog-panel { margin-top: 18px; grid-column: 1 / -1; }
.catalog-panel.hidden { display: none; }
.catalog-submit { display: flex; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.catalog-submit select { flex: 0 0 auto; border: 1px solid rgba(255,255,255,0.16); border-radius: 14px; padding: 12px 14px; color: var(--ink); background: rgba(4,5,14,0.72); }
.catalog-submit input { flex: 1; min-width: 220px; }
.catalog-list { display: grid; gap: 10px; margin-top: 14px; }
.catalog-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); }
.catalog-card-body { flex: 1; min-width: 0; }
.catalog-card-body p { margin: 4px 0; font-size: 14px; line-height: 1.45; }
.catalog-card-body small { color: var(--muted-2); font-size: 12px; }
.catalog-kind { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; background: rgba(141,92,255,0.18); color: #cbb6ff; }
.catalog-vote { display: flex; gap: 8px; flex: 0 0 auto; }
.catalog-vote .voted { border-color: var(--cyan); background: rgba(57,246,255,0.18); color: var(--cyan); }
.pack-card.catalog { border-color: rgba(141,92,255,0.4); }
.pack-card.catalog.selected { background: rgba(141,92,255,0.1); border-color: rgba(141,92,255,0.55); }

/* ---- AI host bubble ------------------------------------------------------ */
.host-bubble { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 24px); z-index: 150; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); padding: 14px 18px; border-radius: 18px; border: 1px solid rgba(255,197,84,0.5); background: linear-gradient(135deg, rgba(30,20,50,0.97), rgba(12,10,26,0.97)); box-shadow: 0 18px 44px rgba(0,0,0,0.5), 0 0 24px rgba(255,197,84,0.18); opacity: 0; pointer-events: none; transition: opacity 320ms ease, transform 320ms ease; }
.host-bubble.show { opacity: 1; transform: translate(-50%, 0); }
.host-bubble.hidden { display: none; }
.host-mic { font-size: 22px; flex: 0 0 auto; filter: drop-shadow(0 0 6px rgba(255,197,84,0.6)); }
.host-line { font-size: 14px; line-height: 1.45; font-weight: 600; color: #fdf6e9; font-style: italic; }
@media (max-width: 640px) { .host-bubble { bottom: 14px; padding: 12px 14px; } .host-line { font-size: 13px; } }

/* ---- Content gating: adult / paid packs + unlock modal ------------------ */
.icon-btn.adult { border-color: var(--danger); color: #ffd0d0; background: rgba(255,63,63,0.12); }
.pack-card.gate-hidden { display: none; }
.adult-badge { position: absolute; top: 12px; left: 12px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 1000; letter-spacing: 0.05em; background: var(--danger); color: #2a0000; }
.pack-card.paid-locked { opacity: 0.72; filter: saturate(0.85); }
.pack-card.paid-locked:hover { transform: none; }
.pack-unlock-btn { position: absolute; bottom: 14px; right: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--yellow); background: rgba(255,228,92,0.14); color: var(--yellow); font-size: 12px; font-weight: 900; cursor: pointer; z-index: 2; }
/* Keep the card-count line clear of the absolutely-positioned Unlock pill. */
.pack-card:has(.pack-unlock-btn) { padding-bottom: 46px; }
.pack-unlock-btn:hover { background: rgba(255,228,92,0.26); }
.unlock-overlay { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 18px; background: rgba(3,3,10,0.8); backdrop-filter: blur(8px); }
.unlock-overlay.hidden { display: none; }
.unlock-modal { width: min(440px, 100%); text-align: center; padding: 26px 24px; border-radius: var(--radius-xl); border: 1px solid rgba(255,228,92,0.45); background: linear-gradient(180deg, rgba(28,20,44,0.98), rgba(10,9,24,0.98)); box-shadow: var(--shadow); }
.unlock-emoji { font-size: 40px; display: block; }
.unlock-title { margin: 10px 0 6px; font-size: 22px; }
.unlock-desc { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.unlock-note { margin: 0 0 18px; padding: 10px 12px; border-radius: 12px; background: rgba(57,246,255,0.08); border: 1px solid rgba(57,246,255,0.25); color: var(--muted); font-size: 12px; line-height: 1.5; }
.unlock-actions { display: flex; gap: 10px; justify-content: center; }

/* Seasonal (holiday) pack badge */
.season-badge { position: absolute; top: 12px; left: 12px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: 0.03em; background: rgba(57,246,255,0.16); color: var(--cyan); border: 1px solid rgba(57,246,255,0.4); }

/* Creator Studio per-card fee row (only rendered when the server prices it) */
.studio-fee { display: grid; gap: 8px; margin: 4px 0 12px; padding: 12px; border: 1px dashed rgba(255,228,92,0.4); border-radius: 14px; background: rgba(255,228,92,0.06); }
.studio-fee-note { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.studio-fee-address { color: var(--yellow); font-size: 0.75rem; }
.studio-fee-txid { border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 10px 12px; color: var(--ink); background: rgba(9,10,28,0.8); outline: none; font: inherit; font-size: 16px; text-transform: uppercase; }

/* Card origin badges: voted-in community cards vs. your own homebrew */
.card-origin { position: absolute; top: 10px; right: 12px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 1000; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; }
.card-origin.community { background: rgba(94,255,180,0.16); border: 1px solid rgba(94,255,180,0.5); color: #7dffb8; box-shadow: 0 0 12px rgba(94,255,180,0.25); }
.card-origin.homebrew { background: rgba(255,228,92,0.14); border: 1px solid rgba(255,228,92,0.5); color: var(--yellow); }

/* ---- The Vote Gallery (vote.html) ---------------------------------------- */
.vote-hero .hero-copy { max-width: 760px; }
.vote-connect-row { display: flex; gap: 10px; flex-wrap: wrap; }
.vote-connect-row input { flex: 1 1 260px; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.16); background: rgba(6,8,22,0.8); color: var(--ink, #f8f6ff); font-size: 16px; }

.vote-wallet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wallet-stat { display: grid; place-items: center; gap: 2px; padding: 14px 8px; border-radius: 14px; background: rgba(141,92,255,0.1); border: 1px solid rgba(141,92,255,0.3); text-align: center; }
.wallet-stat strong { font-size: 26px; letter-spacing: 0.02em; color: #d9c9ff; }
.wallet-stat small { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }

.ballot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-top: 14px; }
.ballot { position: relative; display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(8,10,26,0.72); border: 1px solid rgba(255,255,255,0.09); }
.ballot-stage { display: grid; place-items: center; padding: 18px 8px; border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, rgba(141,92,255,0.2), rgba(4,6,18,0.55) 72%); }
.ballot-stage .studio-card { width: min(340px, 96%); min-height: 140px; }
.ballot-rated { position: absolute; top: 10px; right: 12px; font-size: 15px; filter: drop-shadow(0 0 8px rgba(255,92,141,0.7)); }
.ballot-author { margin: 0; font-size: 13px; opacity: 0.85; }
.ballot-progress { position: relative; height: 22px; border-radius: 999px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); overflow: hidden; }
.ballot-progress-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(141,92,255,0.85), rgba(94,255,180,0.85)); transition: width 400ms ease; }
.ballot-progress-label { position: relative; display: block; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; line-height: 22px; text-transform: uppercase; }
.ballot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ballot-vote.voted { border-color: var(--cyan); background: rgba(57,246,255,0.18); color: var(--cyan); }
.ballot-flag.flagged { border-color: #ff5c8d; background: rgba(255,92,141,0.16); color: #ff9dbb; }

.leaderboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.leaderboard-col h4 { margin: 0 0 4px; }
.leaderboard-list { margin: 8px 0 0; padding: 0 0 0 22px; display: grid; gap: 7px; }
.leaderboard-list li { font-size: 14px; }
.leaderboard-list li strong { display: inline-block; margin-right: 8px; }
.leaderboard-list li span { opacity: 0.75; font-size: 12.5px; }
.leaderboard-empty { list-style: none; margin-left: -22px; opacity: 0.7; }

@media (max-width: 760px) {
  .vote-wallet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leaderboard-grid { grid-template-columns: 1fr; }
  .ballot-grid { grid-template-columns: 1fr; }
}

/* Adult-table opt-in on the community create form */
.adult-table-field .adult-table-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; }
.adult-table-field .adult-table-line input { width: 18px; height: 18px; margin-top: 1px; accent-color: #ff5c8d; flex: none; }
.adult-table-field .adult-table-line em { font-style: normal; opacity: 0.9; }

/* End-of-match favorite-block vote */
.favorite-vote { margin: 14px 0; padding: 14px; border-radius: 16px; background: rgba(255,228,92,0.06); border: 1px solid rgba(255,228,92,0.25); }
.favorite-vote h3 { margin: 0 0 4px; }
.favorite-vote-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.favorite-option { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.14); background: rgba(10,12,30,0.85); color: inherit; cursor: pointer; transition: transform 150ms ease, border-color 150ms ease; }
.favorite-option:hover { transform: translateY(-2px); border-color: rgba(255,228,92,0.5); }
.favorite-option.picked { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255,228,92,0.25); }
.favorite-option .card-label { display: block; font-size: 10px; letter-spacing: 0.1em; opacity: 0.8; margin-bottom: 6px; }
.favorite-option p { margin: 0; font-size: 13.5px; }

/* ---- Button hints (hints.js): hover tooltips + long-press on touch -------- */
.bab-hint {
  position: fixed; z-index: 9999; pointer-events: none;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(10, 8, 26, 0.97);
  border: 1px solid rgba(141, 92, 255, 0.55);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 18px rgba(141, 92, 255, 0.2);
  color: #f4f0ff; font-size: 12.5px; line-height: 1.45; font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0; transform: translateY(4px); transition: opacity 140ms ease, transform 140ms ease;
}
.bab-hint.visible { opacity: 1; transform: translateY(0); }
.bab-hint.below { transform: translateY(-4px); }
.bab-hint.below.visible { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .bab-hint { transition: opacity 100ms ease; transform: none; }
}

.bab-hint-toast {
  position: fixed; z-index: 9999; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  padding: 11px 18px; border-radius: 999px;
  background: rgba(10, 8, 26, 0.97); border: 1px solid rgba(57, 246, 255, 0.45);
  color: #eafcff; font-size: 13px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  opacity: 0; transition: opacity 300ms ease, transform 300ms ease;
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.bab-hint-toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Hero call-to-action: the zero-decision path into a game */
.hero-cta { margin: 18px 0 6px; }
.btn.big { font-size: 17px; padding: 14px 26px; box-shadow: 0 0 26px rgba(141,92,255,0.35); }
.hero-cta-note { margin: 4px 0 12px; font-size: 12.5px; opacity: 0.7; }

/* Vibe picker: one-tap themed loadouts, the fastest path to a dealt table. */
.vibe-picker { margin: 14px 0 4px; }
.vibe-lead { margin: 0 0 8px; font-size: 13px; font-weight: 800; opacity: 0.85; }
.vibe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.vibe-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(141,92,255,0.35); background: linear-gradient(180deg, rgba(141,92,255,0.16), rgba(141,92,255,0.05)); color: var(--ink); cursor: pointer; transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.vibe-card:hover, .vibe-card:focus-visible { transform: translateY(-2px); border-color: rgba(141,92,255,0.7); box-shadow: 0 10px 28px rgba(141,92,255,0.28); }
.vibe-card .vibe-emoji { font-size: 22px; line-height: 1; }
.vibe-card strong { font-size: 15px; }
.vibe-card small { font-size: 11.5px; opacity: 0.72; }
@media (max-width: 520px) { .vibe-grid { grid-template-columns: 1fr 1fr; } .vibe-card { padding: 10px 12px; } }

/* Pack tools: search filter + surprise-me loadout */
.pack-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.pack-search { flex: 1 1 200px; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.16); background: rgba(6,8,22,0.8); color: inherit; font-size: 16px; }
.pack-card.search-hidden { display: none !important; }
/* While filtering, every section opens so matches are never hidden by a fold */
.pack-grid.searching .pack-category.collapsed .pack-category-body { display: grid; }
.pack-grid.searching .pack-category.collapsed .cat-chevron { transform: none; }

/* Skeleton shimmer while network content loads */
@keyframes skeleton-sweep { from { background-position: -200px 0; } to { background-position: 200px 0; } }
.skeleton-line, .skeleton-card {
  border-radius: 8px; list-style: none;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200px 100%; animation: skeleton-sweep 1.2s linear infinite;
}
.skeleton-line { height: 14px; margin: 8px 0; }
.skeleton-card { min-height: 140px; width: min(340px, 96%); border: 1px solid rgba(255,255,255,0.08); }
@media (prefers-reduced-motion: reduce) { .skeleton-line, .skeleton-card { animation: none; } }

/* Your cards: the creator's ballot tracker */
.my-cards-list { display: grid; gap: 10px; margin-top: 10px; }
.mine-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(10,12,30,0.7); border: 1px solid rgba(255,255,255,0.09); }
.mine-row.promoted { border-color: rgba(94,255,180,0.45); box-shadow: 0 0 16px rgba(94,255,180,0.12); }
.mine-row.rejected { opacity: 0.65; }
.mine-chip { font-size: 11px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.mine-chip.canon { background: rgba(94,255,180,0.16); color: #7dffb8; border: 1px solid rgba(94,255,180,0.5); }
.mine-chip.live { background: rgba(141,92,255,0.16); color: #d9c9ff; border: 1px solid rgba(141,92,255,0.5); }
.mine-chip.out { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); }
.mine-text { margin: 0; font-size: 13.5px; }
.mine-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.mine-bar span { display: block; height: 100%; background: linear-gradient(90deg, rgba(141,92,255,0.85), rgba(94,255,180,0.85)); }

/* Streak-on-the-line nudge */
.streak-nudge { border-color: rgba(255,159,67,0.5); background: rgba(255,159,67,0.08); font-weight: 700; }

/* Aa larger-text mode: cards read at arm's length */
body.large-text .card p, body.large-text .play-card-button { font-size: 1.18em; line-height: 1.4; }
body.large-text .catalog-card-body p, body.large-text .mine-text, body.large-text .ballot-stage .studio-card p { font-size: 1.15em; }
body.large-text .btn { font-size: 1.05em; }

/* 🌐 cinematic language picker in the header */
.lang-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding-right: 30px;
  border: 1px solid rgba(57,246,255,0.3);
  background: rgba(8,6,24,0.6);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.lang-btn > span {
  color: var(--cyan);
  text-shadow: 0 0 8px rgba(57,246,255,0.55);
  transition: text-shadow 160ms ease;
}
/* custom neon caret */
.lang-btn::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color 160ms ease;
}
.lang-btn:hover,
.lang-btn:focus-within {
  border-color: rgba(255,63,215,0.65);
  background: rgba(12,8,32,0.82);
  box-shadow: 0 0 18px rgba(57,246,255,0.28), 0 0 26px rgba(255,63,215,0.22);
}
.lang-btn:hover > span,
.lang-btn:focus-within > span { text-shadow: 0 0 14px rgba(57,246,255,0.9); }
.lang-btn:focus-within::after { border-color: var(--magenta, #ff3fd7); }
.lang-btn select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: var(--cyan);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  max-width: 120px;
  outline: none;
}
.lang-btn select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.lang-btn select option { background: rgba(10,7,26,0.98); color: var(--ink); }

/* 📲 Install App: primary "get the app" pill with an attention neon pulse. */
#install-hint {
  border-color: rgba(57,246,255,0.55);
  color: var(--cyan);
  animation: installPulse 2.6s ease-in-out infinite;
}
#install-hint:hover {
  border-color: rgba(255,63,215,0.7);
  box-shadow: 0 0 22px rgba(57,246,255,0.5), 0 0 34px rgba(255,63,215,0.4);
}
@keyframes installPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(57,246,255,0.28), 0 0 16px rgba(255,63,215,0.16); }
  50% { box-shadow: 0 0 20px rgba(57,246,255,0.55), 0 0 30px rgba(255,63,215,0.38); }
}
@media (prefers-reduced-motion: reduce) {
  #install-hint { animation: none; box-shadow: 0 0 16px rgba(57,246,255,0.4), 0 0 24px rgba(255,63,215,0.25); }
}
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .site-header, html[dir="rtl"] .button-row { flex-direction: row-reverse; }

/* Out-of-season holiday packs: visible so nobody wonders where Christmas
   went in July - dimmed, badged with their return month, not selectable */
.pack-card.season-locked { opacity: 0.55; filter: saturate(0.4); }
.pack-card.season-locked .season-badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); color: #cfc9e8; }

/* ---- Brand art (assets/) ----------------------------------------------- */
.brand-mark { padding: 6px; background: transparent; border: none; box-shadow: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(141,92,255,0.65)) drop-shadow(0 0 34px rgba(57,246,255,0.3)); animation: brand-pulse 4s ease-in-out infinite; }
@keyframes brand-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.memo-mini { height: 17px; vertical-align: -4px; margin-right: 4px; filter: drop-shadow(0 0 8px rgba(255,63,215,0.6)); }
.inline-art { height: 34px; vertical-align: -10px; margin-right: 4px; filter: drop-shadow(0 0 10px rgba(141,92,255,0.5)); }
.inline-art.small { height: 22px; vertical-align: -6px; }
.brand-banner { display: flex; justify-content: center; padding: 26px 16px 0; }
.brand-banner img { width: min(720px, 92%); filter: drop-shadow(0 0 28px rgba(141,92,255,0.35)); }
.poster-community-icon { position: absolute; top: -26px; right: -14px; width: 96px; filter: drop-shadow(0 0 18px rgba(57,246,255,0.5)); animation: brand-pulse 5s ease-in-out infinite; z-index: 2; }
.prompt-art { width: 74px; margin: 0 auto -26px; display: block; position: relative; z-index: 2; filter: drop-shadow(0 0 14px rgba(255,63,215,0.55)); }
.trophy-art { width: 110px; display: block; margin: -8px auto 4px; filter: drop-shadow(0 0 22px rgba(255,228,92,0.45)); animation: trophy-pop 600ms cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes trophy-pop { from { transform: scale(0.3) rotate(-12deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* Side awards: cosmetic "also worth a shout" badges under the winner reveal. */
.round-awards { margin: 14px auto 0; max-width: 520px; }
.round-awards:not(.has-awards) { display: none; }
.round-awards-lead { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.round-awards-list { display: grid; gap: 8px; }
.round-award { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'badge who' 'card card'; gap: 2px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); text-align: left; }
.round-award-badge { grid-area: badge; font-weight: 900; font-size: 13px; white-space: nowrap; }
.round-award-who { grid-area: who; font-size: 13px; opacity: 0.8; justify-self: end; }
.round-award-card { grid-area: card; font-size: 13.5px; opacity: 0.92; }
@keyframes award-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.round-awards.has-awards .round-award { animation: award-in 340ms ease both; }
.round-awards.has-awards .round-award:nth-child(2) { animation-delay: 90ms; }
.round-awards.has-awards .round-award:nth-child(3) { animation-delay: 180ms; }

/* "Card locked in" confirmation: a beat, not a ledger. */
.lock-confirm { position: fixed; left: 50%; top: 26%; transform: translate(-50%, -6px); z-index: 9990; display: grid; gap: 3px; justify-items: center; padding: 16px 26px; border-radius: 18px; background: rgba(8,10,26,0.94); border: 1px solid rgba(141,92,255,0.5); box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 30px rgba(141,92,255,0.3); opacity: 0; pointer-events: auto; transition: opacity 180ms ease, transform 180ms ease; }
.lock-confirm.hidden { display: none; }
.lock-confirm.show { opacity: 1; transform: translate(-50%, 0); }
.lock-confirm-title { font-size: 19px; font-weight: 1000; letter-spacing: 0.01em; }
.lock-confirm-sub { font-size: 13px; opacity: 0.75; }
@media (prefers-reduced-motion: reduce) { .lock-confirm, .round-awards.has-awards .round-award { transition: none; animation: none; } }
/* Overlaid in the clockbar's reserved right slot so appearing mid-game never
   reflows the timer row under a player's thumb. */
.community-clockbar .turn-meta { position: relative; padding-right: 48px; }
.times-up-art { position: absolute; right: 0; top: 50%; transform: translateY(-50%); height: 40px; filter: drop-shadow(0 0 12px rgba(255,103,103,0.6)); animation: times-up-pulse 1.6s ease-in-out infinite; pointer-events: none; }
.times-up-art.hidden { display: none; }
@keyframes times-up-pulse { 0%, 100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.08); } }

/* Card origin markers: art versions of Community/Homebrew */
.card-origin.artful { background: none; border: none; box-shadow: none; padding: 0; top: 4px; right: 6px; }
.card-origin.artful img { height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
.ballot-marker { position: absolute; top: -12px; left: -10px; height: 44px; z-index: 3; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55)); }

/* ---- Cinematic emoji reactions ------------------------------------------- */
.react-tray { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0; }
.react-palette { display: grid; grid-template-columns: repeat(8, 44px); gap: 6px; padding: 10px; border-radius: 16px; background: rgba(8,10,26,0.95); border: 1px solid rgba(141,92,255,0.4); box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 24px rgba(141,92,255,0.2); z-index: 20; }
.react-palette.hidden { display: none; }
.react-btn { padding: 2px; border: none; background: none; border-radius: 10px; cursor: pointer; transition: transform 120ms ease; }
.react-btn:hover, .react-btn:focus-visible { transform: scale(1.25); }
.react-btn img { width: 38px; height: 38px; display: block; }
@media (max-width: 700px) { .react-palette { grid-template-columns: repeat(4, 48px); } .react-btn img { width: 42px; height: 42px; } }
/* In the table topbar the tray hugs the right edge; pop the palette out as a
   right-anchored popover so it grows inward instead of clipping off-screen. */
.game-topbar .react-tray { margin: 0; }
.game-topbar .react-palette { position: absolute; right: 0; top: calc(100% + 8px); max-width: calc(100vw - 24px); }
/* Panels are stacking contexts (backdrop-filter), so the open popover must
   lift its whole panel above the siblings below it. */
.game-topbar:has(.react-palette:not(.hidden)) { position: relative; z-index: 40; }
body.screen-round-live .game-topbar:has(.react-palette:not(.hidden)) { position: relative; }

.react-float {
  position: fixed; bottom: -90px; width: 84px; z-index: 9998; pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(141,92,255,0.55));
  animation: react-rise 2.6s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes react-rise {
  0%   { transform: translate(0, 0) scale(0.5) rotate(0); opacity: 0; }
  12%  { opacity: 1; transform: translate(0, -14vh) scale(1.15) rotate(var(--spin, 8deg)); }
  70%  { opacity: 1; }
  100% { transform: translate(var(--drift, 30px), -78vh) scale(0.9) rotate(calc(var(--spin, 8deg) * -1)); opacity: 0; }
}
.react-float.calm { left: 50%; bottom: 40%; transform: translateX(-50%); animation: react-calm 1.8s ease forwards; }
@keyframes react-calm { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }

.chat-msg .chat-react { height: 46px; display: block; margin: 2px 0; filter: drop-shadow(0 0 10px rgba(141,92,255,0.5)); }
.chat-msg.is-react span { display: none; }

/* ---- First-visit tour ------------------------------------------------------ */
.tour-overlay.hidden { display: none; }
.tour-backdrop { position: fixed; inset: 0; background: rgba(4, 5, 16, 0.72); z-index: 9990; }
.tour-ring { position: fixed; z-index: 9991; border: 2px solid var(--cyan, #39f6ff); border-radius: 16px; box-shadow: 0 0 0 6px rgba(57,246,255,0.18), 0 0 34px rgba(57,246,255,0.45), inset 0 0 0 200vmax rgba(0,0,0,0); pointer-events: none; transition: all 320ms cubic-bezier(0.3, 1, 0.4, 1); }
.tour-card { position: fixed; z-index: 9992; width: min(320px, calc(100vw - 24px)); padding: 16px 18px; border-radius: 16px; background: rgba(12, 10, 30, 0.98); border: 1px solid rgba(141,92,255,0.5); box-shadow: 0 18px 50px rgba(0,0,0,0.6), 0 0 30px rgba(141,92,255,0.25); transition: all 320ms cubic-bezier(0.3, 1, 0.4, 1); }
.tour-card h4 { margin: 0 0 6px; font-size: 17px; }
.tour-card .tour-text { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; opacity: 0.92; }
.tour-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tour-dots { font-size: 11px; letter-spacing: 3px; color: var(--cyan, #39f6ff); }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card { transition: none; } }

/* --- $MemO coin in the hero orbit: fill the circle with the coin art (keeps the yellow glow ring) --- */
.coin-orbit img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* --- Site footer (Table + Community pages; Vote page already used .site-footer) --- */
.site-footer {
  max-width: 1340px;
  margin: 40px auto 0;
  padding: 22px 20px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: rgba(235, 235, 245, 0.62);
  font-size: 13px;
  line-height: 1.6;
}
.site-footer__coin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
  box-shadow: 0 0 18px rgba(255, 228, 92, 0.28);
}
.site-footer a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 800;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer__fine {
  margin-top: 6px;
  font-size: 11.5px;
  color: rgba(235, 235, 245, 0.4);
}
