:root{color-scheme:dark;--lcd:#c4d2a3;--ink:#304437;--edge:#28446e;--shell-high:#58616b;--shell-mid:#353e48;--shell-low:#272f39;--button-high:#578ade;--button-mid:#315fbc;--button-low:#244e9e;--shell-label:#d2deec;--button-label:#fff8e7;--ornament:#d2deec}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{height:100dvh;background:#15202c;background-image:radial-gradient(ellipse at 50% 48%,#344858,transparent 70%),linear-gradient(#ffffff03 1px,transparent 1px),linear-gradient(90deg,#ffffff03 1px,transparent 1px);background-size:auto,24px 24px,24px 24px;color:#c9d7e6;font-family:monospace;-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation;border:0}
button:disabled{opacity:.3;cursor:default}
button:focus-visible{outline:2px solid #ffe29b;outline-offset:2px}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
main{height:100%;max-width:710px;margin:auto;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));display:flex;flex-direction:column;justify-content:center;gap:22px;min-height:0}
header{flex:none;display:flex;justify-content:space-between;align-items:center;padding:0 6px}
.brand{font-size:11px;font-weight:bold;letter-spacing:1.8px}
.edition{font-size:8px;letter-spacing:1px;color:#8ca8c3}
.device{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 74px;grid-template-rows:25px minmax(0,1fr) 25px;gap:10px 22px;flex:0 1 510px;min-height:0;width:100%;padding:20px 25px;background:linear-gradient(130deg,var(--shell-high),var(--shell-mid) 50%,var(--shell-low));border:3px solid #131d29;border-radius:33px 40px 46px 33px;box-shadow:inset 4px 5px 0 #8d96a044,inset -7px -9px 0 #12192399,0 18px 35px #0006,0 4px 0 #0b131f}
.top-ridge{position:absolute;top:-9px;left:18%;width:40%;height:10px;background:repeating-linear-gradient(90deg,#526477 0 24px,#1c2939 24px 34px);border:2px solid #172330;border-radius:5px 5px 0 0}
.device-label{grid-column:1/3;display:flex;justify-content:space-between;align-items:center;margin:0 5px;color:var(--shell-label);font-size:10px;font-weight:bold;letter-spacing:2px}
.led{width:7px;height:7px;border-radius:50%;background:#1c2d3b;box-shadow:0 0 0 3px #222f3b}
.led.on{background:#b0dfb0;box-shadow:0 0 8px #b0efb4,0 0 0 3px #222f3b}
.bezel{grid-column:1;grid-row:2;min-height:0;display:flex;flex-direction:column;background:var(--lcd);border:11px solid var(--edge);border-radius:18px;box-shadow:0 0 0 3px #18283e,inset 0 0 12px #45503844,2px 3px 0 #61768f;color:var(--ink);overflow:hidden}
.screen-top{flex:0 0 27px;display:flex;align-items:center;padding:0 5px;gap:2px;font-weight:bold}
.screen-top button{background:none;padding:0 4px;font-size:9px;min-height:25px}
.screen-top #screen-partner{flex:1;text-align:left;overflow:hidden;white-space:nowrap}
.screen-top #clock{font-size:10px}
#screen-menu{font-size:16px;min-width:25px}
.icon-strip{flex:0 0 38px;display:flex;justify-content:space-around;align-items:stretch;padding:0 3px}
.icon-strip button{flex:1;min-width:0;position:relative;background:transparent;padding:7px 8px;opacity:.35;display:flex;align-items:center;justify-content:center}
.icon-strip button svg{width:24px;height:24px;fill:var(--ink)}
.icon-strip button.active{opacity:1}
.icon-strip button.active::after{content:'';position:absolute;bottom:2px;left:calc(50% - 7px);width:14px;height:2px;background:var(--ink)}
.icon-strip button:hover{opacity:1}
.icon-strip button:disabled{opacity:.16}
.icon-strip.bottom{border-top:1px solid #53684915}
.display{flex:1;min-height:0;position:relative;overflow:hidden;display:flex;align-items:center;background:var(--lcd)}
.display canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;image-rendering:crisp-edges;display:block;background:var(--lcd);pointer-events:none}
.screen-message{flex:0 0 34px;display:flex;align-items:center;justify-content:center;text-align:center;padding:3px 7px;font-size:10px;line-height:1.25;background:#ced9ac;border-top:1px solid #53684922}
.screen-bottom{flex:0 0 18px;display:flex;justify-content:space-between;align-items:center;padding:0 6px;font-size:8px;font-weight:bold;letter-spacing:.2px}
.screen-panel{position:absolute;inset:0;background:var(--lcd);padding:6px 9px;display:flex;flex-direction:column;overflow:hidden;gap:7px}
.panel-title{display:flex;justify-content:space-between;align-items:center;flex:none;min-height:22px;margin:0;gap:4px}
.back-icon{background:none;width:24px;height:25px;font-size:23px;flex:none;padding:0}
.page-count{font-size:9px;flex:none}
.pixel-label{display:inline-flex;gap:2px;align-items:center;justify-content:center;max-width:100%;flex-shrink:1}
.pixel-label svg{width:6px;height:10px;fill:var(--ink);flex-shrink:1}
.pixel-label.large{gap:4px}
.pixel-label.large svg{width:12px;height:20px}
.option-list{display:grid;flex:1;min-height:0;grid-auto-rows:minmax(0,1fr);gap:2px}
.option-list button{border:0;border-radius:0;background:transparent;padding:5px 0;display:flex;justify-content:space-between;align-items:center;text-align:left;min-height:0;gap:5px}
.option-name{display:flex;align-items:center;gap:5px;min-width:0}
.choice-arrow{opacity:0;font-size:11px;flex:none}
.option-list button.active .choice-arrow{opacity:1}
.option-list button.active{background:#3044370c}
.option-list small{font-size:9px;white-space:nowrap}
.panel-footer{display:flex;justify-content:space-between;align-items:center;font-size:8px;flex:none;min-height:23px;gap:2px}
.panel-footer button{background:#30443710;min-width:30px;height:25px;font-size:18px;border-radius:2px}
.stat-content{display:flex;flex:1;min-height:0;flex-direction:column;justify-content:space-around}
.status-classic{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:16px}
.status-classic p{font-size:10px;margin:0;text-align:center}
.pixel-hearts{display:flex;gap:6px;width:100%;justify-content:center}
.pixel-hearts svg{width:calc((100% - 24px)/4);max-width:43px;height:auto;fill:var(--ink)}
.pixel-hearts .full .heart-centre{fill:var(--ink)}
.pixel-hearts .empty .heart-centre{fill:var(--lcd)}
.age-value{font-size:27px;font-weight:bold}
.record-list{flex:1;display:flex;flex-direction:column;justify-content:space-evenly;min-height:0}
.record-list p{display:flex;justify-content:space-between;font-size:12px;margin:2px 4px}
.album-content{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.album-sprite{width:80px;height:80px;max-height:42%;image-rendering:pixelated;object-fit:contain}
.album-content h3{font-size:20px;margin:0}
.album-content p{font-size:10px;margin:0;text-align:center}
.copy-page{font-size:11px;line-height:1.45;display:flex;flex:1;flex-direction:column;justify-content:center;min-height:0;overflow:hidden;white-space:pre-line}
.copy-page p{margin:5px 0}
.goal-stage{font-size:13px;margin:0}
.check-row{font-size:11px;padding:3px 0;display:flex;gap:6px}
.check-row .done{color:#426435}
.panel-primary{background:#354b3b;color:#ecf5d0;padding:9px 7px;border-radius:2px;font-size:11px;min-height:34px;flex:none}
.clock-big{text-align:center;font-size:34px;font-weight:bold;margin:8px 0}
.confirm-actions{display:flex;gap:5px}
.confirm-actions button{flex:1}
#power-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--lcd);text-align:center;padding:6px}
.boot-mark{font-size:23px}
#power-overlay h1{font-size:22px;line-height:1.15;letter-spacing:2px;margin:7px 0}
#power-overlay p{font-size:9px;margin:4px 0 12px}
#power{background:#304037;color:#dceac0;font-size:12px;padding:11px 16px;border-radius:2px}
#walk-controls{position:absolute;inset:auto 4px 4px;display:flex;justify-content:space-between;gap:5px}
#walk-controls button{border:1px solid #53684966;background:#c4d2a3ef;border-radius:2px;height:35px;min-width:41px;font-size:12px}
#walk-controls #walk-attack{font-size:9px;padding:0 6px}
.model-label{grid-column:1;grid-row:3;display:flex;justify-content:space-between;align-items:center;font-size:8px;letter-spacing:1.5px;color:var(--shell-label);margin:0 5px}
.hardware{grid-column:2;grid-row:2;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:10px;padding:18px 0}
.hardware>div{text-align:center}
.hardware button{width:64px;height:64px;border-radius:50%;background:radial-gradient(circle at 35% 30%,var(--button-high),var(--button-mid) 65%,var(--button-low));border:4px solid #141d2c;box-shadow:inset 2px 2px 0 #8daeee60,0 4px 0 #18202b,0 0 0 3px #65708055;color:var(--button-label);font-weight:bold;font-size:16px}
.hardware button:active{transform:translateY(3px);box-shadow:inset 2px 2px 0 #8daeee60,0 1px 0 #18202b,0 0 0 3px #65708055}
.hardware span{display:block;font-size:8px;letter-spacing:.7px;color:var(--shell-label);margin-top:8px}
.screws{grid-column:2;grid-row:3;display:flex;align-items:center;justify-content:space-between}
.screws i{width:8px;height:8px;border:1px solid #182430;border-radius:50%;background:linear-gradient(45deg,#647485 40%,#253441 45%,#253441 55%,#647485 60%)}
.speaker{width:28px;height:8px;background:repeating-linear-gradient(90deg,#15222e 0 2px,transparent 2px 5px)}
.device-hint{flex:none;text-align:center;font-size:10px;line-height:1.4;color:#9eb3c7;margin:0}
.device{isolation:isolate}
.device>.bezel,.device>.hardware,.device>.device-label,.device>.model-label,.device>.screws,.device>.top-ridge{position:relative;z-index:1}
.device>.top-ridge{position:absolute}
.shell-decoration{position:absolute;inset:3px;border-radius:inherit;overflow:hidden;pointer-events:none;z-index:0;color:var(--ornament)}
.shell-decoration svg{width:100%;height:100%;display:block}
.shell-badge{position:absolute;left:12%;bottom:5px;z-index:2;pointer-events:none;width:20px;height:20px;border:1px solid var(--ornament);border-radius:4px;background:var(--shell-low)}
.shell-badge img{width:100%;height:100%;image-rendering:pixelated;object-fit:contain}
.device[data-theme="clear"] .shell-decoration{background:linear-gradient(135deg,#70b5b344,#bddde422);box-shadow:inset 0 0 16px #d9fcf177}
.device[data-theme="smoke"] .shell-decoration{background:linear-gradient(135deg,#26364b88,#a5683822);box-shadow:inset 0 0 14px #accced44}
.device[data-theme="rift"] .shell-decoration{color:#7be0df;text-shadow:0 0 4px #cf69d6}
.theme-animated .shell-decoration{animation:shell-glow 4s ease-in-out infinite}
@keyframes shell-glow{50%{opacity:.45}}
@media(prefers-reduced-motion:reduce){.theme-animated .shell-decoration{animation:none}}
.theme-preview{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;font-size:11px}
.theme-preview strong{font-size:14px;line-height:1.25}
.theme-preview p{margin:2px 0;line-height:1.3}
.theme-preview small{font-size:9px;line-height:1.3}
.theme-emblem{display:block;max-width:75px;width:24%;height:48px;border:2px solid var(--ink);border-radius:8px;overflow:hidden;color:var(--ink)}
.theme-emblem svg{width:100%;height:100%}
.colour-swatches{display:flex;flex-wrap:wrap;justify-content:center;gap:7px}
.colour-swatches button{width:29px;height:29px;border:4px solid;color:white;font-weight:bold;border-radius:6px;text-shadow:0 1px 2px black}
.colour-swatches .chosen{outline:2px solid var(--ink);outline-offset:2px}
.room-map{display:flex;justify-content:space-between;gap:4px;flex:none}
.room-map span{font-size:9px;flex:1;text-align:center;border:1px solid #30443755;padding:4px 0}
.room-map .current{background:var(--ink);color:var(--lcd);font-weight:bold}
.room-map .complete{background:#30443722}
.run-stats{font-size:9px;text-align:center;flex:none;font-weight:bold}
.dungeon-choices{display:flex;flex:1;min-height:0;flex-direction:column;gap:5px;overflow:auto}
.dungeon-choices button{flex:1;min-height:36px;text-align:left;padding:7px;border:1px solid #30443755;background:#3044370c;color:var(--ink);display:flex;flex-direction:column;justify-content:center;gap:4px}
.dungeon-choices .chosen{border:2px solid var(--ink);background:#30443722}
.dungeon-choices strong{font-size:11px}
.dungeon-choices small{font-size:9px}
.enemy-intent{position:absolute;top:34%;left:3px;right:3px;text-align:center;font-size:8px;background:#c4d2a3cc;pointer-events:none}
.battle-controls:has(#guard) button{font-size:8px;min-width:0;overflow-wrap:anywhere}
.battle-controls #guard{background:#445c60}
.battle-controls{position:absolute;inset:auto 4px 4px;display:flex;gap:4px}
.battle-controls button{flex:1;height:32px;font-size:9px;border-radius:2px;background:#354b3b;color:#ecf5d0}
.battle-controls button:nth-child(2){background:#995b33}
.result-title{font-size:22px;text-align:center;margin:0}
.screen-panel.battle-panel{background:transparent;pointer-events:none;padding:0}
.battle-panel button,.battle-panel .battle-controls{pointer-events:auto}
.screen-panel.result-panel{gap:4px}
.result-panel .result-title{font-size:clamp(16px,3.5dvh,22px);flex:none;color:var(--ink)}
.result-fighters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;flex:1;min-height:0;overflow:auto;align-items:center}
.result-fighter{--result-dot:clamp(24px,8dvh,48px);display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:3px 0}
.result-badge{font-size:9px;letter-spacing:1px;padding:3px 5px;border:1px solid #30443755;background:#3044370d}
.winner .result-badge{background:var(--ink);color:#edf7cc}
.result-sprite{width:var(--result-dot);height:var(--result-dot);flex:none;background-repeat:no-repeat;background-size:calc(var(--result-dot) * var(--result-columns)) calc(var(--result-dot) * var(--result-rows));background-position:var(--pose-one);image-rendering:pixelated;image-rendering:crisp-edges}
.result-sprite.full.happy{animation:result-pose .6s steps(1,end) infinite,result-hop .6s ease-in-out infinite}
.result-sprite.idle.happy{animation:result-hop .6s ease-in-out infinite}
.result-sprite.full.angry{animation:result-pose .8s steps(1,end) infinite,result-droop .8s ease-in-out infinite}
.result-sprite.idle.angry{animation:result-droop .8s ease-in-out infinite}
.result-sprite.angry{filter:saturate(.55);opacity:.75}
.result-name{font-size:10px;text-align:center;max-width:100%;overflow-wrap:anywhere;line-height:1.2}
.result-copy{flex:none;font-size:9px;line-height:1.3;text-align:center;margin:0;max-height:2.6em;overflow:auto}
.result-countdown{font-size:10px;text-align:center;font-weight:bold;min-height:14px;flex:none}
.result-panel .confirm-actions{gap:5px}
.result-panel .confirm-actions button{flex:1;min-width:0;font-size:9px;padding:6px 3px}
.result-paused .result-sprite{animation-play-state:paused}
@keyframes result-pose{0%,100%{background-position:var(--pose-one)}50%{background-position:var(--pose-two)}}
@keyframes result-hop{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes result-droop{0%,100%{transform:translateY(2px) translateX(-1px)}50%{transform:translateY(2px) translateX(1px)}}
@media(prefers-reduced-motion:reduce){.result-sprite.full,.result-sprite.idle{animation:none;background-position:var(--pose-two)}}
.care-meter{font-size:9px;line-height:1.45;flex:none;padding:2px 4px;background:#3044370c}
.journal-tabs{display:flex;gap:3px;flex:none}
.journal-tabs button{flex:1;background:#30443712;padding:6px 2px;font-size:8px;min-height:28px}
.journal-tabs .chosen{background:#354b3b;color:#ecf5d0}
.journal-preview{gap:3px!important}
.journal-preview .collection-sprite{width:62px;height:62px;max-height:40%}
.journal-preview span,.journal-preview small{font-size:8px}
.unknown-sprite{font-size:46px;font-weight:bold;height:58px;opacity:.35}
.copy-page{overflow-y:auto;overflow-x:hidden;flex-shrink:1;justify-content:safe center}
.pvp-form{display:flex;flex:1;min-height:0;flex-direction:column;gap:6px;overflow:auto;font-size:10px}
.pvp-form input{width:100%;min-height:32px;background:#d9e3ba;color:#304437;border:1px solid #627c54;padding:5px;font:inherit}
.pvp-form label{font-size:9px;line-height:1.3}
.pvp-address{font-size:13px;font-weight:bold;overflow-wrap:anywhere;user-select:text}

@media(max-width:480px){main{gap:18px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
.device{flex-basis:480px;padding:16px 13px;grid-template-columns:minmax(0,1fr) 54px;gap:8px 13px;border-radius:26px 33px 37px 26px}
.device-label{font-size:8px;letter-spacing:1.4px}
.bezel{border-width:8px;border-radius:13px}
.hardware{padding:18px 0}
.hardware button{width:49px;height:49px;border-width:3px;font-size:14px}
.hardware span{font-size:7px;margin-top:7px}
.screen-panel{padding:6px;gap:5px}
.icon-strip button{padding:7px 3px}
.icon-strip button svg{width:23px;height:23px}
.option-list small{font-size:8px}
.pixel-label{gap:1.5px}
.pixel-label svg{width:5px;height:9px}
.pixel-label.large svg{width:11px;height:19px}
.copy-page{font-size:10px;line-height:1.4}
.model-label{font-size:7px}
.screen-top #clock{font-size:9px}
.screen-bottom{font-size:7px}
.screen-message{font-size:9px}
.check-row{font-size:10px;padding:2px 0}
.goal-stage{font-size:11px}
}

@media(max-height:620px){main{gap:10px;padding-top:12px;padding-bottom:8px}
.device{flex:1;padding-top:12px;padding-bottom:12px;grid-template-rows:18px minmax(0,1fr) 16px;row-gap:5px}
.icon-strip{flex-basis:32px}
.icon-strip button{padding-top:4px;padding-bottom:4px}
.screen-top{flex-basis:23px}
.screen-message{flex-basis:28px;font-size:9px}
.screen-bottom{flex-basis:16px}
.screen-panel{gap:3px;padding:4px 6px}
.panel-title{min-height:20px}
.panel-footer{min-height:20px}
.panel-footer button{height:22px}
.status-classic{gap:12px}
.hardware{padding:8px 0}
.copy-page{font-size:10px;line-height:1.35}
.album-content{gap:5px}
.album-sprite{width:64px;height:64px}
#power-overlay h1{font-size:18px}
.boot-mark{display:none}
}

@media(max-height:460px) and (min-width:500px){main{max-width:660px;gap:0;padding:8px}
header,.device-hint,.top-ridge,.device-label,.model-label,.screws{display:none}
.device{grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) 58px;gap:16px;padding:10px 17px;flex:1;border-radius:25px}
.bezel,.hardware{grid-row:1}
.hardware button{width:48px;height:48px}
.hardware{gap:5px;padding:0}
.hardware span{margin-top:4px}
.screen-top{flex-basis:22px}
.icon-strip{flex-basis:31px}
.screen-message{flex-basis:25px}
.screen-bottom{flex-basis:15px}
.screen-panel{gap:3px;padding:3px 8px}
.copy-page{font-size:10px;line-height:1.3}
.panel-primary{min-height:28px;padding:7px}
.check-row{padding:1px 0;font-size:10px}
.album-content{gap:3px}
.album-sprite{width:62px;height:62px}
.status-classic{gap:10px}
.pixel-hearts svg{max-width:30px}
.pixel-label.large svg{height:16px;width:10px}
#power-overlay h1{font-size:17px}
#power-overlay p{margin:3px 0 8px}
#power{padding:8px 14px}
}

@media(max-width:350px){.edition{display:none}
.device{grid-template-columns:minmax(0,1fr) 47px;column-gap:10px;padding-left:10px;padding-right:10px}
.hardware button{width:43px;height:43px}
.icon-strip button svg{width:21px;height:21px}
.option-list small{display:none}
.screen-top #screen-partner{font-size:8px}
.screen-top{padding:0 2px}
.screen-message{font-size:8px}
}


.collection-preview{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center}
.collection-sprite{width:80px;height:80px;max-height:46%;object-fit:contain;image-rendering:pixelated}
.collection-name{font-size:12px;text-align:center;line-height:1.2;overflow-wrap:anywhere;max-width:100%;margin:0}
.collection-preview span{font-size:9px}.collection-preview small{font-size:8px}
#partner-search{width:100%;min-width:0;background:#d7e0ba;color:var(--ink);border:1px solid #53684966;border-radius:2px;padding:9px 6px;font:16px monospace;margin:8px 0;touch-action:manipulation}
#collection-search{font-size:8px;min-width:30px;padding:0 4px}.screen-top #screen-partner{min-width:0;text-overflow:ellipsis}
@media(max-height:460px){.collection-preview{gap:3px}.collection-sprite{width:56px;height:56px}.collection-name{font-size:10px}.collection-preview small{font-size:7px}}

/* Growth menus keep requirements in a contained scrolling area, above fixed actions. */
.route-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.route-head{display:flex;align-items:center;gap:8px;padding:2px 0 6px}
.route-head img{width:42px;height:42px;flex:none;object-fit:contain;image-rendering:pixelated}
.route-head div{min-width:0;flex:1}.route-head strong{display:block;font-size:12px;line-height:1.2;overflow-wrap:anywhere}
.route-head small{display:block;font-size:8px;line-height:1.35;margin-top:3px}
.route-checks .check-row{font-size:10px;padding:2px 0;align-items:flex-start;line-height:1.3}
#growth-search{width:100%;min-width:0;background:#d7e0ba;color:var(--ink);border:1px solid #53684966;border-radius:2px;padding:9px 6px;font:16px monospace;margin:8px 0;touch-action:manipulation}
.undiscovered{filter:brightness(0);opacity:.35}
.panel-footer{gap:3px}.panel-footer>span{min-width:0;flex:1;white-space:normal;font-size:8px}
.panel-footer button[id$="-search"]{font-size:8px;min-width:32px;width:auto;padding:0 3px}
.collection-preview{overflow-y:auto;overflow-x:hidden;flex-shrink:1;justify-content:safe center}
.collection-preview span,.collection-preview small{flex:none;overflow-wrap:anywhere}
.panel-primary,.confirm-actions{flex-shrink:0}.option-list small{max-width:45%;white-space:normal;text-align:right;line-height:1.3}
@media(max-width:480px){.route-head strong{font-size:11px}.route-head{gap:5px}.route-head img{width:32px;height:32px}.route-checks .check-row{font-size:9px}}
@media(max-height:460px){.route-head{padding-bottom:3px}.route-head img{width:26px;height:26px}.route-head strong{font-size:10px}.route-checks .check-row{font-size:9px;padding:1px 0}}

.journal-tools{display:flex;align-items:center;gap:4px;flex:none;font-size:8px;justify-content:space-between}
.journal-tools select{min-width:0;max-width:55%;background:#d3deb1;border:1px solid #627c5455;color:#304437;font:inherit;padding:3px;min-height:24px}
.journal-tools span{font-size:8px;white-space:nowrap}

.pvp-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.pvp-actions button{min-height:36px;padding:6px;font-size:10px}
.panel-secondary{background:#30443715;color:var(--ink);border:1px solid #30443750;border-radius:2px;font-size:10px;padding:7px;min-height:30px;flex:none}
.room-choice{background:#30443712;border:1px solid #30443733;padding:9px 6px;text-align:left;display:flex;flex-direction:column;gap:4px;flex:none;min-height:44px}.room-choice strong{font-size:11px;overflow-wrap:anywhere}.room-choice span{font-size:8px}
.join-request{border:1px solid #30443750;padding:6px;display:flex;flex-direction:column;gap:6px;font-size:10px;flex:none}.pvp-form>strong,.pvp-form>small{flex:none}.pvp-form p{margin:4px 0;line-height:1.4}
/* v0.9: clear item rows and compact social scenes inside the existing LCD. */
.social-panel{gap:5px}.social-panel .panel-title{min-height:40px}.social-panel .back-icon{width:48px;height:48px}.social-panel .panel-title .pixel-label{gap:1px}.social-panel .panel-title .pixel-label svg{width:4px;height:8px}
.supply-summary{flex:none;font-size:9px;line-height:1.45;padding:3px 1px;border-bottom:1px solid #33473630;overflow-wrap:anywhere}
.supply-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;scrollbar-width:thin}
.supply-row{display:flex;align-items:center;gap:7px;min-height:52px;flex:1 0 52px;width:100%;padding:5px;background:#3044370a;border:1px solid #33473635;border-radius:3px;text-align:left;color:var(--ink)}
.supply-row.chosen,.visitor-actions button.chosen,.chat-choices button.chosen{border:2px solid var(--ink);background:#edf3ab}
.supply-row:disabled{opacity:.65}.supply-row img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated;flex:none}.supply-row>span{min-width:0;flex:1}.supply-row strong{display:block;font-size:10px;line-height:1.3;overflow-wrap:anywhere}.supply-row b{white-space:nowrap}.supply-row small{display:block;font-size:8px;line-height:1.35;margin-top:2px}
.supply-footer{flex:none;display:flex;align-items:center;gap:8px;min-height:48px}.supply-footer span{flex:1;font-size:8px;line-height:1.4}.supply-footer button{min-width:48px;min-height:48px;padding:4px;font-size:9px;font-weight:bold;background:#30443712;border:1px solid #33473640;border-radius:3px}
.social-body{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;font-size:10px;line-height:1.5;overflow-wrap:anywhere}.social-body p{margin:7px 0}.social-body>strong{display:block}.visitor-pair{display:flex;align-items:center;justify-content:space-around;gap:8px;padding:4px 0}.visitor-pair>div{flex:1;min-width:0;text-align:center}.visitor-pair img{display:block;width:40px;height:40px;margin:auto;object-fit:contain;image-rendering:pixelated;animation:visitor-hop 1.4s steps(2,end) infinite}.visitor-pair>div:last-child img{animation-delay:.3s}.visitor-pair small{display:block;font-size:8px;line-height:1.3;overflow-wrap:anywhere}.visitor-pair>span{font-size:16px}
.visitor-actions,.chat-choices{display:grid;gap:8px}.visitor-actions button,.chat-choices button{min-height:48px;padding:6px;background:#3044370c;border:1px solid #33473645;border-radius:3px;font-size:10px;font-weight:bold}.chat-choices{flex:none}.visitor-record{text-align:center}.visitor-record .album-sprite{width:48px;height:48px}.buff-label{display:block;font-size:9px;line-height:1.4;padding:3px;background:#edf3ab}
.egg-preview{position:relative;gap:3px}.egg-preview .egg-art{position:absolute;left:8px;top:6px;width:44px;height:44px}.egg-art svg{width:100%;height:100%}.egg-preview .collection-sprite{max-height:48px}.egg-pattern-preview{text-align:center}.egg-pattern-preview>svg{display:block;width:64px;height:64px;margin:8px auto}.social-panel .confirm-actions>button,.social-panel .panel-primary,.social-panel .panel-secondary{min-height:48px}
@keyframes visitor-hop{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}@keyframes visitor-pulse{50%{border-color:#334736;background:#dfeaa8}}
@media(prefers-reduced-motion:reduce){.visitor-pair img,#home-visitor{animation:none}}
/* The full MENU list gives narrow LCDs comfortably sized labelled controls. */
.screen-top{flex:0 0 48px;min-height:48px}
.screen-top #screen-menu{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:48px;min-height:48px;padding:3px;font-size:17px;line-height:1}
#screen-menu>span{font-size:8px;line-height:1.4;font-weight:bold;letter-spacing:.4px}
.icon-strip{flex:0 0 48px;min-height:48px}
.icon-strip button{padding:8px 2px}
.visitor-dot{position:absolute;right:6px;top:4px;width:6px;height:6px;border-radius:50%;background:var(--ink);box-shadow:0 0 0 2px var(--lcd);pointer-events:none}
.icon-strip button.guest-waiting:not(:disabled):not(.active){opacity:.85}
.main-menu-list{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.main-menu-item{flex:none;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:48px;min-width:48px;width:100%;padding:8px;background:#3044370c;border:1px solid #33473645;border-radius:3px;text-align:left;font-size:10px;line-height:1.35}
.main-menu-item.chosen{border:2px solid var(--ink);background:#edf3ab}
.main-menu-item:disabled{opacity:.55}.main-menu-name{font-weight:bold;overflow-wrap:anywhere}
.main-menu-item small{font-size:8px;line-height:1.4;max-width:46%;overflow-wrap:anywhere;text-align:right}
.visitor-overview{flex:none;font-size:10px;line-height:1.4;padding:2px 0 4px;border-bottom:1px solid #33473625}
.visitor-overview strong,.visitor-overview small{display:block}.visitor-overview small{font-size:8px;margin-top:3px}
.visitor-hub .main-menu-item{align-items:flex-start;flex-direction:column;gap:2px}.visitor-hub .main-menu-item small{max-width:100%;text-align:left}
@media(max-width:429px){.screen-top #screen-menu{background:#3044370c;border-radius:3px}.icon-strip button svg{width:21px;height:21px}}

/* A stable frame, one fitted page, and separate details for readable LCD menus. */
.menu-content{display:flex;flex:1;min-height:0;min-width:0;flex-direction:column;gap:5px;overflow:hidden}
.menu-ghost{position:absolute;z-index:4;pointer-events:none;contain:paint;margin:0;background:var(--lcd);color:var(--ink)}
.main-menu-list,.supply-list{gap:4px;overscroll-behavior:contain;overflow-x:hidden}
.main-menu-item,.supply-row{flex:none;min-height:54px;padding:6px;border-width:2px}
.supply-row{min-height:54px;gap:5px}
.supply-row img{width:32px;height:32px}
.supply-row strong{font-size:11px;line-height:1.3}
.supply-row small{font-size:9px;line-height:1.3}
.item-amount{flex:none;font-size:10px;white-space:nowrap}
.supply-row.chosen,.main-menu-item.chosen{box-shadow:inset 3px 0 var(--ink)}
.supply-row,.main-menu-item,.visitor-actions button,.chat-choices button{transition:background-color 90ms ease,box-shadow 90ms ease}
.supply-footer{gap:3px;min-width:0}
.supply-footer>span{min-width:0;overflow-wrap:normal;font-size:8px}
.supply-footer>button{flex:none;min-width:48px;width:48px;font-size:9px;padding:3px}
.supply-summary{font-size:10px;line-height:1.3;padding:2px 0}
.item-detail-body{font-size:11px;line-height:1.4;overscroll-behavior:contain}
.item-detail-heading{display:flex;align-items:center;gap:8px;min-height:44px}
.item-detail-heading>img{width:40px;height:40px;flex:none;image-rendering:pixelated}
.item-detail-heading>div{min-width:0}
.item-detail-heading strong{display:block;font-size:13px;line-height:1.3}
.item-detail-heading span{display:block;font-size:9px;line-height:1.4;margin-top:3px}
.item-care{background:#3044370b;padding:5px;font-size:10px;line-height:1.4}
.item-warning{border-left:3px solid var(--ink);padding-left:6px;font-size:10px}
.item-feedback{background:#edf3ab;padding:5px;font-weight:bold;font-size:10px}
.visitor-actions{flex:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
.visitor-actions button,.chat-choices button{min-width:0;overflow-wrap:anywhere;font-size:9px;line-height:1.35;padding:5px 3px}
.visitor-actions:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
.visitor-hub .main-menu-item small{font-size:9px;line-height:1.3}
.visitor-record p{margin:5px 0}.visitor-record>strong{font-size:12px}
.visitor-record .album-sprite{width:40px;height:40px}
.social-panel .panel-footer{min-height:26px;font-size:9px}
.social-panel .panel-title .pixel-label svg{width:5px;height:9px}
.social-panel .panel-title{gap:3px}
@media(max-width:480px) and (min-height:461px){.device{flex:1 1 620px;max-height:660px}}
@media(prefers-reduced-motion:reduce){.supply-row,.main-menu-item,.visitor-actions button,.chat-choices button{transition:none}}

/* Fishing cards keep the gameplay canvas clear and details on one fitted page. */
.fishing-card{text-align:center;display:flex;flex-direction:column;align-items:center;gap:5px;overflow-y:auto;min-height:0}.fishing-card strong{font-size:13px}.fishing-card p{margin:2px 0;font-size:11px;line-height:1.4}.fishing-card small{font-size:10px;line-height:1.35}.fishing-icon{width:64px;height:48px;flex:none;image-rendering:pixelated}.social-panel:has(.fishing-card) .visitor-actions button{min-height:48px}
@media(max-height:460px){.fishing-icon{width:44px;height:34px}.fishing-card{gap:3px}.fishing-card strong{font-size:11px}.fishing-card p,.fishing-card small{font-size:9px}}

/* Compact habitat filters keep the Fish Book within the LCD. */
.fish-spot-tabs{display:flex;gap:4px;flex:none;margin:1px 0 5px}.fish-spot-tabs button{flex:1;min-width:0;min-height:36px;padding:4px 2px;font-size:10px;font-weight:800;border:2px solid #6b8057;background:#c1cda8;color:#304731}.fish-spot-tabs button.chosen{background:#3e5844;color:#e3eac9}.fishing-book-card{gap:3px;overflow:hidden;justify-content:center}.fishing-book-card .fishing-icon{width:72px;height:60px}.fish-rarity{font-weight:800;letter-spacing:.3px}.fishing-book-card p{margin:2px 0}.fishing-book-card small{line-height:1.25}
@media(max-height:650px){.fishing-book-card .fishing-icon{width:48px;height:40px}.fishing-book-card{gap:2px}.fish-spot-tabs{margin-bottom:2px}.fish-spot-tabs button{min-height:32px}.fishing-book-card p{font-size:10px}.fishing-book-card small{font-size:9px}}

.audio-mix-body{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0;justify-content:center;text-align:center}.audio-mix-row{display:grid;grid-template-columns:48px 1fr 48px;align-items:center;gap:8px;border:2px solid transparent;padding:4px}.audio-mix-row.chosen{border-color:#627c54}.audio-mix-row button{min-height:44px;font-size:22px;font-weight:bold}.audio-mix-row span{display:flex;flex-direction:column;gap:4px}.audio-mix-row small{font-size:14px}.audio-mix-body>small{font-size:10px}
/* Illustrated dungeon pages: fixed actions, a flexible panorama, short facts. */
.dungeon-panel{gap:4px}.dungeon-panel .menu-content{gap:4px;overflow:hidden}
.dungeon-card{flex:1;min-height:0;display:flex;flex-direction:column;gap:5px;text-align:center;overflow:hidden}
.dungeon-area-name{flex:none;font-size:13px;line-height:1.2}
.dungeon-landscape{flex:1;min-height:20px;position:relative;background:#c4d2a3;border:1px solid #61754e;overflow:hidden;display:flex;align-items:center}
.dungeon-landscape>svg{display:block;width:100%;height:100%;shape-rendering:crispEdges}
.dungeon-companion{position:absolute;width:20%;max-width:42px;max-height:52%;object-fit:contain;bottom:10%;left:40%;image-rendering:pixelated}
.dungeon-tiers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;flex:none}
.dungeon-tiers button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #61754e66;background:#61754e15;color:#334736;padding:5px 1px;font-size:9px;min-height:34px}
.dungeon-tiers small{font-size:7px;line-height:1}.dungeon-tiers .selected{background:#334736;color:#ecf5d0;border-color:#334736}.dungeon-tiers .cleared:not(.selected){background:#61754e33}.dungeon-tiers .locked:not(.selected){border-style:dashed}
.dungeon-facts{flex:none;display:flex;align-items:center;justify-content:center;gap:8px;font-size:9px;min-height:16px}
#dungeon-info{border:1px solid #61754e66;background:transparent;font-size:8px;padding:4px 6px;min-height:24px}
.dungeon-cost,.dungeon-lock{flex:none;font-size:8px;line-height:1.25}.dungeon-lock{min-height:10px}
.dungeon-info-body{flex:1;min-height:0;overflow:auto;font-size:10px;line-height:1.4}.dungeon-info-body>strong{font-size:13px}.dungeon-info-body p{margin:9px 0}
.dungeon-compact .dungeon-card{gap:3px}.dungeon-compact .dungeon-area-name{font-size:11px}.dungeon-compact .dungeon-tiers button{font-size:8px;min-height:26px;padding:3px 1px;gap:2px}.dungeon-compact .dungeon-tiers small{font-size:6px}.dungeon-compact .panel-primary{padding:5px;min-height:26px}.dungeon-compact .dungeon-facts{font-size:8px;min-height:12px}.dungeon-compact #dungeon-info{min-height:18px;padding:2px 5px}

.dungeon-compact .dungeon-card{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.dungeon-compact .dungeon-landscape{flex-shrink:0;min-height:24px}
.habitat-preview-body{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;gap:5px;text-align:center;overflow:auto}
.habitat-preview-body>strong{font-size:12px;flex:none}.habitat-preview-body>small{font-size:8px;flex:none;line-height:1.3}
#habitat-preview{display:block;flex:1;min-height:35px;max-height:180px;max-width:100%;width:100%;object-fit:contain;image-rendering:pixelated}

/* Requests occupy one fitted card; Home reuses its existing message row. */
.screen-message>span{flex:1;min-width:0}
#home-goal{flex:none;background:#334736;color:#e3eac9;font-size:7px;padding:5px 4px;margin-left:4px;min-height:24px}
.request-body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;overflow:auto}
.request-body>small,.request-body>b{font-size:9px}.request-body>strong{font-size:14px;line-height:1.3}
.request-body p{font-size:10px;line-height:1.4;margin:2px 0}
.request-progress{width:90%;height:8px;border:1px solid #61754e;background:#9aab8255;flex:none}
.request-progress span{height:100%;display:block;background:#334736}
.request-note{flex:none;text-align:center;font-size:8px}
.event-picture{position:relative;flex:1;min-height:24px;max-height:100px;overflow:hidden;border:1px solid #61754e55;background:#c4d2a3}
.event-picture>svg{width:100%;height:100%;display:block;shape-rendering:crispEdges}
.event-picture>.event-overlay{position:absolute;inset:0}
.event-baby{position:absolute;width:15%;max-height:46%;object-fit:contain;left:42.5%;bottom:12%;image-rendering:pixelated}
.room-reward{font-size:10px;line-height:1.3}
.dungeon-compact .event-picture{flex:0 0 26px}.dungeon-compact .room-map span{padding:2px 0}
.dungeon-compact .dungeon-choices{gap:3px}.dungeon-compact .dungeon-choices button{min-height:30px;padding:3px;gap:2px}
.dungeon-compact .dungeon-choices strong{font-size:9px}.dungeon-compact .dungeon-choices small{font-size:8px}
.dungeon-compact .request-body{gap:4px}.dungeon-compact .request-body>strong{font-size:12px}
.dungeon-compact .request-body p{font-size:9px}.dungeon-compact .request-note{font-size:7px}

/* Compact gym cards keep the active partner and next gain visible. */
.gym-panel{gap:5px}.gym-tabs,.gym-tools{display:flex;gap:4px;flex:none}.gym-tabs button{flex:1;min-height:32px;border:1px solid #30443750;background:#30443710;font-size:11px}.gym-tabs .chosen{background:var(--ink);color:var(--lcd)}.gym-tools button{flex:1;font-size:8px;min-height:30px;background:#30443715;border-radius:2px;padding:3px}.gym-card{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow:auto;text-align:center}.gym-card strong{font-size:13px}.gym-card small{font-size:9px}.gym-card b{font-size:10px}.gym-illustration{display:flex;align-items:center;justify-content:center;gap:18px;min-height:64px}.gym-illustration img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated}.gym-prop{width:58px;height:48px;flex:none}.gym-xp{height:6px;width:80%;background:#30443720;flex:none}.gym-xp span{display:block;height:100%;background:var(--ink)}.gym-target{min-height:24px;flex:none;font-size:8px;background:#30443710}.gym-info,.gym-result{display:flex;flex:1;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;overflow-y:auto;font-size:11px;line-height:1.4}.gym-info p{margin:2px 0}.gym-info small,.gym-result small{font-size:9px}.gym-result>strong{font-size:15px}.gym-result img{width:80px;height:80px;image-rendering:pixelated;object-fit:contain}.gym-result b{font-size:12px}.gym-panel .panel-title .pixel-label svg{width:4px;height:8px}.gym-panel .panel-title{min-height:24px}.gym-panel .panel-footer{min-height:22px}.battle-controls #guard{min-height:40px}
@media(max-height:740px){.gym-panel{gap:3px}.gym-illustration{min-height:42px;gap:10px}.gym-illustration img{width:42px;height:42px}.gym-prop{width:42px;height:34px}.gym-tabs button{min-height:26px}.gym-tools button{min-height:26px}.gym-card{gap:3px}.gym-card strong{font-size:11px}.gym-result img{width:48px;height:48px}.gym-result{gap:4px}.gym-panel .panel-primary,.gym-panel .panel-secondary{min-height:28px;padding:5px}.gym-panel .panel-footer{min-height:19px;font-size:7px}}

.dungeon-compact.gym-panel{gap:2px}.dungeon-compact.gym-panel .panel-title{min-height:20px}.dungeon-compact.gym-panel .gym-tabs button{min-height:24px}.dungeon-compact.gym-panel .gym-tools button{min-height:22px}.dungeon-compact.gym-panel .gym-target{min-height:20px}.dungeon-compact.gym-panel .panel-primary,.dungeon-compact.gym-panel .panel-secondary{min-height:26px;padding:4px}.dungeon-compact.gym-panel .panel-footer{min-height:18px}.dungeon-compact .gym-card{display:grid;grid-template-columns:40px 1fr;gap:2px;align-content:center;overflow:hidden}.dungeon-compact .gym-illustration{grid-row:1/6;min-height:32px;gap:0}.dungeon-compact .gym-illustration img{width:32px;height:32px}.dungeon-compact .gym-illustration .gym-prop{display:none}.dungeon-compact .gym-card strong{font-size:10px}.dungeon-compact .gym-card small,.dungeon-compact .gym-card b{font-size:8px}.dungeon-compact .gym-xp{width:100%;height:4px}.dungeon-compact .gym-result{gap:3px}.dungeon-compact .gym-result img{width:32px;height:32px}

/* Separate portrait playfield; touch controls never cover the combat canvas. */
.rt-overlay{position:fixed;inset:0;z-index:100;background:#c4d2a3;color:#334736;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:10px;touch-action:none;overscroll-behavior:none}
.rt-overlay button{border:2px solid #839773;border-radius:5px;background:#d5dfbb;color:#334736;min-height:46px;font-size:11px;font-weight:bold;touch-action:none;padding:8px 5px}
.rt-top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex:none}.rt-top strong{font-size:17px;letter-spacing:1px}.rt-top small{display:block;font-size:9px;letter-spacing:2px;margin-top:4px}.rt-top button{min-width:86px}
.rt-hud{display:grid;grid-template-columns:1fr 1fr;gap:18px;flex:none}.rt-hud>div{min-width:0}.rt-hud strong{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rt-hud span{font-size:10px}.rt-track{height:8px;background:#a8b991;border:1px solid #849976;margin-top:4px}.rt-track i{display:block;height:100%;width:100%;background:#4f8669}.rt-track.enemy i{background:#ab6354}
.rt-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#bccc9f;overflow:hidden;border:2px solid #849976;border-radius:5px}.rt-stage canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;pointer-events:none}.rt-stage>p{position:absolute;background:#c4d2a3;padding:16px;max-width:90%}
.rt-strip{display:flex;align-items:center;gap:8px;flex:none;font-size:10px;min-height:46px}.rt-strip #rt-caption{flex:1;line-height:1.3}.rt-strip button{min-width:88px}
.rt-controls{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:center;flex:none;height:132px;max-width:620px;width:100%;align-self:center}.rt-stick{height:112px;width:112px;position:relative;border-radius:50%;background:#adbf96;border:3px solid #849976;touch-action:none;display:flex;align-items:center;justify-content:center}.rt-stick span{display:block;width:52px;height:52px;border-radius:50%;background:#67805c;border:3px solid #455e43;pointer-events:none}.rt-stick small{position:absolute;bottom:7px;font-size:8px;pointer-events:none}.rt-stick.rt-inactive{opacity:.45}.rt-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rt-actions button{height:56px;position:relative;overflow:hidden;background:linear-gradient(to right,#afbf99 var(--cooldown,0%),#d5dfbb var(--cooldown,0%));font-size:10px}.rt-actions .rt-attack{background:#354b3b;color:#ecf5d0}.rt-actions button:disabled{opacity:.6}
.rt-dialog{position:absolute;inset:0;background:#c4d2a3f5;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px;gap:12px;text-align:center}.rt-dialog strong{font-size:24px}.rt-dialog p{font-size:12px;line-height:1.5;max-width:320px}.rt-dialog button{width:min(100%,260px)}
.rt-setup{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:4px}.rt-setup img{width:64px;height:64px;max-height:30%;object-fit:contain;image-rendering:pixelated}.rt-setup strong{font-size:14px}.rt-setup small{font-size:8px;text-align:center}.rt-choice-row{display:flex;gap:3px;width:100%}.rt-choice-row button{flex:1;min-height:30px;background:#30443712;border:1px solid #839773;font-size:8px;padding:4px 2px}.rt-choice-row button.selected{background:#354b3b;color:#ecf5d0}
@media(min-width:650px){.rt-overlay{padding-left:max(20px,calc((100vw - 620px)/2));padding-right:max(20px,calc((100vw - 620px)/2))}}
@media(max-height:580px){.rt-overlay{gap:5px}.rt-controls{height:106px;grid-template-columns:92px minmax(0,1fr);gap:12px}.rt-stick{height:92px;width:92px}.rt-actions button{height:46px}.rt-top strong{font-size:14px}.rt-hud strong{font-size:10px}.rt-strip{min-height:40px}.rt-strip button,.rt-top button{min-height:40px}}

.rt-top-actions{display:flex;gap:5px}.rt-top .rt-top-actions #rt-fx{min-width:58px;font-size:9px}.rt-top-actions #rt-pause{min-width:76px;font-size:10px}.rt-stick span{transition:transform 35ms linear}.rt-hud span{font-variant-numeric:tabular-nums}.rt-track i{transition:width 90ms linear}.rt-actions button{font-variant-numeric:tabular-nums}.rt-actions button:active:not(:disabled){transform:translateY(1px)}
@media(prefers-reduced-motion:reduce){.rt-stick span,.rt-track i{transition:none}}

/* Six Rookie selection, compact enough for the existing LCD. */
.rt-setup .rt-roster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.rt-roster button{min-height:54px;padding:3px;display:grid;grid-template-columns:24px 1fr;align-items:center;font-size:10px}.rt-setup .rt-roster img{width:24px;height:24px;grid-row:span 2;image-rendering:pixelated}.rt-roster small{font-size:8px}.rt-roster .selected{outline:2px solid #354b3b}.rt-setup{gap:4px}.rt-hud>div{position:relative;padding-left:32px}.rt-hud img{position:absolute;left:0;top:8px;width:28px;height:28px;image-rendering:pixelated}.rt-hud small{display:block;font-size:8px;line-height:12px}.rt-dialog button{min-height:36px;margin-top:4px}

.rt-setup .rt-roster img{max-height:none}.rt-setup .rt-roster button{min-height:40px;font-size:9px}.rt-setup>.rt-rival{width:100%;min-height:24px;font-size:9px;background:#354b3b12;border:1px solid #839773}.rt-setup>strong{font-size:12px}.rt-setup>small{line-height:10px}.rt-dialog{gap:6px}.rt-dialog p{margin:5px 0}

/* Update 4: attack calls and compact partner paging leave the arena unobscured. */
.rt-callouts{position:absolute;inset:8px 8px auto;z-index:1;display:flex;justify-content:space-between;gap:8px;pointer-events:none}.rt-callouts span{max-width:46%;padding:5px 7px;background:#354b3beb;color:#f2edbe;border:1px solid #829772;font-size:10px;font-weight:bold;line-height:1.3;text-align:center}.rt-callouts span:last-child{background:#774a3ceb}.rt-setup .rt-roster small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.rt-setup .rt-roster button{min-width:0}.rt-setup .rt-choice-row small{align-self:center;min-width:35px}.rt-overlay{gap:7px}.rt-strip{min-height:40px}.rt-hud{gap:12px}.rt-controls{height:124px}.rt-roster button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.rt-dialog{z-index:2}

/* Simplified stage combat: two spacious actions. */
.rt-actions{grid-template-columns:1fr 1fr;gap:8px}.rt-actions button{height:56px;min-width:48px;min-height:48px;font-size:10px}.rt-rival-controls{display:flex;gap:4px;width:100%}.rt-rival-controls button{flex:1;min-width:0;font-size:9px;min-height:28px}.rt-setup .rt-roster span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}

/* Battle Hub: illustrated mode cards, read-only fighter header, compact tools. */
.battle-hub-panel{gap:4px;padding:6px}.battle-hub-panel .panel-title{min-height:48px}.battle-hub-panel .back-icon{width:48px;height:48px}.battle-hub-panel .menu-content{gap:6px;overflow:hidden}.battle-hub-panel .panel-footer{min-height:22px}.battle-hub-panel .panel-footer button{min-width:48px;min-height:48px;height:48px}
.hub-fighter{display:flex;align-items:center;gap:8px;padding:4px 6px;border:1px solid #53684955;background:#baca9e;min-height:52px;flex:none}.hub-fighter>img{width:44px;height:44px;object-fit:contain;image-rendering:pixelated;animation:hub-idle 2.4s steps(2,end) infinite}.hub-fighter>div:first-of-type{min-width:0;flex:1}.hub-fighter strong{display:block;font-size:12px;line-height:1.2;overflow-wrap:anywhere}.hub-fighter small{font-size:9px;display:block;line-height:1.3}.hub-meters{width:70px;flex:none;display:grid;gap:4px}.hub-meter>span{height:4px;background:#53684933;display:block}.hub-meter i{display:block;height:100%;background:#354b3b}.hub-meter small{font-size:8px}
.hub-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px}.hub-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(62px,1fr));gap:6px;flex:1;min-height:130px}.hub-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex:none}.hub-card{min-width:48px;min-height:62px;padding:4px;background:#d4deb7;color:#354b3b;border:2px solid #6b8057;border-radius:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;position:relative;touch-action:manipulation;transition:transform 80ms ease,background 80ms ease}.hub-card.chosen,.hub-card:focus-visible{border-color:#263c2d;background:#354b3b;color:#edf4d2;box-shadow:inset 0 0 0 1px #d3dfb5;outline:none}.hub-card:active{transform:translateY(1px)}.hub-label{font-size:11px;font-weight:800;line-height:1.15;max-width:100%;text-align:center}.hub-cursor{display:none;margin-right:3px}.hub-card.chosen .hub-cursor{display:inline}.hub-card small{font-size:9px;line-height:1.2;text-align:center}.hub-art{height:24px;width:100%;display:flex;justify-content:center;overflow:hidden}.hub-art svg{height:100%;width:100%;max-width:110px;image-rendering:pixelated}.hub-card.chosen .hub-art{background:#d4deb7;border-radius:1px}.hub-tool{min-height:48px;gap:2px;padding:3px 1px}.hub-tool .hub-art{height:13px}.hub-tool .hub-label{font-size:10px}.hub-tool small{font-size:8px}.hub-paged{gap:6px}.hub-paged .hub-card{flex:1;flex-direction:row;justify-content:flex-start;gap:6px;min-height:56px;padding:5px}.hub-paged .hub-art{width:50px;height:24px;flex:none}.hub-paged .hub-label{text-align:left;flex:1}.hub-paged .hub-card small{max-width:32%;font-size:9px}.hub-paged .hub-tool .hub-art{height:24px}.battle-hub-panel.dungeon-compact .panel-footer>span{font-size:7px}.battle-hub-panel.dungeon-compact .hub-card{min-height:48px}.battle-hub-panel.result-paused .hub-fighter>img{animation-play-state:paused}
@keyframes hub-idle{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){.hub-fighter>img{animation:none}.hub-card{transition:none}}

.battle-hub-panel.hub-compact .hub-fighter{min-height:40px;padding:2px 4px}.battle-hub-panel.hub-compact .hub-fighter>img{width:32px;height:32px}.battle-hub-panel.hub-compact .hub-fighter strong{font-size:11px}.battle-hub-panel.hub-compact .hub-fighter small{font-size:8px}

/* Food and Lights share the Battle Hub's LCD cards and care actions. */
.care-menu-panel{gap:4px;padding:6px}.care-menu-panel .panel-title{min-height:48px}.care-menu-panel .back-icon{width:48px;height:48px}.care-menu-panel .menu-content{gap:5px;overflow:hidden}.care-menu-panel .panel-footer{min-height:22px}.care-menu-panel .panel-footer button{min-width:48px;min-height:48px;height:48px}
.care-menu-panel .hub-fighter{min-height:44px;padding:2px 4px}.care-menu-panel .hub-fighter>img{width:36px;height:36px}.care-menu-panel .hub-modes{grid-template-rows:repeat(2,minmax(56px,1fr));min-height:118px}.care-menu-panel .hub-modes .hub-card{min-height:56px;padding:3px;gap:2px}.care-menu-panel .care-full .hub-art{height:20px}.care-menu-panel .care-full .hub-label{font-size:10px}.care-menu-panel .care-full .hub-card small{font-size:8px}.care-menu-panel .hub-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.care-menu-panel .care-full .hub-tool{padding:2px}.care-menu-panel .care-full .hub-tool .hub-art{height:12px}.care-menu-panel .hub-body{gap:5px}.care-menu-panel .hub-paged .hub-card{min-height:48px}.care-menu-panel .hub-paged .hub-art{width:36px}.care-menu-panel .hub-paged .hub-card small{max-width:38%;font-size:9px}
.care-alert{display:flex;align-items:center;justify-content:space-between;gap:4px;flex:none;min-height:20px;padding:3px 4px;border:1px solid #53684955;font-size:8px;line-height:1.3}.care-alert strong{font-size:8px}.care-warning{border:2px solid #354b3b;background:#e0e5b7}.care-load{display:flex;gap:2px;flex:none}.care-load i{display:block;width:5px;height:7px;border:1px solid #536849}.care-load i.filled{background:#354b3b}.care-mini{text-align:right;max-width:90px;line-height:1.3}.care-mini small{display:block;font-size:8px;font-weight:bold;margin-bottom:2px}
.care-toggles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;flex:1;min-height:76px}.care-toggles .hub-card{min-height:76px}.care-toggles .hub-art{height:32px}
.care-rest{position:relative;flex:1;min-height:74px;max-height:180px;border:1px solid #53684955;background:#baca9e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px;overflow:hidden}.care-rest>strong{font-size:11px;text-align:center;max-width:75%;overflow-wrap:anywhere}.care-rest .hub-meters{width:70%;max-width:180px}.care-sky{position:absolute;right:5px;top:5px;width:32px;height:24px}.care-sky svg{width:100%;height:100%}.care-bed{position:relative;width:84px;height:44px;display:flex;justify-content:center;align-items:flex-end}.care-bed img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated;z-index:1;animation:hub-idle 2.4s steps(2,end) infinite}.care-bed>span{display:none;position:absolute;bottom:0;left:0;right:0;height:12px;background:#536849;border-bottom:4px solid #354b3b}.care-rest.is-sleeping .care-bed>span{display:block}.care-rest.is-sleeping .care-bed img{animation:none}.care-rest.is-paused{border-style:dashed}.care-rest.is-paused .care-bed img,.care-menu-panel.result-paused img{animation-play-state:paused}.care-menu-panel.dungeon-compact .panel-footer>span{font-size:7px}
@media(prefers-reduced-motion:reduce){.care-bed img{animation:none}}

/* Collection, settings and visitors reuse the illustrated LCD card language. */
.portal-panel{gap:4px;padding:6px}.portal-panel .panel-title{min-height:48px}.portal-panel .back-icon{width:48px;height:48px}.portal-panel .menu-content{gap:5px;overflow:hidden}.portal-panel .panel-footer{min-height:22px}.portal-panel .panel-footer button{min-width:48px;min-height:48px;height:48px}.portal-kicker{flex:none;min-height:16px;font-size:9px;font-weight:bold;line-height:1.3;text-align:center;padding:2px}
.portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(70px,1fr));gap:6px;min-height:146px}.portal-grid .hub-card{min-height:70px;padding:3px;gap:2px}.portal-grid .hub-art{height:18px}.portal-grid .hub-label{font-size:10px}.portal-grid .hub-card small{font-size:8px}.portal-partners{grid-template-rows:repeat(3,minmax(70px,1fr));min-height:222px}.portal-partners .hub-card:last-child,.portal-visitors .hub-card:last-child{grid-column:span 2;flex-direction:row;gap:6px}.portal-partners .hub-card:last-child .hub-art,.portal-visitors .hub-card:last-child .hub-art{width:32px;flex:none}.portal-partners .hub-card:last-child small,.portal-visitors .hub-card:last-child small{max-width:40%}.portal-panel .hub-paged .hub-card{min-height:48px}.portal-panel .hub-paged .hub-art{width:36px}.portal-panel .hub-paged .hub-label{font-size:10px}.portal-panel .hub-paged .hub-card small{font-size:8px;max-width:40%}.portal-panel .hub-fighter{min-height:44px;padding:2px 4px}.portal-panel .hub-fighter>img{width:36px;height:36px}.portal-panel.result-paused .hub-fighter>img{animation-play-state:paused}
.portal-guest{flex:none;min-height:44px;padding:3px 5px;display:flex;align-items:center;gap:8px;background:#baca9e;border:1px solid #53684955}.portal-guest>img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}.portal-guest>.hub-art{width:40px;flex:none}.portal-guest>div{min-width:0}.portal-guest strong{font-size:11px;display:block;overflow-wrap:anywhere}.portal-guest small{font-size:8px;line-height:1.3;display:block}.portal-visitor-footer{min-height:22px}.portal-visitor-footer:has(button){min-height:48px}.portal-panel .hub-card:disabled{opacity:.65;border-style:dashed}.portal-panel.dungeon-compact .panel-footer>span,.portal-panel.dungeon-compact .portal-visitor-footer>span{font-size:7px}
/* Four supply tiles on taller LCDs; compact rows on smaller ones. */
.stock-wallet{display:flex;flex:none;flex-direction:column;gap:2px;padding:4px 6px;border:1px solid #53684955;background:#baca9e;min-height:30px}.stock-wallet strong{font-size:11px;line-height:1.2}.stock-wallet small{font-size:8px;line-height:1.3}.stock-panel .supply-list.stock-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(86px,1fr));gap:6px;min-height:178px;overflow:hidden}.stock-tiles .supply-row{min-width:48px;min-height:86px;flex-direction:column;justify-content:center;gap:2px;padding:3px;text-align:center}.stock-tiles .supply-row>img{width:24px;height:24px}.stock-tiles .supply-row>span{flex:none;width:100%}.stock-tiles .supply-row strong{font-size:10px;line-height:1.2}.stock-tiles .supply-row small{font-size:8px;line-height:1.2;margin:0}.stock-tiles .item-amount{font-size:9px}.stock-panel .supply-row.chosen{background:#354b3b;color:#edf4d2;border-color:#263c2d;box-shadow:inset 0 0 0 1px #d3dfb5}.stock-panel .supply-row:focus-visible{outline:2px solid #263c2d;outline-offset:-2px}.stock-panel .supply-row:active{transform:translateY(1px)}.stock-panel .stock-paged .supply-row{min-height:48px}.stock-panel .stock-paged .supply-row>img{width:28px;height:28px}.stock-panel .stock-paged .supply-row strong{font-size:10px}.stock-panel .stock-paged .supply-row small{font-size:8px}.stock-panel .stock-paged .item-amount{font-size:8px}.stock-panel.dungeon-compact .stock-wallet{display:none}.stock-panel.dungeon-compact .stock-wallet small{display:none}

/* Partner Status: four read-only pages with fixed navigation and scroll fallback. */
.status-panel{gap:4px;padding:6px}.status-panel .panel-title{min-height:48px;flex:none}.status-panel .back-icon{width:48px;height:48px}.status-panel .menu-content{gap:6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.status-panel .panel-footer{min-height:48px;flex:none}.status-panel .panel-footer button{min-width:48px;min-height:48px;height:48px}.status-panel .panel-footer>span{font-size:8px;line-height:1.3}.status-sections{display:flex;gap:3px;flex:none;justify-content:space-between;font-size:8px;line-height:16px;border-bottom:1px solid #53684955}.status-sections>span{padding:0 2px}.status-sections .current{background:#354b3b;color:#edf4d2;font-weight:bold}.status-body{display:flex;flex-direction:column;gap:6px;flex:none;min-width:0}.status-partner{min-height:58px;padding:4px;position:relative}.status-partner>img{width:48px;height:48px}.status-badge{font-size:8px;max-width:58px;line-height:1.4;text-align:right;flex:none;font-weight:bold}.status-still>img{animation:none}.status-panel.result-paused img{animation-play-state:paused}.status-age{padding:4px 6px;border:1px solid #53684955;background:#baca9e;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:30px}.status-age strong{font-size:10px;overflow-wrap:anywhere}.status-age small{font-size:8px;max-width:45%;line-height:1.3}.status-meters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.status-meter{min-width:0;padding:5px;background:#d4deb7;border:1px solid #6b8057;min-height:38px}.status-meter>div,.status-load>div{display:flex;justify-content:space-between;align-items:center;gap:4px;font-size:10px}.status-meter b{font-size:9px;font-variant-numeric:tabular-nums}.status-meter>span{display:block;height:6px;background:#53684933;margin-top:4px}.status-meter i{display:block;height:100%;background:#354b3b}.status-meter small{font-size:8px;display:block;margin-top:3px;font-weight:bold}.status-low{border:2px solid #354b3b;padding:4px;background:#e0e5b7}.status-health{display:flex;align-items:center;gap:6px;min-height:38px;padding:4px 6px;background:#d4deb7;border:1px solid #6b8057}.status-health strong{font-size:10px;display:block}.status-health small{font-size:8px}.status-art{width:28px;height:24px;flex:none;display:block}.status-art svg{width:100%;height:100%;image-rendering:pixelated}.status-load{padding:5px 6px;border:1px solid #6b8057;background:#d4deb7}.status-load .care-load{margin:5px 0;gap:4px}.status-load .care-load i{width:24px;height:8px}.status-load small{display:block;font-size:8px;line-height:1.3}.status-note{margin:0;font-size:9px;line-height:1.4;padding:4px 2px}.status-training{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.status-tile{min-width:0;min-height:44px;display:flex;align-items:center;gap:5px;padding:5px;background:#d4deb7;border:1px solid #6b8057}.status-tile>div{min-width:0;flex:1}.status-tile small{display:block;font-size:9px;font-weight:bold}.status-tile strong{display:block;font-size:15px;overflow-wrap:anywhere;line-height:1.2;font-variant-numeric:tabular-nums}.status-tile div>span{font-size:8px;line-height:1.4;display:block;overflow-wrap:anywhere;margin-top:3px}.status-training .status-tile{text-align:center;min-height:64px;padding:4px}.status-training strong{font-size:12px}.status-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.status-records .status-tile{min-height:48px}.status-panel .buff-label{font-size:8px;line-height:1.3;padding:3px;border:1px dashed #6b8057}.status-panel.dungeon-compact .panel-footer>span{font-size:7px}
@media(prefers-reduced-motion:reduce){.status-partner>img{animation:none}}

/* Arena lobby: separate fighter and match views, fixed start and safe scrolling. */
/* Evolution: current/target preview, precise existing goals, fixed actions. */
.evolution-panel{padding:6px;gap:4px}.evolution-panel .panel-title{min-height:48px;flex:none}.evolution-panel .back-icon{width:48px;height:48px;flex:none}.evolution-panel .menu-content{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;min-height:0}.evolution-panel .panel-footer{flex:none;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:0}.evolution-panel .panel-footer>span{font-size:8px;text-align:center;line-height:12px}.evolution-panel .panel-primary{height:48px;min-height:48px;flex:none;margin:0;font-weight:bold}.evolution-panel button{touch-action:manipulation}.evolution-panel button:disabled{opacity:.55;border-style:dashed}.evolution-panel button:focus-visible{outline:2px solid #263c2d;outline-offset:-2px}.evo-body{flex:none;display:flex;flex-direction:column;gap:6px;min-width:0}.evo-hero{display:flex;align-items:center;gap:5px;padding:5px;background:#baca9e;border:1px solid #6b8057;min-height:72px;min-width:0}.evo-current{width:52px;min-width:0;flex:none;text-align:center}.evo-current img{width:36px;height:36px;object-fit:contain;image-rendering:pixelated}.evo-current small{font-size:8px;line-height:1.2;display:block;overflow-wrap:anywhere}.evo-arrow{font-size:22px;font-weight:bold;flex:none}.evo-target{display:flex;align-items:center;gap:5px;flex:1;min-width:0}.evo-target img{width:52px;height:52px;object-fit:contain;image-rendering:pixelated;flex:none}.evo-target>div{min-width:0}.evo-target strong{font-size:13px;line-height:1.2;display:block;overflow-wrap:anywhere}.evo-target small{font-size:8px;line-height:1.3;display:block;margin-top:3px;overflow-wrap:anywhere}.evo-readiness{padding:5px 6px;background:#d4deb7;border:1px solid #6b8057}.evo-readiness strong{display:block;font-size:10px}.evo-readiness small{display:block;font-size:9px;line-height:1.3;margin-top:3px}.evo-readiness.is-ready{background:#354b3b;color:#edf4d2}.evo-goals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.evo-goal{display:flex;align-items:center;gap:4px;padding:5px;min-height:34px;min-width:0;background:#d4deb7;border:1px solid #6b8057}.evo-goal>span{flex:none;font-size:12px}.evo-goal>div{flex:1;min-width:0}.evo-goal-label{display:flex;align-items:center;justify-content:space-between;gap:3px}.evo-goal-label strong{font-size:9px;line-height:1.3;overflow-wrap:anywhere}.evo-goal-label b{font-size:8px;flex:none;font-variant-numeric:tabular-nums}.evo-meter{display:block;height:5px;margin-top:4px;background:#53684933}.evo-meter i{display:block;height:100%;background:#354b3b}.evo-goal.done{border-color:#354b3b}.evo-nav{display:grid;grid-template-columns:minmax(48px,1fr) minmax(60px,1.2fr) 48px 48px;gap:4px}.evo-nav button{height:48px;min-width:48px;min-height:48px;font-size:9px;background:#d4deb7;border:1px solid #6b8057;padding:3px}.evo-nav button:nth-last-child(-n+2){font-size:18px}.evo-query{display:flex;align-items:center;justify-content:space-between;gap:5px;border:1px dashed #6b8057;padding:3px 5px}.evo-query small{font-size:9px;overflow-wrap:anywhere}.evo-query button{height:48px;min-width:48px;min-height:48px;font-size:9px;flex:none}.evo-empty{padding:12px 5px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}.evo-empty img{width:48px;height:48px;object-fit:contain;image-rendering:pixelated}.evo-empty strong{font-size:12px}.evo-empty small{font-size:9px;line-height:1.4}.evolution-panel.dungeon-compact .evo-goals{grid-template-columns:1fr}.evolution-panel.dungeon-compact .evo-current{width:40px}.evolution-panel.dungeon-compact .evo-target img{width:40px;height:40px}

.arena-lobby-panel{padding:6px;gap:4px}.arena-lobby-panel .panel-title{min-height:48px;flex:none;gap:4px}.arena-lobby-panel .back-icon{width:48px;height:48px;flex:none}.arena-lobby-panel .panel-title>.pixel-label{flex:1}.arena-lobby-panel #rt-config{min-width:58px;min-height:48px;padding:4px;font-size:9px;font-weight:bold;background:#d4deb7;border:1px solid #6b8057}.arena-lobby-panel .menu-content{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;min-height:0}.lobby-body{display:flex;flex-direction:column;gap:5px;flex:none;min-width:0}.arena-lobby-panel .panel-footer{flex:none;min-height:64px;display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:0}.arena-lobby-panel .panel-footer>span{font-size:8px;text-align:center;line-height:12px}.lobby-actions{display:grid;grid-template-columns:1fr;gap:5px;flex:none}.lobby-actions.has-paging{grid-template-columns:48px minmax(0,1fr) 48px}.arena-lobby-panel button{touch-action:manipulation}.lobby-actions button{min-width:48px;min-height:48px;height:48px;background:#d4deb7;border:1px solid #6b8057;font-size:16px}.lobby-actions #rt-start{background:#354b3b;color:#edf4d2;font-size:12px;font-weight:bold}.arena-lobby-panel button:disabled{opacity:.55;border-style:dashed}.lobby-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;flex:none}.lobby-tabs button{min-width:48px;min-height:48px;font-size:9px;border:1px solid #6b8057;background:#d4deb7;padding:4px}.lobby-tabs .selected,.lobby-fighter.selected{background:#354b3b;color:#edf4d2;border-color:#263c2d;box-shadow:inset 0 0 0 1px #d3dfb5}.lobby-hero{display:flex;align-items:center;gap:7px;padding:4px;min-height:56px;min-width:0;border:1px solid #6b8057;background:#baca9e}.lobby-hero img{width:48px;height:48px;image-rendering:pixelated;object-fit:contain;flex:none}.lobby-hero>div{min-width:0;flex:1}.lobby-hero strong{display:block;font-size:13px;line-height:1.2;overflow-wrap:anywhere}.lobby-hero small{display:block;font-size:8px;line-height:1.3;margin-top:2px;overflow-wrap:anywhere}.lobby-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.lobby-fighter{min-width:48px;min-height:52px;display:flex;align-items:center;gap:4px;padding:4px;text-align:left;background:#d4deb7;border:2px solid #6b8057;position:relative}.lobby-fighter img{width:28px;height:28px;image-rendering:pixelated;object-fit:contain;flex:none}.lobby-fighter>span{flex:1;min-width:0}.lobby-fighter strong{font-size:10px;line-height:1.2;display:block;overflow-wrap:anywhere}.lobby-fighter small{font-size:8px;line-height:1.3;display:block;margin-top:3px;overflow-wrap:anywhere}.lobby-fighter>b{position:absolute;right:3px;top:2px;font-size:8px}.lobby-caption{font-size:8px;text-align:center;line-height:13px}.lobby-message{font-size:8px;line-height:1.3;display:block;text-align:center;padding:2px}.lobby-versus{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.lobby-versus .lobby-hero{flex-direction:column;align-items:center;gap:3px;text-align:center;min-height:88px}.lobby-versus img{width:36px;height:36px}.lobby-versus strong{font-size:11px}.lobby-versus small{font-size:8px}.lobby-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.lobby-options button{min-width:48px;min-height:48px;padding:4px;display:flex;align-items:center;gap:5px;text-align:left;background:#d4deb7;border:1px solid #6b8057}.lobby-options small{display:block;font-size:8px}.lobby-options strong{display:block;font-size:11px}.lobby-setting{min-width:48px;min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:5px;background:#d4deb7;border:1px solid #6b8057;font-size:10px}.lobby-setting strong{font-size:10px}.lobby-setting>span{font-size:9px;overflow-wrap:anywhere}.lobby-attacks{padding:4px 6px;border:1px dashed #6b8057;text-align:center}.lobby-attacks strong{font-size:9px;display:block}.lobby-attacks small{font-size:8px;line-height:1.3;display:block;margin-top:2px}.lobby-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:8px}.lobby-empty svg{width:48px;height:32px}.lobby-empty strong{font-size:12px}.lobby-empty small{font-size:9px;line-height:1.3}.arena-lobby-panel button:focus-visible{outline:2px solid #263c2d;outline-offset:-2px}.arena-lobby-panel button:active:not(:disabled){transform:translateY(1px)}

/* Digi Burst: preserved two-column controls plus a dedicated charge row. */
.rt-burst-track{height:4px;background:#8c9c79;margin-top:4px;overflow:hidden}.rt-burst-track i{height:100%;display:block;width:0;background:#d6aa43}.rt-burst-track.enemy i{background:#ad6a4e}.rt-hud small[id^="rt-burst-state"]{font-size:9px;margin-top:3px;color:#5a633d}
.rt-controls{height:184px;grid-template-columns:112px minmax(0,1fr)}.rt-actions .rt-ultimate{grid-column:1/-1;min-height:48px;height:48px;background:linear-gradient(to right,#bea153 var(--charge,0%),#d8dfb6 var(--charge,0%));border:2px solid #677345;font-weight:bold;letter-spacing:.5px}.rt-actions .rt-ultimate.rt-burst-ready{background:#3d4932;color:#fff2ac;border-color:#e0bd5a;box-shadow:inset 0 0 0 2px #59623d}.rt-actions .rt-ultimate:disabled{opacity:.8}
.rt-burst-banner{position:absolute;left:8px;right:8px;top:45px;z-index:2;display:flex;align-items:center;gap:10px;padding:9px 12px;background:#24382feb;border-top:2px solid #f1d784;border-bottom:2px solid #f1d784;color:#fff0bc;pointer-events:none}.rt-burst-banner[hidden]{display:none}.rt-burst-banner.enemy{background:#4e3037eb}.rt-burst-banner img{width:42px;height:42px;image-rendering:pixelated;object-fit:contain}.rt-burst-banner div{min-width:0}.rt-burst-banner small{display:block;font-size:10px;overflow-wrap:anywhere}.rt-burst-banner strong{display:block;font-size:14px;letter-spacing:1px;overflow-wrap:anywhere}
@media(max-height:700px){.rt-controls{height:158px;grid-template-columns:96px minmax(0,1fr);gap:12px}.rt-stick{height:96px;width:96px}.rt-actions button{height:48px}.rt-actions .rt-ultimate{height:46px;min-height:46px}.rt-hud{gap:8px}.rt-hud img{height:28px;width:28px}.rt-hud strong{font-size:12px}.rt-hud small{font-size:9px}.rt-hud small[id^="rt-burst-state"]{font-size:8px}.rt-burst-banner{top:40px;padding:6px 9px}}
@media(max-height:580px){.rt-controls{height:146px;grid-template-columns:84px minmax(0,1fr);gap:8px}.rt-stick{height:84px;width:84px}.rt-actions{gap:5px}.rt-actions button{height:44px;min-height:44px}.rt-actions .rt-ultimate{height:44px;min-height:44px}.rt-hud img{height:24px;width:24px}.rt-hud small{line-height:1.15}.rt-top strong{font-size:13px}.rt-burst-banner strong{font-size:12px}}
/* Stored partner gallery, stage league ladder and Pocket Digivice. */
.stored-panel,.champ-panel,.widget-panel{padding:6px;gap:4px}.stored-panel .menu-content,.champ-panel .menu-content,.widget-panel .menu-content{min-height:0;gap:5px;overflow:auto}.stored-panel .panel-title,.champ-panel .panel-title,.widget-panel .panel-title{min-height:40px}.stored-panel .back-icon,.champ-panel .back-icon,.widget-panel .back-icon{width:40px;height:40px}.stored-active{display:flex;align-items:center;gap:6px;background:#baca9e;padding:4px;flex:none}.stored-active img{width:32px;height:32px;image-rendering:pixelated}.stored-active div{flex:1;min-width:0}.stored-active small{display:block;font-size:8px}.stored-active strong{display:block;font-size:11px;overflow-wrap:anywhere}.stored-active>span{font-size:8px}.stored-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;flex:1;min-height:80px}.stored-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:72px;background:#d2dfb5;border:2px solid #819569;color:#354b3b;padding:5px;position:relative}.stored-card img{width:48px;height:48px;object-fit:contain;image-rendering:pixelated}.stored-card strong{display:block;font-size:11px;overflow-wrap:anywhere;line-height:1.2}.stored-card small{display:block;font-size:8px;line-height:1.3}.stored-card.chosen{background:#354b3b;border-color:#354b3b;color:#eff4d4}.stored-tag{font-size:7px;letter-spacing:.7px;opacity:.7}.stored-detail{flex:none;display:flex;align-items:center;gap:5px;border-top:1px solid #819569;padding:4px 0}.stored-detail>div{flex:1;min-width:0}.stored-detail strong{font-size:12px;display:block;overflow-wrap:anywhere}.stored-detail small{font-size:8px;display:block;line-height:1.35}.stored-detail>small{max-width:25%}.stored-clear{font-size:9px;min-height:24px;border:0;background:#b9cc9d;color:#354b3b}.stored-panel .panel-primary{flex:none;min-height:38px;padding:5px;font-size:12px}.stored-panel .panel-footer{min-height:36px;flex:none}.stored-panel .panel-footer button{min-height:36px;height:36px;min-width:38px}.menu-companion{display:flex;align-items:center;gap:4px;flex:none;min-height:24px;padding:2px 4px;background:#baca9e;color:#354b3b;border:1px dashed #70845b;font-size:8px;min-width:0}.menu-companion img{width:20px;height:20px;image-rendering:pixelated}.menu-companion span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.menu-companion small{font-size:7px}.battle-hub-panel .hub-tools{grid-template-columns:repeat(4,minmax(0,1fr))}.battle-hub-panel .hub-tool .hub-label{font-size:8px}.battle-hub-panel .hub-tool small{font-size:7px}.champ-body{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0;overflow:auto}.champ-tabs{display:flex;gap:3px;flex:none}.champ-tabs button{min-height:30px;flex:1;min-width:0;font-size:7px;padding:2px;border:1px solid #819569;background:#cedbb1;color:#354b3b;overflow-wrap:anywhere}.champ-tabs .chosen{background:#354b3b;color:#edf4d2}.champ-heading{display:flex;align-items:center;gap:5px;flex:none;background:#c8d5a7;padding:4px}.champ-heading>span{width:48px;height:32px;flex:none}.champ-heading svg{width:100%;height:100%}.champ-heading strong{display:block;font-size:12px}.champ-heading small{display:block;font-size:8px}.champ-ladder{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;flex:none}.champ-ladder span{text-align:center;font-size:10px;padding:5px 0;border:1px solid #879d73;background:#cddbb1}.champ-ladder .done{background:#4c6845;color:#edf4d2}.champ-ladder .next{background:#edd395;border-color:#6d6236;color:#354b3b;font-weight:bold}.champ-fighter,.champ-opponent{display:flex;align-items:center;gap:8px;padding:6px;background:#d2dfb5;color:#354b3b;min-height:54px;text-align:left;border:1px solid #819569;flex:1;min-width:0}.champ-fighter img,.champ-opponent img{width:48px;height:48px;image-rendering:pixelated;object-fit:contain}.champ-fighter div,.champ-opponent div{min-width:0}.champ-fighter strong,.champ-opponent strong{display:block;font-size:13px;overflow-wrap:anywhere}.champ-fighter small,.champ-opponent small{display:block;font-size:8px;line-height:1.4}.champ-opponent>span{width:48px;text-align:center;font-size:28px}.champ-note{font-size:8px;line-height:1.35;flex:none}.champ-panel .panel-footer,.widget-panel .panel-footer{display:flex;flex-direction:column;min-height:60px;flex:none}.champ-panel .panel-footer .panel-primary,.widget-panel .panel-footer .panel-primary{width:100%;min-height:36px;height:36px;font-size:12px}.widget-body{display:flex;flex-direction:column;gap:8px;overflow:auto;min-height:0;flex:1}.widget-body p{font-size:10px;line-height:1.4;margin:0}.widget-body>small{font-size:9px;line-height:1.4}.widget-preview{background:#c9d6aa;color:#354b3b;border:8px solid #25343e;border-radius:15px;box-shadow:inset 0 0 0 3px #a77954;display:flex;flex-direction:column;align-items:center;gap:5px;padding:14px 8px;max-width:240px;width:90%;margin:auto;flex:none}.widget-preview>small{font-size:8px}.widget-preview strong{font-size:14px;text-align:center;overflow-wrap:anywhere}.widget-preview img{width:72px;height:72px;object-fit:contain;image-rendering:pixelated}.widget-preview span{font-size:9px}.widget-preview>div{font-size:10px}.stored-panel.dungeon-compact .stored-card{min-height:40px;flex-direction:row;gap:4px;padding:3px}.stored-panel.dungeon-compact .stored-card img{width:24px;height:24px}.stored-panel.dungeon-compact .stored-tag,.stored-panel.dungeon-compact .stored-detail>small{display:none}.stored-panel.dungeon-compact .stored-detail{padding:0;min-height:22px}.stored-panel.dungeon-compact .stored-detail strong{font-size:9px}.stored-panel.dungeon-compact .stored-grid{min-height:40px}.stored-panel.dungeon-compact .stored-card strong{font-size:8px}.stored-panel.dungeon-compact .stored-card small{font-size:7px}.stored-panel.dungeon-compact .panel-primary{min-height:28px;height:28px;font-size:10px}.stored-panel.dungeon-compact .panel-title{min-height:32px}.stored-panel.dungeon-compact .back-icon{height:32px;width:32px}.champ-panel.dungeon-compact .champ-heading strong{font-size:10px}.champ-panel.dungeon-compact .champ-heading>span{width:30px;height:20px}.champ-panel.dungeon-compact .champ-fighter{min-height:40px;padding:3px}.champ-panel.dungeon-compact .champ-fighter img{width:24px;height:24px}.champ-panel.dungeon-compact .champ-note{display:none}.champ-panel.dungeon-compact .champ-tabs button{min-height:22px}.champ-panel.dungeon-compact .champ-heading{padding:2px}.champ-panel.dungeon-compact .champ-body{gap:3px}.champ-panel.dungeon-compact .panel-footer{min-height:46px}.champ-panel.dungeon-compact .panel-footer .panel-primary{min-height:28px;height:28px}.champ-panel.dungeon-compact .lobby-setting{min-height:28px}.champ-panel.dungeon-compact .panel-title{min-height:32px}.champ-panel.dungeon-compact .back-icon{height:32px;width:32px}
.social-panel .visitor-journal-footer{gap:2px;min-height:36px}.social-panel .visitor-journal-footer>button{min-width:32px;width:32px;min-height:36px;height:36px;font-size:8px}.social-panel .visitor-journal-footer>span{font-size:7px}
/* Thumb controls: independent touch targets outside the playfield. */
.rt-controls{display:block;position:relative;height:202px;max-width:620px;width:100%;align-self:center;flex:none;touch-action:none}.rt-controls .rt-stick{position:absolute;min-width:56px;min-height:56px;box-sizing:border-box}.rt-controls .rt-stick span{width:46%;height:46%}.rt-actions{position:absolute;display:block;gap:0;min-width:0;height:202px;width:188px;top:0}.rt-actions .rt-action{--ring-color:#60794b;position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;box-sizing:border-box;border:2px solid #839773;border-radius:50%;min-width:48px;min-height:48px;padding:4px;overflow:hidden;background:#d5dfbb;color:#334736;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;font-size:11px;line-height:1;transform:none}.rt-actions .rt-action:before{content:"";position:absolute;inset:1px;border-radius:50%;background:conic-gradient(from -90deg,var(--ring-color) var(--cooldown,0%),transparent 0);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 0);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 0);pointer-events:none}.rt-action>span{position:relative;z-index:1;pointer-events:none}.rt-action .rt-symbol{font-size:16px;line-height:16px}.rt-action .rt-action-label{font-size:10px;font-weight:bold;line-height:11px;white-space:nowrap}.rt-action .rt-action-state{font-size:9px;line-height:10px;font-variant-numeric:tabular-nums;white-space:nowrap}.rt-actions .rt-action#rt-basic{background:#354b3b;color:#ecf5d0;border-color:#4f6b43;--ring-color:#d0e9a0}.rt-actions .rt-action#rt-basic .rt-symbol{font-size:23px;line-height:22px}.rt-actions .rt-action#rt-dodge{background:#b6d5c3;border-color:#63856b;--ring-color:#54765b}.rt-actions .rt-action#rt-ultimate{background:#e3d18a;color:#354b3b;border-color:#9b8142;letter-spacing:0;--ring-color:#bd9437}.rt-actions .rt-action#rt-ultimate:before{background:conic-gradient(from -90deg,var(--ring-color) var(--charge,0%),transparent 0)}.rt-actions .rt-action#rt-ultimate.rt-burst-ready{background:#3d4932;color:#fff2ac;border-color:#e0bd5a;box-shadow:inset 0 0 0 1px #e0bd5a}.rt-actions .rt-action:disabled{opacity:.72}.rt-actions .rt-action.rt-pressed:not(:disabled),.rt-actions .rt-action:active:not(:disabled){transform:scale(.96);box-shadow:inset 0 0 0 2px #30443755}.rt-actions .rt-action.rt-ack{border-color:#304536;box-shadow:inset 0 0 0 3px #eef6c877}.rt-actions .rt-action.rt-queued{border-style:dashed}.rt-top .rt-top-actions #rt-controls-open{min-width:78px;font-size:10px;min-height:48px}.rt-top .rt-top-actions #rt-pause{min-height:48px}.rt-strip #rt-toggle{min-height:48px}.rt-control-settings{position:absolute;inset:0;z-index:8;background:#c4d2a3;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:14px;overflow:auto;touch-action:pan-y}.rt-control-settings[hidden]{display:none}.rt-controls-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none}.rt-controls-heading strong{font-size:17px;letter-spacing:1px}.rt-controls-heading button{min-height:48px;min-width:70px}.rt-controls-options{width:100%;max-width:560px;align-self:center;display:flex;flex-direction:column;gap:12px}.rt-controls-option{background:#d1ddb3;border:1px solid #839773;padding:12px;display:flex;flex-direction:column;gap:8px;flex:none}.rt-controls-option>strong{font-size:11px;letter-spacing:1px}.rt-controls-option small{font-size:11px;line-height:1.4}.rt-controls-option button{min-height:48px;padding:8px;font-size:12px}.rt-controls-option .selected,.rt-controls-option button[aria-pressed=true]{background:#354b3b;color:#ecf5d0}.rt-size-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}#rt-control-message{font-size:11px;line-height:1.4;max-width:560px;align-self:center;margin:0}.rt-overlay button:focus-visible,.rt-stick:focus-visible{outline:3px solid #304437;outline-offset:3px}@media(max-height:580px){.rt-overlay{gap:5px}.rt-controls-heading strong{font-size:14px}.rt-control-settings{gap:10px}.rt-controls-option{padding:10px}}@media(max-width:350px){.rt-top strong{font-size:13px;letter-spacing:0}.rt-top small{font-size:8px;letter-spacing:0}.rt-top{gap:5px}.rt-top .rt-top-actions #rt-controls-open{min-width:68px;font-size:9px}.rt-top .rt-top-actions #rt-pause{min-width:65px;font-size:9px}.rt-strip #rt-caption{font-size:9px}.rt-strip #rt-toggle{min-width:80px}}

/* The first walkable adventure lives beside classic expeditions. */
.adventure-entry{display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;min-height:48px;font-size:11px;border:2px solid #789c69;flex:none}.adventure-entry small{font-size:7px;font-weight:normal}.dungeon-compact .adventure-entry{min-height:44px;padding:4px}.rt-top small{letter-spacing:1px;line-height:1.3;max-width:220px}.rt-strip #rt-caption{overflow-wrap:anywhere}.rt-action-state{overflow-wrap:normal}

.rt-exploring #rt-enemy-hud{display:none}.rt-exploring .rt-hud{grid-template-columns:1fr}.rt-exploring .rt-hud>div:first-child{display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:4px}.rt-exploring #rt-portrait-p{grid-row:1/3;width:32px;height:32px}.rt-exploring #rt-role-p,.rt-exploring .rt-burst-track,.rt-exploring #rt-burst-state-p{display:none}.rt-exploring .rt-track{grid-column:2/4;width:100%;margin:0}.rt-exploring #rt-caption{font-size:9px}.rt-top strong{min-width:0}.rt-top #rt-title{overflow-wrap:anywhere}

/* Earned eggs: fixed actions, small-screen paging and no species picker. */
.egg-nursery-panel .menu-content{display:flex;flex-direction:column;min-height:0;overflow:hidden}.egg-nursery-panel .panel-title,.egg-nursery-panel .panel-footer,.egg-tabs{flex:none}.egg-nursery-panel .panel-footer{display:flex;flex-direction:column;gap:4px}.egg-nursery-panel .panel-footer>span{font-size:8px}.egg-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:2px 0 6px}.egg-tabs button,.egg-bottom button,.egg-confirm-actions button{min-width:48px;min-height:48px;font-size:10px}.egg-tabs button[aria-pressed=true],.egg-fragment.chosen{background:#354b3b;color:#e4edca}.egg-scroll{overflow-y:auto;min-height:0;flex:1;overscroll-behavior:contain}.egg-body{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;padding:8px;overflow-y:auto;min-height:0;flex:1}.egg-body>strong{font-size:15px;overflow-wrap:anywhere}.egg-body p{font-size:11px;line-height:1.4;margin:2px 0}.egg-body small,.egg-note{font-size:10px;line-height:1.4}.egg-portrait{width:84px;max-width:100%;flex:none;image-rendering:pixelated}.egg-portrait svg{display:block;width:100%;height:auto}.egg-ghost{opacity:.45}.egg-bottom{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:8px;width:100%}.egg-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}.egg-fragment-list{display:flex;flex-direction:column;gap:8px}.egg-fragment{min-height:54px;width:100%;display:flex;align-items:center;text-align:left;gap:10px;padding:6px 10px}.egg-fragment>span{width:36px;height:36px;flex:none}.egg-fragment svg{width:36px;height:36px}.egg-fragment>div{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.egg-fragment strong{font-size:12px}.egg-fragment small{font-size:9px}.egg-fragment i{height:4px;background:#93a77d;display:block}.egg-fragment i b{height:4px;background:#c8d69b;display:block}.egg-note{display:block;text-align:center;margin:8px 3px}.egg-reveal-scene{position:relative;display:flex;align-items:center;justify-content:center;height:108px;width:120px;flex:none}.egg-shell{width:80px;animation:egg-shell-reveal .9s steps(4,end) forwards}.egg-shell svg{width:100%;height:100%}.egg-baby-reveal{position:absolute;width:80px;height:80px;object-fit:contain;image-rendering:pixelated;animation:egg-baby-reveal 1.2s steps(5,end) both}@keyframes egg-shell-reveal{0%{transform:rotate(-8deg);opacity:1}60%{transform:rotate(8deg);opacity:1}100%{transform:scale(1.15);opacity:0}}@keyframes egg-baby-reveal{0%,70%{opacity:0;transform:translateY(8px) scale(.7)}100%{opacity:1;transform:none}}@media(max-height:600px){.egg-body{gap:4px;padding:4px}.egg-portrait{width:60px}.egg-body>strong{font-size:13px}.egg-reveal-scene{height:86px}}@media(prefers-reduced-motion:reduce){.egg-shell{display:none;animation:none}.egg-baby-reveal{animation:none}}

.personality-card{display:flex;flex-direction:column;gap:5px;margin:8px 0;padding:10px;border:1px solid #7e9169;border-radius:8px;background:#dce5bd;color:#334736;font-family:system-ui,sans-serif;font-size:12px;line-height:1.4}.personality-card strong{font-size:14px}.personality-card small{font-size:11px}

/* Exploration keeps only movement and a fixed contextual action. */
.rt-exploring #rt-skill1,.rt-exploring #rt-skill2,.rt-exploring #rt-dodge,.rt-exploring #rt-ultimate{display:none!important}
.rt-exploring #rt-basic{font-size:11px;touch-action:none}
.rt-exploring #rt-caption{min-height:2.6em;line-height:1.3}
/* The habitat has its own roomy stage, independent of the small Digivice LCD. */
.hab-overlay{position:fixed;inset:0;z-index:150;background:#152a29;overflow:auto;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));color:#e7e7c5;font-family:system-ui,sans-serif;box-sizing:border-box}.hab-overlay[hidden]{display:none!important}.hab-shell{max-width:760px;margin:auto;min-height:100%;display:flex;flex-direction:column;gap:10px}.hab-overlay button,.hab-overlay select{min-height:48px;border:1px solid #78927e;border-radius:10px;background:#2b4841;color:#f1efcc;font:700 12px system-ui;touch-action:manipulation;padding:8px 12px}.hab-overlay button:focus-visible,.hab-overlay select:focus-visible{outline:3px solid #f5df94;outline-offset:2px}.hab-overlay button:disabled{opacity:.45}.hab-header,.hab-toolbar,.hab-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.hab-header h1{font-size:22px;letter-spacing:2px;margin:2px 0}.hab-header small{font-size:9px;letter-spacing:1.5px;color:#b2c4a4}.hab-toolbar>div{text-align:center;flex:1}.hab-toolbar strong,.hab-toolbar small{display:block}.hab-toolbar strong{font-size:14px}.hab-toolbar small{font-size:11px;color:#becbb1;margin-top:4px}.hab-toolbar button{min-width:48px;font-size:24px}.hab-stage{border:3px solid #718d76;border-radius:14px;overflow:hidden;background:#a9be89;line-height:0;flex-shrink:0}.hab-stage canvas{width:100%;height:auto;display:block;image-rendering:pixelated;touch-action:manipulation}.hab-detail{display:grid;grid-template-columns:1fr auto;gap:5px 10px;background:#203d36;border:1px solid #536e5a;border-radius:12px;padding:12px}.hab-detail label{font-size:10px;letter-spacing:1px;color:#becbb1;grid-column:1/-1}.hab-detail select{grid-column:1/-1;width:100%;margin-bottom:5px}.hab-detail strong{font-size:17px;align-self:end;overflow-wrap:anywhere}.hab-detail span{grid-column:1;font-size:12px;color:#d3d9bb}.hab-detail button{grid-column:2;grid-row:3/5;max-width:145px}.hab-note{font-size:11px;line-height:1.5;color:#bac9b3;min-height:2.8em;margin:0 3px}.hab-footer{margin-top:auto}.hab-footer button{flex:1;padding:8px 6px;font-size:10px}.habitat-entry{margin:4px 10px;border:1px solid #5f795b;background:#dae3ba;color:#324a39;border-radius:7px;min-height:48px;font-size:12px;font-weight:bold}.habitat-entry small{display:block;font-size:9px;font-weight:normal;margin-top:3px}.stored-panel .stored-grid{min-height:0}.hab-overlay .hab-detail select option{background:#203d36;color:#f1efcc}@media(min-width:700px) and (min-height:700px){.hab-shell{gap:14px}.hab-header{padding:6px}.hab-detail{padding:16px}}@media(max-height:540px) and (min-width:600px){.hab-shell{max-width:1000px;display:grid;grid-template-columns:1.3fr 1fr;gap:8px 14px}.hab-header,.hab-toolbar{grid-column:1/-1}.hab-stage{grid-column:1;grid-row:3/6}.hab-detail,.hab-note,.hab-footer{grid-column:2}.hab-header h1{font-size:18px}}
/* Farm fills the viewport; secondary details float over the meadow only when needed. */
.hab-overlay{overflow:hidden;padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}.hab-shell{position:relative;height:100%;min-height:0;max-width:1100px;display:flex;flex-direction:column;gap:5px}.hab-header{height:48px;min-height:48px;padding:0;gap:6px}.hab-header h1{font-size:15px;letter-spacing:1px;flex:1;text-align:center}.hab-header>strong{font-size:10px;white-space:nowrap;color:#f2df97}.hab-header button{min-width:48px;padding:6px;font-size:10px}.hab-toolbar{height:44px;min-height:44px;gap:4px}.hab-toolbar button{min-height:40px;height:40px;font-size:21px}.hab-toolbar strong{font-size:12px}.hab-toolbar small{font-size:10px;margin-top:1px}.hab-stage{position:relative;flex:1;min-height:150px;width:100%;border-width:2px;line-height:normal;border-radius:10px;box-sizing:border-box}.hab-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:pan-y}.hab-footer{min-height:52px;height:52px;gap:4px;margin:0;flex:none}.hab-footer button{height:48px;min-width:0;font-size:10px}.hab-footer button[aria-pressed="true"]{background:#e0ddb1;color:#28473a;border-color:#e9d99e}.hab-map-actions{position:absolute;right:8px;top:8px;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:85%;pointer-events:none}.hab-map-actions button{pointer-events:auto;background:#e9dca4;color:#304a39;box-shadow:0 2px 0 #667a54}.hab-map-actions button[hidden]{display:none!important}.hab-sheet{position:absolute;left:4px;right:4px;bottom:59px;max-height:55%;overflow:auto;padding:10px;background:#1d3c35f5;border:1px solid #839779;border-radius:15px 15px 10px 10px;box-shadow:0 -6px 22px #10241e55;z-index:2;box-sizing:border-box}.hab-sheet[hidden],.hab-sheet [hidden]{display:none!important}.hab-sheet-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.hab-sheet-top>strong{font-size:12px;letter-spacing:1px}.hab-sheet-top button{font-size:22px;min-width:48px;min-height:40px}.hab-detail{background:none;border:0;padding:0;gap:4px 8px}.hab-detail label{font-size:9px}.hab-detail select{margin:0}.hab-detail strong{font-size:15px}.hab-detail span{font-size:11px}.hab-detail #hab-list{grid-column:1/-1;min-height:40px}.hab-note{font-size:10px;min-height:0;margin:6px 2px 0}.hab-farm-panel{display:grid;gap:10px}.hab-farm-panel article{border:1px solid #57735e;background:#2a4c3d;padding:10px;border-radius:9px}.hab-farm-panel article>strong{font-size:12px;color:#e8ddaa}.hab-sheet p{font-size:12px;line-height:1.45;margin:5px 0 8px}.hab-sheet label{font-size:10px;display:block}.hab-sheet select{width:100%;margin:5px 0;box-sizing:border-box}.hab-sheet article>div{display:flex;gap:6px}.hab-sheet article>div button{flex:1;font-size:10px;padding:6px}.hab-sheet small{font-size:10px;line-height:1.4;color:#c2d0b5;display:block;margin-top:6px}.hab-sheet #hab-build-panel button,.hab-sheet #hab-settings-panel button{width:100%;margin-top:6px}@media(max-height:540px) and (min-width:600px){.hab-shell{display:flex;max-width:1100px;gap:3px}.hab-header{height:40px;min-height:40px}.hab-header h1{font-size:14px}.hab-toolbar{height:34px;min-height:34px}.hab-toolbar button{height:32px;min-height:32px}.hab-footer{height:46px;min-height:46px}.hab-footer button{min-height:44px;height:44px}.hab-stage{min-height:100px}.hab-sheet{left:auto;width:44%;bottom:52px;max-height:70%}}
/* Mobile farm polish: two primary actions, stable search, and compact building details. */
.hab-overlay{background:#18342e}.hab-header{height:44px;min-height:44px}.hab-header h1{font-size:14px}.hab-toolbar{height:34px;min-height:34px}.hab-toolbar>div{display:flex;align-items:center;justify-content:center;gap:10px}.hab-toolbar strong{font-size:11px}.hab-toolbar small{font-size:10px;border:1px solid #71896b;border-radius:12px;padding:3px 7px;margin:0}.hab-toolbar button[hidden]{display:none!important}.hab-stage{border-color:#91aa80;box-shadow:inset 0 0 0 2px #5d7d5b}.hab-footer{height:54px;min-height:54px}.hab-footer button{font-size:12px}.hab-footer #hab-collect-all{background:#e3d59a;color:#2c4737;border-color:#ecdfad}.hab-footer #hab-collect-all:disabled{opacity:.65}.hab-sheet{max-height:46%;border-color:#a0b38c;background:#213f36fa;padding:10px 12px}.hab-sheet-top{margin-bottom:8px}.hab-sheet-top>strong{font-size:13px}.hab-sheet-top button{min-height:48px}.hab-farm-panel article{border:0;background:none;padding:0}.hab-farm-panel article>div{margin:8px 0}.hab-farm-panel article>div button{font-size:11px;min-height:48px}.hab-farm-panel article>button{width:100%;margin:5px 0}.hab-farm-panel #hab-upgrade{margin-top:8px;background:#d8ce9e;color:#294437}.hab-sheet .hab-detail{display:grid;grid-template-columns:64px 1fr;gap:5px 10px}.hab-detail #hab-portrait{grid-column:1;grid-row:1/3;width:60px;height:60px;object-fit:contain;image-rendering:pixelated;background:#a9bd8c;border-radius:10px}.hab-detail #hab-name{grid-column:2;grid-row:1;font-size:17px}.hab-detail #hab-condition{grid-column:2;grid-row:2;font-size:11px;line-height:1.4}.hab-detail .hab-detail-actions{grid-column:1/-1;display:flex;gap:7px;margin-top:8px}.hab-detail .hab-detail-actions button{grid-column:auto;grid-row:auto;flex:1;max-width:none;min-height:48px;font-size:11px}.hab-detail #hab-list{grid-column:1/-1;font-size:11px}.hab-confirm-row{display:flex;gap:8px}.hab-confirm-row button{flex:1;font-size:11px}.hab-sheet input{box-sizing:border-box;width:100%;min-height:48px;background:#f0edcf;color:#29463a;border:2px solid #93ae86;border-radius:9px;padding:10px 12px;font:16px system-ui;touch-action:manipulation}.hab-sheet.is-searching{top:48px;bottom:60px;max-height:calc(100% - 110px);display:flex;flex-direction:column}.hab-sheet.is-searching #hab-search-panel{min-height:0;display:flex;flex-direction:column;gap:6px;flex:1}.hab-sheet.is-searching #hab-search-panel>label{font-size:11px}.hab-sheet.is-searching .hab-sheet-top{flex:none}.hab-results{overflow:auto;min-height:50px;flex:1;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain}.hab-results .hab-resident-card{display:flex;align-items:center;text-align:left;width:100%;min-height:66px;flex:none;gap:9px;padding:8px}.hab-resident-card img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated;background:#b3c694;border-radius:7px;flex:none}.hab-resident-card>span{flex:1;min-width:0}.hab-resident-card strong{font-size:13px;display:block;overflow-wrap:anywhere}.hab-resident-card small{font-size:10px;line-height:1.3;margin-top:3px}.hab-resident-card>b{font-size:10px;color:#ead798}.hab-resident-card:disabled{opacity:.65}.hab-sheet #hab-search-count{margin:0;font-size:10px;color:#cfdbbb}.hab-sheet #hab-search-back{min-height:44px;flex:none}.hab-sheet #hab-more{min-height:44px}.hab-sheet input:focus-visible{outline:3px solid #eddb9b;outline-offset:1px}.hab-sheet p{font-size:13px}.hab-note{font-size:10px;line-height:1.35}@media(max-height:540px) and (min-width:600px){.hab-sheet.is-searching{width:52%;top:45px;bottom:52px;max-height:none}.hab-toolbar{height:30px;min-height:30px}}

/* Full-screen INT training: the partner stays above thumb controls. */
.storm-overlay{position:fixed;inset:0;z-index:160;background:#112a32;color:#eee9c5;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));font-family:system-ui,sans-serif}.storm-shell{height:100%;max-width:700px;margin:auto;display:flex;flex-direction:column;gap:8px;min-height:0}.storm-shell header{min-height:52px;gap:8px;padding:0;flex:none}.storm-shell header>div{text-align:center;flex:1;min-width:0}.storm-shell header strong,.storm-shell header small{display:block}.storm-shell header strong{font-size:18px;letter-spacing:1px}.storm-shell header small{font-size:10px;color:#b1cec1}.storm-shell button{min-height:48px;border:1px solid #7caaa0;border-radius:10px;background:#2c5055;color:#eee9c5;font:700 12px system-ui;touch-action:manipulation;padding:8px 10px}.storm-shell button:focus-visible{outline:3px solid #f2d58c;outline-offset:2px}.storm-shell button:disabled{opacity:.55}.storm-shell #storm-haptic{font-size:9px;width:88px}.storm-meta{display:flex;justify-content:space-between;font-size:11px;flex:none}.storm-stage{flex:1;min-height:100px;position:relative;border:2px solid #608f87;border-radius:14px;overflow:hidden;background:#142e37}.storm-stage canvas{position:absolute;width:100%;height:100%;inset:0;image-rendering:pixelated}.storm-shell #storm-hint{margin:0;min-height:36px;text-align:center;font-size:14px;line-height:1.3;flex:none}.storm-symbols{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex:none}.storm-symbols button{min-height:76px;background:#e1dcaf;color:#233e42;border:2px solid #a6b58d;font-size:12px}.storm-symbols button b{font-size:25px;display:block}.storm-shell .storm-charge{min-height:76px;background:#e1c980;color:#233e42;font-size:17px;flex:none}.storm-note{text-align:center;font-size:9px;color:#a9c9ba;flex:none}.storm-symbols button:active,.storm-charge:active{transform:translateY(2px)}@media(max-height:500px){.storm-shell{gap:4px}.storm-shell header{min-height:48px}.storm-symbols button,.storm-shell .storm-charge{min-height:48px}.storm-symbols button b{display:inline;margin-right:8px}.storm-shell #storm-hint{min-height:20px;font-size:12px}.storm-note{display:none}}

.hab-detail #hab-memory{grid-column:1/-1;font-size:11px;line-height:1.4;margin:4px 0;color:#c6d7b5}.gym-result p{font-size:10px;line-height:1.4;text-align:center;margin:4px 0}.gym-result img{animation:training-pride 1.4s ease-in-out 2}@keyframes training-pride{50%{transform:translateY(-4px)}}@media(prefers-reduced-motion:reduce){.gym-result img{animation:none}}

.gym-result img{animation:none}.gym-result.is-proud.trait-playful img{animation:training-pride .65s ease-in-out 3}.gym-result.is-proud.trait-friendly img{animation:training-pride 1s ease-in-out 2}.gym-result.is-proud.trait-shy img{animation:training-quiet 1.8s ease-in-out 1}.gym-result.is-proud.trait-calm img{animation:training-quiet 2.5s ease-in-out 1}.gym-result.trait-curious img{animation:training-look 1.6s ease-in-out 2}.gym-result.is-proud.trait-brave img{animation:training-stand 1.4s ease-in-out 1}@keyframes training-quiet{50%{transform:translateY(-1px)}}@keyframes training-look{50%{transform:rotate(-5deg)}}@keyframes training-stand{50%{transform:scale(1.06)}}@media(prefers-reduced-motion:reduce){.gym-result img{animation:none!important}}

/* Interaction surfaces own their gestures; sheets retain ordinary scrolling. */
#lcd.touch-enabled{pointer-events:auto;touch-action:none}
#hab-canvas{touch-action:none}
.home-touch-actions{display:flex;flex:none;gap:3px;padding:2px 5px;background:var(--lcd)}
.home-touch-actions button{flex:1;min-height:48px;border:1px solid #30443750;background:#30443710;font-size:10px;font-weight:bold}
.hab-touch-actions{display:flex;align-items:center;gap:5px;flex:none;padding:4px 0}
.hab-touch-actions>span{flex:1;min-width:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hab-touch-actions button,.hab-pet-actions button{min-width:54px;min-height:48px;border:1px solid #8eaa92;border-radius:12px;background:#2f4e43;color:#e6e7bf;font-weight:bold;font-size:11px}
.hab-pet-actions{display:flex;gap:8px}.hab-pet-actions button{flex:1}


.hab-touch-actions{display:grid;grid-template-columns:minmax(0,1fr) repeat(3,auto);gap:3px 5px}
#hab-touch-name{grid-column:1;grid-row:1}#hab-touch-status{grid-column:1/-1;grid-row:2;font-size:10px;line-height:1.3;min-height:26px}
.hab-touch-actions button{grid-row:1}

.hab-detail .hab-pet-actions{grid-column:1/-1}.hab-detail .hab-pet-actions button{max-width:none}

@media(max-height:540px) and (min-width:600px){
 .hab-shell{display:grid;grid-template-columns:minmax(0,1fr) 240px;grid-template-rows:44px 30px minmax(0,1fr) 54px;gap:4px 8px}
 .hab-header{grid-column:1/-1;grid-row:1}.hab-toolbar{grid-column:1/-1;grid-row:2}
 .hab-stage{grid-column:1;grid-row:3/5;height:100%;min-height:60px}
 .hab-touch-actions{grid-column:2;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));align-content:center}
 #hab-touch-name{grid-column:1/-1;grid-row:1}#hab-touch-status{grid-column:1/-1;grid-row:3}
 .hab-touch-actions button{grid-row:2;min-width:0;padding:6px}
 .hab-footer{grid-column:2;grid-row:4}
}

/* Shared pixel care controls: one action hierarchy on Home and in DigiFarm. */
.home-touch-actions{gap:8px;padding:5px 6px 4px}
.home-touch-actions .care-action,.hab-overlay .care-action{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:48px;min-height:62px;padding:6px 4px;border:2px solid #536847;border-radius:8px;box-shadow:0 3px 0 #2c453b55;font-size:10px;font-weight:bold;line-height:1.15;transition:transform .12s ease,box-shadow .12s ease;--care-surface:#c9d5a4}
.care-icon{width:22px;height:22px;fill:currentColor;flex:none;image-rendering:pixelated}
.care-label{font:700 10px monospace;letter-spacing:.3px;white-space:nowrap}
.home-touch-actions .care-pet,.hab-overlay .care-pet{background:#2f513c;color:#eef0c7;border-color:#234333;--care-surface:#2f513c}
.home-touch-actions .care-treat,.hab-overlay .care-treat{background:#d8c580;color:#354831;border-color:#8d7c42;--care-surface:#d8c580}
.home-touch-actions .care-info,.hab-overlay .care-info{background:#c9d5a4;color:#354d39;border-color:#7e9568}
.care-count{position:absolute;right:3px;top:3px;border-radius:4px;background:#465538;color:#f7edb8;padding:2px 4px;font:700 9px monospace;line-height:1.2}
.home-touch-actions .care-action:not(:disabled):active,.hab-overlay .care-action:not(:disabled):active{transform:translateY(2px);box-shadow:0 1px 0 #2c453b55}
.home-touch-actions .care-action:disabled,.hab-overlay .care-action:disabled{opacity:1;filter:saturate(.35);color:#4c5d43;background:#c0caa2;border-color:#94a27e;box-shadow:0 2px 0 #3b4d3b22}
.care-action:focus-visible{outline:3px solid #f5e19b;outline-offset:2px}
.hab-touch-actions{column-gap:8px}.hab-pet-actions{gap:8px}
@media(max-height:620px){.home-touch-actions{padding:2px 5px 3px}.home-touch-actions .care-action{min-height:52px;gap:2px}.home-touch-actions .care-icon{width:18px;height:18px}}
@media(max-height:540px) and (min-width:600px){.hab-touch-actions .care-action{min-height:56px}}
@media(prefers-reduced-motion:reduce){.care-action{transition:none!important}.care-action:active{transform:none!important}}

.care-label{white-space:normal;text-align:center;max-width:100%}

/* Brief clash input stays above the thumb dock; normal combat controls remain locked. */
.rt-clash-panel{position:absolute;z-index:4;left:50%;bottom:10px;transform:translateX(-50%);width:min(240px,76%);padding:8px 10px;background:#183c36f5;border:2px solid #ebd883;border-radius:12px;box-shadow:0 4px 14px #10201b88;text-align:center;color:#f4ebbf;display:grid;gap:5px}
.rt-clash-panel[hidden]{display:none}.rt-clash-panel strong{font-size:12px;letter-spacing:.08em}.rt-clash-panel small{font-size:10px;color:#dbdfc0}.rt-clash-track{height:5px;background:#0f2725;border-radius:4px;overflow:hidden}.rt-clash-track i{display:block;height:100%;width:0;background:#f1d779}.rt-clash-panel button{min-height:48px;border:1px solid #f5e7ad;border-radius:8px;background:#ead791;color:#203e35;font:bold 13px monospace;touch-action:none}.rt-clash-panel button:active{background:#fff0b7;transform:translateY(1px)}.rt-clash-panel button:disabled{opacity:.72}.rt-clash-panel button:focus-visible{outline:3px solid #fff;outline-offset:2px}

/* Ultimate pointing uses the same arena canvas; controls remain outside it. */
.rt-stage canvas.rt-aiming{pointer-events:auto;cursor:crosshair;touch-action:none}.rt-stage:has(canvas.rt-aiming){border-color:#dfbd62}.rt-callouts,.rt-burst-banner{pointer-events:none}

/* Comfort joystick: independent size, forgiving movement lane, no attack overlap. */
.rt-stick-zone{position:absolute;z-index:0;touch-action:none;user-select:none;-webkit-user-select:none}
.rt-controls .rt-stick{z-index:1;user-select:none;-webkit-user-select:none;transition:opacity .1s}
.rt-controls .rt-stick span{width:48%;height:48%;transition:none}
.rt-controls .rt-actions{z-index:2}
.rt-size-options.rt-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.rt-position-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rt-controls{isolation:isolate}.rt-dialog{z-index:5}
.rt-actions .rt-action#rt-dodge{background:#254f54;color:#f1f6d9;border:3px solid #163f47;--ring-color:#d2e6ab;box-shadow:inset 0 0 0 2px #6d929066}
.rt-actions .rt-action#rt-dodge .rt-symbol{font-size:28px;line-height:28px}
.rt-actions .rt-action#rt-dodge .rt-action-label{font-size:14px;line-height:16px;letter-spacing:.4px}
.rt-actions .rt-action#rt-dodge .rt-action-state{font-size:10px;line-height:12px}
.rt-actions .rt-action#rt-basic{background:#536848;color:#f2f1c8}
@media(max-height:520px) and (min-width:540px){.rt-overlay{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,44%);grid-template-rows:auto auto minmax(0,1fr) auto;column-gap:12px;row-gap:5px}.rt-top{grid-column:1/-1;grid-row:1}.rt-hud{grid-column:1;grid-row:2}.rt-stage{grid-column:1;grid-row:3;min-height:0;height:100%}.rt-strip{grid-column:1;grid-row:4}.rt-controls{grid-column:2;grid-row:2/5;align-self:center}}

/* Champion Challenge shares the compact, scrollable league panel. */
.challenge-pager{display:flex;gap:8px;flex:none}.challenge-pager button{flex:1;min-height:40px;background:#cbd9ad;border:1px solid #819569;color:#354b3b;font:inherit;font-size:10px}.challenge-boss{flex:none;min-height:64px;border:2px solid #917746;background:#ded7af}.challenge-boss img{width:56px;height:56px}.challenge-record{display:flex;flex-direction:column;gap:3px;font-size:9px;padding:5px;background:#c4d3a6;flex:none}.champ-body>.lobby-setting{flex:none;min-height:36px}.champ-panel.dungeon-compact .challenge-pager button{min-height:30px}.champ-panel.dungeon-compact .challenge-boss{min-height:44px}.champ-panel.dungeon-compact .challenge-boss img{width:32px;height:32px}.champ-panel.dungeon-compact .challenge-record{font-size:8px}
/* ENDURANCE RUN START */
.run-overlay{position:fixed;inset:0;z-index:160;background:#183c31;color:#ece7be;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));font-family:monospace;box-sizing:border-box;overscroll-behavior:contain}
.run-shell{height:100%;width:100%;max-width:700px;margin:auto;display:flex;flex-direction:column;gap:8px;min-height:0}.run-shell header{display:flex;align-items:center;gap:8px;padding:0;min-height:48px;flex:none}.run-shell header>div{text-align:center;flex:1;min-width:0}.run-shell header strong,.run-shell header small{display:block}.run-shell header strong{font-size:17px;letter-spacing:1px}.run-shell header small{font-size:9px;color:#bdcda6}.run-shell header>span{width:76px;text-align:right;font-size:12px;font-weight:bold;color:#ffe19b;font-variant-numeric:tabular-nums}
.run-shell button{min-height:48px;border:2px solid #9aaa7d;border-radius:9px;background:#2e5140;color:#ece7be;font:700 11px monospace;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;padding:8px}.run-shell button:focus-visible{outline:3px solid #ffe19b;outline-offset:2px}.run-shell button:disabled{opacity:.62}.run-shell #run-exit{width:70px}.run-meta{display:flex;justify-content:space-between;gap:10px;font-size:11px;flex:none}.run-meta>span{min-width:0;overflow-wrap:anywhere}.run-stage{position:relative;flex:1;min-height:110px;border:3px solid #8fa477;border-radius:8px;overflow:hidden;background:#8caf91}.run-stage canvas{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated;pointer-events:none}
.run-readout{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:16px;background:#264938;border:1px solid #80936a;border-radius:6px;padding:9px 12px;flex:none}.run-readout span{display:block;font-size:10px;letter-spacing:1px;margin-bottom:5px}.run-readout strong{font-size:25px;line-height:1;color:#ffe19b;font-variant-numeric:tabular-nums}.run-meter{height:17px;border:2px solid #c0cda1;padding:2px;background:#142e25}.run-meter i{display:block;height:100%;width:0;background:#c2dd89;box-shadow:inset 0 0 0 1px #dbe7a1}.run-shell #run-hint{margin:0;min-height:32px;text-align:center;font-size:12px;line-height:1.3;flex:none}.run-controls{display:grid;grid-template-columns:minmax(64px,1fr) minmax(110px,1.4fr) minmax(64px,1fr);gap:12px;align-items:center;max-width:440px;width:100%;align-self:center;flex:none}.run-controls button{border-radius:50%;width:100%;aspect-ratio:1;max-height:120px;max-width:120px;justify-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.run-controls button b{font-size:27px}.run-controls button span{font-size:9px;line-height:1.2;white-space:nowrap}.run-controls #run-tap{background:#dfc776;color:#283f2e;border-color:#eedd9e;box-shadow:inset 0 0 0 3px #ab9149;max-width:132px;max-height:132px}.run-controls #run-tap:active:not(:disabled){background:#f3df97;transform:scale(.97)}.run-controls #run-assist[aria-pressed=true]{background:#c1d09f;color:#293f2e}.run-note{flex:none;font-size:9px;text-align:center;color:#b6c6a0}
@media(max-height:600px){.run-shell{gap:5px}.run-shell header{min-height:42px}.run-shell header strong{font-size:14px}.run-shell header small{font-size:8px}.run-shell #run-exit{min-height:42px}.run-controls button{max-height:80px;max-width:80px}.run-controls #run-tap{max-height:90px;max-width:90px}.run-controls button b{font-size:23px}.run-readout{padding:6px 10px}.run-readout strong{font-size:21px}.run-shell #run-hint{min-height:26px;font-size:11px}.run-note{display:none}}
@media(max-width:350px){.run-shell header strong{font-size:13px}.run-shell header>span{width:65px;font-size:11px}.run-shell #run-exit{width:58px;font-size:10px}.run-controls{gap:8px}.run-meta{font-size:10px}.run-readout{gap:10px;grid-template-columns:minmax(0,1fr) 88px}}
@media(prefers-reduced-motion:reduce){.run-controls #run-tap:active:not(:disabled){transform:none}}
@media(max-height:520px) and (min-width:540px){.run-shell{display:grid;max-width:960px;grid-template-columns:minmax(0,1fr) minmax(230px,38%);grid-template-rows:42px 14px minmax(0,1fr) auto;column-gap:12px;row-gap:5px}.run-shell header{grid-column:1/-1;grid-row:1}.run-meta{grid-column:1/-1;grid-row:2}.run-stage{grid-column:1;grid-row:3;min-height:0;height:100%}.run-readout{grid-column:2;grid-row:3;align-self:start}.run-controls{grid-column:2;grid-row:3;align-self:end}.run-shell #run-hint{grid-column:1/-1;grid-row:4;min-height:20px}.run-note{display:none}}
@media(max-height:450px) and (max-width:539px){.run-shell{gap:4px}.run-stage{min-height:70px}.run-controls button{max-height:58px;max-width:58px}.run-controls #run-tap{max-height:64px;max-width:64px}.run-controls button b{font-size:20px}.run-readout{padding:5px 8px}.run-readout span{margin-bottom:3px;font-size:9px}.run-readout strong{font-size:18px}.run-shell #run-hint{min-height:20px;font-size:10px}}
/* ENDURANCE RUN END */

/* Woodland Home composites sharp scenery with the existing LCD sprite layer. */
.display #home-background{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:transparent;pointer-events:none}

/* Free Roam owns only its field and invitation surface. */
.rt-roaming #rt-roam-invite{z-index:7;background:#123234f5;color:#f4ebc5}.rt-roaming #rt-roam-face{image-rendering:pixelated}.rt-roaming #rt-canvas{touch-action:none}.rt-roaming #rt-caption{line-height:1.4;min-height:2.8em}
.rt-roaming #rt-enemy-hud{display:none}.rt-roaming .rt-hud{grid-template-columns:1fr}.rt-roaming #rt-roam-invite button{min-height:44px}

/* Field Bag is isolated to Free Roam; the battle controls keep their existing geometry. */
.rt-roaming .rt-top-actions #rt-bag-open{min-width:46px;font-size:10px}
.rt-field-bag{position:absolute;inset:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));z-index:8;display:flex;flex-direction:column;gap:12px;padding:16px;border:2px solid #92b4a1;border-radius:8px;background:#17383b;color:#f2ebce;box-shadow:0 0 0 16px #102c31dc;max-width:620px;margin:auto;box-sizing:border-box;touch-action:pan-y}
.rt-field-bag .rt-bag-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.rt-bag-heading strong{font-size:20px;letter-spacing:1px}.rt-bag-heading small{display:block;margin-top:5px;font-size:10px;color:#acd6cf}
.rt-field-bag button{border-color:#8cb5a8;background:#285052;color:#f2ebce;touch-action:manipulation;min-height:46px}.rt-field-bag button:focus-visible{outline:3px solid #f3d882;outline-offset:2px}.rt-field-bag button:disabled{opacity:.5}
.rt-field-bag #rt-bag-summary{font-size:12px;line-height:1.6;margin:0;padding:10px;background:#102c31;border-radius:4px;font-variant-numeric:tabular-nums}
.rt-bag-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:3px}.rt-field-bag #rt-bag-list{display:grid;gap:9px}.rt-field-bag .rt-bag-row{display:grid;grid-template-columns:40px minmax(0,1fr) 12px;gap:10px;align-items:center;text-align:left;padding:10px;min-height:68px}.rt-bag-row span{min-width:0}.rt-bag-row strong{display:block;font-size:13px;overflow-wrap:anywhere}.rt-bag-row small{display:block;margin-top:5px;font-size:11px;font-weight:normal;line-height:1.4;color:#c5e3d7}.rt-field-bag img{image-rendering:pixelated;object-fit:contain}
#rt-bag-detail{text-align:center;padding:10px 5px}#rt-bag-detail>strong,#rt-bag-detail>small{display:block;margin-top:10px}#rt-bag-detail p,#rt-bag-feedback{font-size:13px;line-height:1.6}#rt-bag-detail button{display:block;width:100%;margin-top:10px}#rt-bag-reason{color:#ffda95}#rt-bag-feedback{padding:10px;background:#102c31;border-radius:4px;margin-bottom:0}#rt-bag-resume{flex:none;background:#d7c078;color:#213a34}
@media(max-height:480px){.rt-field-bag{padding:10px;gap:6px}.rt-bag-heading strong{font-size:16px}.rt-field-bag .rt-bag-row{min-height:56px;padding:7px}.rt-field-bag #rt-bag-summary{padding:6px}}

/* Special visitor announcements are exposed once to assistive technology. */
.rt-visitor-status{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Free Roam area selection uses the existing panel and controls. */
#panel.roam-area-panel{display:flex;flex-direction:column;gap:6px;overflow:hidden}
.roam-area-list{display:flex;flex:1;min-height:0;flex-direction:column;gap:8px;overflow:auto}
.roam-area-card{display:flex;flex:1;min-height:82px;align-items:center;text-align:left;gap:10px;padding:7px;border:2px solid #7f996c;background:#d1ddba;color:#263e30;border-radius:6px}
.roam-area-card.chosen{border-color:#354b3b;box-shadow:inset 0 0 0 1px #354b3b}
.roam-area-card img{width:36%;height:76px;object-fit:cover;image-rendering:pixelated;border-radius:3px}
.roam-area-card span{display:flex;min-width:0;flex-direction:column;gap:5px}
.roam-area-card strong{font-size:12px}.roam-area-card small{font-size:10px;line-height:1.3}
@media(max-height:650px){.roam-area-card{min-height:64px}.roam-area-card img{height:54px}.roam-area-card span{gap:3px}}

.roam-area-list.roam-paged .roam-area-card{min-height:64px}
.roam-area-list.roam-paged .roam-area-card img{height:56px}
#panel.roam-area-panel .panel-footer button{min-width:44px;min-height:44px}

/* Battle Hub: reserve title/footer space; fit cards by actual LCD height. */
#panel.battle-hub-panel{gap:4px}
.battle-hub-panel .panel-title{min-height:36px}.battle-hub-panel .back-icon{width:36px;height:36px}
.battle-hub-panel .panel-footer{min-height:44px;flex:none}.battle-hub-panel .panel-footer button{height:44px;min-height:44px;min-width:44px}
.battle-hub-panel .menu-content{overflow:auto;min-height:0;flex:1}
.battle-hub-panel .hub-body{flex:1;min-height:0}
.battle-hub-panel .hub-fit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(var(--hub-rows),minmax(64px,1fr));gap:6px;overflow:auto}
.battle-hub-panel .hub-fit-grid>.hub-card{min-height:64px;padding:4px;gap:3px}
.battle-hub-panel .hub-fit-grid>.hub-card:last-child:nth-child(odd){grid-column:1/-1}
.battle-hub-panel .hub-fit-grid .hub-art{height:20px}.battle-hub-panel .hub-fit-grid .hub-label{font-size:10px}.battle-hub-panel .hub-fit-grid small{font-size:8px;overflow-wrap:anywhere}
.battle-hub-panel .hub-tools{grid-template-columns:repeat(3,minmax(0,1fr));flex:none;min-height:58px}.battle-hub-panel .hub-tools .hub-tool{min-height:58px}
.battle-hub-panel.hub-compact .hub-fighter{min-height:40px}.battle-hub-panel .hub-full .hub-modes{min-height:134px}
.battle-hub-panel.dungeon-compact .panel-title{min-height:28px}.battle-hub-panel.dungeon-compact .back-icon{height:28px;width:32px}
.battle-hub-panel.dungeon-compact .panel-footer>span{font-size:7px}

/* Free Roam fills the viewport. Existing duel/dungeon layout stays separate. */
.rt-overlay.rt-roaming{display:block;padding:0;background:#102a2d;color:#f1e8c7;isolation:isolate}
.rt-roaming .rt-stage{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;background:#102a2d;display:block;overflow:hidden}
.rt-roaming .rt-stage canvas{width:100%;height:100%;object-fit:fill;pointer-events:auto;touch-action:none}
.rt-roaming .rt-top{position:absolute;z-index:3;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));display:block;width:94px}
.rt-roaming .rt-top>strong{display:none}.rt-roaming .rt-top-actions{display:grid;grid-template-columns:44px 44px;gap:5px}
.rt-roaming .rt-top .rt-top-actions button{min-width:44px;min-height:44px;width:44px;height:44px;padding:3px;background:#123b3ddd;color:#f8eec9;border:1px solid #7bbfc0;border-radius:9px;font-size:11px}
.rt-roaming #rt-controls-open{font-size:22px}.rt-roaming #rt-pause{font-size:22px}
.rt-roaming .rt-hud{position:absolute;z-index:2;left:max(8px,env(safe-area-inset-left));right:112px;top:max(8px,env(safe-area-inset-top));display:block;pointer-events:none;max-width:430px}
.rt-roaming .rt-hud>div:first-child{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;background:#102f32e8;border:1px solid #6cb6b1;border-radius:8px;padding:7px 7px 7px 39px;min-height:52px}
.rt-roaming .rt-hud img{left:5px;top:8px;width:28px;height:28px}.rt-roaming #rt-role-p{display:none}
.rt-roaming #rt-name-p{font-size:11px;line-height:1.1;min-width:0}.rt-roaming #rt-hp-p{font-size:9px;white-space:nowrap}
.rt-roaming .rt-track{grid-column:1/-1;height:5px;margin:0;background:#071e22}.rt-roaming .rt-track i{background:#52cf9b}
.rt-roaming .rt-burst-track{height:4px;align-self:center;margin:0;background:#071e22}.rt-roaming .rt-burst-track i{background:#efc263}
.rt-roaming #rt-burst-state-p{font-size:8px;line-height:1.1;margin:0;color:#f8d985;white-space:nowrap}
.rt-roaming .rt-controls{position:absolute;z-index:3;left:50%;transform:translateX(-50%);bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:960px;pointer-events:none;align-self:auto;background:none}
.rt-roaming .rt-actions{pointer-events:none}.rt-roaming .rt-stick,.rt-roaming .rt-stick-zone,.rt-roaming .rt-action{pointer-events:auto}
.rt-roaming .rt-controls .rt-stick{border-color:#77c4cb;background:#123b3ba8;box-shadow:inset 0 0 18px #123b3b44}.rt-roaming .rt-stick span{background:#79b8b9bb;border-color:#b4e2db}.rt-roaming .rt-stick small{color:#e4f4dc}
.rt-roaming .rt-actions .rt-action{background:#123c3dd9;color:#f4eac3;border-color:#6ea7a6;--ring-color:#e7d298}
.rt-roaming .rt-actions .rt-action#rt-basic,.rt-roaming .rt-actions .rt-action#rt-dodge{background:#123c3dd9;color:#f4eac3;border-color:#78b5b0}
.rt-roaming .rt-actions .rt-action#rt-ultimate{background:#4d361ad9;color:#ffe1a0;border-color:#eac16d}
.rt-roaming .rt-actions .rt-action#rt-ultimate.rt-burst-ready{background:#684211e8;box-shadow:0 0 12px #ffc34280,inset 0 0 0 1px #ffda81}
.rt-roaming .rt-strip{position:absolute;z-index:2;left:10px;right:110px;bottom:calc(var(--roam-dock-height,202px) + 20px + env(safe-area-inset-bottom));min-height:0;pointer-events:none;max-width:420px;color:#f3e7b9;font-size:9px;text-shadow:1px 1px 2px #092c2e}
.rt-roaming #rt-time{display:none}.rt-roaming #rt-caption{min-height:0;font-size:9px;line-height:1.3;background:#123234c9;padding:4px 6px;border-radius:4px}
.rt-roaming #rt-toggle{pointer-events:auto;min-width:72px;min-height:44px;background:#123b3ddd;color:#f8eec9}
.rt-roaming .rt-dialog{z-index:7;max-height:calc(100% - 24px);overflow:auto;touch-action:pan-y;background:#123234f5;color:#f4ebc5}
.rt-roaming .rt-dialog button{background:#204b4d;color:#f7edcb;border-color:#8bb7a8}.rt-roaming .rt-control-settings{z-index:9}
@media(max-height:520px) and (min-width:540px){.rt-roaming .rt-strip{left:25%;right:25%;bottom:12px}.rt-roaming #rt-caption{font-size:8px}}
/* Override legacy Arena ID rules inside the compact Free Roam toolbar. */
.rt-roaming .rt-top .rt-top-actions #rt-controls-open,.rt-roaming .rt-top .rt-top-actions #rt-pause,.rt-roaming .rt-top .rt-top-actions #rt-bag-open{min-width:44px;min-height:44px;width:44px;height:44px;font-size:11px;padding:3px}
.rt-roaming .rt-top .rt-top-actions #rt-controls-open,.rt-roaming .rt-top .rt-top-actions #rt-pause{font-size:22px}
