/* Physical iPhone review. Native frames stay intact; browser focus paint does not. */
html body :is(button,a,[role=button],summary,label,select):is(:focus,:focus-visible,:active){outline:none!important;outline-offset:0!important;box-shadow:none!important}
html body :is(button,a,[role=button],summary,label){-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
html body button *{user-select:none;-webkit-user-select:none}
html body #workspace [data-touch-key]{filter:none!important;transform:none!important;background-image:var(--key-art)!important}
html body #workspace [data-touch-key]:not(:disabled){opacity:1!important}
html body #workspace [data-touch-key][aria-pressed=true]{background-image:var(--pressed-art,var(--key-art))!important;opacity:1!important}
html body #workspace [data-touch-key=A]{--pressed-art:url('/assets/interface-v2/ui/console-a-pressed.png')}
html body #workspace [data-touch-key=B]{--pressed-art:url('/assets/interface-v2/ui/console-b-pressed.png')}
html body #workspace [data-touch-key=X]{--pressed-art:url('/assets/interface-v2/ui/console-x-pressed.png')}
html body #workspace [data-touch-key=Y]{--pressed-art:url('/assets/interface-v2/ui/console-y-pressed.png')}
html body #workspace [data-touch-key=L]{--pressed-art:url('/assets/interface-v2/ui/console-l-pressed.png')}
html body #workspace [data-touch-key=R]{--pressed-art:url('/assets/interface-v2/ui/console-r-pressed.png')}
html body #workspace [data-touch-key=Start]{--pressed-art:url('/assets/interface-v2/ui/console-start-pressed.png')}
html body #workspace [data-touch-key=Select]{--pressed-art:url('/assets/interface-v2/ui/console-select-pressed.png')}
html body #workspace .touch-dpad[data-direction=up]{background-image:url('/assets/interface-v2/ui/console-croix-up.png')}
html body #workspace .touch-dpad[data-direction=down]{background-image:url('/assets/interface-v2/ui/console-croix-down.png')}
html body #workspace .touch-dpad[data-direction=left]{background-image:url('/assets/interface-v2/ui/console-croix-left.png')}
html body #workspace .touch-dpad[data-direction=right]{background-image:url('/assets/interface-v2/ui/console-croix-right.png')}
html body #workspace .touch-dpad button{background:none!important}
html body[data-mobile=true] #mobile-toolbar [data-command-label]{display:grid!important;grid-template-columns:28px minmax(0,1fr);align-items:center;justify-content:start!important;gap:8px;font-size:0!important;padding:5px 8px!important;color:#42364e!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:44px!important;height:44px!important;background:none!important;border:0!important;border-image:url('/assets/interface-v2/pastel-ui/paper-normal.png') var(--native-frame-slice,4) fill / var(--native-frame-corner,8px) / 0 repeat!important;border-image-width:var(--native-frame-corner,8px)!important;margin:0!important;image-rendering:pixelated;image-rendering:crisp-edges;}
html body[data-mobile=true] #mobile-toolbar [data-command-label]::after{content:attr(data-command-label);font:500 18px/1.1 PixelUI;text-align:left;white-space:nowrap;grid-column:2;grid-row:1}
html body[data-mobile=true] #mobile-toolbar [data-command-label]>span{display:none!important}
html body[data-mobile=true] #mobile-toolbar [data-command-label]>:is(svg,img){grid-column:1;grid-row:1;width:28px!important;height:28px!important}
html body[data-mobile=true] #mobile-toolbar [data-command-label]:not(.v2-command)>svg{display:block!important}
html body[data-mobile=true] #mobile-toolbar [data-command-label].v2-command>svg{display:none!important}

/* Five learning icons occupy a centred, fixed strip without captions. */
html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs{--v2-dock:64px;height:88px;bottom:0;gap:8px;padding:0 4px max(0px,env(safe-area-inset-bottom));box-sizing:content-box}
html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs::before{inset:0}
html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs .v2-nav-label{display:none!important}
html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs .v2-sprite{--v2-size:var(--v2-dock)!important}
/* Separate Kana from the lavender Dex while retaining its native pixel frames. */
html body #kana-tab.v2-sprite{filter:hue-rotate(-50deg)!important}
html body #kana-tab.v2-sprite>.v2-letter{color:#fff;-webkit-text-stroke:.125em #000;paint-order:stroke fill}
@media(max-width:359px){html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs{--v2-dock:56px;gap:4px;height:80px}}
@media(min-width:700px) and (min-height:601px){html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs{--v2-dock:84px;height:108px;gap:24px}}
@media(orientation:landscape) and (max-height:600px){html body :is(#vocabulary-dialog,#discovery-detail) .screen-tabs{--v2-dock:56px;height:64px}}

html body #level-progress::after{content:none}
/* The room identity frame expands downward without moving the name or XP bar. */
html body #home-view #pote-status{--xp-detail-gap:4px;pointer-events:auto;row-gap:0}
html body #home-view #pote-status #level-progress{margin-top:var(--xp-detail-gap)}
html body #home-view #level-details-button{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;margin:0;padding:0;border:0;border-image:none;border-radius:0;background:none;box-shadow:none;outline:none;transform:none;cursor:pointer;touch-action:manipulation}
html body #home-view #level-details{grid-column:1/-1;display:grid;grid-template-rows:0fr;opacity:0;transition:grid-template-rows .32s ease,opacity .24s ease;pointer-events:none}
html body #home-view #level-details>div{min-height:0;overflow:hidden;text-align:center;font:500 18px/1.3 PixelUI,sans-serif;color:#624879;white-space:nowrap}
html body #home-view #level-details-text{display:block;padding-top:4px}
html body #home-view #pote-status[data-xp-open=true] #level-details{grid-template-rows:1fr;opacity:1}
@media(max-width:900px){html body #home-view #pote-status{--xp-detail-gap:10px}}
@media(orientation:landscape) and (max-height:600px){html body #home-view #pote-status{--xp-detail-gap:2px}html body #home-view #level-details>div{font-size:16px}}
@media(orientation:landscape) and (max-height:600px) and (max-width:1100px){html body #home-view #pote-status{--xp-detail-gap:12px}}
@media(min-width:1200px) and (min-height:700px) and (pointer:fine){html body #home-view #level-details>div{font-size:22px}}
@media(prefers-reduced-motion:reduce){html body #home-view #level-details{transition:none}}
html body .arena-xp-text,html body .arena-xp-gain>p{display:none}
html body #review-dialog .daily-mystery-card{position:relative}
.daily-creature-name{position:absolute;top:10%;left:12%;right:12%;text-align:center;font:700 22px/1.15 PixelUI;color:#42324f}
.daily-creature-family{position:absolute;bottom:9%;left:12%;font:500 14px/1 PixelUI;color:#675971}
@media(orientation:landscape) and (max-height:600px){.daily-creature-name{font-size:18px}.daily-creature-family{font-size:12px}}

/* Fixed task tracks: feedback replaces the field, explanations remain below. */
html body #review-dialog{grid-template-rows:44px 42px minmax(64px,1fr) 28px 50px 48px 52px 306px;gap:4px}
html body #review-dialog #review-instruction{grid-row:4;grid-column:1;margin:0;align-self:center;justify-self:center;font:700 25px/1 PixelUI;color:#69517e}
html body #review-dialog #review-answer-form,html body #review-dialog #review-feedback{grid-row:5;grid-column:1;align-self:center;margin:0}
html body #review-dialog #review-feedback{min-width:180px;justify-self:center;padding:8px 20px}
html body #review-dialog #review-correction{grid-row:6;grid-column:1;align-self:center;text-align:center;font:600 17px/1.25 'Noto Sans JP','Yu Gothic',sans-serif;margin:0;max-height:100%;overflow:auto}
html body #review-dialog .review-companion{grid-row:7;grid-column:1;position:relative;inset:auto;transform:none;width:100%;align-self:center;max-height:100%;margin:0;z-index:2}
html body #review-dialog #review-message{font-size:18px;line-height:1.15;padding:6px 10px;max-height:52px;overflow:auto}
html body #review-dialog #review-message::before,html body #review-dialog #review-message::after{content:none!important}
html body #review-dialog .daily-keyboard-slot{grid-row:8;grid-column:1;height:306px;min-height:0}
html body #review-dialog #review-next,html body #review-dialog[data-state=complete] #review-next{grid-row:8;grid-column:1;align-self:end;justify-self:center}
html body #review-dialog[data-state=reward] .daily-reveal{grid-row:3/9}
html body #review-dialog:not([data-state=review]) :is(#review-instruction,#review-correction,.review-companion){display:none}
html body .pixel-keyboard-bar{margin-bottom:0;margin-top:6px}
@media(orientation:portrait) and (max-height:740px){
 html body #review-dialog{grid-template-rows:36px 32px minmax(44px,1fr) 24px 42px 36px 40px 266px;gap:3px}
 html body #review-dialog .daily-keyboard-slot{height:266px}
 html body #review-dialog #review-instruction{font-size:22px}
 html body #review-dialog #review-message{max-height:40px;font-size:16px;padding:3px 6px}
}
@media(orientation:landscape) and (max-height:600px){
 html body #review-dialog{grid-template-columns:minmax(160px,1fr) minmax(300px,1.5fr);grid-template-rows:28px 40px 40px minmax(0,1fr) 30px 28px 38px;gap:3px 12px}
 html body #review-dialog .dialog-top{grid-column:1;grid-row:1}
 html body #review-dialog #review-progress{grid-column:1;grid-row:2}
 html body #review-dialog #review-prompt{grid-column:1;grid-row:3/5;font-size:84px}
 html body #review-dialog #review-instruction{grid-column:2;grid-row:1;font-size:21px}
 html body #review-dialog #review-answer-form{grid-column:2;grid-row:2}
 html body #review-dialog .review-companion{grid-column:2;grid-row:3}
 html body #review-dialog #review-message{max-height:40px;font-size:16px;padding:4px 8px}
 html body #review-dialog .daily-keyboard-slot{grid-column:2;grid-row:4/8;height:100%;align-items:end}
 html body #review-dialog .pixel-keyboard{--key-size:22px}
 html body #review-dialog #review-feedback{grid-column:1;grid-row:5;min-width:140px;font-size:20px;padding:4px 10px}
 html body #review-dialog #review-correction{grid-column:1;grid-row:6;align-self:center;font-size:15px}
 html body #review-dialog #review-next{grid-column:1;grid-row:7;height:36px;min-height:36px}
 html body #review-dialog[data-state=reward] .daily-reveal{grid-column:2;grid-row:1/8}
}

/* Mortel retains its engine rules; only the deadline and presentation change. */
.arena-ready-count{display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.arena-ready-count h2{margin:0;text-align:center}
.arena-welcome .arena-modes .arena-button{flex:1;min-width:0;font:700 24px/1 PixelUI;padding:10px 4px;white-space:nowrap}
.arena-welcome .arena-modes [aria-pressed=true]{transform:translateY(2px);filter:brightness(.94) saturate(1.15);box-shadow:none;font-weight:700}
.arena-welcome .arena-modes [aria-pressed=true]::after,.arena-team-card.selected::after{content:none!important}
.arena-page::after{content:'';position:fixed;inset:0;z-index:15;box-shadow:inset 0 0 70px 18px #a019384b;pointer-events:none;opacity:0;transition:opacity .8s ease}
.arena-page.arena-impossible::after{opacity:1}
.arena-impossible .arena-main{animation:arena-wake .8s linear,arena-inferno .12s .8s linear infinite alternate}
.arena-impossible.arena-combat-ended .arena-main{animation:arena-calm .8s ease-out both}
@keyframes arena-wake{0%,20%{translate:0 0}40%{translate:-.15px 0}60%{translate:.25px .15px}80%{translate:-.4px 0}100%{translate:.5px .5px}}
@keyframes arena-calm{0%{translate:.5px .5px}20%{translate:-.4px 0}40%{translate:.3px .2px}60%{translate:-.2px 0}80%{translate:.1px .1px}100%{translate:0 0}}
.arena-timebar span[data-urgency=green]{background:#70b999}.arena-timebar span[data-urgency=orange]{background:#e1a46a}.arena-timebar span[data-urgency=red]{background:#d86b7c}
.arena-pote-comment{bottom:22px;min-width:min(300px,calc(100% - 36px));width:min(480px,calc(100% - 36px));font-size:19px}
.arena-stage>.arena-xp-gain{position:absolute;right:12px;bottom:12px;z-index:9;width:176px;pointer-events:none}
.arena-stage>.arena-xp-gain.is-celebrating{animation:arena-xp-enter .5s ease-out forwards}
.arena-stage>.arena-xp-gain .home-status{padding:8px 10px;gap:4px 4px}
.arena-stage>.arena-xp-gain h3{font-size:16px}.arena-stage>.arena-xp-gain .arena-xp-level{font-size:14px}
.arena-stage>.arena-xp-gain .home-progress{height:16px}
.arena-battle .arena-result{gap:6px}.arena-battle .arena-result>h2{font-size:30px}
.arena-battle .arena-rest-team canvas{max-height:80px;width:min(100%,80px)}
.arena-battle .arena-rest-team small{font-size:17px}
@media(orientation:portrait) and (min-height:741px){.arena-battle .arena-fighter.you .arena-actor{width:min(44vw,200px);height:min(44vw,200px)}}
@media(orientation:portrait) and (min-width:700px){.arena-battle .arena-fighter.you .arena-actor{width:320px;height:320px}}
/* Normal mode has room for a larger foreground fighter on phones. Resize the
   actor itself so native animation geometry and its shadow share the scale. */
@media(orientation:portrait) and (max-width:699px){
 .arena-battle[data-mode=NORMAL] .arena-fighter.you .arena-actor{width:min(52.8vw,240px);height:min(52.8vw,240px)}
}
@media(orientation:portrait) and (max-width:699px) and (min-height:741px){
 /* Keep the larger actor and ground shadow inside the left edge of the map. */
 .arena-battle[data-mode=NORMAL] .arena-fighter.you{width:52%;max-width:52%}
}
@media(orientation:portrait) and (max-width:699px) and (max-height:740px){
 .arena-battle[data-mode=NORMAL] .arena-fighter.you .arena-actor{width:140px;height:140px}
}
@media(orientation:landscape) and (min-height:601px){.arena-battle .arena-fighter.you .arena-actor{width:clamp(180px,31vh,340px);height:clamp(180px,31vh,340px)}.arena-stage>.arena-xp-gain{top:12px;bottom:auto;right:18px}.arena-pote-comment{bottom:24px}}
@media(orientation:landscape) and (max-height:600px){.arena-stage>.arena-xp-gain{top:8px;bottom:auto;right:12px;width:184px}.arena-pote-comment{bottom:16px;min-width:0;width:48%;font-size:17px}.arena-battle .arena-result{display:flex;gap:4px}.arena-battle .arena-rest-team{width:100%}.arena-battle .arena-result>h2{font-size:25px}.arena-battle .arena-rest-team canvas{max-height:62px;width:62px}.arena-battle .arena-end-actions .arena-button{min-height:32px;font-size:19px}}
@media(prefers-reduced-motion:reduce){.arena-page::after{transition:none}.arena-impossible .arena-main,.arena-impossible.arena-combat-ended .arena-main{animation:none}.arena-stage>.arena-xp-gain.is-celebrating{animation:none;opacity:1}}
