/* Presentation beta: game rules and server data stay unchanged. */
#gameScreen.expanded-game-view .game-wrap{grid-template-columns:minmax(0,1fr);height:calc(100dvh - 16px);min-height:0;overflow:hidden}
#gameScreen.expanded-game-view .game-wrap>.side,#gameScreen.expanded-game-view .game-wrap>.leader-side{display:none}
#gameScreen.expanded-game-view .board{width:100%;height:100%;min-height:0;box-sizing:border-box;overflow-y:auto}
#gameScreen .game-view-toggle{white-space:nowrap}
#gameScreen .game-view-toggle[aria-pressed="true"]{border-color:#ecc17b;color:#ffe1a3;background:#38231c}
#gameScreen .game-view-toggle:focus-visible{outline:2px solid #f2d197;outline-offset:3px}
@media(min-width:700px){#gameScreen.expanded-game-view .board{padding:clamp(14px,2vh,28px)}#gameScreen.expanded-game-view .target-card{width:min(620px,80%)}#gameScreen.expanded-game-view .target-name{font-size:clamp(24px,3vw,34px)}}
/* Leaderboard windows: only the list scrolls; header and controls stay in place. */
#leaderModal .modal-card{height:min(820px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);display:flex;flex-direction:column;gap:12px;overflow:hidden!important;scrollbar-gutter:auto;padding:20px}
#leaderModal .modal-card> :not(#leaderBoxFull){flex-shrink:0}
#leaderModal #leaderBoxFull{flex:1 1 0;min-height:0;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden;padding-right:6px;overscroll-behavior:contain}
#leaderModal .leader-pages{margin:0}#leaderModal .leader-page-note{margin:0}
#leaderModal .modal-head{margin:0}#leaderModal .modal-title{font-size:clamp(21px,3vw,30px)}
.menu-leaders .weekly-reset,.leader-side .weekly-reset,#leaderModal .weekly-reset{display:none!important}
.menu-leaders .leader-heading,.leader-side .leader-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0;width:100%}
.leader-side .leader-heading .section-title{margin:0}
.leader-open-full{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;padding:0;border:1px solid #8d6b3e80;border-radius:9px;color:#e6c78c;background:#211b1766;font:22px/1 sans-serif;cursor:pointer}
.leader-open-full:hover{background:#493122}.leader-open-full:focus-visible,.leader-show-more:focus-visible{outline:2px solid #f2d197;outline-offset:2px}
.menu-leaders.panel{display:flex;flex-direction:column;gap:10px;overflow:hidden}
.menu-leaders.panel> :not(#leaderBoxMenu){flex-shrink:0}
.menu-leaders.panel #leaderBoxMenu{flex:1 1 0;min-height:0;overflow:hidden!important}
.menu-leaders .leader-view{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.menu-leaders .leader-top-scroll{flex:1 1 0;min-height:0;overflow-y:auto!important;overflow-x:hidden;padding-right:5px;overscroll-behavior:contain}
.menu-leaders .leader-self-curtain{flex-shrink:0}
.leader-show-more{display:block;box-sizing:border-box;width:100%;height:26px;min-height:0;margin:3px 0 0;padding:3px 8px;border:1px solid #a77e4644;border-radius:5px;background:#221b1666;color:#f2d197;font:inherit;font-size:11px;line-height:18px;cursor:pointer}
.leader-show-more:hover{background:#38291c}.leader-show-more:disabled{opacity:.65;cursor:wait}
.leader-table th:first-child,.leader-table td:first-child{width:46px!important;text-align:center!important;padding-left:4px!important;padding-right:4px!important}
.leader-table .leader-medal{display:block;margin-inline:auto}.leader-table .leader-rank{display:block;text-align:center}
#leaderBoxFull .leader-table thead{position:sticky;top:0;z-index:1;background:#111114}
.menu-leaders .leader-top-scroll .leader-table thead{position:static;background:transparent}
.menu-leaders .leader-table th{background:transparent!important}
.menu-leaders.panel .leader-top-scroll,.leader-side.panel .leader-top-scroll,.leader-side.panel #leaderBoxSide{scrollbar-color:#97723f transparent}
.menu-leaders .leader-top-scroll::-webkit-scrollbar-track,.leader-side .leader-top-scroll::-webkit-scrollbar-track,.leader-side #leaderBoxSide::-webkit-scrollbar-track{background:transparent!important;border:0!important;box-shadow:none!important}
.leader-curtain-title{font-weight:400!important}
#leaderBoxFull,.menu-leaders .leader-top-scroll{scrollbar-width:thin;scrollbar-color:#97723f #141114}
#leaderBoxFull::-webkit-scrollbar,.menu-leaders .leader-top-scroll::-webkit-scrollbar{width:5px}
#leaderBoxFull::-webkit-scrollbar-thumb,.menu-leaders .leader-top-scroll::-webkit-scrollbar-thumb{background:#97723f;border-radius:8px}
#leaderModal .leader-rewards,.menu-leaders .leader-rewards{padding:10px 8px;border-color:#99724070;border-radius:12px;background:linear-gradient(135deg,#302416aa,#161216);gap:7px 0}
.leader-prize-place{display:block;color:#cabb9f;font-size:10px;margin-bottom:4px}.leader-prize-value{display:flex;justify-content:center;align-items:center;gap:5px;font-size:14px;font-weight:700;color:#f5d69b}.leader-prize-value img{width:18px;height:18px;object-fit:contain}
.menu-leaders .leader-own-compact,.leader-side .leader-own-compact{margin-top:4px;padding:4px 5px;border:0;border-radius:0;box-shadow:none;background:transparent}
.leader-own-compact[hidden]{display:none!important}
.leader-self-curtain{border:0!important;box-shadow:none!important;background:transparent!important}
.leader-side .leader-own-neighbors{padding:5px 7px;margin-top:4px;border:1px solid rgba(214,163,94,.30)!important;border-radius:10px;background:linear-gradient(180deg,rgba(20,19,25,.96),rgba(8,8,12,.98))!important;box-shadow:0 -8px 18px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.035)!important}
.leader-side .leader-own-neighbors[hidden]{display:none!important}
.leader-side .leader-own-neighbors .leader-curtain-title{text-align:center;font-size:10px;margin:1px 0 3px}
.leader-side .leader-own-neighbors .leader-table td{font-size:12px;padding:4px 3px;font-weight:400}
.menu-leaders .leader-own-compact .leader-curtain-title,.leader-side .leader-own-compact .leader-curtain-title{text-align:left;font-size:9px;letter-spacing:.3px;margin:0 0 2px 5px;color:#c6b28c}
.menu-leaders .leader-own-compact .leader-table td,.leader-side .leader-own-compact .leader-table td{padding:3px!important;font-size:11px;border:0;background:transparent}
.menu-leaders .leader-own-compact .leader-medal,.leader-side .leader-own-compact .leader-medal{width:20px;height:20px}
.menu-leaders .leader-rewards{padding:5px 6px;gap:3px 0;border-radius:9px}
.menu-leaders .leader-rewards-title{font-size:11px;line-height:1.2}
.menu-leaders .leader-prize-place{font-size:10px;font-weight:800;margin-bottom:1px;color:#f2d197}
.leader-reward-row:nth-child(n+2) .leader-prize-place{color:#f2d197}
.menu-leaders .leader-prize-value{font-size:13px;line-height:1.25}.menu-leaders .leader-prize-value img{width:16px;height:16px}
#leaderModal .leader-rewards{padding:12px 10px;gap:8px 0}
#leaderModal .leader-rewards-title{font-size:17px;line-height:1.25}
#leaderModal .leader-prize-place{font-size:14px;font-weight:800;margin-bottom:5px}
#leaderModal .leader-prize-value{font-size:20px;line-height:1.2;gap:7px}
#leaderModal .leader-prize-value img{width:23px;height:23px}
.result-save-status{margin:18px 0 0;text-align:center;color:#b9d2bc;font-size:13px;line-height:1.5}.result-save-status[data-status="review"],.result-save-status[data-status="pending"]{color:#f2d197}.result-save-status[data-status="rejected"]{color:#ed9eaa}
.leader-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px;font-size:12px;color:#cfb994}.leader-pages .btn{font-size:12px;padding:7px 12px}.leader-page-note{text-align:center;font-size:12px;color:#bfae99;margin-top:8px}
.combo-level-toggle .chevron{position:relative;display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border:1px solid #a7783b66;border-radius:50%;font-size:0;background:linear-gradient(180deg,#302419,#161217);transition:transform .2s,background .2s}
.combo-level-toggle .chevron::before{content:'';position:absolute;inset:0;border:0;transform:none;background:center/18px 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23ebc483' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.combo-level-toggle:hover .chevron{background:#493121}.combo-level.open .chevron{transform:rotate(180deg)}
.combo-sidebar>*{flex-shrink:0}
.combo-sidebar .combo-random-settings{display:block;flex:0 0 auto;min-height:44px;border:1px solid #a7783b66;border-radius:12px;background:#111014;color:#edd3ac;font-size:13px;overflow:hidden}
.combo-sidebar .combo-random-settings>summary{display:list-item;min-height:42px;box-sizing:border-box;visibility:visible}
.combo-random-modes{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px;border:1px solid #a7783b55;border-radius:12px;background:#08080c}
.combo-random-mode{min-width:0;min-height:42px;padding:8px 6px;border:1px solid transparent;border-radius:8px;background:transparent;color:#bbaa96;font:inherit;font-size:12px;font-weight:800;line-height:1.3;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.combo-random-mode:hover{color:#fff0d0;background:#29202a}.combo-random-mode[aria-pressed="true"]{color:#ffe4ad;border-color:#c19354;background:linear-gradient(180deg,#683047,#351727);box-shadow:inset 0 1px 0 #ffe3ad1a}
.combo-random-mode:focus-visible{outline:2px solid #f2d197;outline-offset:2px}
.combo-random-settings summary{cursor:pointer;padding:10px;line-height:1.5}.combo-random-settings>summary{font-weight:800}.combo-random-options{padding:0 10px 10px;display:grid;gap:8px}.combo-random-options select{width:100%;padding:9px;background:#1a141a;border:1px solid #a7783b88;border-radius:8px;color:#f6dfb9;font:inherit}.combo-random-options p{margin:0;color:#b8aa98;line-height:1.5}.combo-random-actions{display:flex;gap:8px}.combo-random-actions .btn{font-size:11px!important;padding:7px!important;min-height:32px!important;flex:1}.combo-random-options details{border-top:1px solid #a7783b33}.combo-random-options input{accent-color:#bd8753;width:17px;height:17px;vertical-align:middle;margin-right:8px;flex-shrink:0}.combo-random-preset{display:flex;align-items:center;gap:5px;padding:8px 4px;border-radius:8px;cursor:pointer}.combo-random-preset:hover{background:#382434}.combo-random-preset .combo-preset-icons img{width:26px;height:26px}
.leader-rewards{color:#f2d197;font-size:11px;line-height:1.4;padding:6px;border:1px solid #70502a;border-radius:10px;background:linear-gradient(180deg,#221b16,#110e13);text-align:center;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:0}
.leader-rewards-title{grid-column:1/-1;display:block;font-size:12px}.leader-reward-row{display:block;white-space:pre-line;min-width:0}.leader-reward-row+ .leader-reward-row{border-left:1px solid #70502a66}.weekly-reset{display:flex;flex-wrap:wrap;justify-content:center;gap:3px 8px;text-align:center}
.leader-rewards[hidden]{display:none}
.menu-leaders{grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:6px}
.menu-leaders .section-title{font-size:22px;margin:0}.menu-leaders .leader-tab{padding:5px;min-height:40px}.menu-leaders .leader-tab-icon{width:22px;height:22px}.menu-leaders .weekly-reset{font-size:10px;line-height:1.3}
body>.game-version{display:none;position:fixed;right:28px;bottom:20px;z-index:1;pointer-events:none;font-size:10px;text-align:right;text-shadow:none;background:transparent;padding:0;border:0;border-radius:0;color:rgba(215,196,161,.5)}
body:has(#menuScreen.active):not(:has(.modal.active))>.game-version{display:block}
#duelModal .duel-card{width:min(800px,calc(100vw - 32px));padding:clamp(20px,3vw,36px);border:1px solid #987443;border-radius:24px;background:radial-gradient(ellipse at 50% 0,rgba(117,39,78,.24),transparent 65%),#101014;box-shadow:0 22px 80px #000a,inset 0 0 30px #ffffff03}
.duel-header{position:relative;display:flex;justify-content:center;align-items:center;padding:0 48px 20px;border-bottom:1px solid #d6a35e33}
#duelTitle{display:flex;align-items:center;justify-content:center;gap:12px;margin:0;text-align:center;color:#f2d197;font-size:clamp(23px,3vw,34px);text-transform:uppercase}
#duelTitle img{width:38px;height:38px;object-fit:contain;filter:sepia(.8) saturate(1.5) drop-shadow(0 0 10px #d6a35e44)}
.duel-close{position:absolute;right:0;top:0;width:40px;height:40px;border-radius:50%;border:1px solid #ba8e52;background:#211a1a;color:#f5d799;font-size:30px;line-height:1;display:grid;place-items:center}
.duel-close:hover{background:#49302a}.duel-close:focus-visible,.duel-choice:focus-visible{outline:2px solid #ffe09a;outline-offset:4px}
/* Inset scroll tracks keep the thumb clear of rounded window corners. */
.modal{padding:20px;overflow:hidden}.modal .modal-card{box-sizing:border-box;max-height:calc(100dvh - 40px);min-height:0;min-width:0;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-x:hidden}
.modal .modal-card{scrollbar-width:auto;clip-path:none}
.modal .modal-card::-webkit-scrollbar{width:5px;height:5px}.modal .modal-card::-webkit-scrollbar-track{margin-top:26px;margin-bottom:26px;border:0;background:transparent;border-radius:8px}.modal .modal-card::-webkit-scrollbar-thumb{border:1px solid #161318;border-radius:8px;background:#a9773d}.modal .modal-card::-webkit-scrollbar-corner{background:transparent}.modal .modal-card::-webkit-scrollbar-button{display:none;width:0;height:0}
.modal .x,.modal .duel-close{box-sizing:border-box;flex:0 0 auto;width:40px;height:40px;padding:0;position:relative;display:grid;place-items:center;font-size:0;line-height:0;border-radius:50%;overflow:hidden}
.modal .x::before,.modal .x::after,.modal .duel-close::before,.modal .duel-close::after{content:'';position:absolute;left:50%;top:50%;width:16px;height:2px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(45deg)}
.modal .x::after,.modal .duel-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
#duelModal .duel-close{position:absolute;right:0;top:0}#duelModal .duel-card{max-height:calc(100dvh - 40px)}
.duel-content{text-align:center}.duel-content>p{margin:16px 0;line-height:1.5}
#duelModal .duel-choices{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:26px 0}
#duelModal .duel-choice{width:100%;min-height:150px;border-radius:18px;padding:22px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-size:clamp(16px,2.2vw,23px);line-height:1.3;border-color:#cc9b55;background:linear-gradient(180deg,#812042,#3a1026);box-shadow:inset 0 1px 0 #ffffff26,0 8px 25px #0005}
.duel-choice span:last-child{font-size:.78em;color:#f9dfbd}.duel-find img{height:46px;width:46px;object-fit:contain;filter:drop-shadow(0 2px 4px #0008)}
.duel-friend span:first-child::after{content:' —'}
#duelModal .duel-join{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;margin:24px auto 32px}
#duelModal .duel-join input{width:min(300px,100%);text-align:center;font-size:18px;letter-spacing:2px;padding:13px 16px;border:1px solid #9b7544;border-radius:12px;background:#09090e;color:#fff1cf;user-select:text;-webkit-user-select:text}
#duelModal .duel-join .btn{font-size:14px;min-height:44px;padding:10px 24px}
.duel-statistics{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;padding:20px 0 12px;font-size:clamp(16px,2vw,21px);font-weight:800;line-height:1.5}
.duel-statistics strong{width:100%;color:#f2d197;font-size:1.1em;text-align:center}.duel-stat-wins{color:#9beaaf}.duel-stat-losses{color:#ff7a83}.duel-stat-draws{color:#fff7ef}
.duel-rules{margin-top:14px;padding-top:18px;border-top:1px solid #d6a35e30;color:#bfb2a1;font-size:13px;line-height:1.65;text-align:center}.duel-notice:not(:empty){padding:12px;background:#332416;border:1px solid #806137;border-radius:10px;color:#ffe09a}.duel-controls{justify-content:center}
/* Fill the available vertical space rather than packing the whole arena at the top. */
@media(min-width:1181px){
 #comboScreen{height:100%}.combo-layout{height:100%;min-height:0;grid-template-columns:minmax(300px,30%) minmax(0,1fr)}
 #comboBoard{height:100%;min-height:0;justify-content:space-between;gap:clamp(8px,1.3vh,18px);overflow-y:auto;padding:clamp(16px,2vh,28px)}
 #comboBoard>*{flex-shrink:0}#comboBoard .combo-timer{font-size:clamp(80px,12vh,132px)}
 #comboBoard .combo-objective{width:min(780px,96%);grid-template-columns:76px minmax(0,1fr);padding:12px 16px}#comboBoard .combo-objective img{width:70px;height:70px}#comboBoard .combo-objective-label{font-size:13px}#comboBoard .combo-objective-name{font-size:26px}
 #comboBoard .combo-keybar{grid-template-columns:repeat(6,clamp(76px,8.6vh,104px));gap:clamp(10px,1.2vw,18px)}
 #comboBoard .combo-keybar .key-slot{width:clamp(76px,8.6vh,104px);height:clamp(76px,8.6vh,104px)}#comboBoard .combo-keybar .key-slot img{width:82%;height:82%}#comboBoard .key-letter{font-size:25px}
 #comboBoard .combo-orbs .orb-hole{width:clamp(74px,9vh,104px);height:clamp(74px,9vh,104px)}#comboBoard .combo-orbs .orb-hole img{width:82%;height:82%}
 #comboBoard .pill{font-size:15px;padding:8px 12px}#comboBoard .combo-sequence-step{width:46px;height:46px}#comboBoard .combo-sequence-step img{width:38px;height:38px}
 #comboBoard .combo-inventory-panel{width:min(820px,100%);gap:10px}#comboBoard .combo-inventory-body{grid-template-columns:minmax(210px,340px) auto;gap:20px}#comboBoard .combo-inventory{grid-template-columns:repeat(3,70px);grid-template-rows:repeat(2,70px);gap:4px}#comboBoard .combo-inventory-title{font-size:22px}#comboBoard .combo-inventory-help{font-size:14px;line-height:1.5}
 #comboBoard .combo-library{grid-template-columns:repeat(13,46px);gap:6px}#comboBoard .combo-library button{width:46px;height:46px}#comboBoard .combo-item-key{font-size:14px}
 #comboBoard .bottom-actions .btn{font-size:16px;min-height:44px;padding:10px 22px}.combo-sidebar .section-title{font-size:28px}.combo-sidebar .combo-level-toggle{font-size:16px;padding:13px}.combo-sidebar .combo-preset small{font-size:14px}.combo-sidebar .combo-preset-icons img{width:32px;height:32px}.combo-sidebar .combo-constructor h3{font-size:20px}.combo-sidebar .combo-builder-steps{font-size:16px}.combo-sidebar .combo-actions .btn,.combo-sidebar .combo-builder-controls .btn{font-size:14px;min-height:44px}
 #comboBoard .bottom-actions{position:static;min-height:44px;margin:0;background:none}#comboBoard .combo-hint:empty{display:none}
}
#comboInventoryNotice .modal-card{position:relative;width:min(460px,100%);padding:30px 28px 24px;border:1px solid rgba(214,163,94,.42);border-radius:20px;background:radial-gradient(ellipse at top left,rgba(155,103,43,.12),transparent 65%),#111014;box-shadow:0 24px 80px rgba(0,0,0,.55)}
#comboInventoryNotice .modal-head{margin:0 0 20px;padding:0 30px 17px 0;border-bottom:1px solid rgba(214,163,94,.16)}
#comboInventoryNoticeTitle{margin:0;color:#f2d197;font-size:23px;line-height:1.3;font-weight:700;text-transform:none;text-shadow:none}
#comboInventoryNotice .x{position:absolute;top:9px;right:3px;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;background:transparent;border:1px solid rgba(214,163,94,.22);color:#cfb488;box-shadow:none}
#comboInventoryNotice .x:hover{background:rgba(214,163,94,.1);border-color:rgba(214,163,94,.55)}
#comboInventoryNoticeBody{display:grid;gap:22px;line-height:1.6;color:#ded4c6;font-size:16px}
#comboInventoryNoticeBody .btn{width:100%;min-height:44px;padding:10px 18px;border-radius:12px;font-size:14px;background:linear-gradient(180deg,#30251a,#211b16);border:1px solid #967044;color:#ffe0a5;box-shadow:none}
#comboInventoryNoticeBody .btn:hover{background:#392b1d;border-color:#cca366}
#comboInventoryNoticeBody .btn:focus-visible,#comboInventoryNotice .x:focus-visible{outline:2px solid #e4bd7c;outline-offset:3px}
@media(max-width:480px){#comboInventoryNotice .modal-card{padding:28px 20px 20px}#comboInventoryNoticeTitle{font-size:20px}#comboInventoryNoticeBody{font-size:15px}}
@media(max-width:1180px){#comboBoard{min-height:calc(100dvh - 32px);justify-content:space-between;gap:18px;padding:20px 12px;overflow:visible}.combo-layout{grid-template-columns:minmax(0,1fr)}.combo-sidebar{min-width:0}}
@media(max-width:560px){#duelModal .duel-card{padding:20px 14px}.duel-header{padding:0 42px 18px}#duelTitle img{display:none}#duelModal .duel-choices{gap:10px}#duelModal .duel-choice{min-height:132px;padding:16px 10px;font-size:16px}.duel-rules{font-size:12px}.duel-statistics{gap:8px 12px;font-size:15px}}
@media(max-width:620px){#comboBoard .combo-inventory-body{grid-template-columns:minmax(0,1fr);gap:12px}#comboBoard .combo-inventory-help{text-align:center;width:100%}#comboBoard .combo-inventory-panel{min-width:0;width:100%}#comboBoard .combo-sequence{max-width:100%}#comboBoard .combo-objective{width:100%}}
@media(min-width:1181px) and (max-height:900px){
 #comboBoard{gap:6px;padding:14px;scrollbar-width:thin;scrollbar-color:#b7813f #09090a}
 #comboBoard .combo-timer{font-size:clamp(80px,11vh,100px)}#comboBoard .combo-objective{padding:10px 14px;grid-template-columns:70px minmax(0,1fr)}#comboBoard .combo-objective img{width:64px;height:64px}
 #comboBoard .combo-inventory{grid-template-columns:repeat(3,64px);grid-template-rows:repeat(2,64px)}#comboBoard .combo-inventory-panel{gap:7px}#comboBoard .combo-inventory-help{font-size:13px}
}
