/* LOBBY owner · home + the three lobbies, on concepts/party/party.css (the visual law), extended per ADDENDUM.
   Prefixes: .home- .lb- .seat, plus the mock's own names kept as-is:
   .steps .step .foot .hero-art .buyins .lobby-head .deal-line .code-card .seats .confirm .side .deal .prize .stack-av
   .move .you-in .you-ask .row2 .start-wrap .start-note .who-paid .who-chip .rules .fill-row .feed-head .act-dock
   Breakpoints: ≤ 980px one column + the sticky bottom button · ≤ 700px phone (2×4 compact seats, chat sheet). */

/* =================================================================== HOME */
body[data-screen="home"] main { padding-top: 20px; }
.home { display: grid; grid-template-columns: 1.12fr 1fr; gap: 20px 56px; align-items: center; }
.home .display { font-size: clamp(34px, 4vw, 54px); }
.home-hero { padding: 12px 0; min-width: 0; }
.home-hero .display span { display: block; color: var(--gold); }
.hero-art { width: 100%; max-width: 560px; margin: 0 0 8px -12px; }
.hero-art svg { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art .h-chip { animation: bob 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* the mock's two cards (Start a party, or, Join a party); public play is a quiet row inside Start a party */
.home-cards { display: grid; gap: 14px; align-content: start; min-width: 0; }
.home-card { padding: 24px 26px 22px; }
.home-card .h2 { margin: 0 0 4px; }
.home-card .sub { margin: 0 0 16px; color: var(--ink-2); font: 600 15px/1.4 var(--f-ui); }
.home-card .btn-xl { height: 60px; font-size: 18px; border-radius: 17px; }
.buyins { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.home-card .tile { height: 64px; font-size: 21px; min-width: 0; padding: 0 4px; }
.home-card .code-in { margin-bottom: 14px; }
.home-card .code-in input { height: 64px; font-size: 28px; border-radius: 17px; min-width: 0; }
.code-in.shake { animation: lbShake .42s var(--out); }
@keyframes lbShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* the mock's line under Create party: making a party costs nothing */
.home-fine { margin: 4px 0 0; text-align: center; }

/* Play with anyone: one quiet row under Create party (same buy-in): real players waiting + the live line */
.home-anyone {
  appearance: none; width: 100%; min-height: 62px; margin-top: 10px; padding: 9px 10px 9px 12px; cursor: pointer;
  display: flex; align-items: center; gap: 12px; text-align: left; color: var(--ink-2);
  border-radius: 18px; border: 1.5px dashed var(--line-2); background: transparent;
  transition: border-color .15s, background .15s, transform .1s var(--out);
  -webkit-tap-highlight-color: transparent;
}
.home-anyone:hover { border-color: var(--line-3); background: rgba(255, 255, 255, .03); }
.home-anyone:active { transform: translateY(2px); }
.home-anyone-t { flex: 1; min-width: 0; display: grid; gap: 5px; }
.home-anyone-t b { font: 800 14.5px/1.25 var(--f-ui); color: var(--ink-2); }
.home-anyone-t u { color: var(--ink); text-decoration-color: var(--line-3); text-underline-offset: 3px; white-space: nowrap; }
.home-anyone-go {
  flex: none; display: inline-flex; align-items: center; gap: 2px; height: 38px; padding: 0 8px 0 12px; border-radius: 12px;
  background: var(--night-3); color: var(--ink); font: 800 14.5px/1 var(--f-ui); box-shadow: 0 3px 0 var(--edge-dark);
}
.home-anyone-go svg { width: 16px; height: 16px; transition: transform .2s var(--out); }
.home-anyone:hover .home-anyone-go svg { transform: translateX(2px); }
.home-faces { flex: none; display: flex; padding-right: 2px; }
.home-faces > .home-face { display: block; margin-left: -12px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.home-faces > .home-face:first-child { margin-left: 0; }
.home-face.hop { animation: hop .55s var(--spring) both; }
.home-live { display: flex; align-items: center; gap: 7px; margin: 0; font: 700 12.5px/1.2 var(--f-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; min-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-live b { color: var(--ink-2); font-weight: 800; }
.home-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 3px var(--go-soft); animation: askPulse 1.6s infinite; flex: none; }
.home-practice { justify-self: center; margin-top: -2px; font-size: 14.5px; }
.home-practice span { display: inline-block; transition: transform .2s var(--out); }
.home-practice:hover span { transform: translateX(3px); }

.steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.step { display: flex; gap: 16px; align-items: center; padding: 20px 22px; border-radius: var(--r-l); background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.step-n { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 800 18px/1 var(--f-display); background: var(--night-3); box-shadow: 0 3px 0 var(--edge-dark); }
.step:nth-child(1) .step-n { background: var(--grape); box-shadow: 0 3px 0 var(--grape-edge); }
.step:nth-child(2) .step-n { background: var(--go); color: var(--go-ink); box-shadow: 0 3px 0 var(--go-edge); }
.step:nth-child(3) .step-n { background: var(--gold); color: var(--gold-ink); box-shadow: 0 3px 0 var(--gold-edge); }
.step b { display: block; font: 800 16px/1.25 var(--f-ui); }
.step div > span { display: block; color: var(--ink-3); font-weight: 600; font-size: 14px; margin-top: 2px; }
.foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding-top: 18px; color: var(--ink-3); font: 600 13px/1.4 var(--f-ui); }
.foot span { display: inline-flex; align-items: center; gap: 8px; }
.foot .age { font: 800 11px/1 var(--f-ui); font-style: normal; padding: 4px 6px; border-radius: 6px; border: 1.5px solid var(--ink-3); }

/* =================================================================== LOBBY: layout */
body[data-screen="lobby"] main { padding-top: 28px; }
.lobby { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 24px; align-items: start; }
.lobby > .lobby-head { grid-column: 1 / -1; }
.lb-main { min-width: 0; display: grid; gap: 16px; align-content: start; }
.lb-fill:empty, [data-prize]:empty, [data-set]:empty, .lb-head-r:empty { display: none; }

/* head: eyebrow, title, pills · code card (friends) / countdown card (public) */
.lobby-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: -8px; }
.lb-head-l { min-width: 0; }
.lb-eyebrow { display: flex; align-items: center; gap: 8px; min-height: 12px; }
.lb-eyebrow .ic { flex: none; }
.lb-practice .lb-eyebrow span, .lb-public .lb-eyebrow span { text-transform: none; letter-spacing: 0; font: 800 13.5px/1 var(--f-ui); color: var(--ink-2); }
.lb-practice .lb-eyebrow .tag { font-size: 11px; padding: 5px 7px; }
.lb-title { font-size: clamp(26px, 2.6vw, 36px); overflow-wrap: anywhere; }
.lb-public .lb-title { font-size: clamp(24px, 2.3vw, 32px); }
.deal-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lb-lenpill { appearance: none; cursor: default; font-family: var(--f-ui); }
button.lb-lenpill { position: relative; cursor: pointer; transition: border-color .15s, background .15s; }
button.lb-lenpill::after, .seat-edit::after { content: ""; position: absolute; inset: -8px -4px; }   /* 44px hit area */
button.lb-lenpill:hover { border-color: var(--line-3); }
button.lb-lenpill:active { transform: translateY(1px); }
.lb-lenpill .ic:last-child { width: 13px; height: 13px; margin-left: -2px; opacity: .7; }
.lb-pulse { animation: lbPulse .6s var(--spring); }
@keyframes lbPulse { 40% { transform: scale(1.08); border-color: var(--grape); } }
.lb-chatbtn { display: none; }

.lb-head-r { flex: none; min-width: 0; }
.code-card { display: flex; align-items: center; gap: 18px; padding: 14px 16px 14px 20px; border-radius: 24px; background: var(--night-1); border: 1px solid var(--line-2); }
.code-card .label { margin: 0 0 8px; }
.code-actions { display: flex; flex-direction: column; gap: 6px; }
.link-row { font: 700 12.5px/1 var(--f-ui); color: var(--ink-3); margin-top: 8px; }

.lb-timer { position: relative; min-width: 230px; padding: 14px 20px 18px; border-radius: 24px; background: var(--night-1); border: 1px solid var(--line-2); overflow: hidden; }
.lb-timer .label { margin: 0 0 7px; }
.lb-timer-n { display: block; font: 800 40px/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lb-timer small { display: block; margin-top: 8px; font: 700 13px/1 var(--f-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lb-timer-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.06); }
.lb-timer-bar i { display: block; height: 100%; background: var(--grape); transform-origin: left; transform: scaleX(0); transition: transform .25s linear; }
.lb-timer.is-hot { border-color: rgba(123,97,255,.55); box-shadow: 0 0 0 4px var(--grape-soft); }
.lb-timer.is-hot .lb-timer-n { color: #fff; }
.lb-timer.lb-pulse { animation: lbPulse .6s var(--spring); }
/* the founder's line "Starting in 0:24 · 5 of 8 here" is said once per size: on desktop the big "Starting in" tile
   carries the countdown and the pill under the title only says "5 of 8 here"; on phones and tablets the sticky
   button says the whole line, so neither the tile nor the pill shows there */
@media (min-width: 981px) { .lb-timer small { display: none; } }
@media (max-width: 980px) { .lb-startpill, .lobby .lb-timer { display: none !important; } }

/* =================================================================== seats (the mock's cards) */
.seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.seat {
  --pc: var(--line-3);
  position: relative; min-width: 0; min-height: 218px; border-radius: 24px; padding: 12px 12px 14px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 13%, transparent), rgba(255,255,255,0) 70%), var(--night-1);
  border: 1.5px solid color-mix(in srgb, var(--pc) 28%, transparent);
  transition: border-color .3s, background .3s, transform .12s var(--out);
  -webkit-tap-highlight-color: transparent;
}
.seat.is-act { cursor: pointer; }
.seat.is-act:hover { border-color: color-mix(in srgb, var(--pc) 55%, transparent); }
.seat.is-act:active { transform: scale(.985); }
.seat:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; border-radius: 24px; }
.seat.is-in { border-color: color-mix(in srgb, var(--pc) 60%, transparent); }
.seat.is-me { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 16%, transparent); }
.seat-stage { position: relative; height: 104px; width: 100%; display: grid; place-items: end center; margin-bottom: 8px; flex: none; }
.seat-stage::after { content: ""; position: absolute; bottom: -2px; left: 50%; width: 110px; height: 14px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--pc) 40%, transparent), transparent); pointer-events: none; }
/* Discord speaking ring while someone talks in chat */
.seat-stage::before { content: ""; position: absolute; left: 50%; bottom: 4px; width: 88px; height: 88px; transform: translateX(-50%) scale(.9); border-radius: 50%; border: 3px solid var(--go); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.seat.talk .seat-stage::before { opacity: 1; transform: translateX(-50%) scale(1); }
.seat-info { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.seat-name { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; font: 800 17px/1.2 var(--f-ui); }
.seat-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* your @username, small, right under "You" (its own line so it never truncates to "@…" next to the Host tag) */
.seat-un { display: flex; justify-content: center; max-width: 100%; margin-top: 2px; }
.seat-un .un::before { content: none; }
/* a regular you keep meeting: "Played 3×" under the status (the RANDOM copy here is for phones; desktop keeps it by
   the name) */
.seat-met { display: flex; justify-content: center; gap: 5px; max-width: 100%; margin-top: 6px; }
.seat-met.only-rnd, .seat-rnd { display: none; }
.seat-status { margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 13px/1.3 var(--f-ui); color: var(--ink-3); min-height: 20px; max-width: 100%; }
.seat-status .ic { width: 16px; height: 16px; flex: none; }
.seat-status.in { color: var(--go); }
.seat-status.ask { color: var(--gold); }
.seat-status.lb-muted { margin-top: 2px; color: var(--ink-3); }
.lb-pers { display: none; }
.paid-by { margin-top: 4px; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font: 700 12.5px/1 var(--f-ui); color: var(--ink-2); padding: 4px 8px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.05); }
.paid-by span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paid-by.gift { background: var(--gold-soft); color: var(--gold); }
.seat-foot { margin-top: auto; width: 100%; padding-top: 10px; }
.lb-cover-chip { display: none; }          /* phones only (the seat foot's gold Cover button does it on desktop) */
.seat-foot .btn { width: 100%; }
.seat-note { font: 700 12.5px/1.3 var(--f-ui); color: var(--ink-3); }
.seat-plus { display: none; }
.seat-edit { position: absolute; top: 8px; right: 8px; z-index: 3; appearance: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(13,10,28,.72); color: var(--ink-2); font: 800 12px/1 var(--f-ui); cursor: pointer; }
.seat-edit:hover { color: var(--ink); border-color: var(--line-3); }
.seat-edit:active { transform: translateY(1px); }
/* after a first buy-in with a random look: point at Edit a few times, gently (never blocks anything) */
.seat-edit.nudge { color: #fff; border-color: var(--grape); background: var(--grape); animation: lbEditNudge 1.1s var(--out) 3; }
@keyframes lbEditNudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(123,97,255,.55); } 50% { box-shadow: 0 0 0 8px rgba(123,97,255,0); transform: scale(1.08); } }
.seat.did-in .seat-stage .chip { animation: hop .6s var(--spring) both; }
.seat-new { animation: seatIn .55s var(--spring) both; }
.ask-ring::before { content: ""; position: absolute; inset: -2px; border-radius: 25px; border: 2px solid var(--gold); animation: askPulse 1.6s ease-in-out infinite; pointer-events: none; }

/* open seats */
.seat.is-empty { background: transparent; border: 2px dashed var(--line-2); justify-content: center; }
.seat.is-empty .seat-stage { height: 80px; }
.seat.is-empty .seat-stage::after, .seat.is-empty .seat-stage::before { display: none; }
.seat.is-empty.is-act:hover { border-color: var(--line-3); background: rgba(255,255,255,.02); }
.seat .ghost { opacity: .25; }
.seat.is-finding .ghost { animation: askPulse 1.6s ease-in-out infinite; }
.seat-empty-t { font: 800 14px/1.2 var(--f-ui); color: var(--ink-3); margin-top: 6px; }
.seat-empty-s { font: 700 12.5px/1.2 var(--f-ui); color: var(--ink-3); opacity: .75; margin-top: 4px; }
.seat.is-empty .seat-foot { margin-top: 12px; flex: none; }
.seat.is-empty .seat-foot .btn { pointer-events: none; }

/* cover confirm, inside a seat (mock) */
.confirm {
  position: absolute; inset: 0; z-index: 4; border-radius: 24px; padding: 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: center; cursor: default;
  background: rgba(21, 17, 41, .97); border: 2px solid var(--gold);
  animation: seatIn .35s var(--spring) both;
}
.confirm p { margin: 0 0 4px; font: 700 13px/1.4 var(--f-ui); color: var(--ink-2); }
.confirm p b { color: var(--ink); }
.confirm .btn { width: 100%; margin-top: 0; padding: 0 10px; }

/* Friends busy? Add a random player */
.fill-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 18px; border: 1px dashed var(--line-2); color: var(--ink-3); font: 600 13.5px/1.35 var(--f-ui); }
.fill-row b { color: var(--ink-2); }
.fill-row .btn { flex: none; }

/* =================================================================== side column: the deal card (the party chat is
   the bottom-left overlay now, ADDENDUM §8e) */
.side { position: sticky; top: calc(var(--bar-h) + 20px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.deal { flex: none; padding: 20px 22px; }
.prize { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,200,61,.16), rgba(255,200,61,.04)); border: 1px solid rgba(255,200,61,.28); margin-bottom: 16px; }
.prize .label { color: #E6BE5A; margin-bottom: 6px; }
.prize b { display: inline-block; font: 800 30px/1 var(--f-display); letter-spacing: -.03em; color: var(--gold); font-variant-numeric: tabular-nums; }
.prize b.lb-bump { animation: bump .5s var(--spring); }
.prize small { display: block; margin-top: 6px; font: 700 12.5px/1.2 var(--f-ui); color: var(--ink-3); }
.stack-av { display: flex; flex: none; }
.stack-av > * { margin-left: -10px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.stack-av > *:first-child { margin-left: 0; }

/* the deal: buy-in, then game length right under it */
.lb-set { display: grid; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.lb-set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.lb-set-row .label { margin: 0; }
.lb-set-v { font: 800 19px/1 var(--f-display); letter-spacing: -.02em; }
.lb-set-v small { font: 700 12.5px/1 var(--f-ui); letter-spacing: 0; color: var(--ink-3); }
.lb-len-head { margin-top: 4px; }
.lb-byhost { font: 700 12.5px/1 var(--f-ui); font-style: normal; color: var(--ink-3); }
.lb-seg { overflow: visible; }
.lb-seg button { flex: 1 1 0; height: 48px; padding: 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.lb-seg button b { font: 800 16px/1 var(--f-display); letter-spacing: -.02em; }
.lb-seg button small { font: 800 12px/1 var(--f-ui); letter-spacing: .02em; opacity: .8; }
.lb-seg button:active { transform: translateY(1px); }
.lb-seg.readonly button:active { transform: none; }
.lb-hint { margin: 0; max-height: 0; overflow: hidden; opacity: 0; font: 700 13px/1.3 var(--f-ui); color: var(--grape-ink); transition: max-height .25s var(--out), opacity .2s; }
.lb-hint.on { max-height: 24px; opacity: 1; }

/* your move */
.move-main { margin-top: 2px; }
.row2 { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 6px; }
.lb-center { text-align: center; margin-top: 2px; }
.you-in { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--go-soft); border: 1px solid rgba(43,216,129,.3); }
.you-in b { display: block; color: var(--go); font-size: 16px; }
.you-in span { color: var(--ink-2); font: 600 13px/1.35 var(--f-ui); }
.lb-practice-in { background: var(--grape-soft); border-color: rgba(123,97,255,.35); }
.lb-practice-in b { color: var(--grape-ink); }
.you-ask { padding: 14px 16px; border-radius: 18px; background: var(--gold-soft); border: 1px solid rgba(255,200,61,.3); }
.you-ask b { color: var(--gold); }
.you-ask p { margin: 4px 0 10px; color: var(--ink-2); font: 600 13px/1.4 var(--f-ui); }
.lb-ask-row { justify-content: flex-start; }
.lb-start { margin-top: 16px; }
.start-wrap { margin-top: 14px; }
.lb-start .start-wrap:first-child { margin-top: 0; }
.start-note { margin: 10px 0 0; text-align: center; font: 700 13px/1.4 var(--f-ui); color: var(--ink-3); }
.start-note b { color: var(--ink-2); }
.lb-guest-note { margin-top: 0; }
.lb-coverall { margin-top: 12px; }
.lb-leave-pub { margin-top: 12px; }
.lb-leave-pub .btn { width: 100%; }

/* who paid + rules */
.lb-more { padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; }
.lb-more > :only-child { grid-column: 1 / -1; }
.lb-more > :only-child .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; }
.lb-none { margin: 0; }
.lb-ink { color: var(--ink); }
.who-paid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.who-paid li { display: flex; align-items: center; gap: 10px; font: 700 13.5px/1.2 var(--f-ui); color: var(--ink-2); min-width: 0; }
.who-paid .arrow { color: var(--ink-3); }
.who-paid li > span:nth-child(2) { white-space: nowrap; }
.who-paid .for { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.who-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px 3px 3px; border-radius: 999px; background: rgba(255,255,255,.06); font: 800 12px/1 var(--f-ui); color: var(--ink-2); }
.who-chip.gift { background: var(--gold-soft); color: var(--gold); }
.who-paid .amt { margin-left: auto; color: var(--ink); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 10px; align-items: flex-start; font: 600 13.5px/1.4 var(--f-ui); }
.rules li > span { color: var(--ink-2); }
.rules li .ic { width: 20px; height: 20px; flex: none; }
.rules li b { color: var(--ink); }
/* Leave sits on its own, under the rules: never next to Buy in / Ask to be covered (and it asks first) */
.lb-leave-row { display: flex; justify-content: center; margin-top: -4px; }
.lb-leave-row:empty { display: none !important; }

/* =================================================================== the sticky bottom button */
.act-dock { display: none; }
.lb-dock-sub { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; margin: 0 auto 2px; max-width: 640px; font: 700 13.5px/1.2 var(--f-ui); color: var(--ink-3); }
.lb-dock-sub .btn-link { padding: 6px 8px; min-height: 44px; font-size: 14px; }
.lb-dock-note { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.lb-gold-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); text-decoration-color: rgba(255,200,61,.45); }
.lb-gold-link:hover { color: #FFD871; }
.lb-wait, .lb-wait[aria-disabled="true"] { overflow: hidden; cursor: default; filter: none; color: var(--ink-2); }
.lb-wait:active { transform: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 4px 0 var(--edge), 0 12px 24px -8px rgba(0,0,0,.6); }
.lb-wait-fill { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(123,97,255,.22), rgba(123,97,255,.42)); transform-origin: left; transform: scaleX(0); transition: transform .25s linear; pointer-events: none; }
.lb-wait span { position: relative; font-variant-numeric: tabular-nums; }

/* =================================================================== responsive */
@media (max-width: 1180px) {
  .lobby { grid-template-columns: minmax(0, 1fr) 340px; }
  .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lb-more { grid-template-columns: minmax(0, 1fr); }
  .lb-more > :only-child .rules { grid-template-columns: minmax(0, 1fr); }
}

/* one column + the sticky bottom button (tablets and phones) */
@media (max-width: 980px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 460px; margin: 0 auto 4px; }
  .home-hero { text-align: center; }
  .home-hero .lead { margin-left: auto; margin-right: auto; }
  .home-cards { max-width: 560px; width: 100%; margin: 0 auto; }

  .lobby { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-bottom: 116px; }
  .lb-main, .side { display: contents; }
  .lobby-head { order: 1; }
  .seats { order: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lb-fill { order: 3; }
  .deal { order: 4; }
  .lb-more { order: 6; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lb-more > :only-child .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-leave-row { order: 7; margin: 4px 0 24px; }
  .lb-primary, .move-main, .move-main + .row2, .lb-coverall, .lb-ask-row, .lb-leave-pub { display: none !important; }

  /* (fix) an opaque dock: only its top 12px fades, so nothing ghosts through next to "Ask to be covered" */
  .act-dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-dock); padding: 14px var(--gutter) calc(12px + var(--safe-b)); background: linear-gradient(180deg, rgba(13,10,28,0), rgb(13,10,28) 12px); pointer-events: none; }
  .act-dock > * { pointer-events: auto; }
  body[data-screen="lobby"] #toasts { bottom: calc(136px + var(--safe-b)); }
  .act-dock .btn-xl { display: flex; height: 56px; max-width: 640px; margin: 0 auto; font-size: 18px; border-radius: 17px; }
  .act-dock .btn-xl.btn-soft:disabled { filter: saturate(.4) brightness(.8); }
}

/* phones: design target 390×844; 8 seats fit above the sticky button */
@media (max-width: 700px) {
  /* home */
  body[data-screen="home"] main { padding-top: 12px; }
  .home { gap: 18px; }
  .hero-art { max-width: 300px; margin-bottom: 0; }
  .home .display { font-size: 34px; }
  .home-card { padding: 18px 16px 14px; }
  .home-card .sub { font-size: 14.5px; margin-bottom: 12px; }
  .buyins { gap: 8px; }
  .home-card .tile { height: 56px; font-size: 16.5px; border-radius: 16px; }
  .home-card .code-in { gap: 8px; }
  .home-card .code-in input { height: 58px; font-size: 24px; }
  .home-card .btn-xl { height: 56px; }
  .home-anyone { gap: 10px; padding: 8px 8px 8px 10px; }
  .home-anyone .home-faces { display: none; }   /* phones: the words and the live line need the room */
  .home-anyone-t b { font-size: 14px; }
  .home-practice { display: inline-flex; align-items: center; gap: .3em; min-height: 44px; padding: 8px 4px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 4px; }
  .step { padding: 14px 16px; }
  .foot { justify-content: flex-start; padding-bottom: 10px; }
  .foot .age { font-size: 13px; padding: 3px 6px; }

  /* lobby head */
  body[data-screen="lobby"] main { padding-top: 14px; }
  .lobby { gap: 12px; }
  .lb-chatbtn { display: none !important; }
  .lobby-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 0; }
  .lb-eyebrow { margin-bottom: 8px; }
  .lb-title, .lb-public .lb-title { font-size: 22px; line-height: 1.12; }
  .deal-line { margin-top: 10px; gap: 6px; }
  .deal-line .pill { height: 30px; padding: 0 10px; font-size: 13px; }
  .lb-chatbtn { display: block; position: absolute; top: 0; right: 0; }
  .lb-head-r { width: 100%; }
  .code-card { justify-content: space-between; padding: 12px 12px 12px 14px; gap: 10px; border-radius: 20px; }
  .code-card .label { margin-bottom: 7px; }
  .code-card .link-row { display: none; }
  .code-actions .btn { padding: 0 12px; height: 44px; }
  .code-actions { gap: 4px; }
  .lb-timer { min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: end; column-gap: 14px; padding: 12px 16px 16px; border-radius: 20px; }
  .lb-timer .label { grid-column: 1 / -1; margin-bottom: 6px; }
  .lb-timer-n { font-size: 32px; }
  .lb-timer small { margin: 0 0 3px; text-align: right; }

  /* seats: 2 × 4 compact tiles (chip left, who + status right) */
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .seat { flex-direction: row; align-items: center; text-align: left; gap: 8px; min-height: 64px; padding: 8px 8px 8px 7px; border-radius: 18px; }
  .seat:focus-visible { border-radius: 18px; }
  .seat-stage { width: 44px; height: 46px; margin: 0; }
  .seat-stage .chip { width: 44px; height: 44px; }
  .seat-stage::after { width: 50px; height: 8px; bottom: -3px; }
  .seat-stage::before { width: 44px; height: 44px; bottom: 1px; border-width: 2.5px; }
  .seat-info { align-items: flex-start; flex: 1; }
  .seat-name { justify-content: flex-start; gap: 5px; font-size: 14.5px; }
  .seat-name .tag { font-size: 13px; padding: 2px 5px; letter-spacing: .02em; text-transform: none; }
  .seat-status { margin-top: 3px; justify-content: flex-start; text-align: left; gap: 4px; min-height: 0; font-size: 13px; line-height: 1.2; }
  .seat-status .ic { width: 14px; height: 14px; }
  .seat.has-paid .seat-status.in { display: none; }
  .seat-un { justify-content: flex-start; margin-top: 1px; }
  /* a familiar regular who's in: "Played 3×" takes the status line (the tile stays two lines, so 8 seats still fit) */
  .seat-met { justify-content: flex-start; margin-top: 3px; }
  .seat-met.only-rnd, .seat-rnd { display: flex; }
  .seat-met .tag { font-size: 13px; padding: 2px 5px; letter-spacing: .02em; text-transform: none; }
  .seat:not(.is-in) .seat-met { display: none; }
  .seat.is-in.has-met .seat-status.in, .seat.is-in.has-met .paid-by, .seat.is-in.has-met .seat-name .tag.rnd { display: none; }
  .paid-by { margin-top: 3px; padding: 0; background: none; color: var(--go); font: 700 13px/1.2 var(--f-ui); }
  .paid-by .chip { display: none; }
  .paid-by.gift { background: none; color: var(--gold); }
  .lb-blurb { display: none; }
  .lb-pers { display: inline; color: var(--ink-2); }
  .seat-foot { display: none; }
  /* a friend asking to be covered: the gold chip replaces "Asking to be covered" (the gold ring already says it) */
  .seat.has-chip .seat-status.ask { display: none; }
  .lb-cover-chip {
    position: relative; display: inline-flex; align-items: center; gap: 4px; height: 26px; margin-top: 4px; padding: 0 10px 0 7px;
    appearance: none; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
    background: var(--gold); color: var(--gold-ink); font: 800 13px/1 var(--f-ui); box-shadow: 0 3px 0 var(--gold-edge);
    -webkit-tap-highlight-color: transparent;
  }
  .lb-cover-chip::after { content: ""; position: absolute; inset: -9px -6px; }      /* a 44px tap area */
  .lb-cover-chip:active { transform: translateY(3px); box-shadow: none; }
  .lb-cover-chip .ic { width: 14px; height: 14px; }
  /* (fix) the Edit pencil sits on your tile's corner (44px hit area), so "Covered by Leo" keeps the full width */
  .seat-edit { top: -7px; right: -5px; width: 28px; height: 28px; padding: 0; justify-content: center; background: var(--night-3); border-color: var(--line-3); color: var(--ink); box-shadow: 0 3px 8px -2px rgba(0,0,0,.6); }
  .seat-edit::after { inset: -8px; }
  .seat-edit:active { transform: scale(.94); }
  .seat-edit span { display: none; }
  .ask-ring::before { border-radius: 19px; }
  .seat.is-empty { justify-content: flex-start; gap: 10px; border-width: 1.5px; }
  .seat.is-empty .seat-stage { height: 44px; display: grid; place-items: center; }
  .seat.is-empty .ghost { width: 36px; height: 36px; }
  .seat.is-empty.is-act .seat-info { display: none; }
  .seat.is-empty.is-act .seat-plus { display: inline-flex; align-items: center; gap: 6px; font: 800 14px/1 var(--f-ui); color: var(--ink-2); }
  .seat.is-empty.is-act .seat-plus .ic { color: var(--ink-3); }
  .seat-empty-t { margin-top: 0; font-size: 13.5px; }

  .fill-row { padding: 10px 10px 10px 14px; gap: 10px; font-size: 13px; }
  .fill-row .btn { padding: 0 11px; height: 44px; }
  .fill-row .btn .ic { display: none; }

  .deal { padding: 18px 16px; }
  .prize { padding: 14px 16px; }
  .prize b { font-size: 26px; }
  .lb-seg button small { font-size: 13px; }
  /* text is never below 13px on phones */
  .lb-practice .lb-eyebrow .tag { font-size: 13px; padding: 3px 6px; }
  .lb-byhost, .prize small, .who-chip, .lb-set-v small, .home-live, .seat-empty-s, .lb-hint { font-size: 13px; }
  /* the chat pill (§8e) lives in the dock, at the left end of the sub row (always there, so the big button never
     moves), so it never sits on a seat or a line of text; its lines float just above the dock and fade */
  .lobby { --cov-dock: 74px; padding-bottom: 16px; }
  .act-dock .lb-dock-sub { min-height: 44px; padding: 0 4px 0 56px; }
  .act-dock .lb-dock-sub .lb-dock-note { white-space: nowrap; }
  /* toasts drop in under the app bar here, so they never land on the chat lines above the dock */
  body[data-screen="lobby"] #toasts { top: calc(var(--bar-h) + 8px); bottom: auto; }
  .lb-more { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; gap: 18px; }
  .lb-more > :only-child .rules { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 380px) {
  .home-card .tile { font-size: 15px; }
  .code-tiles b { width: 38px; height: 48px; font-size: 22px; }
  .code-actions .btn { padding: 0 10px; font-size: 13px; }
  .seat { gap: 7px; padding-right: 8px; }
  .seat-name { font-size: 14px; }
  /* QA: "Covered by Maya" says who paid: it wraps to a second line rather than cutting the name ("Covered by M…") */
  .paid-by.gift span { white-space: normal; overflow-wrap: anywhere; }
}
/* QA: 981–1099 wide, the dashed "Play with randoms" row is narrow: its waiting faces step aside (as on phones) so the
   live line keeps its countdown ("next game in 0:19") */
@media (min-width: 981px) and (max-width: 1099px) {
  .home-anyone .home-faces { display: none; }
}
/* QA: "$1,000" ran past its buy-in tile's edge on phones (2px at 390, 3px at 360): a hair smaller and tighter, the
   same size on all four tiles */
@media (max-width: 700px) {
  .home-card .tile { font-size: 15px; letter-spacing: -.03em; }
}
@media (max-width: 380px) {
  .home-card .tile { font-size: 13.5px; padding: 0 2px; }
}

/* landscape phones: keep the button in reach and the seats compact */
@media (max-height: 520px) and (orientation: landscape) {
  .seat { min-height: 180px; }
  .seat-stage { height: 84px; }
  .seat-stage .chip { width: 76px; height: 76px; }
}
/* founder: step 1's number dark like 2 and 3 */
.step:nth-child(1) .step-n { color: #140F2B; }

