/* 외부 폰트·스크립트를 불러오지 않는다 (아이 기기 정보가 제3자에게 가지 않도록) */
:root {
  --bg: #fdf6ec;
  --card: #ffffff;
  --ink: #2b2a4c;
  --muted: #6b6a85;
  --primary: #ff7a59;
  --primary-ink: #ffffff;
  --primary-dark: #e8603f;
  --ai: #e8f2ff;
  --ai-ink: #1f3a63;
  --me: #ffe3d6;
  --me-ink: #5a2a17;
  --line: #ece4d8;
  --rec: #e5383b;
  --warn: #b26b00;
  --radius: 22px;
  --font: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }
[hidden] { display: none !important; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 30px rgba(43, 42, 76, 0.08);
}
.card.wide { max-width: 640px; }
.card.kid { max-width: 560px; text-align: center; padding: 40px 28px; }

h1, h2 { margin: 0 0 18px; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--primary-dark); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.small { font-size: 14px; color: var(--muted); }
.error { color: #c0392b; font-size: 15px; margin: 8px 0 0; }

label { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input:not([type]), textarea {
  font: inherit;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fffdf9;
  color: var(--ink);
  outline: none;
}
input:focus, textarea:focus { border-color: var(--primary); }
#code-input { font-size: 22px; letter-spacing: 0.1em; text-transform: uppercase; }

.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:not(:disabled):hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.big { font-size: 22px; padding: 18px 32px; min-width: 150px; }

form .btn.primary { width: 100%; margin-top: 18px; }
.row { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
.row.center { justify-content: center; }

.consent-list { padding-left: 20px; margin: 0 0 12px; }
.consent-list li { margin-bottom: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; margin-top: 18px; padding: 14px; background: #fff6ef; border-radius: 14px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); flex: none; }

/* 카메라 미리보기 */
.preview-wrap { position: relative; border-radius: 18px; overflow: hidden; background: #1d1c33; aspect-ratio: 4 / 3; }
.preview-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.face-guide {
  position: absolute; left: 50%; top: 48%;
  width: 42%; aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%);
  border: 4px dashed rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

.resume-box { background: #fff6ef; border-radius: 16px; padding: 16px; margin-bottom: 18px; text-align: center; }
.resume-box p { margin: 0 0 10px; font-weight: 600; }
.resume-box .btn { width: 100%; margin-top: 6px; }
.small-btn { padding: 10px 16px; font-size: 15px; }
.btn.place { font-size: 22px; padding: 18px 26px; background: #fff; border: 3px solid var(--line); color: var(--ink); min-width: 120px; }
.btn.place:hover { border-color: var(--primary); }
.mic-meter { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.meter { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter .level { height: 100%; width: 0%; background: #2ecc71; transition: width 0.08s linear; }

.picker-title { text-align: center; margin-top: 4px; }
.kid-grid, .avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.kid-btn, .avatar-btn {
  font: inherit; background: #fff; border: 3px solid var(--line); border-radius: 22px;
  padding: 12px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 0.08s ease, border-color 0.15s ease;
}
.kid-btn:hover, .avatar-btn:hover { border-color: var(--primary); }
.kid-btn:active, .avatar-btn:active { transform: scale(0.96); }
.kid-btn .face, .avatar-btn .face { font-size: 52px; line-height: 1.1; }
.kid-btn .tail { font-size: 13px; color: var(--muted); letter-spacing: 0.05em; }
.wide-btn { width: 100%; }
.small-check { font-weight: 500; font-size: 14px; color: var(--muted); background: transparent; padding: 10px 0 0; }
.small-check input { width: 18px; height: 18px; }

/* 마스코트 */
.mascot {
  width: 96px; height: 96px; margin: 0 auto 20px;
  background: var(--ai); border-radius: 32px;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  position: relative;
}
.mascot span { width: 14px; height: 22px; background: var(--ai-ink); border-radius: 8px; }
.mascot::after {
  content: ""; position: absolute; bottom: 22px; width: 30px; height: 10px;
  border-bottom: 4px solid var(--ai-ink); border-radius: 0 0 20px 20px;
}
.mascot.happy { background: #ffe9a8; }
.assent-text p { font-size: 22px; margin: 0 0 12px; }

/* 대화 화면 */
.chat-screen {
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  padding: 0; height: 100vh; height: 100dvh;
  max-width: 760px; margin: 0 auto;
}
.chat-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.rec { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--rec); font-size: 15px; }
.rec .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rec); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.net-warn { color: var(--warn); font-size: 14px; font-weight: 600; }
.btn.stop { margin-left: auto; background: #fff; color: var(--ink); border: 2px solid var(--line); padding: 10px 18px; }

.messages { flex: 1; overflow-y: auto; padding: 20px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 82%; padding: 14px 18px; border-radius: 22px;
  font-size: 20px; line-height: 1.5; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere;
  animation: pop 0.18s ease-out;
}
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.bubble.ai { align-self: flex-start; background: var(--ai); color: var(--ai-ink); border-bottom-left-radius: 8px; }
.bubble.me { align-self: flex-end; background: var(--me); color: var(--me-ink); border-bottom-right-radius: 8px; }
.bubble.system { align-self: center; background: transparent; color: var(--muted); font-size: 15px; }
.bubble .replay { display: inline-block; margin-left: 8px; border: 0; background: transparent; cursor: pointer; font-size: 18px; vertical-align: middle; }
.bubble.picture { padding: 8px; margin: 0; max-width: min(82%, 340px); }
.bubble.picture img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; background: #fff; cursor: zoom-in; }
.bubble.picture figcaption { font-size: 15px; padding: 6px 8px 2px; color: var(--ai-ink); font-weight: 600; }
.overlay.image-view { cursor: zoom-out; }
.overlay.image-view img { max-width: min(92vw, 720px); max-height: 88vh; border-radius: 20px; background: #fff; }
.typing-hint { margin-left: 10px; font-size: 15px; color: var(--muted); }
.typing { display: inline-flex; gap: 6px; }
.typing i { width: 8px; height: 8px; background: var(--ai-ink); border-radius: 50%; opacity: 0.4; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: 1; } }

/* 오늘의 영어 퀴즈: 게임 방식은 듀오링고처럼, 모습은 우리만의 캐릭터·색으로 */
:root { --good: #3cc46b; --good-dark: #2a9c52; --good-bg: #dff7e8; --bad: #ff6b5b; --bad-bg: #ffe4df; --gold: #ffc531; --gold-dark: #e0a400; --sky: #4aa8ff; --sky-dark: #2b86d9; --lock: #e3ddd3; }
/* 퀴즈 중에는 위쪽 줄을 숨겨 화면을 꽉 채운다 (레슨은 ✕로 그만둘 수 있음) */
.chat-screen.quizzing .messages, .chat-screen.quizzing .composer, .chat-screen.quizzing .chat-top { display: none; }
/* 녹화 표시를 끈 설정: 대화 화면의 '그만하기'는 작고 조용하게 */
.chat-screen.no-rec .rec { display: none; }
.chat-screen.no-rec .btn.stop { font-size: 14px; padding: 6px 12px; border-width: 1.5px; color: var(--muted); }
.quiz-view { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; }
.qpanel { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 12px 16px 20px; }
.qpanel.center { align-items: center; justify-content: center; text-align: center; gap: 10px; }

.btn-3d {
  font: inherit; font-weight: 800; font-size: 20px; letter-spacing: 0.02em; color: #fff; cursor: pointer;
  background: var(--primary); border: 0; border-radius: 18px; padding: 15px 24px; width: 100%; max-width: 520px;
  box-shadow: 0 5px 0 var(--primary-dark); transition: transform 0.06s, box-shadow 0.06s;
}
.btn-3d:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-dark); }
.btn-3d:disabled { background: var(--lock); box-shadow: 0 5px 0 #cfc7bb; color: #9d978c; cursor: default; }
.btn-3d.good { background: var(--good); box-shadow: 0 5px 0 var(--good-dark); }
.btn-3d.bad { background: var(--bad); box-shadow: 0 5px 0 #d94b3c; }
.x-btn { font: inherit; font-size: 22px; color: #a59f95; background: none; border: 0; cursor: pointer; padding: 6px 10px; }

.pup svg { width: 100%; height: 100%; overflow: visible; display: block; }
.pup .m-open, .pup .m-frown, .pup .m-happyeyes, .pup .m-brow { display: none; }
.pup[data-mood="cheer"] .m-smile, .pup[data-mood="cheer"] .m-eyes { display: none; }
.pup[data-mood="cheer"] .m-open, .pup[data-mood="cheer"] .m-happyeyes { display: inline; }
.pup[data-mood="sad"] .m-smile { display: none; }
.pup[data-mood="sad"] .m-frown, .pup[data-mood="sad"] .m-brow { display: inline; }
.pup[data-mood="sad"] .m-eyes circle:nth-child(3), .pup[data-mood="sad"] .m-eyes circle:nth-child(4) { transform: translateY(2px); }
.pup[data-mood="cheer"] { animation: hop 0.6s ease; }
.pup[data-mood="cheer"] .p-tail { transform-origin: 84px 98px; animation: wag 0.25s ease-in-out 4 alternate; }
.pup[data-mood="sad"] { animation: wobble 0.5s ease; }
.pup[data-mood="sad"] .p-ears { transform: translateY(3px); }
.pup.idle { animation: breathe 2.6s ease-in-out infinite; }
.pup.idle .p-tail { transform-origin: 84px 98px; animation: wag 0.6s ease-in-out infinite alternate; }
@keyframes hop { 30% { transform: translateY(-14px) scale(1.04); } 60% { transform: translateY(0) scale(0.98); } }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes breathe { 50% { transform: scale(1.03); } }
@keyframes wag { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
.pup-hero { width: 120px; height: 120px; margin: 0 auto 14px; }
.mascot-sm { width: 76px; height: 76px; flex: none; }
.mascot-lg { width: 150px; height: 150px; }

/* 길 지도 */
.map-head { display: flex; align-items: center; gap: 10px; justify-content: center; position: sticky; top: -12px; background: var(--bg); padding: 8px 0 10px; z-index: 2; }
.map-head .x-btn { position: absolute; right: 0; }
.stat { display: flex; align-items: baseline; gap: 4px; font-size: 22px; background: #fff; border-radius: 999px; padding: 6px 14px; box-shadow: 0 3px 0 var(--line); }
.stat b { font-weight: 900; }
.stat small { font-size: 13px; font-weight: 700; color: var(--muted); }
.team { background: #fff; border-radius: 16px; padding: 10px 14px; margin: 4px auto 6px; width: 100%; max-width: 520px; box-shadow: 0 3px 0 var(--line); }
.team-text { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.team-bar { height: 14px; background: var(--lock); border-radius: 999px; overflow: hidden; }
.team-bar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px; transition: width 0.8s ease; }
.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0 30px; }
.unit-banner { width: 100%; max-width: 520px; background: var(--sky); color: #fff; border-radius: 18px; padding: 14px 18px; box-shadow: 0 5px 0 var(--sky-dark); text-align: left; margin-top: 8px; }
.unit-banner small { display: block; font-weight: 700; opacity: 0.85; }
.unit-banner b { font-size: 20px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.node {
  width: 74px; height: 70px; border-radius: 50%; border: 0; font-size: 30px; cursor: pointer; color: #fff;
  background: var(--lock); box-shadow: 0 7px 0 #cfc7bb; transition: transform 0.06s;
}
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 #cfc7bb; }
.node.done { background: var(--gold); box-shadow: 0 7px 0 var(--gold-dark); }
.node.today { background: var(--primary); box-shadow: 0 7px 0 var(--primary-dark); animation: glow 1.6s ease-in-out infinite; }
.node.missed { background: #f2ece3; box-shadow: 0 7px 0 #ddd5c9; color: #b9b2a7; }
.node.locked { cursor: default; color: #b9b2a7; }
@keyframes glow { 50% { transform: scale(1.07); } }
.node-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.node-stars { font-size: 12px; letter-spacing: -1px; }
.start-bubble { position: absolute; top: -46px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px 14px; font-weight: 900; color: var(--primary-dark); white-space: nowrap; animation: float 1.4s ease-in-out infinite; }
.start-bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: #fff; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); }
@keyframes float { 50% { transform: translateY(-5px); } }
.path-mascot { position: absolute; width: 70px; height: 70px; top: 0; }
.map-foot { position: sticky; bottom: -20px; background: linear-gradient(transparent, var(--bg) 30%); padding: 20px 0 6px; display: flex; justify-content: center; }

/* 레슨 */
.lesson-top { display: flex; align-items: center; gap: 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.lbar { flex: 1; height: 18px; background: var(--lock); border-radius: 999px; overflow: hidden; }
.lbar i { display: block; height: 100%; width: 0; background: var(--good); border-radius: 999px; transition: width 0.4s ease; box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.combo { font-weight: 900; color: #ff8a00; white-space: nowrap; animation: pop 0.3s; }
.lesson-body { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding-top: 14px; }
.coach { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.coach-bubble { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 800; font-size: 18px; }
.coach-bubble::before { content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%) rotate(45deg); width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.quiz-prompt { font-size: 92px; line-height: 1.15; margin: 6px 0 18px; min-height: 100px; display: flex; align-items: center; justify-content: center; text-align: center; }
.quiz-prompt.text { font-size: 30px; font-weight: 900; }
.quiz-prompt .listen-btn { font-size: 50px; background: var(--sky); color: #fff; border: 0; border-radius: 26px; width: 130px; height: 110px; cursor: pointer; box-shadow: 0 6px 0 var(--sky-dark); }
.quiz-prompt .listen-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sky-dark); }
.quiz-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quiz-choices.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.choice {
  font: inherit; font-size: 26px; font-weight: 800; padding: 18px 10px; border-radius: 18px; cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); transition: transform 0.06s;
}
.choice.emoji { font-size: 54px; padding: 12px 10px; }
.choice:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.choice.sel { border-color: var(--sky); background: #eaf5ff; box-shadow: 0 5px 0 var(--sky); color: var(--sky-dark); }
.choice.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 5px 0 var(--good); }
.choice.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 5px 0 var(--bad); animation: shake 0.35s; }
.choice.gone { opacity: 0.35; pointer-events: none; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: flex; flex-direction: column; gap: 12px; }
.tile { font: inherit; font-size: 22px; font-weight: 800; padding: 10px 16px; border-radius: 14px; background: #fff; border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); cursor: pointer; }
.tile.used { visibility: hidden; }
.build-line { min-height: 62px; border-bottom: 2px solid var(--line); border-top: 2px solid var(--line); margin: 0 auto 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.lesson-foot { border-top: 2px solid var(--line); padding: 14px 0 4px; display: flex; justify-content: center; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 22px; animation: slideup 0.22s ease-out; z-index: 5; }
.sheet.good { background: var(--good-bg); }
.sheet.bad { background: var(--bad-bg); }
.sheet-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.sheet-title { font-size: 24px; font-weight: 900; }
.sheet.good .sheet-title { color: var(--good-dark); }
.sheet.bad .sheet-title { color: #d94b3c; }
.sheet-sub { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.sheet-sub button { font: inherit; background: none; border: 0; cursor: pointer; font-size: 20px; }
@keyframes slideup { from { transform: translateY(100%); } }

/* 완료·불꽃 */
.done-title { font-size: 30px; color: var(--gold-dark); margin: 4px 0 6px; }
.done-cards { display: flex; gap: 10px; width: 100%; max-width: 520px; margin-bottom: 8px; }
.dcard { flex: 1; border-radius: 16px; border: 3px solid; overflow: hidden; background: #fff; animation: pop 0.4s ease-out backwards; }
.dcard span { display: block; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 0; }
.dcard b { display: block; font-size: 24px; padding: 10px 0; }
.c-xp { border-color: var(--gold); } .c-xp span { background: var(--gold); } .c-xp b { color: var(--gold-dark); }
.c-acc { border-color: var(--good); animation-delay: 0.12s; } .c-acc span { background: var(--good); } .c-acc b { color: var(--good-dark); }
.c-time { border-color: var(--sky); animation-delay: 0.24s; } .c-time span { background: var(--sky); } .c-time b { color: var(--sky-dark); }
.result-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
.badge-new { background: #fff4d6; border-radius: 18px; padding: 10px 14px; font-weight: 800; animation: pop 0.5s ease-out; }
.badge-new b { display: block; font-size: 40px; }
.big-flame { font-size: 110px; line-height: 1; animation: flame 1.2s ease-in-out infinite; }
@keyframes flame { 50% { transform: scale(1.08) rotate(-3deg); } }
.streak-num { font-size: 84px; font-weight: 900; color: #ff8a00; line-height: 1; }
.streak-label { font-size: 22px; font-weight: 900; color: #ff8a00; margin-bottom: 10px; }
.week { display: flex; gap: 8px; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 var(--line); }
.week div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.week i { width: 34px; height: 34px; border-radius: 50%; background: var(--lock); display: flex; align-items: center; justify-content: center; font-style: normal; color: #fff; font-size: 16px; }
.week .on i { background: #ff8a00; }
.week .now { color: #ff8a00; }
.streak-msg { font-weight: 700; color: var(--muted); max-width: 420px; }

/* 대화 화면 위 작은 불꽃·XP */
.top-stats { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.top-stats + .btn.stop { margin-left: 0; }
.tstat { font: inherit; font-size: 15px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 4px 10px; font-weight: 700; cursor: default; }
button.tstat { cursor: pointer; font-size: 17px; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.confetti span { position: absolute; top: -40px; font-size: 26px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

.task-view { flex: 1; overflow-y: auto; padding: 20px 16px; display: flex; justify-content: center; align-items: flex-start; }
.task-card { background: #fff; border-radius: var(--radius); padding: 26px 24px; width: 100%; max-width: 640px; box-shadow: 0 10px 30px rgba(43, 42, 76, 0.1); animation: pop 0.25s ease-out; }
.task-card h2 { font-size: 26px; margin-bottom: 14px; }
.task-body { font-size: 22px; line-height: 1.8; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.task-q { margin-top: 18px; background: #fff6ef; border-radius: 16px; padding: 14px 16px; font-size: 20px; font-weight: 700; }
.task-card .row { margin-top: 24px; }
.chat-screen.reading .messages, .chat-screen.reading .composer { display: none; }
.task-chip { align-self: center; font: inherit; font-size: 15px; font-weight: 600; background: #fff; border: 2px dashed var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; color: var(--ink); }
.composer {
  display: flex; gap: 10px; align-items: flex-end;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
}
.composer textarea { resize: none; font-size: 20px; max-height: 140px; }
.composer .btn.send { width: auto; margin: 0; flex: none; }
.btn.mic { background: #fff; border: 2px solid var(--line); font-size: 22px; padding: 10px 14px; flex: none; }
.btn.mic.listening { background: var(--rec); border-color: var(--rec); }

.selfview {
  position: fixed; right: 16px; bottom: 96px; width: 120px; aspect-ratio: 4 / 3;
  object-fit: cover; border-radius: 14px; transform: scaleX(-1);
  border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.overlay {
  position: fixed; inset: 0; background: rgba(43, 42, 76, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10;
}

.home-tip { text-align: left; background: #fff6ef; border-radius: 16px; padding: 14px 16px; margin-top: 18px; font-size: 15px; }
.home-tip p { margin: 6px 0 0; }
.kbd { display: inline-block; border: 1.5px solid var(--line); border-radius: 6px; padding: 0 6px; background: #fff; font-weight: 700; }
.progress { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 18px 0 8px; }
.progress .bar { height: 100%; width: 0%; background: var(--primary); transition: width 0.3s ease; }

@media (max-width: 480px) {
  .card { padding: 26px 20px; }
  .bubble { font-size: 18px; max-width: 88%; }
  .btn.big { font-size: 20px; min-width: 0; flex: 1; }
}

/* ===================== 다듬기: 글꼴·캐릭터·움직임 ===================== */
:root {
  --font: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --fun: "Jua", var(--font);
}
/* 아이가 보는 큰 글씨·버튼은 둥근 글꼴, 긴 글은 읽기 쉬운 글꼴 */
h1, h2, .btn, .btn-3d, .choice, .tile, .coach-bubble, .sheet-title, .stat, .tstat, .node-label, .unit-banner b,
.quiz-prompt.text, .done-title, .streak-num, .streak-label, .team-text, .dcard b, .dcard span, .hero-greet, .combo,
.kid-btn .tail, .assent-text p, .task-card h2, .quiz-feedback, .start-bubble, .week span { font-family: var(--fun); font-weight: 400; letter-spacing: 0; }
.bubble { font-family: var(--font); font-weight: 500; }

/* 화면이 바뀔 때 부드럽게 */
.screen:not([hidden]) > .card { animation: rise 0.35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

/* 캐릭터 그림 */
.hero-img { display: block; width: 150px; height: 130px; object-fit: contain; margin: 0 auto 8px; animation: bob 2.8s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(80, 50, 20, .12)); }
@keyframes bob { 50% { transform: translateY(-6px); } }
.hero-greet { text-align: center; color: var(--primary-dark); font-size: 20px; margin: 0 0 2px; }
#screen-code h1 { text-align: center; }
.card.kid .hero-img { width: 170px; height: 150px; }
.pup-hero { display: none; }

/* 레슨: 말하는 강아지 */
.coach { gap: 12px; }
.coach-img { width: 104px; height: 96px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(80, 50, 20, .12)); }
.coach-img.pop { animation: pupPop 0.5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pupPop { 0% { transform: scale(0.6) rotate(-8deg); } 100% { transform: scale(1); } }
.coach-bubble { font-size: 21px; padding: 12px 16px; border-radius: 18px; }
.lesson-body.enter { animation: slidein 0.32s cubic-bezier(.2,.9,.3,1); }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } }
/* 그림 문제는 그림 카드에 */
.quiz-prompt:not(.text):not(:empty) { }
.pic-card { display: inline-flex; align-items: center; justify-content: center; min-width: 170px; min-height: 150px; padding: 10px 26px; background: #fff; border-radius: 28px; box-shadow: 0 8px 0 var(--line), 0 12px 24px rgba(80,50,20,.08); font-size: 96px; line-height: 1.1; transform: rotate(-2deg); }
.choice { font-size: 28px; padding: 20px 10px; border-radius: 20px; border-width: 2.5px; }
.choice.emoji { font-size: 58px; }
.choice:hover:not(:disabled):not(.right):not(.wrong):not(.sel) { background: #fffaf4; }

/* 정답 창: 캐릭터와 함께 */
.sheet { padding: 16px 16px 22px; border-top: 3px solid transparent; }
.sheet.good { border-top-color: #b8ecc9; }
.sheet.bad { border-top-color: #ffc7bd; }
.sheet-inner { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; }
.sheet-img { grid-row: 1 / 3; width: 96px; height: 90px; object-fit: contain; animation: pupPop 0.45s cubic-bezier(.2,1.6,.4,1); }
.sheet-title { font-size: 28px; align-self: end; }
.sheet-sub { align-self: start; margin-bottom: 0; }
.sheet-inner .btn-3d { grid-column: 1 / -1; margin-top: 12px; max-width: none; }

/* 완료·불꽃 */
.done-img { width: 220px; height: 200px; object-fit: contain; animation: trophyIn 0.8s cubic-bezier(.2,1.5,.4,1); filter: drop-shadow(0 12px 14px rgba(80,50,20,.15)); }
@keyframes trophyIn { 0% { transform: translateY(60px) scale(0.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.done-title { font-size: 38px; }
.streak-img { width: 200px; height: 190px; object-fit: contain; animation: trophyIn 0.7s cubic-bezier(.2,1.5,.4,1); }
.streak-num { font-size: 96px; text-shadow: 0 5px 0 #ffd2a0; }
.badge-new { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; box-shadow: 0 4px 0 var(--line); }
.badge-new img { width: 84px; height: 84px; object-fit: contain; border-radius: 18px; }
.badge-shelf { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.badge-shelf img { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }

/* 길 지도 */
.path { position: relative; gap: 26px; }
.node { width: 82px; height: 76px; font-size: 32px; font-family: var(--fun); }
.node.today::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 5px solid rgba(255, 122, 89, .35); animation: ring 1.6s ease-out infinite; }
.node { position: relative; }
@keyframes ring { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.path-mascot { width: 96px; height: 90px; top: -8px; object-fit: contain; }
.path-deco { position: absolute; width: 92px; height: 84px; object-fit: contain; opacity: 0.95; pointer-events: none; }
.unit-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 14px 20px; border-radius: 22px; }
.unit-banner img { width: 86px; height: 70px; object-fit: contain; margin: -18px -4px -14px 0; }
.unit-banner b { font-size: 22px; }
.team { display: flex; align-items: center; gap: 12px; }
.team img { width: 70px; height: 60px; object-fit: contain; flex: none; }
.team > div { flex: 1; }

/* 대화: AI 말풍선 옆 강아지 */
.ai-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 88%; }
.ai-row .bubble { max-width: 100%; }
.ai-ava { width: 42px; height: 42px; border-radius: 50%; background: #fff3e3; object-fit: cover; object-position: 50% 30%; flex: none; box-shadow: 0 2px 0 var(--line); }
.bubble.ai { border-radius: 22px 22px 22px 8px; box-shadow: 0 3px 0 #d6e6fb; }
.bubble.me { box-shadow: 0 3px 0 #f6cdb9; }
.node-wrap:has(.start-bubble) { margin-top: 40px; }

.rec-note { margin: 16px 0 0; font-size: 15px; color: var(--muted); }

.stand-tip { margin: 14px 0 4px; background: #eaf5ff; color: #1f3a63; border-radius: 14px; padding: 10px 14px; font-size: 15.5px; }
.draw-chip { align-self: center; margin: 0 auto 6px; font: 15px var(--fun); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 5px 14px; }
.draw-chip b { color: var(--primary-dark); font-weight: 400; }
.draw-chip.none { color: var(--muted); }
.chat-screen.quizzing .draw-chip, .chat-screen.reading .draw-chip { display: none !important; }

/* 시작 전 녹화 점검 */
.qc-list { list-style: none; padding: 0; margin: 14px 0 4px; display: grid; gap: 6px; }
.qc-list li { display: flex; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 9px 12px; font-size: 16px; transition: border-color .2s, background .2s; }
.qc-list li.qc-ok { border-color: #b8ecc9; background: #f1fbf4; }
.qc-list li.qc-bad { border-color: #ffd0b8; background: #fff6ef; }
.qc-list li.qc-skip { color: var(--muted); }
.qc-ic { width: 24px; text-align: center; flex: none; }
/* 별 잡기 */
.calib-screen { padding: 0; }
.calib-field { position: relative; width: 100%; height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; }
.calib-intro { text-align: center; padding: 0 16px; }
.calib-intro p { font-size: 20px; }
.calib-star { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; font-size: 70px; line-height: 1; background: none; border: 0; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(224,164,0,.45)); }
.calib-star.pop { animation: starPop .45s cubic-bezier(.2,1.6,.4,1), starPulse 1.2s .45s ease-in-out infinite; }
@keyframes starPop { from { transform: scale(0) rotate(-90deg); } }
@keyframes starPulse { 50% { transform: scale(1.12); } }
/* 하는 도중 알림 */
.face-alert { position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid #ffd0b8; border-radius: 18px; padding: 8px 16px 8px 8px; box-shadow: 0 8px 24px rgba(80,50,20,.15); animation: rise .3s ease-out; cursor: pointer; }
.face-alert img { width: 52px; height: 48px; object-fit: contain; }
.face-alert b { display: block; font: 18px var(--fun); }
.face-alert span { font-size: 14px; color: var(--muted); }
#media-alert { z-index: 45; }

/* 이름 쓰기 + 이름으로 고르기 */
#name-form { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 6px; }
#name-input { font: 26px var(--fun); text-align: center; padding: 14px; }
.name-note { margin-top: 6px; }
.kid-btn .initial { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font: 30px var(--fun); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.kid-btn .nm { font: 19px var(--fun); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kid-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

/* 상단: 퀴즈가 없으면 퀴즈 표시는 숨김 */
.top-stats:not(.has-quiz) .q-only { display: none; }
.tstat.bonus { background: #fff8e1; border-color: var(--gold); }
.tstat.pop, .bonus-toast.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }

/* AI 똑똑하게 쓰기 (CDL) */
.cdl-view .lesson-top { padding-top: 4px; }
.cdl-stop { font: 14px var(--font); color: var(--muted); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.cdl-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 18px; }
.cdl-img { width: 150px; height: 140px; object-fit: contain; }
.cdl-img.pop { animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.cdl-eyebrow { margin: 0; color: var(--primary-dark); font: 15px var(--fun); letter-spacing: .02em; min-height: 1em; }
.cdl-title { margin: 0; font: 28px/1.3 var(--fun); text-wrap: balance; max-width: 30ch; }
.cdl-text { margin: 0; font-size: 20px; line-height: 1.6; max-width: 32ch; text-wrap: pretty; }
.cdl-view[data-kind="reminder"] .cdl-text { font: 26px/1.45 var(--fun); background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: 0 4px 0 var(--line); }
.cdl-view[data-kind="check"] .cdl-title { font-size: 24px; }
.cdl-choices { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 460px; margin-top: 10px; }
.cdl-choices .choice { font-size: 22px; }

/* 탐정 별 알림 */
.bonus-toast { position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 41; display: flex; align-items: center; gap: 10px;
  background: #fff8e1; border: 2.5px solid var(--gold); border-radius: 18px; padding: 10px 16px 10px 10px; box-shadow: 0 6px 0 var(--gold-dark), 0 10px 26px rgba(0,0,0,.12); max-width: calc(100vw - 32px); }
.bonus-toast img { width: 56px; height: 52px; object-fit: contain; }
.bonus-toast b { display: block; font: 19px var(--fun); color: #9a6a00; }
.bonus-toast span { font-size: 14px; color: var(--muted); }
.bonus-toast.pop { animation: toastIn .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes toastIn { from { transform: translate(-50%, -20px) scale(.8); opacity: 0; } }
.kid-btn .initial.two { font-size: 22px; letter-spacing: -.02em; }
.cdl-title, .cdl-text, .cdl-choices .choice, .bonus-toast, .sheet-sub { word-break: keep-all; overflow-wrap: anywhere; }
/* 탐정 별 알림은 아래쪽(입력창 위)에: 위쪽 '얼굴이 안 보여요' 알림과 겹치지 않게 */
.bonus-toast { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
@keyframes toastIn { from { transform: translate(-50%, 24px) scale(.8); opacity: 0; } }

/* 선생님 시험 칸 (학습 지도) */
.node.test { background: var(--sky); box-shadow: 0 7px 0 var(--sky-dark); color: #fff; }
.node.test.new { animation: glow 1.6s ease-in-out infinite; }
.node.test.new::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 5px solid rgba(74, 168, 255, .35); animation: ring 1.6s ease-out infinite; }
.node.test.done { background: #b8dcff; box-shadow: 0 7px 0 #8cc3f5; }
.node.test:disabled { cursor: default; }
.test-wrap .node-label { max-width: 160px; text-align: center; color: var(--sky-dark); }
.start-bubble.test { color: var(--sky-dark); }
.node-wrap.test-wrap:has(.start-bubble) { margin-top: 40px; }
/* 선생님 시험 문제 */
.test-count { font: 16px var(--fun); color: var(--muted); white-space: nowrap; }
.test-prompt { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0 18px; text-align: center; }
.test-prompt .pic { font-size: 84px; line-height: 1.1; }
.test-prompt .q { font: 28px/1.35 var(--fun); text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.test-choices.long { grid-template-columns: 1fr; }
.test-choices .choice { word-break: keep-all; overflow-wrap: anywhere; }
.test-done-sub { font-size: 19px; margin: 0 0 12px; max-width: 30ch; }

/* 카메라·마이크가 여러 개일 때 고르기 */
.dev-pick { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.dev-pick label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.dev-pick label span { flex: none; }
.dev-pick select { flex: 1; min-width: 0; font: inherit; font-weight: 500; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
/* 홈 화면에 놓기 */
.install-card { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; margin-top: 14px; padding: 14px; border-radius: 18px; background: #eef7ff; border: 2px dashed #9cc9f5; }
.install-card b { font: 19px var(--fun); }
.install-card .btn { margin-top: 4px; }
.install-card .ok-text { color: #2a9c52; font-weight: 700; }

/* 한글은 낱말 중간에서 줄이 바뀌지 않게, 줄 길이는 고르게 */
body { word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, .assent-text p, .card.kid p, .coach-bubble, .sheet-sub, .task-body, .bubble { word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, .assent-text p, .card.kid p { text-wrap: balance; }
.assent-text p { line-height: 1.5; }

/* ===== AI 똑똑하게 쓰기: 그림 장면 ===== */
.scene-wrap { width: 100%; max-width: 480px; }
.scene { position: relative; height: 230px; border-radius: 28px; overflow: hidden; box-shadow: inset 0 -6px 0 rgba(0,0,0,.06); animation: sceneIn .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes sceneIn { from { transform: scale(.92); opacity: 0; } }
.scene .pup { position: absolute; width: 104px; height: 96px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.12)); }
.scene .pup.bl { left: 8px; bottom: 4px; } .scene .pup.br { right: 8px; bottom: 4px; } .scene .pup.bc { left: 50%; bottom: 0; margin-left: -52px; }
.scene .tag { position: absolute; background: #fff; border-radius: 999px; padding: 5px 12px; font: 14px var(--fun); color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.08); white-space: nowrap; animation: tagIn .5s .5s both cubic-bezier(.2,1.5,.4,1); }
.scene .tag.tr { right: 12px; top: 12px; } .scene .tag.br { right: 14px; bottom: 16px; animation-delay: .9s; }
@keyframes tagIn { from { transform: scale(.4); opacity: 0; } }
.ai-face { width: 96px; height: 100px; filter: drop-shadow(0 6px 8px rgba(91, 107, 224, .3)); }
.ai-face .bulb { animation: bulb 1.4s ease-in-out infinite; }
@keyframes bulb { 50% { fill: #fff3b0; } }
.ai-face .eye { animation: blink 3.6s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.say { position: absolute; background: #fff; border-radius: 18px; padding: 10px 14px; font: 18px/1.35 var(--fun); color: var(--ink); box-shadow: 0 4px 0 rgba(0,0,0,.08); animation: tagIn .5s .2s both cubic-bezier(.2,1.5,.4,1); }
.say::after { content: ""; position: absolute; left: 26px; bottom: -9px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.say b { color: #e8603f; }
/* 1. AI는 사람이 아니에요: 책·글·그림이 AI 둘레를 돈다 */
.s-learn { background: radial-gradient(circle at 50% 45%, #fff 0 18%, transparent 19%), linear-gradient(160deg, #dff0ff, #eae6ff); }
.s-learn .center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); }
.s-learn .orbit span { position: absolute; left: 50%; top: 46%; width: 36px; height: 36px; margin: -18px 0 0 -18px; font-size: 28px; line-height: 36px; text-align: center; animation: orbit 9s linear infinite; animation-delay: calc(var(--i) * -1.5s); }
@keyframes orbit { from { transform: rotate(0deg) translateX(92px) rotate(0deg); } to { transform: rotate(360deg) translateX(92px) rotate(-360deg); } }
/* 2. AI도 틀릴 수 있어요 */
.s-mistake { background: linear-gradient(160deg, #fff1e0, #ffe2e2); }
.s-mistake .say.left { left: 14px; top: 14px; }
.s-mistake .ai-l { position: absolute; left: 22px; top: 82px; }
.s-mistake .cat { position: absolute; right: 26px; top: 40px; font-size: 88px; line-height: 1; text-align: center; animation: bob 2s ease-in-out infinite; }
.s-mistake .legs { display: block; font: 15px var(--fun); background: #fff; border-radius: 999px; padding: 3px 10px; margin-top: 4px; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.s-mistake .legs b { color: #2a9c52; }
.s-mistake .bang { position: absolute; left: 50%; top: 70px; font-size: 54px; animation: bang 1.4s .6s both infinite; }
.s-mistake .pup.bc { width: 86px; height: 80px; margin-left: -43px; }
@keyframes bang { 0% { transform: scale(0) rotate(-20deg); } 20% { transform: scale(1.25) rotate(8deg); } 30%, 100% { transform: scale(1) rotate(0); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
/* 3. 우리 삶은 내가 더 잘 알아요: 누르면 뒤집히는 칸 */
.s-community { background: linear-gradient(170deg, #e2f7e6, #fff6d8); height: 250px; }
.s-community .ai-s { position: absolute; left: 12px; top: 10px; transform: scale(.62); transform-origin: top left; }
.s-community .ai-s .q { position: absolute; right: -14px; top: -6px; font: 40px var(--fun); color: #5b6be0; animation: bob 1.4s ease-in-out infinite; }
.s-community .tiles { position: absolute; left: 12px; right: 12px; top: 76px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile2 { position: relative; height: 104px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 5px 0 #d8ecd9; cursor: pointer; padding: 6px; font: inherit; color: var(--ink); animation: tagIn .5s both; }
.tile2:nth-child(2) { animation-delay: .12s; } .tile2:nth-child(3) { animation-delay: .24s; }
.tile2 .e { display: block; font-size: 36px; line-height: 1.2; }
.tile2 .a { display: block; font: 14px/1.25 var(--fun); }
.tile2 .b { display: none; font: 13px/1.3 var(--font); }
.tile2 .b em { font-style: normal; font: 15px var(--fun); color: #2a9c52; }
.tile2.flip { background: #fffbe8; box-shadow: 0 5px 0 #f0dc94; animation: flip .35s; }
.tile2.flip .e, .tile2.flip .a { display: none; }
.tile2.flip .b { display: flex; height: 100%; align-items: center; justify-content: center; flex-direction: column; }
@keyframes flip { 50% { transform: rotateY(90deg); } }
.s-community .pup.br { width: 70px; height: 64px; right: 4px; bottom: 0; }
.s-community .tag.me { right: 72px; bottom: 14px; background: #2a9c52; color: #fff; }
/* 4. 탐정처럼 확인해요 */
.s-detective { background: linear-gradient(160deg, #e9e4ff, #dff3ff); }
.s-detective .paper { position: absolute; left: 50%; top: 20px; width: 210px; margin-left: -105px; background: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.s-detective .paper span { font: 14px var(--fun); color: var(--muted); }
.s-detective .paper i { display: block; height: 9px; border-radius: 6px; background: #e6e2f7; margin-top: 8px; }
.s-detective .paper i.short { width: 60%; background: #ffd2c6; }
.s-detective .glass { position: absolute; left: 50%; top: 22px; font-size: 64px; animation: sweep 3s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); }
@keyframes sweep { 0%, 100% { transform: translate(-110px, 0) rotate(-10deg); } 50% { transform: translate(20px, 18px) rotate(12deg); } }
.s-detective .steps { position: absolute; left: 108px; right: 10px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 4px 4px; align-items: center; }
.s-detective .steps span { background: #fff; border-radius: 999px; padding: 5px 10px; font: 14px var(--fun); box-shadow: 0 3px 0 rgba(0,0,0,.08); animation: tagIn .45s both; }
.s-detective .steps span:nth-of-type(2) { animation-delay: .5s; } .s-detective .steps span:nth-of-type(3) { animation-delay: 1s; }
.s-detective .steps b { color: #7b8cff; }
/* 5. 내 정보는 비밀이에요: 낱말이 상자 속으로 */
.s-secret { background: linear-gradient(160deg, #fff6cf, #ffe6f0); }
.s-secret .drops span { position: absolute; left: calc(50% - 40px + var(--i) * 0px); top: -40px; background: #fff; border-radius: 999px; padding: 4px 12px; font: 15px var(--fun); box-shadow: 0 3px 0 rgba(0,0,0,.08); animation: drop 4s ease-in infinite; animation-delay: calc(var(--i) * 1s); opacity: 0; }
@keyframes drop { 0% { transform: translate(calc((var(--i) - 1.5) * 50px), 0); opacity: 0; } 10% { opacity: 1; } 60% { transform: translate(0, 140px) scale(.9); opacity: 1; } 75%, 100% { transform: translate(0, 165px) scale(.3); opacity: 0; } }
.s-secret .box { position: absolute; left: 50%; bottom: 18px; width: 120px; height: 74px; margin-left: -60px; background: linear-gradient(#c98a4a, #a96b33); border-radius: 12px 12px 16px 16px; box-shadow: 0 6px 0 #8a5426; display: flex; align-items: center; justify-content: center; }
.s-secret .box .lid { position: absolute; left: -6px; right: -6px; top: -14px; height: 18px; border-radius: 10px; background: #d99a58; box-shadow: 0 3px 0 #8a5426; }
.s-secret .lock { font-size: 34px; position: relative; z-index: 1; margin-top: 8px; }
.s-secret .pup.bl { width: 88px; height: 82px; }
/* 확인 문제: AI가 한 말 */
.s-quote { background: linear-gradient(160deg, #eef1ff, #fff1f6); height: 200px; }
.s-quote .ai-l { position: absolute; left: 16px; bottom: 14px; }
.s-quote .say.big { left: 120px; right: 16px; top: 26px; font-size: 22px; }
.s-quote .say.big::after { left: -6px; bottom: 26px; }
.s-quote .pup.br { width: 80px; height: 74px; }
/* 다 했어요: AI 탐정 배지 */
.s-badge { background: radial-gradient(circle at 50% 45%, #fff6c9, #ffe2b8 70%); }
.s-badge .badge { position: absolute; left: 50%; top: 14px; width: 150px; margin-left: -75px; animation: badgeIn .7s cubic-bezier(.2,1.6,.4,1), bob 2.4s .7s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(224,164,0,.35)); }
@keyframes badgeIn { from { transform: scale(0) rotate(-30deg); } }
.s-badge .spark { position: absolute; font-size: 26px; animation: twinkle 1.6s ease-in-out infinite; }
.s-badge .s1 { left: 22%; top: 30px; } .s-badge .s2 { right: 24%; top: 20px; animation-delay: .5s; } .s-badge .s3 { left: 30%; bottom: 40px; animation-delay: 1s; }
@keyframes twinkle { 50% { transform: scale(1.4); opacity: .5; } }
/* 장면이 있는 카드는 글을 카드처럼 */
.cdl-view[data-scene] .cdl-body { gap: 10px; }
.cdl-view .cdl-text { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px; box-shadow: 0 3px 0 var(--line); }
.cdl-view[data-kind="check"] .cdl-text:empty { display: none; }
.cdl-view .cdl-text:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .scene *, .scene { animation: none !important; } }
@media (max-width: 420px) {
  .scene .pup { width: 80px; height: 74px; }
  .s-detective .steps { left: 84px; }
  .s-quote .say.big { font-size: 19px; left: 112px; }
}

.s-mistake .cat { top: 18px; right: 20px; font-size: 78px; }
.s-mistake .pup.bc { width: 72px; height: 66px; margin-left: -20px; }
.s-mistake .bang { top: 96px; left: 44%; }
.s-learn .tag.tr { z-index: 2; }
#cdl-confetti span { font-size: 22px; }
/* 태블릿에서는 장면을 크게 */
@media (min-width: 700px) and (min-height: 800px) {
  .scene-wrap { max-width: 580px; }
  .scene { height: 300px; } .s-community { height: 310px; } .s-quote { height: 240px; }
  .s-community .tiles { top: 92px; } .tile2 { height: 130px; } .tile2 .e { font-size: 46px; } .tile2 .a { font-size: 16px; }
  .s-learn .orbit span { animation-name: orbitBig; }
  .ai-face { width: 116px; height: 120px; }
  .s-badge .badge { width: 190px; margin-left: -95px; }
  .cdl-title { font-size: 32px; } .cdl-view .cdl-text { font-size: 21px; }
}
@keyframes orbitBig { from { transform: rotate(0deg) translateX(122px) rotate(0deg); } to { transform: rotate(360deg) translateX(122px) rotate(-360deg); } }

/* ===== CDL: 그림 카드 (모든 카드 같은 크기·같은 자리) ===== */
.cdl-view .cdl-body { justify-content: flex-start; gap: 10px; padding-top: 14px; }
.cdl-view .scene-wrap { width: 100%; max-width: 520px; flex: none; }
.scene-img { display: block; width: 100%; aspect-ratio: 719 / 218; object-fit: cover; border-radius: 24px; box-shadow: 0 6px 0 rgba(43, 42, 76, .07); animation: sceneIn .45s cubic-bezier(.2,1.3,.4,1); background: #eef1ff; }
.cdl-view .cdl-eyebrow { height: 20px; line-height: 20px; margin-top: 6px; }
.cdl-view .cdl-title { width: 100%; max-width: 520px; font-size: clamp(21px, 5.6vw, 30px); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.cdl-view .cdl-text { box-sizing: border-box; width: 100%; max-width: 520px; min-height: 150px; display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  font: 500 19px/1.6 var(--font); text-align: center; background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 14px 18px; box-shadow: 0 4px 0 var(--line); }
.cdl-view .cdl-text:empty { display: none !important; }
.cdl-view[data-kind="reminder"] .cdl-text { font: 500 21px/1.6 var(--font); }
.cdl-text .hl, .sheet-sub .hl { color: var(--primary-dark); font-weight: 800; }
.cdl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.cdl-list li { background: var(--soft, #fff6ef); border-radius: 12px; padding: 6px 14px; font-weight: 600; }
.cdl-list li .hl { color: #2b78d6; }
.cdl-text .extra { font-size: 16px; color: var(--muted); }
.cdl-text .extra .hl { color: #b8860b; }
.ai-quote { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font: 24px/1.35 var(--fun); color: var(--ink); }
.ai-quote .who { font: 700 14px var(--font); color: #fff; background: #7b8cff; border-radius: 999px; padding: 2px 12px; }
.cdl-view[data-kind="check"] .cdl-text { min-height: 110px; background: #f3f4ff; border-color: #d9ddff; box-shadow: 0 4px 0 #d9ddff; }
.cdl-view .cdl-choices { max-width: 520px; }
@media (min-width: 700px) and (min-height: 800px) {
  .cdl-view .scene-wrap, .cdl-view .cdl-title, .cdl-view .cdl-text, .cdl-view .cdl-choices { max-width: 600px; }
  .cdl-view .cdl-text { font-size: 21px; min-height: 170px; }
}
@media (max-width: 420px) { .cdl-view .cdl-text { font-size: 17px; min-height: 140px; padding: 12px 14px; } .ai-quote { font-size: 21px; } }
/* 글 상자 높이를 카드마다 같게 (짧은 글은 가운데) */
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text, .cdl-view[data-kind="reminder"] .cdl-text { min-height: 236px; }
.cdl-view .cdl-body { position: relative; z-index: 1; }
#cdl-confetti { z-index: 0; }
@media (min-width: 700px) and (min-height: 800px) {
  .cdl-view .scene-wrap, .cdl-view .cdl-title, .cdl-view .cdl-text, .cdl-view .cdl-choices { max-width: 700px; }
  .cdl-view .cdl-body { max-width: 760px; padding-top: 22px; gap: 14px; }
  .cdl-view .cdl-title { font-size: 34px; }
  .cdl-view .cdl-text { font-size: 23px; }
  .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text, .cdl-view[data-kind="reminder"] .cdl-text { min-height: 280px; }
  .ai-quote { font-size: 30px; }
  .cdl-view .cdl-choices .choice { font-size: 24px; padding: 20px; }
}
/* 탐정 배지 (퀴즈 별 ⭐과 헷갈리지 않게 돋보기 배지 그림) */
.badge-ic { width: 22px; height: 22px; object-fit: contain; vertical-align: -5px; }
.bonus-toast img.badge-big { width: 58px; height: 58px; object-fit: contain; animation: badgeIn .6s cubic-bezier(.2,1.6,.4,1); }
.hl-badge { display: inline-flex; align-items: center; gap: 4px; }

/* ===== CDL 카드 v3 (보내 주신 시안처럼: 칸 막대 · 라벨 · 제목 → 그림 → 글 상자) ===== */
.cdl-view { --cdl: #6c5ce7; --cdl-dark: #5341c9; --cdl-soft: #efeafd; --cdl-line: #e8e3f4; }
.cdl-view .qpanel { background: #fffdfb; }
.cdl-top { gap: 10px; align-items: center; padding-top: 6px; }
.segs { flex: 1; display: flex; gap: 6px; }
.segs i { flex: 1; height: 12px; border-radius: 999px; background: #e6e1f5; transition: background .3s; }
.segs i.on { background: var(--cdl); }
.segs i.now { animation: segPulse 1.4s ease-in-out infinite; }
@keyframes segPulse { 50% { opacity: .65; } }
.seg-count { font: 700 16px var(--font); color: var(--muted); min-width: 30px; text-align: right; }
.cdl-view .cdl-stop { border: 2px solid var(--cdl-line); border-radius: 999px; padding: 6px 14px; font: 700 14px var(--font); color: var(--ink); background: #fff; }
.cdl-view .cdl-body { align-items: stretch; text-align: left; gap: 12px; padding-top: 16px; max-width: 560px; }
.cdl-view .cdl-eyebrow { align-self: flex-start; height: auto; line-height: 1.3; margin: 0; background: var(--cdl-soft); color: #4b3cb8; border-radius: 999px; padding: 6px 14px; font: 800 15px var(--font); letter-spacing: 0; }
.cdl-view .cdl-title { text-align: left; white-space: normal; font: 30px/1.25 var(--fun); color: #1f1e3a; min-height: 0; margin: 0; }
.cdl-view .scene-wrap { max-width: none; }
.cdl-view .scene-img { border-radius: 22px; box-shadow: none; }
.cdl-view .cdl-text { align-items: stretch; justify-content: flex-start; text-align: left; gap: 12px; font: 600 20px/1.6 var(--font); color: #2b2a4c; border: 2px solid var(--cdl-line); box-shadow: none; border-radius: 22px; padding: 16px 18px; max-width: none; }
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text, .cdl-view[data-kind="reminder"] .cdl-text { min-height: 250px; }
.cdl-text .lead { margin: 0; }
.cdl-text .hl { color: #4b3cb8; font-weight: 800; }
.cdl-text .take { display: flex; align-items: center; gap: 12px; border-radius: 16px; padding: 12px 14px; font: 800 19px/1.4 var(--font); margin-top: auto; }
.cdl-text .take.lav { background: var(--cdl-soft); } .cdl-text .take.peach { background: #fdeee3; }
.cdl-text .take .ic { font-size: 30px; line-height: 1; flex: none; }
.cdl-text .take .ic img { width: 40px; height: 38px; display: block; }
.cdl-text .rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cdl-text .rows li { display: flex; align-items: center; gap: 12px; background: #ecf6e6; border-radius: 14px; padding: 8px 14px; font: 700 18px/1.35 var(--font); }
.cdl-text .rows li .ic { font-size: 26px; width: 34px; text-align: center; flex: none; }
.cdl-text .lockgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cdl-text .lockgrid span { display: flex; align-items: center; gap: 8px; background: #ecf6e6; border-radius: 14px; padding: 10px 12px; font: 700 18px var(--font); }
.cdl-text .lockgrid i { font-style: normal; font-size: 20px; }
.cdl-text .reward { display: flex; align-items: center; gap: 10px; background: #fff6d6; border: 2px solid #f3dc8a; border-radius: 16px; padding: 8px 12px; font: 700 16px/1.4 var(--font); }
.cdl-text .reward img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.cdl-text .reward .hl { color: #9a6a00; }
.cdl-text.quote { background: var(--cdl-soft) !important; border-color: #ddd5fb !important; min-height: 0 !important; align-items: center; text-align: center; gap: 6px; }
.cdl-text.quote .who { display: inline-flex; align-items: center; gap: 6px; background: #8b7cf6; color: #fff; border-radius: 999px; padding: 3px 12px 3px 4px; font: 800 14px var(--font); }
.cdl-text.quote .who img { width: 26px; height: 24px; background: #fff; border-radius: 50%; padding: 2px; }
.cdl-text.quote b { font: 26px/1.35 var(--fun); color: #1f1e3a; }
.cdl-view .cdl-choices { max-width: none; gap: 10px; margin-top: 0; }
.cdl-view .cdl-choices .choice { display: flex; align-items: center; gap: 14px; text-align: left; font: 21px var(--fun); padding: 14px 16px; border: 2px solid var(--cdl-line); border-radius: 16px; box-shadow: 0 3px 0 var(--cdl-line); background: #fff; color: var(--ink); }
.cdl-view .cdl-choices .choice::before { content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #cfc8e6; background: #fff; box-sizing: border-box; }
.cdl-view .cdl-choices .choice.sel { border-color: var(--cdl); background: #f5f2ff; box-shadow: 0 3px 0 var(--cdl); color: #3b2fa0; }
.cdl-view .cdl-choices .choice.sel::before { border-color: var(--cdl); background: radial-gradient(circle, #fff 0 4px, var(--cdl) 5px); }
.cdl-view .cdl-choices .choice.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 3px 0 var(--good); }
.cdl-view .cdl-choices .choice.right::before { border-color: var(--good); background: radial-gradient(circle, #fff 0 4px, var(--good) 5px); }
.cdl-view .cdl-choices .choice.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 3px 0 var(--bad); }
.cdl-view .lesson-foot .btn-3d:not(:disabled) { background: var(--cdl); box-shadow: 0 5px 0 var(--cdl-dark); }
.cdl-view .lesson-foot { border-top: 0; }
.cdl-view .lesson-foot .btn-3d { max-width: 560px; }
@media (max-width: 420px) {
  .cdl-view .cdl-title { font-size: 26px; }
  .cdl-view .cdl-text { font-size: 18px; padding: 14px; }
  .cdl-text .take { font-size: 17px; } .cdl-text .rows li, .cdl-text .lockgrid span { font-size: 16px; }
  .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text, .cdl-view[data-kind="reminder"] .cdl-text { min-height: 230px; }
  .cdl-text.quote b { font-size: 22px; }
}
@media (min-width: 700px) and (min-height: 800px) {
  .cdl-view .cdl-body, .cdl-view .lesson-foot .btn-3d { max-width: 660px; }
  .cdl-view .cdl-title { font-size: 36px; }
  .cdl-view .cdl-text { font-size: 22px; }
  .cdl-text .take, .cdl-text .rows li, .cdl-text .lockgrid span { font-size: 20px; }
}
/* 글 상자 높이: 가장 긴 카드(탐정)에 맞춰 모든 카드 같게 */
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 318px; }
@media (max-width: 420px) { .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 300px; } }
@media (min-width: 700px) and (min-height: 800px) { .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 350px; } }

/* ===== CDL 카드 v4: 시안 구성 그대로, 색은 앱 원래 색(초록 막대·주황 버튼), 글자는 시안 크기 ===== */
.cdl-view { --cdl: var(--primary); --cdl-dark: var(--primary-dark); --cdl-soft: #fff1ea; --cdl-line: #ece4d8; }
.cdl-view .qpanel { background: var(--bg); }
.cdl-view .cdl-top .lbar { flex: 1; }
.cdl-view .cdl-stop { font-size: 15px; padding: 7px 14px; }
.cdl-view .cdl-body { max-width: 600px; gap: 12px; }
.cdl-view .cdl-eyebrow { background: #ffe9df; color: var(--primary-dark); font: 800 17px var(--font); padding: 6px 14px; }
.cdl-view .cdl-title { font: 33px/1.25 var(--fun); color: var(--ink); }
.cdl-view .cdl-text { font: 700 22px/1.55 var(--font); color: var(--ink); border-color: var(--line); background: #fff; padding: 18px 18px; }
.cdl-text .hl { color: var(--primary-dark); }
.cdl-text .take { font: 800 21px/1.4 var(--font); }
.cdl-text .take.lav { background: #eef1ff; } .cdl-text .take.peach { background: #fff1e6; }
.cdl-text .take.with-label { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.cdl-text .take.with-label .ic { grid-row: 1 / 3; }
.cdl-text .take.with-label .lbl { font: 800 14px var(--font); font-style: normal; color: var(--primary-dark); }
.cdl-text .rows li, .cdl-text .lockgrid span { font: 700 21px/1.35 var(--font); padding: 10px 14px; }
.cdl-text .rows li .ic { font-size: 28px; }
.cdl-text .reward { font: 800 18px/1.4 var(--font); }
.cdl-text .reward .hl { color: #9a6a00; }
.cdl-text.quote { background: #f5f2ec !important; border-color: var(--line) !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; text-align: left !important; gap: 12px; padding: 14px 16px !important; }
.cdl-text.quote .q-ai { width: 46px; height: 43px; flex: none; }
.cdl-text.quote b { font: 26px/1.35 var(--fun); color: var(--ink); }
.cdl-view[data-kind="check"] .cdl-title { font-size: 28px; }
.cdl-view .cdl-choices .choice { font: 23px/1.35 var(--fun); padding: 15px 16px; border-color: var(--line); box-shadow: 0 4px 0 var(--line); }
.cdl-view .cdl-choices .choice.sel { border-color: var(--sky); background: #eaf5ff; box-shadow: 0 4px 0 var(--sky); color: var(--sky-dark); }
.cdl-view .cdl-choices .choice.sel::before { border-color: var(--sky); background: radial-gradient(circle, #fff 0 4px, var(--sky) 5px); }
.cdl-view .lesson-foot .btn-3d:not(:disabled) { background: var(--primary); box-shadow: 0 5px 0 var(--primary-dark); }
.cdl-view .lesson-foot .btn-3d { font-size: 22px; max-width: 600px; }
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 330px; }
@media (max-width: 440px) {
  .cdl-view .cdl-title { font-size: 29px; }
  .cdl-view[data-kind="check"] .cdl-title { font-size: 25px; }
  .cdl-view .cdl-text { font-size: 20px; padding: 14px 15px; }
  .cdl-text .take { font-size: 19px; } .cdl-text .rows li, .cdl-text .lockgrid span { font-size: 19px; padding: 8px 12px; }
  .cdl-text .reward { font-size: 16px; }
  .cdl-text.quote b { font-size: 23px; }
  .cdl-view .cdl-choices .choice { font-size: 20px; padding: 13px 14px; }
  .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 310px; }
}
@media (min-width: 700px) and (min-height: 800px) {
  .cdl-view .cdl-body, .cdl-view .lesson-foot .btn-3d { max-width: 680px; }
  .cdl-view .cdl-title { font-size: 38px; }
  .cdl-view .cdl-text { font-size: 24px; }
  .cdl-text .take, .cdl-text .rows li, .cdl-text .lockgrid span { font-size: 23px; }
  .cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 360px; }
}
.cdl-view .cdl-title { white-space: pre-line; }

/* ===== CDL v5: 글자·상자 크기를 화면 폭에 비례하게 (시안 비율 그대로), 상자 높이 고정 ===== */
.cdl-view .cdl-body { container-type: inline-size; max-width: 620px; gap: 2.6cqi; }
.cdl-view .cdl-eyebrow { font-size: clamp(15px, 4.4cqi, 26px); padding: 1.2cqi 3.4cqi; }
.cdl-view .cdl-title { font-size: clamp(26px, 8.6cqi, 52px); line-height: 1.2; }
.cdl-view[data-kind="check"] .cdl-title { font-size: clamp(23px, 7.4cqi, 44px); }
.cdl-view .cdl-text { font-size: clamp(18px, 5.9cqi, 34px); line-height: 1.45; padding: 3.4cqi 4cqi; gap: 2.4cqi; font-weight: 700; }
.cdl-text .take { font-size: clamp(17px, 5.5cqi, 32px); padding: 2.6cqi 3.4cqi; gap: 3cqi; }
.cdl-text .take .ic { font-size: 1.5em; }
.cdl-text .take .ic img { width: 1.9em; height: 1.8em; }
.cdl-text .take.with-label .lbl { font-size: 0.65em; }
.cdl-text .rows { gap: 1.8cqi; }
.cdl-text .rows li, .cdl-text .lockgrid span { font-size: clamp(16px, 5.4cqi, 31px); padding: 2.1cqi 3.2cqi; gap: 3cqi; }
.cdl-text .rows li .ic { font-size: 1.3em; width: 1.5em; }
.cdl-text .lockgrid { gap: 2cqi; }
.cdl-text .reward { font-size: clamp(14px, 4.6cqi, 27px); padding: 2cqi 3cqi; gap: 2.4cqi; }
.cdl-text .reward img { width: 1.9em; height: 1.9em; }
.cdl-text.quote b { font-size: clamp(20px, 6.6cqi, 38px); }
.cdl-text.quote .q-ai { width: 2.2em; height: 2.1em; font-size: clamp(16px, 5cqi, 30px); }
.cdl-view .cdl-choices { gap: 2.4cqi; }
.cdl-view .cdl-choices .choice { font-size: clamp(18px, 5.9cqi, 34px); padding: 3.2cqi 4cqi; }
.cdl-view .cdl-choices .choice::before { width: 1.05em; height: 1.05em; }
.cdl-view .lesson-foot .btn-3d { font-size: clamp(19px, 3.2vw, 28px); max-width: 620px; padding-top: 16px; padding-bottom: 16px; }
.cdl-view .cdl-top .cdl-stop { font-size: clamp(14px, 2.6vw, 18px); }
/* 상자 높이: 모든 카드·완료 화면이 같은 높이 (가장 내용이 많은 카드에 맞춤) */
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { min-height: 0; height: var(--cdl-box-h, 74cqi); }
/* 확인 문제: 위쪽 지시문은 가운데 */
.cdl-view[data-kind="check"] .cdl-eyebrow { align-self: center; }
.cdl-view[data-kind="check"] .cdl-title { text-align: center; }
.cdl-text .rows { gap: 1.4cqi; }
.cdl-text .rows li { font-size: clamp(16px, 5.2cqi, 30px); padding: 1.5cqi 3cqi; line-height: 1.3; }
.cdl-text .reward { font-size: clamp(14px, 4.3cqi, 25px); padding: 1.6cqi 3cqi; line-height: 1.35; }
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { height: 84cqi; }
.cdl-text .take.gold { background: #fff6d6; border: 2px solid #f3dc8a; }
.cdl-text .take.gold .lbl { color: #9a6a00; }
.cdl-text .take.gold .ic img { width: 1.9em; height: 1.9em; object-fit: contain; }

/* ===== CDL v6: 카드 전체를 정해진 크기(가로 420)로 그리고, 화면에 맞춰 통째로 확대·축소 =====
   그림처럼 모든 기기에서 비율이 똑같고, 글자는 또렷하게 남는다 (fitCdl()이 zoom 값을 정함) */
.cdl-view .cdl-body { container-type: normal; width: 420px; max-width: none; flex: none; margin: 0 auto; gap: 10px; padding-top: 12px; }
.cdl-view .cdl-eyebrow { font-size: 15px; padding: 5px 12px; }
.cdl-view .cdl-title { font-size: 30px; line-height: 1.22; }
.cdl-view[data-kind="check"] .cdl-title { font-size: 26px; }
.cdl-view .scene-wrap { width: 420px; }
.cdl-view .scene-img { width: 420px; height: 127px; aspect-ratio: auto; }
.cdl-view .cdl-text { font-size: 20px; line-height: 1.45; padding: 14px 16px; gap: 10px; }
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { height: 300px; min-height: 0; }
.cdl-text .take { font-size: 19px; padding: 11px 14px; gap: 12px; }
.cdl-text .rows { gap: 6px; }
.cdl-text .rows li { font-size: 18px; padding: 6px 12px; gap: 12px; line-height: 1.3; }
.cdl-text .lockgrid { gap: 8px; }
.cdl-text .lockgrid span { font-size: 19px; padding: 10px 12px; gap: 8px; }
.cdl-text .reward { font-size: 16px; padding: 7px 12px; gap: 10px; line-height: 1.35; }
.cdl-text.quote b { font-size: 23px; }
.cdl-text.quote .q-ai { font-size: 20px; }
.cdl-view .cdl-choices { gap: 9px; }
.cdl-view .cdl-choices .choice { font-size: 20px; padding: 12px 15px; }
.cdl-view .lesson-foot .btn-3d { font-size: 21px; }
/* 상자 안 배치를 모든 카드에서 같게: 설명 글은 위, 그림 요소(요약·목록·자물쇠·배지 안내)는 아래에 붙인다 */
.cdl-view[data-kind="card"] .cdl-text > .lead + *, .cdl-view[data-kind="done"] .cdl-text > .lead + * { margin-top: auto; }

/* ===== CDL v7: 박스 안 글자를 시안 크기로 (설명 26 · 요약 26 · 목록 24 · 자물쇠 24 · 배지 안내 21 · AI 말 30 · 고르기 25),
   대신 줄 간격 1.25, 상자 안 여백을 줄여서 다섯 카드가 같은 높이 상자에 들어가게 ===== */
.cdl-view .cdl-title { font-size: 30px; }
.cdl-view[data-kind="check"] .cdl-title { font-size: 26px; }
.cdl-view .cdl-text { font-size: 26px; line-height: 1.25; padding: 12px 12px; gap: 8px; }
.cdl-view .cdl-text .lead { line-height: 1.25; }
.cdl-text .take { font-size: 26px; line-height: 1.25; padding: 9px 12px; gap: 10px; }
.cdl-text .take .ic img { width: 34px; height: 34px; }
.cdl-text .rows { gap: 5px; }
.cdl-text .rows li { font-size: 24px; line-height: 1.25; padding: 5px 10px; gap: 10px; }
.cdl-text .lockgrid { gap: 7px; }
.cdl-text .lockgrid span { font-size: 24px; line-height: 1.25; padding: 8px 10px; gap: 8px; }
.cdl-text .reward { font-size: 21px; line-height: 1.25; padding: 6px 10px; gap: 8px; }
.cdl-text .reward img { width: 30px; height: 30px; }
.cdl-text.quote b { font-size: 30px; line-height: 1.25; }
.cdl-view .cdl-choices .choice { font-size: 25px; line-height: 1.25; padding: 11px 14px; }
.cdl-view[data-kind="card"] .cdl-text, .cdl-view[data-kind="done"] .cdl-text { height: 332px; }
/* 제목 2px 키움 (카드 30→32, 확인 문제 26→28) */
.cdl-view .cdl-title { font-size: 32px; }
.cdl-view[data-kind="check"] .cdl-title { font-size: 28px; }
/* 큰 화면에서 키우지 않으니, 아래 버튼도 카드 폭(420)에 맞춤 */
.cdl-view .lesson-foot .btn-3d { max-width: 420px; }
@media (min-width: 900px) { .cdl-view .cdl-body, .cdl-view .lesson-foot .btn-3d { max-width: 420px; } }
/* 제목 2px 더 (카드 32→34, 확인 문제 28→30) */
.cdl-view .cdl-title { font-size: 34px; }
.cdl-view[data-kind="check"] .cdl-title { font-size: 30px; }
/* 확인 문제의 본문(AI가 한 말·고르기)도 카드 본문과 같은 글꼴로 */
.cdl-text.quote b { font-family: var(--font); font-weight: 800; }
.cdl-view .cdl-choices .choice { font-family: var(--font); font-weight: 700; }
/* 마지막 카드의 배지 안내는 2px 크게 (21→23) */
.cdl-view[data-kind="done"] .cdl-text .reward { font-size: 23px; }
.cdl-view[data-kind="done"] .cdl-text .reward img { width: 34px; height: 34px; }
/* 설명 글 안의 줄바꿈(\n)을 그대로 */
.cdl-view .cdl-text .lead { white-space: pre-line; }

/* ===== 단어 카드 (선생님이 찍어 올린 단어 목록) ===== */
.cards-body { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cards-body .coach { align-self: stretch; }
.wcard { position: relative; width: min(100%, 360px); aspect-ratio: 4 / 3; border: 0; padding: 0; background: none; cursor: pointer; perspective: 900px; font: inherit; color: var(--ink); }
.wcard .face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 26px; background: #fff; border: 3px solid var(--line); box-shadow: 0 6px 0 var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s cubic-bezier(.2,.8,.3,1); padding: 16px; }
.wcard .face.back { transform: rotateY(180deg); background: #fff8dc; border-color: #f0d585; box-shadow: 0 6px 0 #f0d585; }
.wcard.flipped .face.front { transform: rotateY(-180deg); }
.wcard.flipped .face.back { transform: rotateY(0); }
.wcard .pic { font-size: 54px; line-height: 1; min-height: 0; }
.wcard .pic:empty { display: none; }
.wcard b { font: 44px/1.15 var(--fun, var(--font)); word-break: keep-all; overflow-wrap: anywhere; text-align: center; }
.wcard .face.front b { font-family: var(--font); font-weight: 800; letter-spacing: .01em; }
.wcard small { font: 600 15px var(--font); color: var(--muted); }
.say-btn { font: 700 17px var(--font); background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.say-btn.big { font-size: 22px; padding: 14px 28px; }
.test-prompt .say-btn { margin-top: 10px; }
.skip-link { background: none; border: 0; color: var(--muted); font: 600 15px var(--font); text-decoration: underline; cursor: pointer; padding: 6px; }
.cards-foot { gap: 10px; }
.cards-foot .btn-3d { flex: 1; }
.btn-3d.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.btn-3d.ghost:disabled { opacity: .45; }
.node.test.cards:not(.done) { background: #ffc531; box-shadow: 0 6px 0 #e0a400; }
/* 시험지·단어 목록에서 잘라 온 그림 */
.wcard .pic img { display: block; max-width: 150px; max-height: 110px; object-fit: contain; border-radius: 12px; }
#test-pic img { display: block; max-width: min(340px, 78vw); max-height: 240px; object-fit: contain; border-radius: 14px; margin: 0 auto; }
/* 단어 카드 연습 (듀오링고식): 글자 먼저 읽기 · 첫소리 글자 · 철자 블록 · 잘라 온 그림 */
.quiz-prompt.text.read { font-family: var(--font); font-weight: 800; font-size: 52px; letter-spacing: .02em; color: var(--ink); }
.quiz-choices .choice.letter { font-family: var(--font); font-weight: 800; font-size: 40px; padding: 14px 10px; }
.quiz-choices.tiles.letters .tile { min-width: 54px; font-size: 26px; font-weight: 800; text-transform: lowercase; }
#build-line .tile { text-transform: none; }
.pic-card img { display: block; max-width: 170px; max-height: 140px; object-fit: contain; border-radius: 14px; margin: 0 auto; }

/* 수행평가: 듣기 문제 · 그림 보기 */
.listen-tag { align-self: center; background: #fff7e0; border: 2px solid #ffd36b; color: #8a5a00; border-radius: 999px; padding: 4px 14px; font: 17px var(--fun, inherit); margin-bottom: 6px; }
.test-choices.pics { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.test-choices .choice.img { padding: 8px; display: flex; align-items: center; justify-content: center; min-height: 130px; }
.test-choices .choice.img img { max-width: 100%; max-height: 150px; object-fit: contain; border-radius: 10px; display: block; pointer-events: none; }
/* 반 QR로 들어오기 */
.join-classes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 4px 0 12px; }
.join-class { font: 20px var(--fun, inherit); padding: 12px 18px; border-radius: 18px; border: 3px solid #e6ddd0; background: #fff; box-shadow: 0 5px 0 #e6ddd0; cursor: pointer; color: inherit; }
.join-class[aria-pressed="true"] { border-color: #4aa8ff; background: #eaf5ff; box-shadow: 0 5px 0 #2f86d6; }
.join-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
.join-row input { min-width: 0; font-size: 22px; text-align: center; }

/* 수행평가: 읽기 지문 · 쓰기 · 배열하기 */
.test-prompt .passage { align-self: stretch; text-align: left; white-space: pre-line; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; font-family: var(--font, inherit); font-size: 21px; line-height: 1.6; max-height: 40vh; overflow-y: auto; margin-bottom: 8px; }
.test-line { white-space: pre-line; text-align: center; font-family: var(--font, inherit); font-size: 20px; font-weight: 700; line-height: 1.6; margin-top: 6px; }
.test-line .blank { display: inline-block; min-width: 90px; border-bottom: 3px solid #ffb020; }
.test-text { display: block; width: min(360px, 100%); margin: 12px auto 0; font-size: 24px; font-weight: 700; text-align: center; padding: 12px 14px; border: 3px solid var(--line); border-radius: 16px; background: #fff; }
.test-text:focus { outline: none; border-color: #4aa8ff; }
.test-build { width: min(460px, 100%); justify-content: center; margin: 12px auto 4px; }
.test-build .end { font-size: 24px; font-weight: 800; }
.test-build .arr { font-size: 22px; font-weight: 800; color: #b5ae9f; }

/* 수행평가: ⓐ·ⓑ 빨간색 · 이전/제출 */
.test-prompt .mk, .test-prompt .q .mk { color: #e5484d; font-weight: 800; }
.test-foot { gap: 12px; }
.test-foot .btn-3d { flex: 1; max-width: 260px; }
.test-foot .btn-3d.ghost { background: #fff; color: #6b6a85; border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); flex: 0 0 34%; }
.test-foot .btn-3d.ghost:disabled { opacity: .45; }

/* 학년·반·번호·이름으로 들어오기 */
.join-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 10px; }
.join-grid label { display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--line); border-radius: 16px; padding: 4px 10px; }
.join-grid input { width: 100%; min-width: 0; border: 0; background: none; font-size: 26px; font-weight: 800; text-align: center; padding: 6px 0; }
.join-grid input:focus { outline: none; }
.join-grid label:focus-within { border-color: #4aa8ff; }
.join-grid span { font-size: 18px; color: #6b6a85; flex: none; }
.join-name { display: block; width: 100%; font-size: 22px; text-align: center; margin-bottom: 10px; }
.linklike { background: none; border: 0; color: #9a948a; font-size: 13px; text-decoration: underline; cursor: pointer; margin-top: 4px; }


.join-grid select { width: 100%; min-width: 0; border: 0; background: none; font-size: 26px; font-weight: 800; text-align: center; text-align-last: center; padding: 6px 0; appearance: none; -webkit-appearance: none; cursor: pointer; color: inherit; }
.join-grid select:focus { outline: none; }
.join-grid label { position: relative; }
.join-grid label::after { content: "▾"; position: absolute; left: 10px; color: #b5ae9f; font-size: 14px; pointer-events: none; }

/* 시험 끝 화면: AI 대화로 가기 + 지도로 */
.test-done-btns { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.test-done-btns .linklike { font-size: 17px; }

/* 위쪽 🔥·⚡·⭐·반 목표: 누르거나 갖다 대면 설명 */
.map-head button.stat { font-family: inherit; color: inherit; border: 0; cursor: pointer; }
[data-kidtip] { cursor: pointer; }
.kid-tip { position: fixed; z-index: 1000; max-width: min(300px, calc(100vw - 32px)); background: #2b2a4a; color: #fff; font-size: 16px; line-height: 1.45; padding: 10px 14px; border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); pointer-events: none; }
.kid-tip::before { content: ""; position: absolute; top: -7px; left: var(--ax, 50%); transform: translateX(-50%); border: 7px solid transparent; border-top: 0; border-bottom-color: #2b2a4a; }
/* XP는 오늘의 퀴즈에서만 쌓여 늘 0이라 숨김 */
#m-xp, #t-xp { display: none; }
.map-head .stat:has(#m-xp), .tstat:has(#t-xp) { display: none !important; }

/* ===== 듀오링고처럼 다듬기 ===== */
/* 위쪽: 상자 없이 아이콘 + 색깔 숫자, 아래에 얇은 줄 */
.map-head { border-bottom: 2px solid var(--line); margin-bottom: 6px; gap: 4px; }
.map-head .stat { background: none; box-shadow: none; padding: 6px 12px; border-radius: 12px; font-size: 24px; align-items: center; }
.map-head .stat:active { background: rgba(0,0,0,.05); }
.map-head .stat span { font-size: 26px; }
.map-head .s-fire b { color: #ff9600; }
.map-head .s-star b { color: #e8a800; }
.map-head .s-badge b { color: #ce82ff; }
/* 반 목표: 듀오링고 「친구 퀘스트」처럼 굵은 막대 + 숫자 + 선물 */
.team { padding: 12px 16px; border: 2px solid var(--line); box-shadow: none; border-radius: 18px; }
.team-text { font-family: var(--fun); font-size: 18px; font-weight: 400; margin-bottom: 8px; }
.team-bar { position: relative; height: 22px; border-radius: 999px; overflow: visible; background: #ece6dc; margin-right: 34px; }
.team-bar i { background: linear-gradient(#ffd84d, #ffc800); border-radius: 999px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); }
.team-bar em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 14px; font-weight: 800; color: #8a7a55; }
.team-bar::after { content: "🎁"; position: absolute; right: -34px; top: 50%; transform: translateY(-50%); font-size: 26px; }
.team.full .team-bar::after { animation: float 1.4s ease-in-out infinite; }
/* 단원 띠 */
.unit-banner small { font-family: var(--fun); font-weight: 400; font-size: 15px; opacity: .9; letter-spacing: .02em; }
/* 칸 이름: 크게, 진하게 */
.node-label { font-size: 15px; color: var(--ink, #3c3c3c); margin-top: 12px; }
/* 불꽃 화면: 숫자 톡, 배지 */
.streak-num.pop { animation: trophyIn .6s cubic-bezier(.2,1.6,.4,1); }
.streak-badge { display: flex; align-items: center; gap: 10px; background: #f6ecff; border: 2px solid #e3c7ff; color: #8e44c9; border-radius: 18px; padding: 10px 18px; margin: 4px 0 12px; font-family: var(--fun); font-size: 20px; animation: trophyIn .7s cubic-bezier(.2,1.5,.4,1) .5s both; }
.streak-badge .sb-medal { font-size: 34px; }
.streak-msg { font-family: var(--fun); font-size: 19px; color: #ff9600; }
/* 🔥 누르면 나오는 연속 학습일 화면 */
.streak-card { max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sk-top { display: flex; align-items: center; gap: 12px; }
.sk-top img { width: 90px; height: 86px; object-fit: contain; }
.sk-top b { display: block; font-family: var(--fun); font-weight: 400; font-size: 56px; line-height: 1; color: #ff9600; text-align: left; }
.sk-top span { font-family: var(--fun); font-size: 20px; color: #ff9600; }
.sk-help { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }
.sk-h { margin: 6px 0 0; font-family: var(--fun); font-weight: 400; font-size: 19px; }
.sk-road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.sk-step { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #f6f2ec; border-radius: 16px; padding: 10px 4px; color: var(--muted); }
.sk-step i { font-style: normal; font-size: 26px; filter: grayscale(1); opacity: .55; }
.sk-step span { font-family: var(--fun); font-size: 15px; }
.sk-step.got { background: #f6ecff; color: #8e44c9; box-shadow: 0 3px 0 #e3c7ff; }
.sk-step.got i { filter: none; opacity: 1; }
.sk-next { margin: 0; font-family: var(--fun); font-size: 17px; color: #ff9600; }

/* 오늘의 미션 (듀오링고 일일 퀘스트처럼) */
.missions { width: 100%; max-width: 520px; margin: 6px auto 4px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 16px 6px; }
.missions.all { border-color: #b7e4a0; background: #f4fbef; }
.ms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ms-head b { font-family: var(--fun); font-weight: 400; font-size: 18px; }
.ms-head span { font-size: 14px; font-weight: 700; color: #e8a800; }
.ms-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 2px solid #f3eee6; }
.ms-row:first-child { border-top: 0; }
.ms-row i { font-style: normal; font-size: 26px; width: 34px; text-align: center; flex: none; }
.ms-main { flex: 1; min-width: 0; }
.ms-main span { display: block; font-family: var(--fun); font-size: 16px; margin-bottom: 5px; }
.ms-bar { position: relative; height: 18px; background: #ece6dc; border-radius: 999px; overflow: hidden; }
.ms-bar b { display: block; height: 100%; background: linear-gradient(#ffd84d, #ffc800); border-radius: 999px; transition: width .8s ease; }
.ms-row.ok .ms-bar b { background: linear-gradient(#8ee000, #58cc02); }
.ms-bar em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 800; color: #7a6d55; }
/* 다시 보기 칸 · 곧 열려요 칸 */
.node.test.review { background: #ce82ff; box-shadow: 0 7px 0 #a568cc; color: #fff; font-size: 30px; }
.start-bubble.review { color: #a568cc; }
.node.locked-task { background: #e5e0d8; box-shadow: 0 7px 0 #cfc7bb; color: #fff; cursor: default; filter: grayscale(.2); }
.unit-banner.locked { background: #e9e4dc; box-shadow: 0 5px 0 #d6cfc4; color: #8f877b; }
.unit-banner.locked .ub-lock { font-size: 30px; opacity: .8; }
.node-wrap:has(.locked-task) .node-label, .node-wrap:has(.locked-task) .node-stars { color: #a59e92; }
/* 시험 중 강아지 응원 */
.test-cheer { position: fixed; left: max(16px, calc(50% - 380px)); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: flex-end; gap: 6px; pointer-events: none; z-index: 3; }
.test-cheer img { width: 64px; height: 64px; object-fit: contain; }
.test-cheer span { background: #fff; border: 2px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-family: var(--fun); font-size: 16px; margin-bottom: 30px; box-shadow: 0 3px 0 var(--line); }
.test-cheer.in { animation: cheerIn .4s cubic-bezier(.2,1.5,.4,1); }
@keyframes cheerIn { from { transform: translateY(16px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
/* 대화 중 미션 완료 알림 */
.mission-toast { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #58cc02; color: #fff; border-radius: 18px; padding: 10px 20px; box-shadow: 0 5px 0 #46a302; font-family: var(--fun); text-align: center; max-width: calc(100vw - 32px); animation: cheerIn .4s cubic-bezier(.2,1.5,.4,1); transition: opacity .5s, transform .5s; }
.mission-toast b { font-weight: 400; font-size: 18px; }
.mission-toast span { font-size: 15px; }
.mission-toast.out { opacity: 0; transform: translate(-50%, -12px); }
.sk-step i img { width: 40px; height: 40px; object-fit: contain; display: block; }
.sb-medal img { width: 52px; height: 52px; object-fit: contain; display: block; }

/* ===== 첫 화면 간소화 ===== */
.goal-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 2px auto 4px; }
.gchip { font-family: var(--fun); font-size: 15px; color: var(--ink, #3c3c3c); background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; box-shadow: 0 2px 0 var(--line); }
.gchip b { font-weight: 400; color: #e8a800; margin-left: 2px; }
.gchip.all { border-color: #b7e4a0; background: #f4fbef; }
.gchip.all b { color: #46a302; }
.goals-card { max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.goals-card .missions, .goals-card .team { margin: 0; max-width: none; }
.team-help { margin: 8px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.node.test.trophy { background: #ffc800; box-shadow: 0 7px 0 #e0a800; color: #fff; font-size: 32px; }
.node.test.trophy.done { background: #ffe58a; box-shadow: 0 7px 0 #f0cc5a; }
.node.test.extra { background: #58cc02; box-shadow: 0 7px 0 #46a302; color: #fff; font-size: 30px; }
.node.test.extra.done { background: #a5e27a; box-shadow: 0 7px 0 #86c95a; }
.start-bubble.extra { color: #46a302; }
.unit-banner.extra { background: #58cc02; box-shadow: 0 5px 0 #46a302; }
.star-gain { font-family: var(--fun); font-size: 28px; color: #e8a800; background: #fff8dc; border: 2px solid #ffe08a; border-radius: 18px; padding: 6px 18px; animation: trophyIn .6s cubic-bezier(.2,1.6,.4,1) .3s both; }

#qp-map .path { padding-bottom: 40px; }
/* 반짝이는 건 지금 할 칸 하나만 (듀오링고처럼) */
#m-path .node.test.new:not(.now) { animation: none; }
#m-path .node.test.new:not(.now)::before { display: none; }

/* ===== 듀오링고 색감: 흰 바탕, 단원마다 한 색, 흰 아이콘 ===== */
#qp-map { background: #fff; }
#qp-map .map-head { background: #fff; border-bottom-color: #e5e5e5; }
#qp-map .map-foot { background: linear-gradient(rgba(255,255,255,0), #fff 30%); }
.path-sec { --c: #58cc02; --cd: #58a700; --cl: #d7ffb8; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-bottom: 18px; }
.path-sec.sec-purple { --c: #ce82ff; --cd: #a568cc; --cl: #f3e3ff; }
.path-sec.sec-gray { --c: #afafaf; --cd: #8f8f8f; --cl: #eee; }
.unit-banner.duo { background: var(--c); box-shadow: 0 5px 0 var(--cd); border-radius: 16px; padding: 16px 20px; color: #fff; display: block; width: 100%; max-width: 520px; }
.unit-banner.duo small { display: block; font-family: var(--fun); font-weight: 400; font-size: 15px; opacity: .85; letter-spacing: .02em; }
.unit-banner.duo b { font-family: var(--fun); font-weight: 400; font-size: 23px; }
.node.duo { width: 76px; height: 70px; border-radius: 50%; background: var(--c); box-shadow: 0 8px 0 var(--cd); color: #fff; display: grid; place-items: center; padding: 0; position: relative; animation: none; }
.node.duo svg { width: 36px; height: 36px; }
.node.duo:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--cd); }
.node.duo.done { background: var(--c); box-shadow: 0 8px 0 var(--cd); }
.node.duo.done svg { width: 32px; height: 32px; }
.node.duo.trophy:not(.locked) { background: #ffc800; box-shadow: 0 8px 0 #e5a400; }
.node.duo.locked { background: #e5e5e5; box-shadow: 0 8px 0 #c9c9c9; color: #afafaf; }
.node.duo.now::before { content: ""; position: absolute; inset: -11px; border-radius: 50%; border: 7px solid #e5e5e5; border-top-color: var(--c); border-right-color: var(--c); }
.node.duo.trophy.now::before { border-top-color: #ffc800; border-right-color: #ffc800; }
.duo-wrap { position: relative; }
.duo-wrap:has(.start-bubble) { margin-top: 44px; }
.start-bubble.duo { top: -50px; color: var(--c); border: 2px solid #e5e5e5; font-family: var(--fun); font-weight: 400; font-size: 17px; letter-spacing: .02em; }
.start-bubble.duo::after { border-color: #e5e5e5; }
.duo-wrap:has(.trophy) .start-bubble.duo { color: #e5a400; }
.node-pop { position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%); z-index: 6; width: 250px; background: var(--c); color: #fff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; text-align: left; box-shadow: 0 8px 20px rgba(0,0,0,.12); animation: cheerIn .25s ease-out; }
.node-pop::before { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 16px; height: 16px; background: var(--c); }
.node-pop b { font-family: var(--fun); font-weight: 400; font-size: 19px; }
.node-pop span { font-size: 14px; opacity: .92; line-height: 1.4; }
.node-pop button { margin-top: 6px; border: 0; border-radius: 14px; background: #fff; color: var(--cd); font-family: var(--fun); font-size: 18px; padding: 11px; box-shadow: 0 4px 0 rgba(0,0,0,.12); cursor: pointer; }
.duo-wrap:has(.trophy:not(.locked)) .node-pop, .duo-wrap:has(.trophy:not(.locked)) .node-pop::before { background: #ffc800; }
.duo-wrap:has(.trophy:not(.locked)) .node-pop button { color: #b88300; }
.node-pop.off { background: #e5e5e5 !important; color: #777; }
.node-pop.off::before { background: #e5e5e5 !important; }
.gchip { border-color: #e5e5e5; box-shadow: 0 2px 0 #e5e5e5; }
.duo-wrap:has(.node-pop) { z-index: 20; }
.quiz-view:has(#qp-map:not([hidden])) { background: #fff; }


/* =====================================================================
   듀오링고 느낌 — 흰 바탕, 굵고 둥근 글씨, 바닥이 두꺼운 버튼,
   초록(정답·계속) · 하늘(고른 것) · 빨강(틀림) · 주황(불꽃) · 노랑(별)
   아이콘·그림은 직접 그린 것과 강아지 캐릭터만 쓴다
   ===================================================================== */
:root {
  --font: "NanumSquareRound", "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --fun: "NanumSquareRound", var(--font);
  --bg: #ffffff; --card: #ffffff; --ink: #4b4b4b; --muted: #777777; --line: #e5e5e5;
  --primary: #58cc02; --primary-dark: #58a700; --primary-ink: #ffffff;
  --good: #58cc02; --good-dark: #58a700; --good-bg: #d7ffb8;
  --bad: #ff4b4b; --bad-bg: #ffdfe0;
  --sky: #1cb0f6; --sky-dark: #1899d6; --gold: #ffc800; --gold-dark: #e5a400; --lock: #e5e5e5;
  --ai: #ffffff; --ai-ink: #4b4b4b; --me: #ddf4ff; --me-ink: #1899d6;
}
body { background: #fff; color: var(--ink); font-family: var(--font); font-weight: 700; }
h1, h2, h3, .done-title, .sheet-title, .streak-label, .coach-bubble, .choice, .tile, .btn, .btn-3d, .stat, .tstat, .node-label, .start-bubble, .team-text, .gchip, .ms-head b, .ms-main span, .unit-banner b, .unit-banner small, .week span, .dcard span, .dcard b, .hero-greet, .kid-btn .tail, .assent-text p, .task-card h2, .quiz-feedback, .combo, .node-pop b, .node-pop button, .sk-top b, .sk-top span, .sk-h, .sk-next, .streak-msg, .streak-badge, .star-gain, .test-cheer span, .mission-toast b { font-family: var(--font) !important; font-weight: 800 !important; letter-spacing: 0; }
.bubble { font-family: var(--font); font-weight: 700; }
.card, .card.kid { background: #fff; box-shadow: none; border: 2px solid var(--line); }
.screen { background: #fff; }

/* 버튼: 둥근 네모 + 바닥 4px */
.btn-3d, .btn.primary { background: var(--primary); color: #fff; border: 0; border-radius: 16px; box-shadow: 0 4px 0 var(--primary-dark); font-size: 19px; letter-spacing: .03em; padding: 14px 22px; }
.btn-3d:active:not(:disabled), .btn.primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--primary-dark); }
.btn-3d:disabled, .btn.primary:disabled { background: #e5e5e5; box-shadow: 0 4px 0 #cecece; color: #afafaf; opacity: 1; }
.btn.primary:not(:disabled):hover { background: #61e002; }
.btn-3d.ghost, .btn.ghost, .btn.stop, .btn.place, .btn.mic { background: #fff; color: var(--sky-dark); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--line); }
.btn-3d.ghost:disabled { color: #cecece; }
.btn-3d.good { background: var(--good); box-shadow: 0 4px 0 var(--good-dark); }
.btn-3d.bad { background: var(--bad); box-shadow: 0 4px 0 #ea2b2b; }
#map-chat, #test-done-chat { background: var(--sky); box-shadow: 0 4px 0 var(--sky-dark); }
#streak-next { background: var(--sky); box-shadow: 0 4px 0 var(--sky-dark); }
.linklike, .skip-link { color: var(--sky); font-weight: 800; text-decoration: none; letter-spacing: .03em; }

/* 고르는 칸 */
.choice { background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 4px 0 var(--line); }
.choice:hover:not(:disabled):not(.right):not(.wrong):not(.sel) { background: #f7f7f7; }
.choice.sel { border-color: #84d8ff; background: #ddf4ff; color: var(--sky-dark); box-shadow: 0 4px 0 #84d8ff; }
.choice.right { border-color: #a5ed6e; background: var(--good-bg); color: var(--good-dark); box-shadow: 0 4px 0 #a5ed6e; }
.choice.wrong { border-color: #ffc1c1; background: var(--bad-bg); color: #ea2b2b; box-shadow: 0 4px 0 #ffc1c1; }
.tile { border: 2px solid var(--line); border-radius: 12px; box-shadow: 0 3px 0 var(--line); color: var(--ink); background: #fff; }
input[type="text"], textarea, select, .test-text, .join-name { border: 2px solid var(--line); border-radius: 14px; background: #f7f7f7; color: var(--ink); font-family: var(--font); font-weight: 700; }
input[type="text"]:focus, textarea:focus, .test-text:focus { border-color: #84d8ff; background: #fff; outline: none; }

/* 레슨 위쪽 진행 막대 */
.lbar { height: 16px; background: #e5e5e5; }
.lbar i { background: var(--good); box-shadow: inset 0 4px 0 rgba(255,255,255,.28); }
.combo { color: var(--gold-dark); font-size: 14px; letter-spacing: .04em; }
.x-btn { color: #afafaf; }

/* 강아지 말풍선 */
.coach-bubble, .test-cheer span, .start-bubble { background: #fff; border: 2px solid var(--line); color: var(--ink); border-radius: 14px; box-shadow: none; }
.coach-bubble::before { border-color: var(--line); background: #fff; }

/* 아래 정답·오답 띠 */
.sheet { border-top: 0 !important; padding: 20px 16px 24px; }
.sheet.good { background: var(--good-bg); }
.sheet.bad { background: var(--bad-bg); }
.sheet-title { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.sheet.good .sheet-title { color: var(--good-dark); }
.sheet.bad .sheet-title { color: #ea2b2b; }
.sheet .sheet-title::before { content: "✓"; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--good); font-size: 18px; flex: none; }
.sheet.bad .sheet-title::before { content: "✕"; color: #ea2b2b; }
.sheet-sub { color: inherit; font-weight: 700; }
.sheet.good .sheet-sub { color: var(--good-dark); }
.sheet.bad .sheet-sub { color: #ea2b2b; }
.sheet-img { display: none; }

/* 레슨 끝: 노란 큰 제목 + 세 칸 카드 */
.done-title { color: var(--gold); font-size: 36px; }
.done-cards { gap: 12px; }
.dcard { border-width: 2px; border-radius: 16px; }
.dcard span { font-size: 13px; letter-spacing: .04em; padding: 5px 0; }
.dcard b { font-size: 24px; padding: 12px 0; }
.dcard.c-xp { border-color: var(--gold); background: var(--gold); }
.dcard.c-xp b { background: #fff; color: var(--gold-dark); border-radius: 0 0 14px 14px; }
.dcard.c-acc { border-color: var(--good); background: var(--good); }
.dcard.c-acc b { background: #fff; color: var(--good-dark); border-radius: 0 0 14px 14px; }
.dcard.c-time { border-color: var(--sky); background: var(--sky); }
.dcard.c-time b { background: #fff; color: var(--sky-dark); border-radius: 0 0 14px 14px; }

/* 불꽃 화면 */
.streak-num { color: #ff9600; font-family: var(--font); font-weight: 800; }
.streak-label { color: #ff9600; }
.week { box-shadow: none; border: 2px solid var(--line); }
.week i { background: #e5e5e5; }
.week .on i { background: #ff9600; }
.week .now { color: #ff9600; }

/* 대화 */
.chat-top { background: #fff; border-bottom: 2px solid var(--line); }
.bubble.ai { background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 18px; border-bottom-left-radius: 6px; box-shadow: none; }
.bubble.me { background: #ddf4ff; color: var(--sky-dark); border: 2px solid #84d8ff; border-radius: 18px; border-bottom-right-radius: 6px; }
.composer { background: #fff; border-top: 2px solid var(--line); }
.composer .btn.send { background: var(--primary); box-shadow: 0 4px 0 var(--primary-dark); border-radius: 16px; }
.tstat { background: #fff; border: 2px solid var(--line); box-shadow: none; }

/* 첫 화면·동의·카메라 카드 */
.card.kid h2 { color: var(--ink); }
.join-grid label { border: 2px solid var(--line); border-radius: 16px; background: #f7f7f7; }
.kid-btn { border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); border-radius: 16px; background: #fff; }
.eyebrow { color: var(--sky); letter-spacing: .04em; }
.check { background: #f7f7f7; border: 2px solid var(--line); border-radius: 16px; }

/* 단어 카드 넘기기 */
.wcard .face { border: 2px solid var(--line); border-radius: 20px; box-shadow: 0 4px 0 var(--line); }

/* 단원 띠: 오른쪽에 공책 아이콘 칸 (듀오링고 가이드북 자리) */
.unit-banner.duo { display: flex; align-items: stretch; justify-content: space-between; padding: 0; overflow: hidden; }
.unit-banner.duo > div { padding: 16px 20px; }
.unit-banner.duo .ub-guide { display: grid; place-items: center; width: 62px; border-left: 2px solid rgba(0,0,0,.12); color: #fff; }
.unit-banner.duo .ub-guide svg { width: 26px; height: 26px; }
.unit-banner.duo small { letter-spacing: .04em; }
/* 정답·오답 띠: 듀오링고처럼 제목 → 뜻 → 버튼 (세로로) */
.sheet-inner { display: flex !important; flex-direction: column; align-items: stretch; gap: 4px; }
.sheet-title { align-self: flex-start; font-size: 24px; }
.sheet-sub { margin: 2px 0 8px 40px; font-size: 18px; }
.sheet-inner .btn-3d { margin-top: 8px; }

/* ===== AI 친구 부르는 강아지 (지도 아래) ===== */
.map-foot { flex-direction: column; align-items: center; gap: 0; padding-top: 6px; }
.chat-dock { display: flex; align-items: flex-end; gap: 6px; width: 100%; max-width: 520px; margin-bottom: -6px; position: relative; z-index: 1; pointer-events: none; }
.cd-pup { width: 92px; height: 74px; object-fit: contain; animation: pupBob 2.4s ease-in-out infinite; }
.cd-bubble { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 8px 14px; font-weight: 800; font-size: 16px; color: var(--ink); margin-bottom: 34px; }
.cd-bubble::before { content: ""; position: absolute; left: -8px; bottom: 10px; width: 12px; height: 12px; background: #fff; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
#map-chat { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; padding: 16px 22px; }
#map-chat svg { width: 24px; height: 24px; }
@keyframes pupBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
/* 길 옆 강아지 */
.path-sec { position: relative; }
.path-pup { position: absolute; right: max(4%, calc(50% - 250px)); top: 150px; width: 104px; height: 92px; object-fit: contain; opacity: .95; pointer-events: none; }
@media (max-width: 480px) { .path-pup { width: 78px; height: 70px; right: 2%; } }
/* 단어장 */
.ub-guide { border: 0; background: none; cursor: pointer; }
.guide-card { max-width: 480px; text-align: left; display: flex; flex-direction: column; gap: 10px; max-height: 86vh; overflow-y: auto; }
.gd-head small { display: block; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.gd-head b { font-size: 22px; color: var(--ink); }
.gd-h { margin: 6px 0 0; font-size: 17px; color: var(--ink); }
.gd-list { display: flex; flex-direction: column; gap: 6px; }
.gd-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 10px; text-align: left; font: inherit; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 3px 0 var(--line); cursor: pointer; }
.gd-row b { color: var(--sky-dark); font-size: 18px; }
.gd-row span { color: var(--ink); font-size: 16px; }
.gd-row i { font-style: normal; }
#gd-sents .gd-row { grid-template-columns: 1fr auto; }
#gd-sents .gd-row span { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--muted); }
#gd-sents .gd-row i { grid-column: 2; grid-row: 1 / 3; }
/* 미션: 오른쪽 상자 */
.ms-row { gap: 14px; }
.ms-row .chest { width: 46px; flex: none; font-style: normal; }
.ms-row .chest svg { width: 46px; height: 38px; display: block; }
.ms-bar { height: 20px; }
.ms-bar b { background: #ffc800; }
/* 미션·반 목표 카드 안: 왼쪽 정렬, 반 목표는 강아지 그림 + 막대 */
.goals-card { text-align: left; }
.goals-card .team { display: grid !important; grid-template-columns: 64px 1fr; align-items: center; column-gap: 12px; padding: 14px 16px; }
.goals-card .team > img { width: 64px; height: 54px; grid-row: 1 / 3; }
.goals-card .team > div { min-width: 0; }
.goals-card .team .team-text { text-align: left; margin-bottom: 8px; }
.goals-card .team-help { grid-column: 1 / -1; }
.goals-card .ms-main span { text-align: left; }
.goals-card .team > img { grid-column: 1; grid-row: 1; }
.goals-card .team > div { grid-column: 2; grid-row: 1; width: 100%; }
.goals-card .team > .team-help { grid-column: 1 / -1; grid-row: 2; text-align: left; }

/* ===== 반 목표 (미션 카드 안) ===== */
.team2 { display: grid; grid-template-columns: 64px 1fr; align-items: center; column-gap: 12px; row-gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; text-align: left; }
.team2 > img { width: 64px; height: 54px; object-fit: contain; }
.t2-main { min-width: 0; }
.team2 .team-text { font-size: 18px; margin: 0 0 8px; text-align: left; }
.t2-bar { position: relative; height: 22px; border-radius: 999px; background: #e5e5e5; overflow: hidden; }
.t2-bar i { display: block; height: 100%; width: 0; background: #ffc800; border-radius: 999px; box-shadow: inset 0 4px 0 rgba(255,255,255,.3); transition: width .8s ease; }
.t2-bar em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 800; color: #8a6d00; }
.team2 .team-help { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
.goals-card .ms-main span { text-align: left !important; }
.goals-card .ms-head { text-align: left; }
/* ===== 보물상자 칸 ===== */
.node.duo.chest { color: #fff; background: #ffb020; box-shadow: 0 8px 0 #d98a00; }
.node.duo.chest svg { width: 42px; height: 36px; }
.node.duo.chest.locked { background: #e5e5e5; box-shadow: 0 8px 0 #c9c9c9; color: #bdbdbd; }
.node.duo.chest.opened { background: #ffe39a; box-shadow: 0 8px 0 #f0c85a; color: #fff; }
.node.duo.chest.ready.now::before { border-top-color: #ffb020; border-right-color: #ffb020; }
.duo-wrap:has(.chest.ready) .node-pop, .duo-wrap:has(.chest.ready) .node-pop::before { background: #ffb020; }
.duo-wrap:has(.chest.ready) .node-pop button { color: #b06d00; }
.chest-pop { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; background: rgba(0,0,0,.25); transition: opacity .5s; }
.chest-pop.out { opacity: 0; }
.cp-card { background: #fff; border-radius: 24px; padding: 26px 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: trophyIn .6s cubic-bezier(.2,1.6,.4,1); }
.cp-card svg { width: 120px; height: 100px; }
.cp-card b { font-size: 22px; color: var(--ink); }
.cp-card span { font-size: 30px; font-weight: 800; color: #e5a400; }
/* ===== 연속 목표 고르기 ===== */
.goal-pick { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; margin: 4px 0 10px; }
.gp-q { margin: 0 0 2px; font-weight: 800; color: var(--ink); text-align: center; }
.gp-opt { display: flex; justify-content: space-between; align-items: center; font: inherit; background: #fff; border: 2px solid var(--line); border-radius: 14px; box-shadow: 0 3px 0 var(--line); padding: 12px 16px; cursor: pointer; }
.gp-opt b { font-size: 18px; color: var(--ink); }
.gp-opt span { font-size: 15px; color: var(--muted); font-weight: 700; }
.gp-opt.sel { border-color: #84d8ff; background: #ddf4ff; box-shadow: 0 3px 0 #84d8ff; }
.gp-opt.sel b, .gp-opt.sel span { color: var(--sky-dark); }
.streak-badge.goal { background: #fff4d6; border-color: #ffd970; color: #b37f00; }
/* ===== 레슨: 새 단어 · 연속 정답 · 강아지 표정 ===== */
.new-word-tag { align-self: flex-start; color: #ce82ff; font-weight: 800; font-size: 15px; letter-spacing: .04em; margin: -4px 0 4px; }
.combo-burst { position: fixed; left: 50%; top: 34%; z-index: 1250; transform: translate(-50%, -50%); font-family: var(--font); font-weight: 800; font-size: clamp(34px, 8vw, 64px); color: #ffc800; -webkit-text-stroke: 3px #ff9600; text-shadow: 0 6px 0 #ff9600; white-space: nowrap; pointer-events: none; }
.combo-burst.go { animation: burst 1.4s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.3) rotate(-8deg); opacity: 0; } 18% { transform: translate(-50%, -50%) scale(1.15) rotate(-4deg); opacity: 1; } 30% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { transform: translate(-50%, -70%) scale(1) rotate(-4deg); opacity: 0; } }
.coach-img.react { animation: pupPop .5s cubic-bezier(.2,1.6,.4,1); }

/* ===== AI 똑똑하게 쓰기: 예전 크림색 테마로 되돌림 (듀오링고 느낌은 이 화면에만 적용하지 않음) ===== */
.cdl-view {
  --bg: #fdf6ec; --card: #ffffff; --ink: #2b2a4c; --muted: #6b6a85; --line: #ece4d8;
  --primary: #7b45e6; --primary-ink: #ffffff; --primary-dark: #5a2fc2;
  --good: #3cc46b; --good-dark: #2a9c52; --good-bg: #dff7e8; --bad: #ff6b5b; --bad-bg: #ffe4df;
  --gold: #ffc531; --gold-dark: #e0a400; --sky: #4aa8ff; --sky-dark: #2b86d9; --lock: #e3ddd3;
  --font: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --fun: "Jua", var(--font);
  --cdl: var(--primary); --cdl-dark: var(--primary-dark); --cdl-soft: #f1eaff; --cdl-line: #ece4d8;
  background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 400;
}
.cdl-view .qpanel { background: var(--bg); }
.cdl-view :is(h2, .btn-3d, .choice, .tile, .sheet-title, .coach-bubble) { font-family: var(--fun) !important; font-weight: 400 !important; letter-spacing: 0; }
.cdl-view .btn-3d { font-size: 22px; letter-spacing: .02em; color: #fff; background: var(--primary); border-radius: 18px; padding: 15px 24px; box-shadow: 0 5px 0 var(--primary-dark); }
.cdl-view .btn-3d:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--primary-dark); }
.cdl-view .btn-3d:disabled { background: var(--lock); box-shadow: 0 5px 0 #cfc7bb; color: #9d978c; }
.cdl-view .btn-3d.good { background: var(--good); box-shadow: 0 5px 0 var(--good-dark); }
.cdl-view .btn-3d.bad { background: var(--bad); box-shadow: 0 5px 0 #d94b3c; }
.cdl-view .lbar { height: 18px; background: var(--lock); }
.cdl-view .lbar i { background: var(--good); box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.cdl-view .choice { border-radius: 18px; border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); background: #fff; color: var(--ink); }
.cdl-view .choice:hover:not(:disabled):not(.right):not(.wrong):not(.sel) { background: #fffaf4; }
.cdl-view .choice.sel { border-color: var(--sky); background: #eaf5ff; box-shadow: 0 5px 0 var(--sky); color: var(--sky-dark); }
.cdl-view .choice.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 5px 0 var(--good); color: var(--ink); }
.cdl-view .choice.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 5px 0 var(--bad); color: var(--ink); }
.cdl-view .cdl-stop { border: 1.5px solid var(--line); color: var(--muted); background: transparent; font-weight: 400; }
/* 아래 정답·오답 띠: 예전처럼 강아지 그림 + 제목/설명 */
.cdl-view .sheet { border-top: 3px solid transparent !important; padding: 16px 16px 22px; }
.cdl-view .sheet.good { background: var(--good-bg); border-top-color: #b8ecc9 !important; }
.cdl-view .sheet.bad { background: var(--bad-bg); border-top-color: #ffc7bd !important; }
.cdl-view .sheet-inner { display: grid !important; grid-template-columns: 96px 1fr; grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; }
.cdl-view .sheet-img { display: block; grid-row: 1 / 3; width: 96px; height: 90px; object-fit: contain; }
.cdl-view .sheet-title { display: block; font-size: 28px; align-self: end; }
.cdl-view .sheet .sheet-title::before { content: none; }
.cdl-view .sheet.good .sheet-title { color: var(--good-dark); }
.cdl-view .sheet.bad .sheet-title { color: #d94b3c; }
.cdl-view .sheet-sub, .cdl-view .sheet.good .sheet-sub, .cdl-view .sheet.bad .sheet-sub { align-self: start; margin: 0; font-size: 19px; font-weight: 700; color: var(--ink); }
.cdl-view .sheet-inner .btn-3d { grid-column: 1 / -1; margin-top: 12px; max-width: none; }

/* >>> 강아지 시안 시작 */
/* =====================================================================
   강아지 시안 — 학생 화면(지도·레슨·완료·수행평가·복습)
   시안은 폰 화면(가로 390) 기준이라, 태블릿에서는 같은 비율로 통째로 키운다.
   @N = 시안의 N px (화면 크기에 맞춰 늘어남). scripts/kids-mock.css.tpl 에서 만든다.
   ===================================================================== */
:root { --p: calc(min(100vw, 620px, 57vh) / 390); }
@supports (height: 1dvh) { :root { --p: calc(min(100vw, 620px, 57dvh) / 390); } }
#quiz-view, .mission-toast, .chest-pop.full {
  --font: "KidsEn", "NanumSquareRound", "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --fun: var(--font);
  --ink: #3c3c3c; --muted: #7a7f87; --line: #e5e5e5;
  --g: #58cc02; --g-top: #6fd826; --g-d: #46a302; --g-bg: #d7ffb8; --g-ink: #58a700;
  --sky: #1cb0f6; --sky-top: #3dc0ff; --sky-d: #1592cf; --sky-bg: #ddf4ff; --sky-line: #84d8ff;
  --red: #ff4b4b; --red-d: #e03535; --red-bg: #ffe1e2; --red-ink: #ea2b2b;
  --gold: #ffc800; --gold-d: #e5a400; --orange: #ff9600;
  --purple: #ce82ff; --purple-d: #a568cc;
  --bar: #e5e7eb;
}
#quiz-view { background: #fff; color: var(--ink); font-family: var(--font); }
#quiz-view .qpanel { background: #fff; padding: calc(var(--p) * 12) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 14); }
#quiz-view :is(.done-title, .streak-label, .sheet-title, .quiz-prompt.text, .ms-title, .cp-title, .unit-banner b) { font-weight: 900 !important; }

/* ---------- 버튼 (바닥 두꺼운 둥근 네모, 위가 조금 밝게) ---------- */
#quiz-view .btn-3d, .chest-pop.full .btn-3d {
  width: 100%; max-width: none; min-height: calc(var(--p) * 54); padding: 0 calc(var(--p) * 18); border: 0; border-radius: calc(var(--p) * 16);
  font: 900 calc(var(--p) * 21)/1 var(--font) !important; letter-spacing: .02em; color: #fff;
  background: linear-gradient(var(--g-top), var(--g)); box-shadow: 0 calc(var(--p) * 5) 0 var(--g-d);
  display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--p) * 10);
}
#quiz-view .btn-3d:active:not(:disabled) { transform: translateY(calc(var(--p) * 4)); box-shadow: 0 calc(var(--p) * 1) 0 var(--g-d); }
#quiz-view .btn-3d:disabled { background: #e5e5e5; box-shadow: 0 calc(var(--p) * 5) 0 #cfcfcf; color: #afafaf; }
#quiz-view .btn-3d.bad { background: linear-gradient(#ff6161, var(--red)); box-shadow: 0 calc(var(--p) * 5) 0 var(--red-d); }
#quiz-view .btn-3d.good { background: linear-gradient(var(--g-top), var(--g)); box-shadow: 0 calc(var(--p) * 5) 0 var(--g-d); }
#quiz-view .btn-3d.ghost { background: #fff; color: #1d3f78; border: calc(var(--p) * 2.5) solid var(--line); box-shadow: 0 calc(var(--p) * 4) 0 var(--line); }
#quiz-view :is(#map-chat, #test-done-chat, #streak-next, #gd-close, .btn-3d.sky) { background: linear-gradient(var(--sky-top), var(--sky)); box-shadow: 0 calc(var(--p) * 5) 0 var(--sky-d); }
#quiz-view #streak-next:disabled { background: #e5e5e5; box-shadow: 0 calc(var(--p) * 5) 0 #cfcfcf; color: #afafaf; }
#quiz-view .btn-3d img { width: calc(var(--p) * 30); height: calc(var(--p) * 30); object-fit: contain; filter: brightness(0) invert(1); }

/* ---------- 위쪽: ✕ · 진행 막대 · 1/8 ---------- */
#quiz-view .lesson-top, #quiz-view .done-top, .chest-pop.full .done-top { display: flex; align-items: center; gap: calc(var(--p) * 12); width: 100%; max-width: none; margin: 0; padding: calc(var(--p) * 6) 0 0; }
#quiz-view .x-btn, .chest-pop.full .x-btn { width: calc(var(--p) * 30); height: calc(var(--p) * 30); padding: 0; flex: none; color: #afafaf; background: none; border: 0; display: grid; place-items: center; cursor: pointer; }
#quiz-view .x-btn svg, .chest-pop.full .x-btn svg { width: 100%; height: 100%; display: block; }
#quiz-view .lbar, .chest-pop.full .lbar { flex: 1; height: calc(var(--p) * 16); background: var(--bar); border-radius: 999px; overflow: hidden; }
#quiz-view .lbar i, .chest-pop.full .lbar i { position: relative; display: block; height: 100%; border-radius: 999px; background: var(--g); box-shadow: none; }
#quiz-view .lbar i::after, .chest-pop.full .lbar i::after { content: ""; position: absolute; left: calc(var(--p) * 8); right: calc(var(--p) * 8); top: calc(var(--p) * 3); height: calc(var(--p) * 4); border-radius: 999px; background: rgba(255,255,255,.35); }
#quiz-view .test-count { font: 900 calc(var(--p) * 15) var(--font); color: var(--muted); min-width: calc(var(--p) * 30); text-align: right; }
#quiz-view .combo { display: inline-flex; align-items: center; gap: calc(var(--p) * 3); font: 900 calc(var(--p) * 15) var(--font) !important; color: var(--orange); }
#quiz-view .combo img { width: calc(var(--p) * 22); height: calc(var(--p) * 22); object-fit: contain; }
#quiz-view .dt-star, .chest-pop.full .dt-star { display: inline-flex; align-items: center; gap: calc(var(--p) * 5); font: 900 calc(var(--p) * 18) var(--font); color: #c77700; }
#quiz-view .dt-star img, .chest-pop.full .dt-star img { width: calc(var(--p) * 26); height: calc(var(--p) * 26); object-fit: contain; }

/* ---------- 레슨 본문 ---------- */
#quiz-view .lesson-body { flex: 1; width: 100%; max-width: none; margin: 0; padding-top: calc(var(--p) * 22); display: flex; flex-direction: column; gap: calc(var(--p) * 14); }
#quiz-view .coach { display: flex; align-items: center; gap: calc(var(--p) * 8); margin: 0; }
#quiz-view .coach-img { width: calc(var(--p) * 122); height: calc(var(--p) * 112); object-fit: contain; object-position: center bottom; flex: none; filter: none; }
#quiz-view .coach-bubble { position: relative; flex: 0 1 auto; background: #fff; border: calc(var(--p) * 2) solid #dfe3e8; border-radius: calc(var(--p) * 16); padding: calc(var(--p) * 12) calc(var(--p) * 16); font: 800 calc(var(--p) * 17)/1.38 var(--font) !important; color: var(--ink); box-shadow: none; word-break: keep-all; text-wrap: balance; }
#quiz-view .coach-bubble::before { content: ""; position: absolute; left: calc(var(--p) * -8); top: 50%; width: calc(var(--p) * 14); height: calc(var(--p) * 14); transform: translateY(-50%) rotate(45deg); background: #fff; border: 0; border-left: calc(var(--p) * 2) solid #dfe3e8; border-bottom: calc(var(--p) * 2) solid #dfe3e8; }
#quiz-view .new-word-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: calc(var(--p) * 4); margin: calc(var(--p) * -8) 0 calc(var(--p) * -10); padding: 0; background: none; border: 0; font: 900 calc(var(--p) * 14) var(--font); color: #b35ce6; }
#quiz-view .new-word-tag img { width: calc(var(--p) * 18); height: calc(var(--p) * 18); object-fit: contain; }
#quiz-view .quiz-prompt { margin: calc(var(--p) * 4) 0 calc(var(--p) * 2); min-height: 0; font-size: calc(var(--p) * 40); color: var(--ink); }
#quiz-view .quiz-prompt.text { font: 900 calc(var(--p) * 34)/1.2 var(--font) !important; letter-spacing: 0; color: var(--ink); }
#quiz-view .quiz-prompt.text.read { font-size: calc(var(--p) * 48) !important; letter-spacing: .01em; }
#quiz-view #qp-lesson[data-kind="build"] .quiz-prompt.text { font-size: calc(var(--p) * 27) !important; }
#quiz-view #qp-lesson[data-kind="spell"] .quiz-prompt.text { font-size: calc(var(--p) * 30) !important; }
#quiz-view .quiz-prompt .listen-btn { width: calc(var(--p) * 96); height: calc(var(--p) * 74); border-radius: calc(var(--p) * 18); border: 0; color: #fff; background: linear-gradient(var(--sky-top), var(--sky)); box-shadow: 0 calc(var(--p) * 6) 0 var(--sky-d); display: grid; place-items: center; font-size: 0; }
#quiz-view .quiz-prompt .listen-btn svg { width: calc(var(--p) * 44); height: calc(var(--p) * 44); }
#quiz-view .pic-card { border: calc(var(--p) * 2.5) solid var(--line); border-radius: calc(var(--p) * 18); box-shadow: 0 calc(var(--p) * 4) 0 var(--line); padding: calc(var(--p) * 10); }
#quiz-view .pic-card img { max-width: calc(var(--p) * 180); max-height: calc(var(--p) * 130); }

/* 고르는 칸 */
#quiz-view .quiz-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(var(--p) * 96), 1fr)); gap: calc(var(--p) * 10); }
#quiz-view .choice { min-height: calc(var(--p) * 66); padding: calc(var(--p) * 8) calc(var(--p) * 6); border: calc(var(--p) * 2.5) solid var(--line); border-radius: calc(var(--p) * 16); background: #fff; box-shadow: 0 calc(var(--p) * 4) 0 var(--line); color: var(--ink); font: 800 calc(var(--p) * 21)/1.2 var(--font) !important; animation: none; }
#quiz-view .choice:hover:not(:disabled):not(.right):not(.wrong):not(.sel) { background: #fafafa; }
#quiz-view .choice:active { transform: translateY(calc(var(--p) * 3)); box-shadow: 0 calc(var(--p) * 1) 0 var(--line); }
#quiz-view .choice.sel { border-color: var(--sky-line); background: var(--sky-bg); color: var(--sky-d); box-shadow: 0 calc(var(--p) * 4) 0 var(--sky-line); }
#quiz-view .choice.right { border-color: #a5ed6e; background: var(--g-bg); color: var(--g-ink); box-shadow: 0 calc(var(--p) * 4) 0 #a5ed6e; }
#quiz-view .choice.wrong { border-color: #ffb2b4; background: var(--red-bg); color: var(--red-ink); box-shadow: 0 calc(var(--p) * 4) 0 #ffb2b4; animation: shake .35s; }
#quiz-view .choice.letter { font-size: calc(var(--p) * 34) !important; }
#quiz-view .choice.emoji { font-size: calc(var(--p) * 46) !important; }
/* 짝 맞추기 */
#quiz-view .match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--p) * 12); }
#quiz-view .match-col { display: flex; flex-direction: column; gap: calc(var(--p) * 9); }
#quiz-view .match-col .choice { min-height: calc(var(--p) * 46); font-size: calc(var(--p) * 19) !important; border-radius: calc(var(--p) * 12); }
/* 블록 (철자 · 문장) */
#quiz-view .quiz-choices.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--p) * 8); }
#quiz-view .tile { min-width: calc(var(--p) * 40); height: calc(var(--p) * 44); padding: 0 calc(var(--p) * 12); border: calc(var(--p) * 2.5) solid var(--line); border-radius: calc(var(--p) * 11); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 var(--line); color: var(--ink); font: 800 calc(var(--p) * 18)/1 var(--font) !important; }
#quiz-view .tile.used { visibility: hidden; }
#quiz-view .quiz-choices.tiles.letters { gap: calc(var(--p) * 6); }
#quiz-view .quiz-choices.tiles.letters .tile { min-width: calc(var(--p) * 48); height: calc(var(--p) * 56); padding: 0; font-size: calc(var(--p) * 27) !important; border-radius: calc(var(--p) * 12); text-transform: lowercase; }
#quiz-view .build-line { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: calc(var(--p) * 8); min-height: calc(var(--p) * 56); padding: calc(var(--p) * 6) 0; margin: 0; border: 0; border-bottom: calc(var(--p) * 2) solid #eceef1; background: none; }
#quiz-view .build-line.slots { border-bottom: 0; gap: calc(var(--p) * 7); min-height: calc(var(--p) * 60); }
#quiz-view .build-line .slot { width: calc(var(--p) * 48); height: calc(var(--p) * 54); border-radius: calc(var(--p) * 11); background: #f1f3f5; border: calc(var(--p) * 2) solid #e1e5ea; }
#quiz-view .build-line.slots .tile { min-width: calc(var(--p) * 48); width: calc(var(--p) * 48); height: calc(var(--p) * 54); padding: 0; font-size: calc(var(--p) * 26) !important; border-color: var(--sky-line); background: var(--sky-bg); color: var(--sky-d); box-shadow: 0 calc(var(--p) * 3) 0 var(--sky-line); text-transform: lowercase; }

#quiz-view .lesson-foot { border-top: 0; padding: calc(var(--p) * 10) 0 calc(var(--p) * 6); display: flex; gap: calc(var(--p) * 10); justify-content: stretch; width: 100%; max-width: none; margin: 0; }

/* 정답·오답 띠 */
#quiz-view .sheet { left: 0; right: 0; bottom: 0; border-top: 0 !important; border-radius: calc(var(--p) * 22) calc(var(--p) * 22) 0 0; padding: calc(var(--p) * 18) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 20); }
#quiz-view .sheet.good { background: #dcf8c6; }
#quiz-view .sheet.bad { background: var(--red-bg); }
#quiz-view .sheet-inner { position: relative; display: grid !important; grid-template-columns: calc(var(--p) * 40) 1fr; column-gap: calc(var(--p) * 12); row-gap: calc(var(--p) * 2); align-items: center; max-width: none; margin: 0; }
#quiz-view .sheet-img { display: none !important; }
#quiz-view .sheet-title { grid-column: 1 / -1; display: flex; align-items: center; gap: calc(var(--p) * 12); font: 900 calc(var(--p) * 25)/1.2 var(--font) !important; margin: 0; }
#quiz-view .sheet .sheet-title::before { content: ""; width: calc(var(--p) * 38); height: calc(var(--p) * 38); flex: none; border-radius: 0; background: url(pup2/i-check.webp) center / contain no-repeat; }
#quiz-view .sheet.bad .sheet-title::before { background-image: url(pup2/i-error.webp); }
#quiz-view .sheet.good .sheet-title { color: var(--g-ink); }
#quiz-view .sheet.bad .sheet-title { color: var(--red-ink); }
#quiz-view .sheet-sub { grid-column: 2 / -1; margin: 0 0 calc(var(--p) * 6); font: 800 calc(var(--p) * 17)/1.4 var(--font); color: inherit; }
#quiz-view .sheet.good .sheet-sub { color: var(--g-ink); }
#quiz-view .sheet.bad .sheet-sub { color: var(--red-ink); }
#quiz-view .sheet-sub div { font-size: calc(var(--p) * 14) !important; font-weight: 700 !important; }
#quiz-view .sheet-sub button { font-size: calc(var(--p) * 18); }
#quiz-view .sheet.good .sheet-inner::after { content: ""; position: absolute; right: calc(var(--p) * 4); top: calc(var(--p) * -4); width: calc(var(--p) * 58); height: calc(var(--p) * 58); background: url(pup2/i-sparkles.webp) center / contain no-repeat; pointer-events: none; }
#quiz-view .sheet-inner .btn-3d { grid-column: 1 / -1; margin-top: calc(var(--p) * 10); }

/* 3개 연속 정답: 문제 자리에 큰 제목 + 엄지 강아지 */
#quiz-view .combo-burst { position: absolute; left: 0; right: 0; top: calc(var(--p) * 60); bottom: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: calc(var(--p) * 12); padding-top: calc(var(--p) * 26); background: #fff; pointer-events: none; transform: none; font-size: inherit; text-shadow: none; -webkit-text-stroke: 0; animation: none; }
#quiz-view .combo-burst b { font: 900 calc(var(--p) * 34)/1.2 var(--font); color: var(--ink); }
#quiz-view .combo-burst img { width: calc(var(--p) * 250); max-width: 80%; height: auto; }
#quiz-view .combo-burst.go img { animation: pupPop .5s cubic-bezier(.2,1.6,.4,1); }

/* ---------- 단어 카드 ---------- */
#quiz-view .cards-body { align-items: center; gap: calc(var(--p) * 16); }
#quiz-view .cards-body .coach { align-self: stretch; }
#quiz-view .cards-title:empty { display: none; }
#quiz-view .wcard { width: min(100%, calc(var(--p) * 290)); height: calc(var(--p) * 210); aspect-ratio: auto; }
#quiz-view .wcard .face { border: calc(var(--p) * 3) solid #d6dbe2; border-radius: calc(var(--p) * 24); box-shadow: 0 calc(var(--p) * 7) 0 #d6dbe2; background: #fff; padding: calc(var(--p) * 14); gap: calc(var(--p) * 6); }
#quiz-view .wcard .face.back { background: #fff6d4; border-color: #f8cf45; box-shadow: 0 calc(var(--p) * 7) 0 #efbd22; }
#quiz-view .wcard b, #quiz-view .wcard .face.front b { font: 900 calc(var(--p) * 50)/1.1 var(--font) !important; color: #2f2f2f; letter-spacing: 0; }
#quiz-view .wcard small { font: 800 calc(var(--p) * 18) var(--font); color: #8a8f98; }
#quiz-view .wcard .face.back small { font-size: calc(var(--p) * 21); }
#quiz-view .wcard .pic img { max-width: calc(var(--p) * 130); max-height: calc(var(--p) * 80); }
#quiz-view .say-btn { display: inline-flex; align-items: center; gap: calc(var(--p) * 8); height: calc(var(--p) * 46); padding: 0 calc(var(--p) * 22); border-radius: 999px; background: #fff; border: calc(var(--p) * 2.5) solid #dfe3e8; box-shadow: 0 calc(var(--p) * 3) 0 #dfe3e8; color: var(--ink); font: 800 calc(var(--p) * 18) var(--font); }
#quiz-view .say-btn img { width: calc(var(--p) * 28); height: calc(var(--p) * 28); object-fit: contain; }
#quiz-view .cards-foot #cards-prev { display: none; }
#quiz-view .skip-link { font: 900 calc(var(--p) * 16) var(--font); color: var(--sky); }
/* 복습: 「← 복습 1/5」, 말풍선 위 · 강아지가 카드 위로 빼꼼 */
#quiz-view #qp-cards.rv .lesson-top { flex-wrap: wrap; row-gap: calc(var(--p) * 14); }
#quiz-view #qp-cards.rv .x-btn { color: var(--ink); }
#quiz-view #qp-cards.rv .cards-title { flex: 1; text-align: center; font: 900 calc(var(--p) * 21) var(--font); color: var(--ink); }
#quiz-view #qp-cards.rv .test-count { color: var(--ink); }
#quiz-view #qp-cards.rv .lbar { order: 5; flex-basis: 100%; }
#quiz-view #qp-cards.rv .say-btn { border-color: var(--sky-line); box-shadow: 0 calc(var(--p) * 3) 0 var(--sky-line); }
#quiz-view #qp-cards.rv .cards-body { gap: 0; padding-top: calc(var(--p) * 16); }
#quiz-view #qp-cards.rv .coach { flex-direction: column; align-items: center; gap: calc(var(--p) * 6); position: relative; z-index: 2; }
#quiz-view #qp-cards.rv .coach-bubble { order: -1; background: #e6f6ee; border: 0; border-radius: calc(var(--p) * 24); padding: calc(var(--p) * 12) calc(var(--p) * 26); text-align: center; font-size: calc(var(--p) * 19) !important; }
#quiz-view #qp-cards.rv .coach-bubble::before { left: auto; right: 28%; top: auto; bottom: calc(var(--p) * -7); transform: rotate(45deg); background: #e6f6ee; border: 0; }
#quiz-view #qp-cards.rv .coach-img { width: calc(var(--p) * 210); height: calc(var(--p) * 130); margin-bottom: calc(var(--p) * -26); }
#quiz-view #qp-cards.rv .wcard { width: 100%; height: calc(var(--p) * 220); margin-bottom: calc(var(--p) * 26); }

/* ---------- 레슨 완료 ---------- */
#quiz-view #qp-done, #quiz-view #qp-streak, #quiz-view #qp-test-done { justify-content: flex-start; gap: calc(var(--p) * 14); }
#quiz-view #qp-streak { gap: calc(var(--p) * 8); }
#quiz-view #qp-streak .done-top { margin-bottom: 0; }
#quiz-view #qp-done .done-top, #quiz-view #qp-streak .done-top { margin-bottom: calc(var(--p) * 4); }
#quiz-view .done-img { width: calc(var(--p) * 262); height: calc(var(--p) * 262); max-width: 80%; object-fit: contain; margin: calc(var(--p) * 4) auto 0; filter: none; animation: pupPop .6s cubic-bezier(.2,1.6,.4,1); }
#quiz-view .done-title { margin: 0; font: 900 calc(var(--p) * 36)/1.2 var(--font) !important; color: var(--ink); }
#quiz-view #qp-done.rv .done-title::before, #quiz-view #qp-done.rv .done-title::after { content: "\2009"; display: inline-block; width: calc(var(--p) * 22); height: calc(var(--p) * 22); margin: 0 calc(var(--p) * 8); vertical-align: middle; background: url(pup2/i-sparkles.webp) center / contain no-repeat; }
#quiz-view .done-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--p) * 10); width: 100%; margin: calc(var(--p) * 4) 0 calc(var(--p) * 8); }
#quiz-view .dcard { --c: var(--gold); --t: var(--orange); display: flex; flex-direction: column; padding: 0; overflow: hidden; border: calc(var(--p) * 3) solid var(--c); border-radius: calc(var(--p) * 14); background: #fff; box-shadow: none; }
#quiz-view .dcard.c-acc { --c: var(--g); --t: var(--g-ink); }
#quiz-view .dcard.c-time { --c: var(--sky); --t: var(--sky-d); }
#quiz-view .dcard.c-xp { --c: #ffb800; }
#quiz-view .dcard > span { display: flex; align-items: center; justify-content: center; gap: calc(var(--p) * 4); padding: calc(var(--p) * 6) 0 calc(var(--p) * 7); background: var(--c); color: #fff; font: 900 calc(var(--p) * 14) var(--font) !important; white-space: nowrap; }
#quiz-view .dcard > span img { width: calc(var(--p) * 15); height: calc(var(--p) * 15); filter: brightness(0) invert(1); }
#quiz-view .dcard b { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(var(--p) * 86); padding: calc(var(--p) * 6) 0; font: 900 calc(var(--p) * 34)/1 var(--font) !important; color: var(--t); background: #fff; }
#quiz-view .dcard b img { width: calc(var(--p) * 26); height: calc(var(--p) * 26); object-fit: contain; margin-bottom: calc(var(--p) * 2); }
#quiz-view .dcard b span { font: inherit !important; color: inherit; background: none; padding: 0; }
#quiz-view #qp-done .btn-3d { margin-top: auto; }
#quiz-view .result-badges:empty { display: none; }

/* ---------- 불꽃 화면 ---------- */
#quiz-view .streak-hero { position: relative; width: calc(var(--p) * 232); max-width: 86%; margin: calc(var(--p) * 2) auto 0; }
#quiz-view .streak-hero .streak-img { display: block; width: 100%; height: auto; animation: pupPop .6s cubic-bezier(.2,1.6,.4,1); }
#quiz-view .streak-num { position: absolute; left: 78%; top: 60%; transform: translate(-50%, -50%); margin: 0; font: 900 calc(var(--p) * 56)/1 var(--font) !important; color: #fff; text-shadow: 0 calc(var(--p) * 3) 0 rgba(200,70,0,.35); -webkit-text-stroke: 0; }
#quiz-view .streak-label { margin: 0; font: 900 calc(var(--p) * 28)/1.2 var(--font) !important; color: var(--ink); }
#quiz-view .streak-label b { font: inherit; }
#quiz-view .streak-badge { display: flex; align-items: center; gap: calc(var(--p) * 10); width: 100%; padding: calc(var(--p) * 6) calc(var(--p) * 12); border-radius: calc(var(--p) * 16); background: #f4e9ff; border: calc(var(--p) * 2) solid #e3cdfc; color: #8e3fd6; font: 900 calc(var(--p) * 17) var(--font) !important; text-align: left; box-shadow: none; }
#quiz-view .streak-badge .sb-dog { width: calc(var(--p) * 44); height: calc(var(--p) * 44); object-fit: contain; flex: none; border-radius: 50%; background: #fff; }
#quiz-view .streak-badge b { flex: 1; font: inherit; color: inherit; }
#quiz-view .streak-badge .sb-medal { margin-left: auto; font-size: 0; }
#quiz-view .streak-badge .sb-medal img { width: calc(var(--p) * 40); height: calc(var(--p) * 44); object-fit: contain; }
#quiz-view .week { display: grid; grid-template-columns: repeat(7, 1fr); gap: calc(var(--p) * 6); width: 100%; padding: 0 calc(var(--p) * 6); background: none; border: 0; }
#quiz-view .week > div { display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 6); background: none; border: 0; box-shadow: none; padding: 0; }
#quiz-view .week span { font: 800 calc(var(--p) * 15) var(--font) !important; color: #4b4b4b; }
#quiz-view .week i { width: calc(var(--p) * 30); height: calc(var(--p) * 30); border-radius: 50%; background: #e5e5e5; display: grid; place-items: center; font: 900 calc(var(--p) * 17) var(--font); font-style: normal; color: #fff; border: 0; box-shadow: none; }
#quiz-view .week .on i { background: var(--g); box-shadow: 0 0 0 calc(var(--p) * 2) #fff, 0 0 0 calc(var(--p) * 4) #b6ef8b; }
#quiz-view .streak-msg { margin: 0; font: 900 calc(var(--p) * 19) var(--font) !important; color: var(--orange); }
#quiz-view .goal-pick { display: flex; flex-direction: column; gap: calc(var(--p) * 8); width: 100%; margin: 0; padding: 0; background: none; border: 0; }
#quiz-view .gp-q { margin: 0 0 calc(var(--p) * 2); font: 800 calc(var(--p) * 17) var(--font); color: var(--ink); }
#quiz-view .gp-opt { display: flex; align-items: center; justify-content: space-between; height: calc(var(--p) * 38); padding: 0 calc(var(--p) * 20); border: calc(var(--p) * 2.5) solid var(--line); border-radius: calc(var(--p) * 14); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 var(--line); color: var(--ink); cursor: pointer; }
#quiz-view .gp-opt b { display: inline-flex; align-items: center; gap: calc(var(--p) * 8); font: 900 calc(var(--p) * 18) var(--font); }
#quiz-view .gp-opt span { display: inline-flex; align-items: center; gap: calc(var(--p) * 5); font: 800 calc(var(--p) * 16) var(--font); color: #5f646b; }
#quiz-view .gp-opt span img { width: calc(var(--p) * 22); height: calc(var(--p) * 22); object-fit: contain; }
#quiz-view .gp-opt.sel { border-color: var(--sky-line); background: var(--sky-bg); box-shadow: 0 calc(var(--p) * 3) 0 var(--sky-line); }
#quiz-view .gp-opt.sel b { color: var(--sky-d); }
#quiz-view .gp-opt.sel b::before { content: "✓"; display: grid; place-items: center; width: calc(var(--p) * 24); height: calc(var(--p) * 24); border-radius: 50%; background: var(--sky); color: #fff; font-size: calc(var(--p) * 14); }
#quiz-view #streak-next { margin-top: auto; }

/* ---------- 학습 지도 ---------- */
#quiz-view #qp-map { padding-top: 0; }
#quiz-view .map-head { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: calc(var(--p) * 40) 1fr calc(var(--p) * 40); align-items: center; row-gap: calc(var(--p) * 10); margin: 0; padding: calc(var(--p) * 12) 0 calc(var(--p) * 14); background: #fff; border: 0; }
#quiz-view .map-head .x-btn.back { position: static; grid-column: 1; width: calc(var(--p) * 28); height: calc(var(--p) * 28); color: #4b4b4b; }
#quiz-view .mh-stats { grid-column: 2; display: flex; justify-content: center; gap: calc(var(--p) * 38); }
#quiz-view .map-head .stat { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); padding: calc(var(--p) * 2) calc(var(--p) * 4); background: none; border: 0; box-shadow: none; font: 900 calc(var(--p) * 21) var(--font) !important; }
#quiz-view .map-head .stat img { width: calc(var(--p) * 28); height: calc(var(--p) * 28); object-fit: contain; }
#quiz-view .map-head .s-fire b { color: var(--orange); }
#quiz-view .map-head .s-star b { color: #f2ae00; }
#quiz-view .team-row { grid-column: 1 / -1; display: flex; align-items: center; gap: calc(var(--p) * 12); padding: 0 calc(var(--p) * 4) 0 calc(var(--p) * 36); background: none; border: 0; cursor: pointer; }
#quiz-view .team-row .tr-bar { flex: 1; height: calc(var(--p) * 16); border-radius: 999px; background: var(--bar); overflow: hidden; }
#quiz-view .team-row .tr-bar i { position: relative; display: block; height: 100%; width: 4%; border-radius: 999px; background: var(--g); transition: width .8s ease; }
#quiz-view .team-row .tr-bar i::after { content: ""; position: absolute; left: calc(var(--p) * 6); right: calc(var(--p) * 6); top: calc(var(--p) * 3); height: calc(var(--p) * 4); border-radius: 99px; background: rgba(255,255,255,.35); }
#quiz-view .team-row b { font: 900 calc(var(--p) * 17) var(--font); color: #4b4b4b; }
#quiz-view .goal-chips { display: none !important; }
#quiz-view .path { gap: calc(var(--p) * 18); padding: calc(var(--p) * 4) 0 calc(var(--p) * 20); }
#quiz-view .path-sec { gap: calc(var(--p) * 20); padding-bottom: calc(var(--p) * 14); position: relative; }
#quiz-view .unit-banner.duo { --c: var(--sky); --cd: var(--sky-d); display: flex; align-items: center; gap: calc(var(--p) * 10); width: 100%; max-width: none; padding: calc(var(--p) * 12) calc(var(--p) * 12) calc(var(--p) * 12) calc(var(--p) * 16); border-radius: calc(var(--p) * 16); background: var(--c); box-shadow: 0 calc(var(--p) * 5) 0 var(--cd); color: #fff; text-align: left; }
#quiz-view .unit-banner.duo > div { flex: 1; min-width: 0; }
#quiz-view .unit-banner.duo small { display: block; font: 800 calc(var(--p) * 14) var(--font) !important; opacity: .92; letter-spacing: 0; }
#quiz-view .unit-banner.duo b { display: block; font: 900 calc(var(--p) * 17.5)/1.3 var(--font) !important; letter-spacing: -.01em; }
#quiz-view .unit-banner .ub-guide { width: calc(var(--p) * 36); height: calc(var(--p) * 36); flex: none; display: grid; place-items: center; background: none; border: 0; box-shadow: none; color: #fff; padding: 0; margin: 0; position: static; }
#quiz-view .unit-banner .ub-guide svg { width: calc(var(--p) * 26); height: calc(var(--p) * 26); }
#quiz-view .sec-purple .unit-banner.duo { --c: var(--purple); --cd: var(--purple-d); padding: calc(var(--p) * 10) calc(var(--p) * 12); }
#quiz-view .sec-purple .unit-banner.duo small { font-size: calc(var(--p) * 13) !important; }
#quiz-view .sec-purple .unit-banner.duo b { font-size: calc(var(--p) * 17) !important; }
#quiz-view .unit-banner .ub-ic { width: calc(var(--p) * 38); height: calc(var(--p) * 30); object-fit: contain; filter: brightness(0) invert(1); flex: none; }
#quiz-view .unit-banner .ub-go { font: 900 calc(var(--p) * 30)/1 var(--font); color: #fff; padding: 0 calc(var(--p) * 6); }
#quiz-view .sec-gray .unit-banner.duo { --c: #e5e5e5; --cd: #cdcdcd; color: #4b4b4b; }
#quiz-view .sec-gray .unit-banner.duo small { color: #6b6b6b; }
#quiz-view .unit-banner .ub-lock { width: calc(var(--p) * 26); height: calc(var(--p) * 30); object-fit: contain; opacity: .55; flex: none; margin-right: calc(var(--p) * 4); }
/* 칸 */
#quiz-view .node.duo { width: calc(var(--p) * 74); height: calc(var(--p) * 66); border-radius: 50%; background: radial-gradient(circle at 50% 35%, var(--c2, #7ee03a), var(--c) 70%); box-shadow: 0 calc(var(--p) * 7) 0 var(--cd); color: #fff; }
#quiz-view .sec-green .node.duo { --c: var(--g); --cd: var(--g-d); --c2: #79dd34; }
#quiz-view .sec-purple .node.duo { --c2: #dba0ff; }
#quiz-view .node.duo svg { width: calc(var(--p) * 32); height: calc(var(--p) * 32); }
#quiz-view .node.duo.done svg { width: calc(var(--p) * 30); height: calc(var(--p) * 30); }
#quiz-view .node.duo.locked, #quiz-view .node.duo.chest.locked { --c: #e5e5e5; --c2: #f0f0f0; --cd: #c5c5c5; background: radial-gradient(circle at 50% 35%, #f2f2f2, #e3e3e3 70%); box-shadow: 0 calc(var(--p) * 7) 0 #c5c5c5; color: #a9a9a9; }
#quiz-view .node.duo.trophy:not(.locked) { background: radial-gradient(circle at 50% 35%, #ffd84a, #ffc200 70%); box-shadow: 0 calc(var(--p) * 7) 0 #e09b00; }
#quiz-view .node.duo.chest:not(.locked) { background: radial-gradient(circle at 50% 35%, #ffe07a, #ffc800 70%); box-shadow: 0 calc(var(--p) * 7) 0 var(--gold-d); }
#quiz-view .node.duo .nimg { width: calc(var(--p) * 46); height: calc(var(--p) * 46); object-fit: contain; }
#quiz-view .node.duo.now::before { inset: calc(var(--p) * -10); border-width: calc(var(--p) * 6); }
#quiz-view .duo-wrap:has(.start-bubble) { margin-top: calc(var(--p) * 44); }
#quiz-view .start-bubble.duo { top: calc(var(--p) * -48); padding: calc(var(--p) * 4) calc(var(--p) * 12); border: calc(var(--p) * 2) solid var(--line); border-radius: calc(var(--p) * 10); background: #fff; color: var(--g-ink); font: 900 calc(var(--p) * 17) var(--font) !important; box-shadow: 0 calc(var(--p) * 2) 0 var(--line); }
#quiz-view .sec-purple .start-bubble.duo { color: var(--purple-d); }
#quiz-view .duo-wrap:has(.trophy) .start-bubble.duo { color: var(--gold-d); }
#quiz-view .path-pup { position: absolute; right: calc(var(--p) * -6); top: calc(var(--p) * 112); width: calc(var(--p) * 150); height: auto; object-fit: contain; pointer-events: none; z-index: 0; }
#quiz-view .sec-purple .path-pup { width: calc(var(--p) * 126); top: calc(var(--p) * 84); }
/* 칸을 누르면 나오는 카드 */
#quiz-view .node-pop { width: calc(var(--p) * 250); padding: calc(var(--p) * 14) calc(var(--p) * 16); border-radius: calc(var(--p) * 16); gap: calc(var(--p) * 4); top: calc(100% + calc(var(--p) * 16)); box-shadow: 0 calc(var(--p) * 6) calc(var(--p) * 18) rgba(0,0,0,.12); }
#quiz-view .node-pop::before { width: calc(var(--p) * 16); height: calc(var(--p) * 16); top: calc(var(--p) * -8); }
#quiz-view .node-pop b { font: 900 calc(var(--p) * 19)/1.25 var(--font) !important; }
#quiz-view .node-pop span { font: 700 calc(var(--p) * 14)/1.4 var(--font); opacity: .95; }
#quiz-view .node-pop button { margin-top: calc(var(--p) * 8); height: calc(var(--p) * 44); border-radius: calc(var(--p) * 12); font: 900 calc(var(--p) * 17) var(--font) !important; box-shadow: 0 calc(var(--p) * 4) 0 rgba(0,0,0,.12); }
#quiz-view .node-pop.off { background: #fff !important; color: var(--ink); border: calc(var(--p) * 2) solid var(--line); display: grid; grid-template-columns: auto 1fr; column-gap: calc(var(--p) * 12); align-items: center; }
#quiz-view .node-pop.off::before { background: #fff !important; border-left: calc(var(--p) * 2) solid var(--line); border-top: calc(var(--p) * 2) solid var(--line); }
#quiz-view .node-pop.off .pop-img { grid-row: 1 / 3; width: calc(var(--p) * 56); height: calc(var(--p) * 48); object-fit: contain; }
#quiz-view .node-pop.off span { color: var(--muted); }
#quiz-view .node-pop .pop-img { display: none; }
#quiz-view .node-pop.off .pop-img { display: block; }
/* 지도 아래: AI 친구 부르는 강아지 */
#quiz-view .map-foot { position: sticky; bottom: 0; z-index: 5; margin-top: auto; padding: calc(var(--p) * 6) 0 calc(var(--p) * 8); background: linear-gradient(rgba(255,255,255,0), #fff 26%); gap: 0; }
#quiz-view .chat-dock { display: flex; align-items: flex-end; gap: calc(var(--p) * 6); width: 100%; margin-bottom: calc(var(--p) * -8); }
#quiz-view .chat-dock .cd-pup { width: calc(var(--p) * 96); height: calc(var(--p) * 84); object-fit: contain; object-position: bottom; flex: none; }
#quiz-view .chat-dock .cd-bubble { margin-bottom: calc(var(--p) * 26); padding: calc(var(--p) * 8) calc(var(--p) * 14); border: calc(var(--p) * 2) solid #dfe3e8; border-radius: calc(var(--p) * 16); background: #fff; font: 800 calc(var(--p) * 15) var(--font); color: var(--ink); box-shadow: none; }
#quiz-view #map-chat { position: relative; z-index: 1; }

/* 지도 위 화면(단어장 · 미션 · 연속 학습): 위쪽 줄은 그대로, 아래를 덮는다 */
#quiz-view .overlay.mapsheet { position: absolute; top: var(--mh, calc(var(--p) * 104)); left: 0; right: 0; bottom: 0; z-index: 30; display: block; padding: 0 max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 14); background: #fff; overflow-y: auto; }
#quiz-view .overlay.mapsheet[hidden] { display: none !important; }
#quiz-view .mapsheet > .card { width: 100%; max-width: none; min-height: 100%; margin: 0; padding: calc(var(--p) * 4) 0 0; display: flex; flex-direction: column; gap: calc(var(--p) * 12); border: 0; border-radius: 0; box-shadow: none; background: #fff; animation: none; text-align: left; }
#quiz-view .ms-title { display: flex; align-items: center; gap: calc(var(--p) * 10); margin: 0 0 calc(var(--p) * 2); font: 900 calc(var(--p) * 23) var(--font) !important; color: var(--ink); }
#quiz-view .ms-title img { width: calc(var(--p) * 42); height: calc(var(--p) * 42); object-fit: contain; }
#quiz-view .mapsheet .btn-3d { margin-top: auto; flex: none; }
/* 오늘의 미션 */
#quiz-view .goals-card .missions { display: block; padding: calc(var(--p) * 4) calc(var(--p) * 14); border: calc(var(--p) * 2) solid var(--line); border-radius: calc(var(--p) * 16); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 var(--line); }
#quiz-view .goals-card .ms-head { display: none; }
#quiz-view .goals-card .ms-row { display: grid; grid-template-columns: calc(var(--p) * 42) 1fr calc(var(--p) * 44); align-items: center; gap: calc(var(--p) * 12); padding: calc(var(--p) * 12) 0; border: 0; border-bottom: calc(var(--p) * 2) solid #f0f1f3; background: none; box-shadow: none; }
#quiz-view .goals-card .ms-row:last-child { border-bottom: 0; }
#quiz-view .goals-card .ms-ic { width: calc(var(--p) * 40); height: calc(var(--p) * 40); object-fit: contain; }
#quiz-view .goals-card .ms-main { display: flex; flex-direction: column; gap: calc(var(--p) * 6); }
#quiz-view .goals-card .ms-main span { font: 800 calc(var(--p) * 16) var(--font) !important; color: var(--ink); }
#quiz-view .goals-card .ms-bar { display: flex; align-items: center; gap: calc(var(--p) * 10); height: auto; background: none; position: static; }
#quiz-view .goals-card .ms-bar::before { content: ""; flex: 1; height: calc(var(--p) * 12); border-radius: 99px; background: var(--bar); }
#quiz-view .goals-card .ms-bar b { position: absolute; display: none; }
#quiz-view .goals-card .ms-row.ok .ms-bar::before { background: var(--gold); }
#quiz-view .goals-card .ms-bar em { position: static; font: 800 calc(var(--p) * 15) var(--font); font-style: normal; color: #4b4b4b; }
#quiz-view .goals-card .chest { width: calc(var(--p) * 42); height: calc(var(--p) * 40); object-fit: contain; }
#quiz-view .goals-card .team2 { display: grid !important; grid-template-columns: calc(var(--p) * 58) 1fr; align-items: center; column-gap: calc(var(--p) * 12); row-gap: calc(var(--p) * 8); padding: calc(var(--p) * 14); border: calc(var(--p) * 2) solid var(--line); border-radius: calc(var(--p) * 16); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 var(--line); }
#quiz-view .goals-card .team2 > img { width: calc(var(--p) * 56); height: calc(var(--p) * 40); object-fit: contain; }
#quiz-view .goals-card .t2-main { display: flex; flex-direction: column; gap: calc(var(--p) * 8); min-width: 0; }
#quiz-view .goals-card .t2-top { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--p) * 8); }
#quiz-view .goals-card .team-text { font: 900 calc(var(--p) * 21) var(--font) !important; color: var(--ink); }
#quiz-view .goals-card .t2-top em { display: inline-flex; align-items: center; gap: calc(var(--p) * 4); font: 800 calc(var(--p) * 16) var(--font); font-style: normal; color: #4b4b4b; position: static; }
#quiz-view .goals-card .t2-top em img { width: calc(var(--p) * 22); height: calc(var(--p) * 22); }
#quiz-view .goals-card .t2-bar { position: relative; height: calc(var(--p) * 13); border-radius: 99px; background: var(--bar); overflow: hidden; }
#quiz-view .goals-card .t2-bar i { display: block; height: 100%; border-radius: 99px; background: var(--g); }
#quiz-view .goals-card .team-help { grid-column: 1 / -1; margin: 0; font: 700 calc(var(--p) * 14)/1.5 var(--font); color: #6b6f76; }
/* 단원 단어장 */
#quiz-view .guide-card .gd-head { display: flex; flex-direction: column; gap: calc(var(--p) * 2); padding: 0; background: none; color: var(--ink); }
#quiz-view .guide-card .gd-head small { font: 800 calc(var(--p) * 13) var(--font); color: var(--muted); }
#quiz-view .guide-card .gd-head b { font: 900 calc(var(--p) * 17) var(--font); }
#quiz-view .gd-list { display: flex; flex-direction: column; gap: calc(var(--p) * 8); }
#quiz-view .gd-row { display: grid; grid-template-columns: 1.15fr 1fr calc(var(--p) * 28); align-items: center; gap: calc(var(--p) * 10); min-height: calc(var(--p) * 46); padding: calc(var(--p) * 6) calc(var(--p) * 14); border: calc(var(--p) * 2) solid var(--line); border-radius: calc(var(--p) * 14); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 var(--line); text-align: left; cursor: pointer; }
#quiz-view .gd-row:first-child { background: #effaff; border-color: #cdeefd; box-shadow: 0 calc(var(--p) * 3) 0 #cdeefd; }
#quiz-view .gd-row b { font: 900 calc(var(--p) * 19) var(--font); color: var(--sky-d); }
#quiz-view .gd-row span { font: 700 calc(var(--p) * 16) var(--font); color: var(--ink); }
#quiz-view .gd-row img { width: calc(var(--p) * 26); height: calc(var(--p) * 26); object-fit: contain; }
#quiz-view #gd-sents .gd-row { grid-template-columns: 1fr calc(var(--p) * 28); }
#quiz-view #gd-sents .gd-row b { font-size: calc(var(--p) * 16); }
#quiz-view #gd-sents .gd-row span { grid-column: 1; grid-row: 2; font-size: calc(var(--p) * 14); color: var(--muted); }
#quiz-view #gd-sents .gd-row img { grid-column: 2; grid-row: 1 / 3; }
#quiz-view .gd-h { margin: calc(var(--p) * 6) 0 0; font: 900 calc(var(--p) * 18) var(--font) !important; color: var(--ink); }
/* 연속 학습 화면 */
#quiz-view .streak-card .sk-top { display: flex; align-items: center; justify-content: center; gap: calc(var(--p) * 8); margin: 0; padding: 0; background: none; }
#quiz-view .streak-card .sk-top img { width: calc(var(--p) * 150); height: calc(var(--p) * 130); object-fit: contain; }
#quiz-view .streak-card .sk-top > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; max-width: calc(var(--p) * 170); line-height: 1; }
#quiz-view .streak-card .sk-top b { font: 900 calc(var(--p) * 68)/1 var(--font) !important; color: var(--orange); }
#quiz-view .streak-card .sk-top em { font: 900 calc(var(--p) * 36)/1 var(--font); font-style: normal; color: var(--orange); }
#quiz-view .streak-card .sk-top span { flex-basis: 100%; text-align: center; margin-top: calc(var(--p) * 6); font: 900 calc(var(--p) * 25) var(--font) !important; color: var(--orange); }
#quiz-view .streak-card .week { padding: calc(var(--p) * 10) calc(var(--p) * 8); border: calc(var(--p) * 2) solid var(--line); border-radius: calc(var(--p) * 16); }
#quiz-view .streak-card .week i { width: calc(var(--p) * 28); height: calc(var(--p) * 28); }
#quiz-view .sk-help { margin: 0; text-align: center; font: 700 calc(var(--p) * 14)/1.5 var(--font); color: #5f646b; }
#quiz-view .sk-h { margin: 0; text-align: center; font: 900 calc(var(--p) * 19) var(--font) !important; color: var(--ink); }
#quiz-view .sk-road { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--p) * 8); }
#quiz-view .sk-step { display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 2); padding: calc(var(--p) * 8) 0; border-radius: calc(var(--p) * 12); background: #f6f1e7; border: 0; box-shadow: none; }
#quiz-view .sk-step i { font-size: calc(var(--p) * 26); font-style: normal; line-height: 1; }
#quiz-view .sk-step i img { width: calc(var(--p) * 32); height: calc(var(--p) * 32); object-fit: contain; filter: grayscale(1) opacity(.55); }
#quiz-view .sk-step.got i img { filter: none; }
#quiz-view .sk-step span { font: 800 calc(var(--p) * 14) var(--font); color: #5f5a50; }
#quiz-view .sk-next { margin: 0; text-align: center; font: 900 calc(var(--p) * 17) var(--font) !important; color: var(--orange); }
/* 별 설명 말풍선 (지도 위쪽 ⭐) */
.kid-tip { background: #2b3044; border-radius: 14px; font-weight: 800; padding: 10px 14px; }
.kid-tip::before { border-bottom-color: #2b3044; }

/* ---------- 보물상자 열기 (화면 전체) ---------- */
.chest-pop.full { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 14); padding: calc(var(--p) * 12) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 16); background: #fff; color: var(--ink); font-family: var(--font); text-align: center; animation: none; }
.chest-pop.full .cp-dog { width: calc(var(--p) * 290); max-width: 86%; height: auto; margin-top: calc(var(--p) * 24); animation: pupPop .6s cubic-bezier(.2,1.6,.4,1); }
.chest-pop.full .cp-title { font: 900 calc(var(--p) * 31)/1.2 var(--font); color: var(--ink); }
.chest-pop.full .cp-plus { display: inline-flex; align-items: center; gap: calc(var(--p) * 8); padding: calc(var(--p) * 8) calc(var(--p) * 34); border-radius: 999px; background: #fff3d6; font: 900 calc(var(--p) * 36) var(--font); color: var(--orange); }
.chest-pop.full .cp-plus img { width: calc(var(--p) * 44); height: calc(var(--p) * 44); object-fit: contain; }
.chest-pop.full .btn-3d { margin-top: auto; }

/* ---------- 미션 완료 알림 ---------- */
.mission-toast { top: calc(calc(var(--p) * 10) + env(safe-area-inset-top, 0px)); flex-direction: row; align-items: center; gap: calc(var(--p) * 12); width: min(calc(var(--p) * 358), calc(100vw - 32px)); max-width: none; padding: calc(var(--p) * 10) calc(var(--p) * 14); border-radius: calc(var(--p) * 16); background: linear-gradient(#6fd826, #58cc02); box-shadow: 0 calc(var(--p) * 5) 0 #46a302; text-align: left; font-family: var(--font); }
.mission-toast .mt-ic { width: calc(var(--p) * 40); height: calc(var(--p) * 40); object-fit: contain; border-radius: 50%; box-shadow: 0 0 0 calc(var(--p) * 3) #fff; flex: none; }
.mission-toast .mt-txt { flex: 1; display: flex; flex-direction: column; gap: calc(var(--p) * 2); }
.mission-toast b { font-family: var(--font) !important; font-weight: 900 !important; font-size: calc(var(--p) * 20); }
.mission-toast span { font-size: calc(var(--p) * 13); font-weight: 700; opacity: .95; }
.mission-toast .mt-list { width: calc(var(--p) * 36); height: calc(var(--p) * 36); object-fit: contain; background: #fff; border-radius: calc(var(--p) * 9); padding: calc(var(--p) * 4); flex: none; }

/* ---------- 수행평가 ---------- */
#quiz-view #qp-test .lesson-body { gap: calc(var(--p) * 12); padding-top: calc(var(--p) * 16); }
#quiz-view .test-prompt { display: flex; flex-direction: column; gap: calc(var(--p) * 12); align-items: stretch; text-align: center; }
#quiz-view .test-prompt .passage { margin: 0; padding: calc(var(--p) * 12) calc(var(--p) * 16); border: calc(var(--p) * 2) solid #dfe3e8; border-radius: calc(var(--p) * 16); background: #fff; box-shadow: none; text-align: left; font: 600 calc(var(--p) * 15)/1.5 "Pretendard Variable", Pretendard, system-ui, sans-serif !important; color: #2f2f2f; }
#quiz-view .test-prompt .pic { margin: 0; }
#quiz-view .test-prompt .pic img { width: 100%; max-width: none; max-height: calc(var(--p) * 220); object-fit: cover; border-radius: calc(var(--p) * 18); }
#quiz-view .test-prompt .q { margin: 0; font: 800 calc(var(--p) * 18)/1.45 var(--font); color: var(--ink); white-space: pre-line; }
#quiz-view .test-prompt .q .mk, #quiz-view .passage .mk { color: var(--red-ink); }
#quiz-view .test-text { height: calc(var(--p) * 52); padding: 0 calc(var(--p) * 14); border: calc(var(--p) * 2.5) solid var(--sky-line); border-radius: calc(var(--p) * 14); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 #c6ecfd; text-align: center; font: 800 calc(var(--p) * 20) var(--font); color: var(--ink); }
#quiz-view .test-text::placeholder { color: #9aa1a9; }
#quiz-view .listen-tag { display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--p) * 6); font: 800 calc(var(--p) * 15) var(--font); color: var(--sky-d); }
#quiz-view .listen-tag img { width: calc(var(--p) * 24); height: calc(var(--p) * 24); }
#quiz-view .test-choices:not(.tiles) { grid-template-columns: 1fr; gap: calc(var(--p) * 7); }
#quiz-view .test-choices .choice { min-height: calc(var(--p) * 36); font-size: calc(var(--p) * 16) !important; padding: calc(var(--p) * 4) calc(var(--p) * 12); border-radius: calc(var(--p) * 12); box-shadow: 0 calc(var(--p) * 3) 0 var(--line); }
#quiz-view #qp-test:has(#test-choices .choice) .test-cheer { display: none; }
#quiz-view .test-prompt .test-line { font: 800 calc(var(--p) * 19)/1.5 var(--font); color: var(--ink); }
#quiz-view .test-choices.tiles .tile, #quiz-view .test-build .tile { height: calc(var(--p) * 44); }
#quiz-view .test-cheer { position: absolute; left: max(calc(var(--p) * 10), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 10))); bottom: calc(calc(var(--p) * 74) + env(safe-area-inset-bottom, 0px)); z-index: 3; display: flex; align-items: flex-end; gap: calc(var(--p) * 4); pointer-events: none; }
#quiz-view .test-cheer img { width: calc(var(--p) * 88); height: calc(var(--p) * 66); object-fit: contain; object-position: bottom; }
#quiz-view .test-cheer span { margin: 0 0 calc(var(--p) * 26); padding: calc(var(--p) * 8) calc(var(--p) * 12); border: calc(var(--p) * 2) solid #dfe3e8; border-radius: calc(var(--p) * 16); background: #fff; box-shadow: none; font: 800 calc(var(--p) * 15)/1.35 var(--font) !important; color: var(--ink); max-width: calc(var(--p) * 180); }
#quiz-view .test-foot { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--p) * 10); }
#quiz-view .test-foot .btn-3d[hidden] + .btn-3d { grid-column: 1 / -1; }
#quiz-view .test-done-btns { display: flex; flex-direction: column; align-items: stretch; gap: calc(var(--p) * 14); width: 100%; margin-top: calc(var(--p) * 6); }
#quiz-view #qp-test-done .done-img { width: calc(var(--p) * 240); height: calc(var(--p) * 240); margin-top: calc(var(--p) * 40); }
#quiz-view #test-done-title { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); color: var(--orange); font-size: calc(var(--p) * 38) !important; }
#quiz-view #test-done-title img { width: calc(var(--p) * 38); height: calc(var(--p) * 38); object-fit: contain; }
#quiz-view .test-done-sub { margin: 0; font: 800 calc(var(--p) * 17)/1.5 var(--font); color: #4b4b4b; }
#quiz-view .linklike { font: 900 calc(var(--p) * 17) var(--font); color: var(--sky); background: none; border: 0; }
/* 그만할까요? */
#quiz-view .overlay:not(.mapsheet) { position: absolute; background: rgba(60,60,60,.45); }
#quiz-view .quit-card { width: min(100%, calc(var(--p) * 330)); padding: calc(var(--p) * 18) calc(var(--p) * 20) calc(var(--p) * 22); border: 0; border-radius: calc(var(--p) * 22); background: #fff; box-shadow: 0 calc(var(--p) * 8) calc(var(--p) * 24) rgba(0,0,0,.18); display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 6); text-align: center; }
#quiz-view .quit-card .hero-img { width: calc(var(--p) * 170); height: calc(var(--p) * 112); object-fit: contain; }
#quiz-view .quit-card h2 { margin: 0; font: 900 calc(var(--p) * 28) var(--font) !important; color: var(--ink); }
#quiz-view .quit-card p { margin: 0 0 calc(var(--p) * 10); font: 700 calc(var(--p) * 16)/1.5 var(--font); color: #4b4b4b; }
#quiz-view .quit-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--p) * 10); width: 100%; }
#quiz-view .quit-card .btn { min-height: calc(var(--p) * 48); border-radius: calc(var(--p) * 14); font: 900 calc(var(--p) * 18) var(--font) !important; padding: 0 calc(var(--p) * 8); }
#quiz-view .quit-card .btn.primary { background: linear-gradient(var(--g-top), var(--g)); color: #fff; border: 0; box-shadow: 0 calc(var(--p) * 4) 0 var(--g-d); }
#quiz-view .quit-card .btn.ghost { background: var(--sky-bg); color: var(--sky-d); border: calc(var(--p) * 2) solid var(--sky-line); box-shadow: 0 calc(var(--p) * 4) 0 var(--sky-line); }

/* =====================================================================
   크림 · 보라 테마 (2026-11-13) — 앱 전체 바탕은 크림, 주요 색은 보라.
   맞음(초록) · 틀림(빨강) · 별(노랑) · 불꽃(주황)은 그대로.
   ===================================================================== */
:root {
  --cream: #fbf8f3; --pr: #7b45e6; --pr-top: #8b5bf0; --pr-d: #5a2fc2; --pr-bg: #efe8ff; --pr-line: #cdb9fb; --pr-ink: #6a38d8;
  --bg: var(--cream); --primary: var(--pr); --primary-dark: var(--pr-d); --primary-ink: #fff;
  --sky: var(--pr); --sky-dark: var(--pr-d);
  --me: #ece4ff; --me-ink: #4e25b0; --line: #e8e2da;
}
body, .screen, .chat-screen, #app { background: var(--cream); }
.splash { position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--pr); transition: opacity .4s ease; }
.splash img { width: min(48vw, 260px); height: auto; animation: pupPop .6s cubic-bezier(.2,1.6,.4,1); }
.splash b { position: absolute; bottom: calc(10vh + env(safe-area-inset-bottom, 0px)); color: #fff; font: 900 clamp(40px, 10vw, 64px) "KidsEn", "NanumSquareRound", sans-serif; letter-spacing: -.01em; }
.splash.out { opacity: 0; pointer-events: none; }
/* 시작 화면 (누구예요?) */
#screen-code .card { background: transparent; border: 0; box-shadow: none; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-height: min(86vh, 900px); }
#screen-code .hero-img { width: min(46vw, 200px); height: auto; margin-top: 4vh; filter: drop-shadow(0 14px 10px rgba(80, 60, 40, .10)); }
#screen-code #study-title, #screen-code .hero-greet { display: none; }
#screen-code .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 4px; }
#screen-code .brand b { font: 900 clamp(40px, 9vw, 58px)/1.1 "KidsEn", "NanumSquareRound", sans-serif; color: var(--pr); letter-spacing: -.01em; }
#screen-code .brand span { font: 700 clamp(18px, 3.6vw, 22px) "NanumSquareRound", sans-serif; color: #5f5a54; }
#screen-code #kid-picker { width: 100%; max-width: 560px; display: flex; flex-direction: column; flex: 1; }
#screen-code .picker-title { margin: 18px 0 4px; font: 900 clamp(24px, 5vw, 30px) "NanumSquareRound", sans-serif !important; color: var(--ink); }
#screen-code .kid-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px; margin: 14px 0 24px; }
#screen-code .kid-btn { background: #fff; border: 2px solid #e6e1da; border-radius: 18px; box-shadow: 0 4px 0 #e2ddd5; padding: 16px 8px 14px; gap: 8px; }
#screen-code .kid-btn .initial { width: 70px; height: 70px; background: #f5a524 !important; box-shadow: inset 0 -5px 0 rgba(0,0,0,.10); font-size: 26px; }
#screen-code .kid-btn .nm { font: 800 20px "NanumSquareRound", sans-serif; color: #4b4b4b; }
#screen-code #other-kid { margin-top: auto; width: 100%; min-height: 58px; border: 0; border-radius: 16px; background: linear-gradient(var(--pr-top), var(--pr)); box-shadow: 0 5px 0 var(--pr-d); color: #fff; font: 900 21px "NanumSquareRound", sans-serif !important; }
#screen-code #code-form { width: 100%; max-width: 520px; text-align: left; }
/* 버튼 · 입력 (첫 화면 · 동의 · 카메라 · 대화) */
.btn-3d, .btn.primary { background: linear-gradient(var(--pr-top), var(--pr)); box-shadow: 0 4px 0 var(--pr-d); }
.btn-3d:active:not(:disabled), .btn.primary:active:not(:disabled) { box-shadow: 0 0 0 var(--pr-d); }
.btn.primary:not(:disabled):hover { background: var(--pr-top); }
.btn-3d.ghost, .btn.ghost, .btn.stop, .btn.place, .btn.mic { color: var(--pr-ink); }
.linklike, .skip-link, .eyebrow { color: var(--pr); }
input[type="text"]:focus, textarea:focus, .test-text:focus, select:focus { border-color: var(--pr-line); }
.choice.sel { border-color: var(--pr-line); background: var(--pr-bg); color: var(--pr-ink); box-shadow: 0 4px 0 var(--pr-line); }
.lbar i { background: var(--pr); }

/* ---- 학생 화면(지도·레슨·완료·수행평가)에도 ---- */
#quiz-view { --bg: var(--cream); background: var(--cream); }
#quiz-view .qpanel, #quiz-view .map-head, #quiz-view .overlay.mapsheet, #quiz-view .mapsheet > .card, #quiz-view .combo-burst, .chest-pop.full { background: var(--cream); }
#quiz-view .map-foot { background: linear-gradient(rgba(248,245,241,0), var(--cream) 26%); }
#quiz-view .btn-3d, .chest-pop.full .btn-3d, #quiz-view :is(#map-chat, #test-done-chat, #streak-next, #gd-close, .btn-3d.sky) { background: linear-gradient(var(--pr-top), var(--pr)); box-shadow: 0 calc(var(--p) * 5) 0 var(--pr-d); }
#quiz-view .btn-3d.good { background: linear-gradient(var(--g-top), var(--g)); box-shadow: 0 calc(var(--p) * 5) 0 var(--g-d); }
#quiz-view .btn-3d.bad { background: linear-gradient(#ff6161, var(--red)); box-shadow: 0 calc(var(--p) * 5) 0 var(--red-d); }
#quiz-view .btn-3d:disabled, #quiz-view #streak-next:disabled { background: #e6e1da; box-shadow: 0 calc(var(--p) * 5) 0 #d3cdc4; color: #aaa49c; }
#quiz-view .btn-3d.ghost { background: #fff; color: var(--pr-ink); border-color: #e6e1da; box-shadow: 0 calc(var(--p) * 4) 0 #e6e1da; }
#quiz-view .lbar, .chest-pop.full .lbar, #quiz-view .team-row .tr-bar, #quiz-view .goals-card .t2-bar, #quiz-view .goals-card .ms-bar::before { background: #e8e3dc; }
#quiz-view .lbar i, .chest-pop.full .lbar i, #quiz-view .team-row .tr-bar i, #quiz-view .goals-card .t2-bar i { background: var(--pr); }
#quiz-view .choice, #quiz-view .tile, #quiz-view .gp-opt, #quiz-view .gd-row, #quiz-view .goals-card .missions, #quiz-view .goals-card .team2 { border-color: #e6e1da; box-shadow: 0 calc(var(--p) * 4) 0 #e6e1da; }
#quiz-view .choice.sel, #quiz-view .gp-opt.sel { border-color: var(--pr-line); background: var(--pr-bg); color: var(--pr-ink); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-line); }
#quiz-view .gp-opt.sel b { color: var(--pr-ink); }
#quiz-view .gp-opt.sel b::before { background: var(--pr); }
#quiz-view .build-line.slots .tile { border-color: var(--pr-line); background: var(--pr-bg); color: var(--pr-ink); box-shadow: 0 calc(var(--p) * 3) 0 var(--pr-line); }
#quiz-view .build-line .slot { background: #efebe5; border-color: #e3ddd5; }
#quiz-view .quiz-prompt .listen-btn { background: linear-gradient(var(--pr-top), var(--pr)); box-shadow: 0 calc(var(--p) * 6) 0 var(--pr-d); }
#quiz-view .new-word-tag { color: var(--pr-ink); }
#quiz-view .coach-bubble, #quiz-view .chat-dock .cd-bubble, #quiz-view .test-cheer span { border-color: #e3ddd5; }
#quiz-view .coach-bubble::before { border-color: #e3ddd5; }
#quiz-view .wcard .face.front { border-color: #e0d9cf; box-shadow: 0 calc(var(--p) * 7) 0 #e0d9cf; }
#quiz-view #qp-cards.rv .coach-bubble, #quiz-view #qp-cards.rv .coach-bubble::before { background: var(--pr-bg); }
#quiz-view #qp-cards.rv .say-btn, #quiz-view .say-btn { border-color: #e3ddd5; box-shadow: 0 calc(var(--p) * 3) 0 #e3ddd5; }
#quiz-view .test-text { border-color: var(--pr-line); box-shadow: 0 calc(var(--p) * 3) 0 #e2d7fd; }
#quiz-view .listen-tag, #quiz-view .linklike, #quiz-view .skip-link { color: var(--pr); }
#quiz-view .dcard.c-time { --c: var(--pr); --t: var(--pr-ink); }
#quiz-view .test-prompt .passage { border-color: #e3ddd5; }
/* 지도: 지금 단원은 보라, 더 연습하기는 주황 */
#quiz-view .unit-banner.duo { --c: var(--pr); --cd: var(--pr-d); }
#quiz-view .sec-green .node.duo { --c: var(--pr); --cd: var(--pr-d); --c2: #9a6bf5; }
#quiz-view .sec-green .start-bubble.duo { color: var(--pr-ink); }
#quiz-view .sec-purple .unit-banner.duo { --c: #ff9f2e; --cd: #e07f0c; }
#quiz-view .sec-purple .node.duo { --c: #ff9f2e; --cd: #e07f0c; --c2: #ffbd66; }
#quiz-view .sec-purple .start-bubble.duo { color: #e07f0c; }
#quiz-view .node.duo.now::before { border-color: #e6e1da; border-top-color: var(--c); border-right-color: var(--c); }
#quiz-view .sec-gray .unit-banner.duo { --c: #e6e1da; --cd: #d0c9bf; }
#quiz-view .node.duo.locked, #quiz-view .node.duo.chest.locked { background: radial-gradient(circle at 50% 35%, #f1ede8, #e2ddd6 70%); box-shadow: 0 calc(var(--p) * 7) 0 #c9c2b8; }
#quiz-view .start-bubble.duo { border-color: #e6e1da; box-shadow: 0 calc(var(--p) * 2) 0 #e6e1da; }
#quiz-view .gd-row b { color: var(--pr-ink); }
#quiz-view .gd-row:first-child { background: #f5f0ff; border-color: #e0d3fd; box-shadow: 0 calc(var(--p) * 3) 0 #e0d3fd; }
#quiz-view .sk-step { background: #efe9df; }
#quiz-view .quit-card .btn.primary { background: linear-gradient(var(--pr-top), var(--pr)); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-d); }
#quiz-view .quit-card .btn.ghost { background: var(--pr-bg); color: var(--pr-ink); border-color: var(--pr-line); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-line); }
/* 대화 화면 · AI 똑똑하게 쓰기도 같은 크림 · 보라 */
.chat-screen, .chat-screen .messages { background: var(--cream); }
.chat-top, .composer { background: #fffdfa; border-color: #ece6de; }
.cdl-view .lbar i, .cdl-view .segs i.on { background: var(--primary); }

/* =====================================================================
   우리 반: 반 리그 · 친구 응원판 (2026-11-13) — 순위는 없음
   ===================================================================== */
#quiz-view .mh-stats { gap: calc(var(--p) * 26); }
#quiz-view .map-head .s-league b { color: var(--pr-ink); font-size: calc(var(--p) * 17); }
/* 리그 트로피 색 (금 트로피 그림에 색만 바꿈) */
.lg-ic.lg-0, .lg-ic.lg-1, .lg-ic.lg-2 { filter: none; } /* 브론즈·실버·골드는 받은 그림 그대로 */
.lg-ic.lg-3 { filter: hue-rotate(175deg) saturate(1.3); }
.lg-ic.lg-4 { filter: hue-rotate(-45deg) saturate(1.6); }
.lg-ic.lg-5 { filter: hue-rotate(85deg) saturate(1.3); }
.lg-ic.lg-6 { filter: hue-rotate(220deg) saturate(1.3); }
.lg-ic.lg-7 { filter: grayscale(.6) brightness(1.25) sepia(.2); }
.lg-ic.lg-8 { filter: grayscale(1) brightness(.55); }
.lg-ic.lg-9 { filter: hue-rotate(160deg) saturate(.6) brightness(1.25); }
#quiz-view .friends-card { gap: calc(var(--p) * 14); }
#quiz-view .fr-league { display: grid; grid-template-columns: calc(var(--p) * 72) 1fr; align-items: center; column-gap: calc(var(--p) * 12); row-gap: calc(var(--p) * 10); padding: calc(var(--p) * 14); border: calc(var(--p) * 2) solid #e6e1da; border-radius: calc(var(--p) * 16); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 #e6e1da; }
#quiz-view .fl-cup { width: calc(var(--p) * 68); height: calc(var(--p) * 64); object-fit: contain; }
#quiz-view .fl-main { display: flex; flex-direction: column; gap: calc(var(--p) * 4); min-width: 0; }
#quiz-view .fl-main small { font: 800 calc(var(--p) * 13) var(--font); color: var(--muted); }
#quiz-view .fl-main b { font: 900 calc(var(--p) * 22) var(--font); color: var(--pr-ink); }
#quiz-view .fl-main span { font: 700 calc(var(--p) * 14)/1.4 var(--font); color: #5f5a54; }
#quiz-view .fl-bar { height: calc(var(--p) * 12); border-radius: 99px; background: #e8e3dc; overflow: hidden; }
#quiz-view .fl-bar i { display: block; height: 100%; border-radius: 99px; background: var(--pr); }
#quiz-view .fl-ladder { grid-column: 1 / -1; display: flex; gap: calc(var(--p) * 6); overflow-x: auto; padding-bottom: calc(var(--p) * 2); }
#quiz-view .fl-ladder span { flex: none; display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 2); width: calc(var(--p) * 52); padding: calc(var(--p) * 4) 0; border-radius: calc(var(--p) * 10); font: 800 calc(var(--p) * 11) var(--font); color: #a39c93; }
#quiz-view .fl-ladder span img { width: calc(var(--p) * 28); height: calc(var(--p) * 26); object-fit: contain; opacity: .35; }
#quiz-view .fl-ladder span.got img { opacity: .75; }
#quiz-view .fl-ladder span.now { background: var(--pr-bg); color: var(--pr-ink); }
#quiz-view .fl-ladder span.now img { opacity: 1; }
#quiz-view .ini { width: calc(var(--p) * 52); height: calc(var(--p) * 52); border-radius: 50%; display: grid; place-items: center; color: #fff; font: 900 calc(var(--p) * 18) var(--font); box-shadow: inset 0 calc(var(--p) * -4) 0 rgba(0,0,0,.1); }
#quiz-view .fr-board { display: flex; flex-direction: column; gap: calc(var(--p) * 10); }
#quiz-view .fr-h { display: flex; flex-direction: column; gap: calc(var(--p) * 2); }
#quiz-view .fr-h b { font: 900 calc(var(--p) * 19) var(--font); color: var(--ink); }
#quiz-view .fr-h span { font: 700 calc(var(--p) * 13) var(--font); color: var(--muted); }
#quiz-view .fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--p) * 92), 1fr)); gap: calc(var(--p) * 10); }
#quiz-view .fr-kid { display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 4); padding: calc(var(--p) * 12) calc(var(--p) * 4) calc(var(--p) * 10); border: calc(var(--p) * 2) solid #e6e1da; border-radius: calc(var(--p) * 16); background: #fff; box-shadow: 0 calc(var(--p) * 3) 0 #e6e1da; cursor: pointer; }
#quiz-view .fr-kid:active:not(:disabled) { transform: translateY(calc(var(--p) * 2)); box-shadow: 0 calc(var(--p) * 1) 0 #e6e1da; }
#quiz-view .fr-kid em { font: 800 calc(var(--p) * 15) var(--font); font-style: normal; color: var(--ink); }
#quiz-view .fr-kid .fk-fire { display: inline-flex; align-items: center; gap: calc(var(--p) * 2); font: 900 calc(var(--p) * 14) var(--font); color: #ff8a00; }
#quiz-view .fr-kid .fk-fire img { width: calc(var(--p) * 18); height: calc(var(--p) * 14); object-fit: contain; }
#quiz-view .fr-kid small { font: 800 calc(var(--p) * 11) var(--font); color: var(--pr-ink); }
#quiz-view .fr-kid.me { border-color: var(--pr-line); background: var(--pr-bg); box-shadow: 0 calc(var(--p) * 3) 0 var(--pr-line); cursor: default; }
#quiz-view .fr-kid.cheered { opacity: .85; cursor: default; }
#quiz-view .fr-kid:disabled { color: inherit; }
#quiz-view .fr-cheer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(60,60,60,.35); }
#quiz-view .fr-cheer[hidden] { display: none; }
#quiz-view .fc-card { width: 100%; max-width: calc(calc(var(--p) * 390) + calc(var(--p) * 32)); display: flex; flex-direction: column; gap: calc(var(--p) * 10); padding: calc(var(--p) * 18) calc(var(--p) * 16) calc(var(--p) * 22); border-radius: calc(var(--p) * 22) calc(var(--p) * 22) 0 0; background: #fff; }
#quiz-view .fc-who { display: flex; align-items: center; gap: calc(var(--p) * 12); }
#quiz-view .fc-who b { font: 900 calc(var(--p) * 19) var(--font); color: var(--ink); }
#quiz-view .fc-opts { display: flex; flex-direction: column; gap: calc(var(--p) * 8); }
#quiz-view .fc-opt { min-height: calc(var(--p) * 48); border: calc(var(--p) * 2.5) solid var(--pr-line); border-radius: calc(var(--p) * 14); background: var(--pr-bg); box-shadow: 0 calc(var(--p) * 3) 0 var(--pr-line); color: var(--pr-ink); font: 900 calc(var(--p) * 18) var(--font); cursor: pointer; }
#quiz-view .fc-card .linklike { align-self: center; margin-top: calc(var(--p) * 2); }
/* 응원 받았을 때 알림 (보라) */
.mission-toast.cheer-toast { background: linear-gradient(#8b5bf0, #7b45e6); box-shadow: 0 calc(var(--p) * 5) 0 #5a2fc2; }
.mission-toast.cheer-toast .mt-ic { background: #fff; box-shadow: 0 0 0 calc(var(--p) * 3) #fff; }
/* 반 리그가 올라갔을 때 (화면 전체) */
.chest-pop.league-up { justify-content: center; }
.chest-pop.league-up .lu-row { display: flex; align-items: flex-end; justify-content: center; gap: calc(var(--p) * 18); margin-top: auto; }
.chest-pop.league-up .lu-old { width: calc(var(--p) * 90); opacity: .5; }
.chest-pop.league-up .lu-new { width: calc(var(--p) * 190); animation: pupPop .7s cubic-bezier(.2,1.6,.4,1); }
.chest-pop.league-up .lu-sub { margin: 0; font: 700 calc(var(--p) * 16)/1.5 var(--font); color: #5f5a54; }

/* =====================================================================
   시안 3 (2026-11-13 밤) — 크림 바탕 · 보라 · 깔끔한 글씨, 문제 위 큰 안내 한 줄
   강아지는 철자·문장 만들기·완료·불꽃에서만. 지도 아래 탭(홈·단어장·미션·AI 친구)
   ===================================================================== */
#quiz-view, .mission-toast, .chest-modal {
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --cream: #fbf8f3; --ink: #2f2d2b; --muted: #8b857d; --edge: #e7e1d8;
  --pr: #7b42e0; --pr-top: #8650ea; --pr-d: #5d2bbd; --pr-bg: #efe6ff; --pr-line: #c9aef5; --pr-ink: #6a34d4;
  --lav: #c7a7f5; --lav-d: #a984e8; --sky: #1cb0f6; --sky-d: #1494d3;
}
#quiz-view { background: var(--cream); }
#quiz-view .qpanel, #quiz-view .overlay.mapsheet, #quiz-view .mapsheet > .card { background: var(--cream); }
#quiz-view :is(h1, h2, h3, .done-title, .sheet-title, .choice, .tile, .btn, .btn-3d, .q-title, .coach-bubble) { font-family: var(--font) !important; }
/* 위쪽 */
#quiz-view .lesson-top { position: relative; padding-top: calc(var(--p) * 18); gap: calc(var(--p) * 12); }
#quiz-view .x-btn { width: calc(var(--p) * 26); height: calc(var(--p) * 26); color: #a8a29a; }
#quiz-view .lbar { height: calc(var(--p) * 12); background: #e6e1da; }
#quiz-view .lbar i { background: var(--pr); }
#quiz-view .lbar i::after { top: calc(var(--p) * 2); height: calc(var(--p) * 3); background: rgba(255,255,255,.3); }
#quiz-view .test-count { font: 700 calc(var(--p) * 15) var(--font); color: #4a4642; letter-spacing: .04em; }
#quiz-view .combo { position: absolute; left: calc(var(--p) * 38); top: calc(var(--p) * -2); font: 800 calc(var(--p) * 13) var(--font) !important; color: #f08a00; }
#quiz-view .combo.go { animation: pupPop .45s cubic-bezier(.2,1.6,.4,1); }
#quiz-view .combo-burst { display: none !important; }
/* 문제 위 큰 안내 */
#quiz-view .q-title { margin: 0; font: 800 calc(var(--p) * 24)/1.3 var(--font) !important; color: var(--ink); text-align: left; letter-spacing: -.01em; }
#quiz-view .q-title:empty { display: none; }
#quiz-view .lesson-body { padding-top: calc(var(--p) * 26); gap: calc(var(--p) * 18); }
#quiz-view #qp-lesson .coach { display: none; }
#quiz-view #qp-lesson:is([data-kind="spell"], [data-kind="build"]) .coach { display: flex; align-items: flex-start; gap: 0; margin-top: calc(var(--p) * 4); }
#quiz-view #qp-lesson:is([data-kind="spell"], [data-kind="build"]) .quiz-prompt { display: none !important; }
#quiz-view #qp-lesson .coach-img { width: calc(var(--p) * 150); height: calc(var(--p) * 130); }
#quiz-view #qp-lesson[data-kind="spell"] .coach-img { transform: scaleX(-1); }
#quiz-view #qp-lesson .coach-bubble { margin-top: calc(var(--p) * 6); padding: calc(var(--p) * 10) calc(var(--p) * 16); border: calc(var(--p) * 2) solid #dcd6cd; border-radius: calc(var(--p) * 18); font: 600 calc(var(--p) * 18)/1.4 var(--font) !important; color: var(--ink); text-align: center; max-width: calc(var(--p) * 170); }
#quiz-view #qp-lesson .coach-bubble::before { left: calc(var(--p) * 8); top: auto; bottom: calc(var(--p) * -7); transform: rotate(-30deg) skewX(10deg); border-color: #dcd6cd; background: #fff; }
/* 새 단어 */
#quiz-view .new-word-tag { margin: calc(var(--p) * -8) 0 calc(var(--p) * -6); align-self: flex-start; display: inline-flex; align-items: center; gap: calc(var(--p) * 5); padding: calc(var(--p) * 3) calc(var(--p) * 10) calc(var(--p) * 3) calc(var(--p) * 5); border-radius: calc(var(--p) * 8); background: var(--pr-bg); font: 700 calc(var(--p) * 14) var(--font); color: var(--pr-ink); }
#quiz-view .new-word-tag i { width: calc(var(--p) * 18); height: calc(var(--p) * 18); border-radius: 50%; background: var(--pr); color: #fff; display: grid; place-items: center; font: 900 calc(var(--p) * 14)/1 var(--font); font-style: normal; }
/* 단어 */
#quiz-view .quiz-prompt { margin: calc(var(--p) * 2) 0 calc(var(--p) * 8); }
#quiz-view .quiz-prompt.text { font: 800 calc(var(--p) * 32)/1.2 var(--font) !important; color: var(--ink); }
#quiz-view .quiz-prompt.text.read { font-size: calc(var(--p) * 32) !important; letter-spacing: 0; }
#quiz-view .quiz-prompt .listen-btn { width: calc(var(--p) * 84); height: calc(var(--p) * 76); border-radius: calc(var(--p) * 18); background: linear-gradient(#3dc0ff, var(--sky)); box-shadow: 0 calc(var(--p) * 5) 0 var(--sky-d); }
#quiz-view .quiz-prompt .listen-btn svg { width: calc(var(--p) * 42); height: calc(var(--p) * 42); }
/* 고르는 칸: 한 줄에 하나 */
#quiz-view #qp-lesson .quiz-choices:not(.tiles) { grid-template-columns: 1fr; gap: calc(var(--p) * 10); }
#quiz-view .choice { min-height: calc(var(--p) * 54); border: calc(var(--p) * 1.5) solid var(--edge); border-radius: calc(var(--p) * 10); background: #fff; box-shadow: 0 calc(var(--p) * 2) 0 #ece7df; font: 700 calc(var(--p) * 20)/1.2 var(--font) !important; color: var(--ink); }
#quiz-view .choice.sel { background: var(--pr-bg); border-color: var(--pr-line); color: var(--ink); box-shadow: 0 calc(var(--p) * 2) 0 var(--pr-line); }
#quiz-view .choice.right { background: #e5f9d6; border-color: #8fd65c; color: #3f8f06; box-shadow: 0 calc(var(--p) * 2) 0 #a9e07f; }
#quiz-view .choice.wrong { background: #ffe1e1; border-color: #ff8f8f; color: var(--ink); box-shadow: 0 calc(var(--p) * 2) 0 #ffb3b3; }
#quiz-view .match-col .choice { min-height: calc(var(--p) * 50); border-radius: calc(var(--p) * 10); font-size: calc(var(--p) * 18) !important; }
#quiz-view .match-grid { gap: calc(var(--p) * 14); }
/* 블록 */
#quiz-view .tile { height: calc(var(--p) * 38); min-width: calc(var(--p) * 34); padding: 0 calc(var(--p) * 12); border: calc(var(--p) * 1.5) solid var(--edge); border-radius: calc(var(--p) * 8); box-shadow: 0 calc(var(--p) * 2) 0 #ece7df; background: #fff; font: 600 calc(var(--p) * 18)/1 var(--font) !important; color: var(--ink); }
#quiz-view .quiz-choices.tiles.letters { gap: calc(var(--p) * 4); }
#quiz-view .quiz-choices.tiles.letters .tile { min-width: calc(var(--p) * 40); height: calc(var(--p) * 44); font-size: calc(var(--p) * 22) !important; font-weight: 600 !important; }
#quiz-view .build-line, #quiz-view .build-line.slots { min-height: calc(var(--p) * 100); margin: calc(var(--p) * 6) 0 calc(var(--p) * 8); padding: calc(var(--p) * 4) 0; border: 0; gap: calc(var(--p) * 6); align-content: flex-start; justify-content: flex-start; background: linear-gradient(transparent calc(50% - 1px), #d6d0c7 calc(50% - 1px), #d6d0c7 50%, transparent 50%, transparent calc(100% - 1px), #d6d0c7 calc(100% - 1px)); }
#quiz-view .build-line .slot { display: none; }
#quiz-view .build-line .tile, #quiz-view .build-line.slots .tile { width: auto; min-width: calc(var(--p) * 38); height: calc(var(--p) * 40); border-color: var(--pr-line); background: var(--pr-bg); color: var(--pr-ink); box-shadow: 0 calc(var(--p) * 2) 0 var(--pr-line); font-size: calc(var(--p) * 20) !important; }
/* 아래 버튼 */
#quiz-view .lesson-foot { padding: calc(var(--p) * 10) 0 calc(var(--p) * 10); }
#quiz-view .btn-3d, #quiz-view :is(#map-chat, #test-done-chat, #streak-next, #gd-close, .btn-3d.sky) { min-height: calc(var(--p) * 48); border-radius: calc(var(--p) * 12); font: 700 calc(var(--p) * 18)/1 var(--font) !important; letter-spacing: 0; background: var(--pr); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-d); }
#quiz-view .btn-3d:disabled, #quiz-view #streak-next:disabled { background: #d9d4cd; color: #f4f1ec; box-shadow: 0 calc(var(--p) * 4) 0 #c7c1b8; }
#quiz-view .btn-3d.ghost, #quiz-view #test-done-chat { background: #fff; color: var(--ink); border: calc(var(--p) * 1.5) solid var(--edge); box-shadow: 0 calc(var(--p) * 3) 0 #e2dcd2; }
#quiz-view .btn-3d.good { background: #58cc02; box-shadow: 0 calc(var(--p) * 4) 0 #46a302; }
#quiz-view .btn-3d.bad { background: #ff4b4b; box-shadow: 0 calc(var(--p) * 4) 0 #e03535; }
/* 정답·오답 띠: 한 줄 + 버튼 */
#quiz-view .sheet { border-radius: 0; padding: calc(var(--p) * 14) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 16); }
#quiz-view .sheet.good { background: #e5f9d6; }
#quiz-view .sheet.bad { background: #ffe4e4; }
#quiz-view .sheet-inner { display: flex !important; flex-direction: column; gap: calc(var(--p) * 10); }
#quiz-view .sheet-title { font: 800 calc(var(--p) * 18)/1.2 var(--font) !important; gap: calc(var(--p) * 8); }
#quiz-view .sheet .sheet-title::before { width: calc(var(--p) * 24); height: calc(var(--p) * 24); }
#quiz-view .sheet-sub { display: none !important; }
#quiz-view .sheet.good .sheet-inner::after { display: none; }
#quiz-view .sheet-inner .btn-3d { margin-top: 0; }
/* ---------- 단어 카드 ---------- */
#quiz-view #qp-cards .coach { display: none !important; }
#quiz-view .cards-body { gap: calc(var(--p) * 24); padding-top: calc(var(--p) * 22); }
#quiz-view .cards-body .q-title { align-self: stretch; margin-bottom: calc(var(--p) * -4); }
#quiz-view .wcard, #quiz-view #qp-cards.rv .wcard { width: min(100%, calc(var(--p) * 300)); height: calc(var(--p) * 330); margin: 0 auto; }
#quiz-view .wcard .face, #quiz-view .wcard .face.back { border: calc(var(--p) * 1.5) solid #dcd6cd; border-radius: calc(var(--p) * 20); background: #fffdfa; box-shadow: none; gap: calc(var(--p) * 8); }
#quiz-view .wcard b, #quiz-view .wcard .face.front b { font: 800 calc(var(--p) * 46)/1.1 var(--font) !important; color: var(--ink); }
#quiz-view .wcard .face.front small { display: none; }
#quiz-view .wcard .face.back small { font: 700 calc(var(--p) * 26) var(--font); color: #a39c93; }
#quiz-view .wcard .pic { font-size: calc(var(--p) * 84); }
#quiz-view .wcard .pic img { max-width: calc(var(--p) * 200); max-height: calc(var(--p) * 150); }
#quiz-view .say-btn.sq, #quiz-view #qp-cards.rv .say-btn.sq { width: calc(var(--p) * 76); height: calc(var(--p) * 70); padding: 0; border: 0; border-radius: calc(var(--p) * 16); background: linear-gradient(#3dc0ff, var(--sky)); box-shadow: 0 calc(var(--p) * 5) 0 var(--sky-d); color: #fff; display: grid; place-items: center; }
#quiz-view .say-btn.sq svg { width: calc(var(--p) * 38); height: calc(var(--p) * 38); }
#quiz-view .cards-foot #cards-prev { display: none; }
#quiz-view #qp-cards.rv .cards-foot #cards-prev { display: inline-flex; }
#quiz-view .cards-foot { display: grid; grid-template-columns: 1fr; gap: calc(var(--p) * 12); }
#quiz-view #qp-cards.rv .cards-foot { grid-template-columns: 1fr 1fr; }
#quiz-view #qp-cards.rv .lesson-top { flex-wrap: nowrap; }
#quiz-view #qp-cards.rv .lbar { order: 0; flex-basis: auto; }
#quiz-view #qp-cards.rv .x-btn { color: #a8a29a; }
/* ---------- 레슨 완료 ---------- */
#quiz-view #qp-done .done-top, #quiz-view #qp-streak .done-top { display: none; }
#quiz-view #qp-done { justify-content: center; gap: calc(var(--p) * 16); }
#quiz-view .done-img { width: calc(var(--p) * 230); height: calc(var(--p) * 230); margin-top: 0; }
#quiz-view .done-title { font: 800 calc(var(--p) * 32)/1.2 var(--font) !important; color: var(--ink); }
#quiz-view #qp-done.rv .done-title { color: var(--pr-ink); }
#quiz-view #qp-done.rv .done-title::before, #quiz-view #qp-done.rv .done-title::after { display: none; }
#quiz-view .done-sub { margin: calc(var(--p) * -8) 0 0; font: 600 calc(var(--p) * 17) var(--font); color: #4a4642; }
#quiz-view .done-cards { grid-template-columns: repeat(3, 1fr); gap: calc(var(--p) * 10); max-width: calc(var(--p) * 330); margin: 0 auto calc(var(--p) * 10); }
#quiz-view .dcard { border-width: calc(var(--p) * 2); border-radius: calc(var(--p) * 10); }
#quiz-view .dcard.c-xp { --c: #ffbb12; --t: #f08a00; }
#quiz-view .dcard.c-acc { --c: #58cc02; --t: #3f9a06; }
#quiz-view .dcard.c-time { --c: var(--sky); --t: #1488c8; }
#quiz-view .dcard > span { padding: calc(var(--p) * 3) 0 calc(var(--p) * 4); font: 700 calc(var(--p) * 13) var(--font) !important; }
#quiz-view .dcard b { flex-direction: row; gap: calc(var(--p) * 5); min-height: calc(var(--p) * 46); padding: calc(var(--p) * 6) 0; font: 800 calc(var(--p) * 20)/1 var(--font) !important; }
#quiz-view .dcard b img { width: calc(var(--p) * 20); height: calc(var(--p) * 20); margin: 0; }
#quiz-view .dcard.c-acc b img, #quiz-view .dcard.c-time b img { filter: none; }
#quiz-view .dcard b em { font-style: normal; }
#quiz-view #qp-done .btn-3d { margin-top: calc(var(--p) * 6); }
/* ---------- 불꽃 · 목표 ---------- */
#quiz-view #qp-streak { justify-content: flex-start; gap: calc(var(--p) * 12); padding-top: calc(var(--p) * 26); }
#quiz-view .st-bubble { position: relative; padding: calc(var(--p) * 10) calc(var(--p) * 20); border: calc(var(--p) * 1.5) solid #dcd6cd; border-radius: calc(var(--p) * 14); background: #fff; font: 700 calc(var(--p) * 18) var(--font); color: var(--ink); }
#quiz-view .st-bubble::after { content: ""; position: absolute; left: 50%; bottom: calc(var(--p) * -8); width: calc(var(--p) * 14); height: calc(var(--p) * 14); transform: translateX(-50%) rotate(45deg); background: #fff; border-right: calc(var(--p) * 1.5) solid #dcd6cd; border-bottom: calc(var(--p) * 1.5) solid #dcd6cd; }
#quiz-view .st-step1 { display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 10); width: 100%; }
#quiz-view #qp-streak.goal .st-step1 { display: none; }
#quiz-view .streak-hero { width: calc(var(--p) * 250); margin-top: calc(var(--p) * 6); }
#quiz-view .streak-big { display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 2); }
#quiz-view .streak-big .streak-num { position: static; transform: none; font: 900 calc(var(--p) * 84)/1 var(--font) !important; color: #ff8a00; text-shadow: none; }
#quiz-view .streak-big span { font: 800 calc(var(--p) * 24) var(--font); color: #ff8a00; }
#quiz-view #qp-streak .week i { width: calc(var(--p) * 30); height: calc(var(--p) * 30); background: #e6e1da; }
#quiz-view #qp-streak .week .on i { background: #ff9600; box-shadow: none; }
#quiz-view #qp-streak .week span { font: 600 calc(var(--p) * 14) var(--font) !important; color: #6b665f; }
#quiz-view .streak-badge { background: #fff6e6; border-color: #f7d9a6; color: #c76f00; font: 700 calc(var(--p) * 15) var(--font) !important; padding: calc(var(--p) * 6) calc(var(--p) * 12); }
#quiz-view .streak-badge .sb-dog { width: calc(var(--p) * 30); height: calc(var(--p) * 30); background: none; border-radius: 0; }
#quiz-view .streak-msg { font: 700 calc(var(--p) * 15) var(--font) !important; color: #c76f00; }
#quiz-view .goal-hero { display: none; position: relative; width: calc(var(--p) * 250); height: calc(var(--p) * 170); margin: calc(var(--p) * 6) auto 0; }
#quiz-view #qp-streak.goal .goal-hero { display: block; }
#quiz-view .gh-fire { position: absolute; left: calc(var(--p) * 10); top: calc(var(--p) * 6); width: calc(var(--p) * 120); height: auto; transform: rotate(-90deg) scaleY(-1); opacity: .95; }
#quiz-view .gh-cal { position: absolute; left: calc(var(--p) * 28); top: calc(var(--p) * 40); width: calc(var(--p) * 104); height: calc(var(--p) * 110); border-radius: calc(var(--p) * 14); background: #fff; border: calc(var(--p) * 4) solid #f04f3e; box-shadow: 0 calc(var(--p) * 5) 0 #d43c2c; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
#quiz-view .gh-cal i { align-self: stretch; height: calc(var(--p) * 26); background: #f04f3e; }
#quiz-view .gh-cal b { font: 900 calc(var(--p) * 56)/1.25 var(--font); color: #f04f3e; }
#quiz-view .gh-dog { position: absolute; right: 0; bottom: 0; width: calc(var(--p) * 130); height: auto; }
#quiz-view .goal-pick { gap: calc(var(--p) * 10); margin-top: calc(var(--p) * 6); }
#quiz-view .gp-opt { height: calc(var(--p) * 50); padding: 0 calc(var(--p) * 18); border: calc(var(--p) * 1.5) solid var(--edge); border-radius: calc(var(--p) * 12); background: #fff; box-shadow: 0 calc(var(--p) * 2) 0 #ece7df; }
#quiz-view .gp-opt b { font: 800 calc(var(--p) * 19) var(--font); color: var(--ink); }
#quiz-view .gp-opt span { font: 600 calc(var(--p) * 16) var(--font); color: #8b857d; }
#quiz-view .gp-opt.sel { background: var(--pr-bg); border-color: var(--pr-line); box-shadow: 0 calc(var(--p) * 2) 0 var(--pr-line); }
#quiz-view .gp-opt.sel b, #quiz-view .gp-opt.sel span { color: var(--pr-ink); }
#quiz-view .gp-opt.sel b::before { display: none; }
#quiz-view #streak-next { margin-top: auto; }
/* ---------- 보물상자 열기 (지도 위 카드) ---------- */
.chest-modal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: calc(var(--p) * 20); background: rgba(40,36,32,.45); font-family: var(--font); }
.chest-modal .cm-card { width: min(100%, calc(var(--p) * 300)); display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 10); padding: calc(var(--p) * 22) calc(var(--p) * 18) calc(var(--p) * 18); border-radius: calc(var(--p) * 20); background: #fff; box-shadow: 0 calc(var(--p) * 10) calc(var(--p) * 30) rgba(0,0,0,.18); }
.chest-modal .cm-plus { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); font: 900 calc(var(--p) * 26) var(--font); color: #f08a00; }
.chest-modal .cm-plus img { width: calc(var(--p) * 30); height: calc(var(--p) * 30); }
.chest-modal .cm-full { margin: 0; font: 700 calc(var(--p) * 16)/1.45 var(--font); color: var(--pr-ink, #5b2fc0); text-align: center; }
.chest-modal .cm-chest { width: calc(var(--p) * 150); height: auto; animation: pupPop .6s cubic-bezier(.2,1.6,.4,1); }
.chest-modal .cp-title { font: 800 calc(var(--p) * 22) var(--font); color: var(--ink); text-align: center; }
.chest-modal .btn-3d { width: 100%; min-height: calc(var(--p) * 46); border: 0; border-radius: calc(var(--p) * 12); background: var(--pr); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-d); color: #fff; font: 700 calc(var(--p) * 18) var(--font) !important; }
/* ---------- 학습 지도 ---------- */
#quiz-view .map-head, #quiz-view .map-foot { display: none !important; }
#quiz-view #qp-map { padding-top: calc(var(--p) * 14); padding-bottom: 0; }
#quiz-view .path { gap: calc(var(--p) * 16); padding: 0 0 calc(var(--p) * 30); }
#quiz-view .path-sec { gap: calc(var(--p) * 18); }
#quiz-view .path-line { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
#quiz-view .path-line polyline { fill: none; stroke: #e2d4fb; stroke-width: calc(var(--p) * 14); stroke-linecap: round; stroke-linejoin: round; }
#quiz-view .duo-wrap { z-index: 1; }
#quiz-view .unit-banner.duo, #quiz-view .sec-green .unit-banner.duo { --c: var(--pr); --cd: var(--pr-d); display: flex; align-items: center; gap: 0; padding: calc(var(--p) * 12) 0 calc(var(--p) * 12) calc(var(--p) * 16); border-radius: calc(var(--p) * 12); box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-d); position: relative; z-index: 2; }
#quiz-view .unit-banner.duo b { font: 800 calc(var(--p) * 20)/1.3 var(--font) !important; letter-spacing: -.01em; }
#quiz-view .unit-banner.duo small { font: 600 calc(var(--p) * 14)/1.3 var(--font) !important; opacity: .9; }
#quiz-view .unit-banner .ub-guide { width: calc(var(--p) * 54); height: calc(var(--p) * 44); margin-left: auto; border-left: calc(var(--p) * 1.5) solid rgba(255,255,255,.35); border-radius: 0; }
#quiz-view .unit-banner .ub-guide svg { width: calc(var(--p) * 24); height: calc(var(--p) * 24); }
#quiz-view .rv-label { position: relative; z-index: 2; align-self: stretch; display: flex; align-items: center; gap: calc(var(--p) * 10); margin: calc(var(--p) * 8) 0 calc(var(--p) * 4); }
#quiz-view .rv-label::before, #quiz-view .rv-label::after { content: ""; flex: 1; height: calc(var(--p) * 1.5); background: #e2dcd2; }
#quiz-view .rv-label span { padding: calc(var(--p) * 4) calc(var(--p) * 18); border-radius: 999px; background: #e7dafd; font: 700 calc(var(--p) * 15) var(--font); color: var(--pr-ink); }
#quiz-view .unit-pill { align-self: stretch; display: flex; align-items: center; gap: calc(var(--p) * 12); padding: calc(var(--p) * 12) calc(var(--p) * 16); border-radius: calc(var(--p) * 12); background: #e9e5df; box-shadow: 0 calc(var(--p) * 3) 0 #dcd6cc; font: 700 calc(var(--p) * 17) var(--font); color: #5f5a54; }
#quiz-view .unit-pill img { width: calc(var(--p) * 20); height: calc(var(--p) * 24); object-fit: contain; opacity: .7; }
#quiz-view .path-sec.sec-gray { gap: 0; padding-bottom: calc(var(--p) * 10); }
/* 칸: 연보라, 지금 할 칸은 진한 보라, 상자·트로피는 그림만 */
#quiz-view .node.duo, #quiz-view .sec-green .node.duo, #quiz-view .sec-purple .node.duo { --c: var(--lav); --cd: var(--lav-d); --c2: #d9c1fa; width: calc(var(--p) * 70); height: calc(var(--p) * 58); background: radial-gradient(circle at 50% 35%, var(--c2), var(--c) 72%); box-shadow: 0 calc(var(--p) * 6) 0 var(--cd); }
#quiz-view .node.duo.now { --c: var(--pr); --cd: var(--pr-d); --c2: #9161f0; }
#quiz-view .node.duo.done { --c: #8d5ce8; --cd: #6a3cc9; --c2: #a57cf0; }
#quiz-view .sec-purple .node.duo { --c: #9b6cf0; --cd: #7445d6; --c2: #b391f5; }
#quiz-view .node.duo.now::before { display: none; }
#quiz-view .node.duo svg { width: calc(var(--p) * 28); height: calc(var(--p) * 28); }
#quiz-view .node.duo.locked { background: radial-gradient(circle at 50% 35%, #ece6f6, #ddd4ec 72%); box-shadow: 0 calc(var(--p) * 6) 0 #c8bedb; color: #b1a6c6; }
#quiz-view .node.duo:is(.chest, .trophy), #quiz-view .node.duo.chest.locked { background: none !important; box-shadow: none !important; width: calc(var(--p) * 72); height: calc(var(--p) * 62); }
#quiz-view .node.duo .nimg { width: calc(var(--p) * 64); height: calc(var(--p) * 58); filter: drop-shadow(0 calc(var(--p) * 4) 0 rgba(0,0,0,.08)); }
#quiz-view .node.duo.chest.ready .nimg { animation: pupPop 1.6s ease-in-out infinite; }
#quiz-view .start-bubble.duo { display: none; }
#quiz-view .duo-wrap:has(.start-bubble) { margin-top: 0; }
#quiz-view .path-pup { left: calc(var(--p) * -4); right: auto; top: calc(var(--p) * 78); width: calc(var(--p) * 120); }
#quiz-view .sec-purple .path-pup { left: auto; right: calc(var(--p) * -4); top: calc(var(--p) * 40); width: calc(var(--p) * 120); }
/* 칸 카드 */
#quiz-view .node-pop { width: calc(var(--p) * 250); padding: calc(var(--p) * 16); border-radius: calc(var(--p) * 16); background: var(--pr) !important; color: #fff; gap: calc(var(--p) * 6); box-shadow: 0 calc(var(--p) * 8) calc(var(--p) * 20) rgba(80,40,160,.25); }
#quiz-view .node-pop::before { background: var(--pr) !important; }
#quiz-view .node-pop b { font: 800 calc(var(--p) * 20)/1.25 var(--font) !important; }
#quiz-view .node-pop span { font: 600 calc(var(--p) * 15) var(--font); }
#quiz-view .node-pop button { height: calc(var(--p) * 44); border-radius: calc(var(--p) * 12); background: #fff; color: var(--pr-ink); font: 800 calc(var(--p) * 18) var(--font) !important; box-shadow: 0 calc(var(--p) * 3) 0 rgba(0,0,0,.12); }
#quiz-view .node-pop.off { display: block; width: auto; max-width: calc(var(--p) * 220); padding: calc(var(--p) * 10) calc(var(--p) * 16); background: #3b2a6b !important; color: #fff; border: 0; text-align: center; }
#quiz-view .node-pop.off::before { background: #3b2a6b !important; border: 0; }
#quiz-view .node-pop.off b { display: none; }
#quiz-view .node-pop.off span { color: #fff; font: 700 calc(var(--p) * 15)/1.4 var(--font); }
#quiz-view .node-pop.off .pop-img { display: none; }
/* 아래 탭 */
#quiz-view .map-tabs { position: sticky; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--p) * 8); margin: auto calc(-1 * max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16)))) 0; padding: calc(var(--p) * 10) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(calc(var(--p) * 12) + env(safe-area-inset-bottom, 0px)); background: #fffdf9; border-top: calc(var(--p) * 1.5) solid #ece6dd; }
#quiz-view .map-tabs .mt { height: calc(var(--p) * 52); border: 0; border-radius: calc(var(--p) * 14); background: none; display: grid; place-items: center; cursor: pointer; }
#quiz-view .map-tabs .mt img { width: calc(var(--p) * 34); height: calc(var(--p) * 34); object-fit: contain; }
#quiz-view .map-tabs .mt.on { background: #efe6ff; box-shadow: inset 0 0 0 calc(var(--p) * 1.5) #ddc9fb; }
/* 지도 위 화면들: 아래 탭은 보이게 */
#quiz-view .overlay.mapsheet { top: 0; bottom: calc(calc(var(--p) * 76) + env(safe-area-inset-bottom, 0px)); padding-top: calc(var(--p) * 14); }
#quiz-view .mapsheet .btn-3d { margin-top: auto; }
#quiz-view #gd-close { display: none; }
#quiz-view .sh-top { display: flex; }
#quiz-view .sh-back { width: calc(var(--p) * 32); height: calc(var(--p) * 32); padding: 0; border: 0; background: none; color: #8b857d; cursor: pointer; }
#quiz-view .sh-back svg { width: 100%; height: 100%; }
#quiz-view .ms-title { font: 800 calc(var(--p) * 24) var(--font) !important; color: var(--ink); }
/* 단어장 */
#quiz-view .gd-list { gap: 0; }
#quiz-view .gd-row, #quiz-view .gd-row:first-child { grid-template-columns: 1.1fr 1fr calc(var(--p) * 40); min-height: calc(var(--p) * 50); padding: calc(var(--p) * 6) calc(var(--p) * 2); border: 0; border-bottom: calc(var(--p) * 1.5) solid #ebe5dc; border-radius: 0; background: none; box-shadow: none; }
#quiz-view .gd-row b { font: 700 calc(var(--p) * 19) var(--font); color: var(--ink); }
#quiz-view .gd-row span { font: 500 calc(var(--p) * 17) var(--font); color: #4a4642; }
#quiz-view .gd-row .spk { width: calc(var(--p) * 36); height: calc(var(--p) * 32); border-radius: calc(var(--p) * 8); background: var(--sky); color: #fff; display: grid; place-items: center; box-shadow: 0 calc(var(--p) * 2) 0 var(--sky-d); font-style: normal; }
#quiz-view .gd-row .spk svg { width: calc(var(--p) * 20); height: calc(var(--p) * 20); }
#quiz-view #gd-sents .gd-row { grid-template-columns: 1fr calc(var(--p) * 40); }
#quiz-view #gd-sents .gd-row .spk { grid-column: 2; grid-row: 1 / 3; }
/* 오늘의 미션 */
#quiz-view .goals-card { padding-top: 0 !important; gap: 0 !important; }
#quiz-view .ms-band { position: relative; display: flex; align-items: center; justify-content: space-between; margin: calc(var(--p) * -14) calc(-1 * max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16)))) 0; padding: calc(var(--p) * 26) max(calc(var(--p) * 20), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 20))) calc(var(--p) * 26); background: var(--pr); border-radius: 0 0 calc(var(--p) * 22) calc(var(--p) * 22); }
#quiz-view .ms-band b { font: 800 calc(var(--p) * 26) var(--font); color: #fff; }
#quiz-view .ms-band img { width: calc(var(--p) * 110); height: auto; margin: calc(var(--p) * -20) 0 calc(var(--p) * -26); }
#quiz-view .goals-card .missions { margin-top: calc(var(--p) * 14); padding: 0 calc(var(--p) * 4); border: 0; background: none; box-shadow: none; }
#quiz-view .goals-card .ms-row { grid-template-columns: 1fr calc(var(--p) * 50); padding: calc(var(--p) * 14) 0; border-bottom: calc(var(--p) * 1.5) solid #ebe5dc; }
#quiz-view .goals-card .ms-ic { display: none; }
#quiz-view .goals-card .ms-main span { font: 700 calc(var(--p) * 18) var(--font) !important; }
#quiz-view .goals-card .ms-bar { position: relative; }
#quiz-view .goals-card .ms-bar::before { height: calc(var(--p) * 20); background: #e6e1da; }
#quiz-view .goals-card .ms-bar em { position: absolute; left: 50%; transform: translateX(-50%); font: 700 calc(var(--p) * 13) var(--font); color: #5f5a54; }
#quiz-view .goals-card .chest { width: calc(var(--p) * 46); height: calc(var(--p) * 40); }
#quiz-view .goals-card .team2 { margin-top: calc(var(--p) * 14); padding: calc(var(--p) * 12) calc(var(--p) * 4); grid-template-columns: calc(var(--p) * 30) 1fr; border: 0; background: none; box-shadow: none; }
#quiz-view .goals-card .team2 > img { width: calc(var(--p) * 28); height: calc(var(--p) * 22); }
#quiz-view .goals-card .team-text { font: 700 calc(var(--p) * 18) var(--font) !important; }
#quiz-view .goals-card .t2-bar { height: calc(var(--p) * 20); }
#quiz-view .goals-card .team-help { display: none; }
#quiz-view .my-rows { display: flex; flex-direction: column; gap: calc(var(--p) * 8); margin-top: calc(var(--p) * 12); }
#quiz-view .my-row { display: grid; grid-template-columns: calc(var(--p) * 32) 1fr auto calc(var(--p) * 14); align-items: center; gap: calc(var(--p) * 10); min-height: calc(var(--p) * 52); padding: 0 calc(var(--p) * 14); border: calc(var(--p) * 1.5) solid var(--edge); border-radius: calc(var(--p) * 12); background: #fff; box-shadow: 0 calc(var(--p) * 2) 0 #ece7df; text-align: left; cursor: pointer; font-family: var(--font); }
#quiz-view .my-row.static { cursor: default; grid-template-columns: calc(var(--p) * 32) 1fr auto; }
#quiz-view .my-row img { width: calc(var(--p) * 28); height: calc(var(--p) * 26); object-fit: contain; }
#quiz-view .my-row span { font: 700 calc(var(--p) * 16) var(--font); color: var(--ink); }
#quiz-view .my-row b { font: 800 calc(var(--p) * 16) var(--font); color: var(--pr-ink); }
#quiz-view .my-row i { font: 800 calc(var(--p) * 20) var(--font); font-style: normal; color: #b5aea5; }
/* 연속 학습 화면 */
#quiz-view .streak-card { align-items: stretch; }
#quiz-view .sk-title { margin: calc(var(--p) * 4) 0 0; text-align: center; font: 800 calc(var(--p) * 26) var(--font) !important; color: var(--ink); }
#quiz-view .sk-title b { font: inherit; }
#quiz-view .sk-hero { position: relative; height: calc(var(--p) * 180); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
#quiz-view .sk-fire { width: calc(var(--p) * 56); height: auto; transform: rotate(-90deg) scaleY(-1); margin-bottom: calc(var(--p) * -8); }
#quiz-view .sk-dog { width: calc(var(--p) * 190); height: auto; }
#quiz-view .streak-card .week { border: 0; padding: calc(var(--p) * 6) 0 calc(var(--p) * 14); border-bottom: calc(var(--p) * 1.5) solid #ebe5dc; border-radius: 0; }
#quiz-view .sk-help { display: none; }
#quiz-view .sk-h { text-align: left; font: 700 calc(var(--p) * 17) var(--font) !important; margin-top: calc(var(--p) * 4); }
#quiz-view .sk-road { grid-template-columns: repeat(4, 1fr); gap: calc(var(--p) * 10); }
#quiz-view .sk-step { background: none; padding: 0; }
#quiz-view .sk-step .shield { width: calc(var(--p) * 56); height: calc(var(--p) * 62); display: grid; place-items: center; background: #ece8e2; clip-path: polygon(50% 0, 100% 14%, 100% 60%, 50% 100%, 0 60%, 0 14%); }
#quiz-view .sk-step .shield b { font: 700 calc(var(--p) * 14) var(--font); color: #8b857d; }
#quiz-view .sk-step.got .shield { background: linear-gradient(#ffd451, #ffb800); }
#quiz-view .sk-step.got .shield b { color: #8a5a00; }
#quiz-view .sk-step span { display: none; }
#quiz-view .sk-next { font: 700 calc(var(--p) * 15) var(--font) !important; color: #c76f00; }
/* 미션 완료 알림 (연보라 말풍선) */
.mission-toast.v3 { top: calc(calc(var(--p) * 14) + env(safe-area-inset-top, 0px)); flex-direction: column; align-items: center; gap: calc(var(--p) * 4); width: auto; padding: 0; background: none; box-shadow: none; }
.mission-toast.v3 .mt-bub { position: relative; display: flex; align-items: center; gap: calc(var(--p) * 6); padding: calc(var(--p) * 8) calc(var(--p) * 20); border: calc(var(--p) * 2) solid #d9c6fb; border-radius: calc(var(--p) * 14); background: #f3ecff; color: var(--pr-ink); box-shadow: 0 calc(var(--p) * 4) calc(var(--p) * 14) rgba(80,40,160,.15); }
.mission-toast.v3 .mt-bub b { font: 800 calc(var(--p) * 20) var(--font) !important; color: var(--pr-ink); }
.mission-toast.v3 .mt-bub img { width: calc(var(--p) * 24); height: calc(var(--p) * 24); }
.mission-toast.v3 .mt-bub em { font: 800 calc(var(--p) * 20) var(--font); font-style: normal; color: var(--pr-ink); }
.mission-toast.v3 .mt-pics { display: none; }
.mission-toast.v3 .mt-sub { font: 600 calc(var(--p) * 13) var(--font); color: #6a6560; background: rgba(255,255,255,.9); padding: calc(var(--p) * 2) calc(var(--p) * 10); border-radius: 999px; }
/* ---------- 수행평가 ---------- */
#quiz-view .test-cheer { display: none !important; }
#quiz-view #qp-test .lesson-body { padding-top: calc(var(--p) * 22); gap: calc(var(--p) * 14); }
#quiz-view .test-prompt .q { order: -1; text-align: left; font: 800 calc(var(--p) * 21)/1.4 var(--font) !important; color: var(--ink); }
#quiz-view .test-prompt .passage { padding: 0; border: 0; background: none; font: 600 calc(var(--p) * 17)/1.7 var(--font) !important; color: var(--ink); }
#quiz-view .test-prompt .pic img { max-height: calc(var(--p) * 180); object-fit: contain; border-radius: calc(var(--p) * 12); }
#quiz-view .test-prompt .test-line { font: 600 calc(var(--p) * 18)/1.6 var(--font); text-align: left; }
#quiz-view .test-text { height: calc(var(--p) * 48); border: calc(var(--p) * 1.5) solid #dcd6cd; border-radius: calc(var(--p) * 10); box-shadow: none; background: #fff; text-align: left; font: 600 calc(var(--p) * 18) var(--font); }
#quiz-view .test-text::placeholder { color: #aaa49c; }
#quiz-view .test-choices .choice { min-height: calc(var(--p) * 40); border-radius: calc(var(--p) * 8); font: 600 calc(var(--p) * 16) var(--font) !important; }
#quiz-view .test-build { min-height: calc(var(--p) * 80); }
#quiz-view .test-foot { gap: calc(var(--p) * 12); }
#quiz-view #test-next:disabled { background: #dccdf8; color: #fff; box-shadow: 0 calc(var(--p) * 4) 0 #c8b4f0; }
/* 그만할까요? */
#quiz-view .quit-card { position: relative; width: min(100%, calc(var(--p) * 300)); padding: calc(var(--p) * 20) calc(var(--p) * 18) calc(var(--p) * 18); border-radius: calc(var(--p) * 18); gap: calc(var(--p) * 8); }
#quiz-view .qc-x { position: absolute; right: calc(var(--p) * 12); top: calc(var(--p) * 12); width: calc(var(--p) * 24); height: calc(var(--p) * 24); padding: 0; border: 0; background: none; color: #8b857d; cursor: pointer; }
#quiz-view .qc-x svg { width: 100%; height: 100%; }
#quiz-view .quit-card .hero-img { width: calc(var(--p) * 130); height: calc(var(--p) * 110); }
#quiz-view .quit-card h2 { font: 800 calc(var(--p) * 24) var(--font) !important; }
#quiz-view .quit-card p { font: 500 calc(var(--p) * 16) var(--font); }
#quiz-view .quit-card .row { grid-template-columns: 1fr; gap: calc(var(--p) * 8); }
#quiz-view .quit-card .btn { min-height: calc(var(--p) * 44); border-radius: calc(var(--p) * 10); font: 700 calc(var(--p) * 17) var(--font) !important; }
#quiz-view .quit-card .btn.primary { background: var(--pr); box-shadow: 0 calc(var(--p) * 3) 0 var(--pr-d); }
#quiz-view .quit-card .btn.ghost { background: #fff; color: var(--ink); border: calc(var(--p) * 1.5) solid var(--edge); box-shadow: 0 calc(var(--p) * 3) 0 #e2dcd2; }
/* 수행평가 끝 */
#quiz-view #qp-test-done { justify-content: center; }
#quiz-view #qp-test-done .done-img { width: calc(var(--p) * 220); height: calc(var(--p) * 220); margin-top: 0; }
#quiz-view #test-done-title { color: var(--ink); font-size: calc(var(--p) * 32) !important; }
#quiz-view .test-done-sub { font: 600 calc(var(--p) * 17) var(--font); color: #4a4642; }
#quiz-view .test-done-btns { gap: calc(var(--p) * 12); margin-top: calc(var(--p) * 20); }
/* 시안 3 다듬기 */
#quiz-view .wcard .face.front, #quiz-view .wcard .face.back { box-shadow: none !important; border-color: #dcd6cd !important; }
#quiz-view .duo-wrap:has(.node-pop) { z-index: 30; }
#quiz-view .node-pop.off { width: max-content; white-space: normal; }
#quiz-view #qp-lesson[data-kind="spell"] .coach-img { width: calc(var(--p) * 190); height: calc(var(--p) * 130); }
#quiz-view .done-img { filter: drop-shadow(0 calc(var(--p) * 16) calc(var(--p) * 6) rgba(0,0,0,.06)); }
/* 새 그림 묶음(81종 · 아래 탭 아이콘) 맞춤 */
.lg-ic.lg-0, .lg-ic.lg-1, .lg-ic.lg-2 { filter: none; }
#quiz-view .goal-hero { width: calc(var(--p) * 260); height: auto; }
#quiz-view .goal-hero .gh-img { display: block; width: 100%; height: auto; }
#quiz-view .sk-fire { width: calc(var(--p) * 54); transform: none; margin-bottom: calc(var(--p) * -14); position: relative; z-index: 1; }
#quiz-view .sk-dog { width: calc(var(--p) * 200); }
#quiz-view .map-tabs .mt.on { background: none; box-shadow: none; }
#quiz-view .map-tabs .mt img { width: calc(var(--p) * 46); height: calc(var(--p) * 46); }
#quiz-view .wcard .pic img { max-width: calc(var(--p) * 210); max-height: calc(var(--p) * 160); border-radius: 0; }
#quiz-view .wcard .face { justify-content: center; }
#quiz-view #qp-lesson[data-kind="spell"] .coach-img { transform: none; width: calc(var(--p) * 180); height: calc(var(--p) * 150); }
#quiz-view #qp-lesson[data-kind="build"] .coach-img { width: calc(var(--p) * 140); height: calc(var(--p) * 140); }
#quiz-view .ms-band img { width: calc(var(--p) * 120); margin: calc(var(--p) * -24) 0 calc(var(--p) * -30); }
#quiz-view .path-pup { width: calc(var(--p) * 110); }
#quiz-view .sec-purple .path-pup { width: calc(var(--p) * 150); top: calc(var(--p) * 50); }
#quiz-view .streak-hero { width: calc(var(--p) * 240); }
/* 지도: 회색 길 + 흰 점선, 나무·언덕 / 아래 탭 글자 / 위쪽 여백 넉넉히 */
#quiz-view .path-deco { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
#quiz-view .path-line polyline.road { fill: none; stroke: #ddd8cf; stroke-width: calc(var(--p) * 30); stroke-linecap: round; stroke-linejoin: round; }
#quiz-view .path-line polyline.road-mid { fill: none; stroke: #fffdf8; stroke-width: calc(var(--p) * 3); stroke-dasharray: calc(var(--p) * 9) calc(var(--p) * 11); stroke-linecap: round; stroke-linejoin: round; }
#quiz-view .path-line { z-index: 0; }
#quiz-view .path-pup { z-index: 1; }
#quiz-view .map-tabs { gap: calc(var(--p) * 4); padding-top: calc(var(--p) * 6); }
#quiz-view .map-tabs .mt { height: auto; padding: calc(var(--p) * 2) 0; display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 1); }
#quiz-view .map-tabs .mt img { width: calc(var(--p) * 42); height: calc(var(--p) * 42); }
#quiz-view .map-tabs .mt span { font: 700 calc(var(--p) * 12) var(--font); color: #8b857d; }
#quiz-view .map-tabs .mt.on span { color: var(--pr-ink); }
#quiz-view .overlay.mapsheet { bottom: calc(calc(var(--p) * 80) + env(safe-area-inset-bottom, 0px)); }
#quiz-view .qpanel { padding-top: calc(calc(var(--p) * 34) + env(safe-area-inset-top, 0px)); }
#quiz-view #qp-map { padding-top: calc(calc(var(--p) * 30) + env(safe-area-inset-top, 0px)); }
#quiz-view .overlay.mapsheet { padding-top: calc(calc(var(--p) * 30) + env(safe-area-inset-top, 0px)); }
#quiz-view .lesson-top { padding-top: calc(var(--p) * 4); }
#quiz-view #qp-streak { padding-top: calc(calc(var(--p) * 44) + env(safe-area-inset-top, 0px)); }
/* 지도: 시안처럼 굽은 넓은 회색 길 · 원판 같은 칸 · 언덕 */
#quiz-view .path-line path.road { fill: none; stroke: #dcd6cd; stroke-width: calc(var(--p) * 40); stroke-linecap: round; stroke-linejoin: round; }
#quiz-view .path-sec.sec-green { padding-bottom: calc(var(--p) * 70); }
#quiz-view .path-sec { gap: calc(var(--p) * 14); }
#quiz-view .node.duo, #quiz-view .sec-green .node.duo, #quiz-view .sec-purple .node.duo { width: calc(var(--p) * 80); height: calc(var(--p) * 58); border-radius: 50% / 46%; box-shadow: 0 calc(var(--p) * 8) 0 var(--cd); }
#quiz-view .node.duo:is(.chest, .trophy) { width: calc(var(--p) * 70); height: calc(var(--p) * 62); }
#quiz-view .path-pup { left: calc(var(--p) * -8); top: calc(var(--p) * 66); width: calc(var(--p) * 120); }
/* 아래 탭: 글자 + 고른 탭은 연보라 네모 */
#quiz-view .map-tabs .mt img { width: calc(var(--p) * 48); height: calc(var(--p) * 48); }
#quiz-view .map-tabs .mt span { font: 800 calc(var(--p) * 13) var(--font); letter-spacing: .02em; color: #77716a; }
#quiz-view .map-tabs .mt.on span { color: var(--pr); }
/* 지도 그림(별 칸 · 나무 · 덤불 · 언덕 · 책 읽는 강아지) */
#quiz-view .node.duo:has(img.star) { background: none !important; box-shadow: none !important; width: calc(var(--p) * 84); height: calc(var(--p) * 72); }
#quiz-view .node.duo img.star { width: calc(var(--p) * 82); height: auto; filter: none; }
#quiz-view .node.duo img.star.on { width: calc(var(--p) * 90); }
#quiz-view .node.duo:has(img.star):active { transform: translateY(calc(var(--p) * 3)); }
#quiz-view .path-sec.sec-green { padding-bottom: calc(var(--p) * 96); }
#quiz-view .map-hills { position: absolute; left: 50%; bottom: 0; width: calc(100% + calc(var(--p) * 40)); max-width: none; transform: translateX(-50%); height: auto; pointer-events: none; z-index: 0; }
#quiz-view .path-pup { width: calc(var(--p) * 118); top: calc(var(--p) * 70); left: calc(var(--p) * -6); }
#quiz-view .sec-purple .path-pup { width: calc(var(--p) * 150); top: calc(var(--p) * 46); right: calc(var(--p) * -10); left: auto; }
/* 레슨 완료! 큰 화면 (보라 띠 + 스티커 강아지 + 노란 글씨) */
#quiz-view .done-intro { position: absolute; inset: 0; z-index: 20; display: block; padding: 0; border: 0; background: var(--cream); overflow: hidden; cursor: pointer; font-family: var(--font); transition: opacity .3s; }
#quiz-view .done-intro.out { opacity: 0; }
#quiz-view .di-band { position: absolute; left: -20%; width: 140%; transform: rotate(-12deg); }
#quiz-view .di-band.b1 { top: 22%; height: 34%; background: #e5d6fc; }
#quiz-view .di-band.b2 { top: 27%; height: 24%; background: #c49df7; }
#quiz-view .di-dog { position: absolute; left: 50%; top: 14%; width: min(78%, calc(var(--p) * 330)); transform: translateX(-50%) rotate(-6deg); filter: drop-shadow(0 0 0 #fff) drop-shadow(calc(var(--p) * 4) 0 0 #fff) drop-shadow(calc(var(--p) * -4) 0 0 #fff) drop-shadow(0 calc(var(--p) * 4) 0 #fff) drop-shadow(0 calc(var(--p) * -4) 0 #fff) drop-shadow(calc(var(--p) * 7) 0 0 #efe4ff) drop-shadow(calc(var(--p) * -7) 0 0 #efe4ff) drop-shadow(0 calc(var(--p) * 7) 0 #efe4ff) drop-shadow(0 calc(var(--p) * -7) 0 #efe4ff); }
#quiz-view .done-intro.go .di-dog { animation: diDog .7s cubic-bezier(.2,1.5,.4,1); }
@keyframes diDog { from { transform: translate(-80%, 20%) rotate(-20deg) scale(.6); opacity: 0; } }
#quiz-view .di-title { position: absolute; left: 0; right: 0; top: 64%; text-align: center; font: 900 calc(var(--p) * 64)/1.15 var(--font); color: #ffc400; letter-spacing: -.01em; }
#quiz-view .done-intro.go .di-title { animation: pupPop .6s .25s cubic-bezier(.2,1.6,.4,1) both; }
#quiz-view .di-c { position: absolute; width: calc(var(--p) * 18); height: calc(var(--p) * 18); border-radius: calc(var(--p) * 4); background: #ffd84a; transform: rotate(20deg); }
#quiz-view .di-c.c1 { left: 74%; top: 60%; } #quiz-view .di-c.c2 { left: 84%; top: 69%; width: calc(var(--p) * 12); height: calc(var(--p) * 12); }
#quiz-view .di-c.c3 { left: 12%; top: 73%; width: calc(var(--p) * 12); height: calc(var(--p) * 12); } #quiz-view .di-c.c4 { left: 16%; top: 81%; }
/* 시안 그림 그대로: 칸 원판 · 레슨 완료 큰 그림 · 첫 화면 강아지 */
#quiz-view .node.duo.imgdisc { background: none !important; box-shadow: none !important; width: calc(var(--p) * 84); height: calc(var(--p) * 72); position: relative; }
#quiz-view .node.duo.imgdisc .nimg { width: calc(var(--p) * 82); height: auto; filter: none; }
#quiz-view .node.duo.imgdisc .disc-ic { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: grid; place-items: center; color: #fff; }
#quiz-view .node.duo.imgdisc .disc-ic svg { width: calc(var(--p) * 28); height: calc(var(--p) * 28); }
#quiz-view .node.duo.locked.imgdisc .disc-ic { color: #f4f4f4; }
#quiz-view .sec-purple .node.duo.imgdisc .nimg.disc { filter: none; }
#quiz-view .di-hero { position: absolute; left: 0; top: 3%; width: 100%; height: 64%; object-fit: cover; object-position: center 45%; animation: none; }
#quiz-view .done-intro.go .di-hero { animation: pupPop .6s cubic-bezier(.2,1.4,.4,1); }
#quiz-view .di-title { top: 69%; color: #ffc400; }
#screen-code .hero-img { width: min(40vw, 190px); filter: none; }
.splash img { width: min(46vw, 250px); }
/* 별 원판: 두 가지가 같은 모양·같은 크기 / 언덕은 아래 탭 바로 위에 화면 너비로 */
#quiz-view .node.duo img.star, #quiz-view .node.duo img.star.on, #quiz-view .node.duo.imgdisc .nimg { width: calc(var(--p) * 84); }
#quiz-view .path-sec.sec-green { padding-bottom: calc(var(--p) * 34); }
#quiz-view .map-tabs .tab-hills { position: absolute; left: 0; right: 0; bottom: calc(100% - calc(var(--p) * 2)); width: 100%; height: calc(var(--p) * 64); object-fit: cover; object-position: center bottom; pointer-events: none; z-index: -1; }
#quiz-view .map-tabs { position: sticky; }
#quiz-view .path { padding-bottom: calc(var(--p) * 90); }
#quiz-view .map-hills { position: absolute; bottom: 0; transform: none; height: auto; max-width: none; pointer-events: none; z-index: 0; }
#quiz-view .path-sec.sec-green { padding-bottom: calc(var(--p) * 80); }
#quiz-view .path { padding-bottom: calc(var(--p) * 20); }
/* 넓은 화면: 언덕 양 끝을 부드럽게 */
#quiz-view .map-hills { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
#quiz-view .sec-purple .path-pup { width: calc(var(--p) * 160); top: calc(var(--p) * 54); right: calc(var(--p) * -6); }
/* 가로 태블릿: 레슨 완료 그림이 너무 확대되지 않게 */
@media (min-aspect-ratio: 1/1) {
  #quiz-view .di-hero { object-fit: contain; height: 62%; top: 2%; }
  #quiz-view .di-title { top: 66%; font-size: calc(var(--p) * 54); }
}
@media (min-aspect-ratio: 1/1) { #quiz-view .di-hero { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); } }
/* 언덕: 지도 화면 맨 아래(탭 바로 위)에 화면 너비 그대로 깔린 땅 — 길·칸은 그 위로 지나감 */
#quiz-view .map-hills { display: none !important; }
#quiz-view #qp-map { container-type: inline-size; background: var(--cream) url(pup2/map-hills.webp) no-repeat; background-size: 100% auto; background-position: center bottom calc(calc(var(--p) * 70) + env(safe-area-inset-bottom, 0px)); background-attachment: scroll; }
#quiz-view .path-sec.sec-green { padding-bottom: calc(var(--p) * 40); }
#quiz-view .path { padding-bottom: calc(var(--p) * 110); }
/* 아래 탭: 지도 화면 너비 끝까지 */

#quiz-view .node.duo img.star, #quiz-view .node.duo img.star.on, #quiz-view .node.duo.imgdisc .nimg { width: calc(var(--p) * 80); }
#quiz-view .node.duo:has(img.star), #quiz-view .node.duo.imgdisc { height: auto; }
/* 지도 첫 강아지: 단원 띠에 머리가 가리지 않게 */
#quiz-view .sec-green .path-pup { top: calc(var(--p) * 96); }
/* 카메라 화면: 거치대 안내 노란 형광펜 */
.stand-tip mark { background: linear-gradient(transparent 38%, #ffe066 38%, #ffe066 92%, transparent 92%); color: inherit; padding: 0 2px; }
/* 대화 화면 아래 탭 (지도 탭과 같은 모양) */
.chat-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 16px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fffdf9; border-top: 1.5px solid #ece6dd; }
.chat-tabs[hidden] { display: none; }
.chat-screen.quizzing .chat-tabs { display: none; }
.chat-tabs .ct { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0; border: 0; background: none; cursor: pointer; font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; }
.chat-tabs .ct img { width: 46px; height: 46px; object-fit: contain; }
.chat-tabs .ct span { font: 800 13px "Pretendard Variable", Pretendard, system-ui, sans-serif; color: #77716a; }
.chat-tabs .ct.on span { color: #7b42e0; }
/* 대화 말풍선: AI 회색 · 내 말 파란 바탕 흰 글씨 */
#screen-chat .bubble.ai { background: #ececee; color: #1f1f22; box-shadow: none; border: 0; }
#screen-chat .bubble.me { background: #3b9cf6; color: #fff; box-shadow: none; border: 0; }
/* 마이크: 처음에는 눈에 띄게 (보라 테두리가 숨 쉬듯) */
#screen-chat .composer .btn.mic.hint { background: #efe6ff; color: #7b42e0; border-color: #b892f5; box-shadow: 0 0 0 0 rgba(123,66,224,.45); animation: micHint 1.6s ease-out infinite; }
@keyframes micHint { 0% { box-shadow: 0 0 0 0 rgba(123,66,224,.45); } 70% { box-shadow: 0 0 0 10px rgba(123,66,224,0); } 100% { box-shadow: 0 0 0 0 rgba(123,66,224,0); } }
/* 단어장 탭: 선생님이 단어 과제를 열기 전에는 회색 */
#quiz-view .map-tabs .mt.off img, .chat-tabs .ct.off img { filter: grayscale(1); opacity: .45; }
#quiz-view .map-tabs .mt.off span, .chat-tabs .ct.off span { color: #b9b3ab; }
.kid-tip.up::before { top: auto; bottom: -7px; border-bottom: 0; border-top: 7px solid #2b3044; }
/* 오늘의 미션: 셋 중 하나 */
#quiz-view .goals-card .ms-pick { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--p) * 10); margin: calc(var(--p) * 4) 0 calc(var(--p) * 6); padding: calc(var(--p) * 12) calc(var(--p) * 14); border-radius: calc(var(--p) * 14); background: #f3ecff; }
#quiz-view .goals-card .ms-pick.done { background: #fff4d6; }
#quiz-view .goals-card .ms-pick b { display: block; font: 800 calc(var(--p) * 18) var(--font); color: var(--pr-ink); }
#quiz-view .goals-card .ms-pick.done b { color: #c46f00; }
#quiz-view .goals-card .ms-pick span { font: 600 calc(var(--p) * 14) var(--font); color: #6b665f; }
#quiz-view .goals-card .ms-pick img { width: calc(var(--p) * 52); height: calc(var(--p) * 46); object-fit: contain; flex: none; }
#quiz-view .goals-card .ms-or { text-align: center; font: 700 calc(var(--p) * 13) var(--font); color: #a39c93; margin: calc(var(--p) * -4) 0; }
#quiz-view .goals-card .ms-row { border-bottom: 0; padding: calc(var(--p) * 10) 0; }
#quiz-view .goals-card .ms-check { width: calc(var(--p) * 30); height: calc(var(--p) * 30); border-radius: 50%; border: calc(var(--p) * 2) solid #ddd6cc; display: grid; place-items: center; font: 900 calc(var(--p) * 16) var(--font); font-style: normal; color: #fff; justify-self: center; }
#quiz-view .goals-card .ms-row.ok .ms-check { background: #58cc02; border-color: #58cc02; }
#quiz-view .goals-card .ms-row { grid-template-columns: 1fr calc(var(--p) * 44); }
/* 대화 화면 아래 탭: 지도 아래 탭과 같은 크기·위치 */
.chat-tabs { gap: calc(var(--p) * 4); padding: calc(var(--p) * 6) max(calc(var(--p) * 16), calc(50% - 200px)) calc(calc(var(--p) * 12) + env(safe-area-inset-bottom, 0px)); border-top: calc(var(--p) * 1.5) solid #ece6dd; }
.chat-tabs .ct { padding: calc(var(--p) * 2) 0; gap: calc(var(--p) * 1); }
.chat-tabs .ct img { width: calc(var(--p) * 48); height: calc(var(--p) * 48); }
.chat-tabs .ct span { font: 800 calc(var(--p) * 13) "Pretendard Variable", Pretendard, system-ui, sans-serif; letter-spacing: .02em; }
/* 지도 맨 위 숫자 줄 (듀오링고처럼 늘 보임): 🔥 연속 · ⭐ 별 · 🏆 반 리그 */
#quiz-view .map-head { display: flex !important; position: sticky; top: calc(-1 * (calc(var(--p) * 30) + env(safe-area-inset-top, 0px))); z-index: 25; margin: calc(-1 * (calc(var(--p) * 30) + env(safe-area-inset-top, 0px))) calc(-1 * max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16)))) calc(var(--p) * 10); padding: calc(calc(var(--p) * 14) + env(safe-area-inset-top, 0px)) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 390)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 10); background: var(--cream); border-bottom: calc(var(--p) * 1.5) solid #ece6dd; grid-template-columns: none; }
#quiz-view .map-head .x-btn.back, #quiz-view .map-head .team-row { display: none !important; }
#quiz-view .mh-stats { flex: 1; display: flex; justify-content: space-between; gap: calc(var(--p) * 8); padding: 0 calc(var(--p) * 6); }
#quiz-view .map-head .stat { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); padding: calc(var(--p) * 4) calc(var(--p) * 6); border-radius: calc(var(--p) * 10); font: 800 calc(var(--p) * 19) var(--font) !important; }
#quiz-view .map-head .stat:active { background: rgba(0,0,0,.05); }
#quiz-view .map-head .stat img { width: calc(var(--p) * 28); height: calc(var(--p) * 28); object-fit: contain; }
#quiz-view .map-head .s-fire b { color: #ff8a00; }
#quiz-view .map-head .s-star b { color: #e9a400; }
#quiz-view .map-head .s-league b { color: var(--pr-ink); font-size: calc(var(--p) * 16); }
#quiz-view .map-head .s-league[hidden] { display: none; }
/* 수행평가 피드백 띠: 정답 줄이 없을 때 제목만 */
#quiz-view .sheet-title.only { margin-bottom: calc(var(--p) * 2); }
#quiz-view #test-sheet .sheet-sub { display: block !important; margin: 0 0 calc(var(--p) * 2) calc(var(--p) * 32); font: 700 calc(var(--p) * 17)/1.4 var(--font); }
#quiz-view #test-sheet .sheet-sub:empty { display: none !important; }
/* 수행평가 제출 뒤: 틀린 문제 · 정답 */
#quiz-view #qp-test-done:has(.test-review:not([hidden])) { justify-content: flex-start; padding-top: calc(calc(var(--p) * 30) + env(safe-area-inset-top, 0px)); }
#quiz-view #qp-test-done:has(.test-review:not([hidden])) .done-img { width: calc(var(--p) * 130); height: calc(var(--p) * 130); }
#quiz-view .test-review { width: 100%; display: flex; flex-direction: column; gap: calc(var(--p) * 8); text-align: left; }
#quiz-view .tr-row { display: flex; gap: calc(var(--p) * 10); padding: calc(var(--p) * 12) calc(var(--p) * 14); border: calc(var(--p) * 1.5) solid #f3c9c9; border-radius: calc(var(--p) * 12); background: #fff6f6; }
#quiz-view .tr-n { flex: none; width: calc(var(--p) * 26); height: calc(var(--p) * 26); border-radius: 50%; display: grid; place-items: center; background: #ff6b6b; color: #fff; font: 800 calc(var(--p) * 14) var(--font); }
#quiz-view .tr-main { display: flex; flex-direction: column; gap: calc(var(--p) * 3); min-width: 0; }
#quiz-view .tr-main p { margin: 0; font: 600 calc(var(--p) * 14)/1.4 var(--font); color: #6b665f; }
#quiz-view .tr-mine { font: 600 calc(var(--p) * 15) var(--font); color: #d64545; text-decoration: line-through; text-decoration-thickness: 1px; }
#quiz-view .tr-ans { font: 800 calc(var(--p) * 16) var(--font); color: #3f9a06; }
/* 수행평가 끝: 틀린 문제가 있으면 「AI 친구랑 틀린 문제 다시 풀기」를 먼저(보라) */
#quiz-view #qp-test-done.rv #test-done-chat { order: -1; background: linear-gradient(var(--pr-top), var(--pr)); color: #fff; border: 0; box-shadow: 0 calc(var(--p) * 4) 0 var(--pr-d); }
#quiz-view #qp-test-done.rv #test-done-next { background: #fff; color: var(--ink); border: calc(var(--p) * 1.5) solid var(--edge); box-shadow: 0 calc(var(--p) * 3) 0 #e2dcd2; }
#quiz-view #qp-test-done.rv .test-done-btns { position: sticky; bottom: 0; background: var(--cream); padding: calc(var(--p) * 10) 0 calc(var(--p) * 6); margin-top: calc(var(--p) * 4); }
#quiz-view #qp-test-done.rv .test-done-sub { color: var(--pr-ink); font-weight: 800; }
/* 대화: 다시 풀어 볼 문제 카드 */
.review-card { align-self: stretch; display: flex; flex-direction: column; gap: calc(var(--p) * 8); margin: calc(var(--p) * 4) 0; padding: calc(var(--p) * 16) calc(var(--p) * 18); border-radius: calc(var(--p) * 18); background: #f3ecff; border: calc(var(--p) * 1.5) solid #d9c6fb; font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; }
.review-card small { font: 800 calc(var(--p) * 15)/1.3 "Pretendard Variable", Pretendard, system-ui, sans-serif; color: #7b42e0; }
.review-card b { font: 800 calc(var(--p) * 18)/1.45 "Pretendard Variable", Pretendard, system-ui, sans-serif; color: #2f2d2b; }
.review-card p { margin: 0; padding: calc(var(--p) * 12) calc(var(--p) * 14); border-radius: calc(var(--p) * 12); background: #fff; font: 600 calc(var(--p) * 17)/1.6 "Pretendard Variable", Pretendard, system-ui, sans-serif; color: #3b3835; white-space: pre-wrap; }
/* 미션: 반 목표 아래 다음 리그 */
#quiz-view .goals-card .t2-next { font: 700 calc(var(--p) * 14) var(--font); color: var(--pr-ink); }

/* ---- AI 친구 대화 화면: 글자 크기 정리 (지도 화면과 같은 비율 @, 크기는 4단계만)
   큰 글 calc(var(--p) * 18) (말풍선·문제·입력) · 보통 calc(var(--p) * 16) (버튼·위 숫자) · 작은 글 calc(var(--p) * 15) (안내 줄·작은 표시) · 탭 calc(var(--p) * 14) ---- */
#screen-chat .chat-top { min-height: calc(var(--p) * 60); padding: calc(var(--p) * 10) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 620)) / 2 + calc(var(--p) * 16))); gap: calc(var(--p) * 8); }
#screen-chat .top-stats { gap: calc(var(--p) * 8); }
#screen-chat .tstat { display: inline-flex; align-items: center; gap: calc(var(--p) * 5); height: calc(var(--p) * 40); padding: 0 calc(var(--p) * 14); border-width: calc(var(--p) * 1.5); font: 800 calc(var(--p) * 17) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .tstat .ts-ic, #screen-chat .tstat .badge-ic { width: calc(var(--p) * 24); height: calc(var(--p) * 24); object-fit: contain; }
#screen-chat .tstat b { font-weight: 900; }
#screen-chat:has(.chat-tabs:not([hidden])) #open-map { display: none; }
#screen-chat .btn.stop { height: calc(var(--p) * 40); padding: 0 calc(var(--p) * 16); border-width: calc(var(--p) * 1.5); border-radius: calc(var(--p) * 12); font: 700 calc(var(--p) * 16) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .rec { font-size: calc(var(--p) * 15); }
#screen-chat .messages { gap: calc(var(--p) * 14); padding: calc(var(--p) * 18) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 620)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 10); }
#screen-chat .bubble { font: 500 calc(var(--p) * 18)/1.55 "Pretendard Variable", Pretendard, system-ui, sans-serif; padding: calc(var(--p) * 12) calc(var(--p) * 16); }
#screen-chat .bubble.system { font-size: calc(var(--p) * 15); }
#screen-chat .bubble .replay { font-size: calc(var(--p) * 18); }
#screen-chat .bubble.picture figcaption { font-size: calc(var(--p) * 15); }
#screen-chat .ai-row { gap: calc(var(--p) * 8); }
#screen-chat .ai-ava { width: calc(var(--p) * 44); height: calc(var(--p) * 44); }
#screen-chat .draw-chip { margin-bottom: calc(var(--p) * 8); padding: calc(var(--p) * 6) calc(var(--p) * 14); border-width: calc(var(--p) * 1.5); font: 600 calc(var(--p) * 15) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .draw-chip b { font-weight: 800; }
#screen-chat .composer { gap: calc(var(--p) * 8); padding: calc(var(--p) * 10) max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 620)) / 2 + calc(var(--p) * 16))); }
#screen-chat .composer textarea { min-height: calc(var(--p) * 52); padding: calc(var(--p) * 12) calc(var(--p) * 14); font: 500 calc(var(--p) * 18)/1.4 "Pretendard Variable", Pretendard, system-ui, sans-serif; border-radius: calc(var(--p) * 14); }
#screen-chat .composer .btn.mic { width: calc(var(--p) * 52); height: calc(var(--p) * 52); min-width: calc(var(--p) * 52); padding: 0; border-radius: calc(var(--p) * 14); font-size: calc(var(--p) * 22); }
#screen-chat .composer .btn.send { height: calc(var(--p) * 52); padding: 0 calc(var(--p) * 20); border-radius: calc(var(--p) * 14); font: 800 calc(var(--p) * 17) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .chat-tabs .ct span { font-size: calc(var(--p) * 14); }
.face-alert { gap: calc(var(--p) * 10); padding: calc(var(--p) * 10) calc(var(--p) * 16); border-radius: calc(var(--p) * 16); top: calc(calc(var(--p) * 72) + env(safe-area-inset-top, 0px)); }
.face-alert img { width: calc(var(--p) * 48); height: calc(var(--p) * 44); }
.face-alert b { font: 800 calc(var(--p) * 17) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
.face-alert span { font: 600 calc(var(--p) * 15) "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .review-card p { font-weight: 500; }
#screen-chat .composer textarea::placeholder { font-size: calc(var(--p) * 15); }
.face-alert b, .face-alert span { white-space: nowrap; }
@media (max-width: 479px) {
  #screen-chat .composer { gap: calc(var(--p) * 6); }
  #screen-chat .composer textarea { padding: calc(var(--p) * 12) calc(var(--p) * 8) calc(var(--p) * 12) calc(var(--p) * 12); }
  #screen-chat .composer textarea::placeholder { font-size: calc(var(--p) * 14); }
  #screen-chat .composer .btn.send { padding: 0 calc(var(--p) * 14); }
}

/* 리그 트로피: 리그마다 받은 그림 그대로 (색 바꾸기 없음) */
.lg-ic[class*="lg-"] { filter: none !important; }

/* 리그 순서 줄: 도달한 리그만 트로피, 나머지는 「?」 */
#quiz-view .fl-ladder span { width: calc(var(--p) * 58); font-size: calc(var(--p) * 13); }
#quiz-view .fl-ladder span img, #quiz-view .fl-ladder span.got img { width: calc(var(--p) * 32); height: calc(var(--p) * 30); opacity: 1; }
#quiz-view .fl-ladder span.lock i { display: grid; place-items: center; width: calc(var(--p) * 30); height: calc(var(--p) * 30); border-radius: 50%; background: #efebe5; border: calc(var(--p) * 1.5) dashed #cfc7bc; font: 900 calc(var(--p) * 16) var(--font); font-style: normal; color: #b3aba0; }
#quiz-view .fl-ladder span.next img { opacity: .55; }
#quiz-view .fl-ladder span.next { color: #8b857d; }
/* 「3개 연속 정답」: 진행 막대와 겹치지 않게 막대 바로 위 줄에 */
#quiz-view #qp-lesson .lesson-top { padding-top: calc(var(--p) * 24); }
#quiz-view #qp-lesson .combo { top: calc(var(--p) * 2); left: calc(var(--p) * 46); line-height: 1; font-size: calc(var(--p) * 14) !important; }

/* 레슨 완료!: 보라 띠 배경은 가만히, 강아지만 뛰어 들어와 통통 */
#quiz-view .di-hero { display: block; position: absolute; left: 0; top: 3%; width: 100%; height: 64%; overflow: hidden; container-type: size; animation: none !important; object-fit: unset; }
#quiz-view .di-art { position: absolute; left: 50%; top: 45%; width: max(100cqw, calc(100cqh * 823 / 935)); aspect-ratio: 823 / 935; transform: translate(-50%, -45%); }
#quiz-view .di-art img { position: absolute; display: block; max-width: none; }
#quiz-view .di-bg { left: 0; top: 0; width: 100%; height: 100%; }
#quiz-view .di-pup { left: 5.954%; top: 5.348%; width: 89.79%; height: auto; transform-origin: 50% 80%; }
#quiz-view .done-intro.go .di-pup { animation: diPupIn .6s cubic-bezier(.2,1.5,.4,1) both, diPupHop .9s .6s ease-in-out infinite; }
@keyframes diPupIn { from { transform: translate(-18%, 14%) rotate(-12deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes diPupHop { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-4%) rotate(-2deg); } }
@media (min-aspect-ratio: 1/1) { #quiz-view .di-art { width: min(100cqw, calc(100cqh * 823 / 935)); } }
@media (prefers-reduced-motion: reduce) { #quiz-view .done-intro.go .di-pup { animation: none; } }
/* 미션: 우리 반 목표 옆은 지금 리그 트로피 (크게) */
#quiz-view .goals-card .team2 { grid-template-columns: calc(var(--p) * 70) 1fr; }
#quiz-view .goals-card .team2 > img.t2-cup { width: calc(var(--p) * 68); height: calc(var(--p) * 68); object-fit: contain; }
/* 단어 카드(복습 포함): 제목 · 카드 · 소리 버튼 사이 간격 */
#quiz-view #qp-cards .cards-body, #quiz-view #qp-cards.rv .cards-body { gap: calc(var(--p) * 20); }
#quiz-view #qp-cards .cards-body .q-title { margin-bottom: calc(var(--p) * 4); }
#quiz-view #qp-cards .wcard, #quiz-view #qp-cards.rv .wcard { margin: 0 auto calc(var(--p) * 14); }
@media (min-aspect-ratio: 1/1) {
  #quiz-view .di-hero { -webkit-mask-image: none; mask-image: none; }
  #quiz-view .di-art { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
}
/* 철자 문제: 강아지 + 말풍선 가운데 */
#quiz-view #qp-lesson[data-kind="spell"] .coach { justify-content: center; }
/* 홈 오른쪽 위 「그만하기」 */
#quiz-view .mh-stop { flex: none; height: calc(var(--p) * 34); padding: 0 calc(var(--p) * 12); border: calc(var(--p) * 1.5) solid #e3ddd5; border-radius: calc(var(--p) * 10); background: #fff; box-shadow: 0 calc(var(--p) * 2) 0 #e3ddd5; font: 700 calc(var(--p) * 14) var(--font); color: #77716a; cursor: pointer; }
#quiz-view .mh-stop:active { transform: translateY(calc(var(--p) * 2)); box-shadow: none; }
#stop-confirm .btn { white-space: nowrap; word-break: keep-all; flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: clamp(16px, 4.6vw, 20px); }
/* 아래 탭 5칸: 학습 · 단어장 · 미션 · AI 친구 · 그만하기 (홈 위쪽 그만하기 버튼은 없앰) */
#quiz-view .map-tabs, .chat-tabs { grid-template-columns: repeat(5, 1fr) !important; }
#quiz-view .map-tabs .mt .nav-door { width: calc(var(--p) * 48); height: calc(var(--p) * 48); padding: calc(var(--p) * 2); object-fit: contain; }
.chat-tabs .ct .nav-door { width: calc(var(--p) * 48); height: calc(var(--p) * 48); padding: calc(var(--p) * 2); object-fit: contain; }
#quiz-view .map-tabs .mt.stop span, .chat-tabs .ct.stop span { color: #8b857d; }
/* 대화 화면도 아래 탭이 있으면 위쪽 「그만하기」는 숨김 (탭에 있으니까) */
#screen-chat:has(.chat-tabs:not([hidden])) .chat-top #stop-btn { display: none; }
/* ---- 🔍 탐정 배지: 말풍선 옆 돋보기 · 탐정 모드 띠 · 지도 위 배지 수 · 우리 반 이번 주 배지 ---- */
#screen-chat .ai-row { align-items: flex-end; }
#screen-chat .chk-btn { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; gap: calc(var(--p) * 1); width: calc(var(--p) * 44); padding: calc(var(--p) * 5) 0 calc(var(--p) * 4); border: calc(var(--p) * 1.5) solid #e3ddd5; border-radius: calc(var(--p) * 12); background: #fff; box-shadow: 0 calc(var(--p) * 2) 0 #e3ddd5; cursor: pointer; font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; }
#screen-chat .chk-btn span { font-size: calc(var(--p) * 18); line-height: 1; }
#screen-chat .chk-btn small { font: 700 calc(var(--p) * 11) "Pretendard Variable", Pretendard, system-ui, sans-serif; color: #8b857d; }
#screen-chat .chk-btn:active { transform: translateY(calc(var(--p) * 2)); box-shadow: none; }
#screen-chat .bubble.checking { outline: calc(var(--p) * 3) solid #ffc400; outline-offset: calc(var(--p) * 2); }
#screen-chat .check-bar { display: flex; align-items: flex-start; gap: calc(var(--p) * 10); margin: 0 max(calc(var(--p) * 16), calc((100% - calc(var(--p) * 620)) / 2 + calc(var(--p) * 16))) calc(var(--p) * 8); padding: calc(var(--p) * 12) calc(var(--p) * 14); border: calc(var(--p) * 2) solid #ffd84a; border-radius: calc(var(--p) * 16); background: #fff8dc; font-family: "Pretendard Variable", Pretendard, system-ui, sans-serif; animation: rise .25s ease-out; }
#screen-chat .check-bar .cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(var(--p) * 4); }
#screen-chat .check-bar b { font: 800 calc(var(--p) * 16) inherit; font-family: inherit; color: #a86b00; }
#screen-chat .check-bar q { font: 500 calc(var(--p) * 15)/1.45 inherit; font-family: inherit; color: #5c564f; quotes: "「" "」"; overflow-wrap: anywhere; }
#screen-chat .check-bar span { font: 800 calc(var(--p) * 17)/1.4 inherit; font-family: inherit; color: #2f2d2b; }
#screen-chat .check-bar .cb-x { flex: none; width: calc(var(--p) * 36); height: calc(var(--p) * 36); border: 0; border-radius: 50%; background: #fff; color: #8b857d; font-size: calc(var(--p) * 16); cursor: pointer; }
#screen-chat .bubble.me.check::before { content: "🔍 "; }
#quiz-view .map-head .s-badge img { width: calc(var(--p) * 28); height: calc(var(--p) * 28); object-fit: contain; }
#quiz-view .map-head .s-badge b { color: #b8860b; }
#quiz-view .fl-badges { grid-column: 1 / -1; display: flex; align-items: center; gap: calc(var(--p) * 8); padding: calc(var(--p) * 10) calc(var(--p) * 12); border-radius: calc(var(--p) * 12); background: #fff8dc; border: calc(var(--p) * 1.5) solid #ffe08a; font: 700 calc(var(--p) * 15) var(--font); color: #5c564f; }
#quiz-view .fl-badges img { width: calc(var(--p) * 30); height: calc(var(--p) * 30); object-fit: contain; }
#quiz-view .fl-badges b { margin-left: auto; font: 900 calc(var(--p) * 18) var(--font); color: #b8860b; }
/* 「우리 반」 제목 옆 강아지 셋: 가로로 긴 그림이라 높이 기준으로 크게 */
#quiz-view .ms-title img[src*="i-group"] { width: auto; height: calc(var(--p) * 40); max-width: calc(var(--p) * 84); }

/* 참가 코드 없이 반 QR로만: 코드 입력 칸·「참가 코드로 들어가기」 숨김, 대신 QR 안내 (오류 문구는 그대로 보임) */
#join-code { display: none !important; }
#code-form > :not(#code-error) { display: none !important; }
.qr-note { display: none; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; padding: 16px 18px; border-radius: 18px; background: #f3edff; text-align: center; }
.qr-note b { font-size: 18px; color: #3c2a6b; }
.qr-note span { font-size: 15px; color: #6b6280; }
#kid-picker[hidden] ~ .qr-note { display: flex; }

/* 바탕화면 아이콘 카드 (끝 화면 · 이름 화면): 아이콘 그림 + 한 줄 + 버튼 하나 */
.home-tip { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px 14px; margin-top: 16px; padding: 16px; border-radius: 20px; background: #f3edff; text-align: left; }
.home-tip[hidden] { display: none; }
.home-tip .ht-ic, .install-card .ht-ic { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 3px 0 rgba(60, 30, 120, .18); }
.home-tip .ht-t b { display: block; font-size: 17px; color: #3c2a6b; }
.home-tip .ht-t small { display: block; margin-top: 2px; font-size: 14px; color: #6b6280; }
.home-tip .btn, .home-tip .ht-ios, .home-tip .ok-text { grid-column: 1 / -1; margin: 0; }
.install-card .ht-ic { display: block; margin: 0 auto 6px; }

/* 얼굴이 안 보일 때 잠깐 멈춤 (화면 전체를 덮음) */
.overlay.face-pause { z-index: 90; background: rgba(40, 24, 80, .55); }
.face-pause .card { text-align: center; }
.face-pause h2 { margin: calc(var(--p) * 6) 0 calc(var(--p) * 8); }
.face-pause p { margin: 0; line-height: 1.6; }
.face-pause .fp-auto { margin-top: calc(var(--p) * 10); color: #7b7389; }
.face-pause .btn { margin-top: calc(var(--p) * 14); }

/* 대화 화면 위쪽 띠 = 학습 지도 위쪽 띠 (불꽃 · 별 · 탐정 배지 · 리그), 아래 탭은 늘 보임 */
#screen-chat .chat-top { justify-content: center; background: var(--cream, #fffaf3) !important; border-bottom: 0 !important; }
#screen-chat .chat-top > .rec, #screen-chat .chat-top > .top-stats, #screen-chat .chat-top > #stop-btn { display: none !important; }
#screen-chat .c-stats { display: flex; justify-content: center; gap: calc(var(--p) * 26); }
#screen-chat .c-stats .stat { display: inline-flex; align-items: center; gap: calc(var(--p) * 6); padding: calc(var(--p) * 2) calc(var(--p) * 4); font: 900 calc(var(--p) * 21) var(--font) !important; }
#screen-chat .c-stats .stat img { width: calc(var(--p) * 28); height: calc(var(--p) * 28); object-fit: contain; }
#screen-chat .c-stats .s-fire b { color: var(--orange); }
#screen-chat .c-stats .s-star b { color: #f2ae00; }
#screen-chat .c-stats .s-badge b { color: #8a6a12; }
#screen-chat .c-stats .s-league b { color: var(--pr-ink); font-size: calc(var(--p) * 17); }
#screen-chat .c-stats [hidden] { display: none !important; }

/* 응원 보내기 창: 아래 탭에 가려지지 않게 가운데에 띄우고, 길면 안에서 스크롤 · 「닫기」는 늘 보이게 */
#quiz-view .fr-cheer { z-index: 300; align-items: center; padding: calc(calc(var(--p) * 16) + env(safe-area-inset-top, 0px)) calc(var(--p) * 16) calc(calc(var(--p) * 16) + env(safe-area-inset-bottom, 0px)); }
#quiz-view .fc-card { border-radius: calc(var(--p) * 22); max-height: calc(100dvh - calc(var(--p) * 32)); overflow-y: auto; box-shadow: 0 calc(var(--p) * 12) calc(var(--p) * 40) rgba(40, 20, 80, .25); }
#quiz-view .fc-card .linklike { min-height: calc(var(--p) * 44); padding: 0 calc(var(--p) * 18); border: calc(var(--p) * 2) solid var(--line, #e6e0d4); border-radius: calc(var(--p) * 14); background: #fff; text-decoration: none; font: 800 calc(var(--p) * 16) var(--font); color: var(--ink); }

/* 대화 화면 위쪽 띠: 지도 위쪽처럼 동그란 바탕 없이 */
#screen-chat .c-stats .stat { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
/* 남은 이야기 · 시간 칩 (그림 칩 옆) */
#screen-chat .chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--p) * 6) calc(var(--p) * 8); }
#screen-chat .chip-row .draw-chip { margin: 0 0 calc(var(--p) * 8); }
.chat-screen.quizzing .chip-row, .chat-screen.reading .chip-row { display: none !important; }
#screen-chat .talk-chip.low { border-color: #ffb020; background: #fff6df; }
#screen-chat .talk-chip.low b { color: #c06a00; }
.end-why { margin: calc(var(--p) * 4) 0 0; padding: calc(var(--p) * 8) calc(var(--p) * 14); border-radius: calc(var(--p) * 14); background: #fff6df; color: #8a5a00; font-weight: 700; }

/* 응원 직접 쓰기 */
#quiz-view .fc-own { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: calc(var(--p) * 8); margin-top: calc(var(--p) * 4); }
#quiz-view .fc-own input { min-width: 0; min-height: calc(var(--p) * 48); padding: 0 calc(var(--p) * 14); border: calc(var(--p) * 2.5) solid var(--line, #e6e0d4); border-radius: calc(var(--p) * 14); background: #fff; font: 700 calc(var(--p) * 17) var(--font); color: var(--ink); }
#quiz-view .fc-own input:focus { outline: none; border-color: var(--pr-line); }
#quiz-view .fc-own button { min-height: calc(var(--p) * 48); padding: 0 calc(var(--p) * 16); border: 0; border-radius: calc(var(--p) * 14); background: var(--primary, #7b42e0); box-shadow: 0 calc(var(--p) * 3) 0 #5a2fc2; color: #fff; font: 900 calc(var(--p) * 16) var(--font); cursor: pointer; }
#quiz-view .fc-own .fc-err { grid-column: 1 / -1; margin: 0; color: #d03a2a; font: 700 calc(var(--p) * 14) var(--font); }

/* 오늘의 미션: 2×2 작은 칸 */
#quiz-view .goals-card .ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--p) * 8); margin-top: calc(var(--p) * 10); }
#quiz-view .goals-card .ms-tile { display: grid; grid-template-columns: calc(var(--p) * 34) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: calc(var(--p) * 8); align-items: center; padding: calc(var(--p) * 10) calc(var(--p) * 10); border: calc(var(--p) * 2) solid #ebe5dc; border-radius: calc(var(--p) * 14); background: #fff; }
#quiz-view .goals-card .ms-tile .ms-ic { grid-row: 1 / 3; width: calc(var(--p) * 34); height: calc(var(--p) * 34); object-fit: contain; }
#quiz-view .goals-card .ms-tile span { font: 800 calc(var(--p) * 14) var(--font); line-height: 1.3; color: var(--ink); }
#quiz-view .goals-card .ms-tile em { font: 800 calc(var(--p) * 13) var(--font); font-style: normal; color: #a39c93; }
#quiz-view .goals-card .ms-tile.ok { border-color: #58cc02; background: #effbe4; }
#quiz-view .goals-card .ms-tile.ok em { color: #3f8a05; }

/* 오늘의 미션: 「내가 모은 별」 밑 연한 아이보리 상자 */
#quiz-view .goals-card .my-rows .missions { margin: 0; padding: calc(var(--p) * 12) calc(var(--p) * 12) calc(var(--p) * 12); border: calc(var(--p) * 2) solid #f0e4c8; border-radius: calc(var(--p) * 16); background: #fffaf0; box-shadow: none; }
#quiz-view .goals-card .my-rows .missions .ms-head { display: none; }
#quiz-view .goals-card .my-rows .missions .ms-pick { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#quiz-view .goals-card .my-rows .missions .ms-grid { margin-top: calc(var(--p) * 8); }


/* 미션 상자 안: 이름이 길어서 한 줄씩 (아이콘 · 이름 · 0/1) */
#quiz-view .goals-card .my-rows .missions .ms-grid { display: flex; flex-direction: column; gap: calc(var(--p) * 6); }
#quiz-view .goals-card .my-rows .missions .ms-tile { display: flex; align-items: center; gap: calc(var(--p) * 10); padding: calc(var(--p) * 8) calc(var(--p) * 12); border-width: calc(var(--p) * 1.5); }
#quiz-view .goals-card .my-rows .missions .ms-tile .ms-ic { width: calc(var(--p) * 28); height: calc(var(--p) * 28); flex: none; }
#quiz-view .goals-card .my-rows .missions .ms-tile span { flex: 1; min-width: 0; font-size: calc(var(--p) * 15); }
#quiz-view .goals-card .my-rows .missions .ms-tile em { flex: none; white-space: nowrap; }

/* <<< 강아지 시안 끝 */
