/* 아하브 습관 */
:root {
  --bg: #F3FAF6; --surface: #FFFFFF; --sunk: #E7F3EC; --ink: #0F241B; --muted: #557064; --line: #D9EBE1;
  --accent: #0E9F6E; --accent-2: #10B981; --accent-ink: #FFFFFF; --accent-soft: #DDF5EA;
  --in: #1C6FD1; --out: #D6402F; --gold: #E0A92E; --ok: #0E9F6E; --bad: #C2362B; --new: #F08C00; --hl: #FFF4D1;
  --shadow: 0 1px 2px rgba(15,36,27,.04), 0 8px 24px rgba(15,36,27,.06);
  --hero: radial-gradient(120% 120% at 100% 0%, #6EE7B7 0%, transparent 55%), linear-gradient(135deg, #064E3B 0%, #0E9F6E 60%, #34D399 100%);
  --hero-shadow: 0 12px 32px rgba(14,159,110,.28); --hero-ink: #065F46;
  --font-ui: "Pretendard", "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; --radius: 18px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B1712; --surface: #12211A; --sunk: #1A2E24; --ink: #E8F5EE; --muted: #9DBBAC; --line: #24402F;
  --accent: #4ADE9E; --accent-2: #34D399; --accent-ink: #052016; --accent-soft: #163B2B; --hl: #33301A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
} }
.ring { width: 76px; height: 76px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bgc { stroke: rgba(255,255,255,.22); } .ring .fg { stroke: #FFE27A; stroke-linecap: round; transition: stroke-dashoffset .4s; }
.ring text { fill: #fff; font-size: 20px; font-weight: 800; }
.hero-top { display: flex; gap: 16px; align-items: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 4px; }
.week button { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); }
.week button b { font-size: 16px; color: var(--ink); }
.week button.on { border-color: var(--accent); background: var(--accent-soft); }
.week button i { width: 22px; height: 5px; border-radius: 3px; background: var(--sunk); display: block; overflow: hidden; }
.week button i u { display: block; height: 100%; background: var(--accent); }
.week button.fut { opacity: .45; }
.hb { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; margin-bottom: 8px; box-shadow: var(--shadow); }
.hb .hi { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.hb .ht { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.hb .ht b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb .ht small { font-size: 12.5px; color: var(--muted); }
.hb .ht small .fire { color: var(--new); font-weight: 800; }
.hb.done { background: color-mix(in srgb, var(--c) 7%, var(--surface)); border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.hb.done .ht b { color: var(--muted); }
.ckb { width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid var(--c); background: var(--surface); color: #fff; font-size: 22px; font-weight: 900; display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .12s; }
.ckb:active { transform: scale(.9); }
.hb.done .ckb { background: var(--c); }
.cnt2 { display: flex; align-items: center; gap: 6px; }
.cnt2 button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; font-weight: 800; padding: 0; }
.cnt2 button.plus { background: var(--c); color: #fff; border-color: transparent; }
.cnt2 span { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; font-size: 14px; }
.hbar2 { grid-column: 2 / 4; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; margin-top: -4px; }
.hbar2 i { display: block; height: 100%; background: var(--c); }
.emo { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emo button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font-size: 22px; padding: 4px 0; }
.emo button.on { border-color: var(--accent); background: var(--accent-soft); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; padding: 0; }
.colors button.on { border-color: var(--ink); }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.days button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 0; font-weight: 700; }
.days button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tpls { display: flex; flex-wrap: wrap; gap: 6px; }
.tpls button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: var(--sunk); display: block; }
.heat i.l1 { background: color-mix(in srgb, var(--c) 35%, var(--sunk)); } .heat i.l2 { background: color-mix(in srgb, var(--c) 65%, var(--sunk)); } .heat i.l3 { background: var(--c); }
.heat i.off { opacity: .35; }
.stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin: 10px 0 12px; }
.stat3 div { background: var(--sunk); border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; }
.stat3 b { font-size: 19px; font-variant-numeric: tabular-nums; } .stat3 span { font-size: 11.5px; color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .badges { grid-template-columns: repeat(6, 1fr); } }
.badges div { text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; background: var(--surface); font-size: 12px; color: var(--muted); }
.badges div span { font-size: 28px; display: block; filter: grayscale(1); opacity: .4; }
.badges div.got { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.badges div.got span { filter: none; opacity: 1; }
.pri { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.pri.p2 { background: var(--bad); } .pri.p1 { background: var(--new); } .pri.p0 { background: var(--line); }
.mgr { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.mgr:first-of-type { border-top: 0; }
.mgr .mi { font-size: 22px; text-align: center; }
.done-sec summary { cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; padding: 6px 0; }
.wkchart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; }
.wkchart div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 11.5px; color: var(--muted); }
.wkchart i { display: block; width: 70%; max-width: 30px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.wkchart em { font-style: normal; font-weight: 800; color: var(--ink); font-size: 11px; }
