/* ==========================================================
   새싹공부 스타일
   흰 바탕 · 주황(#ff7a1a)·하늘(#12b5e0) 포인트 · 연하늘 대표 영역(#d3f5fd)
   주황·하늘 위 글자는 대비를 위해 진한 색(--on-accent)을 쓴다.
   ========================================================== */
:root {
  --orange: #ff7a1a;
  --orange-ink: #b34700;
  --orange-soft: #fff0e4;
  --sky: #12b5e0;
  --sky-ink: #00708e;
  --sky-soft: #d3f5fd;
  --sky-pale: #eefbfe;
  --leaf: #2f9e5b;
  --leaf-ink: #1f7a43;
  --ink: #333;
  --muted: #5b6770;
  --line: #e4ecef;
  --on-accent: #1d1206;
  --ok: #1f8a4c;
  --ok-soft: #e4f6ea;
  --bad: #c62f3c;
  --bad-soft: #fde9eb;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(18, 90, 120, .10);
  --shadow-sm: 0 4px 14px rgba(18, 90, 120, .08);
  --wrap: 1100px;
  --font: "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Nanum Gothic", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
body.has-bottombar { padding-bottom: 84px; }
img, svg { max-width: 100%; }
a { color: var(--sky-ink); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .4em; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 800; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px; border-radius: 999px;
  border: 3px solid transparent; font-weight: 800; font-size: 17px;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--orange); color: var(--on-accent); box-shadow: 0 6px 0 #d95f05; }
.btn-primary:hover { box-shadow: 0 8px 0 #d95f05; }
.btn-primary:active { box-shadow: 0 3px 0 #d95f05; }
.btn-sky { background: var(--sky); color: var(--on-accent); box-shadow: 0 6px 0 #0a8db0; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--sky); }
.btn-danger { background: #fff; color: var(--bad); border-color: #f3b8be; }
.btn-danger.is-armed { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn-lg { min-height: 58px; padding: 14px 32px; font-size: 20px; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 상단 띠 배너 ---------- */
.topband { background: var(--orange); color: var(--on-accent); font-size: 15px; }
.topband .wrap { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.topband p { margin: 0; flex: 1; padding: 8px 0; }
.topband a { color: var(--on-accent); font-weight: 800; }
.topband-close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35);
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--on-accent);
}
.topband-close:hover { background: rgba(255,255,255,.6); }
.topband[hidden] { display: none; }

/* ---------- 보조 메뉴 ---------- */
.util { border-bottom: 1px solid var(--line); font-size: 14px; }
.util .wrap { display: flex; justify-content: flex-end; }
.util ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.util a { display: block; padding: 8px 10px; color: var(--muted); text-decoration: none; font-weight: 700; }
.util a:hover, .util a[aria-current="page"] { color: var(--orange-ink); }

/* ---------- 헤더 + 알약 메뉴 ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 var(--line); }
.header-in { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 24px; letter-spacing: -0.04em; flex: none; }
.logo svg { width: 40px; height: 40px; }
.logo b { color: var(--leaf-ink); }
.gnb { flex: 1; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; list-style: none; margin: 0; padding: 0; }
.pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 16px;
  transition: border-color .15s, background .15s;
}
.pill small { font-size: 12px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.pill:hover { border-color: var(--orange); }
.pill[aria-current="page"] { background: var(--orange); border-color: var(--orange); color: var(--on-accent); }
.pill[aria-current="page"] small { color: var(--on-accent); }
.pill.pill-alt { background: var(--sky-pale); border-color: transparent; }
.pill.pill-alt:hover { border-color: var(--sky); }
.pill.pill-alt[aria-current="page"] { background: var(--sky); color: var(--on-accent); }
.pill-sep { width: 2px; height: 22px; background: var(--line); border-radius: 2px; margin: 0 4px; }

/* ---------- 대표 영역 ---------- */
.hero { background: var(--sky-soft); position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none;
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -160px; }
.hero::after { width: 220px; height: 220px; left: -80px; bottom: -110px; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { display: inline-block; background: #fff; color: var(--sky-ink); font-weight: 800; font-size: 14px; padding: 4px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--orange-ink); background: linear-gradient(transparent 62%, rgba(255,122,26,.28) 62%); }
.hero-lead { font-size: 18px; color: #3d4a52; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.hero-stats li { background: #fff; border-radius: 16px; padding: 10px 16px; font-size: 14px; color: var(--muted); font-weight: 700; box-shadow: var(--shadow-sm); }
.hero-stats b { display: block; font-size: 22px; color: var(--ink); font-weight: 900; }

/* 캐릭터는 태블릿 옆에 따로 서고, 겹치는 곳은 캐릭터 그림의 투명한 오른쪽 여백과 태블릿 테두리뿐이다 */
.hero-art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 360px; }
.mascot { position: relative; flex: none; width: 120px; margin: 0 -12px -6px 0; z-index: 2; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tablet {
  flex: 1 1 auto; min-width: 0; max-width: 420px; background: #263238; border-radius: 34px; padding: 18px; box-shadow: 0 24px 50px rgba(0, 70, 95, .25);
  transform: rotate(2deg); position: relative;
}
.tablet::before { content: ""; position: absolute; top: 50%; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: #4a5b63; }
.tablet-screen { background: #fff; border-radius: 20px; padding: 20px 20px 18px; min-height: 300px; display: flex; flex-direction: column; }
.tablet-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 10px; }
.tablet-tag { background: var(--orange-soft); color: var(--orange-ink); border-radius: 999px; padding: 2px 10px; }
.tablet-q { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.tablet-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tablet-choices button {
  min-height: 44px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; font-size: 15px; padding: 6px 8px;
}
.tablet-choices button:hover:not([disabled]) { border-color: var(--sky); }
.tablet-choices button.is-right { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.tablet-choices button.is-wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.tablet-feedback { font-size: 14px; margin: 10px 0 0; min-height: 1.6em; }
.tablet-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: flex-end; }
.linkish { background: none; border: 0; color: var(--sky-ink); font-weight: 800; cursor: pointer; padding: 6px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 공통 섹션 ---------- */
.sec { padding: 72px 0; }
.sec-alt { background: var(--sky-pale); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.sec-head p { margin: 0; color: var(--muted); }
.kicker { display: block; font-size: 14px; font-weight: 900; color: var(--orange-ink); letter-spacing: .04em; margin-bottom: 6px; }

/* ---------- 공부 방법 슬라이드 ---------- */
.slider-ctrl { display: flex; gap: 8px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-size: 24px; font-weight: 900; line-height: 1; display: grid; place-items: center;
}
.round-btn:hover:not([disabled]) { border-color: var(--orange); color: var(--orange-ink); }
.round-btn[disabled] { opacity: .4; cursor: default; }
.slider { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 6px 20px 20px; }
.slider::-webkit-scrollbar { display: none; }
.slider-track { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.method-card {
  flex: 0 0 calc((100% - 36px) / 3); scroll-snap-align: start; background: #fff; border: 2px solid var(--line);
  border-radius: var(--radius); padding: 24px; min-height: 230px; position: relative;
}
.method-card .num { position: absolute; top: 18px; right: 20px; font-size: 40px; font-weight: 900; color: var(--line); line-height: 1; }
.method-card .blob { width: 72px; height: 72px; border-radius: 26px 26px 26px 8px; display: grid; place-items: center; font-size: 34px; margin-bottom: 16px; }
.method-card p { color: var(--muted); margin: 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.dots button { width: 12px; height: 12px; border-radius: 999px; border: 0; background: #c8d6dc; cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.dots button[aria-current="true"] { width: 30px; background: var(--orange); }

/* ---------- 학년별 로드맵 ---------- */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; position: relative; }
.roadmap::before {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 34px; height: 8px; border-radius: 8px;
  background: linear-gradient(90deg, #b9ebcb, var(--leaf));
}
.road-item a {
  display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 10px 14px; position: relative;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.road-item a:hover { transform: translateY(-6px); border-color: var(--leaf); box-shadow: var(--shadow); }
.road-plant { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.road-item:nth-child(1) .road-plant { font-size: 24px; }
.road-item:nth-child(6) .road-plant { font-size: 42px; }
.road-grade { font-size: 24px; font-weight: 900; }
.road-units { font-size: 13px; color: var(--muted); margin: 4px 0 8px; min-height: 3.2em; }
.road-count { font-size: 13px; font-weight: 800; color: var(--leaf-ink); background: var(--ok-soft); border-radius: 999px; padding: 2px 10px; }
.road-item.is-mine a { border-color: var(--orange); }
.road-item.is-mine a::after { content: "내 학년"; position: absolute; top: -12px; background: var(--orange); color: var(--on-accent); font-size: 12px; font-weight: 900; padding: 2px 10px; border-radius: 999px; }
.road-item:nth-child(1) { margin-bottom: 0; }
.road-item:nth-child(2) { margin-bottom: 10px; }
.road-item:nth-child(3) { margin-bottom: 20px; }
.road-item:nth-child(4) { margin-bottom: 30px; }
.road-item:nth-child(5) { margin-bottom: 40px; }
.road-item:nth-child(6) { margin-bottom: 50px; }

/* ---------- 도우미 + 프로그램 탭 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab {
  min-height: 46px; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.tab .dot { width: 12px; height: 12px; border-radius: 50%; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panel { display: grid; grid-template-columns: 220px 1fr; gap: 32px; background: #fff; border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.tab-panel[hidden] { display: none; }
.helper-card { text-align: center; border-radius: var(--radius); padding: 20px 12px; }
.helper-card svg { width: 140px; height: 160px; }
.helper-card .helper-name { font-weight: 900; font-size: 18px; margin: 6px 0 0; }
.helper-card .helper-role { font-size: 13px; color: var(--muted); }
.program-list { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.program-list a {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sky-pale);
  text-decoration: none; color: var(--ink); font-weight: 700; border: 2px solid transparent;
}
.program-list a:hover { border-color: var(--sky); }
.g-badge { flex: none; display: inline-grid; place-items: center; min-width: 42px; height: 28px; padding: 0 8px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 900; color: var(--sky-ink); }

.site-footer .foot-note a { color: inherit; text-decoration: underline; }

/* ---------- 문제 그림 ---------- */
.q-figure { display: block; margin: 12px auto; }
.q-figure svg { display: block; margin: 0 auto; width: 220px; max-width: 100%; height: auto; }
.q-figure svg.ruler, .q-figure svg.chart { width: 100%; max-width: 440px; }
.q-figure.is-small { margin: 6px 0; }
.q-figure.is-small svg { margin: 0; width: 96px; }
.q-figure.is-small svg.ruler, .q-figure.is-small svg.chart { width: 240px; }

/* ---------- 저학년 코너 ---------- */
.low-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.low-card { border-radius: 28px; padding: 28px; position: relative; overflow: hidden; }
.low-card.g1 { background: #fff3d6; }
.low-card.g2 { background: #e2f7e9; }
.low-card h3 { font-size: 26px; }
.low-card h3, .low-card h3 + p { padding-right: 70px; }
.low-card .low-deco { position: absolute; right: 18px; top: 14px; font-size: 54px; opacity: .9; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: #fff;
  text-decoration: none; color: var(--ink); font-weight: 800; border: 2px solid transparent;
}
.chip:hover { border-color: var(--orange); }
.low-tips { margin: 0; padding-left: 1.2em; color: #4a4a4a; }

/* ---------- 보상 ---------- */
.reward { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; align-items: start; }
.coin-card { background: var(--orange); color: var(--on-accent); border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.coin-card::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,255,255,.3); }
.coin-big { font-size: 56px; font-weight: 900; line-height: 1; margin: 8px 0; }
.coin-card ul { padding-left: 1.2em; margin: 16px 0 0; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; margin: 0; padding: 0; }
.badge {
  background: #fff; border: 2px dashed #cfdbe0; border-radius: 18px; padding: 14px 10px; text-align: center; font-size: 14px;
}
.badge .b-icon { font-size: 30px; display: block; filter: grayscale(1); opacity: .45; }
.badge .b-name { font-weight: 900; display: block; }
.badge .b-desc { color: var(--muted); font-size: 12.5px; display: block; }
.badge .b-state { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.badge.is-earned { border-style: solid; border-color: var(--orange); background: var(--orange-soft); }
.badge.is-earned .b-icon { filter: none; opacity: 1; }
.badge.is-earned .b-state { color: var(--orange-ink); }

/* ---------- 푸터 + 하단 고정 바 ---------- */
.site-footer { background: #2b3338; color: #d6dee2; padding: 40px 0 32px; font-size: 14px; }
.site-footer a { color: #fff; }
.foot-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.foot-brand { font-size: 20px; font-weight: 900; color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 0; }
.foot-note { color: #aab7bd; margin: 0; }

.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.bottombar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.bottombar-info { font-size: 15px; font-weight: 700; color: var(--muted); margin: 0; }
.bottombar-info b { color: var(--ink); }

/* ==========================================================
   학습 페이지 (study.html)
   ========================================================== */
.study-main { min-height: 60vh; padding: 28px 0 72px; }
.study-main:focus { outline: none; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #9aa7ad; }
.crumbs a { color: var(--muted); font-weight: 700; }
.page-title { font-size: clamp(26px, 4vw, 36px); font-weight: 900; margin-bottom: 6px; }
.page-lead { color: var(--muted); margin-bottom: 24px; }

.grade-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.grade-btn {
  width: 100%; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: var(--radius); border: 3px solid var(--line); background: #fff; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .15s, border-color .15s;
}
.grade-btn:hover { transform: translateY(-4px); border-color: var(--orange); }
.grade-btn .gb-num { font-size: 34px; font-weight: 900; }
.grade-btn .gb-sub { font-size: 14px; color: var(--muted); font-weight: 700; }
.grade-btn.is-current { border-color: var(--orange); background: var(--orange-soft); }

.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.subject-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink);
  border-radius: var(--radius); padding: 18px 14px 20px; border: 3px solid transparent; transition: transform .15s, border-color .15s; height: 100%;
}
.subject-card:hover { transform: translateY(-4px); }
.subject-card svg { width: 96px; height: 112px; }
.subject-card .sc-name { font-size: 22px; font-weight: 900; }
.subject-card .sc-meta { font-size: 13px; color: var(--muted); font-weight: 700; }
.meter { width: 100%; height: 10px; background: rgba(0,0,0,.08); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--leaf); }

.unit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.unit-row {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 2px solid var(--line);
  background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.unit-row:hover { border-color: var(--orange); transform: translateX(4px); }
.unit-no { flex: none; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 20px; }
.unit-body { flex: 1; min-width: 0; }
.unit-title { font-weight: 900; font-size: 18px; display: block; }
.unit-meta { font-size: 14px; color: var(--muted); }
.unit-go { flex: none; font-weight: 900; color: var(--orange-ink); }
.helper-strip { display: flex; align-items: center; gap: 16px; border-radius: var(--radius); padding: 14px 20px; margin-bottom: 20px; }
.helper-strip svg { width: 70px; height: 82px; flex: none; }
.helper-strip p { margin: 0; }

/* 문제 풀기 */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.quiz-title { font-weight: 900; font-size: 18px; margin: 0; }
.quiz-count { font-weight: 900; color: var(--orange-ink); }
.progress { height: 14px; background: #e9f1f4; border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--orange)); border-radius: 999px; transition: width .35s ease; }
.q-card { background: #fff; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); border: 2px solid var(--line); }
.q-unit { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.q-text { font-size: clamp(20px, 3vw, 26px); font-weight: 900; margin-bottom: 22px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; list-style: none; margin: 0; padding: 0; }
.choice {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px;
  border-radius: 18px; border: 3px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; font-size: 18px;
  transition: border-color .12s, background .12s, transform .12s;
}
.choice:hover:not([disabled]) { border-color: var(--sky); transform: translateY(-2px); }
.choice .c-no { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--sky-pale); color: var(--sky-ink); display: grid; place-items: center; font-size: 15px; }
.choice[disabled] { cursor: default; }
.choice.is-right { border-color: var(--ok); background: var(--ok-soft); color: #145c33; }
.choice.is-right .c-no { background: var(--ok); color: #fff; }
.choice.is-wrong { border-color: var(--bad); background: var(--bad-soft); color: #8c1d27; }
.choice.is-wrong .c-no { background: var(--bad); color: #fff; }
.answer-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.answer-form label { width: 100%; font-weight: 800; font-size: 15px; color: var(--muted); }
.answer-input {
  flex: 1 1 200px; min-width: 0; min-height: 60px; font: inherit; font-size: 24px; font-weight: 800; padding: 8px 18px;
  border-radius: 18px; border: 3px solid var(--line); background: #fff; color: var(--ink);
}
.answer-input:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 4px rgba(18,181,224,.25); }
.answer-input.is-right { border-color: var(--ok); background: var(--ok-soft); }
.answer-input.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.suffix { font-weight: 900; font-size: 20px; }
.feedback { margin-top: 20px; border-radius: 20px; padding: 18px 20px; }
.feedback[hidden] { display: none; }
.feedback.ok { background: var(--ok-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback .fb-head { font-size: 20px; font-weight: 900; margin: 0 0 6px; }
.feedback.ok .fb-head { color: #145c33; }
.feedback.bad .fb-head { color: #8c1d27; }
.feedback .fb-explain { margin: 0; }
.feedback .fb-explain b { color: var(--ink); }
.quiz-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.key-hint { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

/* 결과 */
.result-card { text-align: center; background: var(--sky-soft); border-radius: 32px; padding: 36px 24px; margin-bottom: 24px; }
.result-score { font-size: clamp(48px, 9vw, 76px); font-weight: 900; line-height: 1; margin: 10px 0; }
.result-score small { font-size: .4em; color: var(--muted); }
.result-msg { font-size: 20px; font-weight: 800; }
.result-points { display: inline-block; background: var(--orange); color: var(--on-accent); font-weight: 900; border-radius: 999px; padding: 6px 18px; }
.result-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.result-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--line); }
.mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; }
.mark.o { background: var(--ok); }
.mark.x { background: var(--bad); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* 오답노트 */
.wrong-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.wrong-item { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.wrong-item .w-body { flex: 1; min-width: 0; }
.wrong-item .w-q { font-weight: 800; display: block; }
.wrong-item .w-meta { font-size: 13px; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; background: var(--sky-pale); border-radius: 28px; }
.empty .e-icon { font-size: 54px; display: block; margin-bottom: 8px; }

/* 학습방 · 보호자 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0 0 24px; }
.stat { background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 18px; }
.stat .s-label { font-size: 14px; font-weight: 800; color: var(--muted); display: block; }
.stat .s-value { font-size: 32px; font-weight: 900; line-height: 1.2; }
.stat .s-value small { font-size: 15px; color: var(--muted); }
.stat.hl { background: var(--orange-soft); border-color: transparent; }
.stat.hl2 { background: var(--sky-soft); border-color: transparent; }
.panel { background: #fff; border: 2px solid var(--line); border-radius: 26px; padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 22px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.today-pick { display: flex; gap: 16px; align-items: center; border-radius: 20px; padding: 16px; }
.today-pick svg { width: 64px; height: 76px; flex: none; }
.nick-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.nick-form input { flex: 1 1 180px; min-width: 0; min-height: 48px; font: inherit; font-weight: 700; padding: 6px 16px; border-radius: 14px; border: 2px solid var(--line); }
.nick-form input:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 4px rgba(18,181,224,.25); }
.form-msg { font-size: 14px; color: var(--leaf-ink); font-weight: 700; min-height: 1.4em; margin: 6px 0 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { font-size: 13px; color: var(--muted); font-weight: 800; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.data-table .bar-cell { width: 40%; }
.hbar { height: 12px; border-radius: 999px; background: #edf2f4; overflow: hidden; }
.hbar > span { display: block; height: 100%; border-radius: 999px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 200px; list-style: none; padding: 0; margin: 0; }
.week li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.week .w-val { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.week .w-bar { width: 100%; max-width: 44px; border-radius: 10px 10px 4px 4px; background: var(--sky); min-height: 4px; position: relative; overflow: hidden; }
.week .w-bar.zero { background: #e4ecef; }
.week .w-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--leaf); }
.week .w-day { font-size: 13px; color: var(--muted); font-weight: 700; }
.week li.is-today .w-day { color: var(--orange-ink); font-weight: 900; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.danger-zone { border-color: #f3c6cb; }
.reset-confirm { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: var(--bad-soft); }
.reset-confirm[hidden] { display: none; }
.reset-confirm .rc-q { font-weight: 800; color: #8c1d27; margin-bottom: 12px; }
.notice { font-size: 14px; color: var(--muted); }

/* 읽어주기 */
.q-tools { margin: -10px 0 18px; }
.q-tools [hidden] { display: none; }

/* 캐릭터 꾸미기 */
.closet-top { display: flex; gap: 20px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.avatar-big svg { width: 150px; height: 150px; display: block; }
.closet-points { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.closet-points b { color: var(--orange-ink); font-size: 26px; }
.closet-top > div:last-child { flex: 1 1 220px; min-width: 0; }
.closet-slot { font-size: 17px; margin: 18px 0 10px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.item-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 8px; min-width: 0; border: 2px solid var(--line); border-radius: 18px; background: #fff; }
.item-card.is-on { border-color: var(--leaf); background: var(--ok-soft); }
.item-card svg { width: 76px; height: 76px; }
.item-name { font-weight: 900; }
.item-card .btn { padding-left: 10px; padding-right: 10px; max-width: 100%; }
.item-state { font-size: 13px; color: var(--muted); font-weight: 700; }
.item-need { font-size: 13px; color: var(--muted); font-weight: 700; min-height: 40px; display: grid; place-items: center; }

/* ==========================================================
   반응형
   ========================================================== */
@media (max-width: 960px) {
  .site-header { position: static; }
  .header-in { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pills { justify-content: flex-start; }
  .hero-in { grid-template-columns: 1fr; padding-top: 36px; }
  .hero-art { min-height: 0; }
  .method-card { flex-basis: calc((100% - 18px) / 2); }
  .roadmap { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .roadmap::before { display: none; }
  .road-item:nth-child(n) { margin-bottom: 0; }
  .tab-panel { grid-template-columns: 1fr; }
  .helper-card { display: flex; align-items: center; gap: 16px; text-align: left; padding: 12px; }
  .helper-card svg { width: 90px; height: 104px; flex: none; }
  .reward { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .sec { padding: 52px 0; }
  .method-card { flex-basis: 86%; }
  .low-wrap, .two-col { grid-template-columns: 1fr; }
  .program-list { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-grid { grid-template-columns: repeat(2, 1fr); }
  .choices { grid-template-columns: 1fr; }
  .q-card { padding: 20px; border-radius: 22px; }
  .tab-panel { padding: 20px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 14px; }
  .slider { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .pill { min-height: 36px; padding: 4px 12px; font-size: 15px; }
  .pills { gap: 6px; }
  .pill-sep { display: none; }
  .logo { font-size: 21px; }
  .hero-art { padding-left: 0; padding-top: 0; flex-direction: column; align-items: center; }
  .mascot { width: 110px; margin: 0 0 -12px; }
  .tablet { transform: none; padding: 12px; border-radius: 26px; width: 100%; }
  .tablet-screen { padding: 16px 14px; }
  .tablet-choices { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .stat .s-value { font-size: 26px; }
  .bottombar-info { font-size: 13px; }
  .bottombar .btn { padding: 8px 16px; font-size: 16px; }
  .unit-row { padding: 14px; gap: 12px; }
  .unit-go { display: none; }
  .wrong-item { flex-wrap: wrap; }
}

/* ---------- 휴대폰 보정 ---------- */
.program-more { display: none; }
@media (max-width: 680px) {
  .gnb { width: 100%; flex: none; }
  .pills { flex-wrap: nowrap; overflow-x: auto; padding: 3px; -webkit-overflow-scrolling: touch; }
  .pills > li { flex: none; }
  .data-table th, .data-table td { padding-left: 4px; padding-right: 4px; }
  .data-table th, .data-table td:first-child { white-space: nowrap; }
  .program-list:not(.is-open) > li:nth-child(n+7) { display: none; }
  .program-more { display: block; width: 100%; margin: -6px 0 20px; }
  .dots button { position: relative; }
  .dots button::after { content: ""; position: absolute; inset: -12px -4px; }
  .foot-links a, .crumbs a { display: inline-block; padding: 7px 0; }
}
@media (max-width: 420px) {
  .bottombar .btn { white-space: nowrap; flex: none; }
}
@media (hover: none) {
  .key-hint { display: none; }
}
