@font-face{font-family:NeoDunggeunmo;src:url('../assets/fonts/NeoDunggeunmoPro-Regular.woff2') format('woff2');font-display:swap}
:root{--font-display:NeoDunggeunmo,Pretendard,"Noto Sans KR",system-ui,sans-serif;--font-reading:Pretendard,"Noto Sans KR",system-ui,sans-serif}
html,body{width:100%;height:100%;overflow:hidden}.page-head{display:none}main{width:100%;height:100%;padding:0;overflow:hidden}.device{width:100vw;height:100dvh;max-width:none;max-height:none;min-height:0;border:0;border-radius:0;box-shadow:none;aspect-ratio:auto}.tester{position:fixed;z-index:80;right:8px;top:8px;bottom:8px;max-height:none}.action-button{opacity:0;pointer-events:none;transform:scale(.9);transition:opacity .16s,transform .16s}.action-button.visible{opacity:1;pointer-events:auto;transform:scale(1)}
.external-scene{position:fixed;z-index:60;inset:0;background:#061827;padding:0}.external-scene.hidden{display:none}.external-scene iframe{display:block;width:100%;height:100%;border:0;background:#061827}
[data-scene="spatial"] .stage-pill,[data-scene="spatial"] .research-pill{font-family:var(--font-display)}
.growth-button,.settings-button{min-height:44px;padding:7px 12px;border:2px solid #7db2c5;border-radius:11px;background:#f7fbf4;color:#102b3b;font-family:var(--font-display);font-weight:900;pointer-events:auto}
.growth-modal{position:fixed;z-index:105;inset:0;display:grid;place-items:center;padding:16px;background:#00101dbb;font-family:var(--font-reading);color:#102b3b}.growth-modal.hidden{display:none}.growth-card{width:min(720px,100%);max-height:min(760px,92dvh);overflow:hidden;border:4px solid #6f9faf;border-radius:20px;background:#fffdf2;box-shadow:0 14px 0 #00172599}.growth-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px 10px}.growth-card header p{margin:0;color:#53717c;font-weight:800}.growth-card h2{margin:2px 0 0;font:400 32px var(--font-display)}.growth-card header button,.growth-card nav button{min-height:44px;border:2px solid #6f94a3;border-radius:10px;background:#f5fbfa;color:#102b3b;font-family:var(--font-display);font-weight:900}.growth-card nav{display:flex;gap:8px;padding:0 20px 12px}.growth-card nav button{flex:1}.growth-card nav button.active{border-color:#bd7815;background:#ffd16a}.growth-body{max-height:calc(92dvh - 150px);overflow:auto;padding:2px 20px 22px}.growth-summary{padding:14px;border:2px solid #b8d2d8;border-radius:14px;background:#eef7f3}.growth-summary h3,.growth-hall h3,.roadmap-item h3{margin:0 0 8px;font-size:20px}.growth-bar{height:18px;overflow:hidden;border:2px solid #6d929f;border-radius:999px;background:#dce8e9}.growth-bar i{display:block;height:100%;background:linear-gradient(90deg,#42baa4,#ffd05d)}.growth-halls,.roadmap-list{display:grid;gap:10px;margin-top:12px}.growth-hall,.roadmap-item{padding:12px;border:2px solid #bad0d6;border-radius:12px;background:#fff}.growth-hall p,.roadmap-item p{margin:5px 0;line-height:1.5}.growth-status{display:inline-block;padding:3px 8px;border-radius:999px;background:#e4eef0;font-weight:900}.growth-status.done{background:#d9f3e5;color:#176a49}.growth-status.current{background:#fff0b9;color:#835714}.roadmap-group-title{margin:18px 0 8px;font:400 24px var(--font-display)}
.profile-screen{position:fixed;z-index:120;inset:0;display:grid;place-items:center;overflow:auto;padding:18px;background:radial-gradient(circle at 50% 20%,#24627b,#061827 72%);font-family:var(--font-reading);color:#102b3b}.profile-screen.hidden{display:none}.profile-panel{width:min(920px,100%);padding:24px;border:4px solid #74a9ba;border-radius:22px;background:#fffdf2;box-shadow:0 14px 0 #00172599}.profile-kicker{margin:0;color:#376878;font-weight:900}.profile-panel h1{margin:5px 0 20px;font-family:var(--font-display);font-size:clamp(28px,5vw,46px)}.profile-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.profile-card{display:grid;grid-template-rows:1fr auto;min-height:180px;border:3px solid #7194a3;border-radius:16px;background:#f5fbfa;color:#102b3b;overflow:hidden}.profile-card-main{width:100%;padding:16px;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.profile-card strong{display:block;font-family:var(--font-display);font-size:24px}.profile-card span,.profile-card small{display:block;margin-top:10px;font-weight:800}.profile-card.empty{border-style:dashed;background:#eef6f5}.profile-tools{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:8px;border-top:2px solid #bdd2d8;background:#e8f2f1}.profile-tools button{min-height:44px;border:2px solid #7799a5;border-radius:9px;background:#fff;color:#143143;font:800 13px var(--font-reading)}.profile-tools .danger{border-color:#bd6666;color:#8a2525}.profile-notice{min-height:24px;margin:12px 0 0;font-weight:800}.profile-create{margin-top:18px;padding:16px;border:3px solid #7da1ae;border-radius:16px;background:#f1f8f5}.profile-create.hidden{display:none}.profile-create h2{margin:0 0 12px;font-family:var(--font-display)}.profile-create label{display:grid;gap:6px;font-weight:900}.profile-create input{min-height:46px;padding:9px 12px;border:2px solid #7696a3;border-radius:10px;font:700 18px var(--font-reading)}.profile-create>div,.profile-confirm footer{display:flex;justify-content:flex-end;gap:10px}.profile-create button,.profile-confirm button,.profile-button{min-height:44px;padding:8px 13px;border:2px solid #547b8c;border-radius:10px;background:#fff;color:#102b3b;font-family:var(--font-display);font-weight:900}.profile-create button.primary,.profile-confirm button.primary{background:#ffd16a;border-color:#bd7815}.profile-button{pointer-events:auto}.profile-confirm{position:fixed;z-index:110;inset:0;display:grid;place-items:center;padding:18px;background:#00101dbb}.profile-confirm.hidden{display:none}.profile-confirm>div{width:min(500px,100%);padding:22px;border:4px solid #668fa1;border-radius:18px;background:#fffdf2;color:#102b3b}.profile-confirm h2{font-family:var(--font-display)}
@media(max-width:700px){.profile-grid{grid-template-columns:1fr}.profile-card{min-height:118px}.profile-button,.growth-button,.settings-button{padding:6px 8px;font-size:12px}.growth-card h2{font-size:27px}.growth-body{padding-inline:12px}.growth-card>header,.growth-card nav{padding-inline:12px}}
@media(max-width:700px){.tester{left:6px;right:6px;top:auto;bottom:6px;max-height:72vh}.stage-pill,.research-pill{padding:6px 8px}.stage-pill{max-width:64%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}

/* v8: fixed header/tabs and one bounded scroll body. */
.growth-card{height:min(760px,92dvh);display:grid;grid-template-rows:auto auto minmax(0,1fr)}
.growth-body{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(28px,env(safe-area-inset-bottom))}

/* v8 diagnostics: separate from student progress and QA controls. */
.settings-modal{position:fixed;z-index:108;inset:0;display:grid;place-items:center;padding:16px;background:#00101dbb;color:#102b3b}.settings-modal.hidden{display:none}.settings-card{width:min(560px,100%);max-height:90dvh;overflow:auto;padding:20px;border:4px solid #6f9faf;border-radius:20px;background:#fffdf2;box-shadow:0 14px 0 #00172599}.settings-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.settings-card header p{margin:0;color:#53717c;font-weight:800}.settings-card h2{margin:2px 0 0;font:400 32px var(--font-display)}.settings-card header button,.settings-actions button{min-height:44px;padding:8px 12px;border:2px solid #6f94a3;border-radius:10px;background:#f5fbfa;color:#102b3b;font-family:var(--font-display);font-weight:900}.settings-help{line-height:1.6}.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.settings-actions .danger{grid-column:1/-1;border-color:#bd6666;color:#8a2525}.settings-notice{min-height:24px;margin:12px 0 0;font-weight:800}
@media(max-width:700px){.settings-actions{grid-template-columns:1fr}.settings-actions .danger{grid-column:auto}}
.scene-recovery{position:fixed;z-index:140;inset:0;display:grid;place-items:center;padding:16px;background:#00101dcc;color:#102b3b}.scene-recovery>div{width:min(520px,100%);padding:20px;border:4px solid #6f9faf;border-radius:20px;background:#fffdf2;box-shadow:0 14px 0 #00172599}.scene-recovery h2{margin:0 0 10px;font:400 30px var(--font-display)}.scene-recovery p{margin:0;line-height:1.6;font-family:var(--font-reading);font-weight:700}.scene-recovery footer{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.scene-recovery button{min-width:120px;min-height:44px;padding:8px 12px;border:2px solid #6f94a3;border-radius:10px;background:#f5fbfa;color:#102b3b;font-family:var(--font-display);font-weight:900}.scene-recovery button.primary{border-color:#bd7815;background:#ffd16a}
.growth-card,.profile-panel,.profile-confirm>div,.settings-card,.scene-recovery>div{word-break:keep-all;overflow-wrap:normal}
.growth-card button,.profile-panel button,.profile-confirm button,.settings-card button,.scene-recovery button{word-break:keep-all;overflow-wrap:normal}
.qa-viewport-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin:12px 0;padding:10px;border:2px solid #46657a;border-radius:10px}.qa-viewport-controls legend{padding:0 6px;font-weight:900}.qa-viewport-controls label{grid-column:1/-1;margin:0}.qa-viewport-controls button{min-height:42px;grid-column:1/-1;border:2px solid #d69b2c;border-radius:9px;background:#ffe18b;color:#1d3040;font-weight:900}.qa-viewport-preview{position:fixed;z-index:210;inset:0;display:grid;grid-template-rows:auto minmax(0,1fr);background:#020a11f2;color:#fff}.qa-viewport-preview.hidden{display:none}.qa-viewport-preview>header{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 12px;border-bottom:2px solid #52768b;background:#0d2738;font-family:var(--font-display)}.qa-viewport-preview>header strong{font-size:18px}.qa-viewport-preview>header span{flex:1;color:#b9d8e6;font:700 13px var(--font-reading)}.qa-viewport-preview>header button{min-width:72px;min-height:40px;border:2px solid #8ab9cc;border-radius:9px;background:#f7fbf4;color:#102b3b;font-weight:900}.qa-viewport-stage{display:grid;place-items:center;min-height:0;overflow:hidden;padding:8px}.qa-viewport-stage>div{position:relative;overflow:hidden;border:3px solid #88bbcb;border-radius:10px;background:#000;box-shadow:0 12px 36px #000}.qa-viewport-stage iframe{position:absolute;left:0;top:0;display:block;border:0;background:#061827;transform-origin:0 0}
.teacher-showcase-badge{position:fixed;z-index:120;top:8px;left:50%;transform:translateX(-50%);padding:6px 13px;border:2px solid #ffe49a;border-radius:999px;background:#09283eee;color:#fff4c8;font-size:clamp(11px,1.2vw,15px);font-weight:900;letter-spacing:.02em;box-shadow:0 3px 10px #0007;pointer-events:none;white-space:nowrap}
@media(max-width:560px){.teacher-showcase-badge{top:5px;padding:4px 10px;font-size:11px}}
