/* =========================================================================
 * school.css — 학교 화면 (포스터 「창플 포스터 + 화면 수정」 디자인)
 *
 *  - 대화 · 문제 · 친구 완성: 포스터(1190×1684)의 절반 크기 무대(595×842) 좌표 그대로, zoom(--su)으로 확대
 *  - 교실: 교실 그림 너비(512) 좌표, zoom(--ru)  · 복도: 화면 높이에 맞춘 문 그림(--ch = 화면 높이 / 768)
 *  - 그림은 모두 포스터에서 뽑은 도트 그림(assets/school). 픽셀이 뭉개지지 않게 pixelated로 그려요.
 *  - 글꼴: 대사 · 문제 글 Galmuri(도트) / 버튼 · 숫자 DNF Bit Bit v2
 * ========================================================================= */
:root {
  --s-ink: #222;
  --s-btn-ink: #57667a;
  --s-line: #7eabcd;
  --s-sky: #e6f4fb;
  --s-text: 'Galmuri11', 'Apple SD Gothic Neo', sans-serif;
  --s-bold: 'DNFBitBitv2', 'Galmuri14', 'Apple SD Gothic Neo', sans-serif;
}
#app.school { max-width: none; background: transparent; min-height: 100dvh; padding: 0; }
.school img { image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }
:where(.school) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- 배경 · 무대 ---------- */
.s-bg { position: fixed; inset: 0; z-index: 0; background-position: center; background-size: cover; image-rendering: pixelated; }
.bg-class, .bg-classroom { background-image: url('../assets/school/bg/classroom.jpg'); background-color: #d9c39b; image-rendering: auto; }
.bg-playground { background-image: url('../assets/school/bg/playground.jpg'); background-color: #e6c88f; image-rendering: auto; }
.bg-library { background-image: url('../assets/school/bg/library.jpg'); background-color: #d8c3a0; image-rendering: auto; }
.bg-school { background-image: url('../assets/school/bg/school.jpg'); background-color: #9fd3f0; image-rendering: auto; }
.bg-check { background-image: url('../assets/school/bg-gingham.jpg'); background-color: #e4f1fb; image-rendering: auto; }
.sst-wrap { position: relative; z-index: 1; min-height: 100dvh; display: flex; justify-content: center; align-items: center; }
.sst { position: relative; width: 595px; height: 842px; zoom: var(--su); flex: 0 0 auto; }
.sst > * { position: absolute; }

/* ---------- 공통 버튼 ---------- */
.s-round { width: 52px; height: 52px; background: url('../assets/school/btn-round.png') center / 100% 100% no-repeat; display: grid; place-items: center; image-rendering: pixelated; }
.s-round:active, .s-rest:active, .s-chip:active, .s-submit:active, .s-bar:active { transform: translateY(2px); }
.s-round-ico { width: 46%; margin-left: -6%; }
.s-round-ico.flip { transform: scaleX(-1); margin-left: 6%; }
.s-round-txt { font-family: var(--s-bold); font-size: 24px; color: #3f3f3f; line-height: 1; }
.sst > .s-round { left: 37px; top: 33px; z-index: 5; }
.s-rest { left: 342px; top: 33px; width: 217px; height: 53px; z-index: 5; background: url('../assets/school/pill.png') center / 100% 100% no-repeat; font-family: var(--s-bold); font-size: 19px; color: var(--s-btn-ink); letter-spacing: -.5px; }
.s-chip { width: 80px; height: 58px; background: url('../assets/school/btn-chip.png') center / 100% 100% no-repeat; font-family: var(--s-bold); font-size: 18px; color: var(--s-btn-ink); }
.s-chip.on { filter: brightness(.94) saturate(1.3); }
.s-chip:disabled { opacity: .5; }
.s-submit { display: block; width: 396px; height: 50px; background: url('../assets/school/btn-submit.png') center / 100% 100% no-repeat; font-family: var(--s-bold); font-size: 19px; color: var(--s-btn-ink); image-rendering: pixelated; }
.s-submit:disabled { opacity: .55; cursor: default; }
.s-bar { display: block; width: 100%; min-height: 56px; background: url('../assets/school/btn-submit.png') center / 100% 100% no-repeat; font-family: var(--s-bold); font-size: 19px; color: var(--s-btn-ink); }
.s-bar.ghost { opacity: .8; }
.school .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =========================== 복도 (홈) =========================== */
.cor { position: fixed; inset: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; background: #ece3d3; scrollbar-width: none; }
.cor::-webkit-scrollbar { display: none; }
.cor-strip { display: flex; height: 100dvh; width: max-content; }
.cor-tile { position: relative; height: 100%; aspect-ratio: 415 / 768; flex: 0 0 auto; background: url('../assets/school/corridor-tile.png') 0 0 / auto 100% no-repeat; image-rendering: pixelated; scroll-snap-align: start; }
.cor-tile.end { aspect-ratio: auto; width: calc(var(--ch) * 22px); }
.cor-door { position: absolute; left: 4.8%; top: 6.5%; width: 54.2%; height: 63.8%; border-radius: 2px; }
.cor-door:hover, .cor-door:focus-visible { background: rgba(255, 245, 200, .18); outline: 3px dashed rgba(120, 80, 30, .5); outline-offset: -6px; }
.cor-door:active { background: rgba(255, 245, 200, .3); }
.cor-sign { position: absolute; left: 64.3%; top: 25.1%; width: 23.4%; height: 5.6%; display: grid; place-items: center; }
.cor-sign span { font-family: var(--s-bold); font-size: calc(var(--ch) * 15px); color: #3b2f2f; letter-spacing: 1px; }
.cor-arrow { position: absolute; left: 70.4%; top: 15%; width: 11%; aspect-ratio: 45 / 62; pointer-events: none; animation: s-bob 1s ease-in-out infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 15 20' shape-rendering='crispEdges'%3E%3Cpath d='M4 0h7v1h1v8h3v1h0v2h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-2h0v-1h3v-8h1z' fill='%234a2b22'/%3E%3Cpath d='M5 1h5v9h3v1h-1v1h-1v1h-1v1h-1v1h-1v1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h-1v-1h3z' fill='%23d6413a'/%3E%3Cpath d='M9 1h1v9h3v1h-1v1h-1v1h-1v1h-1v1h-1v-1h1v-1h1v-1h1v-1h-1z' fill='%23a82b2a'/%3E%3C/svg%3E") center / contain no-repeat; }
.cor-due { position: absolute; left: 44%; top: 1%; width: 15%; animation: s-bob 1.2s ease-in-out infinite; pointer-events: none; }
.cor-due img { width: 100%; }
.s-top-right { position: fixed; top: 16px; right: 16px; display: flex; gap: 10px; z-index: 10; }
.s-top-right .s-round, .s-fixed-back .s-round, .s-cor-next { width: clamp(46px, 7vmin, 64px); height: clamp(46px, 7vmin, 64px); }
.s-cor-next { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 10; }
.s-cor-next:active { transform: translateY(calc(-50% + 2px)); }

/* =========================== 교실 =========================== */
.room-wrap { min-height: 100dvh; background: linear-gradient(#ece3d3 0 calc(var(--ru) * 215px), transparent 0), url('../assets/school/room-floor.png') 0 calc(var(--ru) * 299px) / calc(var(--ru) * 512px) calc(var(--ru) * 45px); background-color: #d9a85e; image-rendering: pixelated; }
.room { position: relative; width: 512px; margin: 0 auto; zoom: var(--ru); background: url('../assets/school/room-floor.png') 0 299px / 512px 45px repeat-y; }
.room-top { position: absolute; left: 0; top: 0; width: 512px; height: 299px; }
.seat { position: absolute; width: 140px; height: 146px; }
.seat-desk { position: absolute; left: 0; top: 0; width: 140px; }
.seat-locked .seat-desk { top: -4px; }
.seat-who { position: absolute; left: 20px; top: -68px; width: 100px; height: 100px; z-index: 2; }
.seat-sparkle, .seat-bubble { pointer-events: none; }
.seat-person { position: absolute; left: 0; bottom: 0; width: 100px; }
.seat-person.ghost.glow { filter: drop-shadow(0 0 5px #fff6a0) drop-shadow(0 0 10px #ffe680); animation: s-glow 1.6s ease-in-out infinite; }
.seat-person.ghost.dim { filter: grayscale(1) brightness(.9); opacity: .9; }
.seat-sparkle { position: absolute; left: -12px; top: -46px; width: 128px; animation: s-twinkle 1.4s steps(2) infinite; }
.seat-bubble { position: absolute; left: 66px; top: -62px; width: 66px; animation: s-bob 1s ease-in-out infinite; }
.seat-done .seat-person, .seat-review .seat-person { animation: s-breathe 3s ease-in-out infinite; transform-origin: 50% 100%; }
.seat:focus-visible { outline: 3px dashed #6b4a20; outline-offset: 4px; }
.seat:active .seat-desk { transform: translateY(2px); }
.seat-tag { position: absolute; left: 34px; top: 52px; z-index: 3; padding: 3px 10px; border: 2px solid var(--s-line); background: var(--s-sky); border-radius: 12px; font-family: var(--s-bold); font-size: 14px; color: var(--s-btn-ink); }
.seat.shake { animation: s-shake .4s; }
.room-say { position: absolute; z-index: 20; max-width: 220px; padding: 10px 14px; background: #fff; border: 3px solid #2b2b2b; border-radius: 14px; font-family: var(--s-text); font-size: 16px; line-height: 1.4; color: var(--s-ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); animation: s-pop .2s ease-out; }
.room-next { position: absolute; left: 106px; width: 300px; min-height: 58px; padding: 6px 20px; border-style: solid; border-width: 22px; border-image: url('../assets/school/pill.png') 140 fill / 22px stretch; font-family: var(--s-bold); font-size: 20px; color: var(--s-btn-ink); }
.room-next span { display: block; margin: -16px 0; }
.s-fixed-back { position: fixed; top: 16px; left: 16px; z-index: 10; }

/* 팝업 (재회 요청 · 쉬는 시간) */
.s-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 30, 50, .45); display: grid; place-items: center; padding: 16px; animation: s-fade .15s ease-out; }
.s-sheet { width: min(100%, 500px); display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 18px; border-style: solid; border-width: 30px; border-image: url('../assets/school/card-frame.png') 90 fill / 30px stretch; animation: s-pop .2s ease-out; }
.s-sheet-face { width: 110px; }
.s-sheet-bubble b { display: block; font-family: var(--s-bold); font-size: 18px; color: var(--s-btn-ink); margin-bottom: 6px; }
.s-sheet-bubble p { margin: 0; font-family: var(--s-text); font-size: 18px; line-height: 1.55; color: var(--s-ink); white-space: pre-line; }
.s-sheet-btns { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 4px; }

/* =========================== 대화 =========================== */
.talk-person { left: 0; top: 150px; width: 595px; height: 380px; pointer-events: none; transition: opacity .2s; }
.talk-person.away { opacity: 0; }
.talk-portrait.big { position: absolute; left: 214px; top: 48px; width: 336px; animation: s-in .25s ease-out; }
.talk-portrait.sprite { position: absolute; left: 128px; top: 40px; width: 350px; animation: s-in .25s ease-out; }
.talk-portrait.mood-happy { animation: s-hop .5s ease-out; }
.talk-portrait.mood-sad { filter: saturate(.75); transform: translateY(6px); }
.talk-portrait.mood-think { transform: rotate(-3deg); transform-origin: 50% 100%; }
.talk-box { left: 34px; top: 517px; width: 530px; height: 293px; background: url('../assets/school/dialog.png') center / 100% 100% no-repeat; cursor: pointer; }
.talk-name { position: absolute; left: 48px; top: 14px; width: 178px; height: 54px; display: grid; place-items: center; font-family: 'Galmuri14', var(--s-text); font-size: 20px; color: var(--s-ink); }
.talk-text { position: absolute; left: 76px; top: 98px; width: 392px; height: 170px; margin: 0; overflow-y: auto; font-family: var(--s-text); font-size: 21px; line-height: 38px; color: var(--s-ink); word-break: keep-all; }
.talk-box.narr .talk-text { color: #4b5b6e; }
.talk-arrow { position: absolute; right: 50px; bottom: 44px; width: 0; height: 0; border-left: 21px solid #2b2b2b; border-top: 19px solid transparent; border-bottom: 19px solid transparent; animation: s-nudge .9s steps(2) infinite; }
.talk-choices { left: 56px; width: 483px; bottom: 338px; display: flex; flex-direction: column; gap: 10px; z-index: 4; }
.talk-choice { min-height: 58px; padding: 0 18px; border-style: solid; border-width: 22px; border-image: url('../assets/school/pill.png') 140 fill / 22px stretch; font-family: var(--s-text); font-size: 18px; line-height: 1.4; color: #2c3a4c; text-align: center; word-break: keep-all; animation: s-pop .2s ease-out backwards; }
.talk-choice:nth-child(2) { animation-delay: .06s; } .talk-choice:nth-child(3) { animation-delay: .12s; }
.talk-choice:hover, .talk-choice:focus-visible { filter: brightness(.96) saturate(1.4); }
.talk-choice:active { transform: translateY(2px); }
.talk-card { left: 48px; top: 112px; width: 499px; min-height: 300px; padding: 18px 28px; border-style: solid; border-width: 34px; border-image: url('../assets/school/card-frame.png') 90 fill / 34px stretch; text-align: center; animation: s-pop .25s ease-out; }
.talk-card-ico { font-size: 56px; line-height: 1.1; }
.talk-card h2 { margin: 6px 0 10px; font-family: var(--s-bold); font-size: 28px; color: #3d5a80; }
.talk-card p { margin: 0; font-family: var(--s-text); font-size: 21px; line-height: 1.65; color: var(--s-ink); white-space: pre-line; word-break: keep-all; }

/* =========================== 문제 =========================== */
.sst.quiz { height: auto; min-height: 842px; padding: 123px 0 40px; }
.sst.quiz > .q-card, .sst.quiz > .q-tools, .sst.quiz > .q-work, .sst.quiz > .s-submit { position: relative; }
.q-dots { left: 0; right: 0; top: 96px; display: flex; justify-content: center; gap: 6px; }
.q-dots i { width: 12px; height: 12px; background: #fff; border: 2px solid var(--s-line); }
.q-dots i.done { background: #9fd0f0; } .q-dots i.now { background: #ffd966; }
.q-card { margin: 0 36px 0 37px; min-height: 257px; padding: 14px 18px 18px; border-style: solid; border-width: 34px; border-image: url('../assets/school/card-frame.png') 90 fill / 34px stretch; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.s-speaker { position: absolute; right: -50px; top: -48px; width: 53px; height: 53px; z-index: 3; }
.s-speaker img { width: 100%; }
.q-friend { position: absolute; left: -22px; bottom: -34px; width: 74px; z-index: 2; }
.q-body { padding-left: 34px; }
.q-body .visual { font-family: var(--s-text); font-size: 26px; line-height: 1.5; color: var(--s-ink); white-space: pre-line; margin: 0 0 6px; background: none; border: 0; padding: 0; }
.q-body .visual.equation { font-family: var(--s-bold); font-size: 50px; letter-spacing: 1px; color: #4a3328; display: flex; justify-content: center; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.q-body .visual.equation .eq-blank { display: inline-grid; place-items: center; width: 50px; height: 64px; border: 3px dashed #4a3328; font-size: 44px; line-height: 1; }
.q-body .pv-num { display: inline-flex; gap: 2px; }
.q-body .pv { padding-bottom: .5em; }
.q-body .pv::after { font-size: .36em; bottom: .02em; }
.q-body .question-text { margin: 4px 0 0; font-family: var(--s-text); font-size: 21px; line-height: 1.55; color: #111; word-break: keep-all; }
.q-body .steps { margin: 12px 0 0; padding: 10px 14px 10px 30px; text-align: left; background: rgba(255, 255, 255, .65); border: 2px dashed var(--s-line); border-radius: 10px; font-family: var(--s-text); font-size: 17px; line-height: 1.6; color: #2c3a4c; }
.q-body .steps .step-hidden { color: #8a98a8; }
.q-body .visual.pictures { font-size: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.q-body .visual.blocks { display: flex; justify-content: center; align-items: flex-end; gap: 8px; flex-wrap: nowrap; margin: 4px 0 2px; order: 2; }
.q-body:has(.visual.blocks) { display: flex; flex-direction: column; }
.q-body .pv-legend { order: 1; margin: 0 0 10px; font-family: var(--s-bold); font-size: 17px; gap: 4px 10px; }
.q-body .pv-legend .pv { font-family: var(--s-bold); font-size: 21px; }
.q-body .question-text, .q-body .steps { order: 3; }
.q-body .blk-op { font-family: var(--s-bold); font-size: 34px; color: #4a3328; align-self: center; margin-bottom: 28px; }
.q-body .blk-num { padding: 0; border: 0; background: none; gap: 4px; }
.q-body .blk-set { display: flex; align-items: flex-end; gap: 3px; }
.q-body .blk-group { display: flex; gap: 2px; align-items: flex-end; }
.q-body .blk-group.ones { flex-wrap: wrap; max-width: 60px; }
.q-body .blk-label { display: block; font-family: var(--s-bold); font-size: 20px; }
.q-body .blk { border: 2px solid #2b2b2b; }
.q-body .blk-100 { width: 54px; height: 54px; background: #5f9157 repeating-linear-gradient(90deg, transparent 0 4.4px, rgba(0, 0, 0, .55) 4.4px 5.4px), repeating-linear-gradient(0deg, transparent 0 4.4px, rgba(0, 0, 0, .55) 4.4px 5.4px); position: relative; }
.q-body .blk-100::after { font-size: 10px; right: 1px; top: -1px; }
.q-body .blk-10 { width: 9px; height: 54px; background: #c05a49 repeating-linear-gradient(0deg, transparent 0 4.4px, rgba(0, 0, 0, .45) 4.4px 5.4px); }
.q-body .blk-1 { width: 13px; height: 13px; border-radius: 50%; background: #4e6fd6; }
.q-say { position: relative; margin: 16px 0 0 40px; padding: 10px 14px; text-align: left; background: #fff; border: 3px solid #2b2b2b; border-radius: 12px; font-family: var(--s-text); font-size: 17px; line-height: 1.5; color: var(--s-ink); white-space: pre-line; animation: s-pop .2s ease-out; }
.q-say::before { content: ''; position: absolute; left: -14px; bottom: 10px; border-right: 14px solid #2b2b2b; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.q-say b { display: block; font-family: var(--s-bold); font-size: 15px; color: var(--s-btn-ink); }
.q-say.hint { background: #fff8d8; }
.q-say.why { background: #eaf3ff; }
.q-say.ok { background: #e9f8e6; }
.q-tools { margin: 14px 37px 0; display: flex; gap: 14px; min-height: 58px; }
.q-work { margin: 26px 37px 0; }
.ans { display: flex; justify-content: center; gap: 18px; }
.ans-card { position: relative; width: 160px; height: 190px; border-style: solid; border-width: 7px 7px 12px; display: grid; place-items: center; padding: 6px; transition: transform .12s; image-rendering: pixelated; }
.ans-card.c0 { border-image: url('../assets/school/card-0.png') 14 14 24 14 fill / 7px 7px 12px stretch; }
.ans-card.c1 { border-image: url('../assets/school/card-1.png') 14 14 24 14 fill / 7px 7px 12px stretch; }
.ans-card.c2 { border-image: url('../assets/school/card-2.png') 14 14 24 14 fill / 7px 7px 12px stretch; }
.ans-text { font-family: var(--s-bold); font-size: 46px; line-height: 1.15; color: #2d3038; word-break: keep-all; white-space: pre-line; }
.ans-text.sm { font-size: 30px; } .ans-text.xs { font-size: 20px; line-height: 1.35; font-family: 'Galmuri14', var(--s-text); }
.ans-card.on { transform: translateY(-10px); outline: 4px solid #4f86d8; outline-offset: 3px; border-radius: 8px; }
.ans-card.right { outline: 5px solid #4cae5b; outline-offset: 3px; border-radius: 8px; animation: s-hop .5s ease-out; }
.ans-card.tried, .ans-card.dim { opacity: .4; }
.ans-card:not(:disabled):hover { transform: translateY(-4px); }
.ans-card.on:hover { transform: translateY(-10px); }
.ans-mark { position: absolute; top: 4px; right: 8px; font-size: 22px; }
.ans.n4 { flex-wrap: wrap; } .ans.n4 .ans-card { width: 244px; height: 120px; }
.ans.long { flex-direction: column; gap: 12px; }
.ans.long .ans-card { width: 100%; height: auto; min-height: 76px; padding: 8px 18px; }
.ans.long .ans-text { font-size: 22px; font-family: 'Galmuri14', var(--s-text); }
.sst.quiz > .s-submit { margin: 30px auto 0; }
.q-pencil { padding: 12px; background: rgba(255, 255, 255, .75); border: 3px solid var(--s-line); border-radius: 14px; }
.sst.quiz .numpad { background: rgba(255, 255, 255, .75); border-radius: 14px; padding: 10px; }

/* =========================== 친구 완성 =========================== */
.sst.made { overflow: hidden; }
.made-rays { left: 50%; top: 330px; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; background: repeating-conic-gradient(rgba(255, 245, 190, .55) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: s-spin 14s linear infinite; mask: radial-gradient(circle, #000 25%, transparent 62%); -webkit-mask: radial-gradient(circle, #000 25%, transparent 62%); }
.made-face.big { left: 144px; top: 110px; width: 307px; animation: s-zoom .6s cubic-bezier(.2, 1.6, .4, 1); }
.made-face.sprite { left: 147px; top: 110px; width: 300px; animation: s-zoom .6s cubic-bezier(.2, 1.6, .4, 1); }
.made-sparkle { left: 92px; top: 70px; width: 410px; animation: s-twinkle 1.2s steps(2) infinite; }
.made-title { left: 0; right: 0; top: 440px; margin: 0; text-align: center; font-family: var(--s-bold); font-weight: 400; font-size: 44px; line-height: 1.25; color: #fff; -webkit-text-stroke: 7px #4b6fa8; paint-order: stroke fill; animation: s-pop .5s .3s ease-out backwards; }
.made-title span { display: block; }
.made-sub { left: 60px; right: 60px; top: 580px; margin: 0; padding: 14px 18px; text-align: center; font-family: var(--s-text); font-size: 19px; line-height: 1.6; color: var(--s-ink); background: rgba(230, 244, 251, .92); border: 3px solid var(--s-line); border-radius: 14px; }
.made-sub small { font-size: 15px; color: var(--s-btn-ink); }
.made-btn { left: 99px; top: 720px; }

/* =========================== 움직임 =========================== */
@keyframes s-bob { 50% { transform: translateY(-8%); } }
@keyframes s-glow { 50% { filter: drop-shadow(0 0 2px #fff6a0) drop-shadow(0 0 4px #ffe680); opacity: .85; } }
@keyframes s-twinkle { 50% { opacity: .35; transform: scale(.96); } }
@keyframes s-breathe { 50% { transform: translateY(-2px) scaleY(1.01); } }
@keyframes s-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes s-pop { from { transform: scale(.9); opacity: 0; } }
@keyframes s-fade { from { opacity: 0; } }
@keyframes s-in { from { transform: translateY(14px); opacity: 0; } }
@keyframes s-hop { 30% { transform: translateY(-14px); } 60% { transform: translateY(0); } 80% { transform: translateY(-4px); } }
@keyframes s-nudge { 50% { transform: translateX(5px); } }
@keyframes s-spin { to { transform: rotate(360deg); } }
@keyframes s-zoom { from { transform: scale(.3); opacity: 0; } }
body[data-anim='off'] .school *, body[data-anim='off'] .school *::before { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .school *, .school *::before { animation: none !important; } }

/* 지도자 리포트: 개념별 숙달도 표 · 학습 수준 고르기 */
.rp-table-wrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rp-table th, .rp-table td { padding: 7px 6px; border-bottom: 1px solid #e5dccb; text-align: center; vertical-align: middle; }
.rp-table td:first-child, .rp-table th:first-child { text-align: left; }
.rp-table td.good { color: #2e8b4e; font-weight: 700; } .rp-table td.soft { color: #b06a2a; }
.conf { display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 12px; background: #eee; }
.conf-HIGH { background: #dff3e4; color: #2e7d46; } .conf-MEDIUM { background: #fff1cf; color: #96690f; } .conf-LOW { background: #fde3dd; color: #a8442f; }
.lv-select { font: inherit; font-size: 15px; padding: 6px 8px; border: 2px solid #d9c89a; border-radius: 8px; background: #fff; max-width: 9.5em; }

/* =========================== 2차 수정 =========================== */
/* 대화: 친구 몸이 대화 상자 위에 붕 떠 보이지 않게 아래로 내려 상자 뒤에 걸치게 해요. */
.talk-portrait.big { top: 92px; }
.talk-portrait.sprite { top: 84px; }

/* 교실: 반짝임은 밝게 ↔ 흐리게 두 단계만 (필터를 계속 다시 그리지 않아 버벅이지 않아요) */
.seat-person.ghost.glow { filter: drop-shadow(0 0 6px #fff3a0); animation: s-blink2 1.2s steps(1, end) infinite; will-change: opacity; }
.seat-sparkle { animation: s-blink2 1.2s steps(1, end) infinite; will-change: opacity; }
.made-sparkle { animation: s-blink2 1s steps(1, end) infinite; }
@keyframes s-blink2 { 0% { opacity: 1; } 50% { opacity: .45; } }

/* 교실: "이어서" 표시 — 머리 위 말풍선처럼, 눈에 잘 띄게 */
.seat-tag { left: 50%; top: -112px; transform: translateX(-50%); padding: 6px 14px 7px; border: 3px solid #2b2b2b; border-radius: 14px; background: #fff3b0; font-size: 17px; color: #3b2f2f; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); animation: s-bob 1.2s ease-in-out infinite; }
.seat-tag::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -8px; border-top: 10px solid #2b2b2b; border-left: 8px solid transparent; border-right: 8px solid transparent; }
.seat-tag span { color: #d6413a; font-size: 13px; }

/* 개념 카드: 설명이 길어져도 다 보이게 */
.talk-card { max-height: 400px; overflow-y: auto; }
.talk-card p { font-size: 19px; line-height: 1.6; text-align: left; display: inline-block; }

/* 문제: 숫자 · 블록 · 듣기 단추 */
.q-reps { display: flex; gap: 8px; padding-right: 8px; margin-right: 6px; border-right: 3px dotted var(--s-line); }
.q-reps .s-chip.on { filter: none; background-image: none; background: #fff3b0; border: 3px solid #2b2b2b; border-radius: 10px; color: #3b2f2f; }

/* 모양 이름 색: 상자 모양 빨강 · 공 모양 노랑 · 둥근 기둥 모양 파랑 (보기 · 힌트 · 단계 모두 같아요) */
.shape-word { padding: 0 4px; border-radius: 4px; font-weight: 700; white-space: nowrap; }
.shape-word.shape-box { color: #b3261e; background: #ffe1dc; }
.shape-word.shape-ball { color: #8a5a00; background: #fff1a8; }
.shape-word.shape-cyl { color: #1d4f9c; background: #dbe9ff; }
.ans-card.shape { border: 5px solid #2b2b2b; border-radius: 12px; border-image: none; }
.ans-card.shape-box { background: #ffd2cb; }
.ans-card.shape-ball { background: #fff0a0; }
.ans-card.shape-cyl { background: #cfe2ff; }
.ans-card.shape .shape-word { background: none; padding: 0; }

/* 문제 글 아래 낱말 풀이 */
.word-gloss { margin: 8px 0 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.word-gloss span { font-family: var(--s-text); font-size: 13px; color: #5b6b80; }

/* =========================== 방과후교실 =========================== */
.af-wrap { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 84px 16px 32px; background: #ece3d3; }
.af-head { text-align: center; margin-bottom: 14px; }
.af-head h1 { margin: 0; font-family: var(--s-bold); font-weight: 400; font-size: 32px; color: #fff; -webkit-text-stroke: 6px #8a5a2b; paint-order: stroke fill; }
.af-head p { margin: 6px 0 0; font-family: var(--s-text); font-size: 16px; color: #5b4630; }
.af-floor { position: relative; flex: 0 0 auto; zoom: min(1, calc((100vw - 32px) / 448px)); background: url('../assets/school/room-floor.png') 0 0 / 448px 45px repeat; background-color: #d9a85e; border: 6px solid #6b4a20; border-radius: 6px; image-rendering: pixelated; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.af-floor::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(0, 0, 0, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .06) 1px, transparent 1px); background-size: 64px 64px; pointer-events: none; }
.af-kid { position: absolute; width: 64px; height: 64px; transition: left .9s steps(4, end), top .9s steps(4, end); z-index: 2; }
.af-sprite { position: absolute; left: -8px; bottom: 10px; width: 80px; }
.af-kid[data-dir='left'] .af-sprite { transform: scaleX(-1); }
.af-name { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 1px 7px; background: rgba(255, 255, 255, .9); border: 2px solid #2b2b2b; border-radius: 8px; font-family: var(--s-text); font-size: 12px; color: #2b2b2b; white-space: nowrap; }
.af-kid:active .af-sprite { transform: translateY(-4px); }
.af-kid:focus-visible { outline: 3px dashed #6b4a20; outline-offset: 2px; }
.af-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; font-family: var(--s-text); color: #3b2f2f; }
.af-empty b { font-family: var(--s-bold); font-size: 22px; }
.af-empty p { white-space: pre-line; font-size: 16px; line-height: 1.6; }
.af-unit { display: block; margin-top: 6px; font-family: var(--s-text); font-size: 13px; color: var(--s-btn-ink); }
.cor-sign.after span { color: #8a3b2b; }
/* 개념 카드: 길어진 설명이 대화 상자와 겹치지 않게 (넘치면 카드 안에서 스크롤) */
.talk-card { top: 96px; box-sizing: border-box; max-height: 424px; padding: 10px 22px 14px; }
.talk-card-ico { font-size: 38px; }
.talk-card h2 { margin: 2px 0 8px; font-size: 25px; }
.talk-card p { font-size: 17px; line-height: 1.55; }

/* =========================== 3차 수정 =========================== */
/* 친구 그림: 새 픽셀 그림은 잘게 그려져 있어서 부드럽게 줄여요. */
.school img.talk-portrait, .school img.seat-person:not(.ghost), .school img.s-sheet-face, .school img.q-friend, .school img.af-sprite, .school img.made-face { image-rendering: auto; }
.talk-portrait.big { left: 196px; top: 70px; width: 372px; }
.talk-portrait.big.mood-sad { filter: saturate(.8) brightness(.97); }

/* 대화 상자: 앞 대사로 돌아가기 (◀, 왼쪽 아래) */
.talk-prev { position: absolute; left: 34px; bottom: 30px; width: 56px; height: 56px; display: grid; place-items: center; z-index: 2; }
.talk-prev::before { content: ''; width: 0; height: 0; border-right: 21px solid #2b2b2b; border-top: 19px solid transparent; border-bottom: 19px solid transparent; opacity: .75; }
.talk-prev:hover::before, .talk-prev:focus-visible::before { opacity: 1; }
.talk-prev:active { transform: translateX(-3px); }

/* 개념 카드 듣기 단추 (카드 오른쪽 위) */
.card-speaker { left: 500px; top: 70px; right: auto; z-index: 5; }

/* 교실 자리: 새 친구 그림 (책상 뒤에 앉아 있게) */
.seat-person:not(.ghost) { left: -4px; bottom: 2px; width: 108px; }

/* 교실: "이어서" — 복습 느낌표처럼 통통 튀며 눈에 띄게 */
.seat-tag { animation: s-tag-bob .8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes s-tag-bob {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  40% { transform: translate(-50%, -12px) scale(1.06); }
  60% { transform: translate(-50%, -12px) scale(1.06); }
}

/* 선택지가 나올 때: 친구 얼굴이 선택지에 가리지 않게 위로 올려요. */
.talk-person.choosing .talk-portrait.big { left: 168px; top: -66px; width: 300px; }

/* 방과후교실: 도서관 그림을 옅게 깔아요. */
.af-wrap { background: linear-gradient(rgba(236, 227, 211, .82), rgba(236, 227, 211, .9)), url('../assets/school/bg/library.jpg') center / cover no-repeat fixed; background-color: #ece3d3; }

/* =========================== 4차 수정 =========================== */
/* 생각하는 표정에서 친구가 왼쪽으로 기울던 것 없애기 */
.talk-portrait.mood-think { transform: none; }

/* 교실 빈자리: 사람은 그대로, 뒤의 반짝이만 부드럽게 반짝여요. */
.seat-person.ghost.glow { animation: none; filter: drop-shadow(0 0 5px #fff6a0) drop-shadow(0 0 9px #ffe680); }
.seat-sparkle { animation: s-sparkle 1.6s ease-in-out infinite; }
@keyframes s-sparkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.92); } }

/* "이어서": 움직임을 조금 작게 */
@keyframes s-tag-bob {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  40%, 60% { transform: translate(-50%, -5px) scale(1.02); }
}

/* 이야기 장소 배경 (전용 그림이 오기 전까지 비슷한 그림을 써요) */
.bg-gate { background-image: url('../assets/school/bg/school.jpg'); background-color: #9fd3f0; image-rendering: auto; }
.bg-stairs { background-image: url('../assets/school/bg/stairs.jpg?v=5'); background-color: #d9c8a8; image-rendering: auto; }
.bg-storage { background-image: url('../assets/school/bg/playground.jpg'); background-color: #c9a878; image-rendering: auto; }
.bg-videoroom { background-image: url('../assets/school/bg/classroom.jpg'); background-color: #b9a88c; image-rendering: auto; }
.bg-preproom { background-image: url('../assets/school/bg/classroom.jpg'); background-color: #d9c39b; image-rendering: auto; }
.bg-festival { background-image: url('../assets/school/bg/playground.jpg'); background-color: #e6c88f; image-rendering: auto; }

/* 미숙한 선택 뒤 도움말 */
.talk-box.tip .talk-text { color: #2f5d3a; }
.tip-ico { margin-right: 6px; }

/* =========================== 레벨 테스트: 안내도 조각 찾기 =========================== */
.hunt-bg-blur { filter: blur(6px) brightness(.9); transform: scale(1.05); image-rendering: auto; }
.sst.hunt { overflow: hidden; border-radius: 6px; }
.sst.hunt.fade-in { animation: s-fade .8s ease-out; }
.hunt-bg { left: 0; top: -26px; width: 595px; height: 893px; object-fit: cover; image-rendering: auto; pointer-events: none; }
.hunt-count { right: 24px; top: 26px; z-index: 4; padding: 8px 16px; border: 3px solid #2b2b2b; border-radius: 16px; background: #fff7dc; font-family: var(--s-bold); font-size: 20px; color: #3b2f2f; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.hunt-count b { color: #d6413a; font-size: 24px; }
.hunt-caption { left: 34px; top: 92px; width: 527px; min-height: 96px; z-index: 4; padding: 22px 64px 22px 28px; border: 4px solid #2b2b2b; border-radius: 18px; background: rgba(255, 252, 240, .97); box-shadow: 0 5px 0 rgba(0, 0, 0, .22); animation: s-in .25s ease-out; }
.hunt-caption p { margin: 0; font-family: var(--s-text); font-size: 23px; line-height: 1.55; color: var(--s-ink); word-break: keep-all; }
.hunt-caption.tap { cursor: pointer; }
.hunt-caption .talk-arrow { right: 26px; bottom: 22px; border-left-width: 16px; border-top-width: 14px; border-bottom-width: 14px; }
.hunt-btn { left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 6; min-width: 300px; animation: s-pop .25s ease-out backwards; }

/* 환영 안내문 (종이 팝업) */
.hunt-notice { left: 50px; top: 150px; width: 495px; z-index: 5; padding: 34px 34px 120px; border-radius: 6px; background: #fbf3dc; box-shadow: 0 10px 0 rgba(0, 0, 0, .18), 0 0 0 4px #c9a46a inset; clip-path: polygon(0 2%, 8% 0, 22% 1.5%, 37% 0, 55% 1.2%, 70% 0, 86% 1.5%, 100% 0, 99% 30%, 100% 62%, 99% 100%, 80% 98.5%, 62% 100%, 44% 98.6%, 26% 100%, 10% 98.4%, 0 100%, 1% 64%, 0 33%); }
.hunt-notice p { margin: 0 0 14px; font-family: var(--s-text); font-size: 23px; line-height: 1.5; color: #3b2f22; word-break: keep-all; text-align: center; animation: s-in .45s ease-out backwards; }
.hunt-notice p:first-child { font-family: var(--s-bold); font-size: 27px; color: #b4442f; }
.hunt-notice .hunt-btn { position: absolute; bottom: 34px; }
.hunt-start { animation: s-pop .3s ease-out backwards; }

/* 종이 조각: 찢어진 모양 + 빨간 테두리가 천천히 밝아졌다 흐려져요. 누르는 곳은 그림보다 넓게. */
.hunt-piece { z-index: 3; padding: 34px; margin: 0; transform: translate(-50%, -50%) rotate(var(--rot)); background: none; border: 0; cursor: pointer; }
.hunt-paper { display: block; background-color: #fbf1d8; clip-path: polygon(0 4%, 18% 0, 36% 3%, 55% 0, 78% 4%, 100% 1%, 96% 22%, 100% 45%, 97% 70%, 100% 96%, 76% 100%, 52% 96%, 30% 100%, 8% 97%, 3% 74%, 0 50%, 4% 26%); }
.hunt-piece.blink { animation: hunt-glow 1.8s ease-in-out infinite; }
.hunt-piece.blink:active { animation: none; }
@keyframes hunt-glow {
  0%, 100% { filter: drop-shadow(3px 0 0 rgba(229, 57, 53, 1)) drop-shadow(-3px 0 0 rgba(229, 57, 53, 1)) drop-shadow(0 3px 0 rgba(229, 57, 53, 1)) drop-shadow(0 -3px 0 rgba(229, 57, 53, 1)) drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
  50% { filter: drop-shadow(3px 0 0 rgba(229, 57, 53, .12)) drop-shadow(-3px 0 0 rgba(229, 57, 53, .12)) drop-shadow(0 3px 0 rgba(229, 57, 53, .12)) drop-shadow(0 -3px 0 rgba(229, 57, 53, .12)) drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); }
}
.hunt-zoom { left: 50%; top: 470px; z-index: 3; transform: translate(-50%, -50%); filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .3)); animation: hunt-zoom .45s ease-out; }
@keyframes hunt-zoom { from { left: var(--x); top: var(--y); transform: translate(-50%, -50%) rotate(var(--rot)) scale(.4); } }
.hunt-fly { left: 50%; top: 470px; z-index: 3; transform: translate(-50%, -50%); animation: hunt-fly 1.5s ease-in forwards; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .25)); }
@keyframes hunt-fly {
  0% { transform: translate(-50%, -50%) scale(.8); opacity: 0; }
  20%, 55% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { left: 500px; top: 50px; transform: translate(-50%, -50%) scale(.15); opacity: .2; }
}

/* 안내도 완성 */
.hunt-map-wrap { inset: 0; z-index: 7; background: rgba(20, 16, 10, .62); animation: s-fade .5s ease-out, hunt-out .9s ease-in 6.2s forwards; }
.hunt-map { position: absolute; left: 77px; top: 210px; width: 440px; height: 330px; box-shadow: 0 0 0 6px #c9a46a, 0 14px 0 rgba(0, 0, 0, .25); background: rgba(251, 241, 216, .25); }
.hunt-tile { position: absolute; animation: hunt-tile .7s cubic-bezier(.3, 1.3, .5, 1) backwards; }
@keyframes hunt-tile { from { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(.8); opacity: 0; } 30% { opacity: 1; } }
.hunt-final { position: absolute; left: 40px; right: 40px; top: 600px; margin: 0; padding: 20px; border: 4px solid #2b2b2b; border-radius: 18px; background: #fffaf0; font-family: var(--s-bold); font-size: 26px; text-align: center; color: #3b2f2f; animation: s-pop .4s ease-out 3.6s backwards; }
@keyframes hunt-out { to { opacity: 0; } }

/* 레벨 테스트 문제 화면: 친구 없이 */
.q-hunt-head { left: 50%; top: 80px; transform: translateX(-50%); white-space: nowrap; padding: 6px 16px; border: 3px solid #2b2b2b; border-radius: 14px; background: #fff7dc; font-family: var(--s-bold); font-size: 17px; color: #3b2f2f; }
.q-hunt-head b { color: #d6413a; }
.q-say.noname { margin-left: 0; text-align: center; } .q-say.noname::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hunt-piece.blink { animation-duration: 3s; }
}

/* =========================== 5차 수정 =========================== */
/* 책상에 앉은 친구: 작은 픽셀 그림은 또렷하게 */
.school img.px { image-rendering: pixelated; }
.seat-person.px { left: 22px; bottom: -6px; width: auto; height: 96px; animation: none; }
.seat-done .seat-person.px, .seat-review .seat-person.px { animation: s-breathe 3s ease-in-out infinite; }

/* 방과후교실: 새 그림, 친구들은 책상에 가만히 앉아 있어요. */
.af-wrap { display: block; min-height: 100dvh; padding: 0; background: #d9a85e; }
.af-room { position: relative; width: 1021px; margin: 0 auto; zoom: min(calc(100vw / 1021px), .56); background: url('../assets/school/after/room.jpg') 0 0 / 1021px auto no-repeat; overflow: hidden; }
.af-hint { position: absolute; left: 50%; top: 372px; transform: translateX(-50%); margin: 0; padding: 8px 26px; background: rgba(255, 255, 255, .88); border: 4px solid #6b4a20; border-radius: 22px; font-family: var(--s-text); font-size: 30px; color: #5b4630; white-space: nowrap; z-index: 1; }
.af-hint:empty { display: none; }
.af-seat { position: absolute; z-index: 2; }
.af-kid { position: absolute; top: 0; height: 295px; transform: translateX(-50%); display: flex; align-items: flex-end; }
.af-kid-img { height: 240px; width: auto; }
.af-kid-img:not(.px) { height: 200px; margin-bottom: 20px; }
.af-front { position: absolute; left: 0; top: 250px; width: 100%; }
.af-name { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); padding: 4px 18px; background: rgba(255, 255, 255, .92); border: 4px solid #2b2b2b; border-radius: 16px; font-family: var(--s-bold); font-size: 30px; color: #2b2b2b; white-space: nowrap; }
.af-seat:active .af-kid { transform: translate(-50%, -8px); }
.af-seat:focus-visible { outline: 6px dashed #6b4a20; outline-offset: 4px; }
.af-empty { inset: 560px 120px auto; background: rgba(255, 255, 255, .88); border-radius: 24px; }
.af-empty b { font-size: 44px; } .af-empty p { font-size: 32px; }

/* 홈(복도): 새 문 그림 한 장 (수학 · 국어 · 방과후). 화면 높이에 맞추고 옆으로 넘겨요. */
.cor-home { position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 1728 / 910; background: url('../assets/school/home.jpg') 0 0 / 100% 100% no-repeat; image-rendering: auto; }
.cor-home .cor-tile { position: absolute; top: 0; width: 33.333%; height: 100%; aspect-ratio: auto; background: none; }
.cor-home .t0 { left: 0; } .cor-home .t1 { left: 33.333%; } .cor-home .t2 { left: 66.667%; }
.cor-home .cor-door { top: 6.2%; height: 72.7%; width: 56%; }
.cor-home .t0 .cor-door { left: 10.4%; } .cor-home .t1 .cor-door { left: 11.8%; } .cor-home .t2 .cor-door { left: 14.2%; }
.cor-home .cor-sign { top: 27.5%; height: 6.5%; width: 22%; }
.cor-home .t0 .cor-sign { left: 68.7%; } .cor-home .t1 .cor-sign { left: 71%; } .cor-home .t2 .cor-sign { left: 72.9%; }
.cor-home .cor-arrow { top: 15%; width: 7%; }
.cor-home .t0 .cor-arrow { left: 76.2%; } .cor-home .t1 .cor-arrow { left: 78.5%; }
.cor-home .cor-due { top: 0; width: 13%; }
.cor-home .t0 .cor-due { left: 58%; } .cor-home .t1 .cor-due { left: 59.5%; }

/* "이어서": 픽셀 단추 그림 */
.seat-tag { top: -128px; width: 124px; height: 69px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: url('../assets/school/btn-continue.png') center / 100% 100% no-repeat; image-rendering: pixelated; }
.seat-tag::after { content: none; }

/* 문제 화면: 이야기 장소 배경 (글이 잘 보이게 옅은 막을 씌워요) */
.s-bg.q-scene { background-size: cover; background-position: center; image-rendering: auto; }
.s-bg.q-scene::after { content: ''; position: absolute; inset: 0; background: rgba(255, 252, 244, .38); }

/* 레벨 테스트 (5차): 조각 5개 · 디자인 맞춤 */
.hunt-count { display: flex; align-items: center; gap: 6px; border-radius: 22px; border-color: #3d5a80; background: #eef6ff; }
.hunt-count-ico { width: 30px; height: 26px; background: #f2dfb4; border: 2px solid #8a6a3a; clip-path: polygon(0 10%, 30% 0, 55% 8%, 100% 0, 94% 50%, 100% 100%, 60% 92%, 30% 100%, 0 92%, 6% 50%); }
.hunt-piece.idle { cursor: default; pointer-events: none; opacity: .95; }
.hunt-paper { box-shadow: inset 0 0 0 2px rgba(139, 100, 50, .35); }
.hunt-got { inset: 0; z-index: 5; background: rgba(30, 20, 5, .45); animation: s-fade .3s ease-out; }
.hunt-rays { position: absolute; left: 50%; top: 440px; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 160, .95) 0 14%, rgba(255, 214, 90, .55) 30%, transparent 62%), repeating-conic-gradient(rgba(255, 226, 120, .55) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 35%, transparent 68%); mask: radial-gradient(circle, #000 35%, transparent 68%); animation: hunt-spin 12s linear infinite; }
@keyframes hunt-spin { to { transform: rotate(360deg); } }
.hunt-got .hunt-fly { top: 440px; animation: hunt-pop .6s cubic-bezier(.3, 1.4, .5, 1); filter: drop-shadow(0 0 16px #ffe680) drop-shadow(0 8px 6px rgba(0, 0, 0, .3)); }
@keyframes hunt-pop { from { transform: translate(-50%, -50%) scale(.3) rotate(-14deg); opacity: 0; } }
.hunt-ribbon { position: absolute; left: 40px; right: 40px; top: 690px; margin: 0; padding: 18px 20px; border: 4px solid #7a5a2a; border-radius: 10px; background: linear-gradient(#fff6d6, #f6e2a8); box-shadow: 0 0 0 4px #e8c26a, 0 6px 0 rgba(0, 0, 0, .25); font-family: var(--s-bold); font-size: 25px; color: #3b2f22; text-align: center; animation: s-pop .35s ease-out .3s backwards; }
.hunt-got-tap { inset: 0; z-index: 6; background: none; }
.hunt-map-dim { inset: 0; z-index: 3; background: rgba(40, 28, 10, .5); animation: s-fade .4s ease-out; }
.step-map .hunt-tile { z-index: 4; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); }
.step-map .hunt-tile:nth-of-type(n) { animation-duration: .8s; }
.hunt-final-img { left: 0; top: -26px; width: 595px; height: 893px; object-fit: cover; z-index: 5; opacity: 0; animation: s-fade-in 1s ease-out 3.4s forwards; pointer-events: none; }
@keyframes s-fade-in { to { opacity: 1; } }
.hunt-final-tap { inset: 0; z-index: 6; background: none; pointer-events: none; animation: hunt-tap-on 0s linear 4.4s forwards; }
@keyframes hunt-tap-on { to { pointer-events: auto; } }
/* 폰에서는 문 하나와 팻말이 화면 너비에 다 들어오게 (위아래 남는 곳은 벽 · 바닥 색) */
.cor:has(.cor-home) { background: linear-gradient(#ded2ba 50%, #df9b4a 50%); }
.cor-strip:has(.cor-home) { height: min(100dvh, 158vw); margin-top: max(0px, calc((100dvh - 158vw) / 2)); }
.seat-person.px { left: 0; right: 0; margin: 0 auto; bottom: -10px; height: 118px; }
.af-hint { position: fixed; left: 50%; top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; padding: 8px 18px; border-width: 3px; border-radius: 18px; font-size: 16px; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.af-room { margin-bottom: 70px; }
/* 레벨 테스트: 교과서 문제 그대로 — 자릿값 색 · 점 같은 도움 표시는 빼요. */
.sst.quiz.is-test .q-body .pv { color: inherit; padding-bottom: 0; }
.sst.quiz.is-test .q-body .pv::after, .sst.quiz.is-test .q-body .pv-legend { display: none; }
.sst.quiz.is-test .pv-cell-1, .sst.quiz.is-test .pv-cell-10, .sst.quiz.is-test .pv-cell-100 { box-shadow: none; }
.hunt-got .hunt-fly { position: absolute; left: 50%; }

/* 시연 계정: 건너뛰기 단추 (오른쪽 아래) */
.demo-skip { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; padding: 10px 18px; border: 3px solid #2b2b2b; border-radius: 16px; background: #ffe36e; font-family: var(--s-bold); font-size: 18px; color: #3b2f2f; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.demo-skip:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.school img.px.soft { image-rendering: auto; }

/* 방과후교실: 교실 · 대화 무대와 같은 너비(--ru)로 맞춰요. */
.af-room { zoom: calc(var(--ru) * 512 / 1021); }
