/* Fantasy game chrome. Page geometry is shared; the existing combat HUD stays authoritative. */
body{--ui-forest:#244f49;--ui-edge:#ad8c4d;--ui-parchment:#fff6da}
#game-shell{background:linear-gradient(#fcfdf6,#e8f1e8);border-bottom:1px solid #a5baa6;box-shadow:0 3px 12px #234d4a14}
#game-shell .game-nav{gap:3px;grid-template-columns:repeat(7,minmax(44px,82px))}
#game-shell .game-nav>a{flex-direction:column;gap:0;border:1px solid transparent;border-radius:5px 5px 2px 2px;color:#48645b;font-size:12px;font-weight:800;min-height:60px;padding:2px 5px}
#game-shell .nav-emblem{width:38px;height:38px;flex:none;object-fit:contain;filter:drop-shadow(0 2px 1px #526e4e26)}
#game-shell .game-nav>a[aria-current=page]{color:#365d4a;background:linear-gradient(#fff9e5,#f0e9cb);border:1px solid #c8b87b;box-shadow:inset 0 1px #fffdf0,0 2px 0 #b4a46d}
#game-shell .game-nav>a[aria-current=page] .nav-emblem{filter:drop-shadow(0 2px 2px #b8903d44)}
#game-shell .game-nav>a[aria-current=page]:after{display:none}
#game-shell .game-nav>a:active{translate:0 1px}
#game-shell .game-context{overflow:visible}
.game-tools{position:relative;flex:none;white-space:normal}
.game-tools>summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;cursor:pointer;border:1px solid #b8aa7b;border-radius:5px;background:#fff9e7;color:#3a6258;box-shadow:inset 0 1px #fff}
.game-tools>summary::-webkit-details-marker{display:none}
.game-tools>summary>.nav-emblem{width:34px;height:34px}
.game-tools-tray{position:absolute;right:0;top:calc(100% + 10px);width:190px;display:grid;gap:7px;padding:12px;background:#fff8df;border:2px solid #b49b5c;border-radius:5px;box-shadow:0 8px 20px #244f4933;text-align:left;z-index:45}
.game-tools:not([open])>.game-tools-tray{display:none}
.game-tools-tray>button{width:100%;min-height:44px;margin:0;padding:8px!important;font-size:13px!important;border:1px solid #b2b69b;background:#edf0da;color:#31564a;border-radius:4px}
.game-tools-tray>button:disabled{opacity:.5}
.game-tools>summary:focus-visible{outline:3px solid #aa7931;outline-offset:2px}
body[data-game-page] :is(.status-strip,.account-message,.account-state){min-height:24px;padding:3px 0 7px;margin:0;border:0;background:none;box-shadow:none;gap:8px}
body[data-game-page] :is(.status-strip,.account-message,.account-state)>p{font-size:12px;line-height:1.5;margin:0;color:#47665b}
body[data-game-page] :is(#status,#mini-status)[data-error=true]{color:#9e362c;background:#fff0df;border-left:3px solid #b34734;padding:8px 10px}
body[data-game-page] :is(button,.button):not(:disabled):active{translate:0 1px}
body[data-game-page] :is(.shop-heading,.workbench-heading,.records-intro,.intro){padding-block:9px;margin-block:0;gap:12px}
body[data-game-page] :is(.shop-heading,.workbench-heading,.records-intro,.intro) .eyebrow{display:none}
body[data-game-page] :is(.shop-heading,.workbench-heading,.records-intro,.intro) h1{font-size:26px}
body[data-game-page] .account>strong{font-size:20px;color:#6f5425}
body[data-game-page] .account p{font-size:10px;margin:2px 0}
body[data-game-page=collection] .collection-progress{padding:10px 16px;background:#fff8e3;border:1px solid #baa36e;border-radius:5px;box-shadow:inset 0 0 0 3px #f0e6c8}
body[data-game-page=collection] .collection-progress .section-heading{margin:0;gap:8px}
body[data-game-page=collection] .collection-progress h2{font-size:16px}
body[data-game-page=collection] #archive-bar{height:7px;margin:5px 0}
body[data-game-page=collection] #archive-next{margin:3px 0;font-size:11px}
body[data-game-page=collection] #archive-details>summary{min-height:32px;padding:7px 0;font-size:11px}
body[data-game-page=collection] .library{border-top:3px solid #a38c53;background:#fffbee}
body[data-game-page=collection] .member-group>h3{color:#345a4d;border-bottom-color:#c6b782}
body[data-game-page=records] .ranking-tabs>button{border-radius:5px 5px 0 0;box-shadow:inset 0 1px #fff6d1;min-height:44px}
body[data-game-page=records] .ranking-tabs>button[aria-selected=true]{background:#315f51;color:#ffebaa;border-color:#b59950}
body[data-game-page=records] .board-toolbar{padding-block:10px}
body[data-game-page=shop] .shop-tabs{min-height:48px;gap:8px;margin-bottom:10px}
body[data-game-page=shop] .shop-tabs button{min-height:44px;padding:8px 20px;border-radius:5px 5px 0 0}
body[data-game-page=shop] .pack-showcase{min-height:370px}
/* The lobby is a playable home scene, not a long landing-page hero. */
body[data-game-page=lobby] .hero{min-height:340px;padding:24px 32px;grid-template-columns:1.3fr .7fr;border:2px solid #b2a56c;border-top:4px solid #b49a57;border-radius:7px;box-shadow:inset 0 0 0 3px #fff4cd,0 6px 0 #b0bda0}
body[data-game-page=lobby] .hero:before{background:linear-gradient(90deg,#edf5dbd9,#edf5db77 45%,#d9eddd18),url('https://pub-455b942732344b108b7f822583865d5e.r2.dev/season3-media/989a993fc2e7f9d7231ee2f8.webp') center/cover;filter:none}
body[data-game-page=lobby] .hero h1{font-size:clamp(32px,3.5vw,48px);color:#264d43;text-shadow:0 2px #fff3c0;margin:0 0 20px}
body[data-game-page=lobby] .hero .eyebrow{margin:0 0 10px;color:#6c743d}
body[data-game-page=lobby] .card-stage{min-height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
body[data-game-page=lobby] .card-stage .featured-change{position:static;min-height:44px;flex:none;padding:0 12px;border-radius:5px;font-size:11px;box-shadow:0 2px 0 #b5a577}
body[data-game-page=lobby] .featured-card{width:166px;transform:none;background:#fff5d6;box-shadow:0 5px 0 #a7a176,0 12px 20px #365d4b44}
body[data-game-page=lobby] .featured-photo{height:190px}
body[data-game-page=lobby] .featured-card figcaption{padding:8px 5px 5px}
body[data-game-page=lobby] .featured-card strong{font-size:19px}
body[data-game-page=lobby] .card-echo{width:165px;height:240px;transform:translate(16px,-5px) rotate(6deg)}
body[data-game-page=lobby] .season-number{display:none}
body[data-game-page=lobby] .hero-actions .primary{min-width:210px;background:linear-gradient(#649858,#355f42);border:2px solid #c0a356;border-bottom:4px solid #9c7f3b;box-shadow:inset 0 1px #b6ca84,0 3px 0 #f5e8b5;border-radius:6px;color:#fff4c3}
body[data-game-page=lobby] .overview{padding:12px 16px;gap:18px;margin:12px 0;background:#fff8e3;border:1px solid #baad7d;border-radius:5px}
body[data-game-page=lobby] .overview strong{font-size:23px;margin:3px 0;color:#375b49}
body[data-game-page=lobby] .expedition-panel{border-radius:6px;border-color:#b8a572;background:#f4f2d7;box-shadow:inset 0 0 0 3px #fffbe8}
body[data-game-page=shop] .pack-showcase{border:2px solid #b3a16c;border-radius:7px;background:radial-gradient(ellipse at 25% 50%,#e6edcf,#fff8df 70%);box-shadow:inset 0 0 0 4px #fffce9,0 6px 0 #b1bb99}
body[data-game-page=shop] .pack-stage img{height:300px;max-width:90%;object-fit:contain;filter:drop-shadow(0 15px 12px #3a604a33)}
body[data-game-page=shop] .pack-copy{padding:22px 26px 22px 0}
body[data-game-page=shop] .pack-copy h2{font-size:31px;margin:5px 0 12px;color:#345645}
body[data-game-page=shop] .pack-copy>.eyebrow{display:none}
body[data-game-page=shop] .pack-facts{margin:10px 0 16px}
body[data-game-page=shop] .purchase{min-height:62px;border:1px solid #a6b18a;border-bottom:3px solid #a1ad84;border-radius:5px;background:linear-gradient(#f4f7df,#e0e8cb);color:#345847}
body[data-game-page=shop] .purchase.primary{background:linear-gradient(#639557,#345d43);border:2px solid #b99d50;border-bottom:4px solid #95773b;color:#fff2b8;box-shadow:inset 0 1px #a1be83}
body[data-game-page=shop] .purchase:disabled{opacity:.55}
body[data-game-page=minigames] .ready-art>span{display:block;position:relative;width:180px;height:210px;margin:0 auto 20px;font-size:0;background:url('https://pub-455b942732344b108b7f822583865d5e.r2.dev/season3-media/95ebead08dfc6ddb30bab5a0.png') center/contain no-repeat;filter:drop-shadow(0 10px 9px #355c4f44);transform:rotate(-8deg)}
body[data-game-page=minigames] .ready-art>span:after{content:"";position:absolute;inset:8px -30px -8px 30px;z-index:-1;background:inherit;transform:rotate(16deg)}
body[data-game-page=minigames] .game-table{background:radial-gradient(ellipse at center,#f8f4d9,#e2eaca);border:2px solid #afaa79;box-shadow:inset 0 0 0 5px #faf6df}
body[data-game-page=minigames] .arcade-controls{background:#fff9e3;border:1px solid #b5af81;border-top:3px solid #af9452;box-shadow:inset 0 0 0 3px #f1ebce}
body[data-game-page=minigames] #mini-start{background:linear-gradient(#639557,#355f42);border:2px solid #c0a356;border-bottom:4px solid #9c7f3b;color:#fff2bc}
body[data-game-page=records] .records-intro{background:none;border:0;box-shadow:none;min-height:0;margin-bottom:6px}
body[data-game-page=records] #server-records{background:#fff9e7;border:1px solid #b7aa77;border-top:3px solid #ac9455;border-radius:6px;padding:14px 20px;box-shadow:inset 0 0 0 4px #f0ecd4}
body[data-game-page=records] .ranking-list>li{padding:12px 4px}
body[data-game-page=records] .ranking-list>li:is([data-rank="1"],[data-rank="2"],[data-rank="3"]){background:linear-gradient(90deg,#fff0be,#fbf6de);border:1px solid #d0b774;border-radius:5px;margin-bottom:8px;padding:15px 12px;box-shadow:inset 0 0 0 3px #fff9e6}
body[data-game-page=records] .ranking-list>li[data-rank="1"] .rank{background:linear-gradient(#f6d470,#bc8f32);color:#fffde1;border:2px solid #a98135;text-shadow:0 1px #8a6a27}
body[data-game-page=records] .rules-note strong{font-size:14px}
@media(max-width:1100px){#game-shell .game-nav>a{gap:0;font-size:11px;padding:2px;min-height:44px}#game-shell .nav-emblem{width:29px;height:29px}#game-shell .shell-edition{display:none}}
@media(max-width:900px){#game-shell .game-nav{grid-template-columns:repeat(7,minmax(0,1fr));gap:0}}
@media(max-height:540px) and (orientation:landscape){
 body[data-game-page]>main{padding-top:6px}
 body[data-game-page] :is(.shop-heading,.workbench-heading,.records-intro,.intro){padding-block:3px;min-height:28px}
 body[data-game-page] :is(.shop-heading,.workbench-heading,.records-intro,.intro) h1{font-size:21px}
 body[data-game-page] :is(.status-strip,.account-message,.account-state){padding:1px 0 4px;min-height:18px}
 body[data-game-page] :is(.status-strip,.account-message,.account-state)>p{font-size:10px}
 body[data-game-page] .account p{display:none}
 body[data-game-page=collection] .collection-progress{padding:6px 12px;display:grid;grid-template-columns:1fr auto;gap:0 14px;margin-bottom:8px}
 body[data-game-page=collection] .collection-progress .section-heading{grid-column:1}
 body[data-game-page=collection] #archive-bar{grid-column:1;width:100%;margin:3px 0}
 body[data-game-page=collection] #archive-next{grid-column:1}
 body[data-game-page=collection] #archive-details{grid-column:2;grid-row:1/4;align-self:center;max-width:220px}
 body[data-game-page=collection] #archive-details>summary{min-height:44px;display:flex;align-items:center}
 body[data-game-page=collection] #archive-details[open]{grid-column:1/-1;grid-row:auto;max-width:none}
 body[data-game-page=shop] .pack-showcase{min-height:260px}
 body[data-game-page=shop] .pack-stage img{height:205px}
 body[data-game-page=shop] .pack-copy{padding:12px 16px 12px 0}
 body[data-game-page=shop] .pack-copy h2{font-size:23px;margin:0 0 6px}
 body[data-game-page=shop] .pack-facts{margin:5px 0 8px}
 body[data-game-page=shop] .pack-facts b{font-size:17px}
 body[data-game-page=shop] .purchase{min-height:48px;padding:6px 10px}
 body[data-game-page=shop] .purchase b{font-size:18px}
 body[data-game-page=shop] .purchase small{font-size:9px}
 body[data-game-page=shop] .purchase-options{gap:6px}
 body[data-game-page=shop] .purchase-note{margin:5px 0;font-size:9px}
 body[data-game-page=lobby] .hero{min-height:230px;padding:15px 26px;grid-template-columns:1.4fr .6fr}
 body[data-game-page=lobby] .hero h1{font-size:30px;margin-bottom:14px}
 body[data-game-page=lobby] .card-stage{min-height:195px}
 body[data-game-page=lobby] .featured-card{width:116px;margin:0}
 body[data-game-page=lobby] .featured-photo{height:110px}
 body[data-game-page=lobby] .featured-card strong{font-size:14px}
 body[data-game-page=lobby] .featured-card small{display:none}
 body[data-game-page=lobby] .card-echo{width:116px;height:175px}
 body[data-game-page=lobby] .overview{margin:8px 0;padding:8px 12px}
 body[data-game-page=lobby] .overview strong{font-size:19px}
 body[data-game-page=minigames] .ready-art>span{width:96px;height:120px;margin-bottom:8px}
 body[data-game-page=minigames] .ready-art h1{font-size:25px;margin:5px 0}
 body[data-game-page=records] .records-intro{padding-inline:0;grid-template-columns:1fr auto}
 body[data-game-page=records] .board-toolbar h2{font-size:18px}
 body[data-game-page=records] #server-records{padding:10px 14px}
 body[data-game-page=records] .rules-note{padding:0;border:0}
 body[data-game-page=shop] .shop-tabs{margin-bottom:5px;min-height:44px}
 body[data-game-page=records] .rules-note{font-size:11px}
}
@media(max-width:600px) and (orientation:portrait){
 #game-shell{grid-template-columns:95px minmax(0,1fr)}
 body[data-game-page=lobby] .hero{padding:18px;min-height:0;grid-template-columns:1fr .65fr;gap:6px}
 body[data-game-page=lobby] .hero h1{font-size:27px;letter-spacing:-1.5px;margin-bottom:14px}
 body[data-game-page=lobby] .hero .eyebrow{font-size:8px}
 body[data-game-page=lobby] .hero-actions{display:grid;gap:5px}
 body[data-game-page=lobby] .hero-actions .primary{min-width:0;min-height:48px;font-size:14px;padding:8px 12px}
 body[data-game-page=lobby] .hero-actions .text-link{font-size:11px;min-height:44px;display:flex;align-items:center}
 body[data-game-page=lobby] .card-stage{min-height:190px}
 body[data-game-page=lobby] .featured-card{width:108px}
 body[data-game-page=lobby] .featured-photo{height:127px}
 body[data-game-page=lobby] .featured-card strong{font-size:14px}
 body[data-game-page=lobby] .featured-card figcaption{padding:4px}
 body[data-game-page=lobby] .featured-card small{display:none}
 body[data-game-page=lobby] .card-echo{width:108px;height:165px}
 body[data-game-page=lobby] .overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:10px}
 body[data-game-page=lobby] .overview>div+div{padding-left:8px}
 body[data-game-page=lobby] .overview>div:last-child{grid-column:auto;border-top:0;border-left:1px solid #c2c9a9;display:block;padding:0 0 0 8px}
 body[data-game-page=lobby] .overview strong{font-size:17px}
 body[data-game-page=lobby] .overview small{font-size:9px}
 body[data-game-page=shop] .pack-showcase{grid-template-columns:95px minmax(0,1fr);min-height:0;align-items:center}
 body[data-game-page=shop] .pack-stage{height:170px}
 body[data-game-page=shop] .pack-stage img{height:155px;max-width:100%}
 body[data-game-page=shop] .pack-copy{padding:16px 10px 16px 0}
 body[data-game-page=shop] .pack-copy h2{font-size:23px}
 body[data-game-page=shop] .pack-facts{gap:10px;margin:6px 0 10px}
 body[data-game-page=shop] .pack-facts b{font-size:13px}
 body[data-game-page=shop] .pack-facts span{font-size:9px}
 body[data-game-page=shop] main .purchase{min-height:58px;padding:8px;gap:5px}
 body[data-game-page=shop] .purchase span{font-size:12px}
 body[data-game-page=shop] .purchase b{font-size:17px;white-space:nowrap}
 body[data-game-page=shop] .purchase small{font-size:9px}
 body[data-game-page=shop] .purchase-note{font-size:9px}
 body[data-game-page=records] .records-intro{grid-template-columns:1fr auto;padding-inline:0;gap:8px}
 body[data-game-page=records] .rules-note{border:0;padding:0}
 body[data-game-page=records] .rules-note strong{font-size:10px}
}
@media(prefers-reduced-motion:reduce){body[data-game-page] :is(button,.button):active,#game-shell .game-nav>a:active{translate:none}}
/* Player buff hover details (src/ui/buff-tip.js) and the small mark on buffed players. */
.buff-tip{position:fixed;z-index:60;max-width:260px;padding:9px 12px;border:1px solid #d9b56a;border-radius:9px;background:#3b2608f2;color:#fff4d6;font-size:12px;line-height:1.65;white-space:pre-line;pointer-events:none;box-shadow:0 8px 24px #2a1a0440}
.buff-tip::first-line{font-weight:800;color:#ffd77a}
.buff-tip[hidden]{display:none}
.buff-mark{display:inline-grid;place-items:center;padding:1px 7px;border:1px solid #d9b56a;border-radius:999px;background:linear-gradient(180deg,#fff4d6,#f3dca6);color:#7a4a12;font-size:10px;font-weight:800;line-height:1.5;letter-spacing:.02em;white-space:nowrap}
