:root {
  --forest: #153b35;
  --forest-2: #205149;
  --paper: #f7f3e9;
  --paper-2: #eee7d8;
  --ink: #172522;
  --muted: #67736e;
  --gold: #d2a648;
  --red: #ad403f;
  --line: rgba(23, 37, 34, .14);
  --shadow: 0 20px 55px rgba(12, 40, 34, .16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { touch-action: manipulation; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 80% 0%, #fff 0, var(--paper) 48%, #e8e0cf 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
#discard-selected:not(:disabled) {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important; }
.landing { min-height: 100dvh; display: grid; align-content: safe center; gap: 24px; padding: max(30px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom)); max-width: 540px; margin: auto; }
.hero { text-align: center; }
.eyebrow { color: var(--forest-2); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; margin: 0 0 7px; }
h1 { margin: 0; color: var(--forest); font-family: Georgia, serif; font-size: clamp(3rem, 16vw, 5rem); font-weight: 500; letter-spacing: -.06em; line-height: .95; }
h1 span, .card-back span { color: var(--gold); font-style: italic; }
.lede { color: var(--muted); font-size: 1.05rem; line-height: 1.5; max-width: 380px; margin: 18px auto 0; }
.join-card, .saved-games, .seat-link-import, .panel { background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: var(--shadow); padding: 22px; backdrop-filter: blur(14px); }
label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 750; }
input, select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); padding: 10px 13px; font-size: 1rem; }
input:focus, select:focus, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(210,166,72,.35); outline-offset: 2px; }
button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: white; color: var(--forest); font-weight: 800; padding: 10px 16px; }
.primary { background: var(--forest); color: white; border-color: var(--forest); }
.secondary { background: #e8efe9; color: var(--forest); border-color: #cad9ce; }
.ghost { background: transparent; border-color: rgba(255,255,255,.3); color: white; }
.ghost-dark { background: transparent; border-color: var(--line); color: var(--muted); }
.small { min-height: 34px; padding: 5px 10px; font-size: .76rem; }
.join-card > .primary { width: 100%; margin-top: 12px; }
.turnstile-check { min-height: 22px; margin-top: 12px; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.turnstile-check p { margin: 0; }
.turnstile-check.ready { min-height: 0; }
.turnstile-check.ready p { color: #477455; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
#room-code { text-transform: uppercase; letter-spacing: .15em; font-weight: 800; }
.or { display: flex; align-items: center; gap: 10px; color: #89938f; font-size: .72rem; margin: 18px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.saved-games-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.saved-games-heading h2 { font-size: 1.65rem; }
.saved-games > p { margin: 8px 0 16px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.saved-game-list { display: grid; gap: 9px; }
.saved-game { display: grid; gap: 5px; width: 100%; min-width: 0; min-height: 70px; padding: 12px 13px; text-align: left; background: #fffdfa; border-color: var(--line); }
.saved-game:hover { border-color: #a9bcae; background: #f3f7f3; }
.saved-game-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.saved-game-topline > strong { color: var(--forest); letter-spacing: .08em; }
.saved-game-status { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.saved-game-status.turn { padding: 4px 8px; color: #3f351a; background: #f2d984; border-radius: 999px; }
.saved-game-status.expiry { padding: 4px 8px; color: #fff; background: #8a3f35; border-radius: 999px; }
.saved-game small { overflow: hidden; max-width: 100%; color: var(--muted); font-size: .72rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.seat-link-import h2 { font-size: 1.55rem; }
.seat-link-import > p:not(.eyebrow) { margin: 8px 0 16px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.seat-link-form { display: grid; gap: 10px; }
.seat-link-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.install-help { width: min(calc(100% - 32px), 430px); padding: 0; color: var(--ink); background: var(--paper); border: 1px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 24px 70px rgba(12,40,34,.32); }
.install-help::backdrop { background: rgba(12, 28, 24, .56); backdrop-filter: blur(3px); }
.install-help form { padding: 24px; }
.install-help h2 { font-size: 1.75rem; }
.install-help form > p:not(.eyebrow) { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.install-help ol { display: grid; gap: 9px; margin: 18px 0; padding-left: 24px; color: var(--ink); font-size: .86rem; line-height: 1.45; }
.install-help .install-privacy { padding: 10px 12px; color: #6b5a31; background: #fbf5e4; border-left: 3px solid var(--gold); border-radius: 6px; }
.install-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.install-actions button { width: 100%; margin-top: 4px; }
.prototype-note { margin: 0 auto; max-width: 380px; text-align: center; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.prototype-note a, .table-guide a { color: var(--forest-2); font-weight: 800; text-underline-offset: 2px; }
.game { min-height: 100dvh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.game-expiry-warning { display: grid; gap: 2px; width: min(calc(100% - 28px), 720px); margin: 14px auto 0; padding: 11px 14px; color: #4a291f; background: #fae9df; border: 1px solid #d9a68f; border-radius: 12px; }
.game-expiry-warning strong { font-size: .84rem; }
.game-expiry-warning span { font-size: .74rem; line-height: 1.4; }
.game-header { position: sticky; z-index: 20; top: 0; min-height: 72px; background: rgba(21,59,53,.96); color: white; display: flex; justify-content: space-between; align-items: center; padding: max(10px, env(safe-area-inset-top)) 16px 10px; box-shadow: 0 7px 24px rgba(12,40,34,.18); }
.game-header .eyebrow { color: #b9d2ca; margin: 0; font-size: .58rem; }
.game-header-room { display: grid; gap: 1px; min-width: 0; }
.game-header-status { display: flex; align-items: center; gap: 8px; }
.room-code { min-height: auto; padding: 0; border: 0; border-radius: 0; background: none; color: white; letter-spacing: .16em; font-size: 1.15rem; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-right button { white-space: nowrap; }
.game-header .small { min-height: 44px; }
.connection { max-width: 100px; overflow: hidden; color: #c8d8d2; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.game-options { position: relative; border: 0; background: transparent; }
.game-options > summary { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 5px 10px; color: white; border: 1px solid rgba(255,255,255,.3); border-radius: 12px; list-style: none; }
.game-options > summary::-webkit-details-marker { display: none; }
.game-options-menu { position: absolute; top: calc(100% + 8px); right: 0; display: grid; gap: 7px; width: 190px; padding: 9px; background: var(--paper); border: 1px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: var(--shadow); }
.game-options-menu button { width: 100%; min-height: 44px; color: var(--forest); background: white; border-color: var(--line); }
.interface-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 5px 8px; color: white; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.3); border-radius: 999px; font-size: .7rem; }
.interface-toggle-label { font-weight: 850; }
.interface-toggle-track { position: relative; flex: 0 0 auto; width: 27px; height: 16px; background: rgba(255,255,255,.24); border: 1px solid rgba(255,255,255,.4); border-radius: 999px; transition: background-color .16s ease, border-color .16s ease; }
.interface-toggle-track span { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .16s ease; }
.interface-toggle[aria-checked="true"] { background: rgba(210,166,72,.18); border-color: rgba(242,213,126,.75); }
.interface-toggle[aria-checked="true"] .interface-toggle-track { background: var(--gold); border-color: #f0d27d; }
.interface-toggle[aria-checked="true"] .interface-toggle-track span { transform: translateX(11px); }
.game > .panel { margin: 22px auto; width: min(calc(100% - 28px), 720px); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading.compact { align-items: center; margin-bottom: 12px; }
.hand-heading-copy { min-width: 0; }
.opening-progress { display: grid; grid-template-columns: auto auto; grid-template-areas: "label points" "detail detail"; justify-content: start; gap: 1px 7px; width: max-content; max-width: 100%; margin: 5px 0 2px; padding: 5px 7px; color: var(--forest); background: #edf3ef; border: 1px solid #cad9ce; border-radius: 8px; font-variant-numeric: tabular-nums; }
.opening-progress-label { grid-area: label; align-self: center; color: var(--muted); font-size: .62rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.opening-progress strong { grid-area: points; font-size: .72rem; line-height: 1.2; }
.opening-progress small { grid-area: detail; color: var(--muted); font-size: .62rem; line-height: 1.2; }
.opening-progress.ready { background: #fbf5e4; border-color: #d9be71; }
.opening-progress.ready small { color: #6b5a31; font-weight: 800; }
.opening-progress.projected { border-style: dashed; }
h2 { font-family: Georgia, serif; color: var(--forest); font-size: 1.75rem; font-weight: 500; margin: 0; }
.hand-draw-replay { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0; color: inherit; background: transparent; border: 0; border-radius: 0; box-shadow: none; font: inherit; text-align: inherit; }
.hand-draw-replay[aria-disabled="true"] { cursor: default; }
.hand-draw-replay[aria-disabled="false"] { cursor: pointer; }
.hand-draw-replay:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.pill { display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 5px 10px; background: var(--paper-2); color: var(--forest); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.room-invite { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin: -2px 0 18px; padding: 14px; border-radius: 15px; background: #edf3ef; border: 1px solid #cad9ce; }
.room-invite strong { display: block; color: var(--forest); }
.room-invite p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
#invite-room-code { color: var(--forest); font-weight: 850; letter-spacing: .08em; }
.room-invite-actions { display: flex; gap: 8px; }
.room-invite-actions button { min-width: 112px; }
.player-list { display: grid; gap: 8px; margin-bottom: 22px; }
.computer-seats { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: -12px 0 18px; }
.computer-seat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.computer-seats button { min-height: 44px; }
.player-row { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: 12px; background: #f4f1e9; }
.player-name { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ca77c; }
.status-dot.offline { background: #b6b5af; }
.rules-form { display: grid; gap: 14px; }
.rule-warning { border-left: 3px solid var(--gold); background: #fbf5e4; padding: 10px 12px; color: #6b5a31; font-size: .76rem; line-height: 1.4; }
.team-assignments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.58); }
.team-assignments > p { grid-column: 1 / -1; }
.table-guide { border-radius: 12px; padding: 13px 14px; background: #edf3ef; color: var(--forest); font-size: .78rem; line-height: 1.5; }
.table-guide > strong { display: block; margin-bottom: 3px; }
.table-guide p { margin: 0 0 6px; color: var(--muted); }
details { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.6); }
summary { cursor: pointer; padding: 14px; color: var(--forest); font-weight: 800; }
.rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 2px 14px 14px; }
.rule-grid .wide { grid-column: 1 / -1; }
.wide-button { width: 100%; margin-top: 16px; }
.centered { text-align: center; }
.muted { color: var(--muted); font-size: .76rem; margin: 4px 0 0; }
.table { max-width: 920px; margin: auto; padding: 12px 14px 0; }
.tabletop-surface { display: contents; }
.score-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.score-chip { flex: 0 0 auto; width: fit-content; min-width: 238px; max-width: min(320px, calc(100vw - 44px)); padding: 9px 12px; border-radius: 12px; color: white; background: var(--forest-2); }
.score-chip:first-child:nth-last-child(2),
.score-chip:first-child:nth-last-child(2) ~ .score-chip { flex: 1 1 0; width: auto; min-width: 0; }
.score-chip-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.score-chip-name { overflow: hidden; font-size: .72rem; font-weight: 800; opacity: .78; text-overflow: ellipsis; white-space: nowrap; }
.score-chip-value { flex: 0 0 auto; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.score-chip-books { display: block; white-space: nowrap; }
.score-chip-books { margin-top: 4px; overflow: hidden; font-size: .7rem; font-weight: 800; text-overflow: ellipsis; }
.score-chip-status { display: flex; flex-wrap: wrap; gap: 2px 6px; max-width: 100%; margin-top: 2px; font-size: .66rem; opacity: .82; }
.score-chip-status > span { white-space: nowrap; }
.score-chip-member { min-width: 0; max-width: 100%; overflow-wrap: anywhere; white-space: normal !important; }
.score-chip-status > span + span::before { content: "·"; margin-right: 6px; }
.turn-banner { background: #ead69f; color: #4f421f; border-radius: 14px; text-align: center; padding: 11px; font-weight: 850; margin-bottom: 10px; }
.turn-banner.mine { background: var(--forest); color: white; }
.turn-banner-copy { min-width: 0; flex: 1 1 auto; }
.turn-banner-chip-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.turn-banner-chip-copy.hidden { display: none; }
.classic-turn-player-chip { display: inline-flex; align-items: center; gap: 2px; overflow: hidden; padding-left: 12px; color: #fff; background: var(--forest); border-radius: 999px; }
.turn-nudge-slot { display: inline-flex; flex: 0 0 auto; }
.turn-nudge-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}
.turn-nudge-button:hover { background: rgba(255,255,255,.18); }
.turn-nudge-button:disabled { cursor: wait; opacity: .72; }
.turn-nudge-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.turn-nudge-pulse circle { fill: currentColor; stroke: none; }
.turn-flag, .meld-visual { display: none; }
.piles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 4px auto 24px; max-width: 440px; }
.pile { min-height: 170px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: rgba(255,255,255,.6); }
.pile strong { font-size: .8rem; }
.pile small { color: var(--muted); }
.card-back, .playing-card { width: 76px; height: 104px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.card-back { background: repeating-linear-gradient(45deg,#153b35,#153b35 7px,#1b4941 7px,#1b4941 14px); border: 5px double #d6b661; color: white; font-family: Georgia,serif; font-size: 1.2rem; box-shadow: 0 5px 12px rgba(0,0,0,.18); }
.playing-card { position: relative; overflow: hidden; background: #fffdfa; color: #151a18; border: 1px solid #d5d1c9; box-shadow: 0 4px 10px rgba(30,40,36,.16); font-family: Georgia,serif; font-size: 1.7rem; font-weight: 700; }
.playing-card.red { color: var(--red); }
.playing-card.wild { background: linear-gradient(135deg,#fff 0,#efe7ff 100%); font-size: 1.05rem; }
.playing-card.joker { color: #634892; }
.playing-card .corner { position: absolute; top: 5px; left: 7px; display: grid; justify-items: center; font-size: .74rem; line-height: .9; }
.playing-card .card-center { display: inline-grid; place-items: center; max-width: calc(100% - 8px); line-height: 1; }
.playing-card .joker-mark { gap: .08em; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.playing-card .joker-star { font-family: Georgia, serif; font-size: 1em; line-height: .72; }
.playing-card .joker-word { max-width: 100%; overflow: hidden; font-size: .6em; font-weight: 900; letter-spacing: .04em; line-height: 1; white-space: nowrap; }
.meld-area, .hand-area { background: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; padding: 15px; margin-bottom: 14px; }
.team-melds + .team-melds { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.team-melds h3 { margin: 0 0 10px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.meld-row { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; }
.meld { flex: 0 0 auto; min-width: 112px; max-width: 160px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: center; }
.meld.red-three-tile { color: #7a3029; background: #fff4f2; border-color: rgba(180, 74, 62, .48); }
.meld.red-three-tile strong, .meld.red-three-tile .meld-kind { color: #8d352d; }
.meld.meld-changed, .card-button.card-changed { animation: card-change-ring 1400ms ease-out 1 both; }
.card-button.card-changed .playing-card { animation: card-change-face-glow 1400ms ease-out 1 both; }
@keyframes card-change-ring {
  0%, 22% { box-shadow: 0 0 0 4px rgba(217, 174, 69, .96), 0 0 17px 7px rgba(217, 174, 69, .42); }
  68% { box-shadow: 0 0 0 3px rgba(255, 228, 154, .78), 0 0 10px 4px rgba(217, 174, 69, .28); }
  100% { box-shadow: 0 0 0 0 rgba(255, 228, 154, 0), 0 0 0 0 rgba(217, 174, 69, 0); }
}
@keyframes card-change-face-glow {
  0%, 22% { filter: drop-shadow(0 0 7px rgba(217, 174, 69, .95)); }
  68% { filter: drop-shadow(0 0 4px rgba(217, 174, 69, .6)); }
  100% { filter: none; }
}
.meld-copy { display: block; }
.meld strong { display: block; font-family: Georgia,serif; color: var(--forest); font-size: 1.25rem; }
.meld small { display: block; color: var(--muted); line-height: 1.3; }
.meld-kind, .meld-count, .meld-wild-count { display: block; }
.meld-compact-kind, .meld-compact-count { display: none; }
.meld-kind { font-weight: 800; }
.meld-wild-count { color: #73591c; font-weight: 800; }
.meld.complete { border-color: #8ba991; background: #eef5ef; }
.meld-add { width: 100%; min-height: 34px; margin-top: 8px; padding: 5px 8px; border-color: #cad9ce; background: #e8efe9; font-size: .7rem; }
.hand-area { padding-bottom: 82px; }
.hand-scroll-frame { position: relative; min-width: 0; }
.hand-scroll-frame .hand { box-sizing: border-box; width: 100%; }
.hand { display: flex; gap: 0; overflow-x: auto; padding: 12px 5px 20px; min-height: 130px; scroll-snap-type: x proximity; }
.hand .card-button { flex: 0 0 54px; width: 70px; min-height: 110px; border: 0; padding: 0; background: transparent; scroll-snap-align: start; }
.hand.idle { opacity: .62; }
.hand .card-button:disabled { opacity: 1; }
.hand .card-button:last-child { flex-basis: 72px; }
.hand .playing-card { transition: transform .15s ease, box-shadow .15s ease; }
.hand .card-button.selected .playing-card { transform: translateY(-12px); box-shadow: 0 9px 0 var(--gold), 0 15px 20px rgba(30,40,36,.22); }
html[data-ui="tabletop"][data-phase="playing"] .hand-scroll-frame { grid-area: hand; min-width: 0; min-height: 0; }
.action-dock { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); background: rgba(247,243,233,.94); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }
#undo-opening { grid-column: 1 / -1; }
.celebration { text-align: center; }
.celebration h2 { font-size: 2.2rem; }
.round-scores { display: grid; gap: 8px; margin: 20px 0; }
.rematch-card { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line, #d7d7d7); }
.rematch-card button { min-height: 44px; }
.round-score { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-radius: 12px; background: var(--paper-2); }
.round-score strong { font-size: 1.15rem; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); width: min(90%, 440px); transform: translate(-50%, 20px); padding: 12px 15px; border-radius: 12px; background: #273b36; color: white; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); font-size: .85rem; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 760px) {
  .table { padding-top: 22px; }
  .hand .card-button { flex-basis: 62px; }
}
@media (min-width: 760px) and (min-height: 501px) {
  .action-dock { position: sticky; bottom: 12px; max-width: 640px; margin: auto; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
  .hand-area { padding-bottom: 14px; }
}
@media (max-width: 430px) {
  .game-header { padding: max(7px, env(safe-area-inset-top)) 12px 7px; }
  .header-right { gap: 6px; }
  .game-header .small { padding-inline: 8px; }
  .game-header-status { gap: 5px; }
  .connection { max-width: 62px; font-size: .62rem; }
  .interface-toggle { padding-inline: 7px; }
  .interface-toggle-label { display: none; }
  .room-invite { grid-template-columns: 1fr; }
  .room-invite-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-invite-actions button { min-width: 0; width: 100%; }
  .team-assignments { grid-template-columns: 1fr; }
  .team-assignments > p { grid-column: auto; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid .wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .interface-toggle-track,
  .interface-toggle-track span { transition-duration: .01ms !important; }
  .meld.meld-changed,
  .card-button.card-changed { animation: none; box-shadow: 0 0 0 4px rgba(217, 174, 69, .9), 0 0 12px 4px rgba(217, 174, 69, .32); }
  .card-button.card-changed .playing-card { animation: none; filter: drop-shadow(0 0 5px rgba(217, 174, 69, .85)); }
}

.foot-pile-cue { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: inherit; }
.foot-pile-cue i { display: inline-block; flex: 0 0 10px; width: 10px; height: 14px; border: 1px solid #f6ebcd; border-radius: 2px; background: repeating-linear-gradient(45deg, #174d39 0 2px, #32644b 2px 3px); box-shadow: 2px 1px 0 #c4ae72; }
.score-chip-member .foot-pile-cue { margin-left: 5px; }
.score-chip:focus-visible, .turn-seat:focus-visible { outline: 2px solid #d6b44a; outline-offset: 2px; }
html[data-ui="classic"] .score-chip-books { white-space: normal; overflow: visible; }
.score-chip:focus::after, .turn-seat:focus::after { content: attr(title); position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 12px; width: fit-content; max-width: calc(100vw - 24px); padding: 8px 12px; border: 1px solid #c4ae72; border-radius: 8px; color: #173f30; background: #fff5dc; font-size: .875rem; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; box-shadow: 0 2px 8px #0003; pointer-events: none; }

.pickup-meld-hint { margin: 6px 0; font-size: .85rem; line-height: 1.35; }
.pickup-meld-hint:empty { margin: 0; }
.hand .card-button.pickup-required .playing-card { outline: 3px dashed currentColor; outline-offset: -4px; }
html[data-ui="tabletop"] .hand-area .pickup-meld-hint { display: block; max-width: 100%; margin: 0; overflow: hidden; font-size: 12px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
