/* Device choice is explicit; the same pupil profile and content serve both modes. */
.welcome{overflow-y:auto;align-items:flex-start;padding-block:64px 30px;background:linear-gradient(90deg,#113a30ad,#173e3520),url('/assets/journey/balairung-syair.webp') center/cover}
.welcome-card{width:460px;flex-shrink:0}
.device-picker{border:0;padding:0;margin:0 0 16px;min-width:0}
.device-picker legend{padding:0;margin:0 0 8px;font-size:12px;font-weight:750}
.device-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.device-option{position:relative;margin:0;min-width:0;font-size:12px}
.device-option input[type=radio]{position:absolute;opacity:0;width:1px;height:1px;margin:0;padding:0}
.device-option>span{display:flex;min-height:79px;flex-direction:column;justify-content:center;gap:4px;border:1px solid #cdbb94;border-radius:9px;padding:10px 11px;background:#fffcf2;cursor:pointer}
.device-option strong{font-size:12px;line-height:1.35}
.device-option small{font-size:10px;font-weight:400;line-height:1.5;color:#697868}
.device-option input:checked+span{border:2px solid #315e4d;padding:9px 10px;background:#e6eddd;box-shadow:0 0 0 2px #315e4d16}
.device-option input:focus-visible+span{outline:3px solid #b48a40;outline-offset:3px}
.device-option input:disabled+span{opacity:.6;cursor:wait}
#device-mode-description{font-size:11px;font-weight:400;line-height:1.6;margin:8px 0 0;color:#647363}
#device-mode-label{margin-top:4px;letter-spacing:.02em;color:#e5d6ae;font-size:9px;text-transform:none}
.form-grid input{font-size:16px}
.touch-controls{touch-action:none}
.touch-controls button{touch-action:none;user-select:none;-webkit-user-select:none}
[data-device-mode=desktop] .touch-controls{display:none}
.phone-help{line-height:1.7}
.learning-mode .device-picker,.learning-mode #device-mode-label{display:none}

[data-device-mode=phone] .welcome{justify-content:center;padding:64px 16px 24px}
[data-device-mode=phone] .welcome-card{width:min(440px,100%);padding:22px 25px;border-radius:6px 26px 6px 6px}
[data-device-mode=phone] .welcome h1{font-size:55px;margin-block:12px 9px}
[data-device-mode=phone] .welcome-card>.crest{font-size:30px}
[data-device-mode=phone] .welcome .eyebrow{margin-top:8px}
[data-device-mode=phone] .welcome .intro{font-size:12px;line-height:1.7;margin-bottom:12px}
[data-device-mode=phone] .serif-sub{font-size:21px;margin-bottom:13px}
[data-device-mode=phone] .steps{margin-block:14px;padding-block:10px}
[data-device-mode=phone] .form-grid label{font-size:13px}
[data-device-mode=phone] .welcome-card .fine{font-size:11px;line-height:1.6}
[data-device-mode=phone] .device-option strong{font-size:13px}
[data-device-mode=phone] .device-option small{font-size:11px}
[data-device-mode=phone] .device-option>span{min-height:86px}
[data-device-mode=phone] .start{min-height:48px;font-size:15px}
[data-device-mode=phone] .scene-caption{display:none}
[data-device-mode=phone] .topbar{top:max(10px,env(safe-area-inset-top));left:12px;right:12px;gap:8px}
[data-device-mode=phone] .brand{padding:8px 10px;gap:8px}
[data-device-mode=phone] .brand strong{font-size:19px}
[data-device-mode=phone] .brand>span{font-size:26px}
[data-device-mode=phone] .brand small{font-size:7px}
[data-device-mode=phone] #device-mode-label{font-size:10px}
[data-device-mode=phone] .header-actions{gap:5px}
[data-device-mode=phone] .header-actions>a{display:none}
[data-device-mode=phone] .profile-button{font-size:12px;max-width:120px;padding:8px 10px;min-height:48px}
[data-device-mode=phone] .profile-button span{font-size:11px}
[data-device-mode=phone] .icon-button{min-height:44px;min-width:44px;font-size:16px;padding:8px}
[data-device-mode=phone] .control-hint{display:none}
[data-device-mode=phone] .bottom-bar{display:grid;grid-template-columns:1fr;left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));gap:7px}
[data-device-mode=phone] .music-control{position:static;justify-self:start;padding:4px 8px;min-height:40px}
[data-device-mode=phone] .music-control button{font-size:11px;min-height:30px}
[data-device-mode=phone] .music-control input{width:80px}
[data-device-mode=phone] .footer-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:6px}
[data-device-mode=phone] .footer-actions button{font-size:12px;min-height:44px;padding:8px 6px}
[data-device-mode=phone] .touch-controls{display:grid;left:12px;bottom:calc(179px + env(safe-area-inset-bottom));grid-template-columns:repeat(3,44px);gap:5px}
[data-device-mode=phone] .touch-controls button{min-width:44px;min-height:44px;font-size:24px;padding:4px}
[data-device-mode=phone] .interact-wrap{bottom:calc(202px + env(safe-area-inset-bottom));right:12px;left:auto;transform:none;max-width:calc(100vw - 174px);white-space:normal}
[data-device-mode=phone] .interact-wrap button{min-height:48px;font-size:13px;padding:10px}
[data-device-mode=phone] .destination-card{top:98px;right:12px;left:12px;width:auto;max-width:430px;margin-left:auto;padding:14px 16px}
[data-device-mode=phone] .destination-card strong{font-size:20px}
[data-device-mode=phone] .destination-card small{font-size:12px}
[data-device-mode=phone] .destination-card .primary{font-size:13px;min-height:44px}
[data-device-mode=phone] .destination-card .text-button{min-width:40px;min-height:40px}
[data-device-mode=phone] dialog{width:100%;max-width:100%;max-height:100dvh;border-radius:0;overscroll-behavior:contain}
[data-device-mode=phone] .activity,[data-device-mode=phone] .journey-map{height:100dvh;margin:0;border:0;overflow-y:auto}
[data-device-mode=phone] .dialog-header{position:sticky;top:0;z-index:4;background:var(--cream);padding:14px 16px;gap:10px}
[data-device-mode=phone] .dialog-header h2{font-size:25px}
[data-device-mode=phone] .dialog-header p{font-size:12px}
[data-device-mode=phone] .close{min-height:44px;min-width:44px}
[data-device-mode=phone] .poem-list{grid-template-columns:1fr}
[data-device-mode=phone] .poem-picker{padding:20px 16px}
[data-device-mode=phone] .poem-card{min-height:112px;padding:16px}
[data-device-mode=phone] .poem-card p{font-size:12px}
[data-device-mode=phone] .book{grid-template-columns:1fr;margin:8px 12px 14px}
[data-device-mode=phone] .page{padding:18px}
[data-device-mode=phone] .page:first-child{border-right:0;border-bottom:1px solid #c9ae79;box-shadow:none}
[data-device-mode=phone] .page:last-child{box-shadow:none}
[data-device-mode=phone] .page-label{font-size:11px;letter-spacing:.07em}
[data-device-mode=phone] .poem-lines{min-height:0;max-height:none;overflow:visible}
[data-device-mode=phone] .verse{font-size:19px;min-height:48px;padding:11px 8px}
[data-device-mode=phone] .stanza-nav{font-size:12px}
[data-device-mode=phone] .stanza-nav button{min-width:44px;min-height:44px;font-size:24px}
[data-device-mode=phone] .small{font-size:13px;padding:10px 12px;min-height:44px}
[data-device-mode=phone] .text-button{font-size:12px;min-height:40px}
[data-device-mode=phone] .fine{font-size:12px}
[data-device-mode=phone] label,[data-device-mode=phone] .check-label,[data-device-mode=phone] .range-label{font-size:13px}
[data-device-mode=phone] .check-label{min-height:44px;align-items:center}
[data-device-mode=phone] .check-label input{min-width:19px;min-height:19px}
[data-device-mode=phone] #lesson-video{max-height:50dvh}
[data-device-mode=phone] .recorder-pane{padding:8px 16px 18px}
[data-device-mode=phone] .record-controls button{min-height:46px;font-size:14px}
[data-device-mode=phone] #record-status{font-size:12px}
[data-device-mode=phone] .last-recording{grid-template-columns:1fr}
[data-device-mode=phone] .last-recording>span{font-size:13px}
[data-device-mode=phone] .last-recording audio{grid-row:2;width:100%;height:44px}
[data-device-mode=phone] .activity-footer{position:sticky;bottom:0;z-index:3;padding:12px 14px;gap:12px}
[data-device-mode=phone] .activity-footer span{font-size:12px;line-height:1.5}
[data-device-mode=phone] .activity-footer .primary{font-size:14px;min-height:46px;min-width:100px}
[data-device-mode=phone] .journey-heading{position:sticky;top:0;z-index:4;padding:16px;background:#fbf5e8}
[data-device-mode=phone] .journey-heading h2{font-size:27px}
[data-device-mode=phone] .journey-heading p{font-size:13px}
[data-device-mode=phone] .journey-board{display:grid;grid-template-columns:1fr;grid-template-rows:none;gap:20px;padding:24px 20px;background:#e5e9d3}
[data-device-mode=phone] .journey-landscape,[data-device-mode=phone] .journey-sequence{display:none}
[data-device-mode=phone] .map-station{display:grid;grid-template-columns:105px 1fr;grid-column:auto;grid-row:auto;min-height:122px}
[data-device-mode=phone] .map-station-1{order:1}
[data-device-mode=phone] .map-station-2{order:2}
[data-device-mode=phone] .map-station-3{order:3}
[data-device-mode=phone] .map-station img{height:100%;min-height:122px;object-fit:cover;border-radius:6px 0 0 6px}
[data-device-mode=phone] .map-card-body{padding:12px;gap:5px}
[data-device-mode=phone] .map-card-body>strong{font-size:22px}
[data-device-mode=phone] .map-card-body>small{font-size:10px}
[data-device-mode=phone] .map-card-body>span,[data-device-mode=phone] .map-card-state{font-size:12px}
[data-device-mode=phone] .journey-footer{position:sticky;bottom:0;z-index:3;display:flex;flex-wrap:wrap;gap:10px;background:#fbf5e8;padding:14px 16px}
[data-device-mode=phone] .journey-footer p{font-size:12px}
[data-device-mode=phone] .journey-footer .primary{width:100%;min-height:46px;font-size:14px}
[data-device-mode=phone] .profile-dialog .small{min-height:44px}
[data-device-mode=phone] .toast{bottom:calc(178px + env(safe-area-inset-bottom));font-size:13px}

#phone-vr-chrome{position:fixed;inset:0;pointer-events:none;z-index:70;color:#fff7df}
.phone-vr-toolbar{position:absolute;top:max(6px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));display:flex;flex-wrap:wrap;gap:8px;align-items:center;pointer-events:auto}
.phone-vr-toolbar button{font-size:12px;min-height:40px;background:#173e35e6;color:#fff3d0;border-color:#b29458;padding:7px 10px}
#phone-vr-tracking{flex:1;text-align:center;font-size:11px;text-shadow:0 1px 4px #000}
.phone-vr-divider{position:absolute;top:0;bottom:0;left:50%;width:2px;background:#10271d80}
.phone-vr-rotate{display:none;position:absolute;inset:65px 20px 20px;background:#173e35ee;border:1px solid #b29458;border-radius:12px;padding:25px;text-align:center;align-content:center}
.phone-vr-rotate strong{font:28px Georgia}
.phone-vr-rotate p{font-size:15px;line-height:1.7;margin-top:15px}
.phone-vr-portrait .phone-vr-rotate{display:block}
.phone-vr-portrait #phone-vr-tracking{display:none}
.phone-vr{overflow:hidden}
.fullscreen-guide{width:620px}
.fullscreen-guide .profile-content{font-size:15px;line-height:1.65;padding:20px 26px 28px}
.fullscreen-guide .profile-content p{font-size:15px;line-height:1.65}
.fullscreen-guide .profile-content .fine{font-size:12px}
.fullscreen-guide li{margin-block:10px}
.fullscreen-guide h3{font-size:18px;margin-top:20px}
.fullscreen-guide h2{font-size:26px}
#welcome-full-screen{margin-top:12px;min-height:44px}
[data-device-mode=phone] #full-screen{font-size:11px;padding:8px;white-space:nowrap}
@media(display-mode:standalone){.topbar{padding-top:max(14px,env(safe-area-inset-top))}.welcome{padding-top:max(64px,env(safe-area-inset-top))}}
.learning-mode #phone-vr-chrome{display:none!important}
@media(min-height:1050px){.welcome{align-items:center}}
@media(max-width:360px){[data-device-mode=phone] .welcome-card{padding:20px 18px}[data-device-mode=phone] .device-option strong{font-size:12px}[data-device-mode=phone] .map-station{grid-template-columns:85px 1fr}[data-device-mode=phone] .profile-button{max-width:100px;min-width:65px}}
@media(orientation:landscape) and (max-height:600px){
 [data-device-mode=phone] .bottom-bar{grid-template-columns:auto 1fr;align-items:end;gap:8px}
 [data-device-mode=phone] .footer-actions{grid-template-columns:repeat(5,minmax(0,1fr))}
 [data-device-mode=phone] .footer-actions button{font-size:11px;padding-inline:5px}
 [data-device-mode=phone] .music-control{min-height:44px}
 [data-device-mode=phone] .music-control input{width:45px}
 [data-device-mode=phone] .touch-controls{bottom:calc(70px + env(safe-area-inset-bottom))}
 [data-device-mode=phone] .interact-wrap{bottom:calc(92px + env(safe-area-inset-bottom))}
 [data-device-mode=phone] .destination-card{top:84px;max-width:310px}
 [data-device-mode=phone] .destination-card small{display:none}
}
