/* 입증러 연습장 — 책 본문과 같은 색·모양 (남색 #1D285A · 라임 #E1E340 · 하늘색 #CBE1F6 · 빨간 단추 #E0362C) */
@import url("../assets/fonts/pretendard/pretendardvariable-dynamic-subset.css");
:root { --n: #1D285A; --l: #E1E340; --s: #CBE1F6; --r: #E0362C; --c: #1D285A; --t: #CBE1F6; --ink: #1c2233; --sub: #5D749F; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: var(--ink); background: #EEF3FA; line-height: 1.55; word-break: keep-all; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #fff; padding-bottom: 86px; position: relative; }

/* 위 띠 */
.bar { background: var(--n); color: #fff; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.bar a.logo img { height: 22px; display: block; filter: brightness(0) invert(1); }
.bar span { font-size: 13px; font-weight: 700; color: var(--l); }

/* 아래 메뉴 */
.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; background: #fff; border-top: 1px solid #DCE4F2; display: grid; grid-template-columns: repeat(5, 1fr); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.nav button { padding: 9px 0 10px; font-size: 12px; font-weight: 700; color: #8A96B4; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.nav button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav button.on { color: var(--n); }

.view { padding: 22px 20px 10px; }
.pill { display: inline-block; background: var(--l); color: var(--n); border-radius: 99px; padding: 3px 13px; font-size: 13px; font-weight: 800; }
h1 { font-size: 28px; font-weight: 900; letter-spacing: -.02em; line-height: 1.25; color: var(--n); margin-top: 12px; }
h1 u, .hl { text-decoration: underline; text-decoration-color: var(--l); text-decoration-thickness: .5em; text-underline-offset: -.22em; text-decoration-skip-ink: none; }
h2 { font-size: 17px; font-weight: 800; color: var(--n); margin: 26px 0 10px; }
.lead { font-size: 15px; color: #333; margin-top: 8px; }
.note { font-size: 13px; color: #555; margin-top: 10px; }

/* 상자 — 책의 2·3·4단계 상자와 같은 모양 */
.box { border-radius: 14px; padding: 16px 18px 17px; margin-top: 12px; }
.b1 { background: var(--t); }
.b2 { background: color-mix(in srgb, var(--t) 32%, #fff); }
.b3 { background: color-mix(in srgb, var(--t) 78%, #fff); }
.b4 { background: var(--c); color: #fff; }
.pen { background: #FFF8D6; }
.hd { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--c); }
.hd b { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 13px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.b1 .hd b, .b4 .hd b { background: var(--l); color: var(--n); }
.b4 .hd { color: #fff; }
.hd small { font-size: 12.5px; font-weight: 600; color: var(--sub); margin-left: 2px; }
.b4 .hd small { color: rgba(255,255,255,.75); }
.box p { font-size: 15px; margin-top: 8px; }
.box p.q, .q { font-size: 21px; font-weight: 800; color: var(--c); line-height: 1.4; margin-top: 10px; }
.b4 p.q, .b4 .q { color: #fff; }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 99px; padding: 10px 18px; font-size: 15px; font-weight: 800; background: var(--n); color: #fff; }
.btn.line { background: #fff; color: var(--n); box-shadow: inset 0 0 0 1.6px var(--n); }
.btn.red { background: var(--r); }
.btn.lime { background: var(--l); color: var(--n); }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }
.btn[disabled] { opacity: .45; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

/* 체크 */
.chk { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.4px #C9D6EC; font-size: 15px; font-weight: 700; color: var(--n); margin-top: 8px; }
.chk i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1.8px var(--n); flex: none; display: inline-flex; align-items: center; justify-content: center; }
.chk.on { background: var(--n); color: #fff; box-shadow: none; }
.chk.on i { background: var(--l); box-shadow: none; }
.chk.on i::after { content: ""; width: 10px; height: 6px; border-left: 2.6px solid var(--n); border-bottom: 2.6px solid var(--n); transform: rotate(-45deg) translate(1px, -1px); }
.chk.wb.on { background: var(--r); }

/* 오늘 카드 */
.today { border-radius: 18px; background: var(--c); color: #fff; padding: 20px 20px 22px; margin-top: 14px; }
.today .day { font-size: 13.5px; font-weight: 700; color: var(--l); }
.today .no { font-size: 54px; font-weight: 900; color: var(--l); line-height: 1; margin-top: 6px; }
.today h3 { font-size: 22px; font-weight: 800; line-height: 1.3; margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags span { background: var(--l); color: var(--n); border-radius: 99px; padding: 2px 11px; font-size: 12.5px; font-weight: 800; }
.today { display: flex; align-items: center; gap: 14px; }
.today .ti { flex: 1; min-width: 0; }
/* 이야기 열기: 남색 카드 안 오른쪽의 큰 동그라미 */
.today .open { flex: none; width: 108px; height: 108px; border-radius: 50%; background: var(--l); color: var(--n); font-size: 19px; font-weight: 900; line-height: 1.2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.today .open i { font-style: normal; font-size: 20px; line-height: 1; margin-top: 3px; }
.today .open:active { transform: scale(.96); }
@media (max-width: 360px) { .today .open { width: 92px; height: 92px; font-size: 17px; } }

/* 이야기 머리 */
.shead { background: var(--c); color: #fff; padding: 22px 20px 24px; }
.shead .back { font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.8); }
.shead .no { font-size: 50px; font-weight: 900; color: var(--l); line-height: 1; margin-top: 12px; }
.shead h1 { color: #fff; font-size: 25px; margin-top: 10px; }
.pn { display: flex; justify-content: space-between; margin-top: 18px; }

/* 녹음 */
.rec { margin-top: 12px; }
.rec .btn.go { background: var(--r); color: #fff; }
.rec .btn.go.live { background: #fff; color: var(--r); box-shadow: inset 0 0 0 2px var(--r); }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.rec .live .dot { animation: bl 1s infinite; }
@keyframes bl { 50% { opacity: .25; } }
.rec audio { width: 100%; margin-top: 10px; height: 40px; }
.rec .sub { font-size: 12.5px; color: var(--sub); margin-top: 6px; }
.b4 .rec .sub { color: rgba(255,255,255,.8); }
.b4 .btn.line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.6px rgba(255,255,255,.8); }
.mp3 { background: #fff; border-radius: 12px; padding: 12px 14px; margin-top: 12px; color: var(--n); }
.mp3 b { font-size: 14px; font-weight: 800; display: block; }
.mp3 audio { width: 100%; margin-top: 8px; height: 40px; }
.mp3 .soon { font-size: 13.5px; color: var(--sub); margin-top: 4px; }

/* 얼굴 세 개 */
.feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.feel button { background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 4px; font-size: 13px; font-weight: 700; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.feel button.on { background: var(--l); color: var(--n); }
.feel svg { width: 30px; height: 30px; }

/* 목록 */
.grp { margin-top: 22px; }
.grp > b { display: flex; align-items: center; gap: 8px; background: var(--c); color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 15px; font-weight: 800; }
.grp > b i { font-style: normal; color: var(--l); font-weight: 900; font-size: 18px; }
.item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 4px; border-bottom: 1px solid #E3EAF5; }
.item .n { font-size: 17px; font-weight: 900; color: var(--c); font-variant-numeric: tabular-nums; }
.item .tt { font-size: 15.5px; font-weight: 700; color: #111; line-height: 1.35; }
.item .tt small { display: block; font-size: 12.5px; font-weight: 700; color: var(--c); margin-top: 2px; }
.item .st { font-size: 12px; font-weight: 800; border-radius: 99px; padding: 2px 9px; background: #EEF3FA; color: #8A96B4; white-space: nowrap; }
.item .st.done { background: var(--c); color: #fff; }
.item .st.part { background: var(--t); color: var(--c); }

/* 지도 */
.map { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-top: 8px; }
.cell { aspect-ratio: 1; border-radius: 10px; background: color-mix(in srgb, var(--t) 45%, #fff); color: var(--c); font-size: 17px; font-weight: 900; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cell.part { background: var(--t); }
.cell.done { background: var(--c); color: var(--l); }
.prog { height: 12px; border-radius: 99px; background: #E3EAF5; overflow: hidden; margin-top: 12px; }
.prog i { display: block; height: 100%; background: var(--n); border-radius: 99px; }
.station { font-size: 13.5px; font-weight: 800; color: var(--c); margin-top: 16px; }

/* 증서 */
.cert { border-radius: 18px; background: var(--n); color: #fff; padding: 30px 22px; text-align: center; margin-top: 14px; }
.cert .k { color: var(--l); font-weight: 800; font-size: 14px; letter-spacing: .12em; }
.cert h3 { font-size: 30px; font-weight: 900; margin-top: 10px; }
.cert .nm { font-size: 24px; font-weight: 900; color: var(--l); margin-top: 18px; }
.cert p { font-size: 15px; margin-top: 12px; color: #E3EAF5; }
.cert .dt { font-size: 13px; margin-top: 16px; color: #C9D6F0; }
.field { width: 100%; border-radius: 12px; padding: 12px 14px; font-size: 16px; box-shadow: inset 0 0 0 1.6px #C9D6EC; border: 0; background: #fff; margin-top: 8px; }
.lock { border-radius: 14px; background: #F4F7FC; padding: 16px 18px; font-size: 14.5px; color: #555; margin-top: 10px; }

/* 맨 아래 안내: 본문과 다른 톤(연한 바탕, 연한 글자). 첫 줄 '이 기기에만 저장돼요'만 또렷하게 */
.foot { margin-top: 28px; padding: 20px 20px 22px; background: #F6F8FC; border-top: 1px solid #E3EAF5; font-size: 12.5px; line-height: 1.65; color: #9AA5BD; }
.foot p + p { margin-top: 7px; }
.foot p b { color: #5D749F; font-weight: 800; }
.foot a { font-weight: 700; color: #5D749F; }
/* 학원 코스 연결: 눈에 들어오게 주황색 */
.foot p.course { color: #E8691E; font-weight: 700; font-size: 13.5px; margin-top: 12px; }
.foot p.course a { display: inline-block; background: #F2762E; color: #fff; border-radius: 99px; padding: 5px 14px; margin: 6px 0 2px; text-decoration: none; font-weight: 800; }
.foot button { font-size: 12px; color: #B4BDD0; text-decoration: underline; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #111; color: #fff; border-radius: 99px; padding: 9px 18px; font-size: 14px; font-weight: 700; z-index: 40; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: .94; }

@media print {
  body { background: #fff; }
  .bar, .nav, .foot, .view > *:not(.cert) { display: none !important; }
  .app { padding: 0; max-width: none; }
  .cert { margin: 0; border-radius: 0; min-height: 60vh; display: flex; flex-direction: column; justify-content: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
