/* Open cards stay in front of their owner. No inner scrolling or clipped melds. */
#penalty-notice { position: fixed; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; width: min(660px, 90vw); box-sizing: border-box; padding: 28px 34px; border: 2px solid #c96957; border-radius: 14px; background: #fff5e8; color: #8a3030; box-shadow: 0 18px 65px #102c2260; display: grid; gap: 12px; text-align: center; z-index: 100; pointer-events: none; }
.card-back:after { content: '51'; }
#penalty-notice[hidden] { display: none !important; }
#penalty-notice strong { font-size: clamp(19px, 2.3vw, 28px); line-height: 1.45; }
.penalty-notice-number { font: bold 42px Georgia, serif; }
.penalty-notice-card { font-size: 18px; }
.opening-dialog { width: min(880px, 96vw); max-height: calc(100dvh - 24px); overflow: auto; }
.opening-dialog .dialog-header { padding: 14px 20px; }
.opening-dialog .dialog-header h2 { font-size: 23px; }
.opening-dialog .dialog-body { padding: 12px 20px 0; }
.opening-dialog .btn { min-height: 34px; padding: 8px 14px; }
.opening-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.opening-mode-switch { display: flex; gap: 8px; margin-bottom: 10px; padding: 5px; border-radius: 9px; background: #e8e3d4; }
.opening-mode-switch .btn { flex: 1; }
.opening-mode-switch .is-active { border-color: #b89345; background: #214f3c; color: #fff4cf; box-shadow: inset 0 0 0 1px #e1c678; }
.opening-help { margin-left: auto; color: #75846a; cursor: help; }
.opening-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.opening-group { max-width: 100%; border: 1px solid #cbd5be; background: #edf0e3; border-radius: 8px; padding: 7px; }
.opening-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 11px; }
.opening-group-heading .subtle-button { padding: 3px; font-size: 10px; }
.opening-cards { display: flex; flex-wrap: wrap; gap: 3px; }
.opening-cards .card.tiny { width: 36px; height: 52px; margin: 0; }
.opening-cards .card.tiny .card-corner { font-size: 15px; }
.opening-cards .card.tiny.joker .card-corner { font-size: 7px; }
.opening-summary { font-weight: 600; font-size: 13px; padding: 8px 10px; border-radius: 5px; background: #e4ead9; }
.opening-available-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 4px; }
.opening-available-title { font-size: 12px; margin: 0; }
.opening-available { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; padding: 6px 0 8px; }
.opening-card-choice { padding: 0; background: none; border: 0; border-radius: 5px; }
.opening-card-choice .card { width: 48px; height: 70px; margin: 0; cursor: pointer; }
.opening-card-choice .card-center { font-size: 24px; }
.opening-card-choice .card-corner { font-size: 15px; }
.opening-card-choice.is-picked .card { outline: 3px solid #b59754; transform: translateY(-5px); }
.opening-card-choice:focus-visible { outline: 3px solid #405f37; outline-offset: 4px; }
.dialog-body .opening-warning { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; color: #a03e2e; }
.opening-dialog .dialog-actions { position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px; background: #faf9f1; border-top: 1px solid #e1e3d7; z-index: 2; }
@media (max-height: 620px) {
  .opening-dialog .dialog-header { padding: 8px 16px; }
  .opening-dialog .dialog-body { padding-top: 8px; }
  .opening-groups { margin: 8px 0; gap: 6px; }
  .opening-cards .card.tiny { width: 32px; height: 44px; }
  .opening-dialog .dialog-actions { padding-top: 8px; padding-bottom: 8px; }
}
.game-layout { grid-template-columns: minmax(0, 1fr) 210px; }
.play-area { padding: 14px 22px; min-width: 0; }
.hand-actions, .table-meta { flex-wrap: wrap; }
.table-meta { gap: 10px; margin-bottom: 10px; }
.meta-rule { color: #526c48; font-size: 11px; }
.table-stage.spacious-table { position: relative; height: auto; margin: 0; padding: 36px 64px 38px; }
.players-strip { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.spacious-table .player { position: absolute; inset: auto; transform: none; min-width: 0; width: 174px; padding: 8px 12px; gap: 8px; border-radius: 30px; background: #f7f4e9; box-shadow: 0 4px 14px #18382a20; pointer-events: auto; }
.spacious-table .player.seat-top { top: 0; left: 50%; transform: translateX(-50%); }
.spacious-table .player.seat-bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.spacious-table .player.seat-left, .spacious-table .player.seat-right { top: 50%; transform: translateY(-50%); width: 112px; flex-wrap: wrap; justify-content: center; text-align: center; border-radius: 22px; padding: 12px 7px; }
.spacious-table .player.seat-left { left: 0; }
.spacious-table .player.seat-right { right: 0; }
.player-turn-arrow { position: absolute; width: 32px; height: 40px; pointer-events: none; filter: drop-shadow(0 2px 3px #0006); }
.player-turn-arrow svg { display: block; width: 100%; height: 100%; fill: #e53935; stroke: #fff0dc; stroke-width: 1.5; stroke-linejoin: round; }
.seat-top .player-turn-arrow { bottom: -46px; left: 50%; transform: translateX(-50%); }
.seat-top .player-turn-arrow svg { transform: rotate(0deg); }
.seat-bottom .player-turn-arrow { top: -46px; left: 50%; transform: translateX(-50%); }
.seat-bottom .player-turn-arrow svg { transform: rotate(180deg); }
.seat-left .player-turn-arrow { right: -46px; top: 50%; transform: translateY(-50%); }
.seat-left .player-turn-arrow svg { transform: rotate(-90deg); }
.seat-right .player-turn-arrow { left: -46px; top: 50%; transform: translateY(-50%); }
.seat-right .player-turn-arrow svg { transform: rotate(90deg); }
.spacious-table .player.seat-left .player-info, .spacious-table .player.seat-right .player-info { flex-basis: 100%; order: 2; }
.spacious-table .avatar { width: 29px; height: 29px; font-size: 14px; flex-shrink: 0; }
.player-info { min-width: 0; flex: 1; }
.spacious-table .player-name { max-width: none; font-size: 11px; }
.spacious-table .player-detail { font-size: 9px; }
.player-opening { margin-top: 4px; color: #405f37; font-size: 10px; font-weight: 600; }
.player-connection { margin-top: 3px; color: #b44b3f; font-size: 9px; font-weight: 700; line-height: 1.2; }
.player.connection-lost .player-nameplate { box-shadow: inset 0 0 0 1px #d8786266; }
.player-fixed-penalty { display: inline-block; margin-top: 3px; padding: 2px 6px; border-radius: 9px; background: #f4ded5; color: #9a3535; font-size: 10px; font-weight: 700; line-height: 1.25; }
.player-meld-count { display: block; margin: 3px auto 0; padding: 0; border: 0; background: none; color: #526c48; font-size: 10px; text-decoration: underline; cursor: pointer; }
.result-cards { margin: 14px 0; color: #526c48; font-size: 12px; line-height: 1.8; }
.result-cards summary { cursor: pointer; }
.inspection-control { display: flex; justify-content: center; margin-top: 6px; }
.inspection-cards { display: flex; flex-wrap: wrap; gap: 8px; max-height: 45vh; overflow-y: auto; padding: 8px 2px; }
.inspection-cards .card { flex-shrink: 0; cursor: default; }
.spacious-table .player-score { margin-left: 0; font-size: 11px; }
.spacious-table .table-felt { position: relative; inset: auto; min-height: clamp(320px, 44vh, 460px); border-radius: 180px / 150px; border-width: 8px; padding: 38px 48px; overflow: hidden; display: grid; grid-template-areas: "top top top" "left center right" "bottom bottom bottom"; grid-template-columns: minmax(0, 1fr) minmax(200px, 1.2fr) minmax(0, 1fr); gap: 14px 18px; align-items: center; align-content: center; }
.spacious-table .table-felt:before { border-radius: inherit; inset: 5px; }
.table-toolbar { grid-area: center; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; min-width: 0; min-height: 190px; gap: 12px 14px; padding: 8px 0; }
.spacious-table .draw-zone { display: contents; }
.table-toolbar .stock-pile { grid-column: 1; justify-self: end; margin-right: 0; }
.table-toolbar .discard-pile { grid-column: 2; justify-self: start; position: relative; gap: 8px; }
.table-toolbar .table-turn { grid-column: 1 / -1; justify-self: center; text-align: center; }
.discard-stack { position: relative; display: block; width: 84px; height: 112px; }
.discard-layer { position: absolute; left: 13px; top: 12px; transform: translate(var(--scatter-x), var(--scatter-y)) rotate(var(--scatter-angle)); pointer-events: none; }
.discard-layer .card { display: block; }
.discard-top.arriving { visibility: hidden; }
.discard-count { position: absolute; right: -2px; top: 0; border-radius: 50%; min-width: 22px; padding: 4px; background: #cdbd8e; color: #294c3b; font-size: 11px; }
.discard-stack .empty-pile { position: absolute; inset: 12px 13px; }
.spacious-table .discard-pile:hover .card, .spacious-table .discard-pile.drag-over .card { transform: none; }
.spacious-table .discard-pile .pile-label { white-space: nowrap; }
.spacious-table .discard-pile .discard-source { text-transform: none; letter-spacing: .2px; font-size: 11px; max-width: 160px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.flying-discard { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; will-change: transform; }
.flying-discard .card { display: block; width: 57px; height: 83px; margin: 0; box-shadow: 0 10px 20px #0005; }
.spacious-table .table-turn { position: static; transform: none; width: auto; text-align: left; max-width: 320px; flex: 1; font-size: 12px; line-height: 1.7; }
.table-turn small { display: block; color: #adc19f; font-size: 9px; margin-top: 5px; }
.table-monogram { position: absolute; right: 0; bottom: 38px; pointer-events: none; font: 42px Georgia, serif; letter-spacing: -4px; color: #d4c28d55; }
.spacious-table .meld-area { display: contents; }
.meld-section { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; padding: 6px 0; border: 0; scroll-margin: 20px; }
.meld-top { grid-area: top; }
.meld-bottom { grid-area: bottom; }
.meld-left { grid-area: left; }
.meld-right { grid-area: right; }
.meld-section:focus { outline: 1px solid #e3c477; outline-offset: 5px; border-radius: 8px; }
.meld-section:last-child { border-bottom: 0; }
.meld-heading { display: flex; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px; color: #e4e9d6; font-size: 11px; padding: 0 3px; }
.owner-1 .meld-heading { border-color: #d5b78d; }
.owner-2 .meld-heading { border-color: #9ebfc9; }
.owner-3 .meld-heading { border-color: #cea896; }
.meld-heading b { overflow-wrap: anywhere; }
.meld-heading span { color: #d9c792; font-size: 9px; }
.owner-melds { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 6px 9px; min-width: 0; }
.spacious-table .meld { max-width: 100%; min-width: 0; padding: 3px; gap: 0; border: 1px solid #c4d3ad30; border-radius: 5px; background: #12372945; }
.spacious-table .meld.is-target { background: #d4bb6740; border-color: #e3c477; }
.spacious-table .meld-cards { min-width: 0; max-width: 100%; overflow: visible; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 0; }
.spacious-table .meld .card.tiny { width: 39px; height: 58px; margin: 0; flex: 0 0 auto; }
.spacious-table .meld .card.tiny .card-corner { font-size: 16px; left: 4px; top: 4px; }
.spacious-table .meld .card.tiny .card-corner small { font-size: 15px; }
.spacious-table .meld .card.tiny:not(.joker) .card-center { display: block; left: 65%; top: 65%; font-size: 19px; opacity: .92; }
.spacious-table .card.tiny.joker .card-corner { font-size: 7px; }
.spacious-table .joker-as { font-size: 9px; }
.table-empty { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font: 28px Georgia, serif; letter-spacing: 14px; color: #c9d5b61c; padding: 12px 0 0; pointer-events: none; }
.table-empty span { color: #dbc79220; }
.hand-section { margin-top: 8px; padding-top: 12px; }
.hand-heading { margin-bottom: 5px; flex-wrap: wrap; row-gap: 4px; }
.rack { min-height: 102px; }
.hand-help { margin-bottom: 10px; }
.hand-actions { padding-top: 9px; }
.right-panel { padding: 22px 15px; }
@media (min-width: 1600px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 240px; }
  .play-area { padding: 20px 30px; }
  .spacious-table .meld .card.tiny { width: 44px; height: 65px; }
  .spacious-table .meld .card.tiny .card-corner { font-size: 17px; }
  .spacious-table .meld .card.tiny .card-corner small { font-size: 16px; }
  .spacious-table .meld .card.tiny:not(.joker) .card-center { font-size: 21px; }
}
@media (max-width: 1300px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .right-panel { display: none; }
}
@media (min-width: 701px) and (max-height: 820px) {
  .spacious-table .table-felt { min-height: 290px; padding-top: 20px; padding-bottom: 20px; }
  .table-toolbar { min-height: 155px; padding-top: 0; padding-bottom: 12px; }
}
@media (max-width: 700px) {
  .play-area { padding: 10px 8px; }
  .table-stage.spacious-table { padding: 34px 30px 36px; }
  .spacious-table .player { width: 150px; padding: 7px 10px; }
  .spacious-table .player.seat-left, .spacious-table .player.seat-right { width: 66px; padding: 9px 3px; border-radius: 16px; }
  .spacious-table .player-detail { font-size: 8px; }
  .spacious-table .player-opening { font-size: 8px; }
  .spacious-table .player-name { font-size: 10px; }
  .spacious-table .table-felt { padding: 32px 14px; border-width: 6px; border-radius: 70px / 65px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "top top" "center center" "left right" "bottom bottom"; gap: 12px 8px; }
  .table-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 260px; width: 100%; justify-self: center; }
  .table-toolbar .stock-pile { margin-right: 0; }
  .table-toolbar .table-turn { grid-column: 1 / -1; padding-top: 10px; }
  .table-monogram { display: none; }
  .spacious-table .table-turn { text-align: center; flex-basis: 100%; font-size: 10px; }
  .table-turn small { display: none; }
  .meld-section { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .meld-heading { flex-direction: row; flex-wrap: wrap; }
  .meta-rule { font-size: 10px; }
  .hand-actions .btn { flex-grow: 1; }
}
.cut-panel { max-width: 640px; margin: 36px auto; padding: 28px; border-radius: 20px; background: var(--panel, #fffaf1); color: #253b33; }
.cut-panel .card-back { margin: 22px 0; }
.cut-panel p { line-height: 1.65; }
.cut-panel form { display: grid; gap: 16px; }
.stock-pile { position: relative; flex-shrink: 0; padding: 0 8px; }
.stock-pile.has-bottom { padding-left: 28px; }
.stock-pile .stock-top { width: 57px; gap: 18px; z-index: 2; }
.stock-top .pile-label { white-space: nowrap; }
.bottom-peek { position: absolute; top: 12px; left: 0; width: 28px; height: 83px; padding: 0; background: none; border: 0; border-radius: 5px; z-index: 1; }
.bottom-peek .card { display: block; pointer-events: none; }
.bottom-peek[aria-disabled="true"] { cursor: help; }
.bottom-peek[aria-disabled="false"] { cursor: pointer; }
.bottom-peek[aria-disabled="false"]:hover .card, .bottom-peek:focus-visible .card { outline: 2px solid #e3c477; box-shadow: 0 0 0 4px #e3c47744; }
.bottom-peek.is-retired .card { background: #d6d2c5; color: #72776b; }
.bottom-peek.is-retired .card-corner { text-decoration: line-through; }
.bottom-match { background: #eee1bc; color: #685022; border: 1px solid #d6bf85; }
.audit-timeline { display: grid; gap: 10px; margin-top: 15px; }
.audit-entry { padding: 12px; border: 1px solid #d6dccb; border-radius: 8px; line-height: 1.65; }
.audit-entry summary { cursor: pointer; font-weight: 600; }
.audit-entry p { overflow-wrap: anywhere; }
.audit-critical { border-left: 3px solid #b79a5e; }

/* Hoşkin ana sayfasıyla aynı seçim mantığını kullanan 51 maç lobisi. */
.home-lobby {
  min-height: 100vh;
  padding: 28px clamp(16px, 4vw, 54px);
  color: #f7f0df;
  background:
    radial-gradient(ellipse at 50% 14%, #2d7659 0, #133b2d 46%, #081c16 100%),
    #0b2119;
}
.home-lobby-head {
  max-width: 1120px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.home-lobby-head h1 { margin: 0; font: 700 clamp(42px, 6vw, 68px)/1 Georgia, serif; letter-spacing: -.05em; }
.home-lobby-head p { margin: 8px 0 0; color: #bccbc0; font-size: 15px; }
.home-head-actions { display: flex; align-items: center; gap: 12px; }
.home-mark {
  width: 68px;
  height: 68px;
  border: 2px solid #e5bd69;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #efd492;
  background: #09231ac7;
  font: 30px Georgia, serif;
  box-shadow: 0 10px 25px #00110b70, inset 0 0 0 5px #e5bd6912;
}
.home-icon-button { width: 42px; height: 42px; border-radius: 50%; color: #ead9af; background: #061a1480; border: 1px solid #ffffff24; }
.home-lobby-grid { width: min(570px, 100%); margin: 0 auto; display: grid; gap: 16px; }
.home-panel {
  padding: 24px;
  border: 1px solid #ffffff20;
  border-radius: 18px;
  background: #0a2119d9;
  box-shadow: 0 18px 42px #03130d70;
}
.home-panel h2 { margin: 0 0 7px; font-size: 21px; }
.home-panel-intro, .home-online p { margin: 0; color: #adbbb0; font-size: 12px; line-height: 1.6; }
.home-setup-group { margin-top: 22px; }
.home-setup-group h3 { margin: 0 0 9px; color: #e7bf69; font-size: 13px; }
.home-setting-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-setting-options-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-setting-option {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ffffff24;
  border-radius: 10px;
  color: #f5f0e6;
  background: #ffffff0b;
  font-weight: 700;
}
.home-setting-option:hover { background: #ffffff13; }
.home-setting-option.active { border-color: #e8bd63; color: #f3cf82; background: #e9bd651d; box-shadow: inset 0 0 0 1px #e9bd6538; }
.home-play, .home-resume {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border-radius: 11px;
  color: #1c291f;
  background: linear-gradient(#f0cf82, #d4a84f);
  font-weight: 800;
  box-shadow: 0 6px 18px #00120c66, inset 0 1px #fff1c0;
}
.home-resume { margin: 0; color: #f5e8c9; background: #12382bd9; border: 1px solid #e7bf6966; box-shadow: 0 12px 28px #03130d55; }
.home-rule-summary { margin: 10px 0 0; color: #91a79a; text-align: center; font-size: 11px; }
.home-online { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.home-online h2 { font-size: 17px; }
.home-online-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.home-online-actions button { padding: 10px 12px; border-radius: 9px; color: #f3e5c5; background: transparent; border: 1px solid #ffffff30; font-size: 11px; font-weight: 700; }
.home-online-actions button:first-child { border-color: #d9b25e88; color: #e8c778; }
.home-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.home-stats div { padding: 14px; border: 1px solid #ffffff18; border-radius: 12px; background: #081c16a8; }
.home-stats strong { display: block; color: #e9c675; font: 24px Georgia, serif; }
.home-stats span { color: #9eafa3; font-size: 10px; }
.home-lobby .home-footer { color: #93a69a; }
.room-rules { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 7px 10px; margin: 14px 0; padding: 10px 12px; border-radius: 8px; background: #e6eadf; color: #6b7868; font-size: 10px; }
.room-rules b { color: #315440; font-size: 12px; }
@media (max-width: 560px) {
  .home-lobby { padding: 18px 12px; }
  .home-lobby-head { align-items: flex-start; margin-bottom: 20px; }
  .home-mark { width: 54px; height: 54px; font-size: 24px; }
  .home-panel { padding: 19px 16px; }
  .home-online { align-items: stretch; flex-direction: column; }
  .home-online-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .home-setting-options-three { grid-template-columns: 1fr; }
  .room-rules { grid-template-columns: auto 1fr; }
}

/*
 * Shared card-table scene
 * -----------------------
 * The structural classes below are deliberately game-neutral. A future game can
 * reuse .card-game-shell, .card-table-scene, .table-surface and
 * .player-rack-panel, then supply only its centre controls and meld layout.
 */
.card-game-shell {
  --table-felt-light: #17613f;
  --table-felt: #0d4a31;
  --table-felt-deep: #073522;
  --table-gold: #d1ad65;
  --wood-light: #9a6132;
  --wood: #673b20;
  --wood-deep: #321b12;
  --cream: #fff6df;
  background:
    radial-gradient(circle at 48% 18%, #55321f 0 4%, transparent 35%),
    repeating-linear-gradient(92deg, #352015 0 2px, #412719 2px 16px, #301c12 17px 19px);
  min-height: calc(100vh - 89px);
}
.card-game-shell .game-board {
  padding: 12px 16px 18px;
  background: linear-gradient(90deg, #170e0a66, transparent 4%, transparent 96%, #170e0a66);
}
.card-game-shell .game-hud {
  position: relative;
  z-index: 8;
  width: min(1120px, calc(100% - 54px));
  min-height: 38px;
  margin: 0 auto -9px;
  padding: 7px 18px;
  color: #f8eacf;
  border: 1px solid #c99c5f55;
  border-radius: 8px 8px 18px 18px;
  background:
    linear-gradient(#ffffff12, #00000018),
    repeating-linear-gradient(93deg, #7c4a28 0 18px, #704123 18px 36px, #81502d 37px 54px);
  box-shadow: inset 0 1px #ffe4ae4d, 0 5px 13px #150b0780;
}
.card-game-shell .game-hud .round-label { color: #fff4dd; text-shadow: 0 1px 1px #24130d; }
.card-game-shell .game-hud .round-label span,
.card-game-shell .game-hud .meta-rule { color: #decba7; }
.card-game-shell .game-hud .meta-rule { border-left-color: #e1bd7f66; }
.card-game-shell .game-hud .pill {
  color: #fff1d6;
  border-color: #e0bd7a55;
  background: #25160d70;
}
.card-table-scene {
  position: relative;
  isolation: isolate;
  min-height: clamp(545px, calc(100vh - 355px), 710px);
  margin: 0;
  padding: 50px 74px 72px;
}
.card-table-scene::before {
  content: '';
  position: absolute;
  inset: 24px 35px 20px;
  z-index: -2;
  border-radius: 48px;
  background:
    repeating-linear-gradient(96deg, #8c552e 0 17px, #754324 18px 33px, #915b32 34px 49px),
    var(--wood);
  box-shadow:
    inset 0 2px 1px #f1c77b80,
    inset 0 -8px 16px #27120ca8,
    0 16px 30px #0e080783;
}
.card-table-scene::after {
  content: '';
  position: absolute;
  inset: 36px 48px 34px;
  z-index: -1;
  border: 1px solid #e5c37b4a;
  border-radius: 37px;
  box-shadow: inset 0 0 0 5px #2b160d7d;
  pointer-events: none;
}
.spacious-table .table-felt.table-surface {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: clamp(440px, calc(100vh - 450px), 585px);
  padding: 76px 95px 70px;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 44%, #1b6544 0, var(--table-felt) 58%, var(--table-felt-deep) 100%);
  box-shadow:
    inset 0 0 0 2px #d4bd7c3b,
    inset 0 0 55px #001b11c7,
    0 0 0 6px #28150e88;
  display: grid;
  grid-template-areas: 'top top top' 'left center right' 'bottom bottom bottom';
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.35fr) minmax(0, 1fr);
  grid-template-rows: minmax(70px, auto) minmax(190px, 1fr) minmax(70px, auto);
  gap: 12px 20px;
  align-items: center;
  align-content: stretch;
}
.spacious-table .table-felt.table-surface::before {
  inset: 12px;
  border: 1px solid #f0d9952e;
  border-radius: 19px;
  box-shadow: inset 0 0 24px #08291c;
}
.table-surface .felt-texture {
  opacity: .13;
  mix-blend-mode: soft-light;
}
.table-surface .table-monogram {
  right: 30px;
  bottom: 26px;
  font-size: 54px;
  color: #d8bd7152;
  text-shadow: 0 2px #041d13;
}

/* The seat card is a wooden name plate; hidden cards sit physically beside it. */
.spacious-table .player {
  width: 206px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: var(--cream);
  background: none;
  box-shadow: none;
  overflow: visible;
}
.spacious-table .player-nameplate {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 32px 7px 9px;
  border: 1px solid #e1b86a70;
  border-radius: 11px;
  background:
    linear-gradient(180deg, #ffffff14, transparent 45%, #1d0c0775),
    repeating-linear-gradient(96deg, #87512c 0 15px, #764325 16px 31px, #8f5931 32px 47px);
  box-shadow: inset 0 1px #ffe5b75c, inset 0 -4px 8px #29130daa, 0 6px 12px #031a117d;
  text-shadow: 0 1px 1px #28140c;
}
.spacious-table .player.active .player-nameplate {
  border-color: #ffe49c;
  box-shadow:
    inset 0 1px #fff1c2aa,
    inset 0 -4px 8px #29130daa,
    0 0 0 3px #f5cf705c,
    0 0 24px #ffd66c8a;
  animation: seat-glow 1.55s ease-in-out infinite alternate;
}
@keyframes seat-glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.12); }
}
.spacious-table .player .avatar {
  width: 34px;
  height: 34px;
  border: 1px solid #f1d89c;
  background: #ead6ae;
  color: #5b321c;
  box-shadow: inset 0 0 0 2px #5f371d26;
  text-shadow: none;
}
.spacious-table .player-info { min-width: 0; flex: 1; }
.spacious-table .player-name { color: #fff7e5; font-size: 12px; }
.spacious-table .player-detail { color: #dfcba9; font-size: 9px; }
.spacious-table .player-opening { color: #f2d98c; font-size: 9px; }
.spacious-table .player-score {
  margin: 0;
  align-self: flex-start;
  padding: 2px 5px;
  border-radius: 9px;
  color: #f6e8ca;
  background: #29160e73;
  font-size: 10px;
  text-shadow: none;
}
.player-card-count {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 5;
  min-width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff0ca;
  border-radius: 50%;
  color: #3c2818;
  background: #e7c77c;
  box-shadow: 0 3px 7px #1a0c0788;
  font: 700 11px/1 'Segoe UI', sans-serif;
  text-shadow: none;
}
.spacious-table .player-fixed-penalty {
  color: #ffe0d2;
  background: #6f201f;
  text-shadow: none;
}
.spacious-table .player-meld-count {
  display: inline-flex;
  width: max-content;
  margin: 4px 0 0;
  padding: 3px 7px;
  border: 1px solid #efcf7d73;
  border-radius: 10px;
  color: #fff0ba;
  background: #2a160c70;
  text-decoration: none;
  font-size: 8px;
  line-height: 1.2;
  box-shadow: inset 0 1px #ffffff13;
}
.spacious-table .player-meld-count:hover { color: #fff; border-color: #ffe09b; background: #1c0e087d; }
.opponent-hand {
  position: absolute;
  z-index: 1;
  width: 132px;
  height: 50px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.opponent-card-back {
  position: absolute;
  left: 50%;
  width: 30px;
  height: 43px;
  border: 2px solid #eee2ca;
  border-radius: 4px;
  background:
    radial-gradient(circle, #d4bd7d 0 1px, transparent 1.5px) 0 0/6px 6px,
    linear-gradient(135deg, #8d3031, #4d171d);
  box-shadow: 0 2px 5px #07170f8c, inset 0 0 0 2px #f2dec233;
  transform: translateX(calc(-50% + var(--card-center) * 11px)) rotate(calc(var(--card-center) * 1.6deg));
}
.spacious-table .player.seat-top { top: 18px; }
.spacious-table .player.seat-bottom { bottom: 30px; }
.seat-top .opponent-hand { top: 57px; }
.spacious-table .player.seat-left,
.spacious-table .player.seat-right {
  top: 50%;
  width: 138px;
  padding: 0;
  border-radius: 11px;
  flex-wrap: nowrap;
}
.spacious-table .player.seat-left { left: 2px; }
.spacious-table .player.seat-right { right: 2px; }
.spacious-table .player.seat-left .player-nameplate,
.spacious-table .player.seat-right .player-nameplate {
  min-height: 110px;
  padding: 9px 25px 9px 8px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.spacious-table .player.seat-left .player-info,
.spacious-table .player.seat-right .player-info { order: initial; flex-basis: auto; }
.seat-left .opponent-hand,
.seat-right .opponent-hand {
  top: 50%;
  width: 52px;
  transform: translateY(-50%);
}
.seat-left .opponent-hand { left: 126px; }
.seat-right .opponent-hand { left: auto; right: 126px; }
.seat-left .opponent-card-back,
.seat-right .opponent-card-back {
  left: 0;
  transform: translateY(calc(-50% + var(--card-center) * 8px)) rotate(calc(90deg + var(--card-center) * 1.2deg));
}
.seat-left .opponent-card-back { top: 50%; }
.seat-right .opponent-card-back { top: 50%; }

/* Current-turn marker follows the player without covering cards or melds. */
.player-turn-arrow { width: 26px; height: 32px; z-index: 7; }
.seat-top .player-turn-arrow { bottom: -78px; }
.seat-bottom .player-turn-arrow { top: -40px; }
.seat-left .player-turn-arrow { right: -61px; }
.seat-right .player-turn-arrow { left: -61px; }

/* Quiet, central game controls. */
.table-toolbar {
  min-height: 200px;
  gap: 8px 18px;
  align-self: center;
}
.spacious-table .draw-zone { gap: 26px; }
.table-toolbar .table-turn {
  max-width: 360px;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #edd58c28;
  border-radius: 18px;
  color: #f0ead5;
  background: #052d20a1;
  box-shadow: inset 0 1px #ffffff0d;
}
.table-turn small { color: #9ebc9d; }
.pile-label { color: #e2d5b1; text-shadow: 0 1px #061d14; }
.discard-count, .stock-count {
  border-color: #f0dfb3;
  color: #382719;
  background: #dfc27d;
  box-shadow: 0 2px 5px #081a1280;
}
.draw-drag-source { cursor: grab; touch-action: none; }
.draw-drag-source:active,
.draw-source-active { cursor: grabbing; }
.draw-pull-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  width: 56px;
  height: 82px;
  pointer-events: none;
  filter: drop-shadow(0 16px 14px rgba(8, 20, 14, .42));
  will-change: transform;
}
.draw-pull-ghost .card { width: 56px; height: 82px; }
.draw-pull-ghost .card-corner { font-size: 15px; }
.draw-pull-ghost .card-center { font-size: 23px; }
.hand-move-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  width: 56px;
  height: 82px;
  pointer-events: none;
  filter: drop-shadow(0 16px 14px rgba(8, 20, 14, .42));
  will-change: transform;
}
.hand-move-ghost .card {
  width: 56px !important;
  height: 82px !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
}
.hand-move-ghost .card-corner { font-size: 15px; }
.hand-move-ghost .card-center { font-size: 23px; }
.draw-insert-marker {
  position: fixed;
  z-index: 1199;
  width: 6px;
  display: none;
  pointer-events: none;
  border-radius: 4px;
  background: #ffd76d;
  box-shadow: 0 0 0 3px #4b2c17, 0 0 18px 6px #ffd76d8f;
}
.draw-insert-marker.visible { display: block; animation: insert-marker-pulse .65s ease-in-out infinite alternate; }
.draw-insert-marker span {
  position: absolute;
  left: 50%;
  top: -23px;
  transform: translateX(-50%);
  padding: 4px 7px;
  border: 1px solid #ffe7aa;
  border-radius: 9px;
  color: #3a2515;
  background: #f2cf78;
  box-shadow: 0 3px 8px #180a067d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
}
@keyframes insert-marker-pulse { to { filter: brightness(1.18); transform: scaleX(1.18); } }
.draw-drag-source:hover .card {
  filter: brightness(1.06);
  box-shadow: 0 0 0 3px #ebca7369, 0 7px 14px #00180f85 !important;
}
.drawing-card .rack.can-draw-drop {
  border-radius: 10px;
  outline: 1px dashed #f2cf79a8;
  outline-offset: 5px;
  background: #160b0738;
}
.reordering-card .rack {
  border-radius: 10px;
  outline: 1px dashed #f2cf79a8;
  outline-offset: 5px;
  background: #160b0738;
}
.player-rack-panel .rack .card { touch-action: none; }
.drawing-card .rack.can-draw-drop::after {
  content: 'Kartı istediğin aralığa bırak';
  position: sticky;
  right: 8px;
  align-self: center;
  flex: 0 0 auto;
  margin-left: 9px;
  padding: 6px 9px;
  border-radius: 14px;
  color: #3c2815;
  background: #efd18b;
  box-shadow: 0 3px 8px #190b0780;
  font-size: 9px;
  white-space: nowrap;
}
.rack.draw-over {
  outline: 3px solid #f2cf79 !important;
  box-shadow: inset 0 0 24px #f1c96e2e;
}
.rack.draw-over .drop-target { outline: 3px solid #e9b94e; outline-offset: 2px; }
.draw-reveal {
  position: absolute;
  left: 50%;
  bottom: 74px;
  z-index: 18;
  min-width: 126px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: 'label label' 'card name';
  align-items: center;
  gap: 5px 10px;
  padding: 10px 13px;
  border: 1px solid #f1d58b;
  border-radius: 13px;
  color: #fff2d2;
  background: linear-gradient(145deg, #70411fef, #321b11f2);
  box-shadow: inset 0 1px #fff0c359, 0 12px 25px #00170fb8, 0 0 24px #efc86a3f;
  transform: translateX(-50%);
  pointer-events: none;
  animation: draw-reveal-in 1.25s cubic-bezier(.18,.72,.25,1) both;
}
.draw-reveal-label {
  grid-area: label;
  color: #d9c49b;
  font-size: 8px;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.draw-reveal .card {
  grid-area: card;
  width: 48px;
  height: 70px;
  box-shadow: 0 4px 8px #1608038a;
}
.draw-reveal .card-corner { font-size: 14px; }
.draw-reveal .card-center { font-size: 22px; }
.draw-reveal > b { grid-area: name; font: 18px Georgia, serif; }
@keyframes draw-reveal-in {
  0% { opacity: 0; transform: translate(-50%, -15px) scale(.82) rotate(-4deg); }
  18%, 78% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, 10px) scale(.96); }
}
.player-rack-panel .rack .card.just-drawn {
  animation: just-drawn-glow 1.25s ease-out both;
}
@keyframes just-drawn-glow {
  0%, 75% { outline: 3px solid #ffd66e; box-shadow: 0 0 0 5px #ffd66e55, 0 8px 13px #1d0b0780; filter: brightness(1.1); }
  100% { outline-color: transparent; box-shadow: 0 6px 10px #1d0b0780; filter: none; }
}
.spacious-table .meld {
  background: #062b20a8;
  border-color: #e5d09942;
  box-shadow: 0 2px 6px #00180f5c;
}
.meld-heading { color: #fff1d0; text-shadow: 0 1px #071b13; }
.meld-heading span { color: #e0c886; }

/* Bottom player console is connected to the wooden table rail. */
.card-game-shell .player-rack-panel {
  position: relative;
  z-index: 9;
  width: calc(100% - 36px);
  margin: -36px auto 0;
  padding: 18px 20px 14px;
  border: 1px solid #d7a75f6b;
  border-radius: 18px 18px 8px 8px;
  color: #f8ead0;
  background:
    linear-gradient(180deg, #ffffff12, transparent 28%, #1b0c0878),
    repeating-linear-gradient(94deg, #7f4a28 0 19px, #6f3f23 20px 38px, #87532e 39px 57px);
  box-shadow: inset 0 2px #f2c9805c, inset 0 -8px 15px #2a140db5, 0 12px 25px #160b078a;
  display: flex;
  flex-direction: column;
}
.player-rack-panel::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid #f2d49a24;
  border-radius: 12px 12px 5px 5px;
  pointer-events: none;
}
.player-rack-panel .hand-heading { margin-bottom: 4px; }
.player-rack-panel .hand-heading { order: 1; }
.player-rack-panel .drawn-card { order: 2; }
.player-rack-panel .hand-actions { order: 3; }
.player-rack-panel .rack { order: 4; }
.player-rack-panel .hand-help { order: 5; }
.player-rack-panel .hand-heading h3 { color: #fff4dc; font: 600 12px Georgia, serif; }
.player-rack-panel .hand-meta,
.player-rack-panel .hand-help { color: #ddc9a9; }
.player-rack-panel .layout-score {
  color: #3f2c1b;
  border: 1px solid #f4dda3;
  background: #e5ca8b;
  box-shadow: inset 0 1px #fff5d1;
}
.player-rack-panel .bottom-match { background: #efd79b; }
.player-rack-panel .subtle-button { color: #fff0cf; }
.player-rack-panel .subtle-button:hover { color: white; background: #2a150c42; }
.player-rack-panel .inspection-button {
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 6px 10px;
  border: 1px solid #efd3918a;
  border-radius: 14px;
  color: #fff3cf;
  background: #2d190f6e;
  box-shadow: inset 0 1px #fff1c229;
}
.player-rack-panel .inspection-button::before { content: '◉'; margin-right: 6px; color: #f1cf78; }
.player-rack-panel .rack {
  min-height: 123px;
  align-items: flex-start;
  padding: 21px 10px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-color: #d0ad68 #3a2115;
}
.player-rack-panel .rack .card {
  width: 68px;
  height: 99px;
  margin-left: -12px;
  transform-origin: 50% 120%;
  transform: translateY(calc(var(--fan-distance) * .65px)) rotate(calc(var(--fan-index) * .65deg));
  transition: transform .15s ease, border-color .15s, filter .15s;
  box-shadow: 0 6px 10px #1d0b0780;
}
.player-rack-panel .rack .card:first-child { margin-left: 0; }
.player-rack-panel .rack .card:hover {
  transform: translateY(calc(var(--fan-distance) * .45px - 10px)) rotate(calc(var(--fan-index) * .35deg));
  filter: brightness(1.03);
  z-index: 20;
}
.player-rack-panel .rack .card.selected {
  transform: translateY(calc(var(--fan-distance) * .35px - 17px)) rotate(calc(var(--fan-index) * .25deg));
  border: 3px solid #e7bd5e;
  box-shadow: 0 0 0 3px #ffde8290, 0 10px 14px #1b090682;
  z-index: 21;
}
.player-rack-panel .rack .card.group-end { margin-right: 15px; }
.player-rack-panel .hand-help {
  margin: 2px 0 7px;
  padding: 0 7px;
}
.player-rack-panel .hand-actions {
  border-top-color: #e7c98838;
  padding-top: 9px;
}
.player-rack-panel .hand-actions .btn {
  min-height: 42px;
  border: 1px solid #dfbd7f78;
  border-radius: 8px;
  color: #fff1d5;
  background: linear-gradient(#a16939, #71401f);
  box-shadow: inset 0 1px #ffe4ae69, 0 3px 5px #1b0b0773;
  text-shadow: 0 1px #2d160d;
}
.player-rack-panel .hand-actions .btn:hover:not(:disabled) { background: linear-gradient(#ad7541, #7a4523); }
.player-rack-panel .hand-actions .btn-primary,
.player-rack-panel .hand-actions .btn-gold {
  color: #382313;
  border-color: #ffe2a5;
  background: linear-gradient(#f0d391, #c79648);
  text-shadow: 0 1px #fff0c4;
}
.player-rack-panel .hand-actions .btn:disabled {
  color: #b5a78e;
  border-color: #9b794d3d;
  background: #3b251a85;
  box-shadow: inset 0 1px #ffffff10;
  opacity: .68;
}

/* The score/activity side panel belongs to the same room instead of floating as a web table. */
.card-game-shell .right-panel {
  color: #eadfc8;
  border-left: 1px solid #b7894e4f;
  background:
    linear-gradient(#140c09b0, #20120dd4),
    repeating-linear-gradient(92deg, #4b2d1d 0 20px, #3d2418 21px 39px);
  box-shadow: inset 8px 0 22px #12090675;
}
.card-game-shell .right-panel .panel-heading h3,
.card-game-shell .right-panel .score-name,
.card-game-shell .right-panel .score-value { color: #f6e9ce; }
.card-game-shell .right-panel .panel-heading small,
.card-game-shell .right-panel .score-rule,
.card-game-shell .right-panel .activity-item { color: #c4b292; }
.card-game-shell .right-panel .activity-tabs button { color: #bfa981; }
.card-game-shell .right-panel .activity-tabs button.active { color: #f5d98e; border-color: #d6ae5d; }
.card-game-shell .right-panel .panel-divider,
.card-game-shell .right-panel .score-rule { border-color: #c29b6242; background-color: transparent; }
.card-game-shell .right-panel .tip-card { color: #d4c29e; border-color: #bd965657; background: #160c0857; }
.card-game-shell .right-panel .tip-card b { color: #f0d58e; }

/* Between hands the table stays in place; only its centre becomes a deal panel. */
.cut-game-shell .player-card-count,
.cut-game-shell .opponent-hand { display: none; }
.cut-game-shell .player.active .player-nameplate::after {
  content: 'DESTEYİ KESİYOR';
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: max-content;
  padding: 3px 8px;
  border-radius: 9px;
  color: #39230f;
  background: #f0cf7d;
  box-shadow: 0 2px 6px #07190f80;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .8px;
  text-shadow: none;
}
.cut-table-surface {
  min-height: clamp(455px, calc(100vh - 245px), 650px) !important;
}
.cut-table-center {
  grid-area: center;
  position: relative;
  z-index: 4;
  justify-self: center;
  align-self: center;
  width: min(720px, 80vw);
  min-height: 245px;
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 25px 28px;
  border: 1px solid #e2c16c72;
  border-radius: 20px;
  color: #f7ecd5;
  background:
    linear-gradient(135deg, #0d3b2dd9, #05291fde),
    repeating-linear-gradient(45deg, transparent 0 8px, #ffffff05 9px 10px);
  box-shadow:
    inset 0 1px #fff2bc2b,
    inset 0 0 36px #001b12a1,
    0 14px 35px #00160e9c;
  backdrop-filter: blur(2px);
}
.cut-table-center::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid #ddc47a21;
  border-radius: 14px;
  pointer-events: none;
}
.cut-deck {
  position: relative;
  width: 112px;
  height: 142px;
  justify-self: center;
}
.cut-deck .card {
  position: absolute;
  left: 25px;
  top: 24px;
  width: 67px;
  height: 98px;
  box-shadow: 0 7px 15px #00150d91;
}
.cut-deck .card:nth-child(1) { transform: translate(-18px, 7px) rotate(-12deg); }
.cut-deck .card:nth-child(2) { transform: translate(0, -3px) rotate(1deg); }
.cut-deck .card:nth-child(3) { transform: translate(18px, 7px) rotate(12deg); }
.cut-deck .card-back::after { inset: 30px 13px; }
.cut-copy { min-width: 0; }
.cut-kicker {
  color: #d7bf83;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
}
.cut-copy h2 {
  margin: 5px 0 13px;
  color: #fff4d9;
  font: 30px Georgia, serif;
}
.cut-copy > p {
  max-width: 515px;
  margin: 12px 0;
  color: #c5d3bd;
  font-size: 10px;
  line-height: 1.6;
}
.cut-roles { display: flex; flex-wrap: wrap; gap: 8px; }
.cut-roles > span {
  min-width: 130px;
  display: grid;
  gap: 1px;
  padding: 7px 11px;
  border: 1px solid #ead5972b;
  border-radius: 8px;
  background: #001e153d;
}
.cut-roles small { color: #9bb29d; font-size: 8px; }
.cut-roles b { color: #f5dfaa; font-size: 11px; }
.cut-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}
.cut-action > span { color: #aabda9; font-size: 9px; }
.cut-action .btn {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 10px 18px;
  border: 1px solid #ffe6ac;
  color: #3c2815;
  background: linear-gradient(#f1d793, #c99a4d);
  box-shadow: inset 0 1px #fff6d2, 0 4px 9px #00170fa8;
}
.cut-waiting {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 13px;
  border-radius: 18px;
  color: #f0dfb8;
  background: #001c144d;
  font-size: 10px;
}
.cut-waiting-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e6c46c;
  box-shadow: 0 0 0 4px #e6c46c24;
  animation: seat-glow .8s ease-in-out infinite alternate;
}
.cut-online-tools { display: flex; gap: 6px; margin-top: 12px; }
.cut-online-tools .btn { min-height: 32px; padding: 6px 10px; font-size: 9px; }

@media (min-width: 1500px) {
  .card-table-scene { padding-left: 88px; padding-right: 88px; }
  .spacious-table .table-felt.table-surface { min-height: 590px; }
  .player-rack-panel .rack .card { width: 74px; height: 108px; margin-left: -9px; }
}

@media (max-width: 1300px) {
  .card-game-shell .game-board { padding-left: 10px; padding-right: 10px; }
  .card-table-scene { padding-left: 67px; padding-right: 67px; }
  .spacious-table .table-felt.table-surface { padding-left: 80px; padding-right: 80px; }
}

@media (min-width: 701px) and (max-height: 820px) {
  .card-table-scene { min-height: 420px; padding-top: 42px; padding-bottom: 62px; }
  .spacious-table .table-felt.table-surface {
    min-height: 340px;
    padding-top: 52px;
    padding-bottom: 50px;
    grid-template-rows: minmax(48px, auto) minmax(145px, 1fr) minmax(48px, auto);
  }
  .card-game-shell .player-rack-panel { margin-top: -34px; }
  .spacious-table .player.seat-bottom { bottom: 30px; }
  .player-rack-panel .rack { min-height: 95px; padding-top: 12px; }
  .player-rack-panel .rack .card { width: 60px; height: 86px; }
  .player-rack-panel .hand-help { margin-bottom: 2px; }
  .player-rack-panel .hand-help { display: none; }
  .player-rack-panel .hand-actions { padding-top: 5px; }
}

@media (max-width: 700px) {
  .card-game-shell { min-height: calc(100dvh - 128px); }
  .card-game-shell .game-board { padding: 3px 0 12px; overflow: hidden; }
  .card-game-shell .game-hud {
    width: calc(100% - 18px);
    min-height: 34px;
    margin-bottom: -7px;
    padding: 6px 9px;
    gap: 6px;
  }
  .card-game-shell .game-hud .round-label { font-size: 15px; }
  .card-game-shell .game-hud .pill { padding: 5px 7px; font-size: 8px; }
  .card-table-scene {
    min-height: 500px;
    padding: 45px 35px 66px;
  }
  .card-table-scene::before { inset: 19px 7px 15px; border-radius: 27px; }
  .card-table-scene::after { inset: 28px 15px 26px; border-radius: 20px; }
  .spacious-table .table-felt.table-surface {
    min-height: 420px;
    padding: 65px 44px 62px;
    border-radius: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(138px, 1.5fr) minmax(0, 1fr);
    grid-template-areas: 'top top top' 'left center right' 'bottom bottom bottom';
    grid-template-rows: minmax(55px, auto) minmax(190px, 1fr) minmax(55px, auto);
    gap: 7px;
  }
  .spacious-table .table-felt.table-surface::before { inset: 7px; border-radius: 11px; }
  .spacious-table .player { width: 144px; }
  .spacious-table .player-nameplate { min-height: 51px; padding: 5px 25px 5px 6px; gap: 5px; }
  .spacious-table .player .avatar { width: 27px; height: 27px; font-size: 12px; }
  .spacious-table .player-name { font-size: 9px; }
  .spacious-table .player-detail,
  .spacious-table .player-opening { font-size: 7px; }
  .spacious-table .player-score { font-size: 8px; }
  .player-card-count { top: -7px; right: -7px; min-width: 23px; height: 23px; font-size: 9px; }
  .spacious-table .player.seat-left,
  .spacious-table .player.seat-right { width: 68px; }
  .spacious-table .player.seat-left { left: 2px; }
  .spacious-table .player.seat-right { right: 2px; }
  .spacious-table .player.seat-left .player-nameplate,
  .spacious-table .player.seat-right .player-nameplate { min-height: 100px; padding: 6px 15px 6px 4px; }
  .spacious-table .player.seat-left .avatar,
  .spacious-table .player.seat-right .avatar { width: 25px; height: 25px; }
  .spacious-table .player.seat-left .player-detail,
  .spacious-table .player.seat-right .player-detail { display: none; }
  .spacious-table .player.seat-top { top: 12px; }
  .spacious-table .player.seat-bottom { bottom: 31px; }
  .seat-top .opponent-hand { top: 48px; }
  .opponent-hand { width: 100px; }
  .opponent-card-back { width: 23px; height: 34px; transform: translateX(calc(-50% + var(--card-center) * 7px)) rotate(calc(var(--card-center) * 1.3deg)); }
  .seat-left .opponent-hand { left: 62px; }
  .seat-right .opponent-hand { right: 62px; }
  .seat-left .opponent-card-back,
  .seat-right .opponent-card-back { transform: translateY(calc(-50% + var(--card-center) * 5px)) rotate(calc(90deg + var(--card-center) * 1deg)); }
  .seat-top .player-turn-arrow { bottom: -67px; }
  .seat-left .player-turn-arrow { right: -43px; }
  .seat-right .player-turn-arrow { left: -43px; }
  .table-toolbar { min-height: 188px; max-width: 230px; }
  .table-toolbar .table-turn { padding: 5px 8px; font-size: 9px; }
  .table-surface .table-monogram { display: none; }
  .spacious-table .meld .card.tiny { width: 29px; height: 43px; }
  .spacious-table .meld .card.tiny .card-corner { font-size: 12px; left: 3px; top: 3px; }
  .spacious-table .meld .card.tiny .card-corner small { font-size: 11px; }
  .spacious-table .meld .card.tiny:not(.joker) .card-center { font-size: 14px; }
  .card-game-shell .player-rack-panel {
    width: calc(100% - 12px);
    margin-top: -34px;
    padding: 13px 8px 9px;
    border-radius: 14px 14px 6px 6px;
  }
  .player-rack-panel .hand-heading { gap: 4px; }
  .player-rack-panel .hand-heading .spacer { display: none; }
  .player-rack-panel .layout-score { padding: 4px 6px; font-size: 8px; }
  .player-rack-panel .subtle-button { margin-left: auto; padding: 5px; font-size: 9px; }
  .player-rack-panel .inspection-button { order: 4; margin-left: 0; padding: 5px 8px; }
  .player-rack-panel .rack {
    min-height: 102px;
    justify-content: center;
    padding: 17px 0 4px;
    overflow-x: auto;
  }
  .player-rack-panel .rack .card {
    width: 53px;
    height: 81px;
    margin-left: -27px;
    transform: translateY(calc(var(--fan-distance) * .45px)) rotate(calc(var(--fan-index) * .48deg));
  }
  .player-rack-panel .rack .card:first-child { margin-left: 0; }
  .player-rack-panel .rack .card.group-end { margin-right: 5px; }
  .player-rack-panel .rack .card:hover { transform: translateY(calc(var(--fan-distance) * .3px - 7px)) rotate(calc(var(--fan-index) * .25deg)); }
  .player-rack-panel .rack .card.selected { transform: translateY(calc(var(--fan-distance) * .25px - 13px)) rotate(calc(var(--fan-index) * .2deg)); }
  .player-rack-panel .hand-help span:last-child { display: none; }
  .player-rack-panel .hand-actions { gap: 5px; }
  .player-rack-panel .hand-actions .btn { flex: 1 1 auto; min-height: 39px; padding: 8px 9px; font-size: 9px; }
  .player-rack-panel .hand-actions .move-card { flex: 0 0 31px; }
  .drawing-card .rack.can-draw-drop::after { display: none; }
  .draw-reveal { bottom: 60px; padding: 7px 9px; }
  .draw-reveal .card { width: 42px; height: 62px; }
  .cut-table-scene { min-height: 500px; padding-left: 35px; padding-right: 35px; }
  .cut-table-surface { min-height: 420px !important; }
  .cut-table-center {
    width: min(330px, 88vw);
    min-height: 255px;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 15px;
    border-radius: 15px;
  }
  .cut-deck { width: 68px; height: 104px; }
  .cut-deck .card { left: 11px; top: 19px; width: 48px; height: 70px; }
  .cut-deck .card:nth-child(1) { transform: translate(-8px, 5px) rotate(-10deg); }
  .cut-deck .card:nth-child(3) { transform: translate(8px, 5px) rotate(10deg); }
  .cut-deck .card-back::after { inset: 22px 9px; font-size: 14px; }
  .cut-copy h2 { margin-bottom: 9px; font-size: 22px; }
  .cut-copy > p { display: none; }
  .cut-roles { display: grid; gap: 5px; }
  .cut-roles > span { min-width: 0; padding: 5px 8px; }
  .cut-action { display: grid; gap: 7px; }
  .cut-action .btn { width: 100%; padding: 8px 10px; font-size: 9px; }
}
