/* Salon de tarot: shared visual scale, readable controls and responsive table. */
:root {
  --ink: #183c32;
  --muted: #626f67;
  --cream: #f5f1e8;
  --gold: #ae8842;
  --line: #ded8c9;
  --felt: #174c40;
  --felt2: #103c33;
  --shadow: 0 12px 32px #173b3010;
}
html { height: auto; min-height: 100%; }
body { height: auto; min-height: 100dvh; overflow: auto; background: #f5f1e8; font-size: 14px; }
/* Keep wheel, touch and keyboard scrolling without a visible page scrollbar. */
html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; }
html:has(.welcome-screen:not([hidden])),
body:has(.welcome-screen:not([hidden])) { overflow: hidden; }
button, input, select { font-family: 'DM Sans', sans-serif; }
button { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid #ad8236; outline-offset: 3px;
}
button:not(:disabled) { transition: background .16s, border-color .16s, box-shadow .16s; }
button:disabled { cursor: not-allowed; }

/* A welcoming, scrollable home instead of a miniature dashboard. */
.welcome-screen {
  display: block; padding: 28px clamp(16px, 3vw, 48px); overflow: auto;
  background: radial-gradient(ellipse at 10% 0, #e9e2cc, transparent 50%), #f5f1e8;
  overscroll-behavior: contain;
}
.welcome-shell {
  width: min(1240px, 100%); max-height: none; margin: 0 auto; padding: 0;
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.welcome-brand { min-height: 60px; margin-bottom: 20px; font-size: 16px; letter-spacing: 2px; }
.welcome-brand small { display: block; font-size: 9px; color: #64756a; letter-spacing: 1.3px; }
.welcome-mark { width: 44px; height: 44px; background: #fffcf5; }
.welcome-audio-controls { gap: 8px; }
.welcome-audio-controls :is(.welcome-music-toggle,.welcome-audio-button) {
  width: auto; min-height: 42px; padding: 0 16px; font-size: 12px; background: #fffcf5; color: #365347;
}
.welcome-audio-controls button span { display: inline; }
.welcome-audio-controls button::before { content: none; }
.welcome-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; padding: 0; margin-bottom: 24px; align-items: stretch; }
.welcome-story {
  position: relative; width: auto; height: auto; overflow: hidden; clip: auto; white-space: normal;
  padding: 30px 36px 24px; border: 1px solid #285346; border-radius: 24px;
  background: radial-gradient(ellipse at 90% 85%, #34694d66, transparent 60%), #173e33;
  box-shadow: inset 0 0 0 7px #ffffff03;
}
.welcome-kicker { display: flex; color: #d6c08a; font-size: 10px; letter-spacing: 1.7px; }
.welcome-kicker span { background: #dfc487; box-shadow: 0 0 0 4px #dfc48714; }
.welcome-story h1 { margin: 18px 0 14px; color: #fff9e9; font-size: clamp(38px, 4vw, 58px); line-height: 1.07; letter-spacing: -1.8px; }
.welcome-story h1 em { color: #e4c886; }
.welcome-story > p { display: block; max-width: 420px; color: #cedbd1; font-size: 14px; line-height: 1.65; }
.welcome-art { display: block; height: 164px; max-width: none; margin: 16px 0 8px; overflow: visible; background: none; }
.welcome-art::before { inset: 16px 8%; border-color: #d6bd7830; }
.welcome-art::after { inset: 34px 15%; }
.welcome-art-ring { inset: 10px auto; left: 50%; width: 145px; }
.welcome-playing-card { width: 86px; height: 130px; border-radius: 8px; box-shadow: 0 14px 24px #071e1759; }
.welcome-card-back { left: calc(50% - 66px); transform: translate(-50%,-44%) rotate(-17deg); }
.welcome-card-face { left: 50%; transform: translate(-50%,-55%) rotate(2deg); }
.welcome-card-suit { left: calc(50% + 66px); transform: translate(-50%,-44%) rotate(17deg); }
.welcome-playing-card span { font-size: 38px; }
.welcome-playing-card small { font-size: 15px; }
.welcome-playing-card b { font-size: 8px; }
.welcome-card-back small { font-size: 7px; }
.welcome-promise { display: flex; color: #d7e1d5; font-size: 11px; line-height: 1.5; }
.welcome-start { display: flex; flex-direction: column; justify-content: center; padding: 32px; border: 1px solid #ddd6c6; border-radius: 24px; background: #fffcf6; box-shadow: var(--shadow); }
.welcome-start-heading > span { color: #8b6c32; font-size: 10px; letter-spacing: 1.8px; }
.welcome-start-heading h2 { margin: 12px 0 8px; font: 500 clamp(25px,2.5vw,33px)/1.2 'Playfair Display', Georgia, serif; color: #173e33; }
.welcome-start-heading small { display: block; font-size: 14px; color: #657167; line-height: 1.5; }
.welcome-options { display: grid; gap: 12px; margin: 24px 0 18px; }
.welcome-options label { font-size: 12px; color: #4c5c51; letter-spacing: 0; }
.welcome-options select { height: 48px; padding: 0 12px; margin-top: 8px; border-radius: 9px; border-color: #cfc8b7; font-size: 14px; background: #fff; }
.welcome-primary, .welcome-secondary { min-height: 54px; border-radius: 10px; padding: 14px 18px; font-size: 15px; }
.welcome-primary { background: #1c4c3d; border-color: #1c4c3d; }
.welcome-primary:hover { background: #123b2e; box-shadow: 0 6px 20px #163c3426; }
.welcome-primary small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: #d3e1d4; }
.welcome-secondary { margin-top: 10px; border-color: #d7d0bf; background: #fffdf8; color: #2e5141; }
.welcome-secondary:hover { border-color: #8a9e8b; background: #f2f4eb; }
.welcome-rules { display: block; min-height: 42px; margin-top: 10px; font-size: 13px; color: #6d5b34; }
.welcome-note { display: flex; margin-top: 16px; padding: 14px; background: #eef0e7; border-radius: 10px; }
.welcome-note p { font-size: 12px; line-height: 1.6; color: #526355; }
.welcome-note > span { font-size: 23px; color: #8e763f; }
.welcome-dashboard { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 18px; margin-bottom: 22px; }
.welcome-dashboard-card { padding: 22px; border-radius: 16px; background: #fffcf6; border: 1px solid #ded8ca; box-shadow: none; }
.welcome-dashboard-heading { min-height: 32px; color: #666b57; font-size: 11px; letter-spacing: 1.1px; }
.welcome-account-card h2 { display: block; margin: 14px 0 8px; font-size: 24px; line-height: 1.2; }
.welcome-account-card p, .welcome-dashboard-caption, .welcome-public-card .welcome-dashboard-caption,
.welcome-friends-card .welcome-dashboard-caption { display: block; min-height: 0; font-size: 12px; line-height: 1.6; color: #657164; }
.dashboard-account-link { min-height: 42px; padding: 8px 0; font-size: 12px; }
.welcome-token-summary { gap: 10px; margin-top: 10px; padding: 14px 12px; border-color: #d6c28f; background: #f6eedb; border-radius: 10px; }
.welcome-token-copy strong { color: #59451e; font-size: 15px; }
.welcome-token-copy small { margin-top: 5px; color: #74613e; font-size: 11px; line-height: 1.45; }
.welcome-token-mark, .welcome-token-arrow { font-size: 20px; }
.welcome-loyalty-summary { display: block; margin: 14px 0 0; padding: 12px; background: #f4f3e9; }
.welcome-loyalty-summary :is(p,small,button) { font-size: 11px; }
.dashboard-friend-help { display: block; margin-top: 10px; font-size: 11px; line-height: 1.5; color: #657164; }
.dashboard-friend-form { gap: 8px; margin: 12px 0; }
.dashboard-friend-form input, .dashboard-private-join input { height: 42px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.dashboard-friend-form button { min-width: 42px; min-height: 42px; font-size: 20px; }
.dashboard-private-join { gap: 8px; margin: 12px 0 10px; }
.dashboard-private-join button { min-height: 42px; padding: 0 12px; font-size: 12px; }
.friend-login-button { min-height: 42px; font-size: 12px; }
.dashboard-public-list { min-height: 46px; max-height: 170px; margin: 10px 0; }
.dashboard-public-list .public-room-card { padding: 12px; }
.dashboard-public-list .public-room-details strong { font-size: 13px; }
.dashboard-public-list .public-room-details span { font-size: 11px; }
.dashboard-public-list .room-join-button { min-height: 40px; font-size: 12px; }
.dashboard-create-actions { gap: 8px; }
.dashboard-create-actions button, .dashboard-create-actions .quick-match-action { min-height: 42px; padding: 9px; font-size: 11px; border-radius: 7px; }
.dashboard-create-actions .quick-match-action { font-size: 12px; }
.dashboard-entry-note, .dashboard-error, .dashboard-friend-status, .dashboard-public-refresh-status, .lobby-empty { font-size: 11px; line-height: 1.55; color: #647064; }
.dashboard-error, .online-error { color: #a13e2f; }
.welcome-footer { display: flex; padding: 18px 0; font-size: 10px; color: #7a7d6d; }

/* The table has room for readable cards; shorter screens can scroll. */
.app-shell { max-width: 1600px; height: auto; min-height: 100dvh; overflow: visible; padding: 0 clamp(16px,2.8vw,42px) 16px; }
body:has(.welcome-screen:not([hidden])) .app-shell { visibility: hidden; height: 0; min-height: 0; overflow: hidden; }
.topbar { position: relative; z-index: 7; flex: none; height: 76px; min-height: 76px; padding: 0; border-color: #d6cfbd; }
.brand { font-size: 19px; white-space: nowrap; }
.brand small { font-size: 9px; }
.top-actions { flex: 0 1 auto; gap: 10px; }
.topbar :is(.icon-button,.home-button,.new-game-button) { width: auto; min-width: 42px; height: 42px; min-height: 42px; flex: none; border-radius: 9px; font-size: 13px; }
.topbar .icon-button { width: 42px; font-size: 19px; }
.topbar .home-button { padding: 0 14px; }
.topbar .home-button b { display: inline; }
.topbar .new-game-button { padding: 0 16px; }
.table-tools { position: relative; }
.table-tools > summary { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 14px; border: 1px solid #d4cebd; border-radius: 9px; color: #46604f; background: #fffcf6; font-size: 13px; list-style: none; cursor: pointer; }
.table-tools > summary::-webkit-details-marker { display: none; }
.table-tools-panel { position: absolute; right: 0; top: calc(100% + 10px); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 320px; padding: 20px; border: 1px solid #d4cebd; border-radius: 14px; background: #fffcf6; box-shadow: 0 15px 50px #152f3533; }
.table-tools-panel .round-indicator { display: block; grid-column: 1 / -1; text-align: center; font-size: 11px; }
.table-tools-panel .player-mode { display: flex; flex-direction: column; align-items: stretch; font-size: 10px; }
.table-tools-panel .player-mode select { width: 100%; max-width: none; min-height: 40px; font-size: 13px; }
.table-tools-panel :is(button,.icon-button) { display: block; width: 100%; min-height: 42px; height: auto; font-size: 12px; padding: 10px; }
.table-tools-panel button::before { content: none; }
.table-tools-panel #training-button::after { content: ' Entraînement'; }
.table-tools-panel #stats-button::after { content: ' Statistiques'; }
.game-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); flex: 1; gap: 24px; padding-top: 20px; overflow: visible; min-height: 0; }
.sidebar { display: flex; min-height: 0; overflow: visible; gap: 0; }
.section-label { font-size: 10px; color: #697565; }
.score-card { padding: 20px; border-radius: 14px; background: #193f33; border-color: #335849; box-shadow: none; }
.score-heading, .score-live { font-size: 10px; letter-spacing: .7px; }
.contract-name { margin: 14px 0; font-size: 26px; line-height: 1.2; }
.score-row { padding: 9px 0; font-size: 12px; }
.score-row strong { font-size: 15px; }
.score-row strong small { font-size: 11px; }
.table-note { padding: 16px; border-radius: 10px; background: #fffaf0; }
.table-note p { font-size: 13px; line-height: 1.65; }
.legend-card { margin-top: 28px; }
.legend-title, .legend-caption, .sidebar-footer { font-size: 11px; line-height: 1.6; color: #697565; }
.bout-list { flex-wrap: wrap; font-size: 11px; gap: 6px; }
.table-area { display: flex; overflow: visible; min-height: 0; }
.table-shortcuts { display: none; }
.game-stages { display: flex; list-style: none; gap: 20px; margin: 0 0 12px; padding: 0; }
.game-stages li { display: flex; align-items: center; gap: 6px; color: #7c8174; font-size: 11px; }
.game-stages li > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e9e5d9; font-size: 9px; }
.game-stages li[aria-current='step'] { color: #1e513b; font-weight: 700; }
.game-stages li[aria-current='step'] > span { background: #1e513b; color: #fff; }
.game-stages li.is-complete > span { color: #315d43; background: #dae5d6; }
.table-topline { min-height: 52px; gap: 12px; margin-bottom: 12px; padding: 8px 12px; background: #fffcf5; border: 1px solid #ded8c9; border-radius: 10px; box-shadow: none; }
#table-message { flex: 1; font-size: 13px; font-weight: 600; white-space: normal; overflow: visible; }
.turn-pill { max-width: none; border: 0; background: #e8e8dd; color: #546653; box-shadow: none; padding: 8px 10px; font-size: 10px; }
.turn-pill.is-local-turn { background: #1c543d; color: #fff; }
.table-topline .turn-clock { flex: 0 0 200px; width: 200px; min-width: 0; max-width: 200px; padding: 6px 8px; box-shadow: none; }
.turn-clock-heading b { font-size: 16px; }
.turn-clock-heading small { font-size: 8px; }
#turn-clock-meta { display: none; }
.felt-table { flex: 1 0 300px; height: clamp(280px,34vh,420px); min-height: 280px; max-height: 480px; border-radius: 150px; background: radial-gradient(ellipse at 50% 35%,#245c49,#143e33 80%); box-shadow: inset 0 0 0 5px #a6894d, inset 0 0 0 7px #d9c695, inset 0 0 0 11px #102f28, 0 12px 20px #14292314; }
.felt-grain { inset: 15px; border-color: #e7ce8b29; }
.seat { gap: 9px; max-width: 190px; }
.seat .avatar, .player-bar .avatar { width: 38px; height: 38px; flex: 0 0 38px; font-size: 17px; }
.seat-meta strong { font-size: 13px; }
.seat-meta span { font-size: 10px; }
.seat-indicators .seat-role, .seat-contract { font-size: 9px; }
.seat-top { top: 22px; }
.seat-left { left: 5%; }
.seat-right { right: 5%; }
.seat.seat-left-low, .seat.seat-left-high { left: 6%; }
.seat.seat-right-low, .seat.seat-right-high { right: 6%; }
.player-bar { min-height: 48px; margin: 12px 0 8px; padding: 6px 12px; border-radius: 10px; box-shadow: none; }
.player-badge { font-size: 10px; letter-spacing: .5px; }
.dog-pile:not(.dog-revealed) { width: 130px; height: 70px; bottom: 22px; padding: 8px; border-radius: 8px; background: #0e3028; }
.dog-pile:not(.dog-revealed) .dog-pile-heading { display: block; text-align: center; }
.dog-pile:not(.dog-revealed) .dog-pile-heading b { font-size: 10px; }
.dog-pile:not(.dog-revealed) .dog-pile-heading small { display: block; margin-top: 5px; font-size: 9px; line-height: 1.3; }
.dog-pile.hidden { visibility: hidden; }
.dog-pile-mark { display: none; }
.dog-pile.dog-revealed { top: 50%; bottom: auto; transform: translate(-50%,-25%); max-width: calc(100% - 28px); }
.dog-revealed .dog-pile-heading b { font-size: 10px; }
.dog-revealed .dog-pile-heading small { font-size: 9px; }
.dog-reveal-cards { gap: 6px; }
.dog-reveal-cards .card { width: 48px; min-width: 48px; height: 72px; }
.dog-reveal-cards .card .card-corner { font-size: 9px; }
.played-card.is-winning .card { outline: 2px solid #e4c877; outline-offset: 2px; }
.hand-area { padding: 12px 14px 8px; border: 1px solid #d9d2c1; border-radius: 14px 14px 0 0; background: #fffaf0; }
.hand-heading { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 10px; font-size: 11px; color: #4b5b4d; }
.hand-heading b { font-size: 12px; }
.hand-controls { display: contents; }
.hint-button { grid-column: 2; grid-row: 1; min-height: 36px; font-size: 12px; padding: 6px 12px; color: #4a5d43; border: 1px solid #d8c391; border-radius: 7px; background: #faf1d9; }
.hand-heading > span:first-child { align-self: center; }
.hand-hint { grid-column: 1 / -1; grid-row: 2; display: block; max-width: none; padding: 0; border: 0; background: none; text-align: left; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: normal; overflow: visible; }
.legal-card-count { margin-left: 12px; padding: 4px 7px; border-radius: 5px; background: #e2ecdf; color: #245239; font-size: 10px; letter-spacing: 0; }
.legal-card-count[hidden] { display: none; }
.hand { height: 126px; min-height: 126px; padding: 8px 2px 10px; align-items: flex-start; overflow: visible; }
.hand > .card { width: var(--hand-card-width); height: 108px; flex-shrink: 0; }
.hand.hand-grid { height: auto; min-height: 0; grid-template-rows: repeat(var(--hand-rows),108px); row-gap: 10px; padding-bottom: 12px; }
.hand.hand-grid > .card, .hand.hand-grid > .card.suit-start:not(:first-child) { width: var(--hand-card-width); height: 108px; }
.hand.hand-scrollable { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.hand > .card:not(.back) { border-radius: 7px; box-shadow: 0 3px 7px #173b3026; }
.hand .card .card-corner { top: 4px; left: 5px; padding: 2px; font-size: 13px; border: 0; background: #fffdf3; box-shadow: none; }
.hand .card .card-bottom { bottom: 4px; right: 4px; padding: 2px; font-size: 10px; border: 0; box-shadow: none; }
.hand .card .card-center { font-size: 29px; }
.hand .card .card-caption { bottom: 10px; padding: 1px 3px; font-size: 6px; }
.hand > .card.playable { border: 2px solid #488365; box-shadow: 0 0 0 2px #b5d0b4,0 4px 8px #163d3026; }
.hand > .card.unplayable { opacity: .48; filter: saturate(.45); }
.hand > .card.selected { border-color: #916c25; outline: 3px solid #b78e42; transform: translateY(-6px); }
.hand > .card[role='button']:hover, .hand > .card[role='button']:focus-visible { z-index: 40; transform: translateY(-6px); outline: 2px solid #1d563d; }
.action-dock { margin-top: 0; min-height: 80px; padding: 14px; border-radius: 0 0 14px 14px; border-top: 0; background: #fffcf6; box-shadow: 0 8px 16px #173b3008; flex-wrap: wrap; }
.dock-copy { min-width: 0; flex: 1 1 100%; }
.dock-copy strong { font-size: 14px; }
.dock-copy small { font-size: 12px; color: #657163; }
.dock-icon { display: none; }
.bid-actions { flex: 1 1 100%; display: flex; gap: 8px; }
.bid-button { flex: 1; min-height: 58px; padding: 10px; font-size: 11px; letter-spacing: .3px; border-radius: 8px; color: #314e3d; border-color: #d5cebb; }
.bid-button small { display: inline; margin-left: 6px; font-size: 12px; color: #856122; }
.bid-button em { display: block; margin-top: 5px; font-style: normal; font-weight: 400; font-size: 10px; color: #6b7366; letter-spacing: 0; }
.bid-button:hover:not(:disabled) { border-color: #68856a; background: #edf3e7; }
.pass-button { min-height: 50px; padding: 8px 14px; border: 1px dashed #cec8b5; border-radius: 8px; font-size: 12px; }
.play-message { width: 100%; font-size: 14px; }
.play-message small { font-size: 12px; }
.play-message-copy small { max-width: none; font-size: 12px; }
.play-message-copy strong { font-size: 14px; }
.discard-actions { flex: 1; flex-wrap: wrap; width: 100%; font-size: 12px; gap: 10px; }
.discard-instruction { font-size: 12px; line-height: 1.5; }
.confirm-button { min-height: 42px; font-size: 13px; padding: 10px 16px; border-radius: 8px; }
.call-action-intro { font-size: 12px; line-height: 1.5; }
.table-footer { min-height: 30px; font-size: 10px; color: #6c7868; }
.toast { top: auto; bottom: 24px; left: 24px; right: auto; width: min(360px,calc(100vw - 48px)); transform: translateY(12px); font-size: 13px; text-align: left; }
.toast.show { transform: translateY(0); }
.modal-card { border-radius: 18px; padding: 32px; background: #fffcf6; }
.modal-card h2 { font-size: 30px; }
.modal-card > p, .modal-card label, .online-field { font-size: 13px; line-height: 1.6; }
.modal-close { width: 40px; height: 40px; }
.rule-grid b { font-size: 13px; }
.rule-grid span, .modal-targets, .settings-shortcuts { font-size: 12px; line-height: 1.6; }
.setting-volume { padding-block: 14px; font-size: 14px; }
.setting-volume input { min-height: 32px; }

@media (min-width: 1100px) and (min-height: 920px) {
  .app-shell { height: 100dvh; }
  .game-layout { min-height: 0; }
  .felt-table { flex: 1 1 300px; }
}
@media (max-width: 1100px) {
  .welcome-story { padding: 26px; }
  .welcome-start { padding: 26px; }
  .welcome-story h1 { font-size: 44px; }
  .welcome-dashboard { grid-template-columns: 1fr 1fr; }
  .welcome-public-card { grid-column: 1 / -1; }
  .game-layout { grid-template-columns: 185px minmax(0,1fr); gap: 16px; }
  .score-card { padding: 16px; }
  .bid-button { padding: 8px 5px; font-size: 10px; }
}
@media (max-width: 760px) {
  .welcome-screen { padding: 16px; }
  .welcome-brand { min-height: 44px; margin-bottom: 16px; font-size: 13px; gap: 8px; }
  .welcome-brand small { display: none; }
  .welcome-mark { width: 36px; height: 36px; }
  .welcome-audio-controls :is(.welcome-music-toggle,.welcome-audio-button) { min-width: 40px; min-height: 40px; width: 40px; padding: 0; }
  .welcome-audio-controls button span { display: none; }
  .welcome-audio-controls .welcome-music-toggle::before { content: '♫'; font-size: 19px; }
  .welcome-audio-controls .welcome-settings-open::before { content: '⚙'; font-size: 19px; }
  .welcome-layout { grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
  .welcome-story { padding: 26px; border-radius: 18px; }
  .welcome-story h1 { margin: 14px 0; font-size: clamp(37px,9vw,54px); }
  .welcome-story > p { font-size: 13px; }
  .welcome-art { display: none; }
  .welcome-story::after { content: '✦'; position: absolute; right: -12px; bottom: 6px; color: #e4c886; font-size: 140px; opacity: .06; pointer-events: none; }
  .welcome-playing-card { width: 70px; height: 108px; }
  .welcome-promise { display: flex; font-size: 10px; }
  .welcome-start { padding: 24px; border-radius: 18px; }
  .welcome-start-heading h2 { font-size: 27px; }
  .welcome-start-heading small { display: block; font-size: 13px; }
  .welcome-note { display: flex; }
  .welcome-rules { display: block; }
  .welcome-dashboard { grid-template-columns: 1fr; gap: 16px; }
  .welcome-public-card { grid-column: auto; }
  .welcome-dashboard-card { padding: 22px; }
  .welcome-footer { font-size: 9px; gap: 12px; }
  .welcome-footer span:last-child { max-width: 60%; text-align: right; }
  .app-shell { min-height: 100dvh; height: auto; padding: 0 12px 18px; }
  .topbar { min-height: 66px; height: 66px; gap: 8px; }
  .brand { font-size: 12px; gap: 6px; letter-spacing: 1px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand small { display: none; }
  .top-actions { gap: 5px; }
  .topbar :is(.icon-button,.home-button,.new-game-button) { display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; }
  .topbar .home-button b { display: none; }
  .topbar .new-game-button { font-size: 0; overflow: hidden; }
  .topbar .new-game-button span { margin: 0; font-size: 20px; }
  .topbar .new-game-button:not(:has(span))::before { content: '↻'; font-size: 20px; }
  .table-tools > summary { min-height: 40px; padding: 0 10px; gap: 6px; font-size: 12px; }
  .table-tools-panel { position: fixed; left: 12px; right: 12px; top: 66px; width: auto; }
  .table-tools-panel .icon-button { display: block; width: 100%; }
  .game-layout { display: flex; flex-direction: column; gap: 14px; padding-top: 12px; }
  .sidebar { display: block; order: 2; }
  .sidebar > .section-label, .sidebar .table-note, .sidebar .legend-card, .sidebar .sidebar-footer { display: none; }
  .score-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding: 14px 16px; margin: 0; }
  .score-heading { grid-column: 1; align-self: center; }
  .contract-name { grid-column: 2; grid-row: 1; margin: 0 0 6px; font-size: 20px; text-align: right; }
  .score-rule { display: none; }
  .score-row { padding: 5px 0; font-size: 11px; }
  .score-row strong { font-size: 13px; }
  .score-row strong small { font-size: 10px; }
  .table-area { flex: none; overflow: visible; order: 1; }
  .table-shortcuts { display: flex; position: sticky; top: 0; z-index: 6; gap: 6px; margin-bottom: 12px; padding: 8px 0; background: #f5f1e8; }
  .table-shortcuts button { flex: 1; min-height: 40px; border: 1px solid #d5cebb; border-radius: 7px; background: #fffcf5; color: #31533e; font-size: 11px; font-weight: 600; }
  .table-shortcuts #jump-hand { flex: 1.5; background: #1d4a38; color: #fff; border-color: #1d4a38; }
  .table-topline, .hand-area, .score-card { scroll-margin-top: 68px; }
  .game-stages { justify-content: space-between; gap: 4px; margin-bottom: 10px; }
  .game-stages li { font-size: 10px; gap: 4px; }
  .game-stages li > span { width: 20px; height: 20px; font-size: 8px; }
  .table-topline { flex-wrap: wrap; padding: 10px; gap: 8px; min-height: 50px; }
  #table-message { font-size: 12px; }
  .turn-pill { padding: 7px 8px; font-size: 9px; }
  .table-topline .turn-clock { flex-basis: 100%; width: 100%; max-width: none; }
  .turn-clock-heading { gap: 12px; }
  .turn-clock-heading small { max-width: none; font-size: 9px; }
  .felt-table { flex: 0 0 280px; height: 280px; min-height: 280px; border-radius: 70px; }
  .seat { gap: 5px; max-width: 105px; }
  .seat .avatar { width: 28px; height: 28px; flex-basis: 28px; font-size: 13px; }
  .seat-meta strong { font-size: 11px; }
  .seat-meta span { font-size: 9px; }
  .seat-left { left: 6%; top: 80%; }
  .seat-right { right: 6%; top: 80%; }
  .seat.seat-left-high, .seat.seat-left-low { left: 4%; }
  .seat.seat-right-high, .seat.seat-right-low { right: 4%; }
  .seat.seat-left-high, .seat.seat-right-high { top: 18%; }
  .seat.seat-left-low, .seat.seat-right-low { top: 78%; }
  .seat-indicators .seat-role { font-size: 8px; }
  .dog-reveal-cards { gap: 4px; }
  .dog-reveal-cards .card { width: 37px; min-width: 37px; height: 58px; }
  .player-bar { margin: 10px 0; padding: 8px; }
  .player-badge { max-width: 62%; font-size: 9px; line-height: 1.5; white-space: normal; text-align: right; }
  .hand-area { padding: 12px 8px 6px; }
  .hand-heading { margin-bottom: 8px; font-size: 10px; gap: 7px; }
  .hand-hint { font-size: 12px; }
  .legal-card-count { margin-left: 6px; font-size: 9px; padding: 3px 5px; }
  .hint-button { min-height: 36px; font-size: 11px; padding: 5px 8px; }
  .hand { height: 114px; min-height: 114px; }
  .hand > .card { height: 94px; }
  .hand.hand-grid { height: auto; min-height: 0; grid-template-rows: repeat(var(--hand-rows),94px); row-gap: 8px; }
  .hand.hand-grid > .card, .hand.hand-grid > .card.suit-start:not(:first-child) { height: 94px; }
  .hand .card .card-corner { font-size: 11px; }
  .hand .card .card-bottom { font-size: 9px; }
  .hand .card .card-center { font-size: 25px; }
  .action-dock { min-height: 70px; padding: 12px 8px; gap: 8px; }
  .bid-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; flex-wrap: wrap; }
  .bid-button { flex: 1 1 42%; min-height: 62px; font-size: 11px; padding: 10px; white-space: normal; }
  .bid-button em { font-size: 11px; }
  .pass-button { flex: 1 1 100%; grid-column: 1 / -1; min-height: 42px; font-size: 13px; }
  .discard-actions .confirm-button { margin-left: auto; font-size: 12px; }
  .call-actions .call-button { height: auto; min-height: 62px; font-size: 11px; }
  .table-footer { font-size: 9px; line-height: 1.4; gap: 10px; }
  .toast { top: auto; bottom: 16px; left: 16px; right: auto; width: calc(100vw - 32px); font-size: 12px; }
  .modal-card { padding: 26px 22px; }
  .rule-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-screen *, .app-shell * { scroll-behavior: auto; }
  .hand > .card, button { transition: none; }
}
@media (max-width: 420px) {
  .topbar .brand > span:last-child { display: none; }
  .topbar .brand-mark { flex-basis: 30px; }
}

/* Keep the landing page within the viewport and hide decorative scrollbars. */
.welcome-screen {
  overflow: hidden;
  scrollbar-width: none;
  overscroll-behavior: none;
}
.welcome-screen::-webkit-scrollbar,
.welcome-shell::-webkit-scrollbar,
.hand.hand-scrollable::-webkit-scrollbar { display: none; }
.welcome-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1.15fr) minmax(0, .85fr) auto;
  gap: clamp(6px, 1vh, 12px);
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}
.welcome-layout, .welcome-dashboard { height: 100%; min-height: 0; margin: 0; }
.welcome-story, .welcome-start, .welcome-dashboard-card { min-height: 0; }
.welcome-story { padding: clamp(14px, 2vh, 24px) clamp(18px, 2.6vw, 36px); }
.welcome-story h1 { margin: 10px 0 8px; font-size: clamp(34px, 3vw, 44px); }
.welcome-story > p { font-size: 12px; line-height: 1.45; }
.welcome-art { height: clamp(54px, 10vh, 90px); margin: 4px 0; }
.welcome-playing-card { width: 62px; height: 88px; }
.welcome-card-back { transform: translate(-50%, -50%) rotate(-17deg); }
.welcome-card-face { transform: translate(-50%, -50%) rotate(2deg); }
.welcome-card-suit { transform: translate(-50%, -50%) rotate(17deg); }
.welcome-playing-card span { font-size: 27px; }
.welcome-playing-card small { font-size: 11px; }
.welcome-start { padding: clamp(16px, 2vh, 28px); }
.welcome-dashboard-card { padding: clamp(9px, 1.3vh, 16px); }
.welcome-public-card { overflow: hidden; }
.welcome-options { gap: 8px; margin: 12px 0 10px; }
.welcome-options select { height: 40px; margin-top: 4px; }
.welcome-start-heading h2 { margin: 6px 0 4px; font-size: clamp(22px, 2vw, 28px); }
.welcome-start-heading small { font-size: 12px; }
.welcome-primary, .welcome-secondary { min-height: 46px; }
.welcome-secondary { margin-top: 6px; }
.welcome-rules { min-height: 28px; margin-top: 3px; }
.welcome-note { margin-top: 7px; padding: 8px; }
.welcome-note p { font-size: 8px; line-height: 1.35; }
.welcome-dashboard-heading { min-height: 21px; }
.welcome-account-card h2 { margin: 7px 0 4px; font-size: 19px; }
.welcome-account-card p, .welcome-dashboard-caption { font-size: 10px; line-height: 1.4; }
.dashboard-account-link { min-height: 30px; margin-top: 7px; padding-top: 6px; }
.welcome-token-summary { gap: 7px; margin-top: 6px; padding: 7px; }
.welcome-token-mark, .welcome-token-arrow { font-size: 15px; }
.welcome-token-copy strong { font-size: 11px; }
.welcome-token-copy small { font-size: 9px; line-height: 1.3; }
.welcome-loyalty-summary { margin-top: 7px; padding: 7px; }
.welcome-loyalty-summary .loyalty-progress-track { margin-top: 5px; }
.welcome-loyalty-summary > p { margin-top: 4px; font-size: 7px; }
.welcome-loyalty-link { margin-top: 4px; font-size: 7px; }
.welcome-public-card .welcome-dashboard-caption { display: none; }
.dashboard-public-list { max-height: 46px; margin: 5px 0; }
.dashboard-public-list .public-room-card { padding: 5px 7px; }
.dashboard-entry-note { font-size: 7px; line-height: 1.3; }
.dashboard-public-list,
.dashboard-friend-list { scrollbar-width: none; }
.hand.hand-scrollable { scrollbar-width: none; }

@media (max-width: 760px) {
  .welcome-screen { padding: 6px 10px; }
  .welcome-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 4px 0;
  }
  .welcome-brand { min-height: 34px; margin: 0; }
  .welcome-layout { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; }
  .welcome-story { flex: none; padding: 8px 12px; border-radius: 12px; }
  .welcome-kicker { font-size: 7px; letter-spacing: 1px; }
  .welcome-story h1 { margin: 3px 0; font-size: clamp(21px, 5.8vw, 28px); line-height: 1.04; letter-spacing: -.5px; }
  .welcome-story > p, .welcome-art { display: none; }
  .welcome-promise { display: flex; margin-top: 4px; font-size: 7px; }
  .welcome-story::after { display: none; }
  .welcome-start { display: flex; gap: 4px; padding: 8px 10px; border-radius: 12px; }
  .welcome-start-heading > span { font-size: 8px; }
  .welcome-start-heading h2 { margin: 3px 0; font-size: 19px; line-height: 1.1; }
  .welcome-start-heading small { display: block; font-size: 9px; line-height: 1.25; }
  .welcome-options { grid-template-columns: 1fr 1fr; gap: 7px; margin: 4px 0; }
  .welcome-options label { font-size: 8px; }
  .welcome-options select { height: 34px; margin-top: 3px; padding-inline: 7px; font-size: 10px; }
  .welcome-primary, .welcome-secondary { min-height: 39px; margin-top: 0; padding: 7px 10px; font-size: 10px; }
  .welcome-primary small { margin-top: 1px; font-size: 8px; }
  .welcome-rules { min-height: 24px; margin: 0; font-size: 9px; }
  .welcome-note { display: none; }
  .welcome-dashboard {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, auto) minmax(0, 1fr);
    gap: 5px;
    margin: 0;
    overflow: hidden;
  }
  .welcome-dashboard-card { min-height: 0; padding: 7px; overflow: hidden; border-radius: 10px; }
  .welcome-dashboard-heading { min-height: 18px; font-size: 7px; }
  .welcome-account-card h2 { margin: 4px 0 2px; font-size: 13px; }
  .welcome-account-card p, .welcome-dashboard-caption { min-height: 0; font-size: 7px; line-height: 1.3; }
  .dashboard-account-link { min-height: 26px; margin-top: 4px; padding-top: 4px; font-size: 7px; }
  .welcome-token-summary { gap: 4px; margin-top: 4px; padding: 5px; }
  .welcome-token-mark, .welcome-token-arrow { font-size: 12px; }
  .welcome-token-copy strong { font-size: 8px; }
  .welcome-token-copy small { margin-top: 2px; font-size: 7px; line-height: 1.25; }
  .welcome-loyalty-summary { display: none; }
  .welcome-friends-card .welcome-dashboard-caption,
  .welcome-public-card .welcome-dashboard-caption { display: none; }
  .dashboard-friend-help { display: none; }
  .dashboard-friend-form { gap: 4px; margin: 4px 0 2px; }
  .dashboard-friend-form input, .dashboard-private-join input { height: 30px; padding-inline: 6px; font-size: 8px; }
  .dashboard-friend-form button { min-width: 30px; min-height: 30px; }
  .dashboard-inbox, .dashboard-friend-list { max-height: 32px; overflow: auto; scrollbar-width: none; }
  .welcome-public-card { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 3px 8px; }
  .welcome-public-card .welcome-dashboard-heading,
  .welcome-public-card .dashboard-public-list,
  .welcome-public-card .dashboard-private-join,
  .welcome-public-card .dashboard-create-actions,
  .welcome-public-card .dashboard-public-refresh-status,
  .welcome-public-card .dashboard-entry-note,
  .welcome-public-card .dashboard-error { grid-column: 1 / -1; }
  .dashboard-public-list { max-height: 38px; margin: 0; gap: 2px; overflow: auto; scrollbar-width: none; }
  .dashboard-public-list .public-room-card { gap: 4px; padding: 3px 5px; }
  .dashboard-public-list .public-room-details strong { font-size: 8px; }
  .dashboard-public-list .public-room-details span { font-size: 6px; }
  .dashboard-public-list .lobby-empty { margin: 0; padding: 0; align-self: center; line-height: 1.2; }
  .dashboard-public-list .room-join-button { min-height: 23px; padding: 0 5px; font-size: 7px; }
  .dashboard-private-join { margin: 0; }
  .dashboard-private-join button { min-height: 30px; padding-inline: 7px; font-size: 8px; }
  .dashboard-create-actions { gap: 3px; }
  .dashboard-create-actions .quick-match-action { flex-basis: 100%; }
  .dashboard-create-actions button { min-height: 30px; padding: 4px; font-size: 7px; }
  .dashboard-create-actions .quick-match-action { min-height: 30px; }
  .dashboard-entry-note { margin: 0; font-size: 6px; line-height: 1.2; }
  .welcome-footer { display: none; }
}

@media (max-width: 560px) {
  .welcome-account-card > p { display: none; }
  .welcome-dashboard { grid-template-rows: minmax(0, auto) minmax(0, 1fr); }
  .welcome-public-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dashboard-public-list { max-height: 28px; }
  .welcome-public-card .dashboard-public-list { min-height: 20px; max-height: 24px; }
  .dashboard-entry-note { display: none; }
  .dashboard-create-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-create-actions .quick-match-action { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .welcome-account-card h2 { display: none; }
  .welcome-public-card .dashboard-public-list { min-height: 32px; max-height: 32px; }
}

@media (min-width: 761px) and (max-height: 850px) {
  .welcome-shell { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; }
  .welcome-story { padding-block: 10px; }
  .welcome-story h1 { margin: 5px 0; font-size: clamp(30px, 3vw, 40px); }
  .welcome-art { height: 52px; margin: 2px 0; }
  .welcome-promise { font-size: 9px; }
  .welcome-start { padding: 12px 18px; }
  .welcome-start-heading h2 { font-size: 23px; }
  .welcome-options { margin: 7px 0 6px; }
  .welcome-options select { height: 34px; }
  .welcome-primary, .welcome-secondary { min-height: 38px; }
  .welcome-secondary { margin-top: 4px; }
  .welcome-rules { min-height: 23px; margin-top: 1px; }
  .welcome-note { display: none; }
  .welcome-dashboard-card { padding: 7px; }
  .welcome-account-card h2 { margin: 4px 0 2px; font-size: 16px; }
  .welcome-account-card p, .welcome-dashboard-caption { font-size: 8px; }
  .dashboard-account-link { min-height: 24px; margin-top: 4px; padding-top: 4px; font-size: 8px; }
  .welcome-token-summary { margin-top: 4px; padding: 5px; }
  .welcome-loyalty-summary { display: none; }
  .welcome-public-card .welcome-dashboard-caption,
  .welcome-friends-card .welcome-dashboard-caption { display: none; }
  .dashboard-friend-help { margin-top: 4px; font-size: 8px; }
  .dashboard-public-list { max-height: 44px; margin: 4px 0; }
  .dashboard-private-join { margin: 4px 0; }
  .dashboard-create-actions .quick-match-action { min-height: 28px; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .welcome-screen { overflow-y: auto; scrollbar-width: none; }
  .welcome-shell { height: auto; min-height: 100%; overflow: visible; }
  .welcome-dashboard { grid-template-rows: auto auto; overflow: visible; }
}

/* Multiplayer comes first, followed by training; small screens can scroll. */
.welcome-screen.training-home { overflow-y: auto; scrollbar-width: none; }
.training-home .welcome-shell {
  height: auto;
  min-height: 100%;
  max-height: none;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 16px;
  overflow: visible;
}
.training-home .welcome-layout,
.training-home .welcome-dashboard { height: auto; overflow: visible; }
.training-home .welcome-story { padding: 24px 28px; }
.training-home .welcome-kicker { font-size: 10px; line-height: 1.5; }
.training-home .welcome-story h1 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.12; }
.training-home .welcome-story > p { font-size: 13px; line-height: 1.6; }
.training-home .welcome-art { height: 100px; margin: 12px 0; }
.training-home .welcome-promise { font-size: 11px; }
.training-home .welcome-start { padding: 22px 26px; }
.training-home .welcome-start-heading > span { font-size: 10px; }
.training-home .welcome-start-heading h2 { margin: 8px 0; font-size: 26px; }
.training-home .welcome-start-heading small { font-size: 12px; line-height: 1.5; }
.training-home .welcome-options { grid-template-columns: 1fr; margin: 14px 0; }
.training-home .welcome-options label,
.training-home .welcome-solo-options label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #4c5c51;
  font-size: 12px;
  font-weight: 600;
}
.training-home .welcome-options select,
.training-home .welcome-solo-options select {
  width: auto;
  min-width: 130px;
  height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #cfc8b7;
  border-radius: 8px;
  background: #fff;
  color: #344a3f;
  font-size: 13px;
}
.training-home .welcome-primary {
  min-height: 62px;
  padding: 12px 16px;
  font-size: 17px;
  text-align: left;
}
.training-home .welcome-primary small,
.training-home .welcome-secondary small { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; line-height: 1.45; }
.training-home .welcome-secondary { min-height: 48px; margin-top: 8px; padding: 10px 14px; font-size: 13px; }
.training-home .welcome-secondary small { color: #64715d; }
.training-home .welcome-private-action { justify-content: space-between; text-align: left; border-color: #b7c7af; background: #f3f6ec; }
.training-home .welcome-private-action b { font-size: 20px; font-weight: 400; }
.training-home .welcome-solo { margin-top: 12px; padding-top: 4px; border-top: 1px solid #e5dfd1; }
.training-home .welcome-solo summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 6px 0;
  color: #63715f;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}
.training-home .welcome-solo summary::-webkit-details-marker { display: none; }
.training-home .welcome-solo[open] summary > span { transform: rotate(180deg); }
.training-home .welcome-solo-options { margin: 8px 0; }
.training-home .welcome-rules { min-height: 30px; font-size: 12px; }
.training-home #welcome-online { margin-top: 16px; }
.training-home .welcome-training { margin-top: 24px; padding-top: 20px; border-top: 1px solid #ddd6c6; }
.training-home .welcome-training h3 { margin: 0 0 6px; color: #173e33; font: 500 21px/1.3 'Playfair Display', Georgia, serif; }
.training-home .welcome-training-caption { margin: 0; color: #657167; font-size: 12px; line-height: 1.5; }
.training-home #welcome-local { justify-content: space-between; text-align: left; }
.training-home .welcome-training-help { margin: 0 0 18px; color: #52634e; font-size: 13px; line-height: 1.6; }
.training-home .welcome-secondary-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.training-home .welcome-secondary-actions .welcome-rules { width: auto; margin: 0; min-height: 44px; }
.training-home .welcome-start [hidden] { display: none; }
.training-home .welcome-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: 14px; }
.training-home .welcome-dashboard-card { padding: 16px; overflow: visible; }
.training-home .welcome-dashboard-heading { min-height: 30px; font-size: 11px; }
.training-home .welcome-room-finder { margin-top: 12px; padding: 12px; border: 1px solid #dbe2d4; border-radius: 10px; background: #f7f8f2; }
.training-home .welcome-room-heading { display: flex; align-items: center; justify-content: space-between; min-height: 32px; color: #31543e; font-size: 10px; letter-spacing: 1px; }
.training-home .welcome-room-caption { margin: 4px 0; color: #657164; font-size: 11px; line-height: 1.5; }
.training-home .dashboard-refresh { min-width: 32px; min-height: 32px; font-size: 16px; }
.training-home .welcome-room-finder .dashboard-public-list { min-height: 42px; max-height: 166px; margin: 8px 0; overflow-y: auto; }
.training-home .dashboard-public-list { min-height: 48px; max-height: 178px; margin: 8px 0; gap: 6px; overflow-y: auto; }
.training-home .dashboard-public-list .public-room-card { padding: 10px; gap: 8px; }
.training-home .dashboard-public-list .public-room-details strong { font-size: 12px; }
.training-home .dashboard-public-list .public-room-details span { font-size: 10px; line-height: 1.5; }
.training-home .dashboard-public-list .room-join-button { min-height: 40px; padding: 0 10px; font-size: 11px; }
.training-home .dashboard-public-list .lobby-empty { padding: 8px 0; font-size: 12px; line-height: 1.5; }
.training-home .dashboard-create-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.training-home .dashboard-create-actions button { min-height: 40px; padding: 9px; font-size: 12px; }
.training-home .dashboard-create-actions .quick-match-action { min-height: 44px; background: #1c4c3d; border-color: #1c4c3d; color: #fff; font-size: 13px; }
.training-home .dashboard-private-label { display: block; margin-top: 14px; color: #52634e; font-size: 12px; font-weight: 600; }
.training-home .dashboard-private-join { margin: 6px 0; gap: 6px; }
.training-home .dashboard-private-join input { min-width: 0; height: 40px; padding: 0 9px; font-size: 12px; }
.training-home .dashboard-private-join button { min-height: 40px; padding: 0 12px; font-size: 12px; }
.training-home .dashboard-entry-note { display: block; margin: 6px 0 0; font-size: 10px; line-height: 1.5; }
.training-home .dashboard-error,
.training-home .dashboard-public-refresh-status { font-size: 12px; line-height: 1.5; }
.training-home .welcome-room-finder .dashboard-private-label { margin-top: 10px; }
.training-home .welcome-account-card h2 { font-size: 20px; }
.training-home .welcome-account-card > p { font-size: 12px; line-height: 1.5; }
.training-home .dashboard-account-link { min-height: 40px; font-size: 12px; }
.training-home .friend-login-button { min-height: 40px; font-size: 12px; }

@media (max-width: 760px) {
  .training-home .welcome-shell { gap: 10px; }
  .training-home .welcome-layout { gap: 10px; }
  .training-home .welcome-story { padding: 14px 16px; }
  .training-home .welcome-kicker { font-size: 9px; letter-spacing: .8px; }
  .training-home .welcome-story h1 { margin: 6px 0; font-size: 28px; }
  .training-home .welcome-art { display: none; }
  .training-home .welcome-promise { margin-top: 6px; font-size: 10px; }
  .training-home .welcome-start { padding: 16px; gap: 0; }
  .training-home .welcome-start-heading h2 { font-size: 23px; }
  .training-home .welcome-primary { min-height: 58px; font-size: 16px; }
  .training-home .welcome-dashboard { gap: 10px; }
  .training-home .welcome-dashboard-card { padding: 14px; }
  .training-home .welcome-room-finder { padding: 10px; }
}

@media (max-width: 480px) {
  .training-home .welcome-dashboard { grid-template-columns: minmax(0, 1fr); }
}

/* Persistent contract information beside the table, including on small screens. */
.contract-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 4px 0 10px; padding: 10px 14px; border: 1px solid #c9a84e; border-radius: 12px; background: #fff7df; color: #293d30; flex-shrink: 0; }
.contract-summary.has-call { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.contract-summary[hidden], .contract-summary [hidden] { display: none; }
.contract-summary-player, .contract-summary-call { display: flex; align-items: center; gap: 10px; min-width: 0; }
.contract-summary-call { padding-left: 14px; border-left: 1px solid #dfcf9c; }
.contract-summary-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.contract-summary-label { color: #6f561d; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.contract-summary-copy strong { font-size: 17px; line-height: 1.25; }
.contract-summary-copy small { font-size: 11px; line-height: 1.4; color: #526148; }
.declarer-marker { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: #e6c568; color: #493711; font-size: 23px; }
.called-card-marker { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 48px; padding: 3px; border: 1px solid #c5b989; border-radius: 5px; background: #fffdf7; color: #24362b; line-height: 1; }
.called-card-marker b { font-size: 13px; }
.called-card-marker > span { font-size: 25px; }
.called-card-marker.is-red { color: #b32633; }
.seat.team-declarer { outline: 2px solid #e6c568; outline-offset: 5px; border-radius: 8px; background: #153d32; }
.seat.team-declarer .seat-meta strong { color: #fff0b8; }
.seat-indicators .seat-role.declarer-role, .seat-indicators .seat-role.solo-role { padding: 5px 8px; background: #f6d780; color: #30280f; border-color: #fff1b5; font-size: 11px; font-weight: 800; }
.player-bar.team-declarer { border: 2px solid #c9a84e; background: #fff3cc; }
@media (max-width: 600px) {
  .contract-summary { gap: 8px; padding: 8px 10px; }
  .contract-summary-player, .contract-summary-call { gap: 7px; }
  .contract-summary-call { padding-left: 8px; }
  .contract-summary-copy strong { font-size: 14px; }
  .contract-summary-label { font-size: 9px; letter-spacing: .6px; }
  .contract-summary-copy small { font-size: 10px; }
  .declarer-marker { flex-basis: 24px; width: 24px; height: 24px; font-size: 16px; }
  .called-card-marker { flex-basis: 28px; width: 28px; height: 42px; }
  .called-card-marker > span { font-size: 21px; }
  .seat-indicators .seat-role.declarer-role, .seat-indicators .seat-role.solo-role { padding: 4px 6px; font-size: 10px; }
}
