/* Compact in-game interface: shared chrome, readable controls, unobstructed boards. */
:root{--top-height:52px;--ui-ink:#222b34;--ui-muted:#65727e;--ui-line:#cdd5dc;--ui-paper:#f5f7f8;--ui-accent:#007cae;--ui-cyan:#45caff;--ui-dark:#141c25;color:var(--ui-ink);font-size:16px}
body{background:#dfe5e9;color:var(--ui-ink)}
button,select,summary,a{touch-action:manipulation}button,summary{transition:background .15s,border-color .15s,color .15s}
:where(button,a,summary,select):focus-visible{outline:2px solid #008bc4;outline-offset:3px}
header.arcade-top{height:var(--top-height);padding:6px 16px;gap:12px;background:#f9fbfcf2;backdrop-filter:blur(16px);border-bottom:1px solid #bfcad3;box-shadow:none}
.arcade-top .brand{font-size:16px;letter-spacing:-.6px;gap:8px}.arcade-top .brand-icon{width:27px;height:29px;border-radius:0;background:#202a34;color:#64d8ff;font-size:22px;clip-path:polygon(0 0,100% 0,100% 78%,76% 100%,0 100%)}
.top-dropdown>summary{min-height:34px;padding:5px 10px;border-radius:2px;border-color:var(--ui-line);background:#fff;font-size:14px;gap:7px}.top-dropdown[open]>summary{background:#e5f5fb;border-color:var(--ui-accent);color:#006a94}
#current-game-icon,.game-menu .tab-fruit{display:grid;place-items:center;font-size:18px;color:inherit}#current-game-icon svg,.tab-fruit svg,.top-dropdown>summary svg{width:19px;height:19px;display:block;flex-shrink:0}
.top-popover,.game-menu{top:calc(100% + 8px);border-radius:2px;background:#f9fbfcf5;border:1px solid #bdc9d3;border-top:3px solid #263644;box-shadow:0 14px 32px #18273526;backdrop-filter:blur(18px);padding:14px;max-height:calc(100dvh - 70px)}
.game-menu{width:420px;display:grid;grid-template-columns:1fr 1fr;gap:14px}.game-category+.game-category{margin:0}.game-category h2{font-size:12px;letter-spacing:1px;color:#60717e;border-bottom:1px solid #d2dce4;padding:0 0 7px;margin:0 0 5px}
.game-menu .game-tab{border:0;border-left:2px solid transparent;border-radius:0;padding:8px;gap:9px;margin:0;background:transparent;color:#3c4c58;min-height:36px}.game-menu .game-tab strong{font-size:14px;font-weight:500}.game-menu .tab-fruit{min-width:22px}.game-menu .game-tab:hover{background:#e6edf2}.game-menu .game-tab.active{background:#def3fc;color:#006893;border-color:#00a6de;box-shadow:none}.game-menu .game-tab.active strong{font-weight:800}.game-menu .game-tab .tab-fruit{color:inherit}
.top-popover{width:320px}.top-popover .how h2{font-size:16px;margin:8px 0 12px}.top-popover li{color:#586976;font-size:14px;margin-bottom:10px}.top-popover li:before{background:#e1edf3;color:#226c8b;border-radius:1px}.top-popover .tip{color:#60717e;font-size:12px}.tiny-label{color:#60717e;font-size:12px}.account-state{color:#586976}
main{padding:8px}.layout>section{min-height:calc(100dvh - var(--top-height) - 16px);border-radius:3px;box-shadow:none}
#apple-panel,#maze-panel,#sort-panel,#bird-panel,#nono-panel,#tiles-panel,#pack-panel,#fortress-panel,.game-panel{background:var(--ui-paper);border:1px solid var(--ui-line);color:var(--ui-ink);border-radius:3px;box-shadow:none}
:is(.game-heading,.r-head,.b-head,.m-head,.s-head,.bird-head,.n-head,.t-head,.p-head,.f-head){padding:10px 16px;gap:10px;min-height:48px;border-bottom:1px solid #ccd5dd;align-items:center}
:is(.game-heading,.r-head,.b-head,.m-head,.s-head,.bird-head,.n-head,.t-head,.p-head,.f-head) h2{font-size:18px;line-height:1.3;letter-spacing:-.5px;margin:0;font-weight:800}
:is(.game-heading,.b-head,.m-head,.s-head,.bird-head,.n-head,.t-head,.p-head,.f-head) small,.game-heading h2 span{display:none}
:is(.stats,.r-hud,.b-stats,.m-stats,.s-stats,.bird-stats,.t-stats,.p-stats,.f-hud){padding:9px 16px;gap:22px;margin:0;justify-content:flex-start;align-items:center;font-size:12px;color:var(--ui-muted);font-variant-numeric:tabular-nums}
:is(.stats,.b-stats,.m-stats,.s-stats,.bird-stats,.t-stats,.p-stats,.f-hud) strong{font-size:19px;color:var(--ui-ink);font-weight:750;line-height:1.3}
:is(.stats,.b-stats,.p-stats,.f-hud) span{font-size:12px;margin:0}.stats>div{min-width:90px}.stats strong small{font-size:12px}.t-stats>div{min-width:80px;background:transparent;border-radius:0;padding:0 20px 0 0;border-right:1px solid var(--ui-line);text-align:left}.t-stats span{font-size:12px;color:var(--ui-muted)}.b-stats strong{margin:1px 0}.m-stats strong,.s-stats strong,.bird-stats strong{margin-left:8px}
:is(.sub-button,.r-btn,.r-banish,.m-actions button,.s-actions button,.bird-actions button,.n-toolbar button,.n-actions button,.t-actions button,.t-head button,.p-actions button,.f-controls button,.f-head button,.b-head button,:where(#t-overlay button,#account-actions a,#account-actions button,#account-dialog button)){min-height:34px;padding:6px 12px;border:1px solid var(--ui-line);border-radius:2px;background:#ffffffd9;color:#364753;font:inherit;font-size:14px;box-shadow:none;line-height:1.45}
:is(.sub-button,.m-actions button,.s-actions button,.bird-actions button,.n-toolbar button,.n-actions button,.t-actions button,.p-actions button):hover:not(:disabled){background:#e4f4fc;border-color:#65b9d8;color:#00658b}
:is(.m-head,.s-head,.bird-head,.n-head,.p-head) select,.r-starter{min-height:34px;border:1px solid #bdcbd4;border-radius:2px;padding:5px 9px;background:#fff;color:#344854;font:inherit;font-size:14px}
:is(.primary,.r-start,#b-action,#f-action,#m-next,#s-next,#bird-next,#n-next,#t-continue,#p-next){min-height:38px;padding:8px 22px;border:0;border-radius:1px;background:#29b8ed;color:#092332;box-shadow:none;font-size:14px;font-weight:800;line-height:1.5;clip-path:polygon(0 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%)}
:is(.primary,.r-start,#b-action,#f-action):hover{background:#79dbff;transform:none}.primary{min-width:150px}.primary span{margin-left:12px}
:is(.m-actions,.s-actions,.bird-actions,.n-toolbar,.n-actions,.t-actions,.p-actions){padding:10px 16px;gap:7px}.t-actions [data-slide],.p-actions button[data-pack-direction]{min-width:36px;padding:4px 10px;font-size:20px}
:is(.game-footer,.r-bottom,.b-controls){padding:8px 16px;font-size:12px;line-height:1.6}.game-footer{color:#5f707e;border-top:1px solid #d4dce2}.game-footer #status{font-size:14px}
:is(.m-help,.s-help,.bird-help,.n-help,.t-help,.p-help,.f-help,#p-tip,#p-save,#n-save,#t-save){font-size:12px;color:#657784;line-height:1.65}
:is(#m-status,#s-status,#bird-status,#n-status,#t-status,#p-status,#f-status){font-size:14px;color:#405966;min-height:0;line-height:1.6}
#account-dialog{border-radius:3px;border:1px solid #bfcbd4;border-top:3px solid #29b8ed;background:#f7fafc;padding:18px;color:#263844}#account-content h2{font-size:20px}#account-content p{font-size:14px}#account-actions a:first-child{background:#273641;color:#fff}
/* Game boards retain their scale and distinct gameplay colours. */
#arena,.m-field,#s-board{background:#e8eef2}#arena{padding:12px}#apple-board{gap:6px;height:max(360px,calc(100dvh - 226px))}.apple{border-radius:2px;border-color:#bccbd5;box-shadow:none}.apple .digit{font-size:clamp(20px,2vw,29px);color:#233746}.apple.selected{background:#d5effb;border-color:#008bc4}.apple.empty{background:#e3eaf0;border-color:#c5d1db}.apple.empty.selected{background:#d5effb}#apple-selection{border:2px solid #008bc4;border-radius:1px;background:#12b5ee12}#timer-bar{background:#27b9ee}#timer-track{height:3px;background:#d2dde4}#overlay{background:#edf3f7e8}.start-fruit{font-size:36px;margin-bottom:10px}#overlay h3{font-size:22px}#overlay p{color:#657785;margin:8px 0 18px}#overlay-meta{color:#617380;margin-top:14px}
.lemon-mode #arena{min-height:calc(100dvh - 210px)}#lemon-canvas{width:min(100%,calc(max(340px,100dvh - 220px)*.888889));border-radius:0 0 4px 4px}
.m-field{padding:12px}#m-board{width:min(100%,max(320px,calc(100dvh - 255px)));max-width:760px}.m-cell{box-shadow:none;border-radius:6%}.m-cell.filled{background:#cceaf7;box-shadow:none}.m-cell.current{background:#008bc4;box-shadow:inset 0 0 0 2px #7fd7f5}#m-line{stroke:#49bce7}.m-wall{background:#d4dfe7;border-radius:6%}
#s-board{gap:16px;padding:16px;min-height:calc(100dvh - 275px)}.s-shelf{border-radius:2px;border-bottom-color:#829aa9;box-shadow:none;background:#f9fcfd}.s-slot{border-radius:2px;background:#edf2f5}.s-slot.empty{background:#f4f7f9;border-color:#c9d5de}.s-shelf-label{color:#607580}.s-slot.selected{background:#d9f3ff;border-color:#009acb}
#bird-board{min-height:calc(100dvh - 260px)}.bird-branch{border-radius:3px;background:#ffffff8c}.bird-branch.selected{background:#d9f0fa;border-color:#1397c2}.bird-branch.destination{border-color:#36accf}.bird-branch-label{color:#526b79}.bird-help{color:#637986}
.n-journey{padding:8px 16px;font-size:12px;color:#536b79}.n-journey progress{accent-color:#1196c6}.n-toolbar{padding:8px}.n-toolbar button[aria-pressed=true]{background:#203746;border-color:#203746;color:#fff}.n-cell.filled{background:#244c62}.n-clue{color:#3a596a}.n-clue.satisfied{color:#819baa}.n-corner{color:#637a88}
.t-field{width:min(calc(100% - 28px),max(320px,calc(100dvh - 280px)));max-width:660px}#t-board{border-radius:3px;background:#9aabb7;gap:8px;padding:8px}.t-tile{border-radius:2px}#t-overlay{border-radius:2px;background:#f1f7faed}
#pack-panel[data-kind]{background:var(--ui-paper);color:var(--ui-ink)}#p-help{margin:8px auto;font-size:14px}.p-board{width:min(calc(100% - 48px),max(310px,calc(100dvh - 330px)));border-radius:3px;margin:12px auto}#p-progress{padding:0 16px;margin:6px 0;color:#586f7f;opacity:1}.p-car{border-radius:5px}.p-head select{max-width:48%}
.f-field{width:min(100%,calc(max(300px,100dvh - 275px)*1.8));border-radius:2px}.f-controls{padding:10px 16px;gap:10px}.f-controls #f-fire{background:#1e9cc9;color:#fff;border-radius:2px;min-height:44px;min-width:85px;font-size:14px}.f-weapons button[aria-pressed=true]{background:#263e4e;color:#fff}.f-sliders input{accent-color:#169eca}
/* Action-game HUD: small, aligned, neutral panels over the playfield. */
#rogue-panel,#breakout-panel{background:#151e28;color:#e6eef4;border-color:#344451;border-radius:3px;box-shadow:none}.r-head,.b-head{border-bottom-color:#33424e}.r-head{flex-wrap:nowrap}.r-head h2{margin-right:auto;font-size:17px;letter-spacing:.8px}.r-head .r-btn,.b-head button{background:#ffffff0b;color:#c7d9e5;border-color:#4b5c69;white-space:nowrap;font-size:12px;min-height:30px;padding:5px 10px}.r-hud{gap:24px;padding:8px 16px;color:#a0b1bf;font-size:12px}.r-hud b{display:inline;padding:0 0 0 7px;font-size:16px;color:#f0f7fa}.b-stats strong{color:#f0f7fa}.b-stats span{color:#9eb5c6}.r-bars{padding:0 16px 9px;gap:16px}.r-bars span{font-size:12px;color:#aac0ce}.r-bars i{height:3px;background:#34434f;margin-top:4px}.r-bars em{background:#4dc4ec}#r-xp{background:#d4e1e8}.r-field{width:min(100%,calc(max(320px,100dvh - 210px)*1.451613));margin:auto}.b-field{width:min(100%,calc(max(320px,100dvh - 195px)*1.2))}.r-controls{padding:7px 16px 0;gap:6px 14px;font-size:12px;color:#94acbd}.r-controls kbd{font-size:12px;padding:1px 4px;border:1px solid #4b626f;border-radius:1px;background:#273743;color:#d8e9f3}.r-bottom{color:#9cb3c3}#r-build{color:#64c9ea;font-size:12px}.r-minimap{width:132px;border-radius:1px;border-color:#7995a580;box-shadow:none;right:10px;top:10px}#r-dash{right:12px;bottom:12px;padding:8px 14px;min-height:36px;border-radius:1px;background:#162c3bd9;border-color:#6a9db4;color:#c0efff;font-size:12px}
#r-screen{padding:20px;background:linear-gradient(120deg,#e9eff4f5,#f8fbfced);color:#243745;backdrop-filter:blur(9px)}.r-overline{color:#317994;font-size:12px;letter-spacing:2px}.r-title{font-size:clamp(22px,2.5vw,30px);line-height:1.25;letter-spacing:-.7px;margin:10px 0;color:#20313e}.r-copy{font-size:14px;line-height:1.65;color:#607381;margin:0 0 14px}.r-meta{font-size:14px;color:#3c5768;margin:12px 0 0}.r-btn{color:#395363;background:#ffffffb3;border-color:#bdcbd6}.r-btn:hover:not(:disabled){border-color:#159dcc;background:#e1f5ff}.r-levels{gap:5px;margin:0 0 12px}.r-levels button{font-size:13px;padding:7px 8px}.r-levels button[aria-pressed=true]{background:#263d4d;color:#fff;border-color:#263d4d;box-shadow:inset 3px 0 #42caff}.r-threats{gap:5px;margin:0 0 12px}.r-threats button{min-height:30px;font-size:13px;padding:4px 12px}.r-threats button[aria-pressed=true]{background:#dcf3fc;color:#006c96;border-color:#1499c5}.r-stage-detail{color:#4e6777;font-size:14px;line-height:1.8;margin:0 0 12px}.r-stage-detail strong{color:#1a667f!important}.r-starter{width:100%;max-width:420px;margin-bottom:12px}.r-menu-actions{gap:6px}.r-resource-help{color:#657d8a;font-size:12px;margin:10px 0}.r-upgrade-tools{color:#527084;font-size:13px;gap:10px;margin-bottom:12px}
/* Launch layout separates operation selection from loadout without a large hero. */
.r-launch{width:min(100%,780px);text-align:left}.r-launch-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #bdccd7}.r-launch .r-title{font-size:26px;margin:4px 0}.r-launch .r-copy{margin:0;max-width:none}.r-launch-head .r-meta{margin:0;text-align:right;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}.r-launch-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.r-launch-label{display:block;color:#466578;font-size:12px;font-weight:700;margin:0 0 10px;letter-spacing:.7px}.r-launch .r-levels{grid-template-columns:1fr 1fr}.r-launch .r-levels button{text-align:left;min-height:38px}.r-launch .r-threats{justify-content:flex-start}.r-launch .r-menu-actions{display:grid;grid-template-columns:1fr 1fr}.r-launch .r-start{grid-column:1/-1;min-height:42px}.r-launch-foot{border-top:1px solid #c6d2db;padding-top:12px;margin-top:16px!important;font-size:12px!important}
.r-cards{max-width:700px;grid-template-rows:78px repeat(6,auto);gap:8px}.r-card{background:#ffffffc9;border:1px solid #bbcbd6;border-radius:2px;color:#233947;padding:0 12px 12px}.r-card:hover,.r-card:focus-visible{background:#edfaff;border-color:#008fc2;box-shadow:inset 0 3px #27b6e5}.r-card .r-card-top{height:78px;margin:0 -12px;background:linear-gradient(135deg,#e4ecf2,#f9fcfd);border-radius:1px;border-bottom:1px solid #d0dbe3}.r-card .r-ability-art{width:56px;height:56px;border-radius:4px}.r-card .r-choice-key{background:#263e4e;border:0;color:#fff;border-radius:1px;width:20px;height:20px;font-size:12px}.r-card .r-ability-category{font-size:12px;color:#42667a}.r-card b{font-size:16px;line-height:1.4}.r-card span{font-size:14px;color:#566e7d;line-height:1.55}.r-card .r-upgrade-level{font-size:12px;color:#007da6}.r-card .r-synergy-hint{color:#476f82;border-color:#cedae3;font-size:12px;padding-top:8px}.r-banish{color:#805b50;background:#f6f1ef;border-color:#d8cac5;font-size:12px;min-height:32px}.r-banish:hover:not(:disabled){background:#ebdad4}
.r-codex-content{color:#3e586a}.r-codex-content h4{color:#1a6583}.r-codex-content article{gap:12px;padding:12px 0;border-color:#c5d4df}.r-codex-content article p{color:#58707e}.r-codex-content .r-evolution{color:#007da6}.r-codex-content article img{width:56px;height:56px;flex-basis:56px;border-radius:3px}.r-monsters article{border-color:#bbcbd6;border-radius:2px;background:#ffffffb3}.r-monsters article strong{color:#1b6e8f!important}.r-monsters p{color:#526e7e;font-size:14px}
#r-screen:has(.r-tree-screen){inset:64px 12px 12px;background:#eaf0f4;border:1px solid #9fb5c4;border-radius:3px;backdrop-filter:none}#r-screen .r-tree-head{background:#f5f9fb;border-bottom:1px solid #c1d0da;padding:12px 16px}.r-tree-head h3{font-size:21px;margin:4px 0;color:#253e4e}.r-tree-head p,.r-tree-note{color:#5c7788;font-size:12px}.r-tree-toolbar{padding:10px 16px;color:#335970;font-size:14px;gap:12px}.r-tree-tabs{padding:0 16px 10px;gap:5px}.r-tree-tabs button{border-radius:2px;background:#f6f9fb;color:#456073;border-color:#bbccd7;font-size:13px;min-height:32px;padding:5px 12px}.r-tree-tabs button[aria-pressed=true]{background:#273d4d;color:#fff}.r-tree-body{grid-template-columns:minmax(0,1fr) 260px}.r-tree-viewport{background:radial-gradient(#52677833 1px,transparent 1px),#182632;background-size:18px 18px}.r-tree-node{border-radius:3px;font-size:12px}.r-tree-node b{font-size:13px}.r-tree-node.cap{border-radius:3px}.r-tree-node[aria-pressed=true]{outline:2px solid #fff;outline-offset:3px}.r-tree-detail{padding:16px;border-color:#bdcdd9;color:#3c596d;font-size:14px}.r-tree-detail h4{font-size:20px;margin:8px 0;color:#23465c}.r-tree-prereq{color:#825e37}.r-tree-note{padding:8px 16px}
@media(max-width:700px){
 :root{--top-height:50px}header.arcade-top{padding:5px 10px;gap:7px}.brand-name,.top-label{display:none}.top-dropdown>summary{min-height:38px;padding:6px 9px}.game-menu,.top-popover{position:fixed;top:56px;left:8px;right:8px;width:auto;max-height:calc(100dvh - 66px)}.game-menu{gap:12px}.game-menu .game-tab{min-height:42px}.game-menu .tab-fruit{display:grid}.game-menu .game-tab strong{font-size:14px}
 main{padding:5px}.layout>section{min-height:calc(100dvh - 60px);border-radius:2px}:is(.game-heading,.r-head,.b-head,.m-head,.s-head,.bird-head,.n-head,.t-head,.p-head,.f-head){padding:8px 10px;gap:6px;min-height:44px}:is(.game-heading,.r-head,.b-head,.m-head,.s-head,.bird-head,.n-head,.t-head,.p-head,.f-head) h2{font-size:17px}.r-head h2{font-size:15px;letter-spacing:0}.r-head .r-btn{font-size:12px;padding:5px 8px;min-height:34px}
 :is(.stats,.r-hud,.b-stats,.m-stats,.s-stats,.bird-stats,.t-stats,.p-stats,.f-hud){padding:8px 10px;gap:14px}:is(.stats,.b-stats,.m-stats,.s-stats,.bird-stats,.t-stats,.p-stats,.f-hud) strong{font-size:17px}.stats>div{min-width:0}.r-hud{justify-content:flex-start;gap:14px}.r-hud b{font-size:14px;padding-left:4px}.r-bars{padding:0 10px 8px;gap:12px}.r-field{width:100%}.r-controls{padding:7px 10px 0;gap:5px 10px}.r-bottom{padding:7px 10px}.r-minimap{width:88px;right:6px;top:6px}#r-dash{min-height:42px;min-width:72px;padding:8px 12px;font-size:12px;right:8px;bottom:8px}
 :is(.m-actions button,.s-actions button,.bird-actions button,.n-toolbar button,.n-actions button,.t-actions button,.p-actions button,.f-controls button,.sub-button){min-height:40px;padding:6px 10px;font-size:14px}:is(.m-head,.s-head,.bird-head,.n-head,.p-head) select{max-width:52%;font-size:13px;min-height:38px}.t-stats>div{min-width:0;padding-right:16px}.t-field{width:calc(100% - 22px)}#arena{padding:8px}#apple-board{gap:4px;height:max(350px,calc(100dvh - 235px))}.apple .digit{font-size:20px}.game-footer{padding:8px 10px}.game-footer #status{font-size:13px}
 #r-screen{padding:14px 10px}.r-title{font-size:23px}.r-copy{font-size:14px}.r-launch-head{display:block;margin-bottom:12px;padding-bottom:10px}.r-launch .r-title{font-size:23px}.r-launch-head .r-meta{text-align:left;margin-top:7px}.r-launch-grid{grid-template-columns:1fr;gap:12px}.r-launch .r-levels{grid-template-columns:1fr 1fr;gap:5px}.r-launch .r-levels button{min-height:38px}.r-launch-label{margin-bottom:7px}.r-launch .r-threats{margin-bottom:0}.r-launch .r-menu-actions .r-btn{min-height:40px;font-size:13px}.r-launch .r-start{min-height:44px}.r-launch-foot{margin-top:12px!important}.r-starter{min-height:40px;font-size:13px}.r-stage-detail{font-size:13px;line-height:1.7}
 #r-screen:has(.r-launch),#r-screen:has(.r-levels),#r-screen:has(.r-monsters),#r-screen:has(.r-cards){position:fixed;inset:56px 5px 5px;background:#edf3f7f5;border:1px solid #bdccd7;border-radius:2px;justify-content:flex-start;z-index:40;overflow:auto;padding:14px 10px}
 .r-cards{grid-template-rows:64px repeat(6,auto);gap:6px}.r-card{padding:0 8px 10px}.r-card .r-card-top{height:64px;margin:0 -8px}.r-card .r-ability-art{width:46px;height:46px}.r-card b{font-size:14px}.r-card span{font-size:13px;line-height:1.55}.r-card .r-ability-category,.r-card .r-synergy-hint,.r-card .r-upgrade-level{font-size:12px}.r-banish{min-height:40px;font-size:12px;padding:6px 3px}.r-menu-actions .r-btn{min-height:40px}
 #r-screen:has(.r-tree-screen){inset:56px 5px 5px;padding:0;z-index:50}.r-tree-body{grid-template-columns:1fr;grid-template-rows:minmax(150px,1fr) 205px}.r-tree-detail{padding:10px 12px;border-left:0;border-top:1px solid #bdcdd9}.r-tree-detail h4{font-size:18px;margin:4px 0}.r-tree-tabs{padding:0 10px 8px;overflow:auto;flex-shrink:0}.r-tree-tabs button{white-space:nowrap;min-height:38px}.r-tree-head h3{font-size:19px}.r-tree-toolbar{padding:8px 10px;gap:8px}.r-tree-note{padding:7px 10px}.r-tree-detail .r-start{min-height:40px}
 #s-board{padding:12px;gap:14px 10px;min-height:0}#bird-board{padding:12px 8px;gap:14px 16px}.f-controls{padding:10px}.f-hud{gap:14px}.f-hud span{font-size:12px}.n-journey{flex-wrap:wrap;padding:8px 10px;gap:8px}.n-journey progress{min-width:40px}.p-board{width:calc(100% - 40px)}.m-field{padding:10px}#m-board{width:100%}
}
@media(prefers-reduced-motion:reduce){button,summary{transition:none}}
/* Global navigation stays reachable above full-screen game dialogs. */
header.arcade-top{z-index:60}.top-popover,.game-menu{z-index:70}
#account-actions a,#account-actions button,#account-dialog button{border-radius:2px;padding:6px 12px;min-height:34px;border-color:#bdcbd6;font-size:14px}
#account-dialog button:hover,#account-actions button:hover{background:#e0f3fb}
/* In-run dialogs dim the battlefield without hiding the paused action. */
#r-screen:has(.r-cards),#r-screen:has(.r-pause-label){background:rgba(7,18,27,.42);backdrop-filter:none;border-color:#9ab6c64d;color:#edf7ff}
#r-screen:has(.r-cards)>.r-title,#r-screen:has(.r-pause-label)>.r-title{color:#f3faff;text-shadow:0 2px 8px #000b}
#r-screen:has(.r-cards)>.r-overline,#r-screen:has(.r-pause-label)>.r-overline{color:#8edfff;text-shadow:0 1px 5px #000}
#r-screen:has(.r-cards)>.r-copy,#r-screen:has(.r-pause-label)>.r-copy,#r-screen:has(.r-cards)>.r-resource-help,#r-screen:has(.r-cards)>.r-upgrade-tools{color:#d6e8f3;text-shadow:0 1px 5px #000}
#r-screen:has(.r-cards) .r-card{background:#f5f9fcf2;text-shadow:none}
#r-screen:has(.r-cards) .r-card:hover,#r-screen:has(.r-cards) .r-card:focus-visible{background:#edfaff}
#r-screen:has(.r-cards) .r-btn{background:#edf5faf2;text-shadow:none}
@media(max-width:700px){
 /* Hide duplicate HUD text beneath the fixed upgrade dialog, but keep the battlefield. */
 #rogue-panel:has(#r-screen:not([hidden]) .r-cards)>:is(.r-head,.r-hud,.r-bars,.r-controls,.r-bottom){visibility:hidden}
}
/* Let the battlefield occupy the actual remaining viewport, in either orientation. */
#rogue-panel{display:flex;flex-direction:column;height:calc(100dvh - var(--top-height) - 16px);min-height:460px}
#rogue-panel>:is(.r-head,.r-hud,.r-bars,.r-controls,.r-bottom){flex-shrink:0}
#rogue-panel .r-field{width:100%;max-width:none;flex:1 1 0;height:auto;min-height:220px;aspect-ratio:auto;margin:0}
#rogue-panel .r-bottom{margin-top:auto}
@media(max-width:700px){
 #rogue-panel{height:calc(100dvh - var(--top-height) - 10px);min-height:420px}
 #rogue-panel .r-bottom{font-size:12px;align-items:center}
 #r-message{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #r-build{max-width:42%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
@media(max-height:500px){#rogue-panel{min-height:280px}#rogue-panel .r-field{min-height:120px}#rogue-panel .r-controls,#rogue-panel .r-bottom{display:none}}

/* Brief evolution feedback stays within the battlefield. */
#r-evolution-notice{position:absolute;z-index:2;top:18%;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:10px 18px;background:rgba(9,30,40,.92);border:1px solid #7beaff;color:#eaffff;box-shadow:0 0 24px #7beaff25;font-size:14px;font-weight:800;text-align:center;pointer-events:none}
#r-evolution-notice[hidden]{display:none}

#rogue-panel .r-card-top{position:relative;padding-top:27px!important}
#rogue-panel .r-pick-rate{position:absolute;top:6px;left:8px;right:34px;text-align:left;color:#277283;font-size:12px;font-weight:700;line-height:1.4}
#rogue-panel .r-evolution-extra{display:block;margin-top:6px;color:#087c94;font-style:normal;line-height:1.5}
#r-evolution-notice strong{display:block;font-size:16px}
#r-evolution-notice small{display:block;margin-top:5px;font-size:13px;line-height:1.5;font-weight:500;max-width:440px}
#rogue-panel .r-cards{grid-template-rows:116px repeat(6,auto)}
#rogue-panel .r-card-top{height:116px;padding-top:48px!important;box-sizing:border-box}
#rogue-panel .r-pick-rate{right:6px;left:6px;top:6px;line-height:1.3;word-break:keep-all}
#rogue-panel .r-choice-key{top:auto;bottom:5px;right:5px}

/* Expedition overlays retain the visible battlefield behind the panel. */
#r-screen .r-adventure{width:min(740px,100%);padding:20px;margin:auto;background:#102027ed;color:#e7f4f4;border:1px solid #527077;border-radius:14px;box-sizing:border-box}
#r-screen .r-adventure .r-title{color:#eefaff;font-size:23px}#r-screen .r-adventure .r-copy{color:#b7d2d5;font-size:12px}
.r-adventure-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:16px 0}.r-adventure-card{display:flex;flex-direction:column;gap:12px;text-align:left;background:#19343b;color:#ecf9fa;border:1px solid #49717c;border-radius:10px;padding:16px;cursor:pointer;min-height:170px;font:inherit;font-size:12px;line-height:1.6}.r-adventure-card strong{font-size:15px}.r-adventure-card:hover:not(:disabled),.r-adventure-card:focus-visible{outline:2px solid #96ebd5;background:#25464d}.r-adventure-card:disabled{opacity:.65;cursor:default}.r-relic-mark{font-size:28px;color:#ffdaa1;line-height:1.2;min-height:34px}.r-route{display:flex;flex-direction:column;gap:7px;margin:16px 0}.r-route-row{display:grid;grid-template-columns:22px repeat(3,1fr);gap:10px;align-items:center}.r-route-row>div{position:relative}.r-route-row:not(:last-child)>div:after{content:'';position:absolute;height:7px;border-left:1px dashed #64848c;top:100%;left:50%}.r-route-node{width:100%;min-height:44px;border:1px solid #41616b;border-radius:8px;background:#172b33;color:#91acb4;font-size:12px}.r-route-node.available{background:#c0f4dc;color:#183f35;border-color:#b5ffda;font-weight:800;cursor:pointer}.r-route-node.visited{color:#a1ecd4;background:#214940}.r-adventure>.r-btn{margin:4px}.r-route-row small{color:#93acb5}@media(max-width:480px){#r-screen .r-adventure{padding:12px}.r-adventure-options{grid-template-columns:1fr}.r-adventure-card{min-height:0;gap:6px}.r-relic-mark{font-size:22px;min-height:24px}.r-route-row{gap:5px;grid-template-columns:18px repeat(3,1fr)}}
.r-route{gap:0}.r-route-links{height:18px;margin-left:32px}.r-route-links svg{width:100%;height:18px;stroke:#53727d;stroke-width:1;fill:none}.r-route-row:not(:last-child)>div:after{display:none}@media(max-width:480px){.r-route-links{margin-left:23px}}
#r-screen:has(.r-adventure){background:rgba(7,18,27,.48);backdrop-filter:none;justify-content:flex-start;overflow:auto}#r-screen .r-adventure .r-overline{color:#90d8e6}.r-adventure-card[aria-disabled]{cursor:default}.r-adventure-card[aria-disabled]:hover{outline:none;background:#19343b}@media(max-width:600px){#r-screen:has(.r-adventure){position:fixed;inset:54px 4px 4px;z-index:40;padding:10px 6px}}
.r-route-node:disabled{opacity:.85}.r-route-node.visited:disabled{opacity:1}
/* Permanent relic collection shares the compact combat interface. */
.r-vault{width:min(980px,100%);margin:auto;text-align:left}.r-vault-head,.r-vault-actions,.r-vault-card-head{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.r-vault-head{justify-content:space-between}.r-vault-head .r-title{margin:4px 0}.r-vault-summon{padding:14px;border:1px solid #4b6575;background:#162c39;border-radius:8px;display:grid;gap:10px}.r-vault .r-btn{min-height:40px;font-size:13px}.r-vault .r-btn[aria-pressed=true]{border-color:#7ed6ef;background:#274c60;color:#fff}.r-vault-odds summary{cursor:pointer;color:#bfe2f2;font-size:13px}.r-vault-status{font-size:14px;color:#d7f86d;min-height:1.4em}.r-vault-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.r-vault-card{display:flex;flex-direction:column;padding:14px;background:#182c38;border:1px solid #405562;border-top:3px solid var(--relic-color);border-radius:7px;min-width:0}.r-vault-card h4{font-size:16px;margin:8px 0;color:#eef5fa}.r-vault-mark{color:var(--relic-color);font-size:24px;width:32px}.r-vault-tier{color:var(--relic-color);font-size:12px}.r-vault-rank{color:#bdd3df;font-size:12px}.r-vault-effect{font-size:14px;line-height:1.6;min-height:4.8em;margin:10px 0;color:#e3eef6}.r-vault-next{font-size:12px;line-height:1.6;color:#9cb8c8;border-top:1px solid #3a5361;padding-top:10px;flex:1}.r-vault-card .r-vault-actions{margin-top:auto}.r-vault-card.unowned{background:#13242f}.r-vault-card.unowned .r-vault-rank{color:#879aa9}.r-vault-results{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0}.r-vault-result{display:grid;gap:5px;border:1px solid var(--relic-color);padding:10px;border-radius:6px;background:#203441;font-size:12px}.r-vault-result small{color:var(--relic-color)}.r-vault-result strong{color:#fff;font-size:14px}.r-vault-result span{color:#bfd6e2}@media(max-width:700px){.r-vault-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.r-vault-results{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:440px){.r-vault-grid{grid-template-columns:1fr}.r-vault-effect{min-height:0}.r-vault-card{padding:12px}.r-vault .r-copy{line-height:1.6}}
#r-screen:has(.r-vault){background:rgba(7,18,27,.65);color:#e7f3fb;backdrop-filter:none;justify-content:flex-start;overflow:auto}#r-screen .r-vault{box-sizing:border-box;padding:16px;background:#10202bea;border:1px solid #425b6b;border-radius:8px}#r-screen .r-vault-head{height:auto;padding:0 0 12px;margin:0 0 12px;background:transparent;border-bottom:1px solid #405967;box-shadow:none}#r-screen .r-vault .r-title{color:#eef8ff}#r-screen .r-vault .r-overline{color:#83d7eb}#r-screen .r-vault .r-copy{color:#b6cddb;max-width:none;font-size:13px}#r-screen .r-vault .r-btn{background:#243e4d;color:#e6f2fa;border-color:#597483}#r-screen .r-vault .r-btn:hover:not(:disabled){background:#325b6e;border-color:#83d7eb}#r-screen .r-vault .r-btn:disabled{color:#a6bac5;opacity:.5}#r-screen .r-vault .r-btn:focus-visible{outline:2px solid #a6efff;outline-offset:2px}@media(max-width:600px){#r-screen:has(.r-vault){position:fixed;inset:54px 4px 4px;z-index:40;padding:8px 4px}#r-screen .r-vault{padding:12px}}

.r-mode-picker{display:flex;gap:6px;margin-bottom:12px}.r-mode-picker .r-btn{flex:1;min-height:40px;font-size:13px}.r-mode-picker .r-btn[aria-pressed=true]{background:#263d4d;color:#fff;border-color:#263d4d;box-shadow:inset 0 -3px #42caff}

#rogue-panel .r-hud{flex-wrap:wrap;row-gap:4px}#rogue-panel .r-hud>span{white-space:nowrap}#r-gold{color:#f5d38d}
