/* Crib with Dad — built for a tablet held sideways. Big type, big buttons, a wooden table. */
:root {
  --ink: #2b1d12;
  --muted: #7a6656;
  --paper: #fbf5ea;
  --paper2: #f3e8d4;
  --line: #e2d3bb;
  --accent: #2e7d4f;
  --accent-ink: #fff;
  --danger: #c0392b;
  --walnut: #3d2414;
  --gold: #f2c14e;
  --radius: 18px;
  --cw: clamp(76px, 9.2vw, 118px);
  font-size: 19px;
}
body.big-cards { --cw: clamp(92px, 11.5vw, 150px); }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  /* The wooden table: wavy grain from an SVG noise filter, plank seams, and a warm base. */
  background-color: #8b5a33;
  background-image:
    repeating-linear-gradient(180deg, transparent 0 158px, rgba(35, 18, 6, .55) 158px 160px, rgba(255, 220, 170, .10) 160px 161px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='480'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0035 0.11' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.12 0 0 0 0 0.04 0 0 0 1.5 -0.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.85 0 0 0 0 0.6 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 40%, rgba(255, 210, 150, .22), transparent 70%),
    linear-gradient(90deg, #6f4323, #93603a 22%, #7f5130 48%, #9a6a42 72%, #734625);
  background-attachment: fixed;
}
a { color: #1f5f9e; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.block { display: block; }
.center { text-align: center; }
.sr { position: absolute; left: -9999px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }

/* ---- Top bar with the clock ---- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .45rem max(1rem, env(safe-area-inset-right)) .45rem max(1rem, env(safe-area-inset-left));
  padding-top: max(.45rem, env(safe-area-inset-top));
  background: linear-gradient(#4a2c18, #2f1b0e);
  color: #f6e7cf;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: .5rem; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--paper); color: #222; font-size: 1.5rem; box-shadow: inset 0 0 0 2px #d9c6a5; }
.clock { display: flex; align-items: center; gap: .45rem; margin-left: auto; font-variant-numeric: tabular-nums; background: #1b0f07; border-radius: 12px; padding: .2rem .7rem; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6); }
.clock-time { font-size: 2.05rem; font-weight: 800; letter-spacing: .02em; color: #ffd27a; text-shadow: 0 0 10px rgba(255, 190, 80, .45); font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; }
.clock-side { display: flex; flex-direction: column; line-height: 1.05; font-size: .72rem; color: #e9cf9f; font-weight: 700; }
.topnav { display: flex; gap: .3rem; align-items: center; }
.topnav a { color: #f6e7cf; text-decoration: none; padding: .55rem .8rem; border-radius: 12px; font-weight: 700; }
.topnav a:hover { background: rgba(255, 255, 255, .1); }
.me-chip { display: flex; gap: .35rem; align-items: center; background: rgba(255, 255, 255, .12); }
.top-mid { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: #f6e7cf; white-space: nowrap; }
.top-mid .muted { color: #d8bf9a; }
.game-top .clock { margin-left: auto; }
.top-actions { display: flex; gap: .35rem; }
.tbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 64px; height: 52px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #f6e7cf; font: inherit; font-size: 1.2rem; text-decoration: none; cursor: pointer; }
.tbtn span { font-size: .62rem; font-weight: 700; }
.tbtn.on { background: #2e7d4f; }

/* ---- Pages ---- */
.page, .home { max-width: 1180px; margin: 0 auto; padding: 1.1rem max(1rem, env(safe-area-inset-left)) 2rem; }
.page > h1, .home-hello h1 { color: #fff7e8; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.home-hello .muted { color: #f1dcbc; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); margin: 0 0 .8rem; }
.home-hello .muted a { color: #fff; }
.center-page { min-height: calc(100dvh - 64px); display: grid; place-items: center; padding: 1rem; }
.card {
  background: linear-gradient(var(--paper), var(--paper2));
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 6px 18px rgba(30, 12, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .6);
  margin-bottom: 1rem;
}
.login-card { width: min(460px, 100%); }
.wide-card { width: min(760px, 100%); }
.home-grid, .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.home-col > .card { margin-bottom: 1rem; }
@media (max-width: 820px) { .home-grid, .two-col { grid-template-columns: 1fr; } }
.stack { display: grid; gap: .9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
label { display: grid; gap: .3rem; font-weight: 700; }
input:not([type=radio]):not([type=checkbox]) {
  font: inherit; font-size: 1.1rem; padding: .75rem .9rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); width: 100%; min-height: 54px;
}
input:focus { outline: 3px solid #f2c14e; outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: .35rem; }
.row { display: flex; gap: .5rem; }
.row input { flex: 1; }
.flash { padding: .7rem 1rem; border-radius: 12px; font-weight: 700; }
.flash.bad { background: #fde3df; color: #8f1d12; }
.flash.good { background: #dff3e5; color: #165c32; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; text-decoration: none;
  padding: .7rem 1.1rem; min-height: 52px; border-radius: 14px;
  border: 0; background: #fff; color: var(--ink);
  box-shadow: 0 3px 0 #cbb79a, 0 4px 10px rgba(0, 0, 0, .12);
  transition: transform .06s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #cbb79a; }
.btn.primary { background: linear-gradient(#3a9663, #2b7a4e); color: #fff; box-shadow: 0 3px 0 #1d5536, 0 4px 10px rgba(0, 0, 0, .2); }
.btn.danger { background: linear-gradient(#e0533f, #b8352a); color: #fff; box-shadow: 0 3px 0 #7d2219; }
.btn.ghost { background: transparent; box-shadow: none; text-decoration: underline; }
.btn.big { font-size: 1.2rem; min-height: 62px; padding: .8rem 1.5rem; }
.btn.small { min-height: 40px; padding: .35rem .7rem; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: default; }
.pulse { animation: pulse 0.8s infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }

.emoji-pick { display: flex; flex-wrap: wrap; gap: .35rem; }
.emoji-pick input { position: absolute; opacity: 0; }
.emoji-pick span { display: grid; place-items: center; width: 54px; height: 54px; font-size: 1.8rem; border-radius: 14px; background: #fff; border: 3px solid transparent; cursor: pointer; }
.emoji-pick input:checked + span { border-color: var(--accent); background: #e6f4ea; }
.hero-cards { display: flex; justify-content: center; margin-bottom: .6rem; }
.mini-card { display: grid; place-items: center; width: 54px; height: 76px; background: #fff; border-radius: 8px; font-weight: 800; font-size: 1.3rem; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); margin: 0 -6px; transform: rotate(calc(var(--r, 0) * 1deg)); }
.mini-card:nth-child(1) { --r: -12; } .mini-card:nth-child(2) { --r: -4; } .mini-card:nth-child(3) { --r: 4; } .mini-card:nth-child(4) { --r: 12; }
.mini-card.red { color: #c62828; }

/* Home */
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg input { position: absolute; opacity: 0; }
.seg label span, .seg button { display: block; padding: .7rem 1rem; border-radius: 14px; background: #fff; border: 3px solid var(--line); font: inherit; font-weight: 800; cursor: pointer; color: var(--ink); }
.seg input:checked + span, .seg button.on { border-color: var(--accent); background: #e6f4ea; }
.seg.sm { flex-wrap: nowrap; }
.seg.sm button { padding: .4rem .8rem; }
.invite-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; }
.invite-pick .pick input { position: absolute; opacity: 0; }
.invite-pick .pick span { padding: .5rem .8rem; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 700; cursor: pointer; }
.invite-pick .pick input:checked + span { border-color: var(--accent); background: #e6f4ea; }
.join-row { display: flex; gap: .5rem; margin-top: .9rem; }
.join-row input { flex: 1; text-transform: uppercase; letter-spacing: .3em; font-weight: 800; text-align: center; font-size: 1.4rem !important; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #bbb; }
.dot.on { background: #2fbf5b; box-shadow: 0 0 0 3px rgba(47, 191, 91, .25); }
.fam-list, .table-list, .news, .recent { list-style: none; margin: 0 0 .8rem; padding: 0; }
.fam-list li { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.fam-emoji { font-size: 2rem; width: 2.6rem; text-align: center; }
.fam-main { flex: 1; }
.fam-wx { display: flex; align-items: center; gap: .3rem; font-size: 1.1rem; }
.table-link { display: flex; align-items: center; gap: .8rem; padding: .65rem .7rem; border-radius: 14px; background: #fff; text-decoration: none; color: inherit; margin-bottom: .45rem; box-shadow: 0 2px 0 var(--line); }
.table-link.invite { background: #fff6d6; box-shadow: 0 0 0 3px var(--gold); }
.table-link .go { margin-left: auto; font-weight: 800; color: var(--accent); }
.code-pill { display: inline-block; padding: .2rem .55rem; border-radius: 8px; background: #2b1d12; color: #ffd27a; font-weight: 800; letter-spacing: .12em; font-family: ui-monospace, Menlo, monospace; }
.wx-now { display: flex; align-items: center; gap: .8rem; }
.wx-big { font-size: 4rem; line-height: 1; }
.wx-temp { font-size: 3.4rem; font-weight: 800; }
.wx-label { font-size: 1.2rem; font-weight: 700; }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .8rem; }
.wx-day { display: grid; justify-items: center; gap: .1rem; background: #fff; border-radius: 14px; padding: .5rem; }
.wx-e { font-size: 1.7rem; }
.news li { padding: .5rem 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.news a { color: var(--ink); font-weight: 700; text-decoration: none; }
.news a:hover { text-decoration: underline; }
.talk { display: flex; gap: .6rem; padding: .4rem 0; }
.talk ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.talk li { margin-bottom: .25rem; line-height: 1.3; }
.talk a { color: var(--ink); }
.credit { color: #f1dcbc; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.credit a { color: #fff; }
.invite-banner {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.4rem; border-radius: 20px;
  background: #fff6d6; color: var(--ink); text-decoration: none; box-shadow: 0 0 0 4px var(--gold), 0 10px 30px rgba(0, 0, 0, .4);
  animation: rise .4s ease-out; font-size: 1.1rem;
}
.invite-banner .go { font-weight: 800; color: var(--accent); }
.big-emoji { font-size: 2.6rem; }
@keyframes rise { from { transform: translate(-50%, 120%); } }

/* Records */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { display: grid; justify-items: center; background: #fff; border-radius: 14px; padding: .7rem .4rem; text-align: center; }
.stat b { font-size: 2rem; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 700; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th, table.grid td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
table.grid th { font-size: .8rem; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; gap: .6rem; align-items: center; margin: .5rem 0; }
.bar { height: 18px; background: #fff; border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 9px; }
.recent li { display: flex; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.recent .res { font-weight: 800; width: 3.6rem; text-align: center; padding: .25rem; border-radius: 8px; background: #eee; }
.recent .won .res { background: #2e7d4f; color: #fff; }

/* ===== The game table ===== */
body.game-page { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; overscroll-behavior: none; touch-action: manipulation; }
.table-app {
  flex: 1; min-height: 0;
  display: grid; grid-template-rows: auto auto 1fr auto auto; gap: .45rem;
  padding: .5rem max(.7rem, env(safe-area-inset-left)) max(.4rem, env(safe-area-inset-bottom));
}
body[data-status=lobby] .table-app { grid-template-rows: auto 1fr auto auto; }
body.no-talk .table-app { grid-template-rows: auto auto 1fr auto; }
body.no-talk[data-status=lobby] .table-app { grid-template-rows: auto 1fr auto; }
body.no-talk .talk-strip { display: none; }

/* Seats along the top, each with its video tile */
.seats { display: flex; gap: .6rem; justify-content: center; align-items: stretch; min-height: 0; }
.seat {
  position: relative; display: flex; flex-direction: column; gap: .3rem;
  background: rgba(30, 16, 6, .45); border-radius: 18px; padding: .4rem;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--c) 70%, transparent);
  transition: box-shadow .2s, transform .2s;
}
.seat.turn { box-shadow: inset 0 0 0 4px var(--gold), 0 0 22px rgba(242, 193, 78, .7); }
.seat.away { opacity: .6; }
.seat.empty { display: grid; place-items: center; color: #e9d7bb; min-width: 160px; }
.tile-ph { padding: 2rem 1rem; font-weight: 700; }
.vid-slot { height: clamp(84px, 15vh, 190px); aspect-ratio: 4 / 3; }
.seats[data-count="4"] .vid-slot { height: clamp(76px, 14.5vh, 160px); }
.seat.me .vid-slot { height: clamp(70px, 12vh, 130px); }
.tile { position: relative; width: 100%; height: 100%; border-radius: 13px; overflow: hidden; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 45%, #3a2414), #1e1008); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: none; }
.tile.me video { transform: scaleX(-1); }
.tile.cam-on video { display: block; }
.tile .avatar { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2.6rem, 6vw, 4.5rem); }
.tile.cam-on .avatar { display: none; }
.tap-sound { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); border: 0; border-radius: 10px; padding: .4rem .7rem; font: inherit; font-weight: 800; background: #fff; }
.seat-info { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .4rem; color: #fff7e8; padding: 0 .25rem; max-width: 100%; }
.seat-info .chips { order: 3; flex-basis: 100%; }
.seat-info .seat-score { order: 2; }
.seat-name { flex: 1 1 0; min-width: 0; font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat { min-width: 0; padding-bottom: .3rem; gap: .2rem; }
.seat-info, .vid-slot { width: auto; }
.seat-name small { font-weight: 600; opacity: .8; }
.chips { display: flex; gap: .25rem; flex-wrap: wrap; }
.chip { font-size: .65rem; font-weight: 800; padding: .15rem .45rem; border-radius: 999px; background: rgba(255, 255, 255, .18); color: #fff; }
.chip.dealer { background: var(--gold); color: #3a2400; }
.chip.team { background: var(--c, #555); color: #fff; }
.chip.off { background: #777; }
.there { font-size: .7rem; color: #f1dcbc; font-weight: 700; }
.seat-score { margin-left: auto; font-size: 1.6rem; font-weight: 900; color: #fff; background: var(--c); border-radius: 10px; padding: 0 .5rem; min-width: 2.6rem; text-align: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.mini-backs { position: absolute; top: .7rem; right: .7rem; display: flex; }
.mini-backs i { width: 16px; height: 23px; border-radius: 3px; margin-left: -7px; background: repeating-linear-gradient(45deg, #b3261e 0 3px, #8e1b15 3px 6px); border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.turn-tag { position: absolute; top: .55rem; left: .55rem; background: var(--gold); color: #3a2400; font-weight: 900; font-size: .7rem; padding: .15rem .5rem; border-radius: 999px; animation: pulse .7s infinite alternate; }
.bubble { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); font-weight: 900; font-size: 1.5rem; padding: .3rem .9rem; border-radius: 18px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); z-index: 2; }
body.hide-video .vid-slot { height: 64px !important; aspect-ratio: 1; }
body.hide-video .tile .avatar { font-size: 2.2rem; }
body.hide-video .seat { flex-direction: row; align-items: center; padding-right: .7rem; }
body.hide-video .mini-backs { position: static; margin-left: .3rem; }

/* Board */
.board-host { display: flex; justify-content: center; min-height: 0; }
.board-host[hidden] { display: none; }
.board { width: min(100%, 1050px); max-height: 17vh; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.board-body { stroke: #6e4321; stroke-width: 3; }
.hole { fill: #3a2210; stroke: rgba(255, 230, 190, .35); stroke-width: .8; }
.hole.fin { fill: #241307; }
.lane { fill: color-mix(in srgb, var(--lane, #fff) 18%, transparent); stroke: color-mix(in srgb, var(--lane, #fff) 60%, transparent); stroke-width: 1.2; }
.mark { font-size: 7px; fill: #5c3517; text-anchor: middle; font-weight: 700; }
.mark.skunk { fill: #3a2210; font-size: 7px; }
.skunk-line { stroke: #2b1405; stroke-width: 1.4; stroke-dasharray: 2 2; }
.peg { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.peg circle { fill: var(--peg); stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, .6)); }
.peg.back circle { opacity: .55; }
.score-num { font-size: 22px; font-weight: 900; text-anchor: middle; paint-order: stroke; stroke: #fff4e0; stroke-width: 3px; }

/* Center of the table */
.tcenter { --cw: clamp(62px, 7.6vw, 100px); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: .6rem; min-height: 0; overflow: auto; }
.prompt { color: #fff7e8; font-weight: 800; font-size: 1.15rem; text-align: center; text-shadow: 0 2px 5px rgba(0, 0, 0, .55); }
.prompt.big { font-size: 1.45rem; max-width: 26rem; }
.prompt.you { color: var(--gold); font-size: 1.4rem; animation: pulse .8s infinite alternate; }
.hint-line { display: block; font-size: .95rem; font-weight: 600; color: #f1dcbc; margin-top: .3rem; }
.table-row { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 3vw, 2.5rem); }
.deck-wrap, .crib-wrap { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.deck-label { color: #f6e7cf; font-weight: 800; font-size: .85rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.deck { position: relative; border: 0; background: none; padding: 0; cursor: default; }
.deck .stack { position: absolute; inset: 0; border-radius: calc(var(--cw) * .09); transform: translate(5px, 5px); background: #6d140f; box-shadow: 2px 2px 0 #4c0d09, 4px 4px 6px rgba(0, 0, 0, .4); }
.deck.tap { cursor: pointer; animation: pulse .7s infinite alternate; }
.deck.tap .pc { box-shadow: 0 0 0 4px var(--gold), 0 6px 14px rgba(0, 0, 0, .4); }
.crib-pile { position: relative; width: calc(var(--cw) * 1.25); height: calc(var(--cw) * 1.4); }
.crib-pile .pc { position: absolute; left: calc(var(--k) * 6px); top: calc(var(--k) * -2px); }
.peg-area { display: flex; align-items: center; gap: 1rem; }
.count-bubble { display: grid; place-items: center; width: calc(var(--cw) * .95); height: calc(var(--cw) * .95); border-radius: 50%; background: #fff7e8; box-shadow: 0 0 0 5px #2b1d12, 0 6px 14px rgba(0, 0, 0, .4); }
.count-bubble span { font-size: .7rem; font-weight: 800; color: var(--muted); margin-bottom: -.6rem; }
.count-bubble b { font-size: calc(var(--cw) * .42); font-weight: 900; }
.count-bubble.hot { background: #ffe1a1; }
.pile { display: flex; align-items: center; min-height: calc(var(--cw) * 1.4); }
.pile .pc { margin-left: calc(var(--cw) * -.55); box-shadow: 0 -4px 0 var(--c) inset, 0 4px 10px rgba(0, 0, 0, .35); animation: drop .25s ease-out; }
.pile .pc:first-child { margin-left: 0; }
@keyframes drop { from { transform: translateY(-40px) scale(1.1); opacity: 0; } }
.spread { --cw: 74px; position: relative; height: 128px; width: min(90%, 720px); flex: none; }
.spread-card { position: absolute; left: calc(var(--k) * 5.2%); top: 0; padding: 0; border: 0; background: none; cursor: pointer; transform: rotate(calc((var(--k) - 8.5) * 1.5deg)); transform-origin: 50% 400%; transition: transform .15s; }
.spread-card:not(:disabled):hover, .spread-card.picked { transform: rotate(calc((var(--k) - 8.5) * 1.5deg)) translateY(-18px); }
.spread-card:disabled { cursor: default; }
.cuts { display: flex; gap: 1rem; }
.cut { display: flex; flex-direction: column; align-items: center; gap: .2rem; color: #fff; font-weight: 800; }
.cut > span { background: var(--c); padding: .1rem .6rem; border-radius: 999px; font-size: .85rem; }

/* The show */
.show { background: rgba(255, 247, 232, .96); border-radius: 22px; padding: .8rem 1.2rem; box-shadow: 0 0 0 4px var(--c), 0 10px 30px rgba(0, 0, 0, .4); display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: 100%; }
.show-head { display: flex; align-items: center; gap: 1rem; }
.show-head h2 { margin: 0; }
.show-total { font-size: 2rem; font-weight: 900; background: var(--c); color: #fff; padding: 0 .7rem; border-radius: 12px; }
.show-total small { font-size: .9rem; }
.show-cards { display: flex; align-items: center; gap: .4rem; --cw: clamp(68px, 7.6vw, 104px); }
.show-cards .pc { transition: transform .2s, box-shadow .2s; }
.show-cards .pc.lit { transform: translateY(-12px); box-shadow: 0 0 0 4px var(--gold), 0 8px 16px rgba(0, 0, 0, .35); }
.plus { font-size: 2rem; font-weight: 900; color: var(--muted); }
.breakdown { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .5rem; list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.breakdown li { font-weight: 800; font-size: 1.05rem; padding: .2rem .55rem; border-radius: 10px; background: #fff; color: #9a8a7a; transition: all .2s; }
.breakdown li.done { color: var(--ink); }
.breakdown li.lit { background: var(--gold); color: #3a2400; transform: scale(1.1); }
.keypad-wrap { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.keypad-wrap .prompt { color: var(--ink); text-shadow: none; }
.keypad { display: grid; grid-template-columns: repeat(13, 1fr); gap: .3rem; }
.keypad button { min-width: 48px; min-height: 48px; border-radius: 12px; border: 0; background: #fff; font: inherit; font-weight: 900; font-size: 1.15rem; box-shadow: 0 3px 0 #cbb79a; cursor: pointer; }
.keypad button:active { transform: translateY(2px); box-shadow: 0 1px 0 #cbb79a; }
.show-actions { display: flex; gap: .6rem; align-items: center; justify-content: center; flex-wrap: wrap; }

.over { background: rgba(255, 247, 232, .97); border-radius: 22px; padding: .7rem 1.2rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); display: grid; gap: .6rem; justify-items: center; max-width: 720px; width: 100%; }
.win-title { font-size: 1.7rem; margin: 0; }
.final { list-style: none; padding: 0; margin: 0; width: 100%; }
.final li { display: flex; align-items: center; gap: .8rem; padding: .3rem .7rem; border-radius: 12px; background: #fff; margin-bottom: .35rem; font-size: 1.1rem; }
.final li.won { box-shadow: 0 0 0 3px var(--gold); }
.final .place { font-weight: 900; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: #2b1d12; color: #ffd27a; }
.final b { margin-left: auto; font-size: 1.4rem; }
.final .skunk { font-weight: 800; color: var(--danger); }
.stats-table { font-size: .85rem; }
.stats-table th, .stats-table td { padding: .25rem .4rem !important; }

/* Lobby */
.lobby { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1rem; width: 100%; max-width: 1150px; height: 100%; min-height: 0; }
.panel { background: linear-gradient(var(--paper), var(--paper2)); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: 0 6px 18px rgba(30, 12, 0, .35); overflow: auto; }
.code-big { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 2rem; letter-spacing: .2em; background: #2b1d12; color: #ffd27a; padding: .1rem .6rem; border-radius: 12px; vertical-align: middle; }
.invite-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.seat-list { list-style: none; padding: 0; margin: .6rem 0; }
.seat-list li { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; margin-bottom: .4rem; border-radius: 14px; background: #fff; box-shadow: inset 4px 0 0 var(--c); min-height: 56px; }
.seat-list .who { flex: 1; font-weight: 800; font-size: 1.1rem; }
.dotc { width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.rules { display: grid; gap: .35rem; }
.rule { display: flex; align-items: center; gap: .8rem; justify-content: space-between; padding: .5rem .7rem; background: #fff; border-radius: 12px; }
.rule > div { display: grid; }
.rule > div > span { font-size: .8rem; color: var(--muted); }
.rule.disabled { opacity: .5; }
.start-row { display: flex; align-items: center; gap: .8rem; margin-top: .9rem; flex-wrap: wrap; }
.start-row .prompt { color: var(--ink); text-shadow: none; }
@media (max-width: 860px), (orientation: portrait) { .lobby { grid-template-columns: 1fr; height: auto; } }

/* Switches */
.switch { position: relative; display: inline-block; flex: none; width: 62px; height: 36px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #cdbfa9; transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(26px); }
.switch input:disabled { cursor: default; }

/* My hand */
.hand-area { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; }
.hand { display: flex; align-items: flex-end; justify-content: center; padding-top: 1.6rem; min-height: calc(var(--cw) * 1.4 + 1.6rem); }
.hand { gap: calc(var(--cw) * .06); }
.hand.active .pc { cursor: grab; }
.hand-card { transition: transform .15s, box-shadow .15s, opacity .15s; touch-action: none; user-select: none; -webkit-user-select: none; }
.hand-card.sel { transform: translateY(-1.4rem); box-shadow: 0 0 0 4px var(--gold), 0 10px 18px rgba(0, 0, 0, .45); }
.hand-card.dim { opacity: .45; filter: grayscale(.4); }
.hand-card.glow { box-shadow: 0 0 0 3px rgba(255, 230, 120, .85), 0 6px 14px rgba(0, 0, 0, .35); }
.hand-card.sel.glow { box-shadow: 0 0 0 4px var(--gold), 0 10px 18px rgba(0, 0, 0, .45); }
.hand-card.kept { opacity: .85; }
.hand-card.dragging { transition: none; z-index: 10; cursor: grabbing; box-shadow: 0 18px 30px rgba(0, 0, 0, .5); }
.hand-side { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; padding-bottom: .2rem; }
.hand-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.tip { color: #f1dcbc; font-weight: 700; }
.badge { position: absolute; top: -12px; right: -10px; background: #2e7d4f; color: #fff; font-weight: 900; font-size: .85rem; padding: .15rem .45rem; border-radius: 999px; box-shadow: 0 2px 4px rgba(0, 0, 0, .3); font-style: normal; }
.badge.tip { background: var(--gold); color: #3a2400; font-size: .7rem; }
.reactions { display: flex; gap: .25rem; background: rgba(30, 16, 6, .45); padding: .3rem; border-radius: 14px; }
.reactions button { border: 0; background: none; font-size: 1.55rem; width: 46px; height: 46px; border-radius: 10px; cursor: pointer; }
.reactions button:active { background: rgba(255, 255, 255, .2); transform: scale(1.2); }

/* ---- Playing cards ---- */
.pc {
  position: relative; flex: none;
  width: var(--cw); height: calc(var(--cw) * 1.4);
  border-radius: calc(var(--cw) * .09);
  background: linear-gradient(160deg, #fff, #f6f1e7);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .12);
  font-family: Georgia, "Times New Roman", serif;
  user-select: none; -webkit-user-select: none;
}
.pc.red { color: #c62828; }
.pc.black { color: #1d1d1d; }
.pc .idx { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .9; font-weight: 700; }
.pc .idx b { font-size: calc(var(--cw) * .27); letter-spacing: -.04em; }
.pc .idx i { font-style: normal; font-size: calc(var(--cw) * .22); }
.pc .tl { top: calc(var(--cw) * .05); left: calc(var(--cw) * .06); }
.pc .br { bottom: calc(var(--cw) * .05); right: calc(var(--cw) * .06); transform: rotate(180deg); }
.pc .pips { position: absolute; left: 30%; right: 30%; top: 15%; bottom: 15%; }
.pc .pips i { position: absolute; transform: translate(-50%, -50%); font-style: normal; font-size: calc(var(--cw) * .2); line-height: 1; }
.pc .pips i.flip { transform: translate(-50%, -50%) rotate(180deg); }
.pc .pips.ace i { font-size: calc(var(--cw) * .55); }
.pc .court { position: absolute; left: 24%; right: 24%; top: 17%; bottom: 17%; border: 2px solid currentColor; border-radius: 6px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 7%, #fff8e6); }
.pc .court b { font-size: calc(var(--cw) * .44); line-height: 1; }
.pc .court em { position: absolute; top: 4%; font-style: normal; font-size: calc(var(--cw) * .17); opacity: .8; }
.pc .court i { position: absolute; bottom: 3%; font-style: normal; font-size: calc(var(--cw) * .17); }
.pc.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .25) 0 18%, transparent 19%),
    repeating-linear-gradient(45deg, #b3261e 0 6px, #951d17 6px 12px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .08) 0 6px, transparent 6px 12px);
  box-shadow: inset 0 0 0 calc(var(--cw) * .05) #fff, inset 0 0 0 calc(var(--cw) * .065) #d9b7a8, 0 4px 10px rgba(0, 0, 0, .35);
}
.pc.ghost { background: rgba(0, 0, 0, .15); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.pc.sm { --cw: 64px; }
.pc.dim { opacity: .5; }
.pc.starter { box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(0, 0, 0, .35); }

/* ---- Toasts, floaters, confetti, modals ---- */
.toasts { position: fixed; left: 50%; top: 56%; transform: translate(-50%, -50%); z-index: 60; display: grid; gap: .5rem; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.3rem; border-radius: 18px; background: #fff7e8; color: var(--ink); font-weight: 900; font-size: 1.35rem; box-shadow: 0 0 0 4px var(--c, #2b1d12), 0 12px 30px rgba(0, 0, 0, .45); animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.toast.out { opacity: 0; transform: scale(.9); transition: all .3s; }
.toast.error { background: #fde3df; --c: var(--danger); font-size: 1.1rem; }
.toast.win { font-size: 2rem; padding: 1rem 2rem; --c: var(--gold); }
.toast-pts { background: var(--c); color: #fff; border-radius: 12px; padding: .1rem .55rem; font-size: 1.6rem; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.floater { position: fixed; font-size: 2.6rem; animation: floatUp 2.4s ease-out forwards; }
@keyframes floatUp { from { transform: translate(-50%, 0) scale(.6); opacity: 1; } to { transform: translate(-50%, -260px) scale(1.3); opacity: 0; } }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall 3s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(720deg); } }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(20, 10, 2, .6); display: grid; place-items: center; padding: 1rem; }
.modal { background: linear-gradient(var(--paper), var(--paper2)); border-radius: 22px; padding: 1.3rem 1.5rem; width: min(640px, 100%); max-height: 90dvh; overflow: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.modal-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1rem; }
.cam-ask { text-align: center; }
.cam-ask .modal-actions { justify-content: center; }
.pref { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.howto p { margin: .4rem 0; line-height: 1.4; }
.rule-summary { padding-left: 1.1rem; line-height: 1.4; }

/* Portrait or small screens: stack things */
@media (orientation: portrait) {
  :root { --cw: clamp(70px, 14vw, 128px); }
  .seats { flex-wrap: wrap; }
  .vid-slot, .seats[data-count="4"] .vid-slot { height: clamp(70px, 10vh, 150px); }
  .seat.me .vid-slot { height: clamp(60px, 8vh, 120px); }
  .game-top .brand-name, .top-mid .muted { display: none; }
  .board { max-height: 14vh; }
  .hand-area { flex-direction: column; align-items: center; }
  .hand-side { align-items: center; }
}
@media (max-height: 700px) and (orientation: landscape) {
  :root { --cw: clamp(64px, 7.6vw, 96px); }
  .top { min-height: 54px; }
  .clock-time { font-size: 1.7rem; }
  .board { max-height: 16vh; }
}
@media (max-width: 760px) {
  .brand-name, .tbtn span, .topnav a:not(.me-chip) { display: none; }
  .tbtn { min-width: 48px; }
}
.invite-face { font-size: 4.5rem; line-height: 1; margin-bottom: .4rem; }
.share-box { display: grid; gap: .45rem; background: #fff6d6; border-radius: 14px; padding: .7rem .8rem; margin: .4rem 0 .8rem; box-shadow: inset 0 0 0 2px var(--gold); }
.share-url { display: flex; gap: .4rem; }
.share-url input { flex: 1; min-height: 46px !important; font-size: .95rem !important; padding: .4rem .6rem !important; }
.share-box .invite-row { margin: 0; }

/* ---- Conversation strip along the bottom of the table ---- */
.talk-strip {
  display: flex; align-items: center; gap: .4rem; min-height: 50px;
  background: rgba(255, 247, 232, .93); border-radius: 14px; padding: .25rem .35rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3); color: var(--ink);
}
.talk-strip.in .ts-main { animation: tsIn .5s ease-out; }
@keyframes tsIn { from { opacity: 0; transform: translateY(6px); } }
.talk-strip.shared { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(242, 193, 78, .7); background: #fff6d6; }
.ts-nav { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: #fff; font-size: 1.5rem; font-weight: 900; color: var(--muted); cursor: pointer; }
.ts-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; border: 0; background: none; padding: 0 .2rem; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ts-icon { font-size: 1.7rem; flex: none; }
.ts-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ts-label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-text { font-size: 1.02rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-ask { flex: none; border: 0; border-radius: 12px; padding: .5rem .8rem; min-height: 42px; background: linear-gradient(#3a9663, #2b7a4e); color: #fff; font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.ts-ask:disabled { opacity: .5; }
.talk-pop {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 75; width: min(640px, 92vw);
  background: linear-gradient(var(--paper), var(--paper2)); border-radius: 18px; padding: 1rem 1.2rem;
  box-shadow: 0 0 0 3px var(--gold), 0 16px 40px rgba(0, 0, 0, .45); animation: tpIn .25s ease-out;
}
.tp-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; }
.tp-icon { font-size: 1.8rem; }
.tp-text { font-size: 1.25rem; font-weight: 700; margin: .5rem 0; line-height: 1.35; }
.tp-prompt { margin: .3rem 0; color: var(--accent); font-weight: 700; }
.tp-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) { .ts-ask span { display: none; } }
@keyframes tpIn { from { opacity: 0; transform: translate(-50%, 14px); } }

/* ---- Birthdays & special dates ---- */
.icon-pick label span { padding: .5rem .8rem; font-size: .95rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.check input { width: 26px; height: 26px; flex: none; margin-top: .1rem; }
.date-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .4rem; }
.date-list li { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 14px; background: rgba(255, 255, 255, .6); }
.date-list li.is-today { background: #fff3cf; box-shadow: inset 0 0 0 2px var(--gold); }
.dl-icon { font-size: 1.8rem; flex: none; }
.dl-main { flex: 1; min-width: 0; }
.dl-main .muted:not(.block) { margin-left: .3rem; }
.dl-when { flex: none; font-weight: 800; color: var(--accent); white-space: nowrap; }
.today-banner { display: flex; align-items: center; gap: .8rem; margin-top: .6rem; padding: .7rem 1rem; border-radius: 16px; background: linear-gradient(#fff6d8, #ffe9a8); color: var(--ink); box-shadow: 0 0 0 3px var(--gold), 0 6px 16px rgba(0, 0, 0, .3); animation: tpIn2 .4s ease-out; }
.today-banner .tb-icon { font-size: 2.4rem; }
@keyframes tpIn2 { from { opacity: 0; transform: translateY(8px); } }

/* ---- Between deals ---- */
.between-deals { max-width: min(620px, 92%); text-align: center; padding: .6rem 1.1rem .7rem; border-radius: 18px; background: linear-gradient(var(--paper), var(--paper2)); color: var(--ink); box-shadow: 0 0 0 3px var(--gold), 0 10px 24px rgba(0, 0, 0, .4); animation: tpIn2 .4s ease-out; }
.between-deals .bd-label { display: block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.between-deals p { margin: .3rem 0; font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.talk-strip[data-kind="story"] .ts-icon { animation: tpIn2 .4s ease-out; }
/* No cards in hand during the deal and the show: give the table centre that room. */
body[data-phase="deal"] .hand, body[data-phase="show"] .hand, body[data-phase="over"] .hand { min-height: 0; padding-top: .3rem; }

/* ---- Face to face ---- */
.vid-slot { transition: height .45s ease; }
/* Talk mode: between deals, during the count, at game over and in the lobby the faces grow. */
body.talk-mode .vid-slot { height: clamp(110px, 30vh, 340px); max-width: 44vw; }
body.talk-mode .seats[data-count="3"] .vid-slot { height: clamp(100px, 27vh, 300px); max-width: 30vw; }
body.talk-mode .seats[data-count="4"] .vid-slot { height: clamp(90px, 22vh, 250px); max-width: 23vw; }
body.talk-mode .seat.me .vid-slot { height: clamp(80px, 22vh, 250px); }
body.talk-mode[data-phase="show"] .vid-slot { height: clamp(90px, 21vh, 240px); }
body.talk-mode[data-phase="show"] .seats[data-count="4"] .vid-slot { height: clamp(80px, 18vh, 200px); }
/* Who's talking: a green ring on their tile. */
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; transition: box-shadow .15s; }
.tile.speaking::after { box-shadow: inset 0 0 0 4px #5ee08a, inset 0 0 22px rgba(94, 224, 138, .55); }
.tile.cam-on { cursor: zoom-in; }
/* Signal bars and notes on a tile. */
.sig { position: absolute; right: 6px; bottom: 6px; display: flex; align-items: flex-end; gap: 2px; padding: 3px 4px; border-radius: 6px; background: rgba(0, 0, 0, .5); }
.sig i { width: 4px; border-radius: 1px; background: rgba(255, 255, 255, .3); }
.sig i:nth-child(1) { height: 5px; } .sig i:nth-child(2) { height: 8px; } .sig i:nth-child(3) { height: 11px; }
.sig[data-q="good"] i { background: #5ee08a; }
.sig[data-q="ok"] i:nth-child(-n+2) { background: #f2c14e; }
.sig[data-q="weak"] i:nth-child(1) { background: #ff6b5e; }
.tile-badge { position: absolute; left: 6px; right: 34px; bottom: 6px; padding: 2px 6px; border-radius: 8px; background: rgba(0, 0, 0, .62); color: #fff; font-size: .72rem; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.hide-video .tile-badge, body.hide-video .sig { display: none; }
/* A face tapped big. */
.spotlight { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: rgba(10, 5, 0, .78); animation: tpIn2 .25s ease-out; }
.spot-box { display: grid; gap: .8rem; justify-items: center; }
.spot-box video { width: min(92vw, 106vh); max-height: 78vh; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; background: #000; box-shadow: 0 0 0 4px var(--gold), 0 20px 50px rgba(0, 0, 0, .6); }
.spot-box video.mirror { transform: scaleX(-1); }
.cam-ask .modal-actions { flex-wrap: wrap; justify-content: center; }
/* Camera & mic check (home page) */
.home-hello [data-camcheck] { margin-top: .4rem; }
.cc-mirror { position: relative; border-radius: 18px; overflow: hidden; background: #1e1008; aspect-ratio: 4 / 3; max-height: 46vh; margin: .4rem auto; display: grid; place-items: center; }
.cc-mirror video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cc-mirror .cc-status { position: absolute; inset: auto 1rem; color: #fff7e8; text-align: center; font-weight: 700; margin: 0; }
.cc-mirror.err { aspect-ratio: auto; padding: 1.4rem 0; }
.cc-mirror.err video { display: none; }
.cc-mirror.err .cc-status { position: static; }
.cc-meter { display: flex; align-items: center; gap: .6rem; margin: .6rem 0 .2rem; font-size: 1.4rem; }
.cc-bar { flex: 1; height: 16px; border-radius: 9px; background: rgba(0, 0, 0, .12); overflow: hidden; }
.cc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5ee08a, #2e7d4f); transition: width .08s; }
.cam-check .check { margin: .4rem 0; }
.cc-meter[hidden], .cam-check .check[hidden] { display: none; }
/* The lobby has setup panels to fit, so faces grow a bit less there. */
body.talk-mode[data-status="lobby"] .vid-slot { height: clamp(100px, 24vh, 280px); }
body.talk-mode[data-status="lobby"] .seats[data-count="4"] .vid-slot { height: clamp(80px, 19vh, 220px); }
body.talk-mode[data-phase="deal"] .vid-slot, body.talk-mode[data-phase="over"] .vid-slot { height: clamp(100px, 23vh, 270px); }
body.talk-mode[data-phase="deal"] .seats[data-count="4"] .vid-slot, body.talk-mode[data-phase="over"] .seats[data-count="4"] .vid-slot { height: clamp(80px, 18vh, 210px); }
body.talk-mode[data-phase="deal"] .tcenter { --cw: clamp(46px, 5.2vw, 70px); gap: .4rem; }
body.talk-mode[data-phase="deal"] .seats:not([data-count="4"]) .vid-slot { height: clamp(100px, 21vh, 250px); }
