/* Shared design contract: pixel art remains original, interface is calm and readable. */
:root{--surface:#fff;--canvas:#f5f5f7;--ink:#1d1d1f;--muted:#60616a;--blue:#0066cc;--line:#dcdde3;--success:#376446;--warning:#796021;--danger:#914247;--r-control:10px;--r-panel:16px;--r-dialog:22px;--motion-fast:150ms;--motion-enter:240ms;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px}
body{color:var(--ink);background:var(--canvas)}p{font-size:15px;line-height:1.65}button{transition:background var(--motion-fast),transform var(--motion-fast);touch-action:manipulation}button:focus-visible,a:focus-visible{outline:3px solid #0066cc;outline-offset:3px}h1:focus,h2:focus{outline:none}button:disabled{opacity:.52}button:not(:disabled):hover{filter:brightness(.97)}.quiet-link,.map-head button,#notes{min-height:44px}.primary{background:var(--blue)}.studio nav button{min-height:40px}.studio{height:58px}.home{height:calc(100svh - 58px);min-height:calc(100svh - 58px)}.page{padding:24px 32px}.tag,.move-type{font-size:12px;line-height:1.2}.move-type{flex-basis:32px}.moves .move-chip{font-size:14px;min-height:36px}.moves{width:360px}.reveal{height:158px}.home .reveal .hint{font-size:13px;color:var(--muted)}.intro p{font-size:15px}.home-actions .primary{font-size:15px}.ui-icon{width:20px;height:20px;display:inline-block;vertical-align:middle;flex-shrink:0}.steps button{min-width:40px;min-height:40px}.steps:before{top:20px}.steps{gap:4px}.choices button{min-height:48px;font-size:14px}.route-title h1{font-size:30px}.node-heading p,.map-caption,.map-head button,.badge-count{font-size:12px}.map-caption{gap:12px}.side h3,.side .party-heading h3{font-size:15px}.partner-detail h2{font-size:20px}.partner-detail p,.partner-detail small,.health-label{font-size:12px}.party-heading>span{font-size:12px}.party-thumbs b{font-size:12px}.thumb-state{display:block;font-size:10px;color:var(--muted);margin-top:5px}.lead-mark{font-size:10px;top:-5px;left:-4px}.party-thumbs{gap:8px}.quiet-link{font-size:14px}.bag,.side .bag{font-size:14px}.party-roster .order-buttons button{width:44px;height:44px;font-size:18px}.party-roster .roster-line b{font-size:14px}.party-roster small{font-size:12px}.party-roster .roster-line>button{gap:10px;min-height:70px}.ordered-skills>div{font-size:14px;gap:8px}.ordered-skills>p,.fixture-note{font-size:12px!important}.ordered-skills{padding-left:12px}.party-roster em{font-size:11px}.move-facts,.move-facts b,.learn .new-move .move-facts{font-size:12px}.move-effect,.learn .new-move .move-effect{font-size:14px;line-height:1.6}.skill-option>b,.skill-option>span>b{font-size:16px}.damage-note{font-size:12px;line-height:1.6}.section-label{font-size:14px}.learn .new-move{position:sticky;top:0;z-index:1;box-shadow:0 2px 8px #1d1d1f08}.skill-option{min-height:104px;padding:16px}.learn-actions{z-index:2;border-top:1px solid var(--line)}.new-move h2{font-size:22px}.learn-intro{padding:20px 0}.skill-list{border-radius:var(--r-panel)}.node-types button{min-height:44px;font-size:13px}.node-top .quiet{font-size:12px}.node-title p{font-size:14px}.battle-team p,.battle-team small,.battle-team em{font-size:12px}.battle-team b{font-size:14px}.battle-team>button{min-height:58px}.battle-placeholder small{font-size:12px;color:#56624e}.battle-placeholder div{font-size:14px;color:#56624e}.battle-status small{font-size:12px}.active-skills>span{font-size:12px}.active-skills b{font-size:14px}.secondary{font-size:14px;min-height:44px}.option-card{font-size:16px}.option-card span{font-size:13px}.prototype-controls>span{font-size:12px}.node-page .encounter-actions{padding-top:4px}.rest-layout,.result-card{border-radius:var(--r-panel)}.decline{color:var(--danger);background:#f4e5e6}.toast{font-size:14px;line-height:1.5}.health-label b,.party-roster small,.move-facts b{font-variant-numeric:tabular-nums}
@media(max-width:700px){.page{padding:20px}.studio{padding:0 12px;gap:6px}.studio>span{font-size:10px}.studio nav button{padding:6px 9px;min-width:43px}.intro p{font-size:14px}.home-actions{padding-bottom:48px}.moves{width:300px}.reveal{height:154px}.moves .move-chip{font-size:13px;padding:6px 8px}.move-type{font-size:11px}.side{display:block}.party-thumbs{gap:8px}.party-thumbs button{padding:8px 6px}.party-thumbs b{font-size:12px}.node-title h1{font-size:28px}.node-types{margin:16px 0 24px;gap:8px}.node-types button{padding:10px 12px}.battle-placeholder{min-height:180px}.battle-placeholder div{font-size:12px}.battle-placeholder small{font-size:11px}.battle-status b{font-size:14px}.battle-status small{font-size:11px}.battle-team{gap:6px}.battle-team>button{gap:8px;padding:8px}.battle-team img{width:28px}.battle-team em{font-size:10px}.battle-team b{font-size:12px}.battle-team small{font-size:11px}.ordered-skills{padding-left:0}.party-roster .order-buttons button{width:40px;height:44px}.learn-intro h1{font-size:26px}.learn .new-move{padding:16px}.learn .new-move .move-effect{font-size:13px}.skill-option{padding:14px;gap:10px}.move-facts{gap:6px 10px}.node-heading .primary{padding:10px 16px}.result-card h2,.rest-layout h2{font-size:22px}.map-caption{font-size:11px}.steps button{width:40px;height:40px;min-width:0;flex:0 1 40px}.route .side{margin-top:16px}}
@media(max-width:360px){.page{padding:16px}.party-roster .order-buttons button{width:36px}.party-roster .roster-line>button{gap:6px}.party-roster .roster-line b{font-size:13px}.party-roster small{font-size:11px}.party-roster img{width:30px;height:34px}.balls{gap:18px}.home .balls.four-balls{gap:8px}.home .four-balls .ball{width:58px}.moves{width:280px}.home .intro h1{font-size:28px}.home .intro p{font-size:13px}.studio nav button{padding:6px 8px}.studio>span{max-width:68px;line-height:1.4}}
@media(max-height:680px){.home .home-core{padding:8px 0}.home .intro h1{font-size:26px}.home .intro p{font-size:12px}.home .balls{padding:14px 0 8px}.home .reveal{height:138px;gap:8px}.home .moves .move-chip{min-height:31px;padding:4px 6px}.home .name-row h2{font-size:20px}.home .home-actions{padding-bottom:34px}.home .home-actions .primary{min-height:44px}.home .eyebrow{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.battle-status>span{color:#62636e}.battle-team em{color:#315e87}.rest-symbol .ui-icon{width:36px;height:36px}.thumb-state{font-size:11px}.party-heading h3{white-space:nowrap}.order-buttons button:focus-visible{position:relative;z-index:2}.preparing{height:calc(100svh - 58px)}.learn .new-move{scroll-margin-top:12px}.learn .skill-list{scroll-margin-top:190px}.skill-option{scroll-margin-top:190px}.learn .new-move:has(~.skill-list){top:0}@media(max-width:360px){.party-heading>span{font-size:11px}.moves{width:276px}}
.prototype-footer{text-align:center;color:var(--muted);font-size:11px;line-height:24px;min-height:24px;padding:0 12px}.home{height:calc(100svh - 82px);min-height:calc(100svh - 82px)}.help-tip{margin:10px 0 14px;font-size:12px;text-align:left;color:var(--muted)}.help-tip summary{cursor:pointer;min-height:36px;display:flex;align-items:center;color:#42678b;width:max-content;max-width:100%;border-radius:6px}.help-tip summary:focus-visible{outline:3px solid var(--blue);outline-offset:3px}.help-tip p{font-size:13px;background:#eef2f7;color:#464d58;border-radius:8px;padding:12px;margin-top:4px;line-height:1.6}.help-tip[open] summary{font-weight:600}.node-title p:empty{display:none}.node-top{min-height:44px}.battle-team h3{margin-bottom:12px}.learn .section-label{margin-bottom:0}.learn .help-tip{margin:0 0 8px}.home .intro h1{margin-top:0}.preparing{height:calc(100svh - 82px)}
.party-roster .order-buttons button{width:44px;height:44px}.prototype-footer{font-variant-numeric:tabular-nums}.ui-icon{pointer-events:none}
.party-overview{list-style:none;padding:0;margin:16px 0 4px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px}.party-overview li{min-width:0;text-align:center}.overview-sprite{height:46px;position:relative;display:flex;align-items:center;justify-content:center}.overview-sprite img{width:34px;height:34px;object-fit:contain;image-rendering:pixelated}.overview-sprite .lead-mark{left:0;top:-3px}.party-overview b{font-size:12px;font-weight:500;display:block;margin:4px 0}.overview-hp{font-size:11px;font-variant-numeric:tabular-nums;color:var(--muted);display:block;margin-bottom:6px}.party-overview small{font-size:11px;color:var(--muted);display:block;margin-top:6px}.party-panel>.quiet-link{margin-top:12px;border-top:1px solid #ececf0;border-radius:0}.party-overview li{cursor:default}.party-overview .party-hp{height:4px}.party-panel .party-heading{margin-bottom:8px}
/* Selection lists live inside one outer surface, not nested cards. */
.rest-options,.reward-options{display:flex;flex-direction:column;gap:0;margin:20px 0;text-align:left}.option-card{background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;text-align:left;min-height:72px;padding:18px 4px;display:block}.option-card:last-child{border-bottom:0}.option-card:hover{background:#f5f7fa}.option-card span{margin-top:6px}.choices{display:flex;flex-direction:column;gap:0}.choices button{border:0;border-radius:0;background:transparent;padding:14px 4px;border-top:1px solid var(--line)}.choices button[aria-pressed=true]{background:#eef5fd;border-color:var(--line)}.active-skills b{padding:4px 10px 4px 0;border-radius:0;background:transparent;font-weight:500}.active-skills>div{gap:6px 12px}.party-overview{border:0;background:transparent;box-shadow:none}.ordered-skills{background:transparent;border:0;box-shadow:none}.moves .move-chip{border:0;background:transparent;border-radius:0;padding-left:0;padding-right:0}.moves{column-gap:20px}.move-type{border-radius:3px}.new-move{box-shadow:none!important}.node-heading .primary,.home-actions .primary,.learn-actions .primary,.encounter-actions .primary{box-shadow:none}
/* Combat is one task in one viewport. Secondary prototype tools do not displace play. */
body:has(.battle-page) .studio,body:has(.battle-page)>.prototype-footer{display:none}
.battle-page{height:100svh;min-height:540px;max-width:1120px;margin:auto;padding:12px 20px 20px;display:flex;flex-direction:column;gap:8px}
.combat-heading{height:44px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.combat-heading h1{font-size:20px;margin:0}.combat-heading button{padding:8px 0}.combat-heading summary{min-height:44px;padding:12px;cursor:pointer;font-size:14px}
.combat-console{min-height:0;flex:1;display:grid;grid-template-rows:56px minmax(140px,1fr) auto auto 52px;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.combat-status{display:flex;justify-content:space-between;gap:24px;padding:8px 16px;background:#f8f9fb}.combat-status>div{width:42%;max-width:300px;display:grid;grid-template-columns:1fr auto;gap:3px;font-size:12px}.combat-status b{font-size:14px;white-space:nowrap}.combat-status b small{font-size:11px;font-weight:400}.combat-status progress,.enemy-health{grid-column:1/-1;width:100%;height:5px;accent-color:#477a59}.enemy-health{height:auto;font-size:10px;color:var(--muted)}
.combat-arena{min-height:0;position:relative;display:flex;justify-content:space-around;align-items:center;background:#eef0ed;overflow:hidden}.combat-arena>img{width:clamp(72px,16vw,150px);height:clamp(72px,16vw,150px);object-fit:contain;image-rendering:pixelated}.combat-scene-label{text-align:center;font-size:14px;color:#56624e}.combat-scene-label small{display:block;font-size:11px;margin-top:4px}
.combat-skills{padding:8px 16px;display:flex;gap:14px;align-items:center;border-bottom:1px solid var(--line);font-size:12px}.combat-skills>span{color:var(--muted);white-space:nowrap}.combat-skills>div{display:grid;grid-template-columns:repeat(4,1fr);flex:1;gap:8px}.combat-skills>div>span{text-align:center;white-space:nowrap}
.combat-party{padding:6px 10px;display:grid;grid-template-columns:repeat(6,1fr);gap:0}.combat-party button{min-width:0;min-height:62px;display:flex;gap:3px;align-items:center;border:0;border-radius:0;background:transparent;padding:5px 6px;text-align:left}.combat-party button[aria-pressed=true]{background:#eaf2fa}.combat-party button:disabled{opacity:1;color:#60616a}.combat-party img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}.combat-party button>span{min-width:0;flex:1}.combat-party b{font-size:12px;display:block;white-space:nowrap}.combat-party small{font-size:10px;display:block;white-space:nowrap}.combat-party progress{display:block;width:100%;height:4px;margin-top:4px;accent-color:#477a59}
.combat-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:4px 12px;border-top:1px solid var(--line)}.combat-actions button,.combat-actions summary{min-height:44px;padding:10px 14px;font-size:14px;border-radius:8px;box-shadow:none}.combat-end-label{font-size:12px;color:var(--muted)}
.combat-menu,.combat-items{position:relative}.combat-menu[open]>div,.combat-items[open]>div{position:absolute;z-index:30;right:0;min-width:190px;padding:8px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px #17253618}.combat-menu[open]>div{top:44px}.combat-items[open]>div{bottom:48px}.combat-menu nav{display:flex;flex-direction:column}.combat-menu button,.combat-items button{width:100%;min-height:44px;text-align:left;border:0;background:transparent;border-radius:0}.combat-items summary{cursor:pointer;list-style:none;background:#eff0f3}.combat-menu summary::marker{font-size:10px}
.combat-arena.has-result{overflow:auto;display:block;background:#f8f9fb}.combat-arena .result-card{border:0;box-shadow:none;background:transparent;border-radius:0;padding:14px 20px;max-width:640px;margin:auto;text-align:center}.combat-arena .result-card h2{font-size:20px;margin:8px 0}.combat-arena .result-card p{font-size:13px;margin:6px 0}.combat-arena .rest-symbol{display:none}.combat-arena .caught-sprite{width:64px;height:64px;object-fit:contain}.combat-arena .encounter-actions{margin:8px 0;gap:8px}.combat-arena button{min-height:44px;padding:10px 12px;font-size:13px}.combat-arena .reward-options{margin:8px 0}.combat-arena .option-card{min-height:44px;text-align:center;padding:10px}.combat-arena .help-tip{font-size:12px}
@media(max-width:650px){.battle-page{padding:4px 8px max(6px,env(safe-area-inset-bottom));gap:4px}.combat-heading{height:40px}.combat-heading h1{font-size:16px}.combat-heading .quiet-link{font-size:13px}.combat-console{grid-template-rows:56px minmax(125px,1fr) 52px 116px 52px}.combat-status{padding:8px 10px;gap:14px}.combat-status>div{width:47%}.combat-status>div>span{font-size:10px}.combat-status b{font-size:12px}.combat-status b small{display:none}.combat-party{grid-template-columns:repeat(3,1fr);padding:3px 4px}.combat-party button{min-height:54px;padding:4px}.combat-party img{width:30px;height:30px}.combat-party b{font-size:11px}.combat-party small{font-size:10px}.combat-skills{padding:5px 8px;gap:8px;font-size:11px}.combat-skills>div{grid-template-columns:repeat(2,1fr);gap:4px 8px}.combat-skills>div>span{text-align:left}.combat-actions{gap:4px;padding:4px 6px}.combat-actions button,.combat-actions summary{padding:10px 9px;font-size:12px}.combat-scene-label{font-size:12px}.combat-scene-label small{font-size:10px}.combat-arena>img{width:72px;height:72px}.combat-arena .result-card{padding:10px 12px}.combat-arena .caught-sprite{width:42px;height:42px}.combat-arena .result-card h2{font-size:17px}.combat-arena .result-card p{font-size:12px}}
@media(prefers-reduced-motion:reduce){.combat-console *{transition:none!important}}
/* HUD belongs to the battlefield, at its two upper corners. */
.combat-console{position:relative;grid-template-rows:minmax(196px,1fr) auto auto 52px}.combat-status{position:absolute;z-index:5;left:10px;right:10px;top:10px;padding:0;background:transparent;pointer-events:none}.combat-status>div{padding:8px 10px;background:#ffffffeb;border-radius:8px;max-width:240px}.combat-arena{padding-top:58px}.combat-arena.has-result{padding-top:62px}.combat-status>div:last-child{text-align:right}
@media(max-width:650px){.combat-console{grid-template-rows:minmax(181px,1fr) 52px 116px 52px}.combat-status{left:6px;right:6px;top:6px;gap:8px}.combat-status>div{padding:6px;max-width:none;grid-template-columns:1fr;gap:2px}.combat-status>div>span{font-size:11px}.combat-status progress{grid-column:auto}.combat-arena{padding-top:62px}.combat-arena.has-result{padding-top:64px}}
/* Six compact portraits; names remain available to assistive technology. */
.combat-party{grid-template-columns:repeat(6,minmax(44px,1fr));gap:2px;padding:4px 8px}.combat-party button{min-height:64px;flex-direction:column;justify-content:center;gap:1px;padding:3px 1px;text-align:center;position:relative}.combat-party img{width:36px;height:36px}.combat-party button>span{width:100%;max-width:62px;flex:0}.combat-party b{display:none}.combat-party small{font-size:10px}.combat-party progress{margin-top:3px}.combat-party button[aria-pressed=true]:before{content:'出战';position:absolute;right:1px;top:1px;font-size:9px;color:#184f82;background:#eaf2fa;padding:0 2px}.combat-party button[aria-pressed=true] small{font-size:0}.combat-party button[aria-pressed=true] small:after{content:'当前';font-size:10px}
@media(max-width:650px){.combat-console{grid-template-rows:minmax(181px,1fr) 52px 72px 52px}.combat-party{grid-template-columns:repeat(6,minmax(44px,1fr));padding:4px 5px;gap:1px}.combat-party button{min-height:64px;padding:3px 0}.combat-party img{width:34px;height:34px}.combat-party small{font-size:9px}}
@media(max-width:305px){.combat-party{grid-template-columns:repeat(3,minmax(44px,1fr))}.combat-console{grid-template-rows:minmax(160px,1fr) 52px 136px 52px}.battle-page{min-height:580px}}
.combat-party button[aria-pressed=true] small{font-size:10px}.combat-party button[aria-pressed=true] small:after{content:none}
@media(max-width:650px){.combat-status b small{display:inline;font-size:10px}.combat-party button[aria-pressed=true] small{font-size:9px}}
/* Starter skills are a centered group, not stretched left-aligned columns. */
.home .moves{width:max-content;max-width:100%;margin-inline:auto;grid-template-columns:repeat(2,minmax(104px,max-content));gap:7px 26px;justify-content:center}.home .moves .move-chip{padding:4px 0;gap:8px;justify-content:flex-start;font-weight:500}.home .reveal{align-self:center}.home .moves .move-type{flex:0 0 32px;text-align:center}
@media(max-width:360px){.home .moves{grid-template-columns:repeat(2,minmax(94px,max-content));column-gap:20px}}
/* Route roster remains a small status module, never a second management screen. */
.side .party-panel{padding:12px;container-type:inline-size}.party-panel .party-heading{margin-bottom:8px}.party-panel .party-heading h3{font-size:14px;margin:0}.party-panel .party-heading>span{font-size:11px}.party-panel .party-overview{margin:6px 0 4px;gap:10px 8px;grid-template-columns:repeat(3,minmax(0,1fr))}.party-panel .overview-sprite{height:30px}.party-panel .overview-sprite img{width:28px;height:28px}.party-panel .party-overview b,.party-panel .party-overview small{display:none}.party-panel .overview-hp{font-size:10px;margin:3px 0 4px;line-height:1.2}.party-panel .party-hp{height:3px}.party-panel .lead-mark{font-size:9px;padding:1px 3px;left:0;top:0}.party-panel>.quiet-link{margin-top:6px;border-top:0;text-align:left;min-height:44px;padding:8px 0}.party-panel .party-overview li{min-height:49px}
@container(min-width:310px){.party-panel .party-overview{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.party-panel .lead-mark{left:-2px;top:-2px}}
/* Battle dock: two quiet horizontal rhythms, not a text table over thumbnail cards. */
.combat-skills{display:block;padding:6px 14px 8px;background:#fff;border-bottom:1px solid #e8e9ed}.combat-skills>span{display:block;font-size:10px;line-height:14px;letter-spacing:.05em;margin-bottom:3px}.combat-skills>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.combat-skills>div>span{text-align:center;font-size:13px;line-height:20px;font-weight:500;white-space:nowrap}.combat-party{padding:5px 10px;background:#fff}.combat-party button[aria-pressed=true]{background:transparent;box-shadow:inset 0 -2px #0066cc}.combat-party button[aria-pressed=true]:before{content:none}.combat-party button>span{max-width:42px}.combat-party button{gap:3px}.combat-party img{width:32px;height:32px}.combat-party progress,.combat-status progress{appearance:none;-webkit-appearance:none;border:0;border-radius:2px;overflow:hidden;background:#e3e7e6}.combat-party progress::-webkit-progress-bar,.combat-status progress::-webkit-progress-bar{background:#e3e7e6}.combat-party progress::-webkit-progress-value,.combat-status progress::-webkit-progress-value{background:#59816b}.combat-party progress::-moz-progress-bar,.combat-status progress::-moz-progress-bar{background:#59816b}.combat-party button[aria-label*="无法战斗"] img{opacity:.4}.combat-party button[aria-pressed=true] small{color:#0066cc;font-weight:600}
@media(max-width:650px){.combat-skills{padding:5px 10px 7px}.combat-skills>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.combat-skills>div>span{font-size:12px;text-align:center}.combat-party{padding:4px 5px}.combat-party button{gap:3px}.combat-party button>span{max-width:34px}.combat-party img{width:32px;height:32px}}
/* Whole-route viewport budget: keep desktop map and status side by side. */
.route{padding:12px 24px;max-width:1120px;margin:auto}.route>.top{display:none}.route .route-title{margin:0 0 12px;min-height:42px;align-items:center}.route-title h1{font-size:24px;margin:2px 0 0}.route-title .eyebrow{font-size:10px}.route .route-grid{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:16px}.route .side{margin-top:0}.route .map-head{height:40px;padding:0 14px}.route .map-head button{min-height:40px}.route .map{height:clamp(160px,calc(100svh - 330px),420px);aspect-ratio:auto}.route .map svg{width:100%;height:100%}.route .map-caption{padding:4px 14px;font-size:10px;min-height:20px}.route .journey{padding:8px 14px 12px}.route .steps{margin:0 0 8px}.route .steps button{width:36px;height:36px;min-height:36px;flex-basis:36px}.route .steps:before{top:18px}.route .node-heading h2{font-size:16px}.route .node-heading p{display:none}.route .node-heading .primary{min-height:44px}.route .choices{margin-top:6px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.route .choices button{min-height:44px;padding:6px;font-size:12px}.route .party-panel{position:relative;padding:12px}.route .party-panel>.quiet-link{position:absolute;right:10px;top:0;font-size:12px;margin:0}.route .party-heading>span{display:none}.route .party-heading{padding-right:72px;min-height:24px}.route .party-overview{margin-top:6px}.route .side section+section{margin-top:12px}.route .side section:not(.party-panel){padding:12px}.route .side h3{margin:0 0 8px}.route .bag{min-height:28px}
@media(max-width:680px){.route{padding:8px 12px}.route .route-title{min-height:38px;margin-bottom:6px}.route-title h1{font-size:20px}.route .route-grid{display:flex;flex-direction:column;gap:8px}.route .map{height:clamp(100px,calc(100svh - 470px),230px)}.route .map-head{height:32px;padding:0 10px}.route .map-head button{min-height:32px;font-size:11px}.route .map-caption{min-height:18px;padding:2px 10px}.route .map-caption span{display:none}.route .map-caption{justify-content:flex-end}.route .journey{padding:5px 10px 8px}.route .steps{margin-bottom:4px}.route .steps button{min-height:36px;width:36px}.route .node-heading .primary{padding:8px 14px}.route .side{margin:0}.route .side .party-panel{padding:8px 10px;margin-bottom:0}.route .party-heading{min-height:22px;margin-bottom:4px}.route .party-panel>.quiet-link{top:-3px;right:10px}.route .party-overview{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:4px 0 0}.route .overview-sprite{height:26px}.route .overview-sprite img{height:26px;width:26px}.route .party-overview li{min-height:44px}.route .overview-hp{font-size:9px}.route .party-overview .lead-mark{font-size:8px;left:-3px;top:-3px}.route .side section:not(.party-panel){display:flex;align-items:center;gap:12px;padding:4px 10px;margin-top:6px;min-height:38px}.route .side section:not(.party-panel) h3{font-size:12px;margin:0;white-space:nowrap}.route .side .bag{display:flex;width:auto;flex:1;font-size:11px;padding:0;gap:5px;min-height:24px}.route .choices button{min-height:40px}.route .choices{gap:4px}}
/* The six companions stay in their own original region as 3 + 3. */
.route .party-panel .party-overview{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 10px}.route .party-overview li{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;column-gap:5px;min-height:38px}.route .overview-sprite{grid-row:1/3;height:30px}.route .overview-hp{margin:0;align-self:end;text-align:left;font-size:10px}.route .party-overview .party-hp{grid-column:2;align-self:start;margin-top:4px}.route .party-overview .lead-mark{left:-2px;top:-3px;font-size:8px}.route .party-panel .overview-sprite img{width:28px;height:28px}
@media(max-width:680px){.route .map{height:clamp(90px,calc(100svh - 500px),210px)}.route .party-overview li{min-height:36px}.route .party-panel .party-overview{gap:5px 8px}}
.route .party-panel>.quiet-link{width:auto;left:auto;right:10px;max-width:90px;text-align:right}
.route .overview-hp{white-space:nowrap}
@media(min-width:681px){.route .party-panel .party-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px}}
@media(max-width:680px){.node-page{padding:8px 12px}.node-page .node-top{margin-bottom:4px}.node-page .node-types{gap:4px;margin:4px 0 8px;flex-wrap:wrap}.node-page .node-types button{min-height:36px;padding:7px 9px;font-size:12px}.node-page .node-title{margin:8px 0 12px}.node-page .node-title .eyebrow:empty{display:none}.node-page .node-title h1{font-size:24px}.node-page .rest-layout{padding:18px 16px}.node-page .rest-symbol{margin:0 auto 12px}.node-page .rest-options{margin:12px 0}.node-page .option-card{min-height:62px;padding:12px 4px}}
/* Branch choice and advance share one action row; no extra lower section. */
.route .journey:has(.choices){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}.route .journey:has(.choices) .steps{grid-column:1/-1}.route .journey:has(.choices) .node-heading{grid-column:2;grid-row:2}.route .journey:has(.choices) .node-heading>div{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.route .journey:has(.choices) .choices{grid-row:2;grid-column:1;margin:0;align-items:center}.route .choices button{border:0!important;background:transparent;font-size:12px;padding:6px}.route .choices button[aria-pressed=true]{background:#eaf2fa}.route .choices .ui-icon{width:16px;height:16px}.route .choices button>span{display:inline-flex;margin-right:4px}
.center-scene{display:block;width:min(100%,480px);height:auto;max-height:calc(100svh - 370px);min-height:120px;object-fit:contain;image-rendering:pixelated;margin:0 auto 16px}.node-page:has(.center-scene) .rest-layout{padding:16px;max-width:700px;margin:0 auto}.node-page:has(.center-scene) .node-title{margin:8px 0 12px}.node-page:has(.center-scene) .rest-layout>.primary{min-height:44px}.node-page:has(.center-scene) .encounter-actions{margin:8px 0 0}.node-page:has(.center-scene) .node-title .eyebrow{display:none}
@media(max-width:680px){.route .journey:has(.choices){gap:4px}.route .choices button{font-size:11px;padding:6px 2px}.route .choices .ui-icon{display:none}.route .journey:has(.choices) .primary{padding:8px 10px}.center-scene{max-height:calc(100svh - 355px);min-height:100px;margin-bottom:10px}.node-page:has(.center-scene) .node-title h1{font-size:20px}.node-page:has(.center-scene) .rest-layout{padding:10px}}
@media(max-width:680px){.route .map{height:clamp(84px,calc(100svh - 506px),210px)}}
.node-preview-menu{position:relative;font-size:12px;margin:0 0 6px}.node-preview-menu>summary{cursor:pointer;min-height:32px;padding:8px 0}.node-preview-menu[open]>.node-types{position:absolute;top:30px;left:0;z-index:25;background:white;padding:8px;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 16px #17253612;min-width:270px}.node-page:has(.center-scene) .rest-layout .encounter-actions{margin-top:0}
/* Full-width actions; quiet move metadata, no redundant heading or selected underline. */
.combat-actions{display:flex;justify-content:stretch;gap:8px;padding:4px 10px}.combat-actions>button,.combat-actions>.combat-items{flex:1;min-width:0}.combat-actions .combat-items summary{text-align:center}.combat-actions>.combat-end-label{margin-left:auto}.combat-skills{padding:5px 10px}.combat-skills>div>span{display:grid;grid-template-columns:auto auto;justify-content:center;gap:1px 5px;line-height:16px}.combat-skills b{grid-column:1/-1;font-size:12px;font-weight:500}.combat-skills small{font-size:9px;color:var(--muted);font-weight:400;white-space:nowrap}.combat-skills .combat-type{color:#455e50}.combat-party button[aria-pressed=true]{box-shadow:none;background:transparent}.combat-party button[aria-pressed=true] small{font-size:0}.combat-party button[aria-pressed=true] small:after{content:'场上';font-size:10px;color:#0066cc;font-weight:500}.combat-party button[aria-pressed=true] img{filter:drop-shadow(0 2px 3px #2a659522)}
@media(max-width:650px){.combat-actions{gap:6px;padding:4px 7px}.combat-actions button,.combat-actions summary{font-size:12px;padding:10px 5px}.combat-skills b{font-size:11px}.combat-skills small{font-size:9px}.combat-party button[aria-pressed=true] small{font-size:0}}
/* Allocate useful space to controls instead of shrinking type to preserve empty arena. */
.combat-console{grid-template-rows:minmax(196px,1fr) 62px 84px 56px}.combat-skills{padding:9px 14px}.combat-skills>div>span{line-height:19px;gap:3px 6px}.combat-skills b{font-size:14px}.combat-skills small{font-size:11px}.combat-party{padding:8px 12px}.combat-party img{width:38px;height:38px}.combat-party button{min-height:66px}.combat-party small,.combat-party button[aria-pressed=true] small:after{font-size:11px}.combat-actions button,.combat-actions summary{font-size:14px}.combat-party button>span{max-width:48px}
@media(max-width:650px){.combat-console{grid-template-rows:minmax(170px,1fr) 62px 80px 56px}.combat-skills{padding:8px 8px}.combat-skills b{font-size:13px}.combat-skills small{font-size:10px}.combat-skills>div>span{gap:3px 4px}.combat-party{padding:6px 5px}.combat-party img{width:36px;height:36px}.combat-party small{font-size:10px}.combat-party button[aria-pressed=true] small{font-size:0}.combat-party button[aria-pressed=true] small:after{font-size:10px}.combat-party button>span{max-width:38px}.combat-actions button,.combat-actions summary{font-size:13px;padding:10px 4px}}
/* Prototype navigation is a disclosure, never part of the game's page height. */
.prototype-tools{position:fixed;right:10px;top:8px;z-index:100;font-size:12px}.prototype-tools>summary{cursor:pointer;list-style:none;padding:8px 12px;background:#ffffffea;border:1px solid #dcdde3;border-radius:8px;min-height:32px;color:#60616a}.prototype-tools[open]{background:white;padding:6px;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px #17253616}.prototype-tools .studio{height:auto;min-height:44px;display:flex;gap:8px;padding:4px}.prototype-tools .studio>span{display:none}.prototype-tools .studio nav{position:static;transform:none}.prototype-tools .tool-note{font-size:11px;padding:0 8px;margin:5px 0;color:var(--muted)}body:has(.battle-page) .prototype-tools{display:none}
.route{height:100svh;min-height:520px;display:flex;flex-direction:column;padding:14px 24px;gap:10px}.route .route-title{margin:0;padding-right:66px;flex:0 0 42px}.route .route-grid{flex:1;min-height:0}.route .map-card{display:flex;flex-direction:column;min-height:0}.route .map{flex:1;min-height:120px;height:auto;max-height:none;aspect-ratio:auto}.route .map-head,.route .map-caption,.route .journey{flex-shrink:0}.route .side{min-height:0}.route .map:has(svg[viewBox="0 0 1964 1346"]){aspect-ratio:auto}
@media(max-width:680px){.route{padding:10px 12px;gap:8px;min-height:540px}.route .route-title{padding-right:60px;flex-basis:38px}.route .route-grid{gap:8px}.route .map-card{flex:1}.route .map{min-height:100px;height:auto;max-height:none}.route .side{flex-shrink:0}.route .map-head{height:32px}}
/* Original laboratory, cropped at native pixel scale rather than miniaturized. */
.lab-home{height:100svh;min-height:540px;max-height:none;padding:24px 20px 16px;gap:12px;background:#f2efe3}.lab-home .home-core{padding:0;justify-content:center;gap:14px;min-height:0}.lab-home .intro h1{font-size:26px;font-weight:600;margin:0;color:#353d40}.lab-stage{position:relative;width:min(100%,660px);height:250px;flex-shrink:0;background:#e9e8e4 url('assets/oaks-lab.png') right -110px/624px 624px no-repeat;image-rendering:pixelated;border:3px solid #777c78;box-shadow:inset 0 0 0 3px #fff}.lab-home .balls{position:absolute;right:96px;top:46px;width:144px;height:86px;padding:0;gap:0;align-items:center;justify-content:center}.lab-home .balls.four-balls{width:208px;right:64px}.lab-home .ball{width:48px;height:64px;flex:0 0 48px;border-radius:0}.lab-home .ball .ball-sprite{width:36px;height:36px}.lab-home .ball img{width:56px;height:56px;object-fit:contain;max-width:none}.lab-home .ball[aria-pressed=true] img{width:64px;height:64px;object-fit:contain}.lab-home .open-ball{width:72px;height:72px;inset:auto;left:50%;top:50%;transform:translate(-50%,-50%)}.lab-home .reveal{width:min(100%,480px);height:138px;flex-shrink:0;background:#fffdf3;border:3px solid #747b78;border-radius:3px;box-shadow:inset 0 0 0 3px #e1e4db;gap:8px;padding:12px}.lab-home .name-row h2{font-size:21px}.lab-home .moves{gap:6px 28px}.lab-home .home-actions{padding:0 0 6px}.lab-home .home-actions .primary{background:#426b63;border-radius:7px;min-height:46px;min-width:260px;box-shadow:none}.lab-home .secret{bottom:14px;right:16px}.lab-home .reveal .hint{font-size:14px;color:#606655}
@media(max-width:680px){.lab-home{padding:18px 12px 12px;gap:10px}.lab-home .home-core{gap:12px}.lab-home .intro h1{font-size:23px}.lab-stage{height:clamp(180px,calc(100svh - 330px),280px);background-position:right -110px}.lab-home .reveal{height:134px}.lab-home .home-actions{padding:0 0 36px}.lab-home .home-actions .primary{font-size:14px;min-width:240px}.lab-home .secret{bottom:10px;right:14px}.lab-home .name-row h2{font-size:20px}.lab-home .moves .move-chip{font-size:13px}}
.lab-stage{background-position:right -30px}.lab-home .balls{top:126px}
@media(max-width:680px){.lab-stage{background-position:right -30px}}
.lab-home .balls.four-balls{width:144px;right:96px}.lab-home .four-balls .ball{width:36px;flex-basis:36px}.lab-home .four-balls .ball .ball-sprite{width:32px;height:32px}
/* Full room, original aspect ratio. Enlarge only the selection table for touch targets. */
.lab-home{padding:16px 12px 10px;gap:8px;min-height:540px}.lab-home .home-core{gap:10px}.lab-home .intro h1{font-size:23px}.lab-stage{width:min(100%,calc((100svh - 236px)*.92857),420px);height:auto;aspect-ratio:208/224;background-size:100% 100%;background-position:center;flex-shrink:0}.lab-table{position:absolute;left:73%;top:30%;transform:translateX(-50%);width:144px;height:64px;background:url('assets/oaks-lab.png') -384px -198px/624px 672px;image-rendering:pixelated}.lab-home .balls,.lab-home .balls.four-balls{left:73%;right:auto;top:calc(30% - 24px);width:132px;height:44px;transform:translateX(-50%);padding:0;gap:0}.lab-home .ball,.lab-home .four-balls .ball{width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;padding:0;overflow:visible}.lab-home .ball .ball-sprite,.lab-home .four-balls .ball .ball-sprite{width:28px;height:28px;min-width:28px;min-height:28px;flex:0 0 28px;padding:0;overflow:hidden;background-size:28px auto;line-height:0}.lab-home .balls.four-balls{width:176px;left:68%}.lab-stage:has(.four-balls) .lab-table{left:68%;width:176px;height:76px;background-size:762.67px 821.33px;background-position:-469.33px -242px}.lab-home .secret{position:absolute;left:calc(15% - 22px);right:auto;top:calc(30% - 22px);bottom:auto;width:44px;height:44px;padding:0;min-width:44px;display:flex;align-items:center;justify-content:center}.lab-home .secret .ball-sprite{width:28px;height:28px;flex:0 0 28px;min-width:28px;min-height:28px;overflow:hidden;background-size:28px auto;padding:0}.lab-home .secret>span:last-child:not(.ball-sprite){right:-8px;top:-10px}.lab-home .reveal{height:112px;padding:8px 12px;gap:5px}.lab-home .name-row h2{font-size:19px}.lab-home .moves{row-gap:2px}.lab-home .moves .move-chip{min-height:28px;font-size:13px}.lab-home .home-actions{padding:0}.lab-home .home-actions .primary{min-height:44px}.lab-home .ball img,.lab-home .ball[aria-pressed=true] img{width:56px;height:56px;object-fit:contain}.lab-home .open-ball{width:64px;height:64px}
@media(max-width:360px){.lab-home .intro h1{font-size:21px}.lab-home .home-core{gap:8px}.lab-stage{width:min(100%,calc((100svh - 226px)*.92857))}.lab-home .reveal{height:110px}}
/* Route typography, navigation targets, and action alignment. */
.route .route-title{align-items:center;gap:14px;padding-right:62px}.route .route-title>div{display:flex;align-items:baseline;gap:10px;min-width:0}.route .route-title>div>span{font-size:12px;font-weight:400;color:var(--muted);white-space:nowrap}.route .route-title h1{font-size:21px;font-weight:500;letter-spacing:0;margin:0;line-height:1.3}.route .badge-count{font-size:12px;white-space:nowrap;font-weight:400}.route .steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;align-items:center;margin:0 0 6px}.route .steps button{width:44px;height:44px;min-height:44px;justify-self:center;padding:0;display:grid;place-items:center;border:0;background:transparent;border-radius:8px}.route .steps button.current{border:0;background:#eaf2fa}.route .steps .ui-icon{width:20px;height:20px;display:block}.route .steps:before{top:22px;left:22px;right:22px;z-index:0;opacity:.45}.route .steps button{z-index:1}.route .node-heading{min-height:48px;align-items:center}.route .node-heading h2{font-size:16px;font-weight:500}.route .node-heading .primary{min-height:44px;min-width:92px;padding:10px 20px;border-radius:9px;font-size:14px}.route .journey:has(.choices) .primary{min-width:80px;padding:10px 16px}.route .choices button{min-height:44px;font-size:12px;border-radius:6px}.route .side .bag{font-variant-numeric:tabular-nums}.route .side .bag b{font-size:12px;font-weight:500}
@media(max-width:680px){.route .route-title>div{gap:7px}.route .route-title>div>span{font-size:11px}.route .route-title h1{font-size:18px}.route .badge-count{font-size:11px}.route .steps{gap:0}.route .journey{padding:6px 8px 8px}.route .node-heading .primary{min-width:84px;padding:10px 16px}.route .journey:has(.choices) .primary{min-width:68px;padding:10px 12px}.route .choices button{font-size:11px}.route .side section:not(.party-panel){gap:10px}.route .side .bag{justify-content:space-between;padding-left:8px}.route .side .bag+.bag{border-left:1px solid #e8e9ed}}
@media(max-width:360px){.route .route-title>div{display:block}.route .route-title h1{font-size:18px}.route .route-title>div>span{font-size:10px;display:block;margin-bottom:2px}}
/* Room residents stay on their original surfaces; no fourth-slot transfer. */
.lab-home .balls{top:calc(30% + 7px);height:44px}
.lab-home .secret{top:calc(25% - 22px);animation:none}
.lab-home .ball img,.lab-home .ball[aria-pressed=true] img,.lab-home .secret img{width:36px;height:36px;max-width:none;object-fit:contain;image-rendering:pixelated;filter:none;position:relative;z-index:2;transform:translateY(-5px)}
.lab-home .ball .open-ball,.lab-home .secret .open-ball{position:absolute;width:48px;height:48px;left:50%;top:50%;inset:auto;transform:translate(-50%,-50%);z-index:1}
.lab-home .ball .open-ball,.lab-home .secret .open-ball{left:50%;top:50%}
.lab-home .ball:hover{transform:none}.lab-home .secret.is-open{background:transparent;box-shadow:none}
.prof-oak{position:absolute;left:46%;top:34%;width:32px;height:64px;background:url('assets/prof-oak.png') 0 0/288px 64px no-repeat;image-rendering:pixelated;transform:translateX(-50%);pointer-events:none}
.lab-home .oak-name{font-size:15px;color:#424a43;font-weight:600}
@media(max-width:360px){.prof-oak{width:24px;height:48px;background-size:216px 48px}}
/* Current combatant: four quiet pixel corners, with HP never replaced. */
.combat-party button[aria-pressed=true]{background:transparent;box-shadow:none;border:0;background-image:linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868),linear-gradient(#547868,#547868);background-size:7px 2px,2px 7px,7px 2px,2px 7px,7px 2px,2px 7px,7px 2px,2px 7px;background-position:2px 2px,2px 2px,calc(100% - 2px) 2px,calc(100% - 2px) 2px,2px calc(100% - 2px),2px calc(100% - 2px),calc(100% - 2px) calc(100% - 2px),calc(100% - 2px) calc(100% - 2px);background-repeat:no-repeat}
.combat-party button[aria-pressed=true] small{font-size:10px}.combat-party button[aria-pressed=true] small:after,.combat-party button[aria-pressed=true]:before{content:none}
/* Node changes replace one action row, never resize or lift the map. */
.route .journey,.route .journey:has(.choices){display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:44px 48px;gap:6px 10px;height:118px;box-sizing:border-box;padding:8px 14px 12px}
.route .journey .steps{grid-column:1/-1;grid-row:1;margin:0}.route .journey .node-heading{grid-column:1/-1;grid-row:2;height:48px;min-height:48px}
.route .journey:has(.choices) .node-heading{grid-column:2;grid-row:2}.route .journey:has(.choices) .choices{grid-column:1;grid-row:2;margin:0;height:48px}
@media(max-width:680px){.route .journey,.route .journey:has(.choices){height:112px;padding:6px 8px 8px;gap:6px 4px}}
.prof-oak{left:40%;top:40%}
/* Backpack labels and counts share the same optical centre, not top-aligned boxes. */
.route .side .bag{align-items:center;min-height:24px;line-height:24px;margin:0}
.route .side .bag span,.route .side .bag b{line-height:24px;display:block}
.route .side section:not(.party-panel) h3{line-height:24px;margin:0;align-self:center}
.route .side .bag+.bag{border-left:0;position:relative}.route .side .bag+.bag:before{content:'';position:absolute;left:0;top:4px;bottom:4px;width:1px;background:#e8e9ed}
.lab-home .oak-intro{font-size:11px;line-height:16px;color:#596052;margin:0}
.lab-home .reveal{gap:2px}.lab-home .home-actions{height:76px;flex:0 0 76px;display:flex;justify-content:center;align-items:center}
.lab-home .starter-confirm{width:min(100%,480px)}.lab-home .starter-confirm p{font-size:12px;line-height:20px;margin:0 0 4px}.lab-home .starter-confirm>div{display:flex;justify-content:center;gap:14px}.lab-home .starter-confirm .primary{min-width:140px}.lab-home .starter-confirm .quiet-link{min-width:88px}
.lab-stage{width:min(100%,calc((100svh - 268px)*.92857),420px)}
@media(max-width:360px){.lab-stage{width:min(100%,calc((100svh - 258px)*.92857))}.lab-home .oak-intro{font-size:10px}}
.lab-home .reveal{height:128px;justify-content:center}.lab-home .reveal .name-row{flex-shrink:0}.lab-home .reveal .moves{flex-shrink:0}.lab-stage{width:min(100%,calc((100svh - 284px)*.92857),420px)}
@media(max-width:360px){.lab-home .reveal{height:126px}.lab-stage{width:min(100%,calc((100svh - 274px)*.92857))}}
.combat-skills .combat-type{padding:2px 4px;border-radius:3px;background:#ececf0;color:#555761;font-size:10px;font-style:normal;line-height:16px}
.combat-type[data-type=grass]{background:#e1eee4;color:#376446}.combat-type[data-type=fire]{background:#f9e6df;color:#934d32}.combat-type[data-type=water]{background:#e2ecf9;color:#37638c}.combat-type[data-type=electric]{background:#f3ecd1;color:#705813}.combat-type[data-type=dragon]{background:#ebe2f5;color:#62408b}.combat-type[data-type=flying]{background:#e8edf7;color:#4b5f89}.combat-type[data-type=ground]{background:#efe4d7;color:#755534}.combat-type[data-type=bug]{background:#e8edda;color:#53652e}.combat-type[data-type=dark]{background:#e8e3e3;color:#625052}
/* Action labels centre identically across button and native details controls. */
.combat-actions>button,.combat-actions>details>summary{height:44px;min-height:44px;padding:0 12px;display:flex;align-items:center;justify-content:center;line-height:20px;font-weight:500;font-size:14px;box-sizing:border-box}
.combat-actions>details{display:block;min-width:0}.combat-actions>details>summary{list-style:none}.combat-actions>details>summary::-webkit-details-marker{display:none}
.combat-skills .cooldown-move{position:relative;padding-bottom:8px}.combat-skills .cd-progress{position:absolute;bottom:0;left:10%;width:80%;height:3px;appearance:none;border:0;border-radius:0;background:#e2e6e3}.cd-progress::-webkit-progress-bar{background:#e2e6e3}.cd-progress::-webkit-progress-value{background:#5b806e}.cd-progress::-moz-progress-bar{background:#5b806e}.combat-skills .cd-remaining{display:inline-block;min-width:28px;font-variant-numeric:tabular-nums;text-align:center}
/* Align replacement table over the original table's top edge. */
.lab-table{top:28.5%}.lab-home .balls{top:calc(28.5% + 7px)}
/* Original FireRed tile borders, not CSS-drawn imitations. */
.lab-home .reveal{border:10px solid transparent;border-image:url('assets/move-list-frame.png') 5 fill stretch;border-radius:0;box-shadow:none;background:transparent;padding:2px 8px;image-rendering:pixelated}
.combat-status>div{border:8px solid transparent;border-image:url('assets/hud-player-frame.png') 5 5 8 14 fill stretch;background:transparent;box-shadow:none;border-radius:0;padding:0 2px 0 10px;image-rendering:pixelated;min-height:58px;display:grid;grid-template-columns:1fr;gap:1px}
.combat-status>div:last-child{border-image-source:url('assets/hud-opponent-frame.png');border-image-slice:5 14 8 5 fill;padding:0 10px 0 2px}
.combat-status b,.combat-status>div>span{line-height:15px;font-size:12px;margin:0}.combat-status b small{font-size:10px;line-height:15px}.combat-status progress{height:4px;margin:1px 0 0}
@media(max-width:650px){.combat-status>div{padding:0 1px 0 7px;min-height:60px}.combat-status>div:last-child{padding:0 7px 0 1px}.combat-status b,.combat-status>div>span{font-size:11px;line-height:14px}}
/* Shared text baselines across list metadata and action rows. */
.move-facts{align-items:baseline}.move-facts>span{line-height:20px}.name-row{align-items:center}.name-row .tag{line-height:16px;padding-top:2px;padding-bottom:2px}
.encounter-actions>button,.learn-actions>button,.rest-layout>.primary,.rest-layout>.quiet-link,.combat-menu button{display:inline-flex;align-items:center;justify-content:center;line-height:20px}
.party-heading h3,.party-heading .quiet-link{line-height:20px}.order-buttons{align-items:center}
@media(max-width:360px){.combat-actions>button,.combat-actions>details>summary{font-size:12px;padding:0 4px;white-space:nowrap}.combat-actions>details{flex:1;min-width:44px}}
.lab-home .reveal{height:140px}.lab-stage{width:min(100%,calc((100svh - 296px)*.92857),420px)}
@media(max-width:360px){.lab-home .reveal{height:138px}.lab-stage{width:min(100%,calc((100svh - 286px)*.92857))}}
:root{--canvas:#f3f1e9;--line:#d9d8ce}.page:not(.lab-home){background:#f3f1e9}.combat-console,.map-card,.side section{background:#fffefa}.combat-skills,.combat-party{background:#fffefa}.combat-actions{background:#f3f1e9}
html,body{background:#f3f1e9}.node-page{min-height:100svh}
.combat-heading .quiet-link,.combat-heading summary,.node-top .quiet-link,.map-head button,.party-heading .quiet-link{display:inline-flex;align-items:center;justify-content:center;line-height:20px;padding-top:0;padding-bottom:0}
.party-roster .order-buttons button,.ordered-skills .order-buttons button{display:flex;align-items:center;justify-content:center;padding:0;line-height:20px}
@font-face{font-family:BoutiqueBitmap;src:url('assets/fonts/BoutiqueBitmap9x9.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
:root{font-family:BoutiqueBitmap,"PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none}button,input,select,textarea{font-family:inherit}.classic-home{padding:10px 12px;min-height:540px;justify-content:center}.classic-home .home-core{gap:8px;flex:0 0 auto;width:min(100%,480px);margin:auto}.classic-home .intro h1{font-size:20px;line-height:26px;font-weight:400}.classic-home .lab-stage{width:min(100%,calc((100svh - 178px)*.92857),420px);margin:auto;overflow:visible}.classic-home .reveal{height:112px;padding:2px 8px;gap:4px}.classic-home .name-row h2{font-size:20px;font-weight:400}.classic-home .moves .move-chip{font-size:15px;min-height:28px}.classic-home .move-chip b{font-weight:400}.classic-home .move-type{font-size:12px}.classic-dialogue{position:absolute;bottom:0;left:0;width:100%;min-height:96px;padding:7px 10px;border:12px solid transparent;border-image:url('assets/dialogue-frame.png') 12 24 fill stretch;background:transparent;text-align:left;font-size:20px;line-height:25px;color:#363a43;z-index:6;image-rendering:pixelated}.classic-choice{position:absolute;right:4%;bottom:98px;z-index:6;border:8px solid transparent;border-image:url('assets/choice-frame.png') 8 fill stretch;min-width:90px;padding:0 4px;image-rendering:pixelated}.classic-choice button{display:block;width:100%;min-height:44px;padding:0 4px;background:transparent;font-size:18px;text-align:left;line-height:24px}.classic-choice button:before{content:'▸';display:inline-block;width:14px}.classic-choice button:hover{color:#315f89}.classic-mon-window{position:absolute;top:4%;left:39%;width:24%;aspect-ratio:1;z-index:5;border:8px solid transparent;border-image:url('assets/choice-frame.png') 8 fill stretch;pointer-events:none;image-rendering:pixelated}.classic-mon-window img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
@media(max-width:360px){.classic-home{padding:8px}.classic-home .lab-stage{width:min(100%,calc((100svh - 176px)*.92857))}.classic-home .name-row h2{font-size:18px}.classic-home .moves .move-chip{font-size:14px}.classic-dialogue{font-size:18px;line-height:23px;padding:5px 6px;min-height:94px}.classic-choice{bottom:96px}}
/* Stable dialogue height: choice menus never overlap wrapped Chinese lines. */
.classic-home{padding:10px 12px;min-height:540px}.classic-home .intro{display:none}.classic-home .home-core{gap:8px}.classic-home .lab-stage{width:min(100%,calc((100svh - 118px)*.92857),440px)}
.classic-dialogue{height:116px;min-height:116px;padding:5px 8px;line-height:23px;font-size:20px;box-sizing:border-box;overflow-wrap:break-word}
.classic-choice{bottom:124px;right:4%;padding:0 4px}.classic-choice button{min-height:44px;line-height:24px;font-size:18px}
.classic-home .reveal{height:88px;min-height:88px;padding:2px 10px;justify-content:center}.classic-home .reveal .moves{width:100%;column-gap:20px;row-gap:4px}.classic-home .moves .move-chip{justify-content:flex-start;font-size:16px}.classic-home .move-type{font-size:12px}
.classic-mon-window{top:2%;left:41%;width:23%;aspect-ratio:1;display:flex;flex-direction:column;align-items:center}.classic-mon-window img{min-height:0;flex:1}.classic-mon-name{position:absolute;top:100%;margin-top:3px;left:50%;transform:translateX(-50%);padding:2px 5px;font-size:14px;line-height:18px;background:#fff;color:#30353b;white-space:nowrap}
@media(max-width:360px){.classic-home{padding:8px}.classic-home .lab-stage{width:min(100%,calc((100svh - 112px)*.92857))}.classic-dialogue{height:116px;min-height:116px;font-size:18px;line-height:23px;padding:5px 6px}.classic-choice{bottom:124px}.classic-home .reveal{height:88px;padding:2px 6px}.classic-home .moves .move-chip{font-size:15px}.classic-mon-name{font-size:12px;line-height:16px}.classic-home .reveal .moves{column-gap:12px}}
@media(max-width:360px){.classic-dialogue{height:104px;min-height:104px;line-height:22px;padding:4px 6px}.classic-choice{bottom:112px;left:8px;right:auto}}
/* On the full-room touch layout the clear floor is left of Oak, below Pikachu. */
.classic-choice{left:3px;right:auto;min-width:90px;width:90px;padding:0}.classic-choice button{font-size:16px;padding:0 1px;white-space:nowrap}
@media(max-width:360px){.classic-choice{left:3px;right:auto}}
/* Region map prototype uses original Kanto tiles, not a screenshot as the whole UI. */
.route .map-card,.route .side section{border:8px solid transparent;border-image:url('assets/choice-frame.png') 8 fill stretch;border-radius:0;box-shadow:none;background:transparent;image-rendering:pixelated}.route .map-head{padding:0 8px;height:42px;min-height:42px;border-bottom:2px solid #b0b7a9;font-size:16px}.route .map-head button{font-size:14px;min-height:40px}.route .retro-map{position:relative;background:#f7f7e8;padding-bottom:32px;overflow:hidden}.retro-map svg{display:block;width:100%;height:100%;image-rendering:pixelated}.retro-map .location{fill:none;stroke:#b82e26;stroke-width:2;stroke-dasharray:none;filter:none;rx:0}.retro-map .map-player{image-rendering:pixelated;filter:none}.map-place{position:absolute;bottom:0;left:0;right:0;height:32px;padding:3px 10px;font-size:18px;line-height:24px;border-top:2px solid #adb79e;background:#eff4df;color:#303b35}.route .journey{background:#fff;image-rendering:pixelated}.route .node-heading .primary{border:0;border-radius:0;background:#426b53;color:white;box-shadow:none;font-size:16px;min-width:84px}.route .steps button{border-radius:0}.route .steps button.current{background:#e8efdf;outline:2px solid #5a705e;outline-offset:-6px}.route .choices button{border-radius:0;box-shadow:none}.route .route-title h1{font-size:22px;font-weight:400}.route .route-title>div>span,.route .badge-count{font-size:14px}.route .side .bag b{font-weight:400}.route .map-card{overflow:hidden}
@media(max-width:680px){.route .map-head{height:40px;min-height:40px}.route .map-head button{font-size:13px}.route .map-card,.route .side section{border-width:6px}.route .map-place{height:28px;line-height:22px;font-size:16px}.route .retro-map{padding-bottom:28px;min-height:100px}.route .route-title h1{font-size:20px}.route .route-title>div>span,.route .badge-count{font-size:12px}.route .side .party-panel{padding:4px 7px}.route .side section:not(.party-panel){padding:1px 7px}.route .node-heading .primary{font-size:15px;min-width:76px}.route .side .party-heading{margin-bottom:2px}}
/* Full map: crop transparent source gutters only, never geographical content. */




.route .choices{border:6px solid transparent!important;border-image:url('assets/choice-frame.png') 8 fill stretch!important;image-rendering:pixelated;gap:4px!important;padding:0 4px;height:48px!important}
.route .choices button,.route .choices button[aria-pressed=true]{background:transparent;color:#343a3c;border-radius:0;font-size:14px;padding:0 2px;min-height:36px;white-space:nowrap;justify-content:flex-start;line-height:20px}
.route .choices button>span{display:none}.route .choices button:before{content:'▸';width:12px;flex:none;visibility:hidden}.route .choices button[aria-pressed=true]:before{visibility:visible}
.route .node-heading .primary{border:6px solid transparent;border-image:url('assets/choice-frame.png') 8 fill stretch;background:transparent;color:#343a3c;padding:0 8px;min-height:44px}
@media(max-width:680px){.route .map-card:has(.full-region){align-self:stretch}.route .choices{padding:0}.route .choices button{font-size:12px}.route .journey:has(.choices) .primary{padding:0 3px;min-width:60px}.route .choices button:before{width:9px}}



/* User-selected previous homepage composition, without external nameplate. */
.classic-mon-window{aspect-ratio:1;left:41%;top:2%;width:23%;padding:0}.classic-mon-window img{width:100%;height:100%;flex:1;object-fit:contain}.classic-choice{left:auto;right:3px;bottom:124px;width:90px}.classic-choice button{min-height:44px}.classic-mon-name{display:none}
@media(max-width:360px){.classic-choice{left:auto;right:3px;bottom:112px}}
