:root{--visible-height:100dvh}html{scroll-padding-bottom:max(24px,env(safe-area-inset-bottom));scroll-padding-top:16px}body{min-height:100vh;min-height:100dvh}main{padding-bottom:max(24px,env(safe-area-inset-bottom))}button,.button,summary{min-height:48px}button,.button{touch-action:manipulation}input:not([type=checkbox]),textarea,select{font-size:16px}input,textarea{scroll-margin-top:16px;scroll-margin-bottom:24px}.actions{gap:12px}button:focus-visible,summary:focus-visible{outline:3px solid #ffcf61;outline-offset:3px}.collection-empty{padding:20px;border:1px dashed #7190a9;border-radius:14px;margin:16px 0}.collection-empty h2{font-size:1.3rem}.collection-search-label{display:block;margin:16px 0 8px}.voice-box.recording{border:2px solid #ffcf61}.voice-box.recording #recordStatus{font-weight:bold;color:#ffcf61}.voice-step{font-size:.85rem;color:#ffcf61;letter-spacing:.04em}.voice-status{display:block;padding:10px 0;min-height:40px}.optional-notes{margin:14px 0}.optional-notes summary{font-size:14px}.record-help{margin-top:16px}.record-help summary{font-size:14px}.mobile-task-step{font-size:.85rem;color:#ffcf61;margin:8px 0}.compact-hint{font-size:.88rem;color:#b9cbd9}
@media(max-width:700px){
 main{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));max-width:100%}header{gap:8px;padding:10px 0;flex-wrap:wrap;position:static}header .brand{font-size:20px;min-height:48px}header nav{gap:6px}header nav button{padding:8px 12px;min-width:48px}header .edition{display:none}h1{font-size:clamp(25px,7vw,34px);line-height:1.2}.card{padding:16px;border-radius:16px;margin-top:12px}.study-portal{padding:16px}.study-portal>.eyebrow{font-size:10px}.study-portal>h2{font-size:23px;margin:10px 0 14px}.training-grid{grid-template-columns:1fr;gap:8px}.training-grid>div{padding:10px 12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;align-items:center;border-radius:12px}.training-grid>div>b{font-size:16px}.training-grid>div>p{grid-column:1;line-height:1.4;margin:2px 0;font-size:12px}.training-grid>div>button{grid-column:2;grid-row:1/3;min-width:88px;max-width:108px;padding:9px;font-size:14px}.study-portal>.small{font-size:12px;line-height:1.5;margin:12px 0}.study-portal>button{margin:4px 4px 0 0}.hero{min-height:0;display:block;padding:12px 0}.hero>svg,.hero>div>h1,.hero>div>.eyebrow,.hero>div>p{display:none}.hero .actions{margin:0}.hero .actions button{font-size:14px}.sideline-crew{max-height:180px;overflow:hidden}.hero+.sideline-crew{margin:10px 0}.toon-body{transform-origin:center}.stats{gap:8px}.stat{padding:10px}.stat strong{font-size:22px}.stat span{font-size:11px}.worlds{gap:6px}.world{min-width:0;padding:10px 7px}.world small{display:none}.world b{font-size:14px}.world .sigil{font-size:22px}.map-panel{padding:16px}.map-head .pill{display:none}.map-panel>.small{font-size:12px}.sideline{padding:10px!important}.sideline svg{width:66px!important;height:85px!important}.combat{display:flex;flex-direction:column;gap:10px}.combat-side .enemy-glyph,.combat-side .eyebrow,.combat-side .side-note,.combat-side>.small{display:none}.combat-side .card{padding:10px 14px;margin:0}.battle-hud{display:grid;grid-template-columns:1fr 1fr;gap:14px;font-size:12px}.battle-hud progress{margin-bottom:0}.question{margin:0}.question #prompt{font-size:22px;line-height:1.45;margin:12px 0}.question .prompt-meta{font-size:11px;margin:8px 0}.question .stances{gap:10px;margin:12px 0}.stances button{min-height:48px;padding:10px;font-size:15px}.stances small{font-size:10px}.question #answerForm{display:grid;grid-template-columns:1fr;gap:8px}.question #answerForm input{width:100%;min-height:48px;box-sizing:border-box;margin:0}.question #answerForm button{width:100%;min-height:50px}.question .actions{display:flex;flex-wrap:wrap;gap:10px}.question .actions button{flex:1;min-width:110px;min-height:48px}.backline{gap:8px;flex-wrap:wrap;margin:10px 0}.backline>.small{font-size:11px}.backline>.pill{font-size:11px}.question .feedback{padding:12px}.feedback .sideline svg{width:48px!important;height:65px!important}.study-round{padding:16px}.study-round>.row{flex-wrap:wrap;gap:8px}.study-round>.row button{font-size:13px;padding:8px 12px}.study-round h2{font-size:22px;margin:14px 0}.study-prompt{font-size:17px;line-height:1.6;margin:12px 0}.study-round #studyClock{font-size:11px;margin:8px 0}.study-round textarea{min-height:100px;margin:8px 0 12px;font-size:16px;line-height:1.6;padding:12px}.study-round .actions{display:grid;grid-template-columns:1fr;gap:10px}.study-round .actions>button{width:100%;min-width:0;min-height:50px}.voice-box{padding:12px;margin:12px 0}.voice-box>p:first-child{font-size:12px;line-height:1.4;margin:4px 0 10px}.voice-box>button{min-height:48px;margin:0 6px 8px 0;padding:10px 14px}.voice-box .actions{grid-template-columns:1fr 1fr;gap:10px;margin:6px 0}.voice-box .actions button{min-height:50px}.voice-box .record-help{font-size:12px}.voice-box audio{margin:8px 0}.voice-status{font-size:13px;line-height:1.5;padding:4px 0}.self-check label{min-height:48px;align-items:center;font-size:15px}.reference{padding:12px}.reference p{font-size:15px}.study-task-list{grid-template-columns:1fr}.cards-grid{grid-template-columns:1fr}.collection-search-label{font-size:14px}.collection-empty{padding:16px}footer{font-size:11px;margin-top:20px}dialog{max-height:calc(var(--visible-height) - 24px);max-width:calc(100vw - 24px);box-sizing:border-box}.keyboard-open .combat-side,.keyboard-open header,.keyboard-open .backline,.keyboard-open .question .prompt-meta,.keyboard-open .question .stances{display:none}.keyboard-open .question #prompt{font-size:18px}.keyboard-open .study-round>.row,.keyboard-open .study-round>.small,.keyboard-open #studyClock{display:none}.keyboard-open .study-round{margin:0;padding:12px}.keyboard-open .study-round h2{font-size:18px;margin:6px 0}.keyboard-open .study-prompt{font-size:15px;margin:6px 0}.keyboard-open textarea{min-height:80px;max-height:130px}
}
@media(max-width:350px){header{justify-content:center}header .brand{width:100%;text-align:center}.training-grid>div>button{min-width:76px;max-width:90px}.study-portal>h2{font-size:21px}.world b{font-size:12px}}
@media(max-height:500px) and (orientation:landscape){header{padding:4px 0}.hero{display:none}.question #prompt{font-size:20px}.combat-side{display:none}}
@media(max-width:700px){.sideline-crew{max-height:none;padding:12px;overflow:visible}.crew-line figure{max-width:90px;margin:6px 0 0}.crew-line .player-toon{height:86px;width:100%}.crew-heading b{font-size:13px}.crew-heading span{font-size:9px}.fan-note{margin-top:8px;font-size:9px}.sideline-reaction{padding:10px;gap:10px;margin:12px 0}.sideline-reaction>.player-toon{flex-basis:54px;width:54px;height:76px}.sideline-caption strong{font-size:14px}.sideline-caption p{font-size:11px;line-height:1.5}.sideline-caption small{font-size:9px}.victory-toons .player-toon{height:86px}.study-round .study-feedback .sideline-reaction{margin:8px 0}}
@media(max-height:500px) and (orientation:landscape){.combat{grid-template-columns:minmax(0,1fr)}.combat>.question{grid-column:1/-1;width:100%}}
@media(max-height:500px) and (orientation:landscape){.hero{display:block;min-height:0;padding:10px 0}.hero>svg,.hero>div>h1,.hero>div>.eyebrow,.hero>div>p{display:none}.hero .actions{margin:0}}
