/*
 * משפחת הקלפים · Family Cards
 * Copyright © 2026 Robert Blumenthal — BlumSoft IL. All rights reserved.
 */
:root {
  color-scheme: light;
  --ink: #29243b;
  --muted: #746d82;
  --paper: #fffdf8;
  --violet: #553b88;
  --violet-dark: #36235f;
  --gold: #e7b84d;
  --red: #d93f4c;
  --green: #27955a;
  --blue: #287fc4;
  --yellow: #e4ad20;
  --shadow: 0 22px 60px rgba(43, 31, 69, .2);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--ink); background: #efe9df; }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #66b9ee; outline-offset: 2px; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 10% 0, #fff8df 0 15%, transparent 38%), linear-gradient(145deg, #f8f3e9, #eee5db); }
.game-header { min-height: 72px; padding: 9px clamp(10px, 2vw, 25px); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(68, 48, 94, .14); background: rgba(255, 253, 248, .95); box-shadow: 0 4px 18px rgba(47, 35, 68, .08); }
.brand { min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand strong { display: block; font-size: 21px; line-height: 1.05; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 800; direction: ltr; text-align: right; }
.family-logo, .welcome-emblem { position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 4px solid #fff; outline: 2px solid var(--violet); border-radius: 16px; background: #fff; box-shadow: 0 6px 14px rgba(72, 44, 110, .23); transform: rotate(-2deg); }
.family-logo { width: 50px; height: 50px; flex: none; }
.family-logo i, .welcome-emblem i { display: block; }
.family-logo i:nth-child(1), .welcome-emblem i:nth-child(1) { background: var(--red); }
.family-logo i:nth-child(2), .welcome-emblem i:nth-child(2) { background: var(--green); }
.family-logo i:nth-child(3), .welcome-emblem i:nth-child(3) { background: var(--blue); }
.family-logo i:nth-child(4), .welcome-emblem i:nth-child(4) { background: var(--yellow); }
.family-logo b, .welcome-emblem b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 23px; text-shadow: 0 2px 4px rgba(0,0,0,.45); }
.header-actions { display: flex; align-items: center; gap: 7px; }
.connection-pill { min-height: 34px; padding: 5px 10px; display: flex; align-items: center; gap: 6px; border-radius: 99px; color: #635e6d; background: #eeeaf1; font-size: 10px; font-weight: 900; white-space: nowrap; }
.connection-pill i { width: 8px; height: 8px; border-radius: 50%; background: #9993a0; }
.connection-pill.online { color: #19623d; background: #def4e7; }
.connection-pill.online i { background: #28a661; }
.connection-pill.connecting { color: #72530e; background: #fff1c8; }
.connection-pill.connecting i { background: #e0a51c; animation: pulse 1s infinite; }
.icon-button, .small-button, .round-button { border: 1px solid #d4ccdc; color: var(--ink); background: #fff; font-weight: 950; cursor: pointer; }
.icon-button { width: 37px; height: 37px; border-radius: 11px; }
.small-button { min-height: 37px; padding: 7px 12px; border-radius: 11px; }
.round-button { width: 35px; height: 35px; border-radius: 50%; }
.round-button:disabled { cursor: not-allowed; opacity: .38; }

.game-layout { width: 100%; max-width: 1680px; margin: 0 auto; padding: 13px clamp(8px, 1.5vw, 22px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, 355px); gap: 12px; flex: 1; }
.table-panel, .panel-card { border: 1px solid rgba(74, 51, 101, .14); background: rgba(255, 253, 248, .96); box-shadow: 0 12px 34px rgba(52, 38, 72, .09); }
.table-panel { min-width: 0; padding: 12px; display: flex; flex-direction: column; border-radius: 25px; }
.table-heading { padding: 2px 5px 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-heading h1 { margin: 2px 0 0; font-size: clamp(18px, 2.2vw, 28px); }
.eyebrow { color: var(--violet); font-size: 9px; font-weight: 950; letter-spacing: .08em; }
.table-badges { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.table-badges span { padding: 5px 8px; border-radius: 99px; color: #5b5268; background: #efeaf2; font-size: 9px; font-weight: 900; }
.table-badges .active-red { color: #9d2330; background: #ffe3e6; }
.table-badges .active-green { color: #17643b; background: #dcf4e5; }
.table-badges .active-blue { color: #145c92; background: #dceefa; }
.table-badges .active-yellow { color: #765507; background: #fff1ba; }

.family-table { position: relative; min-height: clamp(405px, 53vh, 630px); padding: 15px; overflow: hidden; border: 12px solid #6b4b2c; border-radius: 42px; background: radial-gradient(ellipse at center, #217858 0 23%, #176347 69%, #124c38 100%); box-shadow: inset 0 0 0 4px #b98b54, inset 0 0 70px rgba(0,0,0,.34), 0 18px 37px rgba(53,35,67,.2); }
.album-pattern { position: absolute; inset: 8%; border: 2px solid rgba(255,255,255,.12); border-radius: 48%; pointer-events: none; }
.album-pattern::before, .album-pattern::after { content: ""; position: absolute; inset: 9%; border: 1px dashed rgba(255,224,143,.17); border-radius: inherit; }
.album-pattern::after { inset: 22%; }
.opponents-rail { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(5, minmax(86px, 1fr)); gap: 7px; }
.opponent { min-width: 0; padding: 7px 8px; border: 2px solid transparent; border-radius: 14px; text-align: center; background: rgba(255,253,248,.96); box-shadow: 0 7px 18px rgba(0,0,0,.25); }
.opponent.current { border-color: #ffd66a; animation: seatGlow 1s infinite alternate; }
.opponent.you { background: #eee7ff; }
.opponent.disconnected { opacity: .55; }
.opponent strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.opponent small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.opponent .fan { min-height: 24px; margin: 4px 0 2px; display: flex; justify-content: center; direction: ltr; }
.opponent .fan i { width: 16px; height: 23px; margin-left: -8px; display: block; border: 1px solid #fff; border-radius: 4px; background: linear-gradient(135deg, var(--violet) 0 50%, #dcbf72 50%); box-shadow: 0 2px 4px rgba(0,0,0,.23); }
.opponent .fan i:first-child { margin-left: 0; }
.opponent b { color: var(--violet-dark); font-size: 11px; }
.host-tag { margin-inline-start: 3px; color: #b4770b; font-size: 8px; }
.center-piles { position: absolute; z-index: 3; inset: 31% 22% auto; display: flex; justify-content: center; align-items: flex-end; gap: clamp(24px, 7vw, 85px); direction: ltr; }
.draw-pile { border: 0; color: #fff; background: transparent; cursor: pointer; }
.draw-pile:disabled { cursor: not-allowed; }
.draw-pile small, .discard-wrap small { display: block; margin-top: 6px; color: #e6f3ec; text-align: center; font-size: 8px; font-weight: 900; }
.card-back, .playing-card { position: relative; width: 84px; height: 120px; overflow: hidden; border: 5px solid #fff; border-radius: 15px; box-shadow: 0 10px 24px rgba(0,0,0,.34); }
.card-back { display: grid; place-items: center; outline: 2px solid #2c2143; background: var(--violet); }
.back-grid { position: absolute; inset: 8px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 8px; opacity: .9; }
.back-grid i:nth-child(1) { background: var(--red); }.back-grid i:nth-child(2) { background: var(--green); }.back-grid i:nth-child(3) { background: var(--blue); }.back-grid i:nth-child(4) { background: var(--yellow); }
.card-back b { z-index: 2; padding: 6px; border-radius: 8px; color: #fff; background: rgba(43,31,69,.76); font-size: 9px; line-height: 1.08; text-align: center; letter-spacing: .05em; }
.draw-pile:not(:disabled):hover .card-back, .draw-pile:not(:disabled):focus-visible .card-back { transform: translateY(-7px) rotate(-1deg); }
.discard-wrap { direction: rtl; }
.playing-card { display: grid; place-items: center; color: #fff; text-align: center; user-select: none; transition: transform .16s, filter .16s, opacity .16s; background: #6c6575; }
.playing-card::before { content: ""; position: absolute; inset: 6px; border: 2px solid rgba(255,255,255,.72); border-radius: 9px; }
.playing-card .corner { position: absolute; z-index: 2; top: 7px; right: 8px; font-size: 14px; font-weight: 950; }
.playing-card .main-symbol { position: relative; z-index: 2; font-size: 38px; font-weight: 950; line-height: 1; }
.playing-card .card-name { position: absolute; z-index: 2; right: 7px; bottom: 9px; left: 7px; font-size: 8px; font-weight: 950; }
.playing-card.red { background: linear-gradient(145deg, #ef5965, #a91f2c); }
.playing-card.green { background: linear-gradient(145deg, #43b875, #176c40); }
.playing-card.blue { background: linear-gradient(145deg, #4ba2df, #155f99); }
.playing-card.yellow { color: #392d08; background: linear-gradient(145deg, #ffd65c, #d18e06); }
.playing-card.neutral { background: linear-gradient(145deg, #765aa4, #38245f); }
.playing-card.wild { background: conic-gradient(from 45deg, var(--red), var(--green), var(--blue), var(--yellow), var(--red)); }
.playing-card.placeholder { color: #e8e4ed; background: #544d5e; }

.sound-challenge { position: absolute; z-index: 7; top: 43%; right: 50%; width: min(86%, 390px); padding: 12px; border: 3px solid #fff; border-radius: 17px; background: rgba(49,35,78,.96); color: #fff; text-align: center; transform: translate(50%, -50%); box-shadow: 0 16px 38px rgba(0,0,0,.4); }
.sound-challenge strong { display: block; font-size: 15px; }
.sound-challenge p { margin: 4px 0 7px; font-size: 10px; }
.challenge-meter { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.2); }
.challenge-meter i { display: block; width: 100%; height: 100%; background: #ffd45d; transform-origin: right; }
.sound-challenge > b { display: block; margin: 5px 0; direction: ltr; font-variant-numeric: tabular-nums; }
.challenge-button { min-height: 35px; padding: 7px 13px; border: 0; border-radius: 10px; color: #392c0a; background: #ffd45d; font-weight: 950; cursor: pointer; }
.turn-banner { position: absolute; z-index: 4; right: 12%; bottom: 75px; left: 12%; min-height: 39px; padding: 7px 12px; display: grid; place-items: center; border-radius: 13px; color: #312548; background: rgba(255,253,248,.96); font-size: 11px; font-weight: 950; text-align: center; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.turn-banner.yours { background: #fff0b9; animation: bannerPulse 1.1s infinite alternate; }
.turn-banner.paused { color: #862e39; background: #ffe3e6; }
.turn-banner.recovery { color: #713507; background: #fff1c9; }
.table-actions { position: absolute; z-index: 4; right: 7%; bottom: 16px; left: 7%; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.primary-button, .action-button, .last-card-button, .recovery-button { min-height: 40px; padding: 8px 14px; border-radius: 11px; font-weight: 950; cursor: pointer; }
.primary-button { border: 0; color: #fff; background: linear-gradient(135deg, #6c4da2, #442b75); box-shadow: 0 7px 16px rgba(72,44,110,.25); }
.primary-button:disabled { cursor: not-allowed; opacity: .4; box-shadow: none; }
.action-button { border: 1px solid #d1c8d9; color: #352a45; background: #fff; }
.recovery-button { border: 2px solid #e4aa25; color: #653b08; background: #fff1c9; }
.last-card-button { border: 2px solid #e6b839; color: #6c4e08; background: #fff8dc; }
.last-card-button[aria-pressed="true"] { color: #31270c; background: #f2c544; animation: lastCall .7s infinite alternate; }
.hand-panel { margin-top: 10px; padding: 9px; border: 1px solid #ddd2c2; border-radius: 18px; background: linear-gradient(180deg, #fffdf8, #f2eadf); }
.hand-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hand-heading span { color: var(--muted); font-size: 8px; font-weight: 900; }
.hand-heading h2 { margin: 1px 0 0; font-size: 15px; }
.hand-heading p { margin: 0; color: var(--muted); font-size: 8px; }
.hand { min-height: 134px; padding: 9px 4px 3px; display: flex; align-items: flex-end; justify-content: center; overflow-x: auto; overflow-y: hidden; direction: ltr; }
.hand .playing-card { flex: 0 0 84px; margin-left: -25px; cursor: default; }
.hand .playing-card:first-child { margin-left: 0; }
.hand .playing-card.legal { z-index: 3; cursor: pointer; outline: 4px solid #ffe36f; outline-offset: -1px; filter: saturate(1.18) brightness(1.06); transform: translateY(-8px); box-shadow: 0 0 0 4px rgba(71,35,114,.75), 0 0 22px 8px rgba(255,224,91,.72), 0 13px 26px rgba(0,0,0,.4); }
.hand .playing-card.legal::after { content: "✓"; position: absolute; z-index: 4; top: 5px; left: 5px; width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #3b2a08; background: #ffe36f; font-size: 13px; font-weight: 950; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.hand .playing-card.legal:hover, .hand .playing-card.legal:focus-visible { z-index: 6; transform: translateY(-16px) scale(1.035); }
.hand .playing-card.illegal { filter: grayscale(.7); opacity: .48; }
.empty-hand { color: var(--muted); font-size: 10px; direction: rtl; }

.control-panel { display: flex; flex-direction: column; gap: 9px; }
.panel-card { padding: 11px; border-radius: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 10px; font-weight: 950; }
.panel-title b, .panel-title a { color: #6a6175; font-size: 8px; }
.panel-title a { color: var(--violet); }
.room-state { padding: 3px 7px; border-radius: 99px; color: #6a6470; background: #eeeaf0; font-size: 8px; }
.room-state.active { color: #17613c; background: #dff4e8; }
.room-code-row { margin: 8px 0 5px; padding: 7px; display: flex; align-items: center; gap: 5px; border: 1px solid #ded6e3; border-radius: 12px; background: #f1edf3; }
.room-code-row > div { min-width: 0; flex: 1; }
.room-code-row small { display: block; color: var(--muted); font-size: 7px; font-weight: 900; }
.room-code-row strong { display: block; color: var(--violet-dark); font: 950 24px/1.1 ui-monospace, Consolas, monospace; letter-spacing: .1em; direction: ltr; }
.room-card p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.players-list { max-height: 250px; margin: 7px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow: auto; list-style: none; }
.players-list li { min-height: 39px; padding: 5px 7px; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 6px; border: 1px solid #e3dce7; border-radius: 10px; background: #f5f1f6; }
.players-list li.current { border-color: #e8c45e; background: #fff4d0; }
.players-list li.disconnected { opacity: .55; }
.player-rank { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e4dcea; font-size: 9px; font-weight: 950; }
.player-copy { min-width: 0; }
.player-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.player-copy small { display: block; color: var(--muted); font-size: 7px; }
.player-score { text-align: end; }.player-score b { display: block; font-size: 12px; }.player-score small { color: var(--muted); font-size: 7px; }
.empty-player { display: block !important; color: var(--muted); font-size: 9px; text-align: center; }
.last-event { min-height: 50px; margin-top: 7px; padding: 8px; display: flex; align-items: center; gap: 7px; border: 1px solid #e2dce5; border-radius: 11px; color: #4b3d5d; background: #f2eef4; }
.last-event > span { color: var(--gold); font-size: 19px; }
.last-event p { margin: 0; font-size: 9px; font-weight: 850; line-height: 1.4; }
.mode-summary { margin-top: 7px; padding: 8px; border-radius: 10px; background: #f3eff5; }.mode-summary b { font-size: 11px; }.mode-summary p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.mini-legend { margin-top: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mini-legend span { padding: 5px; display: flex; align-items: center; gap: 5px; border-radius: 8px; color: #5d5368; background: #f2eef4; font-size: 7px; font-weight: 900; }
.mini-legend b { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--violet); font-size: 11px; }
.adbar { display: none; }.adbar.on { width: min(970px, calc(100% - 20px)); min-height: 50px; margin: 3px auto 0; display: block; overflow: hidden; text-align: center; }
.game-footer { padding: 9px; color: #746d7e; font-size: 9px; text-align: center; }.game-footer a { color: #5a486f; text-decoration: none; }.game-footer span { margin: 0 5px; }

.modal { position: fixed; z-index: 50; inset: 0; padding: 15px; display: grid; place-items: center; overflow: auto; background: rgba(28,20,42,.78); backdrop-filter: blur(8px); }
.sheet { position: relative; width: min(100%, 530px); max-height: calc(100vh - 30px); padding: 22px; overflow: auto; border: 1px solid rgba(255,255,255,.8); border-radius: 23px; background: linear-gradient(145deg, #fffdf8, #f1eaf5); box-shadow: var(--shadow); }
.sheet h2 { margin: 4px 0 6px; font-size: 24px; }.sheet > p { margin: 0 0 11px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.welcome-emblem { width: 68px; height: 68px; margin: 0 auto 9px; }
.welcome-sheet h2, .welcome-sheet > p { text-align: center; }
.mode-tabs { margin: 10px 0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 12px; background: #e5ddec; }
.mode-tabs button { min-height: 36px; border: 0; border-radius: 9px; color: #675d72; background: transparent; font-weight: 950; cursor: pointer; }
.mode-tabs button[aria-selected="true"] { color: var(--violet); background: #fff; box-shadow: 0 4px 12px rgba(61,43,84,.13); }
.welcome-sheet form > label, .create-fields > label, #codeField > label { display: block; margin: 9px 0 4px; font-size: 9px; font-weight: 950; }
.welcome-sheet input, .welcome-sheet select { width: 100%; min-height: 41px; padding: 8px 10px; border: 1px solid #d0c6d8; border-radius: 10px; color: var(--ink); background: #fff; }
#joinCode { font: 950 22px ui-monospace, Consolas, monospace; letter-spacing: .2em; text-align: center; direction: ltr; }
.gender-choice { margin: 9px 0; padding: 0; border: 0; }.gender-choice legend { margin-bottom: 4px; font-size: 9px; font-weight: 950; }.gender-choice label { display: inline-block; margin-inline-end: 5px; }.gender-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }.gender-choice span { min-width: 65px; padding: 7px; display: inline-block; border: 1px solid #d2c8da; border-radius: 9px; background: #fff; font-size: 9px; font-weight: 950; text-align: center; cursor: pointer; }.gender-choice input:checked + span { border-color: var(--violet); color: var(--violet); background: #eee7f8; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.field-grid label { font-size: 9px; font-weight: 950; }.field-grid select { margin-top: 4px; }
.mode-explanation { margin: 5px 0 8px; padding: 8px; border-inline-start: 4px solid var(--violet); border-radius: 9px; color: #62576d; background: #f0ebf3; font-size: 8px; line-height: 1.5; }
.switch-row { padding: 8px; display: flex !important; align-items: center; gap: 8px; border-radius: 11px; background: #f0ebf3; }.switch-row input { width: 20px; height: 20px; min-height: 0; flex: none; }.switch-row b, .switch-row small { display: block; }.switch-row small { margin-top: 2px; color: var(--muted); font-size: 7px; font-weight: 700; }
.form-error { min-height: 18px; margin: 5px 0 !important; color: #b12834 !important; font-weight: 900; }.privacy-note { margin: 10px 0 0 !important; padding: 7px 9px; border-radius: 10px; color: #635b6d !important; background: #ece6ef; font-size: 8px !important; }
.close-button { position: absolute; top: 12px; inset-inline-end: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: #3d3150; background: #e6deeb; font-size: 21px; cursor: pointer; }
.help-sheet ol { padding-inline-start: 18px; color: #51475d; font-size: 10px; line-height: 1.55; }.help-sheet li { margin: 5px 0; }.help-actions { margin: 10px 0; display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }.help-actions a { color: var(--violet); font-size: 9px; font-weight: 950; }
.history-sheet { width: min(100%, 680px); }
.history-summary { margin: 10px 0 7px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; color: #5a4d67; background: #eee8f1; font-size: 9px; }
.history-summary b { color: var(--violet-dark); font-size: 11px; }
.history-list { max-height: 300px; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; overflow: auto; list-style: none; }
.history-list li { padding: 8px 9px; display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: start; gap: 8px; border: 1px solid #ded5e3; border-radius: 10px; background: #fff; font-size: 9px; line-height: 1.45; }
.history-list time { color: #73677e; direction: ltr; font: 800 9px ui-monospace, Consolas, monospace; }
.history-list .history-empty { display: block; color: var(--muted); text-align: center; }
.diagnostics-box { margin-top: 11px; padding: 10px; border: 1px solid #d8cede; border-radius: 12px; background: #f4f0f6; }
.diagnostics-box summary { color: var(--violet-dark); font-size: 10px; font-weight: 950; cursor: pointer; }
.diagnostics-box > p { margin: 7px 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.diagnostics-box dl { margin: 8px 0; display: grid; grid-template-columns: minmax(120px,.8fr) minmax(0,1.2fr); gap: 1px; overflow: hidden; border: 1px solid #ddd4e2; border-radius: 9px; background: #ddd4e2; }
.diagnostics-box dt, .diagnostics-box dd { margin: 0; padding: 6px 8px; overflow-wrap: anywhere; background: #fff; font-size: 8px; }
.diagnostics-box dt { color: #62576d; font-weight: 900; }
.diagnostics-box dd { direction: auto; }
.history-actions { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }
.history-privacy { margin: 9px 0 0 !important; padding: 8px; border-radius: 9px; color: #655b70 !important; background: #eee8f1; font-size: 8px !important; }
.choice-sheet { text-align: center; }.color-options { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.color-options button { min-height: 62px; border: 4px solid #fff; border-radius: 14px; color: #fff; font-weight: 950; box-shadow: 0 5px 14px rgba(0,0,0,.18); cursor: pointer; }.color-options button[data-color="red"] { background: var(--red); }.color-options button[data-color="green"] { background: var(--green); }.color-options button[data-color="blue"] { background: var(--blue); }.color-options button[data-color="yellow"] { color: #3c2d05; background: var(--yellow); }
.player-options { display: grid; gap: 7px; }.player-options button { min-height: 45px; border: 1px solid #d4cadb; border-radius: 11px; color: var(--ink); background: #fff; font-weight: 900; cursor: pointer; }
.result-sheet { text-align: center; }.result-emblem { width: 70px; height: 70px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 38px; font-weight: 950; }.finish-list { margin: 9px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; list-style: none; text-align: start; }.finish-list li { padding: 7px 9px; display: flex; justify-content: space-between; gap: 7px; border-radius: 9px; background: #f0ebf3; font-size: 9px; }.result-sheet button { width: 100%; margin-top: 5px; }.noscript { padding: 20px; text-align: center; }

html[dir="ltr"] .brand small { text-align: left; }
html[dir="ltr"] .empty-hand { direction: ltr; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes seatGlow { to { box-shadow: 0 0 0 4px rgba(255,214,106,.38), 0 8px 22px rgba(0,0,0,.3); } }
@keyframes bannerPulse { to { box-shadow: 0 0 0 5px rgba(255,214,106,.3), 0 7px 18px rgba(0,0,0,.22); } }
@keyframes lastCall { to { transform: scale(1.035); } }
@media (max-width: 1050px) { .game-layout { grid-template-columns: 1fr; }.control-panel { display: grid; grid-template-columns: 1fr 1fr; }.room-card, .event-card { grid-column: 1; }.score-card, .mode-card { grid-column: 2; grid-row: span 2; }.family-table { min-height: 545px; } }
@media (max-width: 700px) { .game-header { min-height: 58px; padding: 7px 9px; }.family-logo { width: 41px; height: 41px; }.brand strong { font-size: 16px; }.brand small { display: none; }.connection-pill { padding: 4px 7px; }.connection-pill span { display: none; }.small-button { padding: 6px 8px; font-size: 9px; }.game-layout { padding: 6px; }.table-panel { padding: 7px; border-radius: 18px; }.table-heading { padding-bottom: 6px; }.table-badges span { padding: 4px 6px; font-size: 7px; }.family-table { min-height: 465px; padding: 9px; border-width: 8px; border-radius: 27px; }.opponents-rail { grid-template-columns: repeat(3,1fr); gap: 4px; }.opponent { padding: 4px; }.opponent .fan { display: none; }.center-piles { inset: 38% 11% auto; }.card-back, .center-piles .playing-card { width: 66px; height: 96px; }.turn-banner { right: 5%; bottom: 82px; left: 5%; }.table-actions { right: 3%; bottom: 12px; left: 3%; }.hand { justify-content: flex-start; }.hand .playing-card { width: 70px; height: 104px; flex-basis: 70px; margin-left: -23px; }.hand .playing-card .main-symbol { font-size: 31px; }.control-panel { display: flex; }.players-list { max-height: 190px; }.sheet { padding: 18px 14px; border-radius: 18px; }.field-grid { grid-template-columns: 1fr; }.mini-legend { grid-template-columns: repeat(4,1fr); }.history-list li { grid-template-columns: 62px minmax(0,1fr); }.diagnostics-box dl { grid-template-columns: 1fr; }.diagnostics-box dt { padding-bottom: 2px; }.diagnostics-box dd { padding-top: 2px; } }
@media (max-width: 430px) { .table-heading { align-items: flex-start; }.table-heading h1 { font-size: 15px; }.table-badges { max-width: 155px; }.family-table { min-height: 445px; }.opponent strong { font-size: 8px; }.opponent small { font-size: 6px; }.center-piles { top: 36%; }.table-actions button { min-height: 35px; padding: 6px 8px; font-size: 9px; }.turn-banner { font-size: 9px; }.sound-challenge { top: 47%; }.color-options button { min-height: 54px; } }
@media (orientation: landscape) and (max-height: 620px) and (min-width: 720px) { .game-header { min-height: 52px; padding-block: 5px; }.game-layout { grid-template-columns: minmax(0,1fr) 330px; padding: 5px; }.family-table { min-height: 395px; }.table-panel { padding: 7px; }.center-piles { top: 27%; }.turn-banner { bottom: 65px; }.table-actions { bottom: 9px; }.hand { min-height: 96px; }.hand .playing-card { width: 62px; height: 88px; flex-basis: 62px; }.control-panel { gap: 5px; }.panel-card { padding: 7px; }.players-list { max-height: 125px; }.mode-card, .game-footer { display: none; } }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; }.app-shell { color: #f8f3ff; background: #15101f; }.game-header, .table-panel, .panel-card { border-color: #48395b; background: rgba(30,22,43,.97); }.brand, .icon-button, .small-button { color: #f8f3ff; }.icon-button, .small-button, .round-button { border-color: #584769; background: #2b2139; }.connection-pill, .table-badges span, .room-code-row, .last-event, .players-list li, .mini-legend span, .mode-summary { border-color: #4f405f; color: #e8dff1; background: #2b2237; }.room-code-row strong { color: #fff; }.hand-panel { border-color: #52465b; background: linear-gradient(180deg,#2b2630,#211b29); }.sheet { color: #f9f4ff; background: linear-gradient(145deg,#30243e,#1c1526); }.welcome-sheet input, .welcome-sheet select, .gender-choice span, .player-options button { border-color: #5c4c69; color: #fff; background: #2b2237; }.mode-tabs { background: #1c1526; }.mode-tabs button[aria-selected="true"] { color: #fff; background: #523d6e; }.switch-row, .mode-explanation, .privacy-note, .finish-list li, .history-summary, .diagnostics-box, .history-privacy { background: #2b2237 !important; color: #ded2e7 !important; }.history-list li, .diagnostics-box dt, .diagnostics-box dd { border-color: #51435e; color: #eee6f4; background: #261d32; }.diagnostics-box dl { border-color: #51435e; background: #51435e; } }
