/* 다시플랜 — 따뜻한 종이색 바탕, 세이지 그린, 테라코타 */
:root {
  --bg: #F4F1EA; --bg2: #EDE8DD; --card: #FFFDF9; --line: #E7E1D5; --line2: #DAD3C4;
  --ink: #26323F; --ink2: #555E68; --ink3: #8C918F;
  --sage: #6B8F71; --sage-d: #557A5C; --sage-s: #E4ECE2; --sage-xs: #F0F4EE;
  --terra: #D4855A; --terra-d: #B96C43; --terra-s: #F8E7DC;
  --blue: #3C6E9E; --blue-s: #E3EDF6;
  --r: 20px; --r-s: 14px;
  --sh: 0 1px 2px rgba(38, 50, 63, .04), 0 6px 20px rgba(38, 50, 63, .05);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(107, 143, 113, .45); outline-offset: 2px; border-radius: 10px; }
.faint { color: var(--ink3); } .muted { color: var(--ink2); } .small { font-size: .86rem; } .center { text-align: center; } .mt { margin-top: 12px; }
.green { color: var(--sage-d); } .orange { color: var(--terra-d); } .blue { color: var(--blue); } .gray { color: var(--ink2); } .terra { color: var(--terra-d); }
.warn { color: var(--terra-d); }

/* 로고 */
.logo { display: inline-flex; align-items: flex-end; gap: 3px; width: 32px; height: 32px; padding: 7px 7px 8px; border-radius: 9px; background: var(--ink); flex: none; }
.logo i { display: block; width: 4px; border-radius: 2px; }
.logo i:nth-child(1) { height: 7px; background: #A9C2A6; } .logo i:nth-child(2) { height: 11px; background: #E9E4D8; } .logo i:nth-child(3) { height: 16px; background: var(--terra); }

/* 버튼 · 입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line2); font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover { border-color: var(--ink3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn.primary:hover { background: var(--sage-d); border-color: var(--sage-d); }
.btn.danger { background: var(--terra-d); border-color: var(--terra-d); color: #fff; }
.btn.danger-ghost { color: var(--terra-d); border-color: #EBC9B5; }
.btn.ghost { background: transparent; border-style: dashed; color: var(--ink2); }
.btn.lg { min-height: 54px; font-size: 1.05rem; padding: 0 24px; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .86rem; }
.btn.xs { min-height: 30px; padding: 0 11px; font-size: .78rem; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.busy { opacity: .6; pointer-events: none; }
.linkish { color: var(--ink2); font-weight: 600; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); padding: 4px 2px; }
.linkish:hover { color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.2rem; color: var(--ink2); }
.icon-btn:hover { background: var(--bg2); }
.icon-btn.sm { width: 32px; height: 32px; font-size: .95rem; border-radius: 10px; }
.input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line2); background: #fff; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--sage); box-shadow: 0 0 0 4px rgba(107, 143, 113, .14); }
.input.lg { min-height: 54px; font-size: 1.12rem; font-weight: 600; }
textarea.input { line-height: 1.6; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink3) 50%), linear-gradient(135deg, var(--ink3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 700; font-size: .9rem; color: var(--ink2); margin-bottom: 7px; }
.hint { font-size: .84rem; color: var(--ink3); margin-top: 8px; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; align-items: center; gap: 8px; } .inline .input { text-align: center; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.row-btns.left { justify-content: flex-start; align-items: center; margin-top: 10px; }
.row-btns.wrap { flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--bg2); color: var(--ink2); }
.chip.terra { background: var(--terra-s); color: var(--terra-d); }
.chip.green { background: var(--sage-s); color: var(--sage-d); }
.chip.orange { background: var(--terra-s); color: var(--terra-d); }
.chip.blue { background: var(--blue-s); color: var(--blue); }
.pro { display: inline-block; font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: var(--ink); color: #F0C27B; vertical-align: 2px; }
.pro.big { font-size: .8rem; padding: 4px 9px; }
.seg { display: inline-flex; background: var(--bg2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(38, 50, 63, .1); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg.sm button { min-height: 30px; padding: 0 11px; font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; }
.chip-btn { min-height: 34px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--card); font-size: .86rem; font-weight: 600; color: var(--ink2); }
.chip-btn:hover { border-color: var(--sage); color: var(--sage-d); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.days button { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line2); background: #fff; font-weight: 700; color: var(--ink2); }
.days button.on { background: var(--bg2); border-color: var(--bg2); color: var(--ink3); text-decoration: line-through; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line2); border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button { width: 46px; height: 44px; font-size: 1.3rem; color: var(--ink2); }
.stepper button:hover { background: var(--bg2); }
.stepper b { min-width: 64px; text-align: center; font-size: 1.05rem; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--line2); position: relative; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--sage); } .switch.on i { transform: translateX(20px); }

/* 카드 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); margin-bottom: 14px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h2 { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; }
.empty { color: var(--ink3); font-size: .92rem; padding: 6px 0; }
.tip { font-size: .8rem; color: var(--ink3); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.two { display: grid; grid-template-columns: 1fr; gap: 0; }

/* 로딩 · 토스트 · 모달 */
.loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink3); font-weight: 600; }
.loading .logo { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.9); opacity: .7; } }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-back { position: fixed; inset: 0; background: rgba(38, 50, 63, .36); z-index: 200; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.modal-back.in { opacity: 1; }
.modal { position: relative; background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 24px 24px 0 0; padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .25s; }
.modal-back.in .modal { transform: none; }
.modal.wide { max-width: 640px; }
.modal h2 { font-size: 1.2rem; font-weight: 800; margin: 0 36px 10px 0; letter-spacing: -.02em; }
.modal p { margin-bottom: 10px; line-height: 1.6; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; color: var(--ink3); font-size: 1rem; }
.modal-x:hover { background: var(--bg2); }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 24px; padding: 28px 26px; } }

/* 첫 화면 */
.welcome { max-width: 1080px; margin: 0 auto; padding: 18px 20px 40px; }
.w-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { font-size: 1.12rem; font-weight: 800; }
.brand .faint { font-size: .84rem; }
.w-hero { display: grid; gap: 28px; align-items: center; }
.w-copy h1 { font-size: clamp(2rem, 8vw, 3.1rem); line-height: 1.22; font-weight: 800; letter-spacing: -.035em; }
.w-copy h1 em { font-style: normal; color: var(--sage); }
.w-copy .lead { margin: 16px 0 24px; color: var(--ink2); font-size: 1.05rem; line-height: 1.7; }
.w-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.w-cta .btn { flex: 1 1 160px; }
.mock-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 20px 50px rgba(38, 50, 63, .08); transform: rotate(-1.2deg); }
.mock-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mock-big { font-weight: 700; display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.mock-line { font-size: .9rem; color: var(--ink2); margin: 8px 0; }
.w-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 34px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.feat .fi { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg2); font-size: 1.2rem; margin-bottom: 10px; }
.feat b { display: block; margin-bottom: 4px; }
.feat p { font-size: .86rem; color: var(--ink2); line-height: 1.55; }
.w-foot { margin-top: 30px; text-align: center; }
@media (min-width: 860px) { .w-hero { grid-template-columns: 1.15fr 1fr; gap: 50px; } .w-feats { grid-template-columns: repeat(4, 1fr); } .welcome { padding-top: 26px; } .w-cta .btn { flex: 0 0 auto; } }

/* 여유 은행 칸 */
.bank-row { display: flex; gap: 5px; align-items: center; margin: 6px 0 10px; }
.sq { display: grid; place-items: center; flex: 1 1 0; max-width: 38px; aspect-ratio: 1; border-radius: 8px; font-style: normal; font-size: .72rem; font-weight: 800; }
.sq.s { background: var(--sage-s); }
.sq.b { background: #fff; border: 1.5px solid var(--sage); position: relative; }
.sq.b::after { content: ''; width: 52%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--terra); border-left-color: #fff; border-right-color: #fff; box-sizing: border-box; }
.sq.x { background: var(--terra-s); border: 1.5px dashed var(--terra); color: var(--terra-d); }
.sq.exam { border-radius: 50%; background: var(--terra); color: #fff; font-size: .68rem; max-width: 42px; box-shadow: 0 0 0 4px var(--terra-s); margin-left: 3px; }
.bank-row.sm .sq { max-width: 26px; border-radius: 6px; } .bank-row.sm .sq.exam { max-width: 30px; font-size: .55rem; }
.bank-line { font-size: .92rem; font-weight: 600; }

/* 계획 만들기 */
.setup { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.setup-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.steps { display: flex; gap: 6px; list-style: none; }
.steps li { display: flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700; color: var(--ink3); }
.steps li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--bg2); font-size: .72rem; }
.steps li.on { color: var(--ink); } .steps li.on i { background: var(--ink); color: #fff; }
.steps li.done i { background: var(--sage); color: #fff; }
.steps li span { display: none; } .steps li.on span { display: inline; }
.setup-body { flex: 1; padding: 18px 20px 20px; }
.q { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 22px; line-height: 1.3; }
.setup-foot { position: sticky; bottom: 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.err-line { color: var(--terra-d); font-weight: 700; font-size: .9rem; margin-bottom: 8px; text-align: center; }
.src-box { margin: 14px 0 18px; }
.gen { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; }
.editor { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.ed-sub { padding: 9px 14px 5px; font-size: .76rem; font-weight: 800; color: var(--sage-d); background: var(--sage-xs); }
.ed-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; border-top: 1px solid var(--line); }
.ed-sub + .ed-row { border-top: 0; }
.ed-n { width: 22px; font-size: .74rem; font-weight: 700; color: var(--ink3); flex: none; }
.ed-row .input { min-height: 40px; padding: 7px 10px; font-size: .94rem; border-color: transparent; background: transparent; }
.ed-row .input:focus { background: #fff; border-color: var(--sage); }
.ed-w { display: flex; align-items: center; gap: 2px; flex: none; }
.ed-w .input { width: 58px; text-align: right; font-weight: 700; }
.ed-w span { font-size: .8rem; color: var(--ink3); width: 28px; }
.empty-ed { padding: 24px; text-align: center; color: var(--ink3); border: 1.5px dashed var(--line2); border-radius: 16px; font-size: .9rem; margin-bottom: 10px; }
.packs { display: grid; gap: 10px; }
.pack { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.pack-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pack-h .faint { font-size: .8rem; white-space: nowrap; }
.pack-basis { font-size: .8rem; color: var(--sage-d); font-weight: 600; margin: 3px 0 6px; }
.pack-prev { font-size: .82rem; color: var(--ink3); margin-bottom: 10px; }
.preview .pv-name { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 1.1rem; }
.pv-big { font-size: 1.15rem; margin: 10px 0 14px; color: var(--ink2); }
.pv-big b { font-size: 2.2rem; color: var(--ink); letter-spacing: -.03em; }
.pv-facts { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.pv-facts li { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.pv-facts span { display: block; font-size: .76rem; color: var(--ink3); font-weight: 600; }
.sub-h { font-size: .92rem; font-weight: 800; margin: 18px 0 8px; }
.mini-list { list-style: none; }
.mini-list li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .faint { white-space: nowrap; font-size: .84rem; }

/* 앱 틀 */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; padding: 8px 12px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 600; }
.demo-bar .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.demo-bar .btn.primary { background: var(--sage); border-color: var(--sage); }
.top { position: sticky; top: 0; z-index: 50; background: rgba(244, 241, 234, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.plan-btn { min-width: 0; flex: 1; text-align: left; padding: 4px; border-radius: 12px; }
.plan-btn:hover { background: var(--bg2); }
.plan-btn .pn { font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-btn .caret { color: var(--ink3); font-size: .8rem; }
.top-r { display: flex; align-items: center; gap: 8px; }
.dday { height: 30px; font-size: .86rem; padding: 0 12px; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--ink3); font-weight: 600; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.sync.saving i { background: #E0B44C; } .sync.off i { background: var(--terra); }
.sync span { display: none; }
.sync.off span { display: inline; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: none; }
.page { max-width: 1040px; margin: 0 auto; padding: 6px 14px calc(96px + env(safe-area-inset-bottom)); }
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 253, 249, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.bnav button, .tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; font-size: .72rem; font-weight: 700; color: var(--ink3); border-radius: 14px; }
.bnav svg, .tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bnav button.on, .tabs button.on { color: var(--ink); }
.bnav button.on svg { stroke-width: 2.3; }
@media (min-width: 860px) {
  .tabs { display: flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 999px; }
  .tabs button { flex-direction: row; gap: 6px; min-height: 38px; padding: 0 16px; font-size: .9rem; border-radius: 999px; }
  .tabs svg { width: 18px; height: 18px; }
  .tabs button.on { background: #fff; box-shadow: 0 1px 4px rgba(38,50,63,.1); }
  .bnav { display: none; }
  .page { padding: 14px 24px 60px; }
  .plan-btn { flex: 0 1 auto; max-width: 340px; }
  .top-in { justify-content: space-between; padding: 12px 24px; }
  .two { grid-template-columns: 1fr 1fr; gap: 14px; }
  .page[data-page=today] { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 14px; align-items: start; }
  .page[data-page=today] > .two { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: 1fr; gap: 0; }
  .page[data-page=today] > .reshuffle { grid-column: 1 / -1; }
  .page[data-page=settings] { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto auto 1fr; gap: 0 14px; align-items: start; }
  .page[data-page=settings] > #set-range { grid-column: 2; grid-row: 1 / span 5; }
  .page[data-page=settings] > section:not(#set-range) { grid-column: 1; }
  .page[data-page=plan] { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 14px; align-items: start; }
}

/* 오늘 */
.hero-card { padding: 20px; }
.hc-top { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.hc-label { font-size: .86rem; font-weight: 700; color: var(--ink3); }
.hc-big { display: flex; align-items: baseline; gap: 4px; margin: 2px 0 2px; }
.hc-big b { font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; color: var(--blue); }
.hc-big > span { font-size: 1.3rem; font-weight: 700; color: var(--blue); }
.hc-big .hc-text { font-size: 1.12rem; font-weight: 700; color: var(--ink); line-height: 1.45; padding: 4px 0; }
.hc-sub { font-size: .92rem; font-weight: 600; color: var(--ink2); }
.ring { --p: 0; flex: none; width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--sage) calc(var(--p) * 1%), var(--sage-s) 0); display: grid; place-items: center; }
.ring > div { width: 80px; height: 80px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.ring b { font-size: 1.45rem; font-weight: 800; line-height: 1; } .ring small { font-size: .7rem; }
.ring span { font-size: .66rem; color: var(--ink3); font-weight: 600; margin-top: 3px; }
.nudge { margin-top: 14px; padding: 11px 14px; border-radius: 14px; font-size: .9rem; font-weight: 600; background: var(--bg); color: var(--ink2); border-left: 4px solid var(--line2); }
.nudge.orange, .nudge.warn { background: #FCF1EA; color: var(--terra-d); border-left-color: var(--terra); }
.five { margin-top: 14px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--sage-xs); border: 1.5px solid var(--sage-s); text-align: left; transition: transform .08s, background .15s; }
.five:hover { background: var(--sage-s); } .five:active { transform: scale(.985); }
.five-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 1.2rem; flex: none; }
.five b { display: block; font-size: 1rem; } .five small { display: block; font-size: .8rem; color: var(--ink2); }
.five > span:nth-child(2) { flex: 1; }
.five-go { font-weight: 800; color: #fff; background: var(--sage); padding: 7px 14px; border-radius: 999px; font-size: .86rem; }
.chs { list-style: none; }
.ch { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ch:last-child { border-bottom: 0; }
.chs.extra { border-top: 1px dashed var(--line); margin-top: 4px; }
.check { width: 34px; height: 34px; flex: none; border-radius: 11px; border: 2px solid var(--line2); background: #fff; display: grid; place-items: center; transition: .15s; }
.check svg { width: 20px; height: 20px; fill: none; stroke: transparent; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check:hover { border-color: var(--sage); } .check:hover svg { stroke: var(--sage-s); }
.ch.is-done .check { background: var(--sage); border-color: var(--sage); animation: pop .3s; }
.ch.is-done .check svg { stroke: #fff; }
@keyframes pop { 40% { transform: scale(1.18); } }
.ch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-main b { font-weight: 700; font-size: .98rem; }
.ch.is-done .ch-main b { color: var(--ink3); text-decoration: line-through; text-decoration-color: var(--line2); }
.ch-meta { font-size: .8rem; color: var(--ink3); margin-top: 1px; }
.ch-memo { font-size: .76rem; color: var(--sage-d); margin-top: 2px; }
.more { display: block; margin-top: 8px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 4px 0 12px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; color: var(--ink3); }
.wd i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .78rem; background: var(--bg); border: 1.5px solid transparent; }
.wd.on i { background: var(--sage); color: #fff; }
.wd.now i { border: 2px dashed var(--sage); background: #fff; }
.wd.miss i { background: #fff; border-color: var(--line2); }
.wd.rest i { color: var(--ink3); font-size: .64rem; }
.wd.future i { opacity: .5; }
.streak-line { font-size: .92rem; font-weight: 600; }
.streak-line.green b { color: var(--sage-d); }
.revs { list-style: none; }
.revs li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.revs li:last-child { border-bottom: 0; }
.revs li > div { display: flex; flex-direction: column; min-width: 0; }
.reshuffle { display: flex; gap: 12px; align-items: flex-start; background: #FFF8F1; border-color: #F1DCCB; }
.rs-ic { font-size: 1.3rem; }
.reshuffle > div:nth-child(2) { flex: 1; } .reshuffle p { font-size: .86rem; color: var(--ink2); margin-top: 2px; }
.warn-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #FFF8F1; }
.pick { list-style: none; max-height: 50vh; overflow-y: auto; margin: 6px 0; }
.pick label { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick input { width: 20px; height: 20px; accent-color: var(--sage); }
.pick span:nth-child(2) { flex: 1; }
.help-rows > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.help-rows .bank-row { margin: 4px 0; }
.help { margin: 8px 0 12px 1.2em; } .help li { margin-bottom: 10px; } .help b { display: block; } .help span { font-size: .9rem; color: var(--ink2); }

/* 5분 타이머 */
.timer { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: grid; place-items: center; padding: 24px; opacity: 0; transition: opacity .25s; }
.timer.in { opacity: 1; }
.timer-in { width: 100%; max-width: 380px; text-align: center; }
.t-kicker { font-weight: 800; color: var(--sage-d); letter-spacing: .02em; }
.t-what { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.t-ring { position: relative; width: min(72vw, 280px); aspect-ratio: 1; margin: 26px auto; }
.t-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.t-ring circle { fill: none; stroke-width: 12; }
.t-ring .bg { stroke: var(--sage-s); }
.t-ring .fg { stroke: var(--sage); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .3s linear; }
.timer.over .t-ring .fg { stroke: var(--terra); }
.t-num { position: absolute; inset: 0; display: grid; place-content: center; }
.t-num b { font-size: 3.6rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.t-num span { font-size: .9rem; color: var(--ink3); font-weight: 600; }
.t-msg { color: var(--ink2); min-height: 3em; }
.t-btns { display: flex; gap: 10px; margin-top: 18px; } .t-btns .btn { flex: 1; }

/* 일정 */
.cal-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cw { text-align: center; font-size: .72rem; font-weight: 700; color: var(--ink3); padding: 4px 0; }
.cd { position: relative; min-height: 56px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; align-items: center; padding: 5px 2px 6px; gap: 2px; border: 1.5px solid transparent; }
.cd.pad { background: transparent; }
.cd .dnum { font-size: .82rem; font-weight: 700; }
.cd.past { opacity: .62; }
.cd.rest { background: transparent; color: var(--ink3); }
.cd.today { border-color: var(--ink); background: #fff; opacity: 1; }
.cd.sel { box-shadow: 0 0 0 3px rgba(107,143,113,.35); }
.cd.exam { background: var(--terra); color: #fff; }
.cd.buf { background: #fff; border: 1.5px solid var(--sage-s); }
.cd.borrowed { background: var(--terra-s); border: 1.5px dashed var(--terra); }
.cd em { font-style: normal; font-size: .64rem; font-weight: 800; line-height: 1; }
.cd em.x { color: var(--terra-d); }
.cd .bars { display: flex; flex-direction: column; gap: 2px; width: 70%; margin-top: auto; }
.cd .bars i { height: 4px; border-radius: 2px; background: var(--sage); }
.cd .bars i.d { background: var(--line2); } .cd .bars i.s { background: var(--terra); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .74rem; color: var(--ink3); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-bar { display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--sage); } .lg-bar.s { background: var(--terra); }
.legend .x { color: var(--terra-d); }
.day-detail { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.day-detail ul { list-style: none; margin-top: 6px; } .day-detail li { display: flex; justify-content: space-between; padding: 4px 0; font-size: .9rem; }
.chs.full .sub-h { list-style: none; font-size: .76rem; font-weight: 800; color: var(--sage-d); padding: 12px 0 2px; border: 0; margin: 0; }

/* 기록 */
.prog-big { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.prog-big b { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; } .prog-big small { font-size: 1.2rem; }
.prog-big span { color: var(--ink3); font-weight: 600; }
.bar { position: relative; height: 12px; border-radius: 6px; background: var(--sage-s); margin-bottom: 6px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--sage); min-width: 4px; }
.bar em { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.stats div { background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.stats span { display: block; font-size: .76rem; color: var(--ink3); font-weight: 600; }
.stats b { font-size: 1.1rem; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, auto); gap: 4px; margin-bottom: 10px; }
.heat i, .heat-leg i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--bg2); }
.heat .hf { background: transparent; border: 1px dashed var(--line); }
.heat .h1, .heat-leg .h1 { background: #CFDECB; } .heat .h2, .heat-leg .h2 { background: #A9C2A6; } .heat .h3, .heat-leg .h3 { background: #7FA285; } .heat .h4, .heat-leg .h4 { background: #557A5C; }
.heat .now { outline: 2px solid var(--terra); outline-offset: 1px; }
.heat-leg { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-bottom: 10px; } .heat-leg i { width: 12px; }
.logs { list-style: none; }
.logs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.logs li:last-child { border-bottom: 0; }
.logs li > div { display: flex; flex-direction: column; }
.card-prev { background: var(--bg2); border-radius: 16px; min-height: 200px; display: grid; place-items: center; overflow: hidden; margin-bottom: 12px; }
.card-prev img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.spin { color: var(--ink3); font-weight: 600; font-size: .9rem; }
.themes { margin-bottom: 4px; }

/* 설정 */
.set-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.file-btn { cursor: pointer; }
.plans { list-style: none; margin-bottom: 12px; }
.plans button { width: 100%; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); margin-bottom: 8px; background: #fff; }
.plans li.on button { border-color: var(--sage); background: var(--sage-xs); }
.plans b { flex: 1 1 60%; } .plans .faint { font-size: .84rem; }
.plans i { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--sage-d); }
.pro-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; } .pro-head h2 { margin: 0; }
.pro-list { list-style: none; margin: 10px 0 12px; }
.pro-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pro-price { margin: 4px 0 8px; font-size: 1rem; }
.pro-list b { display: block; } .pro-list span { font-size: .86rem; color: var(--ink2); }
.auth-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 1.1rem; }
.auth-tabs { margin-bottom: 18px; }
.age-note { font-size: .82rem; color: var(--ink3); margin: -4px 0 8px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink2); margin-bottom: 16px; cursor: pointer; line-height: 1.5; }
.consent input { width: 20px; height: 20px; accent-color: var(--sage); flex: none; margin-top: 1px; }
.consent a { color: var(--ink); font-weight: 700; }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; font-weight: 600; }
.note.ok { background: var(--sage-s); color: var(--sage-d); } .note.err { background: var(--terra-s); color: var(--terra-d); } .note.warn { background: var(--bg2); }
.legal-links { text-align: center; margin-top: 16px; font-size: .82rem; font-weight: 600; color: var(--ink3); display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.legal-links a { color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }

/* 약관 · 개인정보처리방침 */
.legal-page { max-width: 820px; margin: 0 auto; padding: 22px 18px 60px; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.legal-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--ink); text-decoration: none; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line2); font-weight: 700; font-size: .88rem; color: var(--ink2); text-decoration: none; white-space: nowrap; }
.legal { padding: 34px 38px; line-height: 1.75; font-size: .96rem; }
.legal h1 { font-weight: 800; letter-spacing: -.02em; font-size: 1.9rem; line-height: 1.25; }
.legal .meta { color: var(--ink3); font-weight: 600; font-size: .88rem; margin: 6px 0 18px; }
.legal .lead { color: var(--ink2); margin-bottom: 8px; }
.legal h2 { font-weight: 800; font-size: 1.15rem; margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.legal h3 { font-weight: 700; font-size: 1rem; margin: 16px 0 6px; }
.legal p { margin: 8px 0; }
.legal ul, .legal ol { margin: 8px 0 8px 1.3em; }
.legal li { margin: 4px 0; }
.legal a { color: var(--sage-d); text-decoration: underline; text-underline-offset: 3px; }
.legal .toc { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 14px 0 6px; }
.legal .toc ol { margin: 4px 0 0 1.3em; columns: 2; column-gap: 28px; font-size: .9rem; }
.legal .toc a { color: var(--ink2); text-decoration: none; }
.legal .box { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 12px 0; }
.legal .box.tip { background: var(--sage-xs); border-color: var(--sage-s); }
.legal .tbl { width: 100%; overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .88rem; line-height: 1.6; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg); font-weight: 700; color: var(--ink2); white-space: nowrap; }
.legal tr:last-child td { border-bottom: 0; }
.legal dl.kv { display: grid; grid-template-columns: 8.5em 1fr; gap: 6px 14px; margin: 10px 0; font-size: .9rem; }
.legal dl.kv dt { color: var(--ink2); font-weight: 700; }
.legal dl.kv dd { margin: 0; }
.legal-foot { text-align: center; margin-top: 22px; font-size: .84rem; color: var(--ink3); font-weight: 600; }
.legal-foot a { color: var(--ink2); }
@media (max-width: 600px) {
  .legal-page { padding: 14px 12px 40px; }
  .legal { padding: 22px 18px; font-size: .94rem; line-height: 1.7; }
  .legal h1 { font-size: 1.55rem; } .legal h2 { font-size: 1.06rem; }
  .legal .toc ol { columns: 1; }
  .legal dl.kv { grid-template-columns: 1fr; gap: 2px; } .legal dl.kv dd { margin-bottom: 8px; }
  .legal-brand span.nm { display: none; }
  .legal table.stack thead { display: none; }
  .legal table.stack, .legal table.stack tbody, .legal table.stack tr, .legal table.stack td { display: block; width: 100%; }
  .legal table.stack tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .legal table.stack tr:last-child { border-bottom: 0; }
  .legal table.stack td { border: 0; padding: 4px 12px; }
  .legal table.stack td::before { content: attr(data-th); display: block; font-size: .76rem; font-weight: 700; color: var(--ink3); }
  .legal table.stack td:first-child { font-weight: 800; padding-top: 6px; } .legal table.stack td:first-child::before { display: none; }
}
@media (max-width: 380px) { .hc-big b { font-size: 2.8rem; } .ring { width: 90px; height: 90px; } .ring > div { width: 68px; height: 68px; } .gen { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { body { background: #fff; } .legal-top, .legal-foot { display: none; } .legal { box-shadow: none; border: 0; padding: 0; } }
