/* 코니영단어 화면 스타일 — 코니수학 디자인 가이드의 토큰을 그대로 씀(시안 previews/solve_mock.html, 2026-11-22).
   연회색 바탕에 흰 카드, 색은 네 캐릭터 색만, 채움 색 위 글자는 ink(흰 글자 금지), 굵기 500·700, 버튼은 턱. */
@font-face { font-family: 'Pretendard'; font-weight: 500; font-display: swap; src: url('/static/fonts/Pretendard-Medium.sub.woff2') format('woff2'); }
@font-face { font-family: 'Pretendard'; font-weight: 700; font-display: swap; src: url('/static/fonts/Pretendard-Bold.sub.woff2') format('woff2'); }
:root {
  --yellow:#f7d84a; --yellow-shade:#edbc41; --yellow-tint:#fef8de; --yellow-deep:#6b5800;
  --green:#a9ce5d; --green-shade:#97bb51; --green-tint:#f0f6e2; --green-deep:#476018;
  --blue:#4fc5eb; --blue-shade:#3bafd4; --blue-tint:#dff5fb; --blue-deep:#0b5f7a; --blue-fill:#86daf5;
  --red:#fe5b49; --red-shade:#ee4e3e; --red-tint:#ffe1de; --red-deep:#b01200;
  --ink:#2b2320; --body:#55473f; --muted:#6a5c55;
  --canvas:#f4f5f7; --surface:#ffffff; --hairline:#dfe2e6; --border-strong:#8a8f98;
  --font-sans:"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 500 16px/1.6 var(--font-sans); word-break: keep-all; -webkit-text-size-adjust: 100%; }
button { font-family: inherit; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* 풀이 화면 */
.app { max-width: 600px; margin: 0 auto; padding: 0 16px 190px; }
header.solve { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.ib { border: none; background: none; min-width: 44px; min-height: 44px; border-radius: 540px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ib svg { width: 28px; height: 28px; }
.bar { flex: 1; height: 15px; background: var(--hairline); border-radius: 540px; overflow: hidden; }
.bar > div { height: 100%; width: 0; border-radius: 540px; background: var(--green); transition: width .9s cubic-bezier(.22, 1, .36, 1); }
.qcard { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 22px 20px 22px; }
.qhead { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.qhead img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.say { font-size: 14px; font-weight: 700; color: var(--green-deep); }
.intro { font-size: 20px; font-weight: 700; line-height: 1.45; margin-top: 2px; }

/* 소리 듣기 버튼: 큰 파랑 원 + 턱 */
.listen { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 6px; }
.play { width: 96px; height: 96px; border-radius: 50%; border: none; background: var(--blue-fill); box-shadow: 0 6px 0 var(--blue); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .07s ease-out, box-shadow .07s ease-out; }
.play svg { width: 48px; height: 48px; }
.play:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--blue); }
.play.small { width: 56px; height: 56px; box-shadow: 0 4px 0 var(--blue); }
.play.small svg { width: 28px; height: 28px; }
.play.ring { animation: ring .9s ease-out 1; }
@keyframes ring { 0% { box-shadow: 0 6px 0 var(--blue), 0 0 0 0 rgba(79,197,235,.55); } 100% { box-shadow: 0 6px 0 var(--blue), 0 0 0 22px rgba(79,197,235,0); } }
.slow { min-height: 44px; padding: 0 16px; border-radius: 540px; border: 2px solid var(--hairline); background: var(--surface); box-shadow: 0 3px 0 var(--hairline); font: 700 15px/1 var(--font-sans); color: var(--body); cursor: pointer; }
.slow:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--hairline); }

/* 보여 주는 영어 단어 */
.word { text-align: center; font: 700 52px/1.2 var(--font-sans); letter-spacing: .04em; margin: 18px 0 6px; }

/* 그림 보기 2×2 */
.pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pic { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; border: 2px solid var(--hairline); background: var(--surface); box-shadow: 0 4px 0 var(--hairline); cursor: pointer; padding: 10px; display: flex; align-items: center; justify-content: center; transition: transform .07s ease-out, box-shadow .07s ease-out; margin-bottom: 4px; }
.pic svg { width: 100%; height: 100%; max-width: 150px; }
.pic .n { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--canvas); color: var(--body); font: 700 14px/26px var(--font-sans); text-align: center; }
.pic:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.pic.sel { border-color: var(--blue-deep); background: var(--blue-tint); box-shadow: 0 4px 0 var(--blue-deep); }
.pic.sel .n { background: var(--blue); color: var(--ink); }

/* 철자: 그림 + 답 칸 + 글자 타일 */
.cue { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0 4px; }
.cue .cuepic { width: 150px; height: 112px; border-radius: 16px; background: var(--canvas); padding: 8px; display: flex; align-items: center; justify-content: center; }
.cue .cuepic svg { width: 100%; height: 100%; }
.cue .ko { font-size: 18px; font-weight: 700; color: var(--body); }
.slots { display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }
.slot { width: 54px; height: 62px; border-radius: 12px; border: 2px dashed var(--border-strong); background: var(--surface); font: 700 34px/1 var(--font-sans); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.slot.fill { border-style: solid; border-color: var(--blue-deep); background: var(--blue-tint); }
.slot.next { border-color: var(--blue-deep); box-shadow: 0 0 0 3px var(--blue-tint); }
.slot.given { border: none; background: none; width: 34px; cursor: default; border-bottom: 3px solid var(--ink); border-radius: 0; }
.tiles { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 4px; }
.tile { width: 58px; height: 60px; border-radius: 14px; border: 2px solid var(--hairline); background: var(--surface); box-shadow: 0 4px 0 var(--hairline); font: 700 30px/1 var(--font-sans); color: var(--ink); cursor: pointer; transition: transform .07s ease-out, box-shadow .07s ease-out; }
.tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.tile.used { visibility: hidden; }
.tip { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* 아래 버튼 띠와 결과 시트 */
footer.fixed { position: fixed; left: 0; right: 0; bottom: 0; background: var(--canvas); border-top: 1px solid var(--hairline); }
.fin { max-width: 600px; margin: 0 auto; padding: 12px 16px 22px; display: flex; gap: 10px; }
.btn { flex: 1; min-height: 56px; padding: 0 20px; border-radius: 540px; border: 1px solid var(--hairline); background: var(--surface); color: var(--body); font: 700 17px/1.3 var(--font-sans); cursor: pointer; box-shadow: 0 4px 0 var(--hairline); transition: transform .07s ease-out, box-shadow .07s ease-out; }
.btn.idk { flex: 0 0 auto; }
.btn.primary { background: var(--blue-fill); border-color: var(--blue-fill); color: var(--ink); box-shadow: 0 4px 0 var(--blue); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--blue); }
.btn:disabled { background: var(--canvas); border-color: var(--hairline); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--hairline); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 12px rgba(55,40,37,.1); transform: translateY(100%); transition: transform .25s ease; visibility: hidden; }
.sheet.show { transform: none; visibility: visible; }
.sheet.good { background: var(--green-tint); }
.sheet .msg { max-width: 600px; margin: 0 auto; padding: 16px 16px 0; display: flex; gap: 12px; align-items: center; }
.sheet .msg img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.sheet h2 { margin: 0 0 2px; font-size: 20px; }
.sheet p { margin: 0; font-size: 15px; color: var(--body); }
.sheet .ans { font: 700 22px/1.3 var(--font-sans); letter-spacing: .03em; color: var(--ink); }
.sheet .why { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--red-tint); color: var(--red-deep); font-size: 14px; font-weight: 700; }
.sheet .ex { margin-top: 6px; font-size: 15px; }
@media (min-width: 900px) {
  .app { max-width: 820px; } .fin, .sheet .msg { max-width: 820px; }
  .pics { grid-template-columns: repeat(4, 1fr); }
  .qhead img { width: 84px; height: 84px; } .intro { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .bar > div, .sheet { transition: none; } .play.ring { animation: none; } }

/* 그림이 아직 없는 단어: 한글 뜻을 임시로 보여 주는 칸(그림을 만들면 없어짐) */
.pic .lab, .cuepic .lab { font: 700 22px/1.3 var(--font-sans); color: var(--ink); text-align: center; padding: 0 6px; }
.pic img, .cuepic img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }  /* 그림 바탕의 옅은 회색을 칸 색에 녹임 */
.qcard[hidden], .sheet[hidden] { display: none; }

/* 풀이 화면 밖의 화면: 학생 고르기, 미션, 완료, 결과 */
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px 60px; }
.wrap.wide { max-width: 860px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--ink); padding: 18px 0 14px; text-decoration: none; }
.brand .mark { display: flex; gap: 3px; } .brand .mark svg { width: 16px; height: 16px; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 22px 20px; margin-bottom: 14px; }
.card h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.35; } .card h2 { font-size: 17px; margin: 0 0 10px; }
.card p { margin: 0 0 10px; color: var(--body); }
.hero { display: flex; gap: 16px; align-items: center; } .hero img { width: 104px; height: 104px; object-fit: contain; flex: none; }
.banner { border-radius: 20px; padding: 18px 20px; margin-bottom: 14px; font-weight: 700; font-size: 18px; }
.banner.blue { background: var(--blue); } .banner.green { background: var(--green); }
.plist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.plist a { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--hairline); box-shadow: 0 4px 0 var(--hairline); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; margin-bottom: 4px; }
.plist a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--hairline); }
.plist a span { font-size: 14px; color: var(--muted); font-weight: 500; }
.form { display: grid; gap: 10px; } .form .row { display: flex; gap: 10px; flex-wrap: wrap; }
.form input, .form select { min-height: 52px; padding: 0 14px; border: 2px solid var(--hairline); border-radius: 12px; background: var(--canvas); font: 500 17px var(--font-sans); color: var(--ink); flex: 1; min-width: 120px; }
.form input:focus, .form select:focus { border-color: var(--blue-deep); background: var(--surface); outline: none; }
.err { background: var(--red-tint); color: var(--red-deep); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-bottom: 4px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; }
.kpi { background: var(--canvas); border-radius: 14px; padding: 12px 14px; } .kpi b { display: block; font-size: 26px; line-height: 1.2; } .kpi span { font-size: 13px; color: var(--muted); }
.lv { display: grid; grid-template-columns: 64px 1fr 112px; gap: 10px; align-items: center; margin: 10px 0; font-size: 15px; }
.lv .track { height: 15px; background: var(--hairline); border-radius: 540px; overflow: hidden; } .lv .track div { height: 100%; background: var(--blue); border-radius: 540px; }
.lv .num { text-align: right; font-weight: 700; } .lv small { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 540px; background: var(--canvas); font-size: 15px; } .chips li b { font-weight: 700; letter-spacing: .02em; }
.chips li.weak { background: var(--red-tint); color: var(--red-deep); } .chips li.strong { background: var(--green-tint); color: var(--green-deep); }
.note { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr 1fr; } .lv { grid-template-columns: 52px 1fr 96px; } }
/* 그림이 없는 보기(한글 뜻): 낮은 칸 */
.pic.text { aspect-ratio: auto; min-height: 92px; }

/* ── 오늘의 미션(연습 모드): 새 단어 카드, 문장 빈칸, 도움 ── */
header.solve .phase { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 44px; text-align: right; }
.wordcard { text-align: center; }
.cardpic { width: 200px; height: 200px; margin: 6px auto 0; display: flex; align-items: center; justify-content: center; }
.cardpic img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cardko { font-size: 20px; font-weight: 700; color: var(--body); }
.examples { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); display: grid; gap: 12px; }
.example { display: flex; gap: 12px; align-items: center; }
.example .en, .hintbox .en { font-size: 19px; font-weight: 700; }
.example .ko, .hintbox .ko { font-size: 15px; color: var(--body); }
.sentence { text-align: center; font: 700 28px/1.5 var(--font-sans); margin: 20px 0 4px; }
.gapbox { display: inline-block; width: 88px; height: 34px; border-bottom: 4px solid var(--blue-deep); border-radius: 6px 6px 0 0; background: var(--blue-tint); vertical-align: -6px; margin: 0 4px; }
.sentko { text-align: center; font-size: 16px; color: var(--body); }
.wordchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.wordpick { min-height: 72px; } .wordpick .lab { font-size: 26px; letter-spacing: .03em; }
.hintbox { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--blue-tint); color: var(--ink); font-size: 16px; }
.hintbox[hidden] { display: none; }
.hintbox b { color: var(--blue-deep); margin-right: 6px; } .hintbox .hl { font-weight: 700; font-size: 20px; letter-spacing: .03em; }
.sheet .anko { font-size: 15px; color: var(--body); letter-spacing: 0; } .sheet .exko { font-size: 14px; color: var(--body); }
.btn[hidden] { display: none; }
@media (min-width: 900px) { .wordchoices { grid-template-columns: repeat(4, 1fr); } }

/* ── 로그인·보호자·관리자 화면 ── */
.topbar { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.topbar .in { max-width: 1112px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar .brand { padding: 14px 0; }
.topbar nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 6px 0; }
.topbar nav a { color: var(--body); font-weight: 700; font-size: 15px; text-decoration: none; padding: 8px 2px; }
.topbar nav a:hover { color: var(--blue-deep); }
.linkbtn { border: none; background: none; color: var(--muted); font: 700 14px var(--font-sans); cursor: pointer; padding: 8px 2px; text-decoration: none; }
.rowhead { display: flex; align-items: center; justify-content: space-between; }
.wrap.wide { max-width: 1112px; }
.pagetitle { font-size: 24px; margin: 20px 0 14px; }
.wrap.auth { padding-top: 24px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; color: var(--body); }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form label.check input { flex: none; min-height: 0; width: 20px; height: 20px; margin-top: 3px; min-width: 0; }
.form.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.form.inline input { flex: 1; min-height: 44px; } .form.inline .btn { flex: none; min-height: 44px; }
.form.setrow { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 14px; } .form.setrow .btn { flex: none; min-height: 52px; }
.okmsg { background: var(--green-tint); color: var(--green-deep); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.btn.danger { background: var(--red-tint); border-color: var(--red-tint); color: var(--red-deep); box-shadow: 0 4px 0 #f5c4bf; }
.dangertext { color: var(--red-deep); }
.streak { font-weight: 700; color: var(--yellow-deep); background: var(--yellow-tint); border-radius: 12px; padding: 8px 12px; display: inline-block; margin-top: 10px; }
.kpis.four { grid-template-columns: repeat(4, 1fr); } .kpis.six { grid-template-columns: repeat(6, 1fr); }
.kpi b small { font-size: 14px; color: var(--muted); font-weight: 500; }
.shead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .sname { font-size: 20px; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 540px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); }
.chip.green { background: var(--green); } .chip.blue { background: var(--blue); } .chip.gray { background: var(--canvas); color: var(--body); border: 1px solid var(--hairline); }
.card.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.radar svg { width: 100%; max-width: 380px; display: block; margin: 0 auto; font-family: var(--font-sans); }
.lv { grid-template-columns: 92px 1fr 112px; }
.lv .track div.weak { background: var(--red); } .lv .track div.strong { background: var(--green); }
.daybars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; }
.daybar { text-align: center; font-size: 12px; color: var(--muted); } .daybar b { display: block; font-size: 13px; color: var(--ink); min-height: 18px; }
.daybar .col { height: 90px; display: flex; align-items: flex-end; background: var(--canvas); border-radius: 8px; overflow: hidden; }
.daybar .col div { width: 100%; background: var(--blue); border-radius: 8px 8px 0 0; min-height: 0; } .daybar .col div.mission { background: var(--green); }
.tablecard { padding: 0; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; } .tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.tbl th { font-size: 13px; color: var(--muted); background: var(--canvas); } .tbl tr:last-child td { border-bottom: none; }
.tbl .acts a { color: var(--blue-deep); font-weight: 700; margin-right: 8px; }
form.mini { display: inline-flex; gap: 6px; align-items: center; } form.mini input { min-height: 34px; padding: 0 8px; border: 1px solid var(--hairline); border-radius: 8px; font: 500 14px var(--font-sans); }
form.mini button { min-height: 34px; padding: 0 10px; border-radius: 540px; border: 1px solid var(--hairline); background: var(--surface); font: 700 13px var(--font-sans); cursor: pointer; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; } .filters .gap { width: 12px; } .filters .form.inline { margin: 0; }
.wcard { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 16px; }
.wpic { width: 150px; height: 150px; background: var(--canvas); border-radius: 12px; display: flex; align-items: center; justify-content: center; text-align: center; }
.wpic img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.whead b { font-size: 24px; letter-spacing: .02em; } .whead span { margin-left: 6px; } .wrow { margin-top: 6px; }
.playbtn { min-height: 32px; padding: 0 12px; border-radius: 540px; border: 2px solid var(--hairline); background: var(--surface); font: 700 13px var(--font-sans); cursor: pointer; margin-left: 4px; }
.playbtn:active { background: var(--blue-fill); border-color: var(--blue-fill); }
.wform { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline); font-size: 14px; font-weight: 700; }
.wform select, .wform input { min-height: 40px; padding: 0 10px; border: 2px solid var(--hairline); border-radius: 10px; font: 500 15px var(--font-sans); background: var(--surface); }
.wform input { flex: 1; min-width: 140px; } .wform .btn { flex: none; min-height: 40px; }
.pager { align-items: center; justify-content: center; }
.legal h2 { margin-top: 18px; }
@media (max-width: 760px) { .card.two { grid-template-columns: 1fr; } .kpis.four, .kpis.six { grid-template-columns: 1fr 1fr; } .wcard { grid-template-columns: 1fr; } .wpic { width: 120px; height: 120px; } }
