:root {
  --ink: #19352c;
  --ink-2: #294a3f;
  --green: #22634d;
  --green-2: #3d7b64;
  --lime: #d6e899;
  --paper: #f6f6f1;
  --white: #fff;
  --muted: #75827c;
  --line: rgba(25,53,44,.11);
  --soft: #e8eee8;
  --sand: #eee9df;
  --coral: #dc745d;
  --shadow: 0 20px 56px rgba(25,53,44,.09);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 88% 4%, rgba(214,232,153,.22), transparent 26%), var(--paper); }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(34,99,77,.22); outline-offset: 2px; }
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(25,53,44,.07); background: rgba(246,246,241,.86); backdrop-filter: blur(20px); }
.topbar-inner { width: min(1080px, calc(100% - 40px)); height: 74px; display: flex; align-items: center; justify-content: space-between; margin: auto; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.brand > span:last-child { display: grid; gap: 2px; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: 9px; }
.brand-mark { position: relative; width: 38px; height: 38px; overflow: hidden; border-radius: 13px; background: var(--ink); }
.brand-mark::before, .brand-mark::after, .brand-mark i { content: ""; position: absolute; width: 4px; border-radius: 9px; background: var(--lime); transform: rotate(35deg); }
.brand-mark::before { height: 16px; left: 10px; top: 8px; opacity: .65; }
.brand-mark i { height: 24px; left: 17px; top: 6px; }
.brand-mark::after { height: 15px; left: 24px; top: 14px; opacity: .5; }
.desktop-nav { display: flex; align-items: center; gap: 4px; }
.desktop-nav button { padding: 9px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.desktop-nav button.active { background: var(--ink); color: white; }
.header-side { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.privacy-dot { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.55); color: var(--green); font-weight: 750; }
.shell { width: min(1080px, calc(100% - 40px)); margin: auto; padding: 48px 0 110px; }
.page { display: none; animation: page-in .26s ease both; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.kicker { display: block; margin-bottom: 9px; color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.kicker.light { color: var(--lime); }

.today-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.today-heading h1, .page-heading h1 { margin: 0; font-size: clamp(36px, 5vw, 55px); line-height: 1.13; letter-spacing: -.055em; }
.today-heading p, .page-heading p { margin: 15px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.day-progress { display: grid; justify-items: center; flex: 0 0 94px; padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.58); }
.day-progress span { font-size: 28px; font-weight: 800; line-height: 1; }
.day-progress small { margin-top: 7px; color: var(--muted); font-size: 9px; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .7fr); gap: 18px; align-items: stretch; }
.checkin-card { padding: 34px; border: 1px solid var(--line); border-radius: 30px; background: rgba(255,255,255,.84); box-shadow: var(--shadow); }
.form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.step-badge { padding: 7px 10px; border-radius: 999px; background: var(--soft); color: var(--green); font-size: 9px; font-weight: 800; }
.autosave-note { color: #8c9691; font-size: 9px; }
.hero-field { display: grid; gap: 10px; }
.hero-field > span, .compact-fieldset legend, .duration-line > span { color: var(--ink-2); font-size: 11px; font-weight: 750; }
.hero-field input { width: 100%; height: 58px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font-size: 22px; font-weight: 650; letter-spacing: -.025em; }
.hero-field input::placeholder { color: #b3bbb7; font-weight: 500; }
.hero-field input:focus { border-color: var(--green); outline: 0; }
.compact-fieldset { margin: 27px 0 0; padding: 0; border: 0; }
.compact-fieldset legend { margin-bottom: 12px; }
.category-row { display: flex; flex-wrap: wrap; gap: 7px; }
.category-row button { min-height: 37px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcf9; color: var(--muted); font-size: 10px; font-weight: 650; cursor: pointer; transition: .16s ease; }
.category-row button i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.category-row button:hover { transform: translateY(-1px); }
.category-row button.active { border-color: var(--green); background: var(--green); color: white; }
.recent-row { display: grid; gap: 9px; margin: 18px 0 5px; }
.recent-row > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.recent-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.recent-row button { max-width: 100%; overflow: hidden; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--green); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hero-field span small { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 600; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.choice-grid button { min-height: 112px; display: grid; justify-items: start; align-content: center; gap: 5px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #fbfcf9; text-align: left; cursor: pointer; transition: .16s ease; }
.choice-grid button:hover { transform: translateY(-2px); }
.choice-grid button > span { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 3px; border-radius: 8px; background: var(--soft); color: var(--green); font-size: 15px; }
.choice-grid button b { font-size: 11px; }
.choice-grid button small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.choice-grid button.active { border-color: var(--green); background: #e7f0ea; box-shadow: inset 0 0 0 1px var(--green); }
.duration-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 25px; }
.duration-pills { display: flex; gap: 5px; }
.duration-pills button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 9px; cursor: pointer; }
.duration-pills button.active { border-color: var(--ink); background: var(--ink); color: white; }
.optional-details { margin-top: 19px; border-top: 1px solid var(--line); }
.optional-details summary { padding: 16px 0 10px; color: var(--ink-2); font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.optional-details summary::-webkit-details-marker { display: none; }
.optional-details summary span { margin-left: 5px; color: var(--muted); font-weight: 500; }
textarea { width: 100%; resize: vertical; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcf9; color: var(--ink); font-size: 11px; line-height: 1.5; }
.primary-button, .secondary-button { min-height: 49px; display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 21px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--ink); color: white; font-size: 12px; font-weight: 750; cursor: pointer; transition: .16s ease; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(25,53,44,.16); }
.next-card { min-height: 100%; display: flex; flex-direction: column; padding: 31px; border-radius: 30px; background: var(--ink); color: white; box-shadow: 0 20px 50px rgba(25,53,44,.18); }
.next-top { display: flex; justify-content: space-between; align-items: flex-start; }
.next-state { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.55); font-size: 8px; }
.next-empty { margin-top: auto; }
.next-empty i { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(214,232,153,.3); border-radius: 50%; color: var(--lime); font-size: 10px; font-style: normal; }
.next-empty h2, .next-result h2 { margin: 25px 0 12px; font-size: 27px; line-height: 1.3; letter-spacing: -.04em; }
.next-empty p, .next-result > p { margin: 0; color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.65; }
.next-result { margin-top: auto; }
.result-label { display: inline-block; padding: 7px 10px; border-radius: 9px; background: var(--lime); color: var(--ink); font-size: 9px; font-weight: 800; }
.result-action { margin-top: 30px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.1); }
.result-action small { display: block; margin-bottom: 7px; color: var(--lime); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.result-action strong { display: block; font-size: 12px; line-height: 1.55; }
.schedule-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.schedule-form label { grid-column: 1 / -1; color: rgba(255,255,255,.52); font-size: 8px; font-weight: 700; }
.schedule-form input { min-width: 0; height: 43px; padding: 0 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(255,255,255,.08); color: white; color-scheme: dark; font-size: 10px; }
.schedule-form button, .action-controls button { min-height: 43px; padding: 0 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; background: rgba(255,255,255,.09); color: white; font-size: 9px; font-weight: 800; cursor: pointer; }
.schedule-form button, .action-controls button.done { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.action-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; }
.today-list-section { margin-top: 40px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.section-title h2 { margin: 0; font-size: 18px; }
.section-title button { border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 700; cursor: pointer; }
.decision-list, .history-list { border-top: 1px solid var(--line); }
.decision-item { display: grid; grid-template-columns: 43px 1fr auto auto; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.history-group .decision-item { grid-template-columns: 43px 1fr auto auto 29px; }
.decision-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: var(--soft); color: var(--green); font-size: 11px; font-weight: 850; }
.decision-copy strong { display: block; margin-bottom: 4px; font-size: 12px; }
.decision-copy small, .decision-meta { color: var(--muted); font-size: 9px; }
.direction-tag { padding: 6px 8px; border-radius: 999px; font-size: 8px; font-weight: 800; }
.direction-tag.more { background: #e3efdf; color: #3d6e43; }
.direction-tag.keep { background: #e5ecea; color: #4c6961; }
.direction-tag.less { background: #f4e5e1; color: #a4503f; }
.empty-list { min-height: 112px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); text-align: center; }
.empty-list strong { color: var(--ink-2); font-size: 12px; }
.empty-list span { font-size: 9px; }

.page-heading { min-height: 175px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.simple-stat { display: grid; justify-items: end; }
.simple-stat strong { font-size: 40px; line-height: 1; }
.simple-stat span { margin-top: 7px; color: var(--muted); font-size: 9px; }
.filter-bar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.filter-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-categories button, .quiet-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.6); color: var(--muted); font-size: 9px; cursor: pointer; }
.filter-categories button.active { border-color: var(--ink); background: var(--ink); color: white; }
.history-group { margin-bottom: 29px; }
.history-date { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.history-date b { color: var(--ink-2); font-size: 11px; }
.delete-button { width: 29px; height: 29px; border: 0; border-radius: 9px; background: transparent; color: #a0aaa5; cursor: pointer; }
.delete-button:hover { background: #f4e5e1; color: #a4503f; }

.week-range { padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.62); color: var(--muted); font-size: 10px; }
.review-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.review-card { min-height: 260px; display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 25px; background: rgba(255,255,255,.76); }
.review-card.continue { background: #e8f0e3; border-color: transparent; }
.review-card.reduce { background: #f3e8e3; border-color: transparent; }
.review-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.62); color: var(--green); font-size: 17px; }
.review-card.reduce .review-icon { color: #a4503f; }
.review-card small { margin-top: auto; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.review-card h2 { margin: 10px 0 8px; font-size: 20px; letter-spacing: -.035em; }
.review-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.promise-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; margin-top: 18px; padding: 35px; border-radius: 27px; background: var(--ink); color: white; }
.promise-card h2 { margin: 0; font-size: 22px; }
.promise-card p { margin: 8px 0 0; color: rgba(255,255,255,.52); font-size: 10px; }
.promise-card form { display: grid; grid-template-columns: minmax(0, 1fr) 190px auto; gap: 7px; }
.promise-card input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.07); color: white; font-size: 11px; }
.promise-card input::placeholder { color: rgba(255,255,255,.34); }
.promise-card form button { flex: 0 0 auto; padding: 0 15px; border: 0; border-radius: 11px; background: var(--lime); color: var(--ink); font-size: 10px; font-weight: 800; cursor: pointer; }
.saved-promise { grid-column: 2; margin: -18px 0 0 !important; color: var(--lime) !important; font-weight: 700; }
.evidence-panel { margin-top: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.6); }
.evidence-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 21px 24px; cursor: pointer; list-style: none; }
.evidence-panel summary::-webkit-details-marker { display: none; }
.evidence-panel summary span { display: grid; gap: 4px; }
.evidence-panel summary b { font-size: 12px; }
.evidence-panel summary small { color: var(--muted); font-size: 9px; }
.evidence-panel summary i { font-style: normal; }
.evidence-panel[open] summary i { transform: rotate(45deg); }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 120px) 1fr; gap: 15px; padding: 0 24px 24px; }
.evidence-stat { padding: 15px; border-radius: 14px; background: var(--soft); }
.evidence-stat span { display: block; color: var(--muted); font-size: 8px; }
.evidence-stat strong { display: inline-block; margin-top: 8px; font-size: 24px; }
.evidence-stat small { margin-left: 3px; color: var(--muted); font-size: 8px; }
.mini-bars { min-height: 74px; display: flex; align-items: end; gap: 6px; padding: 5px 0; }
.mini-bars i { flex: 1; min-width: 6px; border-radius: 5px 5px 1px 1px; background: var(--green-2); }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 17px; align-items: start; }
.settings-card { padding: 30px; border: 1px solid var(--line); border-radius: 25px; background: rgba(255,255,255,.72); }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.card-title h2 { margin: 0 0 6px; font-size: 17px; }
.card-title p, .danger p { margin: 0; color: var(--muted); font-size: 9px; }
.card-title > span { padding: 7px 9px; border-radius: 9px; background: var(--soft); color: var(--green); font-size: 9px; white-space: nowrap; }
.weight-list { display: grid; gap: 21px; }
.weight-row { display: grid; grid-template-columns: 110px 1fr 54px; gap: 13px; align-items: center; }
.weight-row label { display: grid; gap: 3px; }
.weight-row label strong { font-size: 11px; }
.weight-row label small { color: var(--muted); font-size: 8px; }
input[type="range"] { height: 5px; padding: 0; border: 0; border-radius: 99px; appearance: none; background: linear-gradient(90deg, var(--green) var(--fill, 50%), #e2e6e2 var(--fill, 50%)); }
input[type="range"]::-webkit-slider-thumb { width: 17px; height: 17px; appearance: none; border: 4px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 2px 7px rgba(0,0,0,.15); cursor: pointer; }
.weight-value { color: var(--green); font-size: 10px; font-weight: 800; text-align: right; }
.secondary-button { width: auto; min-width: 130px; justify-content: center; }
.settings-stack { display: grid; gap: 17px; }
.data-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.data-buttons button { min-height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcf9; color: var(--ink-2); font-size: 9px; font-weight: 700; cursor: pointer; }
.danger h3 { margin: 0 0 7px; font-size: 13px; }
.danger button { margin-top: 16px; padding: 0; border: 0; background: transparent; color: #aa4e3c; font-size: 9px; font-weight: 750; cursor: pointer; }
.toast { position: fixed; z-index: 100; left: 50%; top: 88px; max-width: calc(100% - 32px); padding: 12px 17px; border-radius: 12px; background: var(--ink); color: white; box-shadow: 0 12px 35px rgba(0,0,0,.2); font-size: 11px; font-weight: 650; opacity: 0; transform: translate(-50%, -10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #914737; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .today-grid, .settings-grid { grid-template-columns: 1fr; }
  .next-card { min-height: 330px; }
  .review-actions { grid-template-columns: 1fr 1fr; }
  .review-card.protect { grid-column: 1 / -1; min-height: 190px; }
  .evidence-grid { grid-template-columns: repeat(3, 1fr); }
  .mini-bars { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .topbar-inner { width: calc(100% - 30px); height: 66px; }
  .desktop-nav, .header-side { display: none; }
  .brand small { display: none; }
  .shell { width: calc(100% - 28px); padding: 29px 0 calc(100px + env(safe-area-inset-bottom)); }
  .today-heading { display: block; margin-bottom: 24px; }
  .today-heading h1, .page-heading h1 { font-size: 36px; }
  .today-heading p { font-size: 11px; }
  .day-progress { display: none; }
  .checkin-card { padding: 24px 19px; border-radius: 24px; }
  .autosave-note { display: none; }
  .hero-field input { height: 53px; font-size: 18px; }
  .choice-grid { grid-template-columns: repeat(3, 1fr); }
  .choice-grid button { min-height: 75px; justify-items: center; align-content: center; padding: 9px 5px; text-align: center; }
  .choice-grid button > span { margin: 0; }
  .choice-grid button b { font-size: 9px; }
  .choice-grid button small { display: none; }
  .duration-line { display: block; }
  .duration-pills { margin-top: 10px; }
  .duration-pills button { flex: 1; }
  .next-card { min-height: 300px; padding: 25px; border-radius: 24px; }
  .schedule-form, .action-controls { grid-template-columns: 1fr; }
  .decision-item { grid-template-columns: 40px 1fr auto; gap: 10px; }
  .history-group .decision-item { grid-template-columns: 40px 1fr auto 29px; }
  .decision-meta { display: none; }
  .page-heading { min-height: auto; display: block; margin-bottom: 28px; }
  .simple-stat, .week-range { width: max-content; margin-top: 18px; justify-items: start; }
  .filter-bar { display: block; }
  .quiet-button { margin-top: 10px; }
  .review-actions { grid-template-columns: 1fr; }
  .review-card, .review-card.protect { grid-column: auto; min-height: 205px; }
  .promise-card { grid-template-columns: 1fr; padding: 27px 22px; }
  .promise-card form { display: grid; grid-template-columns: 1fr; }
  .promise-card form button { min-height: 43px; }
  .saved-promise { grid-column: auto; margin: 0 !important; }
  .evidence-grid { grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 0 14px 18px; }
  .evidence-stat { padding: 11px 8px; }
  .evidence-stat strong { font-size: 20px; }
  .settings-card { padding: 24px 19px; }
  .weight-row { grid-template-columns: 74px 1fr 38px; gap: 8px; }
  .data-buttons { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: 19px; background: rgba(25,53,44,.95); box-shadow: 0 15px 42px rgba(25,53,44,.27); backdrop-filter: blur(18px); }
  .mobile-nav button { min-height: 50px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 13px; background: transparent; color: rgba(255,255,255,.47); font-size: 8px; font-weight: 700; }
  .mobile-nav button span { font-size: 14px; }
  .mobile-nav button.active { background: rgba(255,255,255,.09); color: var(--lime); }
}

@media (max-width: 410px) {
  .today-heading h1, .page-heading h1 { font-size: 32px; }
  .category-row button { padding: 0 10px; }
  .duration-pills button { padding: 7px 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
