/* Content-first fit: long pages and accessibility overflow remain scrollable. */
/* Tasks preserve the approved card/tab language, with height-aware spacing. */
#screen[data-route="tasks"] .approved-tasks{min-height:100%;display:flex;flex-direction:column;gap:clamp(5px,1dvh,10px)}
#screen[data-route="tasks"] .approved-tasks>h1{margin:0;font-size:23px;line-height:1.3}
#screen[data-route="tasks"] .tabs{margin:0;flex-shrink:0}
#screen[data-route="tasks"] .tabs button{min-height:44px;padding:10px 2px}
#screen[data-route="tasks"] .task-intro{min-height:66px;padding:10px 12px;flex-shrink:0}
#screen[data-route="tasks"] .task-intro p{line-height:1.4}
#screen[data-route="tasks"] .refresh-note{margin:0;line-height:1.4}
#screen[data-route="tasks"] .daily-list,#screen[data-route="tasks"] .special-list{display:grid;gap:clamp(5px,1dvh,10px);margin:0}
#screen[data-route="tasks"] .approved-task-row{margin:0;min-height:clamp(56px,9dvh,82px);padding:8px 10px}
#screen[data-route="tasks"] .special-row{gap:9px}
#screen[data-route="tasks"] .task-meter{margin-top:5px}
#screen[data-route="tasks"] .condition{margin-top:2px}
#screen[data-route="tasks"] .special-row .reward-art{height:48px}
#screen[data-route="tasks"] .first-steps-link{margin-top:auto;display:flex;justify-content:space-between;align-items:center;min-height:44px;padding:10px 12px;background:var(--panel);border:1px solid var(--line);border-radius:12px;text-align:left;font-size:12px}
#screen[data-route="tasks"] .task-preview-note{margin-top:auto;font-size:10px;line-height:1.5;color:var(--muted);padding:6px 0}
@media(min-height:601px) and (max-height:690px){
 #screen[data-route="tasks"] .special-row{padding-top:3px;padding-bottom:3px;min-height:58px}
 #screen[data-route="tasks"] .task-intro{padding-top:6px;padding-bottom:6px;min-height:58px}
 #screen[data-route="tasks"] .approved-tasks{gap:5px}
 #screen[data-route="tasks"] .special-list{gap:5px}
}
@media(max-height:600px){
 #screen[data-route="tasks"] .approved-tasks{gap:3px}
 #screen[data-route="tasks"] .intro-art>.icon{width:32px;height:32px}
 #screen[data-route="tasks"] .approved-tasks>h1{font-size:21px}
 #screen[data-route="tasks"] .task-intro{min-height:48px;padding:6px 10px}
 #screen[data-route="tasks"] .task-intro p{display:none}
 #screen[data-route="tasks"] .daily-list,#screen[data-route="tasks"] .special-list{gap:5px}
 #screen[data-route="tasks"] .approved-task-row{min-height:56px;padding:5px 8px}
 #screen[data-route="tasks"] .special-row .task-description>strong{font-size:11px}
 #screen[data-route="tasks"] .special-row .reward-art{width:40px;height:44px}
 #screen[data-route="tasks"] .special-row{padding-top:2px;padding-bottom:2px}
 #screen[data-route="tasks"] [data-tab="special"] .task-intro{min-height:36px;padding-top:4px;padding-bottom:4px}
 #screen[data-route="tasks"] [data-tab="special"] .intro-art .reward-art{height:26px}
 #screen[data-route="tasks"] .task-meter{margin-top:3px}
 #screen[data-route="tasks"] .task-preview-note{padding:0;font-size:9px;line-height:1.3}
}
.approved-home .reference-daily-grid{flex-basis:0}
.shell{height:100dvh;min-height:0;max-width:650px;padding:env(safe-area-inset-top) 0 0;display:flex;flex-direction:column}
.topbar{height:52px;min-height:52px;padding:0 18px}
.prototype-label{padding:3px 18px 5px;min-height:20px}
main#screen{flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:8px 18px;overflow:auto;scrollbar-width:thin}
nav#nav{position:relative;inset:auto;transform:none;width:100%;flex-shrink:0;padding:6px 8px max(6px,env(safe-area-inset-bottom))}
#nav a{min-height:48px}
.approved-home{min-height:100%;display:flex;flex-direction:column;justify-content:space-between;gap:10px}
.approved-home>*{flex-shrink:0}
.approved-home .home-identity{padding:12px}
.approved-home .home-identity .avatar{width:62px;height:74px;background-size:320px auto;background-position:-45px -99px}
.approved-home .home-identity h1{font-size:21px;overflow-wrap:anywhere}
.approved-home .home-stats{margin-top:10px;padding-top:9px;gap:12px}
.approved-home .home-stats strong{font-size:16px;margin-top:2px}
.approved-home .home-stats small{font-size:10px}
.approved-home .level-chip{margin-top:5px;padding:4px 8px}
.approved-home .stream-banner{margin:0;min-height:122px}
.approved-home .stream-copy{padding:10px 12px}
.approved-home .stream-copy .eyebrow{margin-bottom:3px}
.approved-home .stream-copy p.muted{margin:3px 0 5px}
.approved-home .section-heading.small{margin:2px 0 0;min-height:22px}
.approved-home .reference-daily-grid{flex:1;min-height:94px}
.approved-home .reference-daily-grid>.daily-placeholder{min-height:94px;padding:10px 5px;gap:5px;justify-content:center}
.approved-home .reference-daily-grid>button>span{min-height:0}
.approved-home .reference-live{min-height:86px;margin:0;padding:10px 12px}
.approved-home .reference-live .eyebrow{margin-bottom:3px}
.approved-home .reference-live p:not(.eyebrow){margin-top:3px}
#screen[data-route="profile"]{display:flex;flex-direction:column}
#screen[data-route="profile"]>*{flex-shrink:0}
#screen[data-route="profile"] .section-heading{margin:0 0 8px}
#screen[data-route="profile"] .section-heading.small{margin:6px 0}
#screen[data-route="profile"] .identity h2{font-size:20px;overflow-wrap:anywhere}
#screen[data-route="profile"] .identity .avatar{width:46px;height:49px;background-size:210px auto;background-position:-30px -65px}
#screen[data-route="profile"] .identity>div:nth-child(2){min-width:0;flex:1}
#screen[data-route="profile"] .xp-line{margin-top:6px}
#screen[data-route="profile"] .eyebrow{margin-bottom:3px}
#screen[data-route="profile"] .character-stage{flex:1;min-height:268px;height:auto;margin:4px 0}
#screen[data-route="profile"] .character{height:100%;max-height:440px;width:65%;top:0}
#screen[data-route="profile"] .brush-circle{height:85%;width:80%;top:4%}
#screen[data-route="profile"] .slot{width:96px}
#screen[data-route="profile"] .slot-head{top:0;right:0}
#screen[data-route="profile"] .slot-artifact{top:25%;left:0}
#screen[data-route="profile"] .slot-accessory{top:34%;right:0}
#screen[data-route="profile"] .slot-trophy{top:auto;bottom:15px;left:0}
#screen[data-route="profile"] .slot-weapon{top:auto;bottom:15px;right:0}
#screen[data-route="profile"] .slot-orb{width:48px;height:48px}
#screen[data-route="profile"] .slot .item-art,#screen[data-route="profile"] .slot .placeholder-art{width:42px;height:42px}
#screen[data-route="profile"] .slot-label{margin:3px 0 1px}
#screen[data-route="profile"] .bonus-strip{padding:10px 12px}
#screen[data-route="profile"] .bonus-strip small{margin-bottom:3px}
#screen[data-route="profile"] .bonus-strip strong{font-size:20px}
.profile-collection{display:flex;justify-content:space-between;align-items:center;min-height:44px;font-size:12px}
#screen[data-route="machine"]{display:flex;flex-direction:column}
#screen[data-route="machine"]>*{flex-shrink:0}
#screen[data-route="machine"] .section-heading{margin-bottom:4px}
#screen[data-route="machine"] .machine-stage{flex:1;min-height:230px;height:auto}
#screen[data-route="machine"] .machine-body{padding:10px;width:210px}
#screen[data-route="machine"] .glass{height:120px}
#screen[data-route="machine"] .machine-label{padding:0 0 6px;font-size:19px}
#screen[data-route="machine"] .machine-controls{padding:8px 0}
#screen[data-route="machine"] .machine-copy{margin-top:8px}
#screen[data-route="machine"] .machine-copy p{margin:6px 0 10px}
#screen[data-route="machine"] .machine-copy .quiet{margin:3px auto;min-height:44px}
#screen[data-route="machine"] .notice{margin-top:6px;padding:10px;font-size:11px}
@media(max-height:690px){
 #screen[data-route="machine"]>.eyebrow{display:none}
 #screen[data-route="machine"] .machine-stage{min-height:168px}
 #screen[data-route="machine"] .glass{height:80px}
 #screen[data-route="machine"] .machine-body{width:190px;padding:6px}
 #screen[data-route="machine"] .machine-label small{display:none}
 #screen[data-route="machine"] .machine-copy h2{font-size:17px}
 #screen[data-route="machine"] .machine-copy p{margin:3px 0 6px;line-height:1.4}
 #screen[data-route="machine"] .notice{padding:6px;line-height:1.4}
 main#screen{padding-top:4px;padding-bottom:4px}
 .approved-home .stream-copy p.muted{display:none}
 .approved-home .stream-copy .secondary{margin-top:5px}
 .approved-home .stream-banner{min-height:100px!important}
 .approved-home .home-identity{display:grid;grid-template-columns:minmax(0,1fr) 85px;gap:8px}
 .approved-home .home-identity .identity{gap:7px}
 .approved-home .home-identity h1{font-size:17px}
 .approved-home .home-title{font-size:10px}
 .approved-home .home-stats{display:flex;flex-direction:column;border:0;margin:0!important;padding:0!important;gap:5px}
 .approved-home .home-stats>div:last-child{border:0;padding:0}
 .approved-home .home-stats strong{font-size:12px}
 .approved-home .reference-daily-grid .task-glyph{width:24px;height:24px}
 .topbar{height:44px;min-height:44px}
 .approved-home{gap:4px}
 .approved-home .home-identity{padding:8px 10px}
 .approved-home .home-identity .avatar{width:47px;height:56px;background-size:240px auto;background-position:-34px -74px}
 .approved-home .home-stats{margin-top:6px;padding-top:5px}
 .approved-home .stream-banner{min-height:112px}
 .approved-home .stream-copy{padding:6px 10px}
 .approved-home .reference-live{min-height:76px}
 .approved-home .reference-daily-grid,.approved-home .reference-daily-grid>.daily-placeholder{min-height:78px}
 #screen[data-route="profile"] .character-stage{min-height:212px}
 #screen[data-route="profile"] .section-heading .eyebrow{display:none}
 #screen[data-route="profile"] .xp-line{margin-top:0}
 #screen[data-route="profile"]>.progress{margin-top:3px}
 #screen[data-route="profile"] .character-stage{margin:0}
 #screen[data-route="profile"] .bonus-strip{padding-top:6px;padding-bottom:6px}
 #screen[data-route="profile"] .section-heading{margin-bottom:3px}
 #screen[data-route="profile"] .text-button{padding:4px 0;min-height:30px}
}
