/* 32a: a single usable table with persistent score and selection feedback. */
body { overflow: auto; background: #0b1112; }
.game-stage { height: auto; min-height: 100svh; overflow: visible; display: block; background: #0b1112; }
.game-stage::after, .table-light { display: none; }
.game-ambience { position: fixed; opacity: .38; filter: saturate(.6); background: linear-gradient(90deg,#0b1112e8,#0b1112b8),url('assets/klucznik-hero-web-29c.webp') center/cover; }
.game-topbar { max-width: 1420px; margin: auto; padding: 24px 36px; border-bottom: 1px solid #af967433; }
.game-brand { letter-spacing: 0; }
.game-brand strong { font-size: 21px; }
.game-brand small { font-size: 10px; letter-spacing: 0; margin-top: 7px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.return-link, .audio-toggle { border: 0; background: transparent; font: 12px system-ui,sans-serif; color: #c7b79e; padding: 10px; min-height: 44px; cursor: pointer; }
.game-shell { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 30px; max-width: 1340px; margin: auto; padding: 34px 36px 50px; height: auto; align-items: start; }
.story-panel { display: none; }
.game-card { width: 100%; min-width: 0; max-width: none; min-height: 0; padding: 28px; border-radius: 8px; border: 1px solid #9e89664d; background: #142522; box-shadow: 0 22px 70px #0005,inset 0 0 50px #0002; overflow: visible; }
.board-heading { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:22px; }
.board-heading h1 { font: 32px/1.15 Georgia,serif; margin:8px 0 0; color:#ebdcc5; letter-spacing:0; text-transform:none; }
.eyebrow { font:10px/1.5 system-ui,sans-serif; letter-spacing:0; color:#a9b7ad; margin:0; }
.round-counter { font:12px system-ui,sans-serif; color:#acb5aa; white-space:nowrap; }
.round-counter strong { display:block; text-align:right; font:28px Georgia,serif; color:#eddfc7; margin-top:6px; }
.live-stats { display:flex; justify-content:space-between; gap:12px; padding:14px 0; border-block:1px solid #b2a07c33; font:12px system-ui,sans-serif; color:#afbab0; }
.live-stats strong { margin-left:8px; font-size:16px; color:#e6d7bc; }
.game-tabs { margin:20px 0 24px; display:flex; gap:22px; border-bottom:1px solid #b2a07c33; padding:0; background:none; }
.tab { border:0; border-radius:0; background:none; box-shadow:none; padding:10px 0; min-height:42px; font:13px system-ui,sans-serif; letter-spacing:0; text-transform:none; color:#aab7af; }
.tab.is-active { color:#f2dcc0; border-bottom:2px solid #dfbd85; background:none; box-shadow:none; }
.view-game { padding:0; }
.key-grid { grid-template-columns:repeat(9,minmax(0,1fr)); gap:8px; padding:6px 0 18px; perspective:800px; }
.key-tile { min-height:0; height:104px; aspect-ratio:auto; border-radius:5px; background:linear-gradient(110deg,#ecdbb5,#c2a574); color:#342e23; border:1px solid #dec391; box-shadow:inset 0 0 0 3px #775b3a33,0 5px 0 #806642,0 10px 12px #0004; padding:10px 3px; }
.key-number { font:34px/1 Georgia,serif; }
.key-icon { transform:scale(.6); margin:0; height:28px; }
.key-tile::before { inset:5px; border-radius:2px; }
.key-tile.is-selected { background:#e2f0d7; color:#23382b; box-shadow:inset 0 0 0 2px #efffe0,0 5px 0 #88a17c,0 10px 20px #0004; transform:translateY(-6px); }
.key-tile:disabled:not(.is-closed) { opacity:.78; cursor:default; }
.key-tile.is-closed { transform:rotateX(68deg); transform-origin:center 85%; opacity:.3; background:#64796e; box-shadow:none; }
.felt-zone { min-height:210px; height:auto; display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:24px; background:none; border:0; border-radius:0; padding:22px 12px; box-shadow:none; }
.dice-tray { display:flex; justify-content:center; gap:24px; min-height:110px; padding:15px; border:0; background:none; box-shadow:none; }
.die { width:70px; height:70px; flex:0 0 70px; border-radius:12px; }
.status-plaque { background:none; box-shadow:none; border:0; padding:0; min-height:140px; text-align:left; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; }
.status-label { font:11px system-ui,sans-serif; letter-spacing:0; color:#a9b8ad; }
.roll-value { font:60px/1.15 Georgia,serif; color:#eddfc7; }
.game-message { font:14px/1.6 system-ui,sans-serif; letter-spacing:0; text-transform:none; color:#c2cfc4; max-width:270px; min-height:45px; }
.selection-line { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-block:1px solid #a7bd9e33; font:12px system-ui,sans-serif; color:#afbbb0; min-height:62px; }
.selection-equation { color:#f2dfbd; font-size:17px; }
.selection-line.is-match .selection-rest { color:#c6e8ab; }
.game-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding-top:20px; margin:0; }
.primary-action,.secondary-action,.ghost-action { min-height:48px; border-radius:5px; font:14px system-ui,sans-serif; letter-spacing:0; text-transform:none; cursor:pointer; }
.primary-action { background:#d8bb83; color:#19221b; border:1px solid #e7cea2; box-shadow:0 3px 0 #8b7856; }
.secondary-action { background:#c4d6b2; color:#1c2c23; border:1px solid #d8e8c5; box-shadow:0 3px 0 #73866a; }
button:disabled { opacity:.35; cursor:not-allowed; box-shadow:none; }
.ghost-action { background:transparent; border:1px solid #a3b29833; color:#c5cfc3; box-shadow:none; }
.motion-action { display:none; }
.dealer-panel { display:block; padding:0; background:none; border:0; box-shadow:none; height:auto; align-self:start; }
.dealer-portrait { height:310px; width:100%; border-radius:4px; border:1px solid #b8a27644; background:url('assets/klucznik-hero-web-29c.webp') 64% 40% / auto 160%; box-shadow:none; }
.dealer-copy { padding:22px 0; background:none; border:0; }
.dealer-line { font:19px/1.6 Georgia,serif; color:#cbbca3; }
.rules-view,.scores-view { min-height:420px; padding:0; font:15px/1.8 system-ui,sans-serif; }
.rules-view h2,.scores-view h2 { font:28px Georgia,serif; }
.score-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.score-grid article { padding:18px 8px; background:none; border:0; border-bottom:1px solid #a3b29855; }
dialog { width:min(440px,calc(100% - 32px)); border:1px solid #b49d7466; border-radius:8px; padding:30px; background:#162620; color:#ebdcc4; box-shadow:0 25px 90px #0009; text-align:center; }
dialog::backdrop { background:#050a0cbb; backdrop-filter:blur(5px); }
dialog h2 { font:28px/1.3 Georgia,serif; }
dialog p { font:14px/1.7 system-ui,sans-serif; color:#b6c3b7; }
dialog button { display:block; width:100%; margin-top:12px; }
.finish-score { display:block; font:76px/1 Georgia,serif; color:#dfc697; }
button:focus-visible,a:focus-visible { outline:2px solid #e9d6a7; outline-offset:4px; }
@media(max-width:1050px) { .game-shell { grid-template-columns:minmax(0,1fr); max-width:850px; } .dealer-panel { display:none; } }
@media(max-width:600px) {
 .game-topbar { padding:14px 16px; gap:10px; } .game-brand strong { font-size:15px; } .game-brand small,.game-seal { display:none; } .header-actions { gap:0; } .return-link,.audio-toggle { font-size:11px; padding:8px; }
 .game-shell { padding:18px 12px 30px; } .game-card { padding:18px 12px; } .board-heading h1 { font-size:27px; } .board-heading { margin-bottom:16px; } .live-stats { gap:5px; font-size:10px; } .live-stats strong { margin-left:4px; font-size:14px; }
 .game-tabs { margin:10px 0 16px; } .key-grid { gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); } .key-tile { height:58px; padding:7px; display:flex; justify-content:center; gap:12px; } .key-number { font-size:25px; } .key-tile::before { inset:3px; } .key-icon { transform:scale(.45); width:20px; }
 .felt-zone { padding:10px 0; gap:12px; min-height:180px; } .dice-tray { gap:12px; padding:8px 0; } .die { width:52px; height:52px; flex-basis:52px; border-radius:9px; } .roll-value { font-size:48px; } .game-message { font-size:12px; } .status-plaque { min-height:145px; }
 .selection-line { flex-wrap:wrap; gap:8px; } .selection-equation { font-size:15px; } .selection-rest { font-size:11px; } .game-actions { padding-top:16px; } .rules-view,.scores-view { min-height:350px; } .score-grid { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; } }
@media(min-width:601px) and (max-height:850px) {
 .game-topbar { padding-block:16px; }
 .game-shell { padding-top:20px; }
 .game-card { padding:20px; }
 .board-heading { margin-bottom:12px; }
 .game-tabs { margin:10px 0 14px; }
 .key-tile { height:88px; }
 .felt-zone { min-height:155px; padding:10px; }
 .status-plaque { min-height:120px; }
 .game-actions { padding-top:12px; }
}
