/* 유이코 공주님의 한국어 교실
   2026-11-22 새 디자인: 국내 초등 학습앱(아이스크림 홈런·밀크T·엘리하이)의
   파스텔 바탕 + 흰 카드, 과목별 색, 캐릭터 안내, 오늘의 시간표, 통통한 버튼, 칭찬 도장을 가져왔다. */

:root {
  color-scheme: light;
  --bg: #fff8f4;
  --card: #fff;
  --ink: #2d2238;
  --ink-2: #5d5368;
  --ink-3: #8a8094;
  --line: #f2e7eb;
  --line-2: #e7d9e0;
  --brand: #e0446d;
  --brand-hover: #d43c64;
  --brand-deep: #b8325a;
  --brand-soft: #ffe3eb;
  --brand-tint: #fff3f6;
  --gold: #f5b631;
  --read: #6f7bf7;
  --read-deep: #4f5bd6;
  --read-soft: #eceeff;
  --listen: #1fb5a3;
  --listen-deep: #0e7a6e;
  --listen-soft: #dcf5f1;
  --gram: #f58a1f;
  --gram-deep: #b65a0a;
  --gram-soft: #fff0dd;
  --good-deep: #0d7a55;
  --good-soft: #e1f6ee;
  --stamp: #e03a5a;
  --shadow: 0 1px 2px rgb(45 34 56 / 4%), 0 14px 34px -16px rgb(150 60 100 / 30%);
  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-cute: "Jua", "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

.t-reading { --c: var(--read); --c-deep: var(--read-deep); --c-soft: var(--read-soft); }
.t-listening { --c: var(--listen); --c-deep: var(--listen-deep); --c-soft: var(--listen-soft); }
.t-grammar { --c: var(--gram); --c-deep: var(--gram-deep); --c-soft: var(--gram-soft); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg) radial-gradient(900px 440px at 50% -190px, #ffdfe8 0%, rgb(255 223 232 / 0%) 72%) no-repeat;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:where(h1, h2, h3, p, ol, ul) { margin: 0; }
:where(ol, ul) { padding: 0; }
img { max-width: 100%; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 8px; left: 12px; z-index: 20; padding: 8px 12px; border-radius: 10px; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.shell { width: min(100% - 32px, 1040px); margin-inline: auto; }

/* 머리글 */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-mark { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; background: #fff; color: var(--gold); box-shadow: 0 0 0 2px var(--brand-soft), 0 8px 18px -10px rgb(184 50 90 / 60%); }
.crown { width: 22px; height: 17px; background: currentColor; clip-path: polygon(0 18%, 28% 43%, 50% 0, 72% 43%, 100% 18%, 83% 81%, 17% 81%, 17% 89%, 83% 89%, 83% 100%, 17% 100%); }
.brand-name { display: grid; line-height: 1.15; }
.brand-name small { color: var(--ink-3); font-size: .74rem; font-weight: 700; }
.brand-name strong { font-family: var(--font-cute); font-size: 1.24rem; font-weight: 400; letter-spacing: -.01em; }
.date-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.date-pill:empty { display: none; }
.date-pill svg { width: 15px; height: 15px; color: var(--brand); }

/* 공통 카드·버튼 */
#screen > * { animation: rise .38s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.card { padding: 20px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-family: var(--font-cute); font-size: 1.34rem; font-weight: 400; line-height: 1.25; letter-spacing: -.01em; }
.card-lead { margin: -6px 0 14px; color: var(--ink-2); font-size: .92rem; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.state-card { color: var(--ink-2); text-align: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border: 0; border-radius: 999px; font-size: 1rem; font-weight: 750; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, color .15s ease; }
.btn svg { flex: none; width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-deep); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-deep); }
.btn-primary:disabled { background: #f3e9ee; color: #a99aa5; box-shadow: 0 4px 0 #e6d8df; }
.btn-soft { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 3px 0 var(--line-2); }
.btn-soft:hover:not(:disabled) { background: var(--brand-tint); }
.btn-soft:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px var(--line-2), 0 1px 0 var(--line-2); }
.btn-text { min-height: 44px; padding: 8px 10px; background: transparent; color: var(--ink-2); font-weight: 650; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.btn-text:hover { color: var(--ink); text-decoration-color: var(--brand); }
.btn-xl { width: 100%; min-height: 58px; font-size: 1.16rem; }

/* 첫 화면 */
.hero { overflow: hidden; border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.hero-top, .report-top {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 22px 6px 0 20px;
  background: linear-gradient(150deg, #ffd3df 0%, #ffe5e3 52%, #fff0d8 100%);
}
.hero-top::before, .report-top::before { content: ""; position: absolute; z-index: -1; right: -60px; bottom: -90px; width: 300px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / 92%) 0 56%, rgb(255 255 255 / 0%) 71%); }
.hero-top::after, .report-top::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(rgb(255 255 255 / 70%) 2px, transparent 2.6px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(105deg, #000, transparent 48%); mask-image: linear-gradient(105deg, #000, transparent 48%); }
.hero-copy { align-self: center; padding-bottom: 24px; }
.today-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 8px; border-radius: 999px; background: rgb(255 255 255 / 80%); color: var(--brand-deep); font-size: .8rem; font-weight: 800; }
.today-chip svg { width: 15px; height: 15px; }
.hero h1 { margin-top: 12px; color: #3b2134; font-family: var(--font-cute); font-size: clamp(2.05rem, 9vw, 3.7rem); font-weight: 400; line-height: 1.1; letter-spacing: -.015em; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero h1 span { display: block; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-meta span { padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / 75%); color: var(--ink-2); font-size: .8rem; font-weight: 700; }
.hero-art, .report-art { position: relative; width: clamp(128px, 36vw, 220px); }
.hero-art img, .report-art img { display: block; width: 100%; height: auto; }
.sparkle { position: absolute; width: 18px; aspect-ratio: 1; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.8s ease-in-out infinite; }
.sparkle.s1 { top: 14%; left: -2%; }
.sparkle.s2 { top: 46%; left: 4%; width: 11px; background: #fff; animation-delay: .9s; }
.sparkle.s3 { top: 3%; right: 10%; width: 12px; background: var(--brand); animation-delay: 1.7s; }
@keyframes twinkle { 50% { transform: scale(.5) rotate(35deg); opacity: .55; } }
.hero-bottom { padding: 16px 18px 20px; }

.home-grid { display: grid; gap: 16px; margin-top: 16px; }
.periods { display: grid; gap: 10px; list-style: none; }
.period { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--c-soft); }
.period-icon, .chip-icon { display: grid; place-items: center; flex: none; color: #fff; background: var(--c); }
.period-icon { width: 46px; height: 46px; border-radius: 15px; box-shadow: 0 3px 0 var(--c-deep); }
.period-icon svg { width: 24px; height: 24px; }
.period-text { min-width: 0; }
.period-title { display: flex; align-items: baseline; gap: 7px; }
.period-no { color: var(--c-deep); font-size: .76rem; font-weight: 800; }
.period-name { font-family: var(--font-cute); font-size: 1.24rem; font-weight: 400; line-height: 1.2; }
.period-meta { display: block; color: var(--ink-2); font-size: .82rem; }
.status { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: #fff; color: var(--ink-3); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.status svg { width: 13px; height: 13px; }
.status.doing { color: var(--c-deep); box-shadow: inset 0 0 0 1.5px var(--c); }
.status.done { background: var(--c-deep); color: #fff; }
.home-note { margin: 18px 8px 0; color: var(--ink-3); font-size: .84rem; font-weight: 600; text-align: center; }

/* 듣기 재생기 */
.player { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 8px; padding: 12px; border-radius: 20px; background: var(--listen-soft); }
.play { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; max-width: 100%; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 750; text-align: left; box-shadow: 0 3px 0 #bde8e1; transition: transform .1s ease, box-shadow .1s ease; }
.play:active { transform: translateY(2px); box-shadow: 0 1px 0 #bde8e1; }
.play-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--listen-deep); color: #fff; }
.play-icon svg { width: 20px; height: 20px; }
.play-icon .i-pause, .player[data-state="playing"] .play-icon .i-play { display: none; }
.player[data-state="playing"] .play-icon .i-pause { display: block; }
.eq { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.player[data-state="playing"] .eq { display: inline-flex; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--listen); transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.25s; }
.eq i:nth-child(3) { animation-delay: -.5s; }
.eq i:nth-child(4) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.replay { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgb(255 255 255 / 72%); color: var(--listen-deep); font-size: .86rem; font-weight: 750; white-space: nowrap; }
.replay svg { width: 16px; height: 16px; }
.player-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 99px; background: rgb(255 255 255 / 88%); }
.player-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--listen); transition: width .25s linear; }
.speed { grid-column: 1 / -1; justify-self: start; display: inline-flex; min-width: 0; margin: 0; padding: 3px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #c6ebe4; }
.speed label { position: relative; }
.speed input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.speed span { display: block; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-size: .84rem; font-weight: 750; white-space: nowrap; }
.speed input:checked + span { background: var(--listen-deep); color: #fff; }
.speed input:focus-visible + span { outline: 3px solid var(--listen); outline-offset: 1px; }
.audio-note { grid-column: 1 / -1; color: var(--ink-2); font-size: .86rem; }

/* 문제 화면 */
.quiz { max-width: 720px; margin-inline: auto; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 2px 10px; }
.skill-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; background: var(--c-soft); color: var(--c-deep); font-size: .88rem; font-weight: 800; }
.chip-icon { width: 28px; height: 28px; border-radius: 50%; }
.chip-icon svg { width: 16px; height: 16px; }
.quiz-count { color: var(--ink-3); font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz-count b { margin-right: 2px; color: var(--ink); font-family: var(--font-cute); font-size: 1.36rem; font-weight: 400; }
.track { display: flex; gap: 8px; margin-bottom: 18px; }
.track-group { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.seg { height: 8px; border-radius: 99px; background: #eee2e8; }
.seg.done { background: var(--c); }
.seg.now { background: var(--c-deep); box-shadow: 0 0 0 3px var(--c-soft); }
.q-card { padding: 20px 18px 22px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.q-card::after { content: ""; display: table; clear: both; }
.q-pose { float: right; width: 66px; height: 84px; margin: -4px -4px 8px 12px; overflow: hidden; border-radius: 20px; background: var(--c-soft); }
.q-pose img { display: block; width: 100%; height: auto; margin-top: 5px; }
.q-card h1 { font-size: clamp(1.17rem, 4.8vw, 1.42rem); font-weight: 700; line-height: 1.5; letter-spacing: -.02em; }
.passage { clear: both; position: relative; margin-top: 24px; padding: 22px 16px 12px; border-radius: 18px; background: #fffcf3; box-shadow: inset 0 0 0 1.5px #f1e3c4; }
.passage-tag { position: absolute; top: -12px; left: 14px; padding: 3px 12px; border-radius: 999px; background: var(--c-deep); color: #fff; font-size: .78rem; font-weight: 800; }
.nowrap { white-space: nowrap; }
.blank { display: inline-block; width: 4.4em; height: 1.35em; margin: 0 .2em; vertical-align: -.3em; border-radius: 8px; background: rgb(255 255 255 / 70%); box-shadow: inset 0 0 0 2px var(--c, var(--ink-3)); opacity: .9; }
.wrong-context .blank { height: 1.25em; }
.passage p { font-size: 1.05rem; line-height: 1.9; white-space: pre-wrap; background: repeating-linear-gradient(to bottom, transparent 0 calc(1.9em - 1px), #f2e6cb calc(1.9em - 1px) 1.9em); }
.q-card .player { clear: both; margin-top: 18px; }
.options { clear: both; display: grid; gap: 10px; min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.option { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 58px; padding: 12px 14px 12px 12px; border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 1.02rem; line-height: 1.5; cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease, transform .12s ease; }
.option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.opt-no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px #dccfd6; color: var(--ink-2); font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.option:has(input:checked) { background: var(--c-soft); box-shadow: inset 0 0 0 2px var(--c); }
.option:has(input:checked) .opt-no { background: var(--c-deep); box-shadow: none; color: #fff; animation: pop .28s ease; }
.option:has(input:focus-visible) { outline: 3px solid var(--c); outline-offset: 3px; }
.option:active { transform: scale(.985); }
@media (hover: hover) {
  .option:hover:not(:has(input:checked)) { background: #fffafc; box-shadow: inset 0 0 0 2px var(--line-2); }
}
@keyframes pop { 40% { transform: scale(1.22); } }
.skip-audio { display: flex; margin: 12px auto 0; font-size: .86rem; }
.save-note { margin: 12px 4px 0; color: var(--ink-3); font-size: .82rem; text-align: center; }
.action-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 16px 0 max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgb(255 248 244 / 0%), var(--bg) 34%); }
.action-bar .btn { padding-inline: 16px; }
.action-bar .btn-text { padding-inline: 8px; }
.action-bar #next { min-width: 116px; margin-left: auto; }

/* 결과 화면 */
.report { display: grid; gap: 16px; max-width: 760px; margin-inline: auto; }
.report-card { overflow: hidden; border-radius: 30px; background: #fff; box-shadow: var(--shadow); }
.report-copy { align-self: center; padding-bottom: 22px; }
.kicker { color: var(--brand-deep); font-size: .8rem; font-weight: 800; }
.report-top h1 { margin-top: 8px; color: #3b2134; font-family: var(--font-cute); font-size: clamp(1.6rem, 6.6vw, 2.5rem); font-weight: 400; line-height: 1.22; letter-spacing: -.01em; }
.report-art { width: clamp(112px, 30vw, 190px); }
.stamp { display: grid; place-items: center; width: 82px; height: 82px; margin-top: 14px; border-radius: 50%; color: var(--stamp); background: rgb(255 255 255 / 55%); box-shadow: inset 0 0 0 3px currentColor, inset 0 0 0 6px rgb(255 255 255 / 80%), inset 0 0 0 8px currentColor; font-family: var(--font-cute); font-size: 1.02rem; line-height: 1.05; text-align: center; white-space: pre-line; transform: rotate(-12deg); animation: stamp .55s cubic-bezier(.2, 1.5, .4, 1) .25s backwards; }
@keyframes stamp { from { opacity: 0; transform: scale(1.9) rotate(-26deg); } }
.report-body { padding: 18px 20px 22px; }
.score-top { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; flex: none; width: 112px; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring-track { stroke: #f4e9ee; }
.ring-fill { stroke: var(--brand); stroke-linecap: round; animation: ring 1s cubic-bezier(.3, .8, .3, 1) .2s backwards; }
@keyframes ring { from { stroke-dashoffset: var(--ring-full); } }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-label b { color: var(--ink); font-family: var(--font-cute); font-size: 2.4rem; font-weight: 400; }
.ring-label small { margin-top: 5px; color: var(--ink-3); font-size: .78rem; font-weight: 700; }
.score-text h2 { font-size: 1.1rem; font-weight: 800; line-height: 1.4; }
.score-text p { margin-top: 4px; color: var(--ink-2); font-size: .9rem; }
.score-desc { margin-top: 16px; color: var(--ink-2); font-size: .95rem; text-wrap: pretty; }
.skill-scores { display: grid; gap: 8px; margin-top: 18px; list-style: none; }
.skill-score { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--c-soft); }
.skill-score .chip-icon { width: 36px; height: 36px; border-radius: 12px; }
.skill-score .chip-icon svg { width: 20px; height: 20px; }
.skill-score-name { display: block; font-family: var(--font-cute); font-size: 1.12rem; line-height: 1.2; }
.stickers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sticker { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); color: #fff; }
.sticker svg { width: 11px; height: 11px; }
.sticker.ok { background: var(--c-deep); box-shadow: none; }
.sticker.skip { background: repeating-linear-gradient(45deg, #fff 0 3px, #eee3e8 3px 6px); }
.skill-score-num { color: var(--c-deep); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.skill-score-num small { display: block; color: var(--ink-3); font-size: .74rem; font-weight: 700; }
.fine { margin-top: 14px; color: var(--ink-3); font-size: .82rem; line-height: 1.6; }

.ladder { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; height: 178px; padding-top: 36px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 10px 6px 12px; border-radius: 16px 16px 8px 8px; background: #f5edf1; color: var(--ink-2); }
.step:nth-child(1) { height: 52%; }
.step:nth-child(2) { height: 76%; }
.step:nth-child(3) { height: 100%; }
.step b { color: var(--ink); font-family: var(--font-cute); font-size: 1.16rem; font-weight: 400; }
.step > span:last-child { font-size: .84rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.step.pass { background: linear-gradient(180deg, #ff8eaa, var(--brand)); color: #fff; }
.step.pass b { color: #fff; }
.step b { display: inline-flex; align-items: center; gap: 5px; }
.step-check { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--brand); }
.step-check svg { width: 12px; height: 12px; }
.step-flag { position: absolute; bottom: calc(100% + 9px); left: 50%; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .74rem; font-weight: 800; white-space: nowrap; transform: translateX(-50%); }
.step-flag::after { content: ""; position: absolute; top: 100%; left: 50%; border: 5px solid transparent; border-top-color: var(--ink); transform: translateX(-50%); }

.wrong-note summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-family: var(--font-cute); font-size: 1.34rem; }
.wrong-note summary::-webkit-details-marker { display: none; }
.summary-end { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); }
.summary-end svg { width: 22px; height: 22px; color: var(--ink-3); transition: transform .2s ease; }
.wrong-note[open] .summary-end svg { transform: rotate(180deg); }
.wrong-list { display: grid; gap: 12px; margin-top: 16px; list-style: none; }
.wrong-item { padding: 14px; border-radius: 18px; box-shadow: inset 0 0 0 1.5px var(--line); }
.wrong-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .82rem; font-weight: 800; }
.wrong-no { padding: 2px 9px; border-radius: 999px; background: var(--ink); color: #fff; }
.wrong-skill { padding: 2px 9px; border-radius: 999px; background: var(--c-soft); color: var(--c-deep); }
.wrong-prompt { font-weight: 700; line-height: 1.5; }
.wrong-context { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #faf6f8; color: var(--ink-2); font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }
.answer-line { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 8px; font-size: .93rem; }
.tag { min-width: 3.4em; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 800; text-align: center; white-space: nowrap; }
.mine .tag { background: var(--brand-soft); color: var(--brand-deep); }
.right .tag { background: var(--good-soft); color: var(--good-deep); }
.why { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #fff7e3; color: #5b4a2c; font-size: .9rem; line-height: 1.65; }
.why .tag { background: #ffe7ad; color: #7a5300; }
.all-right { text-align: center; color: var(--ink-2); font-weight: 700; }
.report-actions { display: flex; gap: 10px; }
.report-actions .btn { flex: 1; }

.page-footer { margin-block: 28px 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8rem; text-align: center; }

@media (min-width: 720px) {
  .shell { width: min(100% - 64px, 1040px); }
  .masthead { padding-block: 22px 18px; }
  .hero-top { padding: 40px 34px 0 46px; }
  .hero-copy { padding-bottom: 44px; }
  .hero-bottom { padding: 22px 46px 30px; }
  .hero-bottom .btn-xl { width: auto; min-width: 320px; }
  .home-grid { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 20px; margin-top: 20px; }
  .card { padding: 26px; }
  .q-card { padding: 30px 32px 32px; }
  .q-pose { width: 84px; height: 108px; }
  .report-top { padding: 34px 30px 0 40px; }
  .report-copy { padding-bottom: 32px; }
  .report-body { padding: 26px 40px 32px; }
  .ring { width: 128px; }
}

@media (max-width: 359px) {
  .shell { width: calc(100% - 24px); }
  .date-pill { display: none; }
  .hero-top, .report-top { padding-left: 16px; }
  .action-bar .btn { padding-inline: 12px; }
  .action-bar #next { min-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
