/* CoupleClash on the web: the app's own look (its near-black, the red and blue of X and O, the yellow
   of its buttons, SF Rounded). On a laptop the two cameras stand beside the board; on a phone they
   sit above it, side by side, as in the app. */

:root {
  --ink: #0d0e12;
  --ink-2: #16181d;
  --ink-3: #1f2229;
  --line: #272a31;
  --paper: #f3f3f5;
  --dim: #a2a4ac;
  --mute: #6f727b;
  --red: #ff4a3d;
  --disc-red: #ef3b36;
  --blue: #3d7bff;
  --yellow: #ffc83d;
  --green: #34c759;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --bar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--yellow); color: var(--ink); }
h1, h2 { font-family: var(--round); font-weight: 900; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
h1 { font-size: clamp(26px, 3vw, 34px); }
h2 { font-size: 22px; }
p { margin: 0; }
.dim { color: var(--dim); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.primary, .ghost, .pill-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 14px; border: 0;
  font: 800 15px/1 var(--round); letter-spacing: -.005em; white-space: nowrap;
  transition: transform .25s var(--spring), background .2s, opacity .2s, box-shadow .2s;
}
.primary { background: var(--yellow); color: #17130a; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 22px -10px rgba(255,200,61,.6); }
.primary:hover { transform: translateY(-1px); }
.primary:active, .ghost:active { transform: scale(.97); }
.primary:disabled { opacity: .5; cursor: default; transform: none; }
.ghost { background: var(--ink-3); color: var(--paper); box-shadow: 0 0 0 1px var(--line) inset; }
.ghost:hover { background: #262a32; }
.wide { width: 100%; }
.round {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; transition: background .2s, transform .2s var(--spring);
}
.round:hover { background: #2a2e37; }
.round:active { transform: scale(.92); }
.pulse { animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,200,61,.55); } 70% { box-shadow: 0 0 0 12px rgba(255,200,61,0); } }
.row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font: 800 12px/1 var(--round); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.eyebrow svg.i { width: 15px; height: 15px; }

/* Faces: a picture, or one of the app's drawn faces */
.face { width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; flex: none; display: block; background: var(--ink-3); }
.face img, .face svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The bar */
.app { min-height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: var(--bar) 1fr; grid-template-areas: "bar" "view"; }
.bar {
  grid-area: bar; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 0 max(20px, env(safe-area-inset-left)); border-bottom: 1px solid rgba(255,255,255,.05);
  background: rgba(13,14,18,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 900 18px/1 var(--round); letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.tag { font: 800 11px/1 var(--round); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 7px; background: rgba(61,123,255,.16); color: #8db0ff; }
.grow { flex: 1; }
.me-chip { display: flex; align-items: center; gap: 9px; font: 800 14px/1 var(--round); }
#view { grid-area: view; min-width: 0; }

/* Centered cards: welcome and pairing */
.center { min-height: calc(100vh - var(--bar)); display: grid; place-items: center; padding: 32px 16px 48px; }
.card {
  width: min(880px, 100%); background: linear-gradient(180deg, var(--ink-2), #121418); border-radius: 26px;
  box-shadow: 0 0 0 1px var(--line) inset, 0 30px 80px -40px rgba(0,0,0,.8); padding: 32px;
  animation: rise .6s var(--ease) both;
}
.card.narrow { width: min(460px, 100%); display: grid; gap: 16px; }
.card .logo { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 12px 30px -12px rgba(255,74,61,.5); }
.glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ink-3); }
.glyph svg.i { width: 26px; height: 26px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.field { display: grid; gap: 8px; }
.field > span { font: 800 13px/1 var(--round); color: var(--dim); }
.field input {
  height: 50px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset;
  font: 700 17px/1 var(--round); outline: none; transition: box-shadow .2s;
}
.field input:focus { box-shadow: 0 0 0 2px var(--yellow) inset; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar { aspect-ratio: 1; padding: 4px; border-radius: 50%; border: 0; background: transparent; box-shadow: 0 0 0 2px transparent inset; transition: transform .25s var(--spring), box-shadow .2s; }
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar:hover { transform: scale(1.06); }
.avatar.on { box-shadow: 0 0 0 3px var(--yellow) inset; transform: scale(1.04); }
.fine { font-size: 12.5px; color: var(--mute); text-align: center; }

.pairing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.pairing .half { padding: 32px; display: grid; gap: 14px; align-content: start; }
.pairing .other { background: rgba(255,255,255,.02); border-left: 1px solid var(--line); }
.pairing .row { justify-content: flex-start; }
.code { display: flex; gap: 8px; }
.code span {
  width: 52px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); box-shadow: 0 0 0 1px var(--line) inset;
  font: 900 32px/1 var(--round); animation: rise .5s var(--spring) both;
}
.code span:nth-child(2) { animation-delay: .04s; } .code span:nth-child(3) { animation-delay: .08s; }
.code span:nth-child(4) { animation-delay: .12s; } .code span:nth-child(5) { animation-delay: .16s; } .code span:nth-child(6) { animation-delay: .2s; }
.code-input { height: 64px; border-radius: 14px; border: 0; background: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; text-align: center; font: 900 30px/1 var(--round); letter-spacing: .35em; padding-left: .35em; outline: none; width: 100%; }
.code-input:focus { box-shadow: 0 0 0 2px var(--yellow) inset; }
.waiting { display: flex; align-items: center; gap: 10px; font: 700 13px/1 var(--round); color: var(--dim); margin-top: 4px; }
.waiting i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Home */
.home { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 24px 0 64px; display: grid; gap: 18px; }
.duo {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border-radius: 24px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,200,61,.12), transparent 55%), var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset;
  animation: rise .6s var(--ease) both;
}
.faces { display: flex; }
.faces .face { box-shadow: 0 0 0 3px var(--ink-2); }
.faces .face + .face { margin-left: -14px; }
.duo h1 { margin: 6px 0 8px; }
.duo .board { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font: 700 14px/1 var(--round); color: var(--dim); }
.duo .board b { font: 900 22px/1 var(--round); color: var(--paper); margin-right: 3px; }
.duo .board .vs { color: var(--mute); }
.waiting-room {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(61,123,255,.14), rgba(61,123,255,.04)); box-shadow: 0 0 0 1px rgba(61,123,255,.3) inset; animation: rise .5s var(--spring) both;
}
.waiting-room + .waiting-room { margin-top: 8px; }
.waiting-room img { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; }
.waiting-room b { font: 800 16px/1.2 var(--round); display: block; }
.waiting-room small { color: var(--dim); }
.shelf-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.games.later { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.game {
  position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; border: 0; padding: 0; background: var(--ink-3); text-align: left;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset; transition: transform .35s var(--spring), box-shadow .3s;
  animation: rise .55s var(--ease) both;
}
.game img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.game::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.78)); }
.game .cap { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 1; display: grid; gap: 2px; }
.game .cap b { font: 900 17px/1.1 var(--round); letter-spacing: -.01em; }
.game .cap small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.72); }
.game .cap small svg.i { width: 13px; height: 13px; }
button.game:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 0 0 2px var(--yellow) inset, 0 18px 40px -18px rgba(0,0,0,.9); }
button.game:hover img { transform: scale(1.05); }
button.game:active { transform: scale(.97); }
.game.off { filter: saturate(.55) brightness(.8); }
.game.off .cap b { font-size: 14px; }

/* The cameras: a corner of the screen at home, beside the board in a game */
#call {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 260px; display: grid; gap: 8px;
  animation: rise .5s var(--spring) both;
}
#call .tile.you { position: absolute; right: 10px; top: 10px; width: 30%; z-index: 2; aspect-ratio: 3 / 4; border-radius: 12px; }
.tile {
  position: relative; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: #111317;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 20px 50px -24px rgba(0,0,0,.9); transition: box-shadow .3s;
}
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.tile.you video { transform: scaleX(-1); }
.tile.live video { opacity: 1; }
.tile .who { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .3s; background: radial-gradient(circle at 50% 40%, #232730, #121418 70%); }
.tile.live .who { opacity: 0; }
.tile .note { position: absolute; left: 10px; right: 10px; bottom: 44px; text-align: center; font: 700 12.5px/1.3 var(--round); color: var(--dim); }
.tile .label { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 9px; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 800 12.5px/1 var(--round); }
.tile .badge {
  position: absolute; right: 10px; bottom: 10px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: grid; place-items: center;
  background: var(--ink); box-shadow: 0 0 0 2px rgba(255,255,255,.85) inset; font: 900 15px/1 var(--round);
}
.tile.them .badge { background: var(--blue); }
.tile.you .badge { background: var(--red); }
.tile .mark { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.tile .mark:empty { display: none; }
.tile .mark svg { width: 20px; height: 20px; fill: none; stroke: var(--c); stroke-width: 6; stroke-linecap: round; }
.tile .mark.fill svg { fill: var(--c); stroke: none; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 transparent inset; transition: box-shadow .35s var(--ease); }
.tile.turn::after { box-shadow: 0 0 0 3px var(--blue) inset; }
.tile.you.turn::after { box-shadow: 0 0 0 3px var(--red) inset; }
#call .tile.you .label, #call .tile.you .note, #call .tile.you .badge, #call .tile.you .mark { display: none; }
#call .tile.you .who .face { --size: 36px !important; }
.controls { display: flex; gap: 8px; justify-content: center; }
.controls .round { width: 42px; height: 42px; background: rgba(31,34,41,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.controls .round.off { background: var(--paper); color: var(--ink); }
.controls .hang { background: var(--red); box-shadow: none; }
.controls .hang:hover { background: #ff6357; }
.pill-button { height: 42px; background: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; }

/* In a game: the cameras get their own column */
.app[data-view="room"] { grid-template-columns: minmax(260px, 30vw) 1fr; grid-template-areas: "bar bar" "call view"; }
.app[data-view="room"] #call {
  grid-area: call; position: sticky; top: calc(var(--bar) + 16px); align-self: start; right: auto; bottom: auto; width: auto;
  padding: 16px 0 16px 20px; display: grid; grid-template-rows: auto auto auto; gap: 12px; animation: none;
}
.app[data-view="room"] #call .tile.you { position: relative; right: auto; top: auto; width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; }
.app[data-view="room"] #call .tile.them { aspect-ratio: 4 / 3; }
.app[data-view="room"] #call .tile.you .label, .app[data-view="room"] #call .tile.you .badge, .app[data-view="room"] #call .tile.you .mark { display: grid; }
.app[data-view="room"] #call .tile.you .label { display: block; }
.app[data-view="room"] #call .tile.you .badge[hidden], .app[data-view="room"] #call .tile.them .badge[hidden] { display: none; }
.app[data-view="room"] #call .tile.you .mark:empty { display: none; }
.app[data-view="room"] #call .tile.you .who .face { --size: 72px !important; }

.room { padding: 16px 20px 40px; display: grid; gap: 10px; align-content: start; justify-items: center; min-height: calc(100vh - var(--bar)); }
.room-top { width: 100%; max-width: 620px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; }
.room-top h1 { font-size: 22px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; font: 800 12.5px/1 var(--round); color: var(--dim); }
.pill svg.i { width: 14px; height: 14px; }
.status { min-height: 22px; font: 800 16px/1.3 var(--round); color: var(--dim); text-align: center; }
.board-wrap { position: relative; width: 100%; max-width: min(620px, calc(100vh - var(--bar) - 130px)); min-width: min(100%, 340px); display: grid; }
.board-wrap > * { grid-area: 1 / 1; }
.overlay { position: relative; z-index: 5; display: grid; place-items: center; pointer-events: none; }
.overlay > * { pointer-events: auto; }
.overlay:empty { display: none; }
.sheet {
  width: min(440px, 100%); display: grid; gap: 14px; justify-items: center; text-align: center; padding: 26px; border-radius: 24px;
  background: rgba(22,24,29,.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 0 0 1px var(--line) inset, 0 40px 80px -30px rgba(0,0,0,.9);
  animation: rise .45s var(--spring) both;
}
.sheet.small { width: auto; padding: 16px 20px; grid-auto-flow: column; gap: 12px; }
.sheet .art { width: 96px; height: 128px; object-fit: cover; border-radius: 16px; box-shadow: 0 16px 30px -14px rgba(0,0,0,.9); }
.sheet .how { font-size: 14px; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.seat { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; border-radius: 16px; background: var(--ink-3); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .3s; }
.seat b { font: 800 14px/1.1 var(--round); }
.seat small { display: flex; align-items: center; gap: 4px; font: 700 12px/1 var(--round); color: var(--mute); }
.seat small svg.i { width: 13px; height: 13px; }
.seat.ready { box-shadow: 0 0 0 2px var(--green) inset; }
.seat.ready small { color: var(--green); }
.seat.empty .face { animation: blink 1.4s ease-in-out infinite; }
.count { font: 900 min(34vw, 180px)/1 var(--round); color: var(--yellow); text-shadow: 0 20px 60px rgba(255,200,61,.35); }
.count.beat { animation: beat .6s var(--spring); }
@keyframes beat { from { transform: scale(1.6); opacity: 0; } }
.result h2 { font-size: 34px; }
.score { display: flex; align-items: center; gap: 14px; }
.score span { display: flex; align-items: center; gap: 10px; }
.score b { font: 900 40px/1 var(--round); }
.score i { color: var(--mute); font-style: normal; font: 900 28px/1 var(--round); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--yellow); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tic-Tac-Toe: thin lines inside, none around, as in the app */
.xox { display: grid; grid-template-columns: repeat(var(--n), 1fr); aspect-ratio: 1; width: 100%; padding: 18px; border-radius: 24px; background: var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset; }
.xox .cell { aspect-ratio: 1; border: 0; background: transparent; padding: 14%; display: grid; place-items: center; position: relative; transition: background .2s; }
.xox .cell:not(:nth-child(6n)) { border-right: 2px solid #34373f; }
.xox .cell:nth-child(-n + 30) { border-bottom: 2px solid #34373f; }
.xox .cell:disabled { cursor: default; }
.xox.mine .cell:not(:disabled):hover { background: rgba(255,255,255,.04); }
.xox .cell svg { width: 100%; height: 100%; fill: none; stroke-width: 6; stroke-linecap: round; }
.xox .cell.x svg { stroke: var(--red); }
.xox .cell.o svg { stroke: var(--blue); }
.xox .cell.fresh svg { animation: pop .45s var(--spring); }
.xox .cell.fresh.x path { stroke-dasharray: 64; animation: draw .35s var(--ease) both; }
.xox .cell.fresh.o circle { stroke-dasharray: 76; animation: draw .4s var(--ease) both; }
.xox .cell.won { background: rgba(255,200,61,.14); }
.xox .cell.won svg { animation: win .9s var(--ease) infinite alternate; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 76; } to { stroke-dashoffset: 0; } }
@keyframes win { to { transform: scale(1.12); } }

/* Four in a Row: the app's blue board, discs falling into place */
.four {
  display: grid; grid-template-columns: repeat(var(--columns), 1fr); gap: 0; width: 100%; padding: 12px; border-radius: 24px;
  background: linear-gradient(180deg, #2f6bf0, #1c46c4); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 22px 40px -18px rgba(28,70,196,.6);
}
.four .column { border: 0; background: transparent; padding: 0; display: grid; gap: 0; border-radius: 14px; position: relative; transition: background .2s; }
.four .column:disabled { cursor: default; }
.four.mine .column:not(:disabled):hover { background: rgba(255,255,255,.1); }
.four .hole { aspect-ratio: 1; padding: 9%; display: grid; overflow: hidden; }
.four .hole::before { content: ""; grid-area: 1 / 1; border-radius: 50%; background: rgba(14,27,71,.6); box-shadow: 0 2px 4px rgba(0,0,0,.35) inset; }
.four .disc { grid-area: 1 / 1; border-radius: 50%; position: relative; z-index: 1; box-shadow: 0 -3px 0 rgba(0,0,0,.18) inset, 0 3px 0 rgba(255,255,255,.25) inset; }
.four .disc.red { background: var(--disc-red); }
.four .disc.yellow { background: var(--yellow); }
.four .disc.last { animation: fall calc(.18s + var(--row) * .05s) cubic-bezier(.5, 0, .75, 0) both, settle .3s calc(.18s + var(--row) * .05s) var(--spring); }
.four .disc.won { animation: win .8s var(--ease) infinite alternate; box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255,255,255,.6); }
@keyframes fall { from { transform: translateY(calc(var(--row) * -112%)); } }
@keyframes settle { 40% { transform: translateY(-6%); } }
.four .ghost { position: absolute; top: -40px; left: 18%; right: 18%; aspect-ratio: 1; border-radius: 50%; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--spring); pointer-events: none; }
.four .ghost.red { background: var(--disc-red); }
.four .ghost.yellow { background: var(--yellow); }
.four.mine .column:not(:disabled):hover .ghost { opacity: .9; transform: none; }
.board-wrap .four { margin-top: 44px; }

/* The menu */
dialog#menu { border: 0; padding: 0; background: transparent; color: inherit; max-width: calc(100% - 32px); }
dialog#menu::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.menu { width: 340px; max-width: 100%; display: grid; gap: 6px; padding: 18px; border-radius: 22px; background: var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset; animation: rise .35s var(--spring) both; }
.menu .me { display: flex; align-items: center; gap: 12px; padding: 4px 4px 12px; }
.menu .me b { font: 900 18px/1.1 var(--round); display: block; }
.menu .me small { color: var(--dim); }
.menu .item { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; border: 0; background: transparent; text-decoration: none; font: 700 15px/1 var(--round); text-align: left; }
.menu .item:hover { background: var(--ink-3); }
.menu .item.bad { color: #ff6b55; }
.menu .ghost { margin-top: 8px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 13px 18px; border-radius: 14px; background: var(--paper); color: var(--ink); font: 800 14.5px/1.3 var(--round); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9);
  transition: transform .4s var(--spring), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.bad { background: #ff6b55; color: #1a0703; }

/* Phones */
@media (max-width: 820px) {
  :root { --bar: 56px; }
  .tag { display: none; }
  .me-chip > span:not(.face) { display: none; }
  .pairing { grid-template-columns: 1fr; }
  .pairing .other { border-left: 0; border-top: 1px solid var(--line); }
  .pairing .half { padding: 22px; }
  .code span { width: 44px; height: 56px; font-size: 28px; }
  .card { padding: 22px; }
  .duo { grid-template-columns: auto 1fr; padding: 18px; }
  .duo .call-cta { grid-column: 1 / -1; }
  .duo .call-cta .primary, .duo .call-cta .ghost { width: 100%; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .games.later { grid-template-columns: repeat(3, 1fr); }
  #call { width: 150px; right: 12px; bottom: 12px; }
  .app[data-view="room"] { grid-template-columns: 1fr; grid-template-rows: var(--bar) auto 1fr; grid-template-areas: "bar" "call" "view"; }
  .app[data-view="room"] #call { position: relative; top: 0; padding: 12px 12px 0; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .app[data-view="room"] #call .tile.them, .app[data-view="room"] #call .tile.you { aspect-ratio: 3 / 4; max-height: 30vh; width: 100%; }
  .app[data-view="room"] #call .controls { grid-column: 1 / -1; }
  .app[data-view="room"] #call .tile .who .face { --size: 52px !important; }
  .room { padding: 8px 12px 32px; min-height: 0; }
  .xox { padding: 10px; }
  .board-wrap .four { margin-top: 8px; }
  .four .ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
