/* Shared game chrome. Six fixed navigation anchors; page wallets/titles never move them. */
/* Set in static HTML before first paint and in local live-mode previews. Keep actual warnings/login outside these. */
html[data-service=live] :is(.mode-strip,#mode-banner,.build-tag,.development-settings,.local-disclaimer,#test-credit,#backup-panel,#revision,#performance,#dev-panel,[data-development-only]){display:none!important}
html[data-service=live] .arcade-heading>span{display:none!important}
#game-shell .game-nav{align-self:center}
#game-shell .game-context{gap:8px;white-space:nowrap}
#game-shell .game-context .wallet{flex:1 1 auto;width:auto}
.live-logout{flex:none;white-space:nowrap}
.records-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#server-records .board-toolbar{flex-wrap:wrap;gap:12px}
:root{--game-header-height:72px;--game-header-pad:clamp(16px,2vw,28px)}
html{scroll-padding-top:calc(var(--game-header-height) + 12px)}
.skip-link:focus{z-index:100}
#game-shell{box-sizing:border-box;position:sticky;top:0;z-index:30;display:grid;grid-template-columns:180px minmax(0,1fr) 180px;grid-template-rows:1fr;align-items:center;gap:16px;width:100%;max-width:none;height:var(--game-header-height);min-height:0;margin:0;padding:0 var(--game-header-pad);background:#fffef7fa;color:#245568;border:0;border-bottom:1px solid #accbd0;box-shadow:0 2px 12px #315e6a0b;isolation:isolate;flex-wrap:nowrap}
#game-shell .game-brand{display:flex;align-items:center;justify-content:start;gap:10px;min-width:0;margin:0;padding:0;color:#245568;text-decoration:none;white-space:nowrap;font:800 20px/1.2 "Malgun Gothic",sans-serif;transform:none}
#game-shell .game-brand>b{box-sizing:border-box;display:grid;place-items:center;flex:none;width:31px;height:35px;margin:0;padding:0;background:#e2c384;color:#315c68;border:1px solid #ba9a54;border-radius:4px;box-shadow:inset 0 1px #fff4c5;font:900 23px/1 Georgia,serif;transform:none}
#game-shell .game-brand>span{display:block;font:inherit;letter-spacing:0}
#game-shell .game-brand small{display:block;margin:4px 0 0;font:8px/1.2 Georgia,serif;letter-spacing:.08em;color:#66838d}
#game-shell .game-nav{display:grid;grid-template-columns:repeat(7,minmax(44px,76px));grid-column:2;grid-row:1;justify-content:center;align-items:center;gap:0;margin:0;padding:0;width:100%;min-width:0;order:0;font:700 13px/1.2 "Malgun Gothic",sans-serif}
#game-shell .game-nav>a{box-sizing:border-box;position:relative;display:flex;justify-content:center;align-items:center;min-width:44px;min-height:44px;margin:0;padding:0 8px;color:#537783;background:transparent;border:0;border-radius:3px;box-shadow:none;text-decoration:none;text-align:center;font:inherit;letter-spacing:0;white-space:nowrap;transform:none;transition:color .15s,background .15s;touch-action:manipulation}
#game-shell .game-nav>a:hover{background:#e9f1e8;color:#246d74}
#game-shell .game-nav>a[aria-current=page]{color:#1e747a;background:#edf3e7;box-shadow:none;border:0}
#game-shell .game-nav>a[aria-current=page]:after{content:"";position:absolute;bottom:2px;left:12px;right:12px;height:2px;background:#b9924b}
#game-shell a:focus-visible{outline:3px solid #a77d37;outline-offset:-3px}
#game-shell [hidden]{display:none}
#game-shell .game-context{grid-column:3;grid-row:1;display:flex;justify-content:end;align-items:center;min-width:0;max-width:100%;height:44px;border-left:1px solid #c3d7d3;padding-left:12px;overflow:hidden;text-align:right;font-variant-numeric:tabular-nums}
#game-shell .game-context>.wallet{display:block;width:100%;min-width:0;max-width:100%;margin:0;padding:0;border:0;text-align:right}
#game-shell .game-context .wallet>span,#game-shell .game-context .wallet>small{display:block;margin:0;padding:0;font:10px/1.3 "Malgun Gothic",sans-serif;color:#63838e}
#game-shell .game-context .wallet>strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font:800 18px/1.3 "Malgun Gothic",sans-serif;white-space:nowrap;color:#37797d}
#game-shell .shell-edition{font:700 10px/1.4 Georgia,serif;letter-spacing:.09em;color:#8b733d}
#game-shell .build-tag{display:block;margin:0;font-size:9px;line-height:1.5;color:#728c91;white-space:normal}
#game-shell .build-tag b{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;letter-spacing:.08em;color:#8b733d}
#game-shell .doc-link{display:none}
/* Consistent game-panel heading scale; the lobby retains its key-art scene. */
body>main>.shop-heading h1,body>main>.intro h1,body>main>.workbench-heading h1,body>main>.records-intro h1,#setup>.setup-intro h1{font-size:30px;line-height:1.2;letter-spacing:-.04em;margin:0}
body>main>.records-intro{padding:24px 28px;min-height:0;align-items:center}
body>main>.records-intro .eyebrow{display:none}
body>main>.records-intro .rules-note{max-width:100%;min-width:0;font-size:12px;overflow-wrap:anywhere}
body>main>.records-intro .rules-note strong{display:block;font-size:14px;margin-bottom:6px}
body>main>.records-intro .rules-note>span{display:block;font-size:11px;line-height:1.6}
body>main>.local-notice{padding:24px 28px;min-height:0;display:flex;align-items:center;justify-content:space-between;gap:18px}
body>main>.local-notice h2{font-size:20px;margin:0}
body>main>.local-notice p{display:none}
body>main>.local-notice .button{margin:0;flex:none;min-height:44px}
#local-notice[hidden]{display:none}
/* The archive is a card browser, not a landing page: keep its cards above the fold. */
#game-shell[data-screen=collection]~main>.intro{padding:0;min-height:0;margin:0 0 10px;gap:16px}
#game-shell[data-screen=collection]~main>.intro .eyebrow{margin:0 0 5px}
#game-shell[data-screen=collection]~main>.intro .account{min-width:240px;padding:10px 16px}
#game-shell[data-screen=collection]~main>.intro .account>strong{font-size:24px;margin-top:3px}
#game-shell[data-screen=collection]~main>.intro .account p{margin:3px 0}
#game-shell[data-screen=collection]~main>.status-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0}
#game-shell[data-screen=collection]~main>.collection-progress{padding:12px 18px;margin:12px 0 18px}
#game-shell[data-screen=collection]~main>.collection-progress .section-heading{margin-bottom:8px}
#game-shell[data-screen=collection]~main>.collection-progress .eyebrow{display:none}
#game-shell[data-screen=collection]~main>.collection-progress h2{font-size:20px}
#game-shell[data-screen=collection]~main>.collection-progress>p{font-size:11px;margin:8px 0}
#game-shell[data-screen=collection]~main>.collection-progress summary{min-height:44px;display:list-item;padding-block:12px;font-size:11px}
#selection-note[hidden]{display:none}
#setup>.setup-intro{padding:18px 24px;margin-bottom:12px}
#setup>.development-settings{padding:0;margin-bottom:10px}
#campaign-hud{margin:12px 0 4px;padding:12px 16px;border-width:2px;border-radius:12px}
#campaign-hud .campaign-banner{margin-bottom:10px;gap:10px}
#campaign-hud .campaign-banner small,#campaign-hud .campaign-eyebrow{display:none}
#campaign-hud .campaign-banner strong{font-size:18px}
#campaign-hud .campaign-crest{width:32px;height:32px;border-radius:9px}
#campaign-hud .campaign-crest i{left:9px;top:6px;height:21px;width:3px}
#campaign-hud .campaign-crest i:after{width:15px;height:11px;left:3px}
#campaign-hud .campaign-wallet>div{padding:7px 9px;border-radius:7px;border-width:1px}
#campaign-hud .campaign-wallet b{font-size:14px;white-space:normal;line-height:1.4}
#campaign-hud .campaign-loot{gap:5px;margin-bottom:0}
#campaign-hud .campaign-loot span{font-size:11px;padding:4px 8px;border-width:1px}
body>main .section-nav{top:var(--game-header-height)}
@media(min-width:1150px){body>main .detail,body>main .picker-sidebar{top:calc(var(--game-header-height) + 12px)}}
body:has(#game:not([hidden])) main{height:calc(100dvh - var(--game-header-height))}
@media(max-width:900px){
 :root{--game-header-height:104px;--game-header-pad:12px}
 #game-shell{grid-template-columns:1fr 1fr;grid-template-rows:48px 48px;gap:0;padding:4px var(--game-header-pad)}
 #game-shell .game-brand{grid-column:1;grid-row:1;font-size:18px;gap:8px}
 #game-shell .game-brand>b{width:27px;height:31px;font-size:21px}
 #game-shell .game-brand small{font-size:7px;margin-top:2px}
 #game-shell .game-nav{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(7,minmax(0,1fr));font-size:11px}
 #game-shell .game-nav>a{padding-inline:3px}
 #game-shell .game-context{grid-column:2;grid-row:1;height:34px}
 #game-shell .game-context .wallet>strong{font-size:16px}
 #game-shell .game-context .wallet>span,#game-shell .game-context .wallet>small{font-size:9px}
 body>main>.shop-heading h1,body>main>.intro h1,body>main>.workbench-heading h1,body>main>.records-intro h1,#setup>.setup-intro h1{font-size:25px}
 body>main>.records-intro{padding:20px;gap:16px}
 body>main>.local-notice{padding:20px;align-items:start;flex-direction:column}
 #game-shell[data-screen=collection]~main>.intro{display:flex;align-items:center}
 #game-shell[data-screen=collection]~main>.intro .account{min-width:0;margin:0;padding:8px 12px}
 #game-shell[data-screen=collection]~main>.intro .account>span{display:none}
 #game-shell[data-screen=collection]~main>.intro .account>strong{font-size:20px}
 #game-shell[data-screen=collection]~main>.intro .account small{font-size:9px}
}
@media(max-width:600px){
 #campaign-hud .campaign-wallet{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:8px}
 #campaign-hud .campaign-wallet .campaign-day{grid-column:auto}
 #campaign-hud .campaign-wallet b{font-size:12px}
 #campaign-hud .campaign-wallet small{font-size:10px}
 #campaign-hud .campaign-wallet meter{height:6px;margin-top:2px}
}
@media(max-width:350px){:root{--game-header-pad:4px}#game-shell .game-nav{font-size:10px}#game-shell .game-brand small{font-size:6px}#game-shell .build-tag{font-size:8px}}
@media(max-height:540px) and (orientation:landscape){
 :root{--game-header-height:56px;--game-header-pad:12px}
 #game-shell{grid-template-columns:100px minmax(0,1fr) clamp(116px,17vw,144px);grid-template-rows:1fr;gap:8px;padding:0 var(--game-header-pad)}
 #game-shell .shell-edition{display:none}
 #game-shell .game-brand{grid-column:1;grid-row:1;font-size:16px;gap:6px}
 #game-shell .game-brand>b{width:23px;height:28px;font-size:19px}
 #game-shell .game-brand small{display:none}
 #game-shell .game-nav{grid-column:2;grid-row:1;grid-template-columns:repeat(7,minmax(44px,64px));font-size:11px}
 #game-shell .game-context{grid-column:3;grid-row:1}
 #game-shell .game-context .wallet>strong{font-size:14px}
 #game .stage{min-height:168px;min-width:312px}
}
@media(prefers-reduced-motion:reduce){#game-shell a{transition:none}}
/* Representative card emblem in place of the "C" mark (src/ui/representative.js). Same box size, so nothing moves. */
#game-shell .game-brand>b.has-card{overflow:hidden;background:#183e51;border-color:#ba9a54;box-shadow:inset 0 0 0 1px #fff4c566}
#game-shell .game-brand>b.has-card>img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 18%}
#game-shell .game-brand>b.has-card[data-rarity=S]{border-color:#d29b3a}
#game-shell .game-brand>b.has-card[data-rarity=SS]{border-color:#b44f6b;box-shadow:0 0 0 1px #f1b3c4}
#game-shell .game-brand>b.has-card[data-rarity=SSS]{border-color:#8b5bd0;box-shadow:0 0 0 1px #d8c2ff,0 0 6px #b58cff99}

/* Live server mode: login strip, logout and the "not connected yet" stop banner. Inherits each page's colours. */
.live-login form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:8px 0}
.live-login label{display:grid;gap:4px;font-size:.8rem;letter-spacing:.04em}
.live-login input{min-height:40px;min-width:min(220px,100%);padding:0 12px;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font:inherit}
.live-login button,.live-logout{min-height:40px;padding:0 14px;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.live-unsupported{position:sticky;top:0;z-index:50;margin:0;padding:12px 16px;background:#3a1d1d;color:#ffe7c2;border-bottom:2px solid #f0b35b;font-weight:600}
.live-unsupported a{color:#ffd27f;margin-left:8px}
