:root {
  --primary: #DFA3A0; --primary-deep: #C98A87; --primary-soft: #F9E9E7;
  --bg: #FBF6F4; --surface: #FFFFFF; --beige: #F3E9E4; --line: #F0E4E0;
  --done: #A8C3A0; --makeup: #B9A9D1; --absent: #EBA59A; --cancel: #F2D7A6;
  --text: #4A3F3F; --sub: #9C8E8C;
  --shadow: 0 2px 14px rgba(201, 138, 135, .09);
  --tabbar-h: 64px;
  --gutter: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em; -webkit-text-size-adjust: 100%; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app { max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) calc(var(--gutter) + env(safe-area-inset-right))
           calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 40px) calc(var(--gutter) + env(safe-area-inset-left));
}
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* 머리말 */
.eyebrow { margin: 0 0 10px; font-size: 14px; color: var(--sub); font-weight: 500; }
h1 { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 700; }
h1 em { font-style: normal; color: var(--primary-deep); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 36px 2px 14px; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.section-head span { font-size: 13px; color: var(--sub); }
.muted { color: var(--sub); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -12px 0 8px -6px; padding: 0 6px;
  font-size: 15px; font-weight: 600; color: var(--sub); }

/* 카드·아바타·칩 */
.card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow); text-align: left; transition: transform .15s ease; }
a.card:active, button.card:active { transform: scale(.98); }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--primary);
  display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; }
.avatar.big { width: 64px; height: 64px; font-size: 24px; }
.info { flex: 1; min-width: 0; }
.info b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.info > span { font-size: 13px; color: var(--sub); }
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.scheduled { background: var(--beige); color: var(--sub); }
.chip.done { background: #E9F1E6; color: #6E9466; }
.chip.absent { background: #FBE8E4; color: #C9776A; }
.chip.cancelled { background: #FBF1DF; color: #B8924A; }
.chip.makeup, .chip.extra { background: #EEE8F6; color: #8E7BB0; }
.chip.skipped { background: transparent; color: #C2B5B2; border: 1px dashed #E3D6D2; }

/* 학생 목록 */
.list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.count { flex: none; text-align: right; min-width: 64px; }
.count strong { font-size: 22px; font-weight: 800; }
.count small { font-size: 14px; color: var(--sub); font-weight: 600; }
.bar { display: block; height: 6px; border-radius: 3px; background: #F1E6E3; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--primary); }
.count .chip { margin-top: 6px; }
.empty { margin-top: 48px; padding: 36px 24px; text-align: center; border-radius: 24px; background: var(--surface); }
.empty p { margin: 0 0 20px; color: var(--sub); line-height: 1.6; }
details.left { margin-top: 32px; }
details.left summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center;
  font-size: 14px; font-weight: 600; color: var(--sub); }
details.left summary::-webkit-details-marker { display: none; }
details.left summary::after { content: "›"; margin-left: 6px; transition: transform .2s; }
details.left[open] summary::after { transform: rotate(90deg); }
details.left .card { opacity: .7; box-shadow: none; }

.fab { position: fixed; z-index: 9; width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: #fff;
  right: max(calc(50% - 280px + var(--gutter)), calc(var(--gutter) + env(safe-area-inset-right)));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
  box-shadow: 0 6px 18px rgba(201, 138, 135, .35); display: grid; place-items: center; }
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(.94); }

/* 학생 상세 */
.profile { display: flex; align-items: center; gap: 16px; }
.profile h1 { font-size: 24px; }
.profile p { margin: 2px 0 0; color: var(--sub); font-size: 14px; }
.rows { margin-top: 24px; display: block; padding: 4px 18px; }
.rows .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.rows .row + .row { border-top: 1px solid var(--line); }
.rows .row > span { font-size: 14px; color: var(--sub); flex: none; }
.rows .row > b { font-size: 15px; font-weight: 600; text-align: right; }
.link-btn { min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-deep);
  font-size: 13px; font-weight: 700; flex: none; }
.lessons { list-style: none; margin: 0; padding: 4px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.lessons li { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.lessons li + li { border-top: 1px solid var(--line); }
.lessons .d { font-weight: 600; font-size: 15px; width: 84px; flex: none; }
.lessons .t { color: var(--sub); font-size: 14px; flex: 1; }
.lessons li.is-skipped .d, .lessons li.is-skipped .t { color: #C9BDBA; text-decoration: line-through; }
.foot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }

/* 버튼 */
.btn { min-height: 56px; border-radius: 18px; font-size: 16px; font-weight: 700; padding: 0 20px; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:disabled { opacity: .5; }
.btn.ghost { background: var(--beige); color: var(--sub); }
.btn.soft { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn.danger { background: #FBE8E4; color: #C9776A; }
.btn.block { width: 100%; }

/* 폼 */
.form h3 { margin: 0 0 4px; font-size: 20px; }
.form .desc { margin: 0 0 6px; color: var(--sub); font-size: 14px; line-height: 1.5; }
.field { display: block; margin-top: 18px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 8px 4px; }
.input { width: 100%; min-height: 52px; border: 0; border-radius: 16px; background: var(--bg); padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
.input:focus { box-shadow: 0 0 0 2px #F0D3D1; }
.input::-webkit-date-and-time-value { text-align: left; }
input[type="date"].input, input[type="time"].input { display: flex; align-items: center; }
.suffix { position: relative; }
.suffix::after { content: attr(data-suffix); position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--sub); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; min-height: 48px; border-radius: 14px; background: var(--bg);
  font-size: 15px; font-weight: 600; color: var(--sub); transition: background .15s, color .15s; }
.seg input:checked + span { background: var(--primary); color: #fff; }
.seg input:focus-visible + span { box-shadow: 0 0 0 2px var(--primary-deep); }
.form .btn.block { margin-top: 26px; }
.form-error { margin: 14px 4px 0; color: #C9776A; font-size: 14px; }

/* 탭바 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--beige); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: #BFB2B0; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--primary-deep); }
.tab.on svg { background: var(--primary-soft); border-radius: 12px; padding: 3px 12px; box-sizing: content-box; margin: -3px 0; }

/* 바텀시트 */
.scrim { position: fixed; inset: 0; background: rgba(74, 63, 63, .25); opacity: 0; pointer-events: none;
  transition: opacity .2s ease; z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 28px 28px 0 0;
  padding: 12px calc(var(--gutter) + env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 24px) calc(var(--gutter) + env(safe-area-inset-left));
  transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
#sheetWrap.open .scrim { opacity: 1; pointer-events: auto; }
#sheetWrap.open .sheet { transform: none; }
.handle { width: 40px; height: 5px; border-radius: 3px; background: #EADCD8; margin: 0 auto 18px; }

/* 토스트 */
.toast { position: fixed; left: 50%; z-index: 30; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 20px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: var(--text); color: #fff; font-size: 14px; font-weight: 600; padding: 12px 18px; border-radius: 999px;
  max-width: calc(100% - 44px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 잠금 화면 */
.lock { min-height: calc(100dvh - env(safe-area-inset-top) - 120px); display: flex; flex-direction: column; justify-content: center; text-align: center; }
.lock img { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 22px; box-shadow: var(--shadow); }
.lock h1 { font-size: 24px; }
.lock p { margin: 10px 0 30px; color: var(--sub); line-height: 1.6; font-size: 15px; }
.lock form { display: grid; gap: 12px; text-align: left; }
.lock .input { background: var(--surface); box-shadow: var(--shadow); text-align: center; }

/* 준비 중 */
.soon { margin-top: 24px; padding: 40px 24px; text-align: center; border-radius: 24px; background: var(--surface); color: var(--sub); line-height: 1.6; }

/* ── 오늘 ─────────────────────────────── */
.banner { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 24px;
  padding: 16px 18px; border-radius: 20px; background: #F1ECF7; text-align: left; }
.banner .ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--makeup);
  display: grid; place-items: center; color: #fff; }
.banner .ico svg { width: 22px; height: 22px; }
.banner .txt { flex: 1; min-width: 0; }
.banner b { display: block; font-size: 16px; }
.banner .txt span { display: block; font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner .dday { flex: none; font-size: 13px; font-weight: 700; color: #8E7BB0; background: #fff; padding: 6px 10px; border-radius: 999px; }
.banner.urgent { background: #FBE8E4; }
.banner.urgent .ico { background: var(--absent); }
.banner.urgent .dday { color: #C9776A; }

.next { margin-top: 12px; padding: 18px 20px; border-radius: 20px; background: var(--beige);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next small { display: block; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.next b { font-size: 16px; }
.next .left { text-align: right; flex: none; }
.next .left strong { display: block; font-size: 22px; color: var(--primary-deep); font-weight: 700; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 46px; top: 12px; bottom: 12px; border-left: 2px dotted #E8D9D4; }
.item { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; position: relative; }
.time { width: 40px; flex: none; text-align: right; }
.time b { display: block; font-size: 16px; font-weight: 700; }
.time span { font-size: 11px; color: var(--sub); }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--primary);
  border: 3px solid var(--bg); box-sizing: content-box; margin-left: -9px; z-index: 1; }
.item .card { flex: 1; min-width: 0; min-height: 78px; padding: 14px 16px; }
.item .info .chip { margin-left: 4px; vertical-align: 1px; }
.item .info b .chip { margin-left: 6px; vertical-align: 2px; }
.pips { display: flex; gap: 3px; justify-content: flex-end; margin-top: 4px; }
.pips i { width: 6px; height: 6px; border-radius: 50%; background: #EEE3DF; }
.pips i.on { background: var(--primary); }
.item.done .card, .item.absent .card, .item.cancelled .card, .item.skipped .card { box-shadow: none; background: rgba(255,255,255,.6); }
.item.done .avatar { background: var(--done); }
.item.absent .avatar { background: var(--absent); }
.item.cancelled .avatar { background: var(--cancel); }
.item.skipped .card { opacity: .6; }
.now { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px 36px; }
.now i { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); border: 4px solid #F7E3E1; flex: none; z-index: 1; }
.now span { font-size: 12px; font-weight: 700; color: var(--primary-deep); }
.now hr { flex: 1; border: 0; border-top: 1.5px solid #F0D3D1; margin: 0; }

/* ── 수업 시트 ─────────────────────────── */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.act { height: 92px; border-radius: 20px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; border: 2px solid transparent; }
.act svg { width: 28px; height: 28px; }
.act.done { background: #E9F1E6; color: #6E9466; }
.act.absent { background: #FBE8E4; color: #C9776A; }
.act.cancelled { background: #FBF1DF; color: #B8924A; }
.act.on { border-color: currentColor; }
.act:active { transform: scale(.96); }
.sheet .btn.block { margin-top: 12px; }
.text-btn { display: block; width: 100%; min-height: 48px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--sub); }
.note-box { margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--bg); color: var(--sub); font-size: 14px; line-height: 1.5; }
.hint { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--sub); }
.row-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 20px; }
.input.area { min-height: 130px; padding: 16px; margin-top: 14px; resize: none; line-height: 1.5; }
.switch { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 16px; border-radius: 16px; background: var(--bg); cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { flex: none; position: relative; width: 50px; height: 30px; border-radius: 15px; background: #E7DAD6; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .2s; }
.switch input:checked + .track { background: var(--makeup); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 2px var(--primary-deep); }
.switch b { display: block; font-size: 15px; }
.switch small { font-size: 13px; color: var(--sub); }
.toast { white-space: pre-line; line-height: 1.5; border-radius: 20px; }

/* 학생 상세 수업 목록: 줄 전체가 버튼 */
.lessons li { padding: 0; }
.lessons li > button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 54px; text-align: left; }
.short-note { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: #FBF1DF; color: #B8924A; font-size: 14px; font-weight: 600; }

/* 입시/취미 구분 칩 */
h1 .chip, .info b .chip { margin-left: 6px; vertical-align: 3px; }
h1 .chip { font-size: 12px; vertical-align: 5px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 과목: 많아지면 줄바꿈 */
.seg.wrap { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.subject-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.subject-list li { display: flex; align-items: center; gap: 10px; }
.subject-list .muted { flex: none; width: 44px; text-align: center; font-size: 13px; }
.subject-list .link-btn { width: 44px; padding: 0; }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 18px; }
.add-row .btn { min-height: 52px; border-radius: 16px; }
/* + 버튼이 마지막 카드를 가리지 않게 */
.app:has(.fab) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 110px); }

/* 입시/취미 색 구분 */
.k-exam { --kc: #DFA3A0; --kc-soft: #F9E9E7; --kc-text: #C98A87; }
.k-hobby { --kc: #9DBBD0; --kc-soft: #E6EFF5; --kc-text: #6F93AB; }
.k-exam .avatar, .k-hobby .avatar, .k-exam.profile .avatar, .k-hobby.profile .avatar { background: var(--kc); }
.k-exam .dot, .k-hobby .dot { background: var(--kc); }
.chip.kind { background: var(--kc-soft, var(--beige)); color: var(--kc-text, var(--sub)); }
.kdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--kc); margin-right: 8px; vertical-align: 1px; }

/* ── 보강 ─────────────────────────────── */
.list.tight { margin-top: 0; }
button.card { width: 100%; }
.due { flex: none; font-size: 13px; font-weight: 700; color: #8E7BB0; background: #F1ECF7; padding: 6px 10px; border-radius: 999px; }
.due.urgent { color: #C9776A; background: #FBE8E4; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slots .muted { grid-column: 1 / -1; font-size: 14px; padding: 4px; }
.slot { min-height: 48px; border-radius: 14px; background: var(--bg); font-size: 15px; font-weight: 600; color: var(--text); }
.slot.on { background: var(--primary); color: #fff; }
.text-btn.danger { color: #C9776A; }
/* 보강 대기 카드 옆 삭제 버튼 */
.with-del { display: flex; gap: 8px; }
.with-del .card { flex: 1; min-width: 0; }
.del { flex: none; width: 60px; border-radius: 20px; background: #FBE8E4; color: #C9776A; font-size: 14px; font-weight: 700; }
.del:active { transform: scale(.96); }

/* ── 주간 ─────────────────────────────── */
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wk-title { text-align: center; }
.wk-title .eyebrow { margin-bottom: 4px; }
.wk-title h1 { font-size: 22px; }
.nav { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); font-size: 26px; color: var(--sub); line-height: 1; }
.this-week { display: block; margin: 12px auto 0; }
.grid { display: grid; grid-template-columns: 30px repeat(var(--cols), minmax(0, 1fr)); column-gap: 4px; margin-top: 20px;
  touch-action: pan-y; }
.col-head { text-align: center; padding: 6px 0 10px; border-radius: 14px; }
.col-head small { display: block; font-size: 12px; color: var(--sub); }
.col-head b { font-size: 17px; }
.col-head.today { background: var(--primary-soft); color: var(--primary-deep); }
.col-head.today small { color: var(--primary-deep); }
.hours { position: relative; }
.hours span { position: absolute; right: 2px; transform: translateY(-50%); font-size: 11px; color: var(--sub); }
.hours span:first-child { transform: none; }
.day { position: relative; border-radius: 12px; cursor: pointer;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)), rgba(255,255,255,.5); }
.blk { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden;
  padding: 4px 5px; border-radius: 10px; text-align: left; font-size: 12px; line-height: 1.25;
  background: var(--kc-soft); border-left: 3px solid var(--kc); color: var(--text); }
.blk b { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.blk span { font-size: 11px; color: var(--sub); }
.blk i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--sub); }
.blk:active { transform: scale(.97); }
.blk.s-done { background: #E9F1E6; border-left-color: var(--done); }
.blk.s-done i { color: #6E9466; }
.blk.s-absent { background: #FBE8E4; border-left-color: var(--absent); }
.blk.s-absent i { color: #C9776A; }
.blk.s-cancelled { background: #FBF1DF; border-left-color: var(--cancel); }
.blk.s-cancelled i { color: #B8924A; }
.blk.s-absent b, .blk.s-cancelled b { text-decoration: line-through; opacity: .7; }
.blk.s-skipped { background: transparent; border: 1px dashed #E3D6D2; color: #C2B5B2; }
.blk.s-skipped b { color: #C2B5B2; }
.blk.t-makeup, .blk.t-extra { box-shadow: inset 0 0 0 1.5px var(--makeup); }
.blk.t-makeup i, .blk.t-extra i { color: #8E7BB0; }
.now-line { position: absolute; left: -2px; right: -2px; border-top: 2px solid var(--primary-deep); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-deep); }
.wk .hint { margin-top: 16px; }
.sub-head { margin: 18px 0 8px 4px; font-size: 13px; font-weight: 600; color: var(--sub); }
.pick-list { display: grid; gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 16px; background: #F1ECF7; text-align: left; }
.pick b { font-size: 15px; }
.pick span { font-size: 13px; color: var(--sub); }
.blk > * { flex: none; max-width: 100%; }

/* ── 수입 ─────────────────────────────── */
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--sub); background: var(--surface); box-shadow: var(--shadow); flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.pay-card { margin-top: 24px; padding: 24px 22px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #E9B6B2 0%, #D3928E 100%); box-shadow: 0 8px 24px rgba(201, 138, 135, .3); }
.pay-card small, .stack small { display: block; font-size: 13px; font-weight: 600; opacity: .9; }
.pay-card strong { display: block; margin: 8px 0 6px; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.pay-card span { font-size: 13px; opacity: .9; }
.stack { display: block; margin-top: 12px; padding: 20px 22px; }
.stack small { color: var(--sub); opacity: 1; }
.stack strong { display: block; margin: 6px 0 4px; font-size: 26px; font-weight: 800; color: var(--primary-deep); }
.stack span { font-size: 13px; color: var(--sub); }
.months { display: grid; gap: 10px; }
.month { display: block; padding: 0; }
.month summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px; padding: 14px 18px; cursor: pointer; }
.month summary::-webkit-details-marker { display: none; }
.month .m { font-size: 16px; font-weight: 700; }
.month .v { text-align: right; }
.month .v strong { display: block; font-size: 20px; font-weight: 800; }
.month .v small { font-size: 12px; color: var(--sub); }
.calc { margin: 0 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.calc div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.calc dt { color: var(--sub); }
.calc dd { margin: 0; font-weight: 600; }
.calc .sum { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.calc .sum dt, .calc .sum dd { color: var(--primary-deep); font-weight: 800; }
.fees { list-style: none; margin: 0 18px 14px; padding: 10px 14px; border-radius: 16px; background: var(--bg); }
.fees li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.fees li + li { border-top: 1px solid var(--line); }
.fees b { font-weight: 700; }
.fees .chip { margin: 0 6px; }
.fees small { color: var(--sub); }

/* ── 진도 메모 타임라인 ─────────────────── */
.notes { list-style: none; margin: 0; padding: 0 0 0 14px; position: relative; }
.notes::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; border-left: 2px dotted #E8D9D4; }
.notes-month { margin: 18px 0 8px -14px; font-size: 13px; font-weight: 700; color: var(--sub); }
.notes-month:first-child { margin-top: 0; }
.notes li:not(.notes-month) { position: relative; margin-bottom: 10px; }
.notes li:not(.notes-month)::before { content: ""; position: absolute; left: -14px; top: 18px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg); box-sizing: content-box; transform: translateX(-1px); }
.notes button { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.notes .when { display: block; font-size: 13px; font-weight: 700; color: var(--primary-deep); margin-bottom: 6px; }
.notes p { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }

/* ── 다듬기 ─────────────────────────────── */
.app.enter { animation: fade .22s ease; }
.app.wide { max-width: 960px; }
/* 한 손 조작: 길게 눌러도 글자 선택·메뉴가 뜨지 않고, 두 번 탭 확대도 막는다 */
button, a, .tab, summary, .day { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--primary-deep); outline-offset: 2px; border-radius: 12px; }
.input:focus-visible { outline: none; }
@media (hover: hover) {
  .card:hover, .blk:hover, .pick:hover, .slot:hover, .notes button:hover { filter: brightness(.985); }
  .tab:hover { color: var(--primary-deep); }
}
@media (min-width: 720px) {
  .grid { column-gap: 8px; }
  .blk b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
