/* Call Break: emerald felt table, crisp cards, gold and navy accents. Phone-first; card size comes from JS (--cw). */
:root {
  --felt: #12704c;
  --felt-deep: #0a3d2b;
  --felt-dark: #062419;
  --rail: #4a2c17;
  --gold: #e6bb5c;
  --gold-hi: #f6d991;
  --navy: #14223f;
  --navy-2: #1d2f55;
  --ink: #f4efe2;
  --muted: #b7cabd;
  --card: #fdfbf5;
  --black-suit: #161b26;
  --red-suit: #c51f30;
  --cw: 62px;            /* hand card width, set by app.js */
  --tcw: 56px;           /* table card width */
  --ch: calc(var(--cw) * 1.4);
  --tch: calc(var(--tcw) * 1.4);
  --display: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  /* shared game shell tokens */
  --gs-bg: var(--felt-deep); --gs-panel: var(--navy); --gs-text: var(--ink); --gs-muted: var(--muted);
  --gs-accent: var(--gold); --gs-accent-2: #c29235; --gs-accent-ink: #1d1406; --gs-display: var(--display); --gs-body: var(--body);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--felt-dark); color: var(--ink); font: 15px/1.4 var(--body); -webkit-text-size-adjust: 100%; }
button, select { font: inherit; }
svg { fill: currentColor; }
[hidden] { display: none !important; }

.app { display: flex; flex-direction: column; height: 100%; height: 100svh; height: var(--gs-vh, 100svh); }

/* ------------------------------------------------------------------ HUD */
.hud {
  flex: none; display: flex; align-items: center; gap: 8px; z-index: 5;
  padding: max(6px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 6px max(10px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(4, 18, 13, .9), rgba(4, 18, 13, .55));
}
.hud-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.hud-title h1 { margin: 0; font: 700 1.2rem var(--display); color: var(--gold-hi); letter-spacing: .02em; }
.hud-round { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-btns { display: flex; gap: 6px; flex: none; }
.icon-btn {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(230, 187, 92, .35); background: rgba(20, 34, 63, .6); color: var(--gold-hi);
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: scale(.94); }
.icon-btn:focus-visible, .btn:focus-visible, .card:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
#soundBtn .mute { display: none; }
#soundBtn[aria-pressed="false"] .wave { display: none; }
#soundBtn[aria-pressed="false"] .mute { display: inline; }
#soundBtn[aria-pressed="false"] { color: var(--muted); }

/* ------------------------------------------------------------------ table */
.play { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.table { position: relative; flex: 1; min-height: 0; }
.felt {
  position: absolute; inset: 4px max(6px, env(safe-area-inset-right, 0px)) 4px max(6px, env(safe-area-inset-left, 0px));
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 50%, var(--felt) 0%, var(--felt-deep) 78%);
  box-shadow: inset 0 0 0 7px var(--rail), inset 0 0 0 9px #6b4424, inset 0 0 0 10px rgba(230, 187, 92, .45), inset 0 0 60px rgba(0, 0, 0, .55), 0 10px 30px rgba(0, 0, 0, .5);
}

/* seats: computer opponents */
.seat { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; text-align: center; transition: opacity .3s; }
.seat-2 { top: 10px; left: 50%; transform: translateX(-50%); }
.seat-1 { left: max(8px, env(safe-area-inset-left, 0px)); top: 40%; transform: translateY(-50%); }
.seat-3 { right: max(8px, env(safe-area-inset-right, 0px)); top: 40%; transform: translateY(-50%); }
.avatar {
  position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font: 700 1.25rem var(--display); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  background: radial-gradient(circle at 35% 30%, var(--av-hi), var(--av) 70%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 3px var(--av-ring, var(--gold)), 0 6px 14px rgba(0, 0, 0, .45);
}
.avatar svg { width: 60%; height: 60%; fill: rgba(255, 255, 255, .92); }
.seat.turn .avatar, .me.turn .me-avatar { animation: turn 1.2s ease-in-out infinite; }
@keyframes turn { 0%, 100% { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 3px var(--gold-hi), 0 0 0 0 rgba(246, 217, 145, .6); } 50% { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 0 3px var(--gold-hi), 0 0 0 9px rgba(246, 217, 145, 0); } }
.dealer-chip {
  position: absolute; right: -6px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font: 800 11px var(--body); color: #1d1406;
  background: radial-gradient(circle at 35% 30%, #fff3cf, var(--gold) 70%); box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.seat-name { font-weight: 700; font-size: .86rem; line-height: 1.1; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.seat-style { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); opacity: .85; }
.seat-stat { min-width: 76px; padding: 2px 8px; border-radius: 999px; font-size: .76rem; font-variant-numeric: tabular-nums; background: rgba(6, 20, 14, .72); border: 1px solid rgba(230, 187, 92, .3); white-space: nowrap; }
.seat-stat b { color: var(--gold-hi); }
.seat-label { min-height: 1.2em; font-size: .74rem; color: var(--gold-hi); font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.seat-label.flash { animation: flash .35s ease both; }
@keyframes flash { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.me-flash { color: var(--gold-hi) !important; font-weight: 800; }
.mini-hand { position: relative; width: 56px; height: 22px; margin-top: 1px; }
.mini-hand i { position: absolute; top: 0; width: 15px; height: 21px; border-radius: 3px; background: linear-gradient(135deg, var(--navy-2), var(--navy)); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* center: trick area */
.trick { position: absolute; left: 50%; top: 44%; width: calc(var(--tcw) * 3.3); height: calc(var(--tch) * 2.15); transform: translate(-50%, -50%); z-index: 3; }
.slot { position: absolute; width: var(--tcw); height: var(--tch); }
.slot-0 { left: 50%; bottom: 0; transform: translateX(-50%); }
.slot-2 { left: 50%; top: 0; transform: translateX(-50%); }
.slot-1 { left: 0; top: 50%; transform: translateY(-50%); }
.slot-3 { right: 0; top: 50%; transform: translateY(-50%); }
.slot .card { position: absolute; inset: 0; width: 100%; height: 100%; --cw: var(--tcw); }
.slot .card.winner { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 22px rgba(246, 217, 145, .75), 0 8px 18px rgba(0, 0, 0, .5); }
/* trick progress lives in the HUD and each player's label; this stays as a screen-reader live region */
.trick-info { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#trickNo { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#trickAction { font-size: .8rem; font-weight: 700; color: var(--gold-hi); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); line-height: 1.2; }
.deck-pile { position: absolute; left: 50%; top: 44%; width: var(--tcw); height: var(--tch); transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.deck-pile .card { position: absolute; inset: 0; width: 100%; height: 100%; --cw: var(--tcw); }
.deck-pile.shuffling .card:nth-child(odd) { animation: riffle-l .55s ease-in-out 2; }
.deck-pile.shuffling .card:nth-child(even) { animation: riffle-r .55s ease-in-out 2; }
@keyframes riffle-l { 50% { transform: translateX(-60%) rotate(-8deg); } }
@keyframes riffle-r { 50% { transform: translateX(60%) rotate(8deg); } }

/* ------------------------------------------------------------------ my area */
.me { flex: none; position: relative; z-index: 4; padding: 0 max(8px, env(safe-area-inset-right, 0px)) calc(max(10px, env(safe-area-inset-bottom, 0px)) + var(--gs-bottom-gap, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.me-bar { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 auto 4px; max-width: 640px; }
.me-avatar { position: relative; width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fbe7b0, var(--gold) 70%); color: #1d1406; font: 800 .78rem var(--body); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
.me-avatar .dealer-chip { width: 16px; height: 16px; font-size: 9px; right: -6px; bottom: -5px; }
.chips { display: flex; gap: 6px; flex: none; }
.chip { padding: 3px 9px; border-radius: 999px; background: rgba(6, 20, 14, .75); border: 1px solid rgba(230, 187, 92, .3); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip b { color: var(--gold-hi); }
.hint { flex: 1; min-width: 0; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.hint b { color: var(--ink); }
.hint .suit-ic { width: 12px; height: 12px; vertical-align: -1px; }
.hand { position: relative; height: calc(var(--ch) + 34px); max-width: 980px; margin: 0 auto; touch-action: none; }

/* ------------------------------------------------------------------ playing cards */
.card {
  position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * 1.4);
  border-radius: calc(var(--cw) * .09); background: var(--card); color: var(--black-suit);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 0 0 1px rgba(0, 0, 0, .18), 0 4px 10px rgba(0, 0, 0, .35);
  user-select: none; -webkit-user-select: none; overflow: hidden; contain: layout paint;
}
.card.red { color: var(--red-suit); }
.card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .9; width: 22%; }
.card .corner.tl { left: 4%; top: 4%; }
.card .corner.br { right: 4%; bottom: 4%; transform: rotate(180deg); }
.card .rk { font: 700 calc(var(--cw) * .25) / 1 var(--display); letter-spacing: -.04em; }
.card .cs { width: calc(var(--cw) * .17); height: calc(var(--cw) * .17); margin-top: 1px; }
.card .pips { position: absolute; inset: 9% 20%; }
.card .pip { position: absolute; width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); transform: translate(-50%, -50%); }
.card .pip.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .pip svg { width: 100%; height: 100%; display: block; }
.card .ace { position: absolute; inset: 0; display: grid; place-items: center; }
.card .ace svg { width: 44%; height: 44%; }
.card .ace.ace-spade svg { width: 58%; height: 58%; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .15)); }
.card .court {
  position: absolute; inset: 15% 19%; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%;
  background: linear-gradient(160deg, #fff6dd, #f1dfb0); border: 1.5px solid currentColor; box-shadow: inset 0 0 0 2px #fff6dd, inset 0 0 0 3px rgba(198, 146, 53, .7);
}
.card .court .emb { width: 58%; height: auto; fill: #c99a3a; stroke: rgba(0, 0, 0, .25); stroke-width: 2; }
.card .court .emb-b { transform: rotate(180deg); }
.card .court-rk { font: 700 calc(var(--cw) * .36) / 1 var(--display); }
.card .court-suit { width: 30%; height: auto; }
.card.back { background: #fff; }
.card .back-art {
  position: absolute; inset: 5%; border-radius: calc(var(--cw) * .06);
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 0 9%, transparent 10%),
    repeating-linear-gradient(45deg, rgba(230, 187, 92, .55) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-45deg, rgba(230, 187, 92, .55) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  box-shadow: inset 0 0 0 2px rgba(230, 187, 92, .8);
}

/* cards in my hand */
.hand .card { cursor: pointer; transition: transform .26s cubic-bezier(.2, .8, .2, 1), filter .2s, box-shadow .2s; will-change: transform; }
.hand .card.disabled { filter: brightness(.55) saturate(.7); cursor: default; }
.hand .card.playable { box-shadow: 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px rgba(246, 217, 145, .55), 0 4px 10px rgba(0, 0, 0, .35); }
.hand .card.selected { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 18px rgba(246, 217, 145, .7), 0 10px 18px rgba(0, 0, 0, .45); z-index: 30 !important; }
.play-tip { position: absolute; z-index: 40; transform: translate(-50%, -100%); padding: 3px 9px; border-radius: 999px; background: var(--gold); color: #1d1406; font-size: .72rem; font-weight: 800; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }

/* flying cards */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.fx .card { position: fixed; }

/* ------------------------------------------------------------------ calling panel */
.bid-panel {
  position: absolute; z-index: 8; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: min(calc(100% - 16px), 440px); padding: 12px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(29, 47, 85, .97), rgba(20, 34, 63, .97)); border: 1px solid rgba(230, 187, 92, .5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55); display: flex; flex-direction: column; gap: 10px;
  animation: rise .28s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.bid-head { text-align: center; }
.bid-title { margin: 0; font: 700 1.05rem var(--display); color: var(--gold-hi); }
.bid-hint { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.bid-hint b { color: var(--ink); }
.bid-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; }
.bid-stepper .step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(230, 187, 92, .5); background: rgba(0, 0, 0, .25); color: var(--gold-hi); font-size: 1.4rem; cursor: pointer; }
.bid-stepper output { min-width: 2.5ch; text-align: center; font: 700 2rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.bid-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bid-grid button {
  min-height: 44px; border-radius: 10px; border: 1px solid rgba(230, 187, 92, .3); background: rgba(0, 0, 0, .25);
  color: var(--ink); font-weight: 700; font-size: 1rem; cursor: pointer; font-variant-numeric: tabular-nums; touch-action: manipulation;
}
.bid-grid button.suggest { border-style: dashed; border-color: var(--gold); }
.bid-grid button[aria-checked="true"] { background: var(--gold); color: #1d1406; border-color: var(--gold-hi); }
.btn {
  min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 1px solid rgba(230, 187, 92, .45);
  background: rgba(0, 0, 0, .25); color: var(--ink); font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.btn.primary { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1d1406; border-color: var(--gold-hi); box-shadow: 0 3px 0 #8f6722; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px) scale(.99); }
.bid-confirm { width: 100%; font-size: 1.05rem; }

/* ------------------------------------------------------------------ home (start card) */
.home { background: radial-gradient(120% 80% at 50% 0%, rgba(230, 187, 92, .18), transparent 60%), rgba(4, 22, 15, .9); z-index: 20; }
.home .gs-title { font-size: clamp(2rem, 9vmin, 3.2rem); color: var(--gold-hi); }
.home-logo { position: relative; width: 120px; height: 86px; }
.home-logo .lc { position: absolute; left: 38px; top: 4px; width: 46px; height: 64px; border-radius: 6px; background: var(--card); box-shadow: 0 6px 14px rgba(0, 0, 0, .5); transform-origin: 50% 110%; }
.home-logo .lc::after { content: ""; position: absolute; inset: 22% 22%; background: var(--black-suit); -webkit-mask: var(--spade) center / contain no-repeat; mask: var(--spade) center / contain no-repeat; }
.home-logo .lc-1 { transform: rotate(-18deg); }
.home-logo .lc-2 { transform: rotate(0deg); z-index: 1; }
.home-logo .lc-3 { transform: rotate(18deg); }
.home-logo .lc-1::after, .home-logo .lc-3::after { background: var(--red-suit); -webkit-mask-image: var(--heart); mask-image: var(--heart); }
.home-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.opt { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); text-align: left; }
.opt select, .row select { min-height: 42px; padding: 0 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); color: var(--ink); border: 1px solid rgba(230, 187, 92, .35); }
.home-links { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.rotate-hint { display: none; margin: 0; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--gold-hi); }
.rotate-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (orientation: portrait) and (max-width: 600px) { .rotate-hint { display: flex; } }
.link-btn { min-height: 40px; padding: 0 12px; border: 0; background: none; color: var(--gold-hi); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ------------------------------------------------------------------ summary modal */
.modal { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 12px; background: rgba(2, 12, 8, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(100%, 520px); max-height: 100%; overflow: auto; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, var(--navy-2), var(--navy)); border: 1px solid rgba(230, 187, 92, .5); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); text-align: center; }
.modal-kicker { margin: 0; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.modal-card h2 { margin: 2px 0 12px; font: 700 1.6rem var(--display); color: var(--gold-hi); }
.modal-note { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-actions .btn { flex: 1; }
.modal.win .modal-card { animation: pop .5s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes pop { from { transform: scale(.9); } to { transform: none; } }
.table-scroll { overflow-x: auto; }
table.scores { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .88rem; }
.scores th, .scores td { padding: 7px 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: right; white-space: nowrap; }
.scores th:first-child, .scores td:first-child { text-align: left; }
.scores th { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.scores tr.you td { color: var(--gold-hi); font-weight: 700; }
.scores tr.lead td:first-child::after { content: " ★"; color: var(--gold); }
.made { color: #8fe0a5; }
.missed { color: #ff8e85; }

/* ------------------------------------------------------------------ menu sheet */
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 45; width: min(100%, 560px); max-height: 85vh; max-height: 85dvh; overflow: auto; overscroll-behavior: contain;
  transform: translate(-50%, 105%); visibility: hidden; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--navy); border: 1px solid rgba(230, 187, 92, .45); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -24px 60px rgba(0, 0, 0, .6);
}
html.gs-sheet-open .sheet { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 16px 0 10px; background: var(--navy); }
.sheet-grip { position: absolute; left: 50%; top: 6px; width: 44px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .2); transform: translateX(-50%); }
.tabs { flex: 1; display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); }
.tabs button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy-2); color: var(--gold-hi); box-shadow: inset 0 0 0 1px rgba(230, 187, 92, .45); }
.tab-panel { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); }
.row input[type="range"] { width: 50%; accent-color: var(--gold); }
.note { margin: 0; color: var(--muted); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); text-align: center; }
.stat b { display: block; font: 700 1.3rem var(--display); color: var(--gold-hi); }
.stat span { font-size: .72rem; color: var(--muted); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; }
.about h2 { margin: 0 0 6px; font: 700 1.2rem var(--display); color: var(--gold-hi); }
.about p { margin: 0 0 8px; color: var(--muted); }
.tab-panel h3 { margin: 4px 0 0; font-size: 1rem; color: var(--gold-hi); }
.rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.rules b { color: var(--ink); }

.toast { position: absolute; z-index: 35; left: 50%; top: 56px; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: var(--navy-2); border: 1px solid var(--gold); color: var(--ink); font-weight: 700; font-size: .85rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); animation: fade .2s both; max-width: calc(100% - 32px); text-align: center; }

/* ------------------------------------------------------------------ responsive */
/* phones held upright: side seats higher, trick lower and larger, using the tall table */
@media (orientation: portrait) {
  .seat-1, .seat-3 { top: 33%; }
  .trick, .deck-pile { top: 55%; }
}
@media (max-width: 420px) {
  .seat { width: 78px; }
  .avatar { width: 42px; height: 42px; font-size: 1.1rem; }
  .seat-name { font-size: .8rem; }
  .seat-stat { min-width: 70px; font-size: .72rem; padding: 2px 6px; }
  .hud-title h1 { font-size: 1.08rem; }
  .icon-btn { width: 40px; height: 40px; }
  .hint { display: none; }
}
/* phones held sideways: short screens get compact seats and HUD */
@media (orientation: landscape) and (max-height: 520px) {
  .hud { padding-top: max(3px, env(safe-area-inset-top, 0px)); padding-bottom: 3px; }
  .icon-btn { width: 36px; height: 36px; }
  .hud-title { flex-direction: row; align-items: baseline; gap: 10px; }
  .seat { width: 84px; gap: 1px; }
  .seat-2 { top: 4px; flex-direction: row; width: auto; gap: 8px; }
  .seat-2 .seat-meta { text-align: left; }
  .seat-1, .seat-3 { top: 46%; }
  .avatar { width: 36px; height: 36px; font-size: 1rem; }
  .mini-hand { display: none; }
  .seat-style { display: none; }
  .trick, .deck-pile { top: calc(50% + 18px); }
  .trick { height: calc(var(--tch) * 2.05); }
  .seat-2 .avatar { width: 32px; height: 32px; font-size: .9rem; }
  .me-bar { height: 30px; margin-bottom: 2px; }
  .bid-panel { padding: 8px 10px; gap: 6px; bottom: 4px; width: min(calc(100% - 200px), 560px); }
  .bid-stepper { display: none; }
  .bid-grid { grid-template-columns: repeat(13, 1fr); gap: 4px; }
  .bid-grid button { min-height: 40px; }
  .bid-confirm { min-height: 40px; }
  .home { flex-direction: row; flex-wrap: wrap; align-content: center; column-gap: 24px; }
  .home-logo { display: none; }
}
@media (min-width: 900px) and (min-height: 620px) {
  .seat { width: 120px; }
  .avatar { width: 58px; height: 58px; font-size: 1.5rem; }
  .seat-1 { left: 5%; }
  .seat-3 { right: 5%; }
  .seat-2 { top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
