/* A viewport-height menu on desktop and landscape tablets. Content stays visible. */
#lobby .faction-bot-label{display:block;min-height:1.4em;font:600 12px/1.4 system-ui,sans-serif;color:#efc983}
@media(min-width:701px) and (orientation:landscape){
 .royal-menu[data-menu-screen="home"] main{padding:8px 18px 0;min-height:0}
 .royal-menu[data-menu-screen="home"] #home{height:min(calc(100svh - 62px),940px);min-height:0;margin:0 auto;padding:14px 24px;display:grid;grid-template-rows:minmax(64px,.22fr) minmax(0,1fr);gap:12px;overflow:visible}
 .royal-menu[data-menu-screen="home"] .royal-home-heading{width:100%;height:100%;min-height:0;max-width:1180px;margin:0 auto;gap:20px}
 .royal-menu #home .royal-logo{height:100%;min-height:0;max-width:580px;margin:0;display:flex;align-items:center}
 .royal-menu #home .royal-logo img{max-height:100%;object-fit:contain}
 .royal-menu #home .join-ways{height:100%;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:auto;gap:14px}
 .royal-menu #home .join-panel.menu-card{min-height:0;grid-template-rows:minmax(0,1fr) auto}
 .royal-menu #home .menu-card-art{height:100%;min-height:0;object-fit:cover}
 .royal-menu #home .menu-card-content{gap:7px;padding:0 16px 12px;margin-top:0}
 .royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:clamp(20px,2vw,28px);line-height:1.15}
 .royal-menu #home .menu-card p{font-size:clamp(14px,1.4vw,17px);line-height:1.25}
 .royal-menu #home .menu-card button:not(.card-hit-target){min-height:42px;font-size:16px;padding:8px 6px}
 .royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{position:static;width:34px;height:34px;min-height:34px;align-self:center;margin:-20px 0 0;font-size:26px}
 .royal-menu[data-menu-screen="home"]~.site-footer,.royal-menu[data-menu-screen="home"] .site-footer{margin:8px auto 10px;padding:4px 12px;font-size:11px;line-height:1.3}
}
@media(min-width:1100px) and (max-height:650px) and (orientation:landscape){
 .royal-menu #home .join-ways{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
 .royal-menu #home .menu-card-content{padding-inline:10px}
 .royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:21px}
 .royal-menu #home .menu-card button:not(.card-hit-target){font-size:14px}
}
/* Existing live action nodes move into this side column on wide screens. */
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game{--commands-width:clamp(240px,25vw,310px);--tile:clamp(52px,calc((100vw - 400px)/6),110px);max-width:1100px;width:min(100%,calc(var(--tile) * 6 + 72px + var(--commands-width)))}
 #game .gamegrid{display:grid;grid-template-columns:minmax(0,1fr) var(--commands-width);gap:18px;align-items:start}
 #game #battlefield{width:100%;max-width:none}
 #game .sidebar{position:sticky;top:calc(var(--battle-header-height,100px) + 12px);min-width:0;margin:0;padding:12px;max-height:calc(100svh - var(--battle-header-height,100px) - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 #game .sidebar .battle-actions{max-width:none;width:100%;margin:0 0 12px}
 #game #controls{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
 #game #controls>button{min-height:104px;font-size:13px;padding:4px 2px 8px;gap:7px}
 #game #controls .action-emblem{width:50px;height:50px}
 #game #controls .action-emblem svg{width:28px;height:28px}
 #game #cardTabs{grid-template-columns:minmax(0,1fr);gap:7px}
 #game #cardTabs>button{min-height:44px;font-size:13px}
 #game .turn-actions{width:100%;max-width:none}
}
/* Stable 3.8.13 scenery and arrangement, retaining the current royal artwork. */
body.royal-menu[data-menu-screen="account"]::before,
body.royal-menu[data-menu-screen="home"]::before{
 inset:-24px;background:linear-gradient(#09234a22,#06152b55),url('/assets/menu/castle.webp') center/cover no-repeat;filter:blur(9px);
}
.royal-menu[data-menu-screen="home"] main{min-height:100svh}
.royal-menu[data-menu-screen="home"] .site-footer{margin-top:20px}
@media(min-width:701px) and (orientation:landscape){
 .royal-menu[data-menu-screen="home"] #home{height:min(calc(100svh - 24px),1000px)}
 .royal-menu[data-menu-screen="home"] .site-footer{margin-top:20px}
}
/* Transparency is limited to scenery: pieces and interaction markers stay solid. */
#game .boardpanel{background:#06111c80}
#game .tile:not(.defense-row){background-color:#0b192640!important}
#game .tile>.terrain-art{opacity:.58}
/* Original identity hierarchy: portrait, name/faction and health, then resource badges. */
#game .area-head{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:10px 34px 10px 10px}
#game .commander-identity{width:100%;flex:1 1 100%;gap:12px}
#game .commander-copy{flex:1;min-width:0;max-width:none}
#game .commander-copy>strong{display:block;font-size:17px;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
#game .commander-copy>small{display:block;margin:3px 0 0;font-size:13px;line-height:1.25;color:var(--realm)}
#game .commander-copy>small::before{content:none}
#game .health-track{display:block;width:100%;min-width:0;max-width:none;height:11px;margin:7px 0 0;flex:none;border-radius:3px}
#game .health-fill{border-radius:2px}
#game .mini-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;flex:1 0 100%;gap:6px;margin:0}
#game .mini-stats>span,#game .mini-stats>span:first-child{display:inline-flex;justify-content:center;align-items:center;gap:4px;min-width:0;padding:5px 6px;border:1px solid #b797554f;border-radius:4px;background:linear-gradient(#172b40b3,#0b1725c9);font-size:13px;box-shadow:inset 0 1px #ffffff0c}
#game #enemyAP,#game #myAP{font-size:18px}
#game .resource-gem{width:19px;height:20px}
#game .mini-stats .shield-status{grid-column:1/-1}
#game .area-head::after{top:-3px;height:calc(100% + 6px);padding-top:10px}
#game .battle-section-title{text-align:center;margin:0 0 12px;padding:0 0 9px;border-bottom:1px solid #b58a434d;font:18px Georgia,serif;color:#ffe3aa}
#game .battle-cards-title{margin:12px 0 0;padding:10px 0 0;font:17px Georgia,serif;color:#ffe3aa;text-align:left}
@media(max-width:720px){
 #game .commander-copy>strong{font-size:15px}
 #game .area-head{padding:8px 26px 8px 8px}
}
@media(max-width:480px){
 #game .mini-stats{gap:4px}
 #game .mini-stats>span,#game .mini-stats>span:first-child{padding:5px 2px;font-size:11px;gap:2px}
 #game #enemyAP,#game #myAP{font-size:16px}
 #game #enemyAP::before,#game #myAP::before{font-size:10px}
 #game .resource-gem{width:16px;height:17px}
}
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game{--commands-width:clamp(260px,28vw,340px);--tile:clamp(48px,calc((100vw - 420px)/7),90px)}
 #game .sidebar{position:static;top:auto;display:flex;flex-direction:column;align-self:start;min-height:0;height:auto;max-height:none;overflow:visible;scrollbar-gutter:auto}
 #game .sidebar .battle-history{order:-1;margin:0 0 18px;padding:0;border:0;border-radius:0;background:none}
 #game .sidebar .battle-history>summary{padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #c8a36763;font-size:18px;color:#ffe3aa}
 #game .sidebar .battle-history[open] #log{height:max(180px,calc(var(--opponent-area-height,440px) - 48px));max-height:none;overflow:auto;overscroll-behavior:contain}
 #game .sidebar .battle-actions{order:0}
 #game .sidebar>details:not(.battle-history){order:1}
 #game .sidebar .rules{max-height:240px;overflow:auto;overscroll-behavior:contain;padding-right:6px}
}
/* Matching expandable reference sections, using the chronicle heading style. */
#game .sidebar>details{margin:0 0 18px;padding:0;border:0;border-radius:0;background:none}
#game .sidebar>details>summary{padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #c8a36763;font:700 18px Georgia,serif;color:#ffe3aa}
#game .sidebar>details>.rules,
#game .sidebar>details>.formation-legend{margin:0;padding:10px;border:1px solid #715e40;border-radius:8px;background:#0c1720a8}
#game .sidebar>details>.formation-legend{gap:10px}
/* Full menu artwork, without cropping or fading away image details. */
.royal-menu #home .menu-card-art{object-fit:contain;object-position:center;mask-image:none;-webkit-mask-image:none;background:#081a29}
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game{--tile:clamp(46px,calc((100vw - 420px)/8),80px)}
 /* Reserve the opponent field's height even when the chronicle is closed. */
 #game .sidebar .battle-history{height:max(210px,calc(var(--opponent-area-height,440px) - 12px));flex:0 0 auto}
 #game .sidebar .battle-history[open] #log{height:max(160px,calc(var(--opponent-area-height,440px) - 54px));max-height:max(160px,calc(var(--opponent-area-height,440px) - 54px))}
}
/* A compact header with the actual wordmark, audio controls and a clear exit. */
.topbar{gap:20px;padding:8px max(16px,calc((100vw - 1200px)/2));align-items:center}
.topbar .brand{flex:0 0 auto;min-width:0}
.topbar-logo{display:block;width:clamp(180px,20vw,250px);height:auto;max-height:82px;object-fit:contain}
.topbar .header-right{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;flex:1;max-width:780px;min-width:0}
.topbar #soundPanel{grid-column:1;grid-row:1;min-width:0;width:auto;justify-self:end}
.topbar #mainMenuButton{grid-column:2;grid-row:1;min-height:44px;padding:10px 16px;border:1px solid #e88f82;border-radius:7px;background:linear-gradient(#a3423e,#6f252b);color:#fff3ed;box-shadow:inset 0 1px #ffc1ac38,0 2px 5px #0005;font:600 13px/1.2 system-ui,sans-serif;white-space:nowrap}
.topbar #mainMenuButton:hover:not(:disabled){background:linear-gradient(#bb5149,#85313a)}
.topbar #roomBadge{grid-column:1/-1;justify-self:end;margin:0;padding:3px 8px;font-size:11px}
.topbar .sound-panel .sound-controls{display:grid;grid-template-columns:minmax(140px,205px) auto auto;gap:7px;align-items:center}
.topbar .sound-controls select,.topbar .sound-controls button{min-height:40px;margin:0;font-size:12px}
.topbar .sound-controls #trackSelect{width:100%;max-width:none}
.topbar #musicStatus{grid-column:1/-1;margin:0;text-align:left;font-size:10px;line-height:1.3}
.topbar #musicStatus:empty{display:none}
@media(max-width:1000px){
 .topbar{flex-wrap:nowrap;gap:12px}
 .topbar-logo{width:180px}
 .topbar .header-right{display:grid;width:auto;grid-template-columns:auto auto;justify-content:end;gap:8px}
 .topbar .sound-panel{position:relative;flex-direction:row}
 .topbar .sound-panel-toggle{display:flex!important;min-height:44px;font-size:12px;padding:9px 12px;gap:8px;white-space:nowrap}
 .topbar .sound-panel .sound-controls{display:none!important}
 .topbar .sound-panel.expanded .sound-controls{display:grid!important;position:absolute;top:calc(100% + 8px);right:0;z-index:20;width:min(86vw,430px);padding:12px;grid-template-columns:1fr 1fr;border:1px solid #b99858;border-radius:8px;background:#081b2af5;box-shadow:0 10px 25px #0009}
 .topbar #trackSelect{grid-column:1/-1}
 .topbar #musicToggle,.topbar #effectsToggle{width:100%}
}
@media(max-width:540px){
 .topbar{flex-wrap:wrap;justify-content:center;padding:6px 10px}
 .topbar-logo{width:170px;max-height:56px}
 .topbar .header-right{flex:1 1 100%;width:100%;max-width:none;justify-content:space-between}
 .topbar #mainMenuButton{padding:9px 12px;font-size:12px}
 .topbar .sound-panel.expanded .sound-controls{left:0;right:auto}
}
.leave-game-dialog{width:min(440px,calc(100vw - 32px));padding:26px;border:1px solid #d5ac64;border-radius:10px;background:linear-gradient(135deg,#182f46,#081522);color:#fff0d0;box-shadow:0 20px 65px #000b}
.leave-game-dialog::backdrop{background:#020a15b8}
.leave-game-dialog h2{font:600 23px Georgia,serif;margin:0 0 12px}
.leave-game-dialog p{font-size:15px;line-height:1.5;margin:0 0 22px}
.leave-game-dialog form{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.leave-game-dialog button{min-height:44px;padding:10px 15px;font-size:14px}
.leave-game-dialog .confirm-leave{border:1px solid #e88f82;background:linear-gradient(#a3423e,#6f252b);color:#fff3ed}
/* Keep the live turn status and end-turn action directly below hand cards. */
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game .sidebar #turnActions{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:10px;margin:14px 0 0;padding:12px;width:100%;max-width:none}
 #game .sidebar #turnActions .gametop{width:100%;justify-content:space-between;gap:8px}
 #game .sidebar #turnActions #turnInfo{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
 #game .sidebar #turnActions .action-lights{justify-content:center}
 #game .sidebar #turnActions #endTurn{width:100%;min-width:0;min-height:44px;justify-content:center}
}
/* Size the AP dots relative to their own turn panel, beside the status text. */
#game #turnActions{container-type:inline-size}
#game #turnActions .turn-heading{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:clamp(6px,2cqw,10px)}
#game #turnActions #turnInfo,#game .sidebar #turnActions #turnInfo{flex:1;min-width:0;font-size:clamp(11px,4cqw,14px);line-height:1.35;overflow-wrap:anywhere}
#game #turnActions #actionLights{display:flex;flex:0 0 auto;align-items:center;gap:clamp(3px,1.4cqw,6px);width:auto;order:0}
#game #turnActions #actionLights i{width:clamp(8px,4cqw,14px);height:clamp(8px,4cqw,14px);flex:none}
/* Match the rounded audio buttons while keeping the exit clearly red. */
.topbar #mainMenuButton{align-self:start;height:40px;min-height:40px;padding:8px 14px;border-radius:22px;font-size:12px;line-height:22px}
@media(max-width:1000px){.topbar .sound-panel-toggle{height:40px;min-height:40px;border-radius:22px}}
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 body:not(.royal-menu):has(#game:not(.hidden)) .topbar{min-height:96px}
 body:not(.royal-menu):has(#game:not(.hidden)) .topbar .brand{position:absolute;left:var(--battle-logo-center,30%);transform:translateX(-50%)}
 body:not(.royal-menu):has(#game:not(.hidden)) .topbar .header-right{margin-left:auto}
}
/* Balanced status row: turn text on the left, AP dots centered, time on the right. */
#game #turnActions,#game .sidebar #turnActions{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:10px;justify-items:stretch}
#game #turnActions .gametop,#game .sidebar #turnActions .gametop{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:clamp(4px,2cqw,8px);width:100%;min-width:0}
#game #turnActions .turn-heading{display:block;grid-column:1;grid-row:1;min-width:0}
#game #turnActions #turnInfo{display:block}
#game #turnActions #actionLights{grid-column:2;grid-row:1;justify-self:center;justify-content:center}
#game #turnActions .statsbar{grid-column:3;grid-row:1;justify-self:end;min-width:0;margin:0}
#game #turnActions #endTurn,#game .sidebar #turnActions #endTurn{grid-column:1;grid-row:2;width:100%;min-width:0;min-height:44px;margin:0}
/* Each realm carries its own crest; Dornfels retains the fleur-de-lis. */
#game .player-area[data-realm="auenhain"]{--banner-crest:url('/assets/battle-v3817/banner-auenhain.svg?v=3.9.0.5');--banner-cloth:#155b2d}
#game .player-area[data-realm="nachtmoor"]{--banner-crest:url('/assets/battle-v3817/banner-nachtmoor.svg?v=3.9.0.5');--banner-cloth:#4b1468}
#game .player-area[data-realm="sternenquell"]{--banner-crest:url('/assets/battle-v3817/banner-sternenquell.svg?v=3.9.0.5');--banner-cloth:#112e59}
#game .player-area:is([data-realm="auenhain"],[data-realm="nachtmoor"],[data-realm="sternenquell"]) .area-head::after{
 content:"";
 background-image:var(--banner-crest),linear-gradient(90deg,#d7aa51 0 2px,color-mix(in srgb,var(--banner-cloth),black 25%) 2px,var(--banner-cloth) 34%,color-mix(in srgb,var(--banner-cloth),white 10%) 58%,var(--banner-cloth) calc(100% - 2px),#d7aa51 calc(100% - 2px));
 background-repeat:no-repeat;
 background-size:calc(100% - 6px) 23px,100% 100%;
 background-position:center 11px,center;
}
@media(max-width:480px){
 #game .player-area:is([data-realm="auenhain"],[data-realm="nachtmoor"],[data-realm="sternenquell"]) .area-head::after{background-size:calc(100% - 4px) 19px,100% 100%;background-position:center 9px,center}
}
/* Longer turn messages may use the free space to the left of AP and timer. */
#game #turnActions .gametop.long-turn-status,
#game .sidebar #turnActions .gametop.long-turn-status{grid-template-columns:minmax(0,1fr) auto auto}
/* Desktop/tablet: hand cards first, then actions and turn controls. */
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game .sidebar .battle-actions{display:flex;flex-direction:column}
 #game .sidebar .battle-cards-title{order:0;margin:0;padding-top:6px}
 #game .sidebar #cardTabs{order:1}
 #game .sidebar #arcaneChoice{order:2}
 #game .sidebar .battle-section-title{order:3;margin:16px 0 12px}
 #game .sidebar #controls{order:4}
 #game .sidebar #pendingBox{order:5}
 #game .sidebar #turnActions{order:6}
}
/* Consistent centered card heading, including phones. */
#game .battle-actions .battle-cards-title{text-align:center}
@media(min-width:901px), (min-width:760px) and (orientation:landscape){
 #game .sidebar #cardTabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:stretch}
 #game .sidebar #cardTabs>button{min-width:0;min-height:64px;padding:23px 5px 8px;font-size:12px;line-height:1.3;hyphens:auto}
 #game .sidebar #cardTabs>button::before{left:50%;top:7px;transform:translateX(-50%);font-size:10px}
}
/* Phone HUD: small resource badges in the upper-right, health below the name. */
@media(max-width:600px){
 #game .area-head{display:block;padding:8px 26px 8px 8px}
 #game .commander-identity{display:flex;align-items:center;gap:8px;width:100%}
 #game .commander-portrait{width:44px;height:44px;flex-basis:44px}
 #game .commander-copy{position:relative;min-height:56px;padding-right:112px;padding-bottom:16px}
 #game .commander-copy>strong{font-size:12px;line-height:1.2}
 #game .commander-copy>small{font-size:11px;line-height:1.2;margin-top:3px}
 #game .health-track{position:absolute;left:0;right:0;bottom:0;width:100%;height:9px;margin:0}
 #game .mini-stats{position:absolute;top:8px;right:26px;width:104px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;margin:0}
 #game .mini-stats>span,#game .mini-stats>span:first-child{min-height:17px;padding:2px 3px;gap:2px;font-size:10px;line-height:1.2;border-radius:3px}
 #game #enemyAP,#game #myAP{font-size:12px}
 #game #enemyAP::before,#game #myAP::before{font-size:9px}
 #game .mini-stats .resource-gem{width:12px;height:13px}
 #game .area-head:has(.shield-status:not(.hidden)) .commander-copy{min-height:78px}
}
/* Keep this short empty-AP message together, using the space before AP and time. */
#game #turnActions .gametop.no-ap-status,
#game .sidebar #turnActions .gametop.no-ap-status{grid-template-columns:minmax(0,1fr) auto auto;gap:clamp(3px,1.2cqw,6px)}
#game #turnActions .gametop.no-ap-status #turnInfo{white-space:nowrap;overflow-wrap:normal}
/* Spell previews stay still, including when the pointer passes over a card. */
#handCardDialog,#handCardDialog *,#handCardDialog::before,#handCardDialog::after,
#handCardDialog *::before,#handCardDialog *::after{animation:none!important;transition:none!important;transform:none!important}
#cardReveal{animation:none!important;transition:none!important;transform:translate(-50%,-50%)!important}
#cardReveal *,#cardReveal *::before,#cardReveal *::after{animation:none!important;transition:none!important;transform:none!important}
/* Menu illustrations fill the cards behind their labels and controls. */
.royal-menu #home .join-panel.menu-card{display:grid;grid-template-rows:minmax(0,1fr);min-height:280px;isolation:isolate;overflow:hidden}
.royal-menu #home .menu-card .menu-card-art{position:absolute;inset:0;z-index:0;width:100%;height:100%;min-height:0;object-fit:cover;object-position:center;mask-image:none;-webkit-mask-image:none;border-radius:inherit}
.royal-menu #home .menu-card .menu-card-content,
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-content{position:relative;z-index:1;grid-row:1;align-self:end;margin:0;padding:18px 16px 14px;gap:8px;background:linear-gradient(#06152255,#061522dc 30%,#061522f5);text-shadow:0 1px 3px #000}
.royal-menu #home .menu-card .menu-card-symbol,
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{position:static;align-self:center;margin:0 0 3px}
.royal-menu #home .profile-dropdown button{text-align:center;justify-content:center}
@media(min-width:701px) and (orientation:landscape){
 .royal-menu #home .join-panel.menu-card{min-height:0}
 .royal-menu #home .menu-card .menu-card-content,
 .royal-menu #home .menu-card:has(.card-hit-target) .menu-card-content{padding:12px 16px;gap:7px}
}
/* Give the emblem and its caption a little more room inside the action frame. */
#game #controls>button>.action-emblem,#game #controls>button>.action-caption{position:relative;top:5px}

/* Attack and countdown badges have distinct, compact symbols on every faction. */
#game .tile>.attack-badge{min-width:0;max-width:calc(100% - 2px);box-sizing:border-box;gap:2px;padding:0 4px}
#game .attack-sword{display:inline-flex;align-items:center;justify-content:center;flex:none}
#game .attack-sword svg{display:block;width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#game .attack-value{font-variant-numeric:tabular-nums}
@media(max-width:600px){#game .tile>.attack-badge{padding:0 2px;font-size:10px}#game .attack-sword svg{width:11px;height:11px}}

/* The turn frame hugs the actual 6 by 5 grid, excluding HUD and column labels. */
#game #battlefield.active-turn .bottom-area{--turn-edge:#ffda62;--turn-glow:#f8c84366}
#game #battlefield.no-actions .bottom-area{--turn-edge:#ff6b62;--turn-glow:#ed474c80}
#game #battlefield:is(.active-turn,.no-actions) .bottom-area{outline:none;background:none;box-shadow:none;border-radius:0}
#game #myBoard{width:max-content;max-width:100%;margin-inline:auto}
#game #battlefield:is(.active-turn,.no-actions) #myBoard{
 outline:3px solid var(--turn-edge);outline-offset:1px;border-radius:3px;
 box-shadow:0 0 15px var(--turn-glow),inset 0 0 0 1px var(--turn-edge);
}
#game[data-turn-tone="ready"] .turn-actions{border-color:#ffda62;box-shadow:inset 0 0 14px #ffd34a13,0 0 9px #f8c84333}
#game[data-turn-tone="ready"] #turnInfo{color:#ffe89b}
#game[data-turn-tone="spent"] .turn-actions{border-color:#ff6b62;box-shadow:inset 0 0 18px #e7403b1f,0 0 12px #ed474c44}
#game[data-turn-tone="spent"] #turnInfo{color:#ffb5ac}
#game[data-turn-tone="spent"] .action-lights i.spent{border-color:#e2857e;background:#43252a;box-shadow:inset 0 0 4px #ff655b30}
#game[data-turn-tone="spent"] #myAP{color:#ffb5ac}

/* Balance both sides of the label; the chevron occupies its own right slot. */
.topbar #soundPanelToggle{position:relative;justify-content:center;text-align:center;padding-inline:22px;gap:0}
.topbar #soundPanelToggle .sound-panel-label{display:block;text-align:center}
.topbar #soundPanelToggle .sound-panel-chevron{position:absolute;right:9px;top:0;bottom:0;width:8px;display:flex;align-items:center;justify-content:center}

/* Native select labels must stay on one line; never show a clipped wrapped row. */
#trackSelect{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.royal-menu #menuSoundSlot #trackSelect{
 display:block;align-self:stretch;width:100%;max-width:none;min-width:0;
 box-sizing:border-box;height:46px;min-height:46px;max-height:46px;
 padding:0 32px 0 12px;line-height:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}

/* Keep the room symbols centered after changing their positioning to static. */
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{position:static;inset:auto;transform:none;justify-self:center;align-self:center;margin:0 auto 3px;display:flex;align-items:center;justify-content:center;line-height:1}
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol svg{display:block;flex:none;width:24px;height:24px}

.topbar #soundPanelToggle[aria-expanded="true"] {
  color: #fff0bd;
  background: linear-gradient(180deg, #75521b, #382813);
  border-color: #ffda80;
  box-shadow: inset 0 0 0 1px #f4c45b66, 0 0 8px #f4bc494d;
}

#game .own-board-wrap {position:relative}
#boardEndTurn:not([hidden]) {
  position:absolute;inset:0;margin:auto;z-index:10;
  display:grid;place-items:center;
  width:clamp(58px,15vw,90px);height:clamp(58px,15vw,90px);
  padding:0;border:2px solid #f6d89dbb;border-radius:50%;
  background:rgba(55,14,20,.66);color:#ffebbf;
  box-shadow:0 2px 12px #21081199;
}
#boardEndTurn[hidden] {display:none}
#boardEndTurn svg {width:53%;height:53%;pointer-events:none}
#boardEndTurn:focus-visible {outline:3px solid white;outline-offset:3px}
