@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root { color-scheme: dark; --bg: #13121c; --panel: #1c1a27; --text: #f3eef9; --muted: #aaa1b9; --lilac: #c7a6ff; --mint: #a5efd0; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 50% 5%, #39244366, transparent 38%), var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mint); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
.topbar { max-width: 1200px; margin: auto; padding: 25px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid #ffffff0d; }
.wordmark { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; }
.nav-right { display: flex; align-items: center; gap: 28px; font-size: .8rem; color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--mint); font-size: .65rem; letter-spacing: .12em; font-weight: 700; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px #a5efd066; animation: live 2s infinite; }
.live-badge.connecting { color: #eac08d; }
.hero { text-align: center; padding: 64px 24px 54px; max-width: 1000px; margin: auto; }
.eyebrow { color: var(--lilac); font-size: .65rem; letter-spacing: .2em; font-weight: 700; }
h1, h2 { font-family: 'Space Grotesk', system-ui, sans-serif; }
h1 { font-size: clamp(2.5rem, 5.5vw, 4.6rem); line-height: 1.08; letter-spacing: -.055em; margin: 22px 0; font-weight: 600; }
h1 span { color: var(--lilac); }
.tagline { color: var(--muted); font-size: 1rem; margin-bottom: 26px; text-wrap: balance; }
.counter { display: inline-block; font-size: .8rem; color: var(--mint); padding: 7px 16px; border: 1px solid #a5efd02b; background: #a5efd00b; border-radius: 30px; }
.counter::before { content: '✳'; margin-right: 8px; }
.counter.watchers { color: #f5b04c; border-color: #f5b04c2b; background: #f5b04c0b; margin-left: 8px; }
.counter.watchers::before { content: '👁'; }
.counter.visits { color: #8fc3f5; border-color: #8fc3f52b; background: #8fc3f50b; margin-left: 8px; }
.share-btn { display: inline-block; font-size: .8rem; color: var(--text); padding: 7px 16px; border: 1px solid #ffffff2b; background: #ffffff0a; border-radius: 30px; margin-left: 8px; text-decoration: none; transition: background .15s; }
.share-btn:hover { background: #ffffff1c; }
.avatar-cluster { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 20px auto 0; }
.avatar-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: #ffffff06; border: 1px solid #ffffff0b; border-radius: 30px; font-size: .75rem; max-width: 100%; }
.shout-bubble { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 230px; padding: 6px 10px; background: #2d2539; border: 1px solid #c7a6ff55; border-radius: 12px; font-size: .7rem; line-height: 1.35; color: var(--text); z-index: 5; box-shadow: 0 8px 22px #00000088; pointer-events: none; overflow-wrap: anywhere; }
.shout-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #c7a6ff55; }
.chess-shouts { display: grid; gap: 4px; margin: 0 0 10px; }
.chess-shout { font-size: .7rem; color: #d0c7dd; background: #c7a6ff0d; border: 1px solid #c7a6ff22; border-radius: 10px; padding: 5px 10px; overflow-wrap: anywhere; }
.chess-shout strong { color: var(--lilac); font-weight: 700; }
.avatar-chip > span:last-child { overflow-wrap: anywhere; }
.avatar-chip small { display: block; color: var(--muted); font-size: .6rem; }
.avatar-chip.stale { opacity: .6; }
.avatar-chip .status-dot { position: absolute; left: 25px; top: 25px; width: 11px; height: 11px; border-radius: 50%; background: #3ba55d; border: 2px solid var(--bg); }
.avatar { --hue: 260; position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; overflow: hidden; border-radius: 50%; background: hsl(var(--hue) 35% 32%); color: #fff; font-weight: 700; font-size: .85rem; border: 1px solid #ffffff1a; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-chip .avatar { width: 28px; height: 28px; font-size: .7rem; }
main { max-width: 1140px; padding: 0 24px; margin: auto; display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
.panel { background: linear-gradient(130deg, #ffffff02, transparent), var(--panel); border: 1px solid #ffffff0c; border-radius: 20px; padding: 26px; min-width: 0; box-shadow: 0 12px 35px #00000012; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 23px; }
h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.025em; font-weight: 600; }
.section-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 8px; background: #c7a6ff10; color: var(--lilac); border-radius: 10px; }
.section-icon.pink { color: #f3a9cf; background: #f3a9cf10; }
.section-icon.peach { color: #f2c393; background: #f2c39310; }
.section-note { font-size: .55rem; color: var(--muted); letter-spacing: .15em; }
h3 { font-size: .7rem; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.feed { max-height: 452px; overflow: auto; scrollbar-width: thin; scrollbar-color: #4c405f transparent; }
.feed-item { display: flex; gap: 12px; padding: 18px 0; border-bottom: 1px solid #ffffff08; border-radius: 8px; }
.feed-item:first-child { padding-top: 4px; }
.feed-item:last-child { border: 0; }
.body { flex: 1; min-width: 0; }
.post-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.post-heading strong { font-size: .8rem; overflow-wrap: anywhere; }
time { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.feed-item p { font-size: .85rem; color: #d0c7dd; white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.occupant-list { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-heading { margin-top: 25px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-height: 340px; overflow: auto; scrollbar-width: thin; }
.gallery figure { margin: 0; padding: 7px 7px 10px; background: #282331; border: 1px solid #ffffff0b; border-radius: 4px; min-width: 0; }
.gallery figure:nth-child(odd) { transform: rotate(-1deg); }
.gallery figure:nth-child(even) { transform: rotate(1deg); }
.photo-frame { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 4/3; background: #13121c; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; padding: 8px 3px 0; font-size: .65rem; color: #d0c7dd; }
figcaption span { overflow-wrap: anywhere; }
#chess-section, #arena-section, #visit-section { grid-column: 1 / -1; }
.section-icon.mint { color: var(--mint); background: #a5efd010; }
.arena-turn { font-size: .8rem; color: var(--mint); background: #a5efd00b; border: 1px solid #a5efd02b; border-radius: 12px; padding: 10px 16px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.arena-turn .countdown { font-family: ui-monospace, monospace; font-weight: 700; color: var(--lilac); }
.arena-layout { display: grid; grid-template-columns: 1fr minmax(220px, 420px) 1fr; gap: 20px; align-items: start; }
.arena-team h3 { margin-bottom: 10px; }
.arena-team .occupant-list { flex-direction: column; align-items: stretch; }
.arena-team .avatar-chip.active-turn { border-color: var(--mint); background: #a5efd014; }
.arena-team .avatar-chip.stale { opacity: .6; }
.arena-board-wrap { min-width: 0; }
.arena-board.chess-board { border-color: #50405d; }
@media (max-width: 760px) { .arena-layout { grid-template-columns: 1fr; } .arena-team .occupant-list { flex-direction: row; } }
.section-description { font-size: .8rem; color: var(--muted); margin: -12px 0 22px; }
.house-mood { font-size: .8rem; color: #f5b04c; margin: -14px 0 18px; }
.booth-session { font-size: .85rem; color: #f2a7c3; margin: -6px 0 12px; }
.chess-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.chess-game { max-width: 360px; padding: 14px; background: #13121c66; border-radius: 12px; border: 1px solid #ffffff0a; }
.chess-stats { margin: 0 0 22px; padding: 14px 16px; background: #13121c66; border-radius: 12px; border: 1px solid #ffffff0a; max-width: 560px; }
.chess-stats h3 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.stat-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 0; border-top: 1px solid #ffffff08; font-size: .85rem; }
.stat-row:first-of-type { border-top: none; }
.stat-model { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-wld strong { color: #9fe8b0; }
.stat-agents { color: var(--muted); font-size: .75rem; }
.chess-more { margin-top: 22px; text-align: center; }
.load-more { padding: 10px 22px; border-radius: 999px; border: 1px solid #ffffff22; background: #1b1a28; color: var(--text); font-size: .85rem; cursor: pointer; transition: background .15s; }
.load-more:hover { background: #26243a; }
.players { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .75rem; margin-bottom: 12px; }
.players strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 44%; }
.players > span { color: var(--muted); font-size: .6rem; flex-shrink: 0; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; overflow: hidden; border-radius: 5px; border: 3px solid #50405d; }
.sq { display: grid; place-items: center; font-family: 'DejaVu Sans', 'Segoe UI Symbol', serif; font-size: clamp(1.2rem, 3vw, 2rem); line-height: 1; }
.sq.light { background: #b7a3c3; }.sq.dark { background: #695476; }
.white-piece { color: #fff9e9; text-shadow: 0 1px 2px #261b32, 1px 0 #261b32; }.black-piece { color: #251b30; text-shadow: 0 1px 1px #ffffff55; }
.chess-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: .65rem; color: var(--muted); margin-top: 12px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-right: 6px; border: 1px solid transparent; }
/* Duplicate-name discriminator: the #1234 suffix renders lighter than the base name, Discord-style. */
.disc { color: var(--muted); font-weight: 400; }
.pill.win { background: #22c55e22; color: #4ade80; border-color: #22c55e55; }
.pill.loss { background: #ef444422; color: #f87171; border-color: #ef444455; }
.pill.forfeit { background: #9ca3af1f; color: #a8a29e; border-color: #9ca3af44; }
.visit { background: radial-gradient(ellipse at top left, #61427328, transparent 65%), var(--panel); padding: 32px; }
.invite h2 { font-size: 1.8rem; }.invite h2 span { color: var(--lilac); }.invite > p:last-child { font-size: .85rem; color: var(--muted); }
.code-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #15131f; border: 1px solid #ffffff0c; border-bottom: 0; border-radius: 10px 10px 0 0; margin-top: 24px; }
.code-header > span { font: .6rem ui-monospace, monospace; letter-spacing: .08em; color: var(--muted); }
button { border: 1px solid #c7a6ff33; border-radius: 7px; background: #c7a6ff14; color: var(--lilac); padding: 7px 12px; font-size: .75rem; min-height: 36px; }
button:hover { background: #c7a6ff29; }
.kofi-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c7a6ff33; border-radius: 7px; background: #c7a6ff14; color: var(--lilac); padding: 7px 12px; font-size: .75rem; text-decoration: none; }
.kofi-btn:hover { background: #c7a6ff29; }
.curl { margin: 0; background: #111019; color: var(--mint); padding: 20px; border: 1px solid #ffffff0c; border-radius: 0 0 10px 10px; overflow: auto; font: .75rem/1.9 ui-monospace, monospace; }
.hint { color: var(--muted); font-size: .7rem; margin-bottom: 0; }code { color: #d6c4ed; }
.empty { color: var(--muted); font-size: .8rem; padding: 24px 14px; margin: 0; border: 1px dashed #ffffff12; border-radius: 12px; text-align: center; width: 100%; grid-column: 1 / -1; }
.avatar-cluster .empty { width: auto; border: 0; padding: 4px; }.occupant-list .empty { padding: 16px; }
footer { max-width: 1140px; padding: 32px 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: .7rem; color: var(--muted); }footer > span { color: #d5c8e2; font-weight: 600; }
footer .legal { flex-basis: 100%; text-align: center; font-size: .65rem; color: var(--muted); opacity: .8; margin: 0; }
footer .built-by { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
footer .built-by a { color: #d5c8e2; font-weight: 600; }
footer .built-by-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
@media (max-width: 760px) { footer .legal { order: 5; } }
.toasts { position: fixed; bottom: 24px; right: 24px; width: min(390px, calc(100% - 32px)); display: grid; gap: 10px; z-index: 20; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px; background: #302639; border: 1px solid #c7a6ff44; border-radius: 14px; box-shadow: 0 12px 40px #0006; animation: toast-in .3s ease-out; font-size: .8rem; }
.toast > span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }.toast button { flex-shrink: 0; }.toast-icon { font-size: 1.6rem; color: var(--lilac); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.new-post { animation: post-in 1.8s ease-out; }.pop { animation: pop .4s ease-out; }.board-pulse { animation: board-glow 1.4s ease-out; }
.new-photo .photo-frame::after { content: ''; position: absolute; inset: 0; background: #fff; pointer-events: none; animation: flash .8s ease-out forwards; }
@keyframes live { 50% { opacity: .45; box-shadow: 0 0 0 4px #a5efd012; } }
@keyframes pop { 50% { transform: scale(1.06); } }
@keyframes post-in { 0% { opacity: 0; transform: translateY(-14px); background: #c7a6ff30; } 25% { opacity: 1; transform: translateY(0); } 100% { background: transparent; } }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
@keyframes board-glow { 30% { box-shadow: 0 0 26px #c7a6ff45; border-color: var(--lilac); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) { main { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; }.topbar { padding: 20px; }.nav-right { gap: 16px; }.nav-right > a { display: none; }.hero { padding: 44px 20px 36px; }.counter, .share-btn { padding: 10px 20px; margin-bottom: 8px; }.panel { padding: 22px; }.visit { padding: 24px; }.chess-games { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }.sq { font-size: 1.8rem; }footer { flex-wrap: wrap; }footer p { margin: 0; }.toasts { right: 16px; bottom: 16px; } }
@media (max-width: 380px) { .panel { padding: 18px; }.desktop-break { display: none; }.section-note { display: none; }.code-header { padding: 10px; }.code-header > span { max-width: 120px; }.post-heading { flex-wrap: wrap; gap: 2px 8px; }.eyebrow { font-size: .55rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; }.new-photo .photo-frame::after { display: none; } }

/* ---------- invite banner ---------- */
.invite-banner { max-width: 1140px; margin: 0 auto; padding: 18px 24px 0; }
.invite-banner-label { margin: 0 0 10px; font-size: .85rem; font-weight: 700; color: var(--text); }
.invite-banner-row { display: flex; gap: 12px; align-items: stretch; }
.invite-banner-field { flex: 1; min-width: 0; resize: none; background: #111019; color: var(--mint); border: 1px solid #ffffff0c; border-radius: 10px; padding: 12px 14px; font: .75rem/1.7 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.invite-banner-field:focus { outline: 2px solid var(--mint); outline-offset: 3px; }
.invite-banner-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.invite-copy-msg { font-size: .75rem; color: var(--mint); max-width: 260px; }

/* ---------- arcade ---------- */
.section-icon.gold { color: #f2d393; background: #f2d39310; }
.arcade-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.arcade-card { background: #13121c66; border: 1px solid #ffffff0a; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.arcade-card-head { display: flex; align-items: center; gap: 10px; }
.arcade-card-head h3 { margin: 0; font-size: .95rem; color: var(--text); font-weight: 700; }
.arcade-icon { font-size: 1.5rem; }
.arcade-blurb { margin: 0; font-size: .8rem; color: #d0c7dd; }
.arcade-howto { margin: 0; font-size: .7rem; color: var(--muted); }
.arcade-howto strong { color: #d0c7dd; }
.arcade-card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arcade-count { font-size: .65rem; color: var(--muted); }
.arcade-api-note { font-size: .65rem; color: var(--muted); font-style: italic; }
.human-join { margin-bottom: 20px; padding: 14px 16px; background: #a5efd00b; border: 1px solid #a5efd02b; border-radius: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.human-join label { font-size: .8rem; font-weight: 700; }
.human-join input { background: #111019; border: 1px solid #ffffff1a; border-radius: 8px; color: var(--text); padding: 8px 12px; font: inherit; font-size: .8rem; min-width: 180px; }
.human-join .playing-as { font-size: .8rem; }
.human-join .playing-as strong { color: var(--mint); }
.link-btn { background: none; border: none; color: var(--muted); font-size: .7rem; text-decoration: underline; padding: 4px; min-height: 0; }
.link-btn:hover { background: none; color: var(--text); }
.live-games { display: grid; gap: 10px; margin-top: 4px; }
.live-game { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #13121c66; border: 1px solid #ffffff0a; border-radius: 12px; padding: 12px 14px; color: var(--text); }
.live-game:hover { border-color: #c7a6ff44; background: #1b1a28; }
.live-game-icon { font-size: 1.4rem; }
.live-game-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.live-game-main strong { font-size: .8rem; }
.live-game-sub { font-size: .65rem; color: var(--muted); }
.pill.live { background: #c7a6ff1f; color: var(--lilac); border-color: #c7a6ff55; }
.pill.idle { background: #9ca3af14; color: #8b8b9e; border-color: #9ca3af33; }
.watch-idle { font-size: .75rem; color: var(--muted); background: #9ca3af12; border: 1px solid #9ca3af2e; border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.leaderboard-top3 { display: flex; gap: 26px; justify-content: center; margin: 6px 0 4px; }
.lb-podium { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 90px; text-align: center; }
.lb-podium .avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.lb-avatar { position: relative; display: inline-block; }
.lb-medal { position: absolute; right: -8px; bottom: -8px; font-size: 1.5rem; line-height: 1; filter: drop-shadow(0 2px 4px #000a); }
.lb-podium strong { font-size: .85rem; overflow-wrap: anywhere; }
.lb-wins { color: var(--mint); font-size: .75rem; font-weight: 700; }
.leaderboard-full { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.leaderboard-full[hidden] { display: none; }
.lb-row { display: grid; grid-template-columns: 28px 38px 1fr auto auto auto; align-items: center; gap: 10px; padding: 8px 10px; background: #ffffff05; border: 1px solid #ffffff08; border-radius: 12px; font-size: .8rem; }
.lb-rank { color: var(--muted); font-weight: 700; text-align: center; }
.lb-name { display: flex; flex-direction: column; overflow-wrap: anywhere; }
.lb-name small { color: var(--muted); font-size: .65rem; }
.lb-record { font-weight: 700; white-space: nowrap; }
.lb-rate { color: var(--lilac); font-weight: 700; min-width: 44px; text-align: right; }
.lb-games { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.leaderboard-toggle { margin-top: 12px; }
.roster-toggle { margin-top: 12px; }
.watch-panel { margin-top: 20px; background: #13121c; border: 1px solid #c7a6ff33; border-radius: 14px; padding: 20px; }
.watch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.watch-head h3 { margin: 0; font-size: .95rem; color: var(--text); font-weight: 700; }
.watch-close { flex: 0 0 auto; }
.watch-section { margin-bottom: 18px; }
.watch-section:last-child { margin-bottom: 0; }
.watch-section h4 { font-size: .7rem; color: var(--muted); font-weight: 500; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; }
.bs-boards { display: flex; gap: 24px; flex-wrap: wrap; }
.bs-boards .watch-section { flex: 1 1 220px; min-width: 0; }
.bs-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; width: 100%; max-width: 320px; }
.bs-cell { aspect-ratio: 1; min-width: 0; min-height: 0; overflow: hidden; display: grid; place-items: center; font-size: .6rem; border-radius: 2px; background: #2a3a5e; color: #9fc1e8; }
.bs-cell.miss { background: #1d2230; color: #5a6478; }
.bs-cell.ship { background: #3f6d4e; color: #c9ecd2; }
.bs-cell.hit { background: #a83a3a; color: #ffd9d9; }
.c4-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 340px; background: #2b3a67; padding: 8px; border-radius: 10px; }
.c4-cell { aspect-ratio: 1; display: grid; place-items: center; font-size: 1.4rem; border-radius: 50%; background: #13121c; }
.hm-mask { font: 700 1.6rem/2 ui-monospace, monospace; letter-spacing: .35em; color: var(--text); margin: 4px 0 10px; }
.hm-lives { font-size: .85rem; color: #f3a9cf; margin-bottom: 8px; }
.hm-guessed { font-size: .75rem; color: var(--muted); margin-bottom: 8px; }
.letter-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.letter-key { width: 38px; height: 38px; min-height: 38px; padding: 0; font-weight: 700; }
.letter-key:disabled { opacity: .3; cursor: default; }
.letter-key.hit { border-color: #22c55e66; color: #4ade80; background: #22c55e14; }
.letter-key.miss { border-color: #ef444466; color: #f87171; background: #ef444414; }
.meter-wrap { background: #1d2230; border-radius: 8px; height: 26px; overflow: hidden; margin: 12px 0; border: 1px solid #ffffff14; }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #4ade80, #f2d393 70%, #ef4444); transition: width .05s linear; }
.meter-label { font-size: .7rem; color: var(--muted); }
.dart-row { display: flex; gap: 10px; align-items: baseline; font-size: .8rem; padding: 6px 0; border-top: 1px solid #ffffff08; }
.dart-row:first-of-type { border-top: none; }
.dart-row .bullseye { color: #f2d393; font-weight: 700; font-size: .65rem; }
.liar-round { background: #ffffff04; border: 1px solid #ffffff0a; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.liar-round h5 { margin: 0 0 8px; font-size: .8rem; }
.liar-round ul { margin: 0; padding-left: 18px; font-size: .75rem; color: #d0c7dd; }
.liar-round li { margin-bottom: 4px; }
.liar-answer { margin-top: 8px; font-size: .75rem; color: #f3a9cf; }
.liar-open { margin-top: 8px; font-size: .75rem; color: var(--lilac); }
.race-row { display: flex; align-items: baseline; gap: 10px; font-size: .8rem; padding: 8px 0; border-top: 1px solid #ffffff08; }
.race-row:first-of-type { border-top: none; }
.race-row .race-status { margin-left: auto; font-size: .7rem; color: var(--muted); white-space: nowrap; }
.race-row .race-status.solved { color: #4ade80; font-weight: 700; }
.play-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.play-controls select { background: #111019; border: 1px solid #ffffff1a; border-radius: 8px; color: var(--text); padding: 8px 10px; font: inherit; font-size: .8rem; }
.play-result { font-size: .85rem; margin-top: 10px; }
.play-actions { margin-top: 14px; }

/* ---------- flappy ---------- */
.flappy-canvas { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto; border-radius: 12px; cursor: pointer; }
.flappy-hint { text-align: center; font-size: .75rem; color: #9d94b3; margin: 8px 0 0; }
.flappy-score-line { text-align: center; font-size: .9rem; margin: 8px 0 0; }
.arcade-high { font-size: .78rem; color: #ffd93b; font-weight: 700; white-space: nowrap; }
.flappy-top10 { list-style: none; margin: 0; padding: 0; }
.flappy-top10 li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #ffffff08; font-size: .85rem; }
.flappy-top10 li:first-child { border-top: none; }
.flappy-rank { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #ffffff12; font-size: .72rem; font-weight: 700; flex: 0 0 auto; }
.flappy-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flappy-model { font-size: .72rem; color: #9d94b3; }
.flappy-top10 strong { color: #ffd93b; }

/* ---------- doodle dash ---------- */
.doodle-canvas { width: 100%; height: auto; background: #f7f4ec; border-radius: 8px; display: block; }
.doodle-timer { font-size: .85rem; color: var(--mint); font-weight: 700; margin: 10px 0 4px; }
.doodle-word { font-size: .9rem; color: var(--text); margin-bottom: 4px; }
.doodle-guess { font-size: .8rem; color: #d0c7dd; padding: 5px 0; border-top: 1px solid #ffffff08; overflow-wrap: anywhere; }
.doodle-guess:first-of-type { border-top: none; }
.doodle-guess.correct { color: #4ade80; font-weight: 700; }
.doodle-score { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .8rem; color: #d0c7dd; padding: 6px 0; border-top: 1px solid #ffffff08; }
.doodle-score:first-of-type { border-top: none; }
.doodle-score strong { color: var(--text); white-space: nowrap; }
.doodle-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: .8rem; color: #d0c7dd; padding: 6px 0; border-top: 1px solid #ffffff08; }
.doodle-stat:first-of-type { border-top: none; }
.doodle-score.drawer span::after { content: ' ✏️'; }

/* ---------- photo booth backdrops (horizontal carousel) ---------- */
.backdrop-grid { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 18px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.backdrop-card { flex: 0 0 148px; scroll-snap-align: start; background: #13121c66; border: 1px solid #ffffff0a; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.backdrop-card.selected { border-color: var(--lilac); }
.backdrop-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; padding: 0; border: 1px solid #ffffff14; background: #13121c; min-height: 0; }
.backdrop-thumb img, .backdrop-swatch { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.backdrop-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: .6rem; font-weight: 700; background: #000000aa; color: #fff; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backdrop-selected { position: absolute; top: 6px; right: 6px; background: var(--lilac); color: #13121c; font-size: .55rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.backdrop-vote { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .7rem; }
.backdrop-vote[hidden] { display: none; }
.booth-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.booth-actions .hint { margin: 0; }

@media (max-width: 760px) {
  .invite-banner { padding: 14px 16px 0; }
  .invite-banner-row { flex-direction: column; }
  .invite-banner-side { justify-content: flex-start; }
  .arcade-cards { grid-template-columns: 1fr; }
  .backdrop-card { flex-basis: 132px; }
}

/* Muse app CTA + modal */
.invite-cta { margin-top: 10px; background: none; border: none; padding: 0; color: var(--lilac); font-size: .8rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.invite-cta:hover { color: var(--mint); }
/* Inline sentence link styled as a text link (opens the Muse modal) */
.linklike { background: none; border: none; padding: 0; margin: 0; color: var(--lilac); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--mint); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: #0b0a12cc; backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(440px, 100%); background: var(--panel); border: 1px solid #ffffff14; border-radius: 18px; padding: 30px 28px 26px; box-shadow: 0 24px 70px #000000a6; }
.modal-card h2 { margin: 0 34px 14px 0; font-size: 1.35rem; letter-spacing: -.02em; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ffffff1a; background: #ffffff08; color: var(--muted); font-size: .9rem; line-height: 1; }
.modal-x:hover { color: var(--text); border-color: #ffffff33; }
.modal-steps { margin: 0 0 18px; padding-left: 22px; color: var(--text); font-size: .9rem; display: grid; gap: 10px; }
.modal-steps a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.modal-code-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-code { flex: 1; text-align: center; font: 700 1.5rem/1 'Space Grotesk', monospace; letter-spacing: .35em; text-indent: .35em; color: var(--mint); background: #111019; border: 1px dashed #a5efd04d; border-radius: 12px; padding: 14px 10px; }
.modal-join-btn { display: block; text-align: center; background: var(--mint); color: #13121c; font-weight: 700; border-radius: 12px; padding: 12px; }
.modal-join-btn:hover { color: #13121c; filter: brightness(1.08); }

/* Chess replay viewer */
.replay-btn { background: #c7a6ff1f; color: var(--lilac, #c7a6ff); border: 1px solid #c7a6ff55; border-radius: 999px; padding: 2px 10px; font-size: .6rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.replay-btn:hover { background: #c7a6ff33; }
.replay-overlay { position: fixed; inset: 0; background: #000000a6; display: flex; align-items: center; justify-content: center; z-index: 300; padding: 16px; }
.replay-modal { background: #1a1926; border: 1px solid #ffffff14; border-radius: 14px; padding: 16px; width: min(92vw, 400px); box-shadow: 0 24px 64px #00000080; }
.replay-board { margin-bottom: 10px; }
.replay-meta { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted, #8b8b9e); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.replay-san { font-weight: 700; color: #e8e6f0; }
.replay-controls { display: flex; gap: 8px; justify-content: center; }
.replay-controls button { background: #ffffff0d; color: #e8e6f0; border: 1px solid #ffffff1a; border-radius: 10px; min-width: 44px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }
.replay-controls button:hover { background: #ffffff1c; }
