:root{color-scheme:dark;--ink:#f6efd9;--muted:#b9ad98;--table:#17130f;--line:rgba(236,210,157,.17);--gold:#d7aa54;--gold-bright:#f3cf79;--shadow:0 16px 40px rgba(0,0,0,.32);--card-width:150px}
*{box-sizing:border-box}
body{margin:0;min-width:320px;min-height:100vh;overflow:hidden;color:var(--ink);background:radial-gradient(circle at 20% -10%,rgba(125,85,45,.25),transparent 34rem),radial-gradient(circle at 100% 30%,rgba(36,72,58,.22),transparent 40rem),var(--table);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,select{font:inherit}button:focus-visible,select:focus-visible{outline:3px solid var(--gold-bright);outline-offset:3px}h1,h2,h3,p{margin:0}
.grain{position:fixed;inset:0;pointer-events:none;opacity:.25;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E")}
.game-shell{position:relative;height:100vh;max-width:1500px;margin:0 auto;padding:12px 24px 92px;overflow:hidden}
.topbar{display:grid;grid-template-columns:auto minmax(360px,1fr) auto auto;align-items:center;gap:18px;min-height:67px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;place-items:center;width:40px;height:40px;color:#1d160e;border:1px solid #efca7b;border-radius:50%;background:linear-gradient(145deg,#f0cc78,#a8732c);box-shadow:inset 0 0 0 4px #372716;font-size:1.25rem}.brand h1{font-size:1.18rem;font-weight:600}.brand p{margin-top:1px;color:var(--muted);font-size:.69rem}
.resources{display:flex;flex-wrap:nowrap;justify-content:center;gap:6px}.resource{display:flex;align-items:center;gap:5px;min-width:47px;padding:6px 8px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.035)}.resource i{font-style:normal;font-size:1rem}.resource strong{font-size:.78rem;font-weight:500}
.counters{display:flex;align-items:center;border:1px solid var(--line);border-radius:11px;background:rgba(31,25,19,.76)}.counters>div{min-width:65px;padding:6px 12px;text-align:center}.counters>div+div{border-left:1px solid var(--line)}.counters span{display:block;color:var(--muted);font-size:.6rem;letter-spacing:.1em;text-transform:uppercase}.counters strong{font-size:1rem;font-weight:600}
.header-tools{position:relative;display:flex;align-items:center}.gear-button{width:39px;height:39px;color:var(--ink);border:1px solid transparent;background:transparent;cursor:pointer;font-size:1.05rem}.gear-button:hover,.gear-button[aria-expanded="true"]{color:var(--gold-bright);border-color:var(--line)}
.table-area{padding:13px 0 10px}.eyebrow{color:var(--gold);font-size:.67rem;letter-spacing:.15em;text-transform:uppercase}.board-scroll{overflow-x:hidden;overflow-y:hidden;padding:9px 2px 12px;scrollbar-color:#6b5336 transparent;scrollbar-width:thin}.card-grid{display:grid;grid-template-columns:repeat(var(--max-columns),var(--card-width));grid-auto-rows:auto;align-items:start;gap:10px;width:100%;min-width:0}.card-slot{width:var(--card-width);aspect-ratio:.63;border-radius:12px;transition:box-shadow .16s ease}.card-slot.drag-over{box-shadow:0 0 0 2px var(--gold-bright)}
.game-card{position:relative;isolation:isolate;width:100%;height:100%;overflow:hidden;color:var(--ink);border:1px solid rgba(227,196,132,.38);border-radius:12px;background:#211a13;box-shadow:0 9px 22px rgba(0,0,0,.34);cursor:grab;transition:border-color .18s ease,box-shadow .18s ease,opacity .18s ease}.game-card:active{cursor:grabbing}.game-card:hover{border-color:rgba(239,202,123,.78);box-shadow:0 0 0 1px rgba(239,202,123,.18),0 9px 22px rgba(0,0,0,.34)}.game-card.dragging{opacity:.28;transform:scale(.96)}
.card-art-full{position:absolute;z-index:-2;inset:0;width:100%;height:100%;object-fit:cover;background:#332a20}.card-shade{position:absolute;z-index:-1;inset:0;background:linear-gradient(180deg,rgba(7,6,5,.75),rgba(7,6,5,.05) 32%,rgba(7,6,5,.03) 63%,rgba(7,6,5,.67));pointer-events:none}
.card-header{position:absolute;top:0;right:0;left:0;display:grid;gap:2px;min-height:56px;padding:7px 8px 8px;background:rgba(43,43,43,.62);box-shadow:0 3px 10px #0005;backdrop-filter:blur(4px);text-shadow:0 1px 3px #000}.card-header-row{display:flex;align-items:center;justify-content:space-between;gap:7px}.card-kind{overflow:hidden;color:#f2ead7;font-size:.56rem;font-weight:400;letter-spacing:.13em;text-transform:uppercase;white-space:nowrap;text-overflow:ellipsis}.card-header-bottom{align-items:flex-end;padding-top:2px}.game-card .card-header h3{overflow:hidden;font-size:.84rem;font-weight:400;line-height:1.15;white-space:nowrap;text-overflow:ellipsis}.card-points{flex:0 0 auto;font-size:.67rem;font-weight:500}.state-pips{display:flex;gap:3px;padding:2px;border:0;border-radius:999px;background:transparent}.state-pips span{width:7px;height:7px;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:transparent}.state-pips .active{border-color:var(--gold-bright);background:var(--gold-bright)}button.state-pips{cursor:pointer}button.state-pips:hover{box-shadow:0 0 0 1px var(--gold-bright)}
.production-space{position:absolute;top:60px;right:0;left:0;display:flex;align-items:center;justify-content:flex-start;gap:2px;width:100%;min-height:42px;padding:6px 8px;color:#fff;border:0;background:transparent;cursor:pointer;text-align:left}.production-item{display:grid;place-items:center;width:25px;height:27px;padding:0;filter:drop-shadow(0 2px 3px #000);font-size:1rem;transition:transform .16s ease}.production-space:hover .production-item{transform:scale(1.12)}.static-production{right:auto;width:auto;min-height:0;font-size:1rem;text-shadow:0 2px 3px #000;cursor:default}
.effect-panel{position:absolute;right:8px;bottom:49px;left:8px;min-height:43px;padding:7px 8px;overflow:hidden;color:#f9f2df;border:1px solid rgba(255,245,215,.3);border-radius:6px;background:rgba(24,20,16,.54);box-shadow:0 3px 12px #0006;backdrop-filter:blur(4px);font-size:.62rem;font-weight:400;line-height:1.25;text-align:left}button.effect-panel{cursor:pointer}.effect-panel.active-effect:hover{border-color:rgba(255,226,145,.8);background:rgba(37,30,21,.72)}
.upgrade-panel{position:absolute;right:7px;bottom:7px;display:flex;align-items:center;gap:4px;min-height:34px;max-width:128px;padding:5px 7px;color:#fff1c7;border:1px solid rgba(242,201,111,.72);border-radius:7px;background:rgba(40,27,15,.88);box-shadow:0 3px 10px #0008;backdrop-filter:blur(4px);cursor:pointer}.upgrade-panel span{font-size:.86rem}.upgrade-panel strong{overflow:hidden;font-size:.69rem;font-weight:400;letter-spacing:-.04em;white-space:nowrap;text-overflow:ellipsis}.upgrade-panel:hover:not(:disabled){border-color:#ffe19a;background:rgba(92,62,25,.95)}.upgrade-panel:disabled{color:#b8ad97;border-color:rgba(180,169,147,.38);background:rgba(49,45,40,.72);cursor:not-allowed}.upgrade-panel:disabled span,.upgrade-panel:disabled strong{opacity:.78}
.empty-state{padding:80px 0;color:var(--muted);text-align:center}.flying-card{position:fixed;z-index:50;margin:0;pointer-events:none;transform-origin:center}
.action-dock{position:fixed;z-index:20;right:24px;bottom:10px;left:24px;display:flex;justify-content:space-between;align-items:center;max-width:1452px;height:70px;margin:auto;padding:9px 12px;border:1px solid rgba(230,194,122,.26);border-radius:15px;background:rgba(29,23,17,.94);box-shadow:var(--shadow);backdrop-filter:blur(16px)}.dock-side,.pile-zone{display:flex;align-items:center}.dock-side{gap:13px}.pile-zone{gap:10px}.pile-zone strong{font-size:.76rem;font-weight:500}.deck-stack{position:relative;display:grid;place-items:center;width:35px;height:47px;border:1px solid #d5ab5f;border-radius:5px;background:repeating-linear-gradient(45deg,#5b3f25,#5b3f25 5px,#2d241b 5px,#2d241b 10px);box-shadow:-3px 3px #1b1712,-5px 5px #6c5337}.deck-stack b{display:grid;place-items:center;width:22px;height:22px;color:#1e170e;border-radius:50%;background:var(--gold-bright);font-size:.69rem}.discard-pile{opacity:.64}.discard-stack{border-color:#837b6e;background:repeating-linear-gradient(-35deg,#494641,#494641 5px,#242321 5px,#242321 10px);box-shadow:2px 2px #181715,4px 4px #55514a;transform:rotate(3deg)}.discard-stack b{color:#e7e1d7;background:#55514a}
.draw-two{position:relative;width:46px;height:56px;color:#241a0d;border:1px solid #e2b962;border-radius:7px;background:linear-gradient(145deg,#f1cf7d,#c8943f);box-shadow:-3px 3px #332514;cursor:pointer;font-size:1.1rem;font-weight:700}.draw-two:disabled{cursor:not-allowed;filter:grayscale(.8);opacity:.45}.end-turn,.secondary-action,.upgrade-action{min-height:38px;padding:8px 13px;color:var(--ink);border:1px solid var(--line);border-radius:9px;background:#373027;cursor:pointer}.upgrade-action{color:#23190b;border-color:#dfb65e;background:linear-gradient(#f1cf80,#c99740)}.upgrade-action:disabled{color:#aaa39a;border-color:#5d5953;background:#44413d;cursor:not-allowed}.end-turn:disabled{opacity:.45;cursor:not-allowed}
dialog{width:min(1100px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto;color:var(--ink);border:1px solid rgba(232,199,130,.35);border-radius:17px;background:#1f1913;box-shadow:0 30px 90px #000}dialog::backdrop{background:rgba(7,6,5,.78);backdrop-filter:blur(7px)}.dialog-close{position:sticky;z-index:3;top:0;float:right;width:37px;height:37px;color:var(--ink);border:1px solid var(--line);border-radius:50%;background:#2e261d;font-size:1.3rem;cursor:pointer}.dialog-header{margin:7px 52px 18px 3px}.dialog-header h2{margin:4px 0;font-size:1.45rem;font-weight:550}.dialog-header p{color:var(--muted);font-size:.84rem}
.stage-gallery{clear:both;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.stage-card{overflow:hidden;border:1px solid var(--line);border-radius:13px;background:#2b241c}.stage-card.current{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(243,207,121,.18)}.stage-card.unreachable{opacity:.72}.stage-card img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover}.stage-card-body{padding:11px}.stage-label{color:var(--gold);font-size:.68rem;text-transform:uppercase;letter-spacing:.1em}.stage-card h3{margin:5px 0 8px;font-size:1rem;font-weight:500}.stage-card p{min-height:45px;color:var(--muted);font-size:.76rem;line-height:1.35}.card-stats{display:flex;min-height:22px;gap:5px;margin:6px 0}.stat-chip{padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.06);font-size:.74rem}.stage-card .upgrade-action{width:100%;margin-top:9px}
.upgrade-dialog{width:min(700px,calc(100vw - 28px));padding:23px}.upgrade-route{clear:both;display:grid;grid-template-columns:178px auto 178px;justify-content:center;align-items:center;gap:24px}.preview-label{display:block;margin-bottom:6px;color:var(--muted);font-size:.68rem;letter-spacing:.09em;text-align:center;text-transform:uppercase}.preview-card{width:178px;height:auto;aspect-ratio:.63;cursor:default}.preview-card:hover{transform:none}.route-arrow{color:var(--gold-bright);font-size:1.7rem}.upgrade-targets{display:flex;justify-content:center;gap:7px;margin:-4px 0 16px}.upgrade-choice{display:flex;align-items:center;gap:8px;padding:7px 10px;color:var(--ink);border:1px solid var(--line);border-radius:999px;background:#2b241c;cursor:pointer}.upgrade-choice span{font-size:.76rem}.upgrade-choice strong{color:var(--gold-bright);font-size:.78rem;font-weight:400}.upgrade-choice.selected{border-color:var(--gold-bright)}.upgrade-choice:disabled{opacity:.45;cursor:not-allowed}.static-upgrade{cursor:default}.upgrade-confirm-bar{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.choice-dialog{width:min(720px,calc(100vw - 28px));padding:23px}.discard-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.discard-choice{display:grid;grid-template-columns:80px 1fr;overflow:hidden;padding:0;color:var(--ink);border:1px solid var(--line);border-radius:10px;background:#2b241c;cursor:pointer;text-align:left}.discard-choice.selected{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(243,207,121,.14)}.discard-choice img{width:80px;height:68px;object-fit:cover}.discard-choice span{display:grid;align-content:center;gap:3px;padding:7px}.discard-choice small{color:var(--muted);font-size:.62rem;text-transform:uppercase}.discard-choice strong{font-size:.77rem;font-weight:500}
.rules-dialog,.settings-dialog{width:min(620px,calc(100vw - 28px));padding:25px}.rules-dialog h2,.settings-dialog h2{margin:5px 45px 14px 0;font-size:1.4rem;font-weight:550}.rules-dialog ol{padding-left:21px;color:#d9cfbe;line-height:1.55}.rules-dialog p,.settings-dialog p{color:var(--muted)}.settings-dialog label{display:block;margin:22px 0 7px;font-size:.8rem}.settings-dialog select{width:100%;padding:10px;color:var(--ink);border:1px solid var(--line);border-radius:8px;background:#30281f}
.round-transition[hidden]{display:none}.round-transition{position:fixed;z-index:100;inset:0;display:grid;place-items:center;background:radial-gradient(circle,rgba(61,45,25,.88),rgba(8,7,6,.97));animation:round-in .35s ease both}.round-transition.leaving{animation:round-out .32s ease both}.round-transition-copy{position:absolute;top:22%;display:grid;gap:7px;text-align:center}.round-transition-copy span{color:var(--gold);font-size:.78rem;letter-spacing:.18em;text-transform:uppercase}.round-transition-copy strong{font-size:1.8rem;font-weight:500}.shuffle-cards{position:relative;width:180px;height:210px;margin-top:80px}.shuffle-cards i{position:absolute;inset:0;margin:auto;width:112px;height:174px;border:2px solid #d2aa61;border-radius:9px;background:repeating-linear-gradient(45deg,#573d24,#573d24 8px,#241d16 8px,#241d16 16px);box-shadow:0 12px 25px #000;animation:shuffle 1.1s ease-in-out infinite}.shuffle-cards i:nth-child(2){animation-delay:.1s}.shuffle-cards i:nth-child(3){animation-delay:.2s}.shuffle-cards i:nth-child(4){animation-delay:.3s}.shuffle-cards i:nth-child(5){animation-delay:.4s}@keyframes shuffle{0%,100%{transform:translateX(0) rotate(0)}35%{transform:translateX(75px) rotate(12deg)}70%{transform:translateX(-42px) rotate(-7deg)}}@keyframes round-in{from{opacity:0}to{opacity:1}}@keyframes round-out{to{opacity:0}}
.toast{position:fixed;z-index:110;left:50%;bottom:90px;padding:10px 15px;color:var(--ink);border:1px solid rgba(236,204,140,.35);border-radius:9px;background:#30271d;box-shadow:var(--shadow);transform:translate(-50%,120px);opacity:0;transition:.25s ease}.toast.visible{transform:translate(-50%,0);opacity:1}

/* Karta se škáluje jako jeden celek podle skutečné šířky v aktivní zóně. */
.card-grid .game-card{border-radius:var(--cardRadius)}
.card-grid .card-header{gap:var(--headerGap);min-height:var(--headerHeight);padding:var(--headerPadTop) var(--headerPadSide) var(--headerPadBottom)}
.card-grid .card-header-row{gap:var(--rowGap)}
.card-grid .card-kind{font-size:var(--kindFont)}
.card-grid .card-header-bottom{padding-top:var(--headerGap)}
.card-grid .card-header h3{font-size:var(--titleFont)}
.card-grid .card-points{font-size:var(--pointsFont)}
.card-grid .state-pips{gap:var(--pipsGap);padding:var(--pipsPad)}
.card-grid .state-pips span{width:var(--pipSize);height:var(--pipSize)}
.card-grid .production-space{top:var(--productionTop);gap:var(--productGap);min-height:var(--productionHeight);padding:var(--productionPadY) var(--productionPadX)}
.card-grid .production-item{width:var(--productWidth);height:var(--productHeight);font-size:var(--productFont)}
.card-grid .effect-panel{right:var(--effectSide);bottom:var(--effectBottom);left:var(--effectSide);min-height:var(--effectHeight);padding:var(--effectPadY) var(--effectPadX);border-radius:var(--effectRadius);font-size:var(--effectFont)}
.card-grid .upgrade-panel{right:var(--upgradeSide);bottom:var(--upgradeBottom);gap:var(--upgradeGap);min-height:var(--upgradeHeight);max-width:var(--upgradeMaxWidth);padding:var(--upgradePadY) var(--upgradePadX);border-radius:var(--upgradeRadius)}
.card-grid .upgrade-panel span{font-size:var(--upgradeIcon)}
.card-grid .upgrade-panel strong{font-size:var(--upgradeFont)}

/* Běžné rozbalovací menu pod ozubeným kolem. */
.settings-popover[hidden]{display:none}.settings-popover{position:absolute;z-index:60;top:46px;right:0;width:238px;padding:9px;color:var(--ink);border:1px solid rgba(232,199,130,.3);border-radius:11px;background:rgba(35,28,21,.98);box-shadow:0 18px 48px #000b;backdrop-filter:blur(14px)}.settings-section{padding:7px 7px 10px}.settings-label{display:block;margin-bottom:8px;color:var(--muted);font-size:.75rem}.column-options{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.column-options button{height:34px;color:var(--ink);border:1px solid var(--line);border-radius:7px;background:#2c251d;cursor:pointer}.column-options button:hover{border-color:rgba(243,207,121,.55)}.column-options button.selected{color:#21170a;border-color:var(--gold-bright);background:linear-gradient(#f1cf80,#c99740);font-weight:700}.settings-actions{display:grid;padding-top:6px;border-top:1px solid var(--line)}.settings-actions button{display:flex;align-items:center;gap:9px;width:100%;padding:9px 8px;color:var(--ink);border:0;border-radius:7px;background:transparent;cursor:pointer;text-align:left}.settings-actions button:hover{background:rgba(255,255,255,.065)}.settings-actions span{display:grid;place-items:center;width:21px;color:var(--gold-bright);font-size:1rem}
.settings-toggle{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:11px;color:#ddd2bf;border-top:1px solid var(--line);font-size:.76rem;cursor:pointer}.settings-toggle input{width:16px;height:16px;accent-color:var(--gold)}

/* Odhazovací balíček je vodorovný, rolovatelný pás plných karet. */
.discard-browser-dialog{width:min(1180px,calc(100vw - 28px));padding:23px;overflow:hidden}.discard-card-strip{clear:both;display:flex;align-items:flex-start;gap:12px;width:100%;padding:3px 3px 16px;overflow-x:auto;overflow-y:hidden;scrollbar-color:#8a683d #17130f;scrollbar-width:thin}.discard-view-card,.full-card-choice{flex:0 0 178px;width:178px;padding:0;color:inherit;border:1px solid transparent;border-radius:13px;background:transparent;cursor:pointer}.discard-view-card:hover,.full-card-choice:hover,.full-card-choice.selected{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(243,207,121,.16)}.discard-view-card .preview-card,.full-card-choice .preview-card{width:100%;pointer-events:none}.discard-empty{clear:both;padding:60px 20px;color:var(--muted);text-align:center}.discard-choices{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.full-card-choice.selected{transform:translateY(-5px)}

/* Nejprve se ukážou nové karty, teprve potom animace míchání. */
.round-transition{grid-template-rows:auto 1fr}.round-transition-copy{position:static;align-self:end;margin-top:7vh}.round-new-cards{display:flex;align-items:center;justify-content:center;gap:18px;min-height:310px}.round-new-cards .preview-card{width:170px;box-shadow:0 24px 55px #000}.phase-discovery .shuffle-cards{display:none}.phase-shuffle .round-new-cards{display:none}.phase-shuffle .shuffle-cards{display:block;align-self:start}.phase-shuffle .round-transition-copy{align-self:end}
/* Pevná herní hlavička; pod ní se posouvají pouze karty. */
.game-shell{display:grid;grid-template-rows:auto minmax(0,1fr);height:100vh;max-width:none;padding:0 22px;overflow:hidden}
.topbar{position:relative;z-index:40;display:grid;grid-template-columns:auto minmax(250px,1fr) auto auto auto;align-items:center;gap:12px;min-height:78px;padding:9px 0;border-bottom:1px solid var(--line);background:rgba(23,19,15,.9);backdrop-filter:blur(16px)}
.brand{gap:9px;min-width:max-content}.brand-mark{display:block;width:48px;height:42px;overflow:hidden;border:1px solid rgba(239,202,123,.72);border-radius:9px;background:#2b241c;box-shadow:inset 0 0 0 2px #241b12,0 4px 12px #0008}.brand-mark img{display:block;width:100%;height:100%;object-fit:cover}.brand h1{font-family:Georgia,"Times New Roman",serif;font-size:1.35rem;font-weight:500;letter-spacing:.035em}
.resources{justify-content:flex-start;gap:4px}.resource{min-width:43px;padding:5px 7px}.resource i{font-size:.92rem}.resource strong{font-size:.75rem}
.counters>div{min-width:54px;padding:5px 9px}.counters span{font-size:.56rem}.counters strong{font-size:.9rem}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:max-content}.pile-zone{gap:7px;min-width:68px}.pile-zone strong{font-size:.69rem;font-weight:500;white-space:nowrap}.header-actions button.pile-zone{padding:3px 4px;color:var(--ink);border:0;background:transparent;cursor:pointer}.header-actions .deck-stack{width:29px;height:39px;box-shadow:-2px 2px #1b1712,-4px 4px #6c5337}.header-actions .deck-stack b{width:19px;height:19px;font-size:.6rem}.header-actions .discard-stack{box-shadow:2px 2px #181715,3px 3px #55514a}
.turn-action{display:flex;align-items:center;justify-content:center;gap:7px;width:116px;height:44px;min-height:44px;padding:7px 10px;border-radius:8px;cursor:pointer}.turn-action span{font-size:1rem}.turn-action strong{font-size:.74rem;font-weight:650}.header-actions .draw-two{position:static;color:#241a0d;border:1px solid #e2b962;background:linear-gradient(145deg,#f1cf7d,#c8943f);box-shadow:none}.header-actions .end-turn{color:var(--ink);border:1px solid rgba(230,194,122,.34);background:#373027}.turn-action:disabled{cursor:not-allowed;filter:grayscale(.75);opacity:.45}
.header-tools{align-self:center}.gear-button{position:relative;display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid transparent;border-radius:8px}.gear-button span,.gear-button span::before,.gear-button span::after{display:block;width:20px;height:2px;border-radius:2px;background:currentColor;content:""}.gear-button span::before{transform:translateY(-6px)}.gear-button span::after{transform:translateY(4px)}
.settings-popover{top:50px}.table-area{min-height:0;padding:12px 0 0;overflow:hidden}.board-scroll{width:100%;max-height:100%;padding:0 2px 18px;overflow-x:hidden;overflow-y:auto}.card-grid{align-content:start}.empty-state{padding:80px 0}

.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.resources{display:flex;align-items:center;justify-content:flex-start;gap:5px;min-width:280px;min-height:44px;padding:7px 10px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.025)}.resources.empty::after{content:"";display:block;min-height:25px}.produced-resource{flex:0 0 auto;filter:drop-shadow(0 2px 3px #0009);font-size:1.22rem;line-height:1}
.header-actions{gap:7px;padding:6px 9px;border:1px solid rgba(230,194,122,.22);border-radius:11px;background:rgba(38,31,24,.72)}.header-actions .pile-zone{min-width:36px}.header-actions button.pile-zone{width:38px;padding:2px}.turn-action{width:112px}.counters{margin-left:8px}.header-tools{margin-left:2px}
.round-transition-body{display:grid;align-content:center;justify-items:center;width:min(1050px,calc(100vw - 48px));min-height:430px;max-height:72vh;overflow-y:auto}.phase-intermission .shuffle-cards,.phase-discovery .shuffle-cards{display:none}.phase-shuffle .round-transition-body{display:none}.round-rest-panel{width:min(560px,100%);padding:0;text-align:center}.round-rest-panel p{max-width:520px;margin:0 auto 28px;color:#d6cab6;line-height:1.55}.round-rest-actions{display:grid;width:min(310px,100%);gap:11px;margin-inline:auto}.round-rest-actions button{width:100%;min-height:46px;justify-content:center}.round-primary-action,.shuffle-round-action{min-height:42px;padding:9px 16px;color:#21170a;border:1px solid #e5bd68;border-radius:9px;background:linear-gradient(#f1cf80,#c99740);cursor:pointer;font-weight:700}.round-hint{margin:0 0 16px;color:var(--muted);font-size:.84rem}.round-card-button{width:190px;padding:0;border:1px solid transparent;border-radius:14px;background:transparent;cursor:pointer}.round-card-button:hover{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(243,207,121,.18);transform:translateY(-4px)}.round-card-button .preview-card{width:100%;pointer-events:none}.round-discovery-actions{display:flex;justify-content:center;margin-top:18px}.round-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(760px,100%);margin-top:16px;text-align:left}.round-notes h3{grid-column:1/-1;margin:0 0 2px;color:var(--gold-bright);font-size:.78rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase}.round-note{padding:11px 13px;border-left:2px solid rgba(226,185,98,.52);background:rgba(25,21,17,.36)}.round-note strong{font-size:.82rem;font-weight:650}.round-note p{margin:5px 0 0;color:#cfc3b1;font-size:.75rem;line-height:1.4}.round-discovery-footer{display:flex;justify-content:center;width:100%;margin-top:20px;padding-top:16px;border-top:1px solid rgba(230,194,122,.18)}.shuffle-round-action{display:flex;align-items:center;gap:11px;min-width:180px;justify-content:center}.mini-deck{display:grid;place-items:center;width:28px;height:36px;color:#23180b;border:1px solid #7f5722;border-radius:5px;background:repeating-linear-gradient(45deg,#f1cf80,#f1cf80 5px,#c99740 5px,#c99740 10px);box-shadow:-2px 2px #513719;font-size:.65rem}.library-dialog{width:min(1220px,calc(100vw - 28px));padding:23px}.library-grid{clear:both;display:grid;grid-template-columns:repeat(auto-fill,178px);justify-content:center;gap:14px}.library-card{width:178px;padding:0;border:1px solid transparent;border-radius:13px;background:transparent;cursor:pointer}.library-card:hover{border-color:var(--gold-bright);box-shadow:0 0 0 2px rgba(243,207,121,.16);transform:translateY(-3px)}.library-card .preview-card{width:100%;pointer-events:none}

@media(max-width:1250px){.topbar{grid-template-columns:auto minmax(260px,1fr) auto auto auto;gap:8px}.turn-action{width:102px}.header-actions{gap:5px;padding-inline:7px}.counters{margin-left:3px}.stage-gallery{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.game-shell{padding:0 10px}.topbar{grid-template-columns:auto minmax(230px,1fr) auto auto auto;gap:6px;min-width:730px}.brand h1{display:none}.brand-mark{width:38px;height:34px}.resources{min-width:230px}.turn-action{width:88px;padding-inline:6px}.turn-action strong{font-size:.66rem}.counters{margin-left:0}.counters>div{min-width:44px;padding:4px 5px}.gear-button{width:38px}.upgrade-route{grid-template-columns:1fr}.route-arrow{justify-self:center;transform:rotate(90deg)}.discard-choices{grid-template-columns:1fr}.stage-gallery{grid-template-columns:1fr}.settings-popover{right:-2px;width:min(238px,calc(100vw - 20px))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Číslo karty je volitelné a zůstává uprostřed prvního řádku hlavičky. */
.card-header-top{display:grid;grid-template-columns:1fr auto 1fr}.card-header-top .state-pips{justify-self:end}.card-number{color:#d8cebd;font-size:.53rem;font-weight:400;letter-spacing:.06em}
.settings-toggle{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:11px;color:#ddd2bf;border-top:1px solid var(--line);font-size:.76rem;cursor:pointer}.settings-toggle input{width:16px;height:16px;accent-color:var(--gold)}

/* Detail používá stejné celé karty jako hra, bez deformování obrázku. */
.stage-gallery{grid-template-columns:repeat(auto-fit,178px);justify-content:center;align-items:start;gap:16px}.stage-card{display:grid;gap:8px;padding:8px;overflow:visible}.stage-card .preview-card{width:100%;aspect-ratio:.63}.stage-card>img,.stage-card-body{display:none}.stage-label{text-align:center}.stage-card .upgrade-action{margin-top:0}
.resource-choice-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.resource-choice-grid button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:54px;color:var(--ink);border:1px solid var(--line);border-radius:9px;background:#30281f;cursor:pointer}.resource-choice-grid button:hover{border-color:var(--gold-bright)}.production-space:disabled{filter:grayscale(.9);opacity:.45;cursor:not-allowed}

/* Kolo je pevnou součástí ovládacího bloku; tah zůstává jen interním herním údajem. */
.topbar{grid-template-columns:auto minmax(250px,1fr) auto auto}.round-counter{display:grid;place-items:center;align-self:stretch;min-width:48px;padding:2px 8px;border-right:1px solid var(--line);border-left:1px solid var(--line)}.round-counter span{color:var(--muted);font-size:.52rem;letter-spacing:.1em;text-transform:uppercase}.round-counter strong{font-size:.92rem;font-weight:650}

@media(max-width:1180px){.brand h1{display:none}.brand-mark{width:42px;height:38px}.topbar{grid-template-columns:auto minmax(190px,1fr) auto auto;gap:8px}.resources{min-width:190px}.turn-action{width:98px}}
@media(max-width:930px){.turn-action{width:44px;padding:5px}.turn-action strong{display:none}.turn-action span{font-size:1rem}.header-actions{gap:5px;padding-inline:7px}.topbar{grid-template-columns:auto minmax(150px,1fr) auto auto;min-width:0;gap:6px}.resources{min-width:150px}}
@media(max-width:680px){body{overflow:hidden}.game-shell{padding:0 8px}.topbar{grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;min-width:0;gap:7px 8px;padding:7px 0}.brand{grid-column:1;grid-row:1}.brand-mark{width:40px;height:36px}.resources{grid-column:2;grid-row:1;width:100%;min-width:0;height:40px;min-height:40px;padding:5px 7px}.produced-resource{font-size:1.05rem}.header-tools{grid-column:1;grid-row:2;margin:0}.gear-button{width:40px;height:40px}.header-actions{grid-column:2;grid-row:2;justify-content:space-between;width:100%;min-width:0;padding:5px 6px}.header-actions .pile-zone{min-width:31px}.header-actions .deck-stack{width:26px;height:35px}.round-counter{min-width:39px;padding-inline:5px}.turn-action{width:40px;height:40px;min-height:40px}.settings-popover{top:44px;right:auto;left:0}.table-area{padding-top:8px}}
.discovered-side-choice{display:grid;gap:10px;justify-items:center}.side-pair{display:flex;gap:14px}.discovered-side-choice>span{color:var(--muted);font-size:.74rem}.discovered-side-choice .column-options{width:100%;grid-template-columns:repeat(2,1fr)}

