:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --paper: #fff;
  --ink: #252821;
  --muted: #85877f;
  --line: #e9e9e2;
  --green: #526c53;
  --green-pale: #eaf0e6;
  --orange: #bb7446;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.app { width: min(100%, 600px); min-height: 100dvh; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 26px) 22px calc(116px + env(safe-area-inset-bottom)); }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.eyebrow { margin: 0 0 9px; font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 750; }
h1 { font-size: clamp(27px, 7vw, 34px); letter-spacing: -1.5px; margin: 0; font-weight: 800; }
h1 span { color: var(--orange); margin-left: 5px; font-size: 22px; }
.subtitle { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.live { display: flex; align-items: center; gap: 6px; color: var(--green); background: var(--green-pale); border-radius: 20px; padding: 8px 10px; white-space: nowrap; font-size: 10px; font-weight: 700; margin-top: 8px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #71936e; }
.summary { display: flex; align-items: center; gap: 24px; background: #eeefe9; border-radius: 18px; padding: 18px 20px; margin: 27px 0 24px; }
.summary > div:not(.summary-line) { display: flex; flex-direction: column; gap: 7px; }
.summary-label { font-size: 11px; color: #777b71; }
.summary strong { font-size: 25px; letter-spacing: -.8px; }
.summary-line { height: 37px; width: 1px; background: #d9dbd1; }
.tabs { display: flex; gap: 7px; padding: 4px; background: #eeefe9; border-radius: 13px; margin-bottom: 26px; }
.tab { border: 0; border-radius: 10px; background: transparent; color: #7d8077; flex: 1; padding: 11px 8px; font-size: 13px; font-weight: 650; }
.tab.active { background: white; color: var(--ink); box-shadow: 0 1px 3px #0000000a; }
.list-section { margin: 0 0 25px; }
.section-heading { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 12px; font-weight: 800; }
.section-heading span { font-size: 11px; color: var(--muted); font-weight: 500; }
.items { display: grid; gap: 10px; }
.item { display: flex; align-items: flex-start; gap: 12px; background: var(--paper); border: 1px solid #eeeee8; border-radius: 16px; padding: 15px 13px; min-width: 0; }
.item.done { opacity: .62; }
.item.done .item-title { text-decoration: line-through; }
.done-toggle { flex: 0 0 23px; height: 23px; border-radius: 8px; border: 1.5px solid #d6d8ce; background: white; color: white; padding: 0; margin-top: 1px; display: grid; place-items: center; font-size: 14px; }
.done-toggle.checked { background: var(--green); border-color: var(--green); }
.item-main { min-width: 0; flex: 1; }
.item-title { font-size: 14px; font-weight: 720; line-height: 1.5; overflow-wrap: anywhere; }
.item-note { color: #777a71; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.pill { display: inline-flex; align-items: center; border-radius: 6px; padding: 5px 7px; font-size: 10px; font-weight: 700; background: #f0f1ec; color: #74776e; }
.pill.date { background: #edf2e9; color: #526c53; }
.pill.overdue { background: #faeae2; color: #b65e37; }
.item-actions { display: flex; gap: 3px; margin: -5px -5px 0 0; }
.icon-button { border: 0; background: transparent; color: #96988f; width: 31px; height: 31px; border-radius: 9px; font-size: 17px; padding: 0; }
.icon-button:active { background: #f0f1ec; }
.upcoming { padding: 15px 16px; background: #f5e9dc; border: 1px solid #efddca; border-radius: 15px; margin-top: 24px; color: #744e35; }
.upcoming .up-label { font-size: 10px; letter-spacing: 1px; font-weight: 800; margin-bottom: 7px; }
.upcoming strong { display: block; font-size: 14px; line-height: 1.5; }
.upcoming p { margin: 5px 0 0; font-size: 11px; }
.empty { text-align: center; padding: 37px 12px 26px; color: var(--muted); }
.empty-icon { margin: 0 auto 13px; width: 48px; height: 48px; border-radius: 17px; background: #eceee6; color: var(--green); display: grid; place-items: center; font-size: 24px; }
.empty strong { color: #5f6259; font-size: 13px; }
.empty p { font-size: 12px; margin: 7px 0 0; }
.status { text-align: center; color: #a1a298; font-size: 10px; margin: 25px 0 0; }
.add-button { position: fixed; z-index: 5; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 18px; background: #334b36; color: white; box-shadow: 0 8px 25px #233d2930; width: min( calc(100% - 36px), 556px); min-height: 58px; font-size: 15px; font-weight: 750; }
.add-button span { font-size: 23px; font-weight: 400; line-height: 1; }
.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.hidden { display: none !important; }
.scrim { position: absolute; inset: 0; background: #20251f73; }
.sheet { position: relative; width: min(100%, 600px); max-height: 92dvh; overflow: auto; overscroll-behavior: contain; padding: 10px 22px calc(24px + env(safe-area-inset-bottom)); background: var(--bg); border-radius: 25px 25px 0 0; }
.sheet-handle { width: 38px; height: 4px; border-radius: 4px; background: #d4d6cd; margin: 0 auto 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.sheet-head h2 { font-size: 22px; margin: 0; letter-spacing: -.7px; }
.close-button { border: 0; border-radius: 50%; background: #e9eae3; color: #66695f; width: 34px; height: 34px; font-size: 24px; }
form > label:not(.check-row) { display: block; font-size: 12px; font-weight: 750; margin: 18px 0 8px; }
form > label b { color: var(--orange); }
form > label span { color: var(--muted); font-weight: 450; }
form > input, form > textarea, .date-wrap input { width: 100%; border: 1px solid #e3e4dc; border-radius: 12px; background: white; padding: 13px; outline: none; font-size: 14px; color: var(--ink); }
form > input:focus, form > textarea:focus, .date-wrap input:focus { border-color: #91a58d; }
textarea { resize: vertical; }
.check-row { display: flex; align-items: center; gap: 11px; margin-top: 19px; padding: 13px; border: 1px solid #e7e8e0; border-radius: 13px; background: white; }
.check-row input { accent-color: var(--green); width: 17px; height: 17px; margin: 0 1px 0 0; }
.check-icon { font-size: 21px; color: var(--green); }
.check-row > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.check-row strong { font-size: 12px; }
.check-row small { font-size: 10px; color: var(--muted); }
.date-wrap { margin-top: 13px; padding: 0 2px; }
.date-wrap label { display: block; font-size: 11px; margin-bottom: 7px; font-weight: 700; }
.date-wrap input { color-scheme: light; }
.save-button { width: 100%; border: 0; border-radius: 13px; min-height: 53px; margin-top: 22px; background: #334b36; color: white; font-size: 14px; font-weight: 750; }
.form-error { font-size: 12px; color: #b34e34; }
@media (min-width: 600px) {
  .app { padding-left: 28px; padding-right: 28px; }
}
