/* ───────────────────────── Miles Apart Arcade ───────────────────────── */
:root {
  --bg: #140f22;
  --bg-2: #1d1430;
  --ink: #f7f0ea;
  --ink-2: #c9bdd6;
  --ink-3: #8f82a3;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --card: rgba(255, 255, 255, 0.055);
  --card-2: rgba(255, 255, 255, 0.085);
  --a: #ff8a6b;       /* player A — coral */
  --a-soft: rgba(255, 138, 107, 0.18);
  --b: #a594ff;       /* player B — lilac */
  --b-soft: rgba(165, 148, 255, 0.18);
  --rose: #ff5d8f;
  --butter: #ffd36e;
  --mint: #7ee0b5;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.7);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
::selection { background: var(--rose); color: #fff; }

/* Sky backdrop */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #2a1945 0%, var(--bg) 60%); }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.g1 { width: 420px; height: 420px; background: #ff7a6b; left: -160px; top: 30%; opacity: 0.18; animation: drift 18s ease-in-out infinite alternate; }
.g2 { width: 480px; height: 480px; background: #7d6bff; right: -200px; top: -80px; opacity: 0.22; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(40px, 60px) scale(1.1); } }
.stars {
  position: absolute; inset: 0; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 42%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 66%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 88%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 55%, #fff 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.25; } }

#app { min-height: 100dvh; }
.page {
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px calc(40px + var(--safe-b));
  animation: pageIn 0.45s cubic-bezier(.2, .8, .2, 1);
}
.page.wide { max-width: 980px; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }

/* Type */
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
.display em { font-style: italic; font-weight: 500; color: var(--butter); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; letter-spacing: 0.005em;
  background: linear-gradient(180deg, #ffa182, #ff7a6b); color: #2a0f12;
  box-shadow: 0 10px 26px -10px rgba(255, 122, 107, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.2s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.lilac { background: linear-gradient(180deg, #b8aaff, #9583ff); color: #170f33; box-shadow: 0 10px 26px -10px rgba(149, 131, 255, 0.8), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; transition: transform .15s, background .2s;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }

/* Inputs */
.field {
  width: 100%; min-height: 56px; padding: 0 18px; border-radius: 16px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-2); outline: none;
  font-size: 18px; font-weight: 600; transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: var(--b); box-shadow: 0 0 0 4px var(--b-soft); }
.field::placeholder { color: var(--ink-3); font-weight: 500; }
.code-field { text-align: center; letter-spacing: 0.35em; text-transform: uppercase; font-family: var(--display); font-size: 24px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Brand ── */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1; }
.brand-name small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin-top: 3px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.topbar .right { display: flex; gap: 8px; align-items: center; }

/* ── Onboarding / home ── */
.hero { text-align: center; padding: 28px 0 10px; }
.hero h1 { font-size: clamp(42px, 12vw, 64px); margin: 18px 0 12px; }
.hero p { margin: 0 auto; max-width: 340px; font-size: 17px; }
.orbit { position: relative; width: 220px; height: 110px; margin: 0 auto; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit .dot { position: absolute; bottom: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; }
.orbit .dot.a { left: 0; background: var(--a-soft); box-shadow: inset 0 0 0 2px var(--a); }
.orbit .dot.b { right: 0; background: var(--b-soft); box-shadow: inset 0 0 0 2px var(--b); }
.travel-heart { offset-path: path('M28 82 Q110 -20 192 82'); animation: travel 3.4s ease-in-out infinite alternate; position: absolute; left: 0; top: 0; font-size: 20px; }
@keyframes travel { from { offset-distance: 0%; } to { offset-distance: 100%; } }

.stack { display: grid; gap: 14px; }
.panel { padding: 22px; }
.panel h2 { font-family: var(--display); font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
.panel p { margin: 0 0 16px; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emoji-opt { aspect-ratio: 1; border-radius: 14px; font-size: 26px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .2s, background .2s; }
.emoji-opt:hover { transform: translateY(-2px); }
.emoji-opt.on { background: var(--a-soft); box-shadow: inset 0 0 0 2px var(--a); transform: scale(1.05); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; font-weight: 600; margin: 4px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.join-row { display: flex; gap: 10px; }
.join-row .field { flex: 1; }
.resume { display: flex; align-items: center; gap: 14px; padding: 16px 18px; width: 100%; text-align: left; }
.resume .code { font-family: var(--display); font-size: 20px; letter-spacing: 0.12em; }
.resume .arrow { margin-left: auto; font-size: 20px; color: var(--ink-3); }
.link-btn { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; padding: 6px; }

/* ── Room hub ── */
.room-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; letter-spacing: 0.14em; }
.room-chip .net { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.room-chip .net.up { background: var(--mint); box-shadow: 0 0 0 4px rgba(126, 224, 181, .18); }

.couple { padding: 22px 18px 18px; position: relative; overflow: hidden; }
.couple::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 90% at 0% 0%, var(--a-soft), transparent 60%), radial-gradient(60% 90% at 100% 0%, var(--b-soft), transparent 60%); pointer-events: none; }
.couple-row { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.person { text-align: center; min-width: 0; }
.avatar { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; position: relative; transition: transform .3s; }
.avatar.a { background: var(--a-soft); box-shadow: inset 0 0 0 2.5px var(--a); }
.avatar.b { background: var(--b-soft); box-shadow: inset 0 0 0 2.5px var(--b); }
.avatar.empty { background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 2px var(--line-2); color: var(--ink-3); font-size: 28px; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(0.94); opacity: .7; } }
.avatar .status { position: absolute; right: 2px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); border: 3px solid #1f1631; }
.avatar .status.on { background: var(--mint); }
.person .name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .sub { font-size: 13px; color: var(--ink-2); }
.bridge { width: 78px; height: 40px; position: relative; }
.bridge svg { width: 100%; height: 100%; overflow: visible; }
.bridge .beat { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); font-size: 20px; }
.bridge .beat.live { animation: beat 1.3s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: translate(-50%, -60%) scale(1); } 15% { transform: translate(-50%, -60%) scale(1.25); } 30% { transform: translate(-50%, -60%) scale(1); } 45% { transform: translate(-50%, -60%) scale(1.15); } }
.couple-actions { position: relative; display: flex; gap: 10px; margin-top: 18px; }
.couple-actions .btn { flex: 1; }

.invite { padding: 18px; display: grid; gap: 12px; border-style: dashed; border-color: var(--line-2); background: rgba(255,255,255,.03); box-shadow: none; }
.invite .link { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.invite .link span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h3 { font-family: var(--display); font-size: 26px; margin: 0; letter-spacing: -0.01em; }

.games { display: grid; gap: 12px; }
@media (min-width: 760px) { .page.wide .games { grid-template-columns: 1fr 1fr; } }
.game-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; text-align: left;
  padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), background .2s, border-color .2s; position: relative;
}
.game-card:hover { transform: translateY(-3px); background: var(--card-2); border-color: var(--line-2); }
.game-card:active { transform: scale(0.985); }
.game-art { width: 84px; height: 84px; border-radius: 18px; display: grid; place-items: center; font-size: 42px; position: relative; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 22px -12px rgba(0,0,0,.8); }
.game-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 30% 20%, rgba(255,255,255,.35), transparent 60%); }
.game-art span { position: relative; z-index: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.art-avocado { background: linear-gradient(145deg, #a6d36b, #3f7a2e); }
.art-draw { background: linear-gradient(145deg, #ffe08a, #ff9d5c); }
.art-quiz { background: linear-gradient(145deg, #ff9ac0, #e0457b); }
.art-connect4 { background: linear-gradient(145deg, #a99bff, #5a47d6); }
.art-reaction { background: linear-gradient(145deg, #7ee0d0, #2b8fb0); }
.game-card h4 { margin: 0 0 3px; font-size: 18px; font-weight: 800; letter-spacing: -0.005em; }
.game-card p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--ink-2); }
.tag.coop { background: rgba(126,224,181,.14); color: var(--mint); }
.tag.vs { background: rgba(255,138,107,.14); color: var(--a); }
.tag.tally { background: none; padding-left: 2px; letter-spacing: 0.02em; text-transform: none; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.here-badge { position: absolute; top: -8px; right: 12px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--b); color: #170f33; box-shadow: 0 6px 16px -6px var(--b); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }

.footer-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 28px; }

/* ── Game shell ── */
.game-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.game-top {
  display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px;
  position: sticky; top: 0; z-index: 20; background: linear-gradient(180deg, rgba(20,15,34,.92), rgba(20,15,34,.6) 70%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.game-top .title { font-family: var(--display); font-weight: 700; font-size: 20px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-partner { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; max-width: 140px; }
.mini-partner .e { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--b-soft); font-size: 15px; }
.mini-partner .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-partner .d { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.mini-partner .d.on { background: var(--mint); }
.game-body { flex: 1; position: relative; display: flex; flex-direction: column; }

.waiting {
  position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; padding: 24px;
  background: rgba(20,15,34,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-align: center; animation: pageIn .3s;
}
.waiting .inner { max-width: 320px; display: grid; gap: 12px; justify-items: center; }
.waiting .big { font-size: 46px; animation: breathe 2.4s ease-in-out infinite; }
.waiting h3 { font-family: var(--display); font-size: 26px; margin: 0; }
.waiting p { margin: 0; color: var(--ink-2); }

/* Scoreboard pill used by versus games */
.scoreline { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px auto 0; }
.score-side { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 800; transition: box-shadow .25s, transform .25s; }
.score-side .e { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: 17px; }
.score-side.a .e { background: var(--a-soft); }
.score-side.b .e { background: var(--b-soft); }
.score-side .v { font-family: var(--display); font-size: 20px; min-width: 14px; text-align: center; }
.score-side.turn.a { box-shadow: inset 0 0 0 2px var(--a), 0 0 22px -4px var(--a); transform: translateY(-1px); }
.score-side.turn.b { box-shadow: inset 0 0 0 2px var(--b), 0 0 22px -4px var(--b); transform: translateY(-1px); }
.score-vs { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .1em; }

.status-line { text-align: center; font-weight: 700; font-size: 17px; min-height: 26px; margin: 14px 0 6px; }

/* Toasts, hearts, confetti */
.toasts { position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-t)); z-index: 100; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(36, 26, 56, .95); box-shadow: 0 12px 30px -10px rgba(0,0,0,.8), inset 0 0 0 1px var(--line-2); font-weight: 700; font-size: 14px; transform: translateY(-16px) scale(.96); opacity: 0; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .3s; max-width: calc(100vw - 32px); }
.toast.in { transform: none; opacity: 1; }
.toast-icon { font-size: 18px; }
.heart-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.float-heart { position: absolute; bottom: -40px; animation: floatUp 3s cubic-bezier(.3,.6,.4,1) forwards; opacity: 0; }
@keyframes floatUp { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--drift), -105vh) scale(1.15) rotate(12deg); opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 95; }

/* Modal / result sheet */
.sheet-wrap { position: absolute; inset: 0; z-index: 30; display: grid; place-items: end center; background: rgba(10, 6, 20, .5); animation: fade .3s; }
@media (min-width: 640px) { .sheet-wrap { place-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(440px, 100%); margin: 0 auto; padding: 26px 22px calc(22px + var(--safe-b)); border-radius: 28px 28px 0 0; background: #221836; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8), inset 0 0 0 1px var(--line-2); text-align: center; animation: sheetUp .45s cubic-bezier(.2,1.2,.3,1); }
@media (min-width: 640px) { .sheet { border-radius: 28px; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet .big { font-size: 54px; line-height: 1; }
.sheet h2 { font-family: var(--display); font-size: 32px; margin: 10px 0 6px; letter-spacing: -0.01em; }
.sheet p { margin: 0 0 18px; color: var(--ink-2); }
.sheet .row { display: flex; gap: 10px; }
.sheet .row .btn { flex: 1; }

/* ─────────────── Avocado Cut ─────────────── */
.avo { position: absolute; inset: 0; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.avo canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.avo-hud { position: absolute; left: 0; right: 0; top: 4px; text-align: center; pointer-events: none; z-index: 2; }
.avo-title { font-family: var(--sans); font-weight: 800; font-size: clamp(38px, 10vw, 60px); letter-spacing: -0.02em; text-shadow: 0 4px 24px rgba(0,0,0,.45); line-height: 1; }
.avo-count { font-weight: 800; font-size: 18px; margin-top: 6px; font-variant-numeric: tabular-nums; color: #fff; opacity: .9; }
.avo-bonus { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: linear-gradient(90deg, var(--a), var(--rose), var(--b)); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .04em; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .3s cubic-bezier(.2,1.6,.4,1); }
.avo-bonus.on { opacity: 1; transform: none; }
.avo-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + var(--safe-b)); display: grid; gap: 12px; justify-items: center; z-index: 2; background: linear-gradient(0deg, rgba(20,15,34,.85), transparent); }
.contrib { width: min(420px, 100%); }
.contrib-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; display: flex; }
.contrib-bar .a { background: var(--a); transition: width .3s; }
.contrib-bar .b { background: var(--b); transition: width .3s; }
.contrib-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.cut-btn {
  width: min(420px, 100%); min-height: 66px; border-radius: 22px; font-size: 20px; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(180deg, #c4e88f, #7fbf4d); color: #13280b;
  box-shadow: 0 14px 30px -12px rgba(127, 191, 77, .9), inset 0 1px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,0,0,.12);
  transition: transform .08s;
}
.cut-btn:active, .cut-btn.down { transform: scale(.97) translateY(2px); }
.cut-btn small { display: block; font-size: 12px; font-weight: 700; opacity: .7; letter-spacing: .02em; }
.level-pills { display: flex; gap: 6px; justify-content: center; margin-top: 10px; pointer-events: auto; }
.level-pill { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(0,0,0,.3); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.level-pill.done { color: var(--mint); }
.level-pill.on { color: #13280b; background: #b5e07c; box-shadow: none; }

/* ─────────────── Connect Four ─────────────── */
.c4 { padding: 4px 14px 24px; display: flex; flex-direction: column; align-items: center; }
.c4-board-wrap { width: min(520px, 100%, 62dvh); margin-top: 56px; position: relative; }
.c4-board {
  position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2.2%; padding: 3.2%;
  border-radius: 24px; background: linear-gradient(180deg, #3a2b78, #2a1f5c);
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.85), inset 0 2px 0 rgba(255,255,255,.18), inset 0 -6px 0 rgba(0,0,0,.25);
}
.c4-col { display: flex; flex-direction: column; gap: clamp(5px, 1.6vw, 10px); cursor: pointer; border-radius: 99px; padding: clamp(3px, 1vw, 6px) 0; transition: background .2s; }
.c4-col:hover { background: rgba(255,255,255,.05); }
.c4-cell { aspect-ratio: 1; border-radius: 50%; background: #140f22; box-shadow: inset 0 4px 8px rgba(0,0,0,.6); position: relative; overflow: visible; }
.c4-disc { position: absolute; inset: 0; border-radius: 50%; z-index: 2; }
.c4-disc.a { background: radial-gradient(circle at 35% 30%, #ffc0aa, #ff7a5c 55%, #d9502f); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.c4-disc.b { background: radial-gradient(circle at 35% 30%, #ded6ff, #a594ff 55%, #6e58e6); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18); }
.c4-disc.drop { animation: c4drop var(--dur, .45s) cubic-bezier(.45, 0, .7, 1) both, c4bounce .25s ease-out var(--dur, .45s); }
@keyframes c4drop { from { transform: translateY(var(--from)); } to { transform: translateY(0); } }
@keyframes c4bounce { 40% { transform: translateY(-10%); } }
.c4-disc.win { animation: winPulse .9s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 24px 4px rgba(255,255,255,.6); }
@keyframes winPulse { 50% { transform: scale(.88); } }

/* ─────────────── Reaction Duel ─────────────── */
.rx { flex: 1; display: flex; flex-direction: column; padding: 6px 16px calc(18px + var(--safe-b)); gap: 14px; }
.rx-pad {
  flex: 1; min-height: 320px; border-radius: 30px; display: grid; place-items: center; text-align: center; padding: 20px;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background .12s, transform .08s; position: relative; overflow: hidden;
  background: #2a2040; box-shadow: inset 0 0 0 1px var(--line-2);
}
.rx-pad:active { transform: scale(.99); }
.rx-pad .big { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 11vw, 72px); line-height: 1; letter-spacing: -0.02em; }
.rx-pad .small { font-size: 16px; font-weight: 600; margin-top: 10px; opacity: .85; }
.rx-pad.wait { background: radial-gradient(circle at 50% 40%, #b33a55, #6d1b33); }
.rx-pad.go { background: radial-gradient(circle at 50% 40%, #9af2c9, #2fbf86); color: #08291b; }
.rx-pad.foul { background: radial-gradient(circle at 50% 40%, #6b5a2a, #3a2f14); }
.rx-pad.idle { background: radial-gradient(circle at 50% 30%, #3b2d5e, #221838); }
.rx-pad .ring { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.rx-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rx-time { padding: 12px 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.rx-time .who { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.rx-time .ms { font-family: var(--display); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rx-time.win { box-shadow: inset 0 0 0 2px var(--mint); }
.rx-pips { display: flex; gap: 6px; justify-content: center; }
.rx-pip { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.12); }
.rx-pip.a { background: var(--a); } .rx-pip.b { background: var(--b); }

/* ─────────────── Couple Quiz ─────────────── */
.qz { padding: 6px 16px calc(24px + var(--safe-b)); width: 100%; max-width: 560px; margin: 0 auto; display: grid; gap: 16px; }
.qz-progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.qz-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--a), var(--rose), var(--b)); transition: width .4s; }
.qz-meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.qz-card { padding: 26px 22px; text-align: center; border-radius: 28px; background: linear-gradient(160deg, rgba(255,93,143,.16), rgba(165,148,255,.12)); border: 1px solid var(--line-2); animation: pageIn .4s; }
.qz-kind { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.qz-q { font-family: var(--display); font-size: clamp(24px, 6.4vw, 32px); line-height: 1.15; margin: 10px 0 0; letter-spacing: -0.01em; }
.qz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qz-opt { min-height: 96px; padding: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); font-weight: 800; font-size: 18px; display: grid; place-items: center; gap: 4px; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.qz-opt .e { font-size: 30px; }
.qz-opt:hover { transform: translateY(-2px); background: var(--card-2); }
.qz-opt.picked { border-color: var(--a); background: var(--a-soft); box-shadow: 0 0 0 4px var(--a-soft); }
.qz-opt:disabled { cursor: default; }
.qz-opt:disabled:not(.picked) { opacity: .45; }
.qz-reveal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; animation: pageIn .4s; }
.qz-ans { padding: 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.qz-ans .who { font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.qz-ans .what { font-weight: 800; font-size: 17px; margin-top: 4px; }
.qz-verdict { text-align: center; font-family: var(--display); font-size: 26px; font-weight: 700; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.qz-wait { text-align: center; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; }
.dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin: 0 2px; animation: dot 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .15s; } .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.qz-intro { text-align: center; display: grid; gap: 14px; padding-top: 10px; }
.qz-intro .big { font-size: 64px; }
.qz-intro h2 { font-family: var(--display); font-size: 34px; margin: 0; }
.meter { width: 180px; height: 180px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--rose) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; }
.meter::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: #221836; }
.meter b { position: relative; z-index: 1; font-family: var(--display); font-size: 44px; }

/* ─────────────── Draw & Guess ─────────────── */
.dg { padding: 4px 14px calc(14px + var(--safe-b)); width: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dg-word { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .18em; text-transform: uppercase; }
.dg-word.mine { letter-spacing: .02em; color: var(--butter); }
.dg-timer { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; background: conic-gradient(var(--butter) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); position: relative; flex: none; }
.dg-timer::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg-2); }
.dg-timer span { position: relative; z-index: 1; }
.dg-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 58dvh; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #fffaf2; box-shadow: 0 24px 50px -24px rgba(0,0,0,.8); }
.dg-canvas-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.dg-canvas-wrap .overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; background: rgba(255,250,242,.93); color: #2b1d3d; }
.dg-canvas-wrap .overlay h3 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; }
.dg-canvas-wrap .overlay p { margin: 0 0 14px; color: #6b5a7d; font-weight: 600; }
.dg-choices { display: grid; gap: 10px; width: min(300px, 100%); }
.dg-choice { min-height: 52px; border-radius: 16px; background: #2b1d3d; color: #fffaf2; font-weight: 800; font-size: 18px; transition: transform .15s; }
.dg-choice:hover { transform: translateY(-2px); }
.dg-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.2); transition: transform .15s, box-shadow .15s; }
.swatch.on { transform: scale(1.15); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px #fff; }
.size-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.size-btn i { display: block; border-radius: 50%; background: var(--ink); }
.size-btn.on { box-shadow: inset 0 0 0 2px var(--butter); }
.tool-sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 2px; }
.dg-feed { display: flex; flex-direction: column; gap: 6px; max-height: 120px; overflow-y: auto; padding: 2px; }
.dg-msg { align-self: flex-start; padding: 7px 12px; border-radius: 14px 14px 14px 4px; background: var(--card-2); font-weight: 600; font-size: 14px; animation: pop .25s; }
.dg-msg.close { background: rgba(255,211,110,.18); color: var(--butter); }
.dg-msg.right { background: rgba(126,224,181,.18); color: var(--mint); }
.dg-msg.sys { align-self: center; background: none; color: var(--ink-3); font-size: 13px; }
.dg-guess { display: flex; gap: 8px; }
.dg-guess .field { min-height: 50px; font-size: 16px; }

/* polish fixes */
.btn svg { width: 18px; height: 18px; flex: none; }
.btn { white-space: nowrap; }
.brand-name { white-space: nowrap; }
.couple-actions .btn { padding: 0 14px; font-size: 15px; }
@media (max-width: 420px) {
  .topbar .brand-name { font-size: 17px; }
  .topbar .brand-name small { letter-spacing: .2em; }
  .brand-mark { width: 34px; height: 34px; }
  .room-chip { padding: 7px 10px; font-size: 13px; letter-spacing: .1em; }
  .topbar .icon-btn { width: 38px; height: 38px; }
  .topbar .right { gap: 6px; }
}
@media (max-width: 370px) { .topbar .brand-name { display: none; } }
.c4-ghost { position: absolute; border-radius: 50%; pointer-events: none; transition: left .12s ease, opacity .2s; opacity: 0; }
@media (max-width: 480px) {
  .mini-partner .n { display: none; }
  .mini-partner { padding: 5px 8px 5px 5px; }
  .game-top { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .game-top .icon-btn { width: 38px; height: 38px; }
}

/* ── Who's playing ── */
.who-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.who-card {
  padding: 22px 12px 18px; border-radius: 26px; text-align: center; background: var(--card); border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, opacity .25s; box-shadow: var(--shadow);
}
.who-card:hover { transform: translateY(-3px); }
.who-card:active { transform: scale(.97); }
.who-card.a.on { background: linear-gradient(170deg, rgba(255,138,107,.28), rgba(255,138,107,.06)); box-shadow: inset 0 0 0 2px var(--a), 0 18px 40px -16px rgba(255,138,107,.6); }
.who-card.b.on { background: linear-gradient(170deg, rgba(165,148,255,.3), rgba(165,148,255,.06)); box-shadow: inset 0 0 0 2px var(--b), 0 18px 40px -16px rgba(165,148,255,.6); }
.who-cards:has(.on) .who-card:not(.on) { opacity: .5; }
.who-emoji-big { font-size: 54px; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.who-card.on .who-emoji-big { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.who-name { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
.who-line { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-top: 4px; }
.who-card.on .who-line { color: var(--ink); }
.who-emoji { animation: pageIn .35s; }
.topbar .right .icon-btn { font-size: 20px; }

/* ── Just us ── */
.us-stack { display: grid; gap: 12px; margin-top: 12px; }
.sheet-wrap.fixed { position: fixed; z-index: 80; }
.sheet-wrap.out { opacity: 0; transition: opacity .2s; }
.us-sheet { position: relative; max-height: 90dvh; overflow-y: auto; text-align: left; }
.us-sheet > h2, .us-sheet > p, .us-sheet > .big, .us-sheet > .eyebrow { text-align: center; }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--card-2); color: var(--ink-2); font-size: 14px; }
textarea.field { padding: 14px 16px; min-height: 0; resize: none; font-size: 16px; font-weight: 500; line-height: 1.4; }
input[type="date"].field { color-scheme: dark; }

.countdown { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-align: left; width: 100%;
  background: linear-gradient(120deg, rgba(255,138,107,.16), rgba(255,93,143,.12) 50%, rgba(165,148,255,.16)); transition: transform .2s; }
.countdown:hover { transform: translateY(-2px); }
.cd-num { font-family: var(--display); font-weight: 700; font-size: 54px; line-height: 1; min-width: 64px; text-align: center; background: linear-gradient(180deg, #ffd36e, #ff8a6b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-text { flex: 1; min-width: 0; }
.cd-title { font-weight: 800; font-size: 17px; }
.cd-edit { opacity: .6; font-size: 16px; }
.cd-empty { display: flex; align-items: center; gap: 14px; width: 100%; }
.cd-empty .cd-ic { font-size: 32px; }
.cd-empty .arrow { margin-left: auto; color: var(--ink-3); font-size: 20px; }

.us-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.us-card { padding: 16px; text-align: left; transition: transform .2s, box-shadow .3s; position: relative; }
.us-card:hover { transform: translateY(-2px); }
.us-card.ping { box-shadow: inset 0 0 0 2px var(--rose), 0 0 30px -8px var(--rose); }
.us-ic { font-size: 30px; position: relative; display: inline-block; }
.badge { position: absolute; top: -6px; right: -12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; font-family: var(--sans); }
.us-title { font-weight: 800; font-size: 16px; margin-top: 6px; }
.us-sub { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

.mood-chip { display: inline-block; margin-top: 8px; padding: 5px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: rgba(255,255,255,.08); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mood-chip.mine { box-shadow: inset 0 0 0 1px var(--line-2); }
.mood-chip.empty { color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.mood-chip.mine.empty { color: var(--ink-2); border: 0; box-shadow: inset 0 0 0 1px dashed; }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mood-opt { padding: 10px 4px; border-radius: 16px; background: rgba(0,0,0,.2); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 4px; justify-items: center; transition: transform .15s; }
.mood-opt span { font-size: 26px; }
.mood-opt small { font-size: 11px; font-weight: 700; color: var(--ink-2); line-height: 1.2; text-align: center; }
.mood-opt.on { background: var(--rose); box-shadow: none; transform: scale(1.04); }
.mood-opt.on small { color: #fff; }

.notes-list { display: grid; gap: 10px; margin-top: 16px; }
.note { padding: 12px 14px; border-radius: 18px; max-width: 88%; animation: pop .3s; }
.note.mine { justify-self: end; background: var(--a-soft); border-bottom-right-radius: 6px; }
.note.theirs { justify-self: start; background: var(--b-soft); border-bottom-left-radius: 6px; }
.note-text { white-space: pre-wrap; word-break: break-word; font-weight: 500; }
.note-meta { font-size: 11.5px; color: var(--ink-3); font-weight: 700; margin-top: 4px; }
.note.sealed { cursor: pointer; background: linear-gradient(135deg, #ff9ac0, #b8aaff); color: #2a0f2a; min-width: 160px; }
.note.sealed .note-meta { color: rgba(42,15,42,.6); }
.seal { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.seal { animation: wiggle 1.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-3deg); } 20% { transform: rotate(3deg); } 30% { transform: rotate(0); } }

.daily-q { font-size: 26px !important; line-height: 1.2; margin: 8px 0 18px !important; }
.qa { padding: 14px 16px; border-radius: 18px; background: var(--card-2); white-space: pre-wrap; word-break: break-word; }
.qa .who { font-size: 12px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.qa.mine { background: var(--a-soft); } .qa.theirs { background: var(--b-soft); } .qa.locked { color: var(--ink-3); border: 1px dashed var(--line-2); background: none; }

.doodle-card { display: flex; gap: 16px; padding: 14px; align-items: center; }
.doodle-frame { width: 132px; aspect-ratio: 1; flex: none; border-radius: 18px; overflow: hidden; background: #fffaf2; position: relative; box-shadow: 0 10px 24px -12px rgba(0,0,0,.8); transform: rotate(-2deg); transition: transform .2s; }
.doodle-frame:hover { transform: rotate(0) scale(1.03); }
.doodle-frame img { width: 100%; height: 100%; display: block; }
.doodle-frame.empty { display: grid; place-items: center; font-size: 40px; background: rgba(255,255,255,.06); border: 2px dashed var(--line-2); }
.doodle-frame.new { box-shadow: 0 0 0 3px var(--rose), 0 10px 30px -8px var(--rose); }
.doodle-new { position: absolute; top: 8px; left: 8px; background: var(--rose); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 99px; letter-spacing: .08em; }
.doodle-side { min-width: 0; }
.doodle-wrap { border-radius: 20px; overflow: hidden; margin: 6px 0 12px; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.doodle-canvas { width: 100%; aspect-ratio: 1; display: block; touch-action: none; background: #fffaf2; }
.doodle-big { width: 100%; border-radius: 20px; display: block; margin-top: 10px; background: #fffaf2; }

/* ── Lobby groups + new game art ── */
.group-label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 18px 4px 10px; }
.games-groups > .group-label:first-child { margin-top: 0; }
.art-memory { background: linear-gradient(145deg, #ffb3d1, #b14fd6); }
.art-truth { background: linear-gradient(145deg, #4b3c8f, #1a1440); }
.art-word { background: linear-gradient(145deg, #9be59b, #3d9b5a); }
.art-ttt { background: linear-gradient(145deg, #ffc49b, #e5635c); }
.art-rps { background: linear-gradient(145deg, #ffe48a, #e9a13a); }

/* ── Tic-Tac-Toe ── */
.ttt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 16px 24px; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(360px, 88vw, 56dvh); margin: 8px 0 16px; }
.ttt-cell { aspect-ratio: 1; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; transition: background .2s, transform .1s; }
.ttt-cell:hover { background: var(--card-2); }
.ttt-cell:active { transform: scale(.96); }
.ttt-cell svg { width: 62%; height: 62%; }
.ttt-cell.a { color: var(--a); } .ttt-cell.b { color: var(--b); }
.ttt-cell.pop svg { animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
.ttt-cell.win { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 2px currentColor; }

/* ── Rock Paper Scissors ── */
.rps { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 16px calc(24px + var(--safe-b)); }
.rps-arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: min(440px, 100%); margin: 18px 0 4px; }
.rps-hand { display: grid; justify-items: center; gap: 6px; padding: 18px 8px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s, box-shadow .3s; }
.rps-hand span { font-size: 64px; line-height: 1; }
.rps-hand small { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.rps-hand.won.a { box-shadow: inset 0 0 0 3px var(--a), 0 0 30px -6px var(--a); transform: scale(1.05); }
.rps-hand.won.b { box-shadow: inset 0 0 0 3px var(--b), 0 0 30px -6px var(--b); transform: scale(1.05); }
.rps-vs { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink-3); }
.shake { animation: rpsShake 1.2s ease-in-out infinite; display: inline-block; }
@keyframes rpsShake { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-10px) rotate(-6deg); } 50% { transform: translateY(0); } 75% { transform: translateY(-6px) rotate(4deg); } }
.flip { display: inline-block; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.rps-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(440px, 100%); }
.rps-pick { padding: 16px 6px; border-radius: 22px; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); display: grid; justify-items: center; gap: 4px; transition: transform .15s, background .2s; }
.rps-pick span { font-size: 40px; }
.rps-pick small { font-weight: 800; font-size: 14px; }
.rps-pick:hover:not(:disabled) { transform: translateY(-3px); }
.rps-pick.on { background: var(--a-soft); box-shadow: inset 0 0 0 2px var(--a); }
.rps-pick:disabled:not(.on) { opacity: .4; }

/* ── Memory ── */
.mm { padding: 6px 16px calc(24px + var(--safe-b)); width: 100%; max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.mm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mm-turn { font-weight: 800; padding: 7px 14px; border-radius: 99px; }
.mm-turn.a { background: var(--a-soft); color: var(--a); } .mm-turn.b { background: var(--b-soft); color: var(--b); }
.mm-moves { font-size: 14px; color: var(--ink-2); }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mm-card { aspect-ratio: 3 / 4; perspective: 600px; padding: 0; }
.mm-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.3,.7,.3,1.2); transform-style: preserve-3d; }
.mm-card.up .mm-inner { transform: rotateY(180deg); }
.mm-back, .mm-front { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mm-back { background: linear-gradient(145deg, #4a2d7a, #2b1a4a); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 22px; opacity: .9; }
.mm-front { background: #fffaf2; transform: rotateY(180deg); font-size: clamp(28px, 9vw, 42px); }
.mm-card.got .mm-front { box-shadow: 0 0 0 3px var(--mint); animation: pop .4s; }

/* ── Word Duel ── */
.wd { padding: 4px 12px calc(12px + var(--safe-b)); width: 100%; max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.wd-top { display: flex; align-items: center; gap: 14px; }
.wd-them { display: grid; gap: 4px; }
.wd-them .eyebrow { font-size: 10px; }
.wd-mini { display: grid; gap: 2px; }
.wd-mini-row { display: flex; gap: 2px; }
.wd-mini-row span { width: 10px; height: 10px; border-radius: 2px; background: rgba(255,255,255,.08); }
.wd-board { display: grid; gap: 6px; justify-content: center; }
.wd-row { display: grid; grid-template-columns: repeat(5, min(14vw, 6.2dvh, 56px)); gap: 6px; }
.wd-row.shake { animation: rowShake .35s; }
@keyframes rowShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wd-tile { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: clamp(18px, 3.4dvh, 28px); text-transform: uppercase; box-shadow: inset 0 0 0 2px var(--line-2); }
.wd-tile.typed { box-shadow: inset 0 0 0 2px var(--ink-3); animation: pop .15s; }
.wd-tile.s0, .wd-tile.s1, .wd-tile.s2 { box-shadow: none; animation: tileFlip .5s both; }
@keyframes tileFlip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.s0 { background: #3a3150 !important; } .s1 { background: #d9a93a !important; color: #1d1405; } .s2 { background: #3fbf7f !important; color: #06210f; }
.wd-kb { display: grid; gap: 6px; margin-top: auto; }
.wd-kr { display: flex; gap: 5px; justify-content: center; }
.wd-key { flex: 1; max-width: 42px; height: min(52px, 6.6dvh); border-radius: 8px; background: rgba(255,255,255,.14); font-weight: 800; text-transform: uppercase; font-size: 15px; }
.wd-key.wide { max-width: 66px; flex: 1.5; font-size: 12px; }
.wd-key:active { transform: scale(.94); }

/* ── Truth or Dare ── */
.td { padding: 6px 16px calc(24px + var(--safe-b)); width: 100%; max-width: 520px; margin: 0 auto; display: grid; gap: 16px; }
.td-turn { justify-self: center; font-weight: 800; padding: 8px 16px; border-radius: 99px; }
.td-turn.a { background: var(--a-soft); color: var(--a); } .td-turn.b { background: var(--b-soft); color: var(--b); }
.td-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.td-cat { aspect-ratio: 1.15; border-radius: 26px; display: grid; place-items: center; align-content: center; gap: 8px; background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); transition: transform .15s; }
.td-cat span { font-size: 44px; }
.td-cat b { font-size: 18px; }
.td-cat:hover:not(:disabled) { transform: translateY(-3px) rotate(-1deg); }
.td-cat:disabled { opacity: .45; }
.td-card { min-height: 260px; border-radius: 30px; padding: 26px 22px; display: grid; align-content: center; gap: 14px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, #241a3a), #1d1430); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, transparent), 0 24px 50px -24px rgba(0,0,0,.9); animation: cardIn .5s cubic-bezier(.2,1.2,.3,1); }
@keyframes cardIn { from { transform: rotateY(90deg) scale(.9); opacity: 0; } }
.td-card-cat { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.td-card-text { font-family: var(--display); font-size: clamp(24px, 6.4vw, 30px); line-height: 1.2; font-weight: 700; }
.rps-pick.on.b { background: var(--b-soft); box-shadow: inset 0 0 0 2px var(--b); }

/* ── Notifications card ── */
.notify-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, rgba(126,224,181,.12), rgba(165,148,255,.1)); }
.notify-card .n-ic { font-size: 26px; }
.notify-card .n-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; color: var(--ink-2); }
.notify-card .n-text b { color: var(--ink); font-size: 15px; }
.notify-card.on { background: var(--card); padding: 10px 14px; box-shadow: none; }
.notify-card.on .n-ic { font-size: 18px; }
