:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-soft: #f8faf7;
  --ink: #18211d;
  --muted: #738078;
  --line: #e3e8e3;
  --green: #177a5e;
  --green-dark: #105d48;
  --green-soft: #e5f2ec;
  --amber: #d9932f;
  --amber-soft: #fff3dc;
  --red: #c65d51;
  --red-soft: #fbeae7;
  --blue: #4d70a9;
  --shadow: 0 12px 36px rgba(31, 47, 38, 0.12);
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); }
button, input, textarea { font: inherit; }
button { color: inherit; }
button, .task-row { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(23, 122, 94, 0.2); outline-offset: 2px; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.login-screen { min-height: 100dvh; padding: 24px; display: grid; place-items: center; background: var(--bg); }
.login-panel { width: min(100%, 370px); padding: 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.login-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--green); }
.login-mark svg { width: 23px; stroke-width: 3; }
.login-product { margin: 17px 0 2px; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.login-panel h1 { margin: 0 0 17px; font-size: 27px; letter-spacing: 0; }
.auth-mode-switch { height: 38px; margin-bottom: 20px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 7px; background: #eef2ee; }
.auth-mode-switch button { border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; }
.auth-mode-switch button.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(25,41,32,.1); font-weight: 600; }
.login-panel > label, .register-field > label { display: block; margin: 13px 0 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
.auth-mode-switch + label { margin-top: 0; }
.register-field { margin: 0; }
.password-field { height: 46px; padding: 0 8px 0 13px; display: grid; grid-template-columns: 20px 1fr 36px; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.password-field:focus-within { border-color: #8abca6; box-shadow: 0 0 0 3px rgba(23,122,94,.12); }
.password-field > svg { width: 17px; color: var(--muted); }
.password-field input { min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; }
.password-field button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.password-field button:hover { background: #e8ede9; }
.password-field button svg { width: 17px; }
.login-error { margin: 9px 0 0; color: var(--red); font-size: 11px; }
.login-button { width: 100%; margin-top: 18px; }

.app-shell { min-height: 100dvh; }
.sidebar { display: none; }
.main-content { min-height: 100dvh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.content-wrap { width: min(100%, 820px); margin: 0 auto; padding: 4px 18px 48px; }
.view-panel { width: 100%; }

.topbar {
  height: 66px;
  padding: env(safe-area-inset-top) 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-brand, .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 8px; }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 3; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.sync-status { height: 30px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; color: var(--muted); background: #e9ede9; font-size: 10px; }
.sync-status svg { width: 14px; }
.sync-status[data-state="synced"] { color: var(--green-dark); background: var(--green-soft); }
.sync-status[data-state="offline"] { color: #8b6127; background: var(--amber-soft); }
.sync-status[data-state="error"] { color: var(--red); background: var(--red-soft); }
.icon-button, .mobile-avatar { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; }
.icon-button:hover { background: #e9ede9; }
.icon-button svg { width: 20px; height: 20px; }
.mobile-avatar { width: 34px; height: 34px; margin-left: 6px; color: #fff; font: 700 13px "DM Sans", sans-serif; background: #263d33; }
.notification-button { position: relative; }
.notification-button span { position: absolute; right: 9px; top: 8px; width: 7px; height: 7px; border: 2px solid var(--bg); border-radius: 50%; background: var(--red); }

.date-heading { margin-top: 19px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.date-heading h1 { margin: 0; font-size: 31px; line-height: 1.15; letter-spacing: 0; }
.today-button { display: none; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; font-weight: 600; }
.today-button svg { width: 15px; }

.week-strip { margin: 22px -4px 0; padding: 5px 4px 9px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; border-bottom: 1px solid var(--line); }
.date-cell { height: 62px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 7px; background: transparent; }
.date-cell span { color: var(--muted); font-size: 12px; }
.date-cell strong { font: 600 16px "DM Sans", sans-serif; }
.date-cell i { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: #aeb7b1; }
.date-cell.active { color: white; background: var(--green); }
.date-cell.active span { color: rgba(255,255,255,.75); }
.date-cell.active i { background: #fff; }

.progress-band { margin: 18px 0 26px; padding: 14px 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.progress-copy { min-width: 0; display: flex; align-items: center; gap: 11px; }
.progress-icon { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.progress-icon svg { width: 19px; }
.progress-copy div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.progress-copy strong { font-size: 14px; }
.progress-copy div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.progress-value { width: 74px; flex: 0 0 auto; text-align: right; }
.progress-value strong { color: var(--green); font: 700 17px "DM Sans", sans-serif; }
.progress-track { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: #dfe6e1; }
.progress-track span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }

.task-section + .task-section { margin-top: 30px; }
.section-heading { min-height: 36px; display: flex; align-items: center; justify-content: space-between; }
.section-heading > div { display: flex; align-items: center; gap: 7px; }
.section-heading h2 { margin: 0; font-size: 15px; font-weight: 700; }
.section-heading em { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: #e8ece8; font: 600 11px "DM Sans", sans-serif; font-style: normal; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-dot.overdue { background: var(--red); }
.status-dot.today { background: var(--green); }
.section-heading > button { min-height: 34px; padding: 0 2px; display: flex; align-items: center; gap: 5px; border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 500; }
.section-heading > button:hover { color: var(--green); }
.section-heading button svg { width: 14px; }
.task-list { margin-top: 4px; }

.task-row { min-height: 66px; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); transition: opacity .2s ease, background .2s ease; }
.task-row:hover { background: rgba(255,255,255,.58); }
.task-check { width: 23px; height: 23px; display: grid; place-items: center; border: 1.6px solid #aeb9b2; border-radius: 50%; background: transparent; }
.task-check svg { width: 14px; height: 14px; opacity: 0; stroke-width: 3; }
.task-check:hover { border-color: var(--green); background: var(--green-soft); }
.task-main { min-width: 0; padding: 11px 0; cursor: pointer; }
.task-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; }
.task-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.priority-mark { width: 3px; height: 15px; flex: 0 0 auto; border-radius: 2px; background: var(--red); }
.task-meta { margin-top: 5px; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-meta svg { width: 12px; height: 12px; }
.task-tag { padding: 2px 6px; border-radius: 4px; color: var(--blue); background: #edf2fa; }
.task-tag.life { color: #996a25; background: var(--amber-soft); }
.task-actions { display: flex; align-items: center; }
.task-action { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.task-action:hover { color: var(--green); background: var(--green-soft); }
.task-action svg { width: 16px; height: 16px; }
.task-row.completed { opacity: .58; }
.task-row.completed .task-check { border-color: var(--green); color: white; background: var(--green); }
.task-row.completed .task-check svg { opacity: 1; }
.task-row.completed .task-title span:first-child { text-decoration: line-through; }
.task-row.paused { margin: 6px 0; padding: 0 8px; border: 1px solid #eddbb8; border-radius: 7px; background: #fffaf0; }
.task-row.paused:hover { background: #fff8e9; }
.paused-badge { padding: 2px 6px; border-radius: 4px; color: #95651f; background: #f8e7c5; font-size: 10px; }
.overdue-section .task-title { color: #5c3d38; }
.overdue-section .task-meta { color: var(--red); }

.inline-add { width: 100%; height: 50px; padding: 0 32px; display: flex; align-items: center; gap: 9px; border: 0; color: var(--muted); background: transparent; font-size: 13px; text-align: left; }
.inline-add:hover { color: var(--green); }
.inline-add svg { width: 17px; }

.bottom-nav { height: calc(70px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); position: fixed; z-index: 20; inset: auto 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }
.bottom-nav button { padding: 9px 2px 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; color: #8a958e; background: transparent; font-size: 10px; }
.bottom-nav button svg { width: 20px; height: 20px; }
.bottom-nav button.active { color: var(--green); font-weight: 600; }
.fab { width: 50px; height: 50px; position: fixed; z-index: 21; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: var(--green); box-shadow: 0 7px 20px rgba(23,122,94,.28); }
.fab:hover { background: var(--green-dark); transform: translateY(-1px); }
.fab svg { width: 23px; }

.empty-state { padding: 72px 20px 30px; text-align: center; }
.empty-state > span { width: 58px; height: 58px; margin: auto; display: grid; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.empty-state > span svg { width: 27px; }
.empty-state h2 { margin: 17px 0 7px; font-size: 18px; }
.empty-state p { max-width: 330px; margin: 0 auto 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.empty-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.empty-actions .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.empty-actions svg { width: 17px; }
.primary-button { min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 7px; color: white; background: var(--green); font-weight: 600; font-size: 13px; }
.primary-button:hover { background: var(--green-dark); }
.primary-button svg { width: 17px; }

.plans-view { padding-top: 19px; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.view-heading h1 { margin: 0; font-size: 31px; line-height: 1.15; letter-spacing: 0; }
.view-heading .primary-button { min-width: 42px; padding-inline: 12px; }
.plan-summary { margin: 24px 0 18px; padding: 17px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-summary > div { min-width: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line); }
.plan-summary > div:first-child { padding-left: 0; }
.plan-summary > div:last-child { padding-right: 0; border-right: 0; }
.plan-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.plan-summary strong { font: 700 17px "DM Sans", "Noto Sans SC", sans-serif; }
.plan-toolbar { height: 47px; display: flex; align-items: center; justify-content: space-between; }
.plan-tabs { display: flex; gap: 4px; }
.plan-tabs button { height: 32px; padding: 0 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; }
.plan-tabs button.active { color: var(--green-dark); background: var(--green-soft); font-weight: 600; }
.filter-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.filter-button:hover { background: #e8ede9; }
.filter-button svg { width: 16px; }
.plan-list { display: grid; gap: 9px; }
.plan-card { min-height: 112px; padding: 15px 13px; display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; gap: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.plan-card:hover { border-color: #cad5cd; }
.plan-card.paused { background: #fffaf0; border-color: #ead8b5; }
.plan-card-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--green-soft); }
.plan-card-icon.blue { color: var(--blue); background: #edf2fa; }
.plan-card-icon.amber { color: #9a6b27; background: var(--amber-soft); }
.plan-card-icon.red { color: var(--red); background: var(--red-soft); }
.plan-card-icon svg { width: 19px; }
.plan-card-main { min-width: 0; }
.plan-card-title { display: flex; align-items: center; gap: 7px; }
.plan-card-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.plan-state { padding: 2px 6px; flex: 0 0 auto; border-radius: 4px; color: #8b6127; background: #f4e4c4; font-size: 9px; }
.plan-schedule { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.plan-schedule span + span::before { content: "\00b7"; margin: 0 6px; color: #b2bbb5; }
.plan-history { margin-top: 14px; display: flex; align-items: center; gap: 5px; }
.plan-history > span { width: 13px; height: 5px; border-radius: 3px; background: #dce4de; }
.plan-history > span.done { background: #61ad8f; }
.plan-history > span.missed { background: #e6aaa3; }
.plan-history small { margin-left: 3px; color: var(--muted); font-size: 9px; }
.plan-card-side { min-width: 48px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.plan-rate { color: var(--green); font: 700 14px "DM Sans", sans-serif; }
.plan-menu { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.plan-menu:hover { background: var(--surface-soft); }
.plan-menu svg { width: 17px; }
.no-plans { padding: 64px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.scrim { position: fixed; z-index: 40; inset: 0; background: rgba(20,29,24,.32); backdrop-filter: blur(2px); }
.detail-drawer { width: min(420px, 92vw); position: fixed; z-index: 50; inset: 0 0 0 auto; display: flex; flex-direction: column; transform: translateX(102%); background: var(--surface); box-shadow: var(--shadow); transition: transform .25s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-header { height: 64px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.drawer-content { flex: 1; overflow-y: auto; padding: 24px 22px; }
.drawer-title-row { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 9px; }
.large-check { width: 25px; height: 25px; margin-top: 4px; border: 1.5px solid #aab6ae; border-radius: 50%; color: white; background: transparent; }
.large-check svg { width: 14px; opacity: 0; }
.large-check.checked { border-color: var(--green); background: var(--green); }
.large-check.checked svg { opacity: 1; }
.drawer-title-row textarea { width: 100%; min-height: 64px; resize: none; border: 0; color: var(--ink); background: transparent; font-size: 20px; font-weight: 600; line-height: 1.45; }
.detail-row { min-height: 52px; display: grid; grid-template-columns: 110px 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.detail-row > span, .notes-label > span { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.detail-row svg, .notes-label svg { width: 16px; }
.detail-row button { min-height: 36px; display: flex; align-items: center; gap: 7px; border: 0; background: transparent; font-size: 12px; text-align: left; }
.tiny-flag { width: 3px; height: 14px; border-radius: 2px; background: var(--red); }
.project-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.project-dot.work { background: var(--blue); }
.project-dot.life { background: var(--amber); }
.project-dot.health { background: var(--green); }
.notes-label { display: block; padding-top: 17px; }
.notes-label textarea { width: 100%; min-height: 100px; margin-top: 10px; padding: 12px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); font-size: 13px; }
.drawer-actions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer-actions button { height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 12px; }
.drawer-actions button:hover { background: var(--surface-soft); }
.drawer-actions .pause-action { color: #8a5d20; border-color: #eddbb8; background: #fffaf0; }
.drawer-actions svg { width: 15px; }
.drawer-footer { height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.drawer-footer button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.drawer-footer button:hover { color: var(--red); background: var(--red-soft); }
.drawer-footer svg { width: 17px; }

.add-sheet { width: min(590px, calc(100% - 20px)); max-height: calc(100dvh - 20px); position: fixed; z-index: 60; left: 50%; bottom: 10px; padding: 0 18px calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 28px)); border-radius: 8px 8px 0 0; background: white; box-shadow: var(--shadow); transition: transform .25s ease; }
.add-sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 38px; height: 4px; margin: 8px auto 0; border-radius: 3px; background: #d9dfda; }
.sheet-header { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.sheet-header h2 { margin: 0; font-size: 16px; }
.add-sheet form { max-height: calc(100dvh - 84px); overflow-y: auto; scrollbar-width: thin; }
.add-sheet input, .add-sheet form > textarea { width: 100%; border: 0; background: transparent; }
.add-sheet input { height: 50px; font-size: 20px; font-weight: 600; }
.add-sheet form > textarea { min-height: 54px; resize: none; color: var(--muted); font-size: 13px; }
.quick-options { padding: 10px 0 15px; display: flex; gap: 7px; overflow-x: auto; }
.task-kind-switch { width: 100%; height: 38px; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 7px; background: #eef2ee; }
.task-kind-switch button { border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; }
.task-kind-switch button.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(25,41,32,.1); font-weight: 600; }
.option-chip { height: 34px; padding: 0 11px; flex: 0 0 auto; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--muted); font-size: 12px; }
.option-chip.active { color: var(--green); border-color: #b8d8ca; background: var(--green-soft); }
.option-chip svg { width: 14px; }
.plan-form { padding: 5px 0 15px; }
.date-range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.date-range-fields label { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 11px; }
.date-range-fields input { width: 100%; height: 39px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-soft); font-size: 12px; }
.plan-form fieldset { margin: 15px 0 0; padding: 0; border: 0; }
.plan-form legend { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.repeat-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.repeat-options button { min-height: 36px; padding: 0 5px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 11px; }
.repeat-options button.active { color: var(--green-dark); border-color: #a9cfbe; background: var(--green-soft); font-weight: 600; }
.weekday-picker { margin-top: 8px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.weekday-picker button { aspect-ratio: 1; max-height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: white; font-size: 11px; }
.weekday-picker button.active { color: white; border-color: var(--green); background: var(--green); }
.goal-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(65px, .65fr) minmax(65px, .65fr); gap: 7px; }
.goal-fields select, .goal-fields input { width: 100%; height: 39px; min-width: 0; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--surface-soft); font-size: 11px; }
.sheet-submit { padding-top: 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.sheet-submit > span { display: none; color: var(--muted); font-size: 11px; }
kbd { padding: 2px 4px; border: 1px solid #d8ded9; border-radius: 4px; background: #f5f7f5; font: inherit; }
.pause-sheet { width: min(440px, calc(100% - 20px)); }
.pause-plan-name { margin: 0 0 16px; padding: 11px 12px; border-radius: 7px; color: var(--green-dark); background: var(--green-soft); font-size: 13px; font-weight: 600; }
.pause-reason { margin: 15px 0; display: block; color: var(--muted); font-size: 11px; }
.pause-reason textarea { width: 100%; min-height: 72px; margin-top: 7px; padding: 10px; resize: vertical; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); font-size: 12px; }
.secondary-button { min-height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 13px; }
.recurring-badge { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); }
.recurring-badge svg { width: 13px; height: 13px; }
.task-tag.math { color: #496ca3; background: #edf2fa; }
.task-tag.english { color: var(--green-dark); background: var(--green-soft); }

.toast { min-width: 230px; height: 48px; padding: 0 10px 0 15px; position: fixed; z-index: 80; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 9px; transform: translate(-50%, 28px); opacity: 0; pointer-events: none; border-radius: 7px; color: white; background: #24372e; box-shadow: var(--shadow); transition: .22s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast svg { width: 17px; color: #83d5b1; }
.toast span { flex: 1; }
.toast button { height: 30px; border: 0; color: #a4e0c3; background: transparent; font-size: 12px; font-weight: 600; }

@media (min-width: 620px) {
  .content-wrap { padding-inline: 32px; }
  .today-button { display: flex; }
  .week-strip { gap: 8px; }
  .date-cell { height: 68px; }
  .task-row { min-height: 70px; }
  .task-actions { gap: 2px; }
  .sheet-submit > span { display: inline; }
  .plan-card { padding: 16px; grid-template-columns: 43px minmax(0, 1fr) 64px; }
  .plan-card-icon { width: 43px; height: 43px; }
}

@media (max-width: 430px) {
  .login-screen { padding: 16px; }
  .login-panel { padding: 24px 20px; }
  .sync-status { display: none; }
}

@media (min-width: 820px) {
  .app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); }
  .sidebar { height: 100dvh; padding: 24px 16px 18px; position: sticky; top: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #eef1ed; }
  .brand { padding: 0 10px 26px; }
  .side-nav { display: grid; gap: 3px; }
  .nav-item { width: 100%; height: 42px; padding: 0 11px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; border: 0; border-radius: 7px; color: #59665f; background: transparent; font-size: 13px; text-align: left; }
  .nav-item svg { width: 17px; }
  .nav-item strong { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: #dde4de; font: 600 10px "DM Sans", sans-serif; }
  .nav-item.active { color: var(--green-dark); background: #dfece5; font-weight: 600; }
  .nav-item.active strong { color: white; background: var(--green); }
  .sidebar-section { margin-top: 30px; }
  .sidebar-label { height: 30px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; color: #89928c; font-size: 10px; font-weight: 700; }
  .sidebar-label button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
  .sidebar-label svg { width: 14px; }
  .project-item { width: 100%; height: 36px; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 0; color: #657169; background: transparent; font-size: 12px; }
  .sidebar-footer { margin-top: auto; padding: 14px 8px 0; display: grid; grid-template-columns: 34px 1fr 30px; align-items: center; gap: 9px; border-top: 1px solid #d9dfda; }
  .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: #263d33; font: 700 12px "DM Sans", sans-serif; }
  .sidebar-footer > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .sidebar-footer strong { font-size: 11px; }
  .sidebar-footer span { color: var(--muted); font-size: 9px; }
  .sidebar-footer button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
  .sidebar-footer svg { width: 15px; }
  .main-content { padding-bottom: 0; }
  .topbar { height: 68px; padding: 0 30px; justify-content: flex-end; border-bottom: 1px solid var(--line); }
  .mobile-brand, .mobile-avatar { display: none; }
  .content-wrap { padding: 16px 44px 70px; }
  .date-heading { margin-top: 20px; }
  .bottom-nav { display: none; }
  .fab { right: 28px; bottom: 26px; }
  .toast { bottom: 28px; }
  .add-sheet { top: 50%; bottom: auto; border-radius: 8px; transform: translate(-50%, calc(-50% + 18px)) scale(.98); opacity: 0; pointer-events: none; }
  .add-sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
  .sheet-handle { display: none; }
  .add-sheet form { max-height: min(650px, calc(100dvh - 130px)); }
}

@media (min-width: 1180px) {
  .app-shell { grid-template-columns: 258px minmax(0, 1fr); }
  .content-wrap { width: min(100%, 900px); }
}

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