html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none;background:#292139}
.welcome,#game{position:fixed;left:var(--play-left,0px);top:var(--play-top,0px);width:var(--play-width,100vw);height:var(--play-height,var(--viewport-height,100vh));min-height:0}
.welcome{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.welcome-copy{max-height:calc(var(--play-height,var(--viewport-height,100vh)) - 34px)}
.welcome-student{height:calc(var(--play-height,var(--viewport-height,100vh)) * .8)}
#game{overflow:hidden;background:#f6f2f8}.game-layout{height:calc(var(--play-height,var(--viewport-height,100vh)) - 88px)}
.sidebar{overflow:hidden}.sidebar .mentor-card{padding:12px;margin-top:12px}.sidebar .quest-card{padding:18px}.sidebar .quest-steps{gap:11px;margin:16px 0}.sidebar .muted{margin-bottom:13px}.sidebar .demo-note{margin:10px 0}
dialog,#profiles-panel,#offline-panel{overflow:hidden;overscroll-behavior:none;padding:18px 22px;max-height:calc(var(--viewport-height,100vh) - 16px)}.screen-content{width:100%;position:relative}.panel-header{margin-bottom:12px;padding-bottom:10px}.screen-content .caption{line-height:1.6}
.screen-pager{display:flex;justify-content:center;align-items:center;gap:18px;margin:10px 0;color:#8d769f;font-size:12px;min-height:42px}.screen-pager button{border:1px solid #ddcde7;border-radius:12px;background:#f3edf7;color:#775990;min-width:48px;min-height:42px;font-size:22px}.screen-pager button:disabled{opacity:.35}
.parent-lessons,.faq-buttons{max-height:none;overflow:visible}.parent-lessons .record-row{padding:11px 8px}.lesson-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.lesson-card{min-height:88px;padding:12px}.course-banner{min-height:115px;padding:18px 22px}.course-banner>img{height:110px}.course-banner h3{font-size:26px}.course-tabs{margin:12px 0}.fact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fact-card{padding:18px}.fact-card p{font-size:14px;line-height:1.8}.fact-card .button-row{flex-wrap:wrap;gap:6px}.fact-card .text-button{font-size:12px}.faq-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#panel.panel-story{width:min(1100px,96vw)}#panelbody.body-story{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(240px,1fr);gap:10px 15px;align-items:start}#panelbody.body-story>.story-stage{grid-column:1;grid-row:1/span 4;height:clamp(220px,calc(var(--viewport-height,100vh) - 170px),390px)}#panelbody.body-story>.story-say{grid-column:2;grid-row:1;margin:0}#panelbody.body-story>.voice-controls{grid-column:2;grid-row:2;margin:0}#panelbody.body-story>.story-message{grid-column:2;grid-row:3;margin:0}#panelbody.body-story>.button-row{grid-column:2;grid-row:4;margin:0;flex-wrap:wrap}#panelbody.body-story>.caption{grid-column:1/-1;margin:0}
#panel.panel-video{width:min(1060px,96vw)}#panelbody.body-video{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:12px}#panelbody.body-video>video{grid-column:1;grid-row:1/span 2;max-height:calc(var(--viewport-height,100vh) - 150px);margin:0;width:100%;object-fit:contain}#panelbody.body-video>.story-say{grid-column:2;grid-row:1;margin:0}#panelbody.body-video>.button-row{grid-column:2;grid-row:2;display:grid;gap:8px;margin:0}#panelbody.body-video>.caption{grid-column:1/-1;margin:0}
#profiles-panel{width:min(920px,96vw)}#profiles-panel .screen-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 20px}#profiles-panel .panel-header,#profiles-panel .profiles-intro,#profiles-panel .caption{grid-column:1/-1;margin:0}.profile-list{grid-column:1;grid-row:3}.profile-form{grid-column:2;grid-row:3/span 2}#profile-form{margin:0}#profiles-panel .screen-pager{grid-column:1;grid-row:4;margin:0}.profiles-intro{padding-bottom:7px}#profiles-panel .caption{padding-top:8px;font-size:11px}
@media(orientation:landscape) and (max-height:730px) and (min-width:900px){.game-layout{padding:8px 16px;gap:16px;grid-template-columns:190px minmax(0,1fr)}.sidebar .day-label,.sidebar>.muted,.sidebar .mentor-card p,.sidebar .demo-note{display:none}.sidebar h2{font-size:17px;margin-bottom:12px}.sidebar .quest-card{padding:14px}.sidebar .quest-symbol{margin:9px 0;font-size:24px}.sidebar .quest-card p{font-size:10px}.sidebar .quest-steps{margin:12px 0;gap:8px}.sidebar .mentor-card{margin-top:8px;padding:9px}.world-header{min-height:35px;height:35px;margin-bottom:8px}.world-header .eyebrow{display:none}.world-header h2{font-size:19px;margin:0}.bottom-nav{margin-top:7px}}
@media(orientation:landscape) and (max-height:600px){.game-layout{height:calc(var(--play-height,var(--viewport-height,100vh)) - 48px)}dialog,#profiles-panel,#offline-panel{padding:10px 14px}.panel-header{margin-bottom:8px;padding-bottom:6px}.panel-header h2{font-size:17px!important}.panel-header .eyebrow{font-size:8px}.panel-intro{font-size:11px;line-height:1.5;margin:5px 0}.course-banner{display:none}.course-tabs{margin:5px 0;gap:6px}.course-tabs button{min-height:34px;padding:6px 12px}.lesson-card{min-height:65px;padding:6px 10px}.lesson-card-copy b{font-size:12px}.lesson-card-copy>span,.lesson-card-copy small{font-size:9px}.lesson-icon{width:37px;height:37px;font-size:23px}.screen-pager{margin:5px 0;min-height:34px}.screen-pager button{min-height:34px;min-width:44px;font-size:19px}.screen-pager span{font-size:10px}.button-row{margin-top:6px;gap:6px}.screen-content .primary,.screen-content .secondary{padding:7px 10px;min-height:36px;font-size:11px}.screen-content .caption{font-size:9px;margin-top:5px;line-height:1.5}.fact-grid{grid-template-columns:1fr}.fact-card{padding:10px 15px;display:grid;grid-template-columns:45px minmax(0,1fr);gap:5px 12px}.fact-card .fact-icon{grid-column:1;grid-row:1/span 3;margin:0;font-size:35px}.fact-card>small,.fact-card>h3,.fact-card>p,.fact-card>.button-row{grid-column:2;margin:0}.fact-card h3{font-size:17px}.fact-card p{font-size:12px;line-height:1.5}.fact-card .text-button{min-height:32px;padding:3px 0}.parent-lessons .record-row{padding:5px;font-size:11px}.parent-lessons .record-row small{font-size:9px}.dialogue{font-size:11px;padding:9px;line-height:1.6}.story-say p{font-size:12px;line-height:1.6}.story-say>img{height:44px;width:30px}.story-say{padding:7px 10px}.voice-controls{padding:5px;margin:5px 0;gap:5px}.voice-controls .secondary{min-height:34px;font-size:10px}.voice-controls .voice-status{font-size:9px;line-height:1.4}.story-message{font-size:12px;padding:8px;min-height:0}.lesson-layout{gap:12px;grid-template-columns:minmax(0,1.2fr) minmax(190px,1fr)}.lesson-guide .voice-controls button{min-height:34px}.lesson-guide .button-row button{min-height:34px}.lesson-guide .lesson-links{gap:5px}.lesson-guide .lesson-links button{min-height:30px;font-size:9px}.course-stage svg{max-height:clamp(90px,calc(var(--viewport-height,100vh) - 160px),170px)}.lesson-scene{padding:7px}.course-controls .tool-tray button,.course-controls .drop-zones>button{min-height:34px;padding:4px}.course-controls .cloud-buttons button{min-height:34px}.drop-zones{padding:4px 0}.course-controls .caption{display:none}.course-controls input[type=range]{height:34px}.course-controls #course-record{min-height:34px}.lesson-guide .story-message{min-height:0;font-size:11px}.completion-star{font-size:40px;margin:0}.course-completion h3{font-size:19px}.course-completion>p{font-size:12px;margin:8px 0;line-height:1.6}.course-gifts{margin:8px auto;padding:8px}.course-completion .button-row{margin-top:7px}.badge{padding:13px 8px}.badge span{font-size:32px}.badge b{font-size:12px}
 #panelbody.body-question{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px}#panelbody.body-question>.story-say{grid-column:1;grid-row:1;margin:0}#panelbody.body-question>.voice-controls{grid-column:1;grid-row:2;margin:0}#panelbody.body-question>.faq-buttons{grid-column:1;grid-row:3}#panelbody.body-question>.screen-pager{grid-column:1;grid-row:4;margin:0}#course-question{grid-column:2;grid-row:1/span 2}#course-question label{margin:0 0 7px}#course-question input{padding:7px;font-size:12px}#course-answer{grid-column:2;grid-row:3/span 2;padding:10px;font-size:12px;line-height:1.65;min-height:0}.faq-buttons button{font-size:10px;min-height:34px;padding:5px 8px}
 #panelbody.body-story>.story-stage{height:clamp(170px,calc(var(--viewport-height,100vh) - 115px),330px)}#panelbody.body-story{grid-template-columns:minmax(0,1.15fr) minmax(210px,1fr)}#panelbody.body-story>.story-message{font-size:11px}#panelbody.body-video>video{max-height:calc(var(--viewport-height,100vh) - 108px)}.story-party{height:145px;margin:7px 0}.story-party>img{height:140px}.result h3{font-size:20px}.result p{font-size:12px;line-height:1.5}
 #profiles-panel .screen-content{gap:6px 14px}.profiles-intro{font-size:11px;padding:0}.profile-play{min-height:52px;padding:5px}.profile-symbol{width:37px;height:37px;font-size:22px}.profile-play b{font-size:14px}.profile-play small{font-size:10px}.profile-card{padding:5px}.profile-rename{min-height:30px;margin-left:54px;font-size:10px}#profile-form{padding:11px}#profile-form h3{font-size:13px;margin:0 0 7px}#profile-name{padding:7px;min-height:36px;font-size:16px}#profile-form label[for]{font-size:11px;margin-bottom:4px}#profile-form fieldset{margin:8px 0}#profile-form legend{font-size:10px;margin-bottom:4px}.profile-icons{gap:4px}.profile-icons label{font-size:17px;padding:4px}#profile-message{font-size:10px;min-height:0;margin:4px 0}#profiles-panel .caption{font-size:9px;padding-top:4px}#offline-panel p,#offline-panel li{font-size:12px;line-height:1.55}#offline-panel ol{margin:7px 0}
}
@media(orientation:portrait){body>*:not(.rotate-hint){visibility:hidden}dialog::backdrop{visibility:hidden}.rotate-hint{visibility:visible;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;position:fixed;inset:0;transform:none;width:100%;height:var(--viewport-height,100vh);border:0;border-radius:0;background:#f3eef8 url('assets/entrance-academy-v1.png') center/cover;color:#49365f;font-size:19px;font-weight:600;white-space:normal;text-align:center;padding:30px;z-index:2147483647;pointer-events:auto}.rotate-hint::before{content:'↻';font-size:80px;background:#fffdf5ed;border-radius:28px;padding:20px 32px;box-shadow:0 10px 50px #4c336f20}.rotate-hint::after{content:'横屏继续你的冒险，记录会保留';font-size:13px;font-weight:400}}

