:root {
  color-scheme: light;
  --ink: #1d2822;
  --ink-soft: #53625a;
  --subtle: #89958c;
  --line: #e3e9e3;
  --paper: #fbfcfa;
  --canvas: #e9efea;
  --green: #3e6754;
  --green-deep: #244b3b;
  --green-soft: #e1eee5;
  --orange: #e49458;
  --shadow: 0 22px 65px rgba(35, 62, 46, .14);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--ink); background: radial-gradient(circle at 10% 0%, #f8fbf5 0, transparent 38%), var(--canvas); font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(91, 143, 107, .36); outline-offset: 3px; }

.phone-shell { width: min(100%, 430px); min-height: 100vh; margin: 0 auto; background: var(--paper); box-shadow: var(--shadow); }
.app-screen { position: relative; min-height: 100vh; overflow: hidden; padding: calc(27px + env(safe-area-inset-top)) 20px calc(118px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #f9fbf8 0%, #fbfcfa 42%, #f7faf7 100%); }
.app-screen::before { content: ''; position: absolute; top: -120px; right: -120px; width: 300px; height: 300px; border-radius: 50%; background: #e7f0e7; filter: blur(4px); pointer-events: none; }
.app-screen > * { position: relative; z-index: 1; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; }
.eyebrow, .card-label { margin: 0 0 8px; color: var(--subtle); font-size: 11px; font-weight: 500; letter-spacing: .12em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: #1b2a21; font-size: 28px; font-weight: 700; letter-spacing: -.07em; line-height: 1.2; }
.avatar { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid #eef5ed; border-radius: 50%; background: linear-gradient(145deg, #618a70, #315a45); color: white; font-size: 14px; font-weight: 700; box-shadow: 0 8px 18px rgba(45, 91, 65, .22); }
.avatar::after { content: ''; position: absolute; right: -1px; bottom: 0; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: #84be8e; }

.day-strip { display: flex; align-items: center; gap: 7px; margin: 29px 0 23px; }
.day { width: 53px; padding: 9px 0 10px; border-radius: 17px; background: transparent; color: var(--subtle); transition: background .18s, transform .18s, color .18s; }
.day:active { transform: scale(.95); }
.day span, .day strong { display: block; }
.day span { margin-bottom: 5px; font-size: 10px; font-weight: 500; }
.day strong { font-size: 17px; font-weight: 650; line-height: 1; }
.day.active { color: white; background: var(--green-deep); box-shadow: 0 8px 16px rgba(36, 75, 59, .18); }
.day.muted { opacity: .53; }
.calendar-button { display: grid; place-items: center; width: 37px; height: 37px; margin-left: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.8); color: var(--green); font-size: 19px; box-shadow: 0 4px 10px rgba(40, 63, 46, .04); }

.focus-card { position: relative; display: flex; align-items: center; gap: 13px; min-height: 126px; padding: 19px 17px; overflow: hidden; border-radius: 23px; background: linear-gradient(128deg, #315a46 0%, #47745d 58%, #62846a 100%); box-shadow: 0 13px 26px rgba(42, 86, 61, .2); }
.focus-card::after { content: ''; position: absolute; right: -34px; bottom: -67px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.035), 0 0 0 38px rgba(255,255,255,.025); }
.focus-icon { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(255,244,205,.2); color: #ffe39a; font-size: 17px; }
.focus-card .card-label { position: relative; z-index: 1; margin-bottom: 8px; color: #c8d9cd; }
.focus-card h2 { position: relative; z-index: 1; max-width: 225px; margin: 0 0 8px; color: white; font-size: 16px; font-weight: 650; letter-spacing: -.035em; line-height: 1.35; }
.focus-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin: 0; color: #d2e1d5; font-size: 11px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #ffd58f; box-shadow: 0 0 0 3px rgba(255, 213, 143, .14); }
.more-button { position: relative; z-index: 1; align-self: flex-start; margin-left: auto; padding: 1px 0 0 8px; background: transparent; color: #d6e6d9; font-size: 18px; letter-spacing: 2px; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 31px 0 12px; }
.section-heading h2 { display: inline; margin: 0 9px 0 0; color: #243128; font-size: 19px; font-weight: 700; letter-spacing: -.06em; }
.section-heading span { color: var(--subtle); font-size: 11px; }
.text-button { padding: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 600; }
.task-list { display: grid; gap: 10px; }
.task { position: relative; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 13px 14px 13px 16px; overflow: hidden; border: 1px solid rgba(223,231,224,.95); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 0 5px 16px rgba(46, 67, 52, .045); transition: transform .18s, opacity .18s, box-shadow .18s; }
.task::before { content: ''; position: absolute; top: 15px; bottom: 15px; left: 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--orange); }
.task:nth-child(n+2)::before { background: #85aa8d; }
.task:active { transform: scale(.985); box-shadow: 0 3px 8px rgba(46, 67, 52, .04); }
.task.is-complete { opacity: .53; }
.task.is-complete .task-title { text-decoration: line-through; text-decoration-color: #9ca9a0; }
.check { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; padding: 0; border: 1.5px solid #b7c5ba; border-radius: 50%; background: white; color: white; font-size: 12px; transition: background .18s, border .18s, transform .18s; }
.check:active { transform: scale(.85); }
.is-complete .check { border-color: var(--green); background: var(--green); }
.task-content { min-width: 0; flex: 1; }
.task-title { margin: 0 0 5px; overflow: hidden; color: #2b392f; font-size: 14px; font-weight: 650; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { margin: 0; color: var(--subtle); font-size: 11px; }
.task-tag { padding: 5px 8px; border-radius: 8px; background: #f3f6f2; color: #76837a; font-size: 10px; font-weight: 500; }

.empty-state { padding: 60px 0 30px; text-align: center; }
.empty-orb { width: 50px; height: 50px; margin: 0 auto 14px; display: grid; place-items: center; border: 7px solid #f0f7f0; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.empty-state h2 { margin-bottom: 6px; font-size: 16px; }
.empty-state p { color: var(--subtle); font-size: 12px; }

.ai-entry { display: flex; align-items: center; gap: 11px; margin-top: 27px; padding: 13px 14px; border: 1px solid #d8e5da; border-radius: 19px; background: linear-gradient(115deg, rgba(248,252,247,.96), rgba(234,244,235,.95)); box-shadow: 0 8px 20px rgba(55, 87, 60, .06); transition: transform .18s, box-shadow .18s; }
.ai-entry:active { transform: scale(.985); box-shadow: 0 3px 9px rgba(55, 87, 60, .05); }
.ai-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: linear-gradient(145deg, #5d8b6c, #315b45); color: white; font-size: 13px; font-weight: 700; box-shadow: 0 5px 10px rgba(53, 104, 70, .18); }
.ai-copy { flex: 1; }
.ai-copy p { margin: 0 0 3px; color: #2f4938; font-size: 13px; font-weight: 650; }
.ai-copy span { color: #85938a; font-size: 11px; }
.voice-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--green-deep); color: white; font-size: 19px; line-height: 1; box-shadow: 0 5px 11px rgba(36,75,59,.18); }

.bottom-nav { position: fixed; z-index: 2; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; display: flex; justify-content: space-around; width: min(calc(100% - 24px), 406px); padding: 9px 9px; transform: translateX(-50%); border: 1px solid rgba(224,232,225,.95); border-radius: 23px; background: rgba(253,254,252,.88); box-shadow: 0 10px 30px rgba(38,63,45,.12); backdrop-filter: blur(18px); }
.nav-item { display: grid; gap: 4px; justify-items: center; min-width: 59px; padding: 4px 11px; border-radius: 15px; background: transparent; color: #a0aaa2; transition: background .18s, color .18s; }
.nav-item span { font-size: 19px; line-height: 1; }
.nav-item small { font-size: 10px; }
.nav-item.active { color: var(--green-deep); background: #edf5ed; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(27, 42, 32, .48); backdrop-filter: blur(5px); }
.chat-sheet { width: min(100%, 430px); min-height: 46vh; padding: 9px 20px calc(21px + env(safe-area-inset-bottom)); border: 1px solid rgba(255,255,255,.35); border-bottom: 0; border-radius: 27px 27px 0 0; background: linear-gradient(180deg, #fbfdfb 0%, #f8fbf8 100%); box-shadow: 0 -16px 40px rgba(25, 45, 31, .18); animation: rise .24s ease-out; }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 21px; border-radius: 4px; background: #d4ddd5; }
.sheet-header { display: flex; justify-content: space-between; align-items: flex-start; }
.sheet-header h2 { margin: 0; color: #25362a; font-size: 21px; font-weight: 700; letter-spacing: -.06em; }
.close-button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eef2ee; color: var(--subtle); font-size: 22px; line-height: 1; }
.suggestions { display: grid; gap: 8px; margin: 24px 0 20px; }
.suggestions button { padding: 12px 13px; border: 1px solid #e0e8e0; border-radius: 13px; background: rgba(255,255,255,.72); color: #5b6a60; text-align: left; font-size: 12px; transition: border .18s, background .18s; }
.suggestions button:active { border-color: #bcd5c0; background: #f1f8f2; }
.draft-area { margin: 18px 0; padding: 15px; border: 1px solid #cfdfd1; border-radius: 17px; background: #f0f7f0; }
.draft-kicker { margin-bottom: 7px; color: var(--green); font-size: 11px; font-weight: 600; }
.draft-title { margin-bottom: 6px; color: #25382a; font-size: 15px; font-weight: 700; }
.draft-meta { margin: 0 0 14px; color: var(--subtle); font-size: 11px; }
.draft-actions { display: flex; gap: 8px; }
.draft-actions button { flex: 1; padding: 10px; border-radius: 11px; font-size: 12px; font-weight: 600; }
.draft-actions .confirm { background: var(--green-deep); color: white; box-shadow: 0 5px 10px rgba(36,75,59,.16); }
.draft-actions .edit { border: 1px solid #cfddd1; background: white; color: var(--green); }
.chat-form { display: flex; gap: 8px; margin-top: auto; padding: 5px; border: 1px solid #d8e3d9; border-radius: 16px; background: white; box-shadow: 0 7px 18px rgba(46, 74, 52, .05); }
.chat-form input { flex: 1; min-width: 0; padding: 8px 9px; outline: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.chat-form input::placeholder { color: #a7b1a8; }
.chat-form button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--green-deep); color: white; font-size: 20px; box-shadow: 0 4px 9px rgba(36,75,59,.15); }
.demo-note { margin: 12px 0 0; color: #a0aaa1; text-align: center; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
[hidden] { display: none !important; }

@media (min-width: 700px) {
  .phone-shell { min-height: calc(100vh - 48px); margin: 24px auto; border: 1px solid rgba(255,255,255,.8); border-radius: 32px; overflow: hidden; }
  .app-screen { min-height: calc(100vh - 48px); }
  .bottom-nav { bottom: 38px; }
}
