:root {
  color-scheme: light;
  --canvas: #f7f5ee;
  --surface: #fffdf7;
  --sidebar: #eeeee4;
  --ink: #292f27;
  --muted: #62695d;
  --line: #e7e5d9;
  --strong-line: #a7ada0;
  --accent: #3e5142;
  --accent-hover: #304133;
  --on-accent: #fffdf7;
  --tint: #e4ebdc;
  --hero: #e7ecdd;
  --clay: #985641;
  --shadow: 0 3px 12px #313b2810;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 20px;
}
:root[data-theme="peach"] { --canvas: #fbf4eb; --surface: #fffcf6; --sidebar: #f4e9df; --line: #eddfd3; --accent: #744733; --accent-hover: #573222; --tint: #f1ded2; --hero: #f2e1d3; --muted: #706057; }
:root[data-theme="lilac"] { --canvas: #f6f3f8; --surface: #fefbff; --sidebar: #eeebf3; --line: #e8e1ed; --accent: #564664; --accent-hover: #483952; --tint: #e9e0f0; --hero: #ebe4f2; --muted: #675d6e; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { border: 1px solid transparent; }
button { background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
svg { display: inline-block; vertical-align: middle; flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
input, textarea, select { min-width: 0; }
input[type="date"] { max-width: 100%; }
.skip-link { position: fixed; z-index: 20; left: 16px; top: 12px; transform: translateY(-150%); background: var(--surface); padding: 10px 16px; }
.skip-link:focus { transform: translateY(0); }
.layout { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; overflow: auto; display: flex; flex-direction: column; padding: 29px 17px 18px; }
.brand { display: flex; gap: 11px; align-items: center; margin: 0 7px 38px; }
.brand img { width: 39px; height: 39px; }
.brand-name { display: block; font: bold 21px/1.12 var(--serif); letter-spacing: -.65px; white-space: nowrap; }
.brand-sub { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .145em; margin-top: 5px; }
.side-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .13em; padding: 0 12px; min-height: 25px; margin-bottom: 7px; }
.side-label .icon-btn { width: 28px; height: 28px; background: transparent; border: 0; margin-right: -5px; }
.side-nav { display: grid; gap: 4px; margin-bottom: 28px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 11px; color: var(--muted); font-weight: 570; }
.nav-link span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); background: var(--tint); }
.nav-link[aria-current="page"] { font-weight: 740; }
.folder-nav { min-height: 37px; font-size: 13px; }
.folder-nav .count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 11px; }
.dot { width: 9px; height: 9px; background: var(--dot); border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.sage { --dot: #648268; --chip: #e4ede1; --chip-ink: #405843; }
.clay { --dot: #ad684e; --chip: #f5e3d8; --chip-ink: #864734; }
.sand { --dot: #aa8239; --chip: #f6edd7; --chip-ink: #765619; }
.lilac { --dot: #8e719d; --chip: #eee6f1; --chip-ink: #62486f; }
.blue { --dot: #5e8095; --chip: #e2edf2; --chip-ink: #3f5c6c; }
.side-bottom { margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line); }
.side-bottom button { width: 100%; text-align: left; border: 0; }
.side-bottom .install-link { margin-top: 6px; }
.workspace { max-width: 1460px; width: 100%; min-width: 0; margin: 0 auto; padding: 0 clamp(24px, 4vw, 64px); }
.topbar { min-height: 77px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.crumb strong { color: var(--ink); font-weight: 640; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.local-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.local-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #648268; }
.topbar .brand { display: none; }
.icon-btn { width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 11px; color: var(--accent); display: inline-grid; place-items: center; background: var(--surface); flex: 0 0 auto; }
.icon-btn:hover { background: var(--tint); }
.icon-btn.small { width: 34px; height: 34px; }
.page-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 15px; padding: 29px 0 24px; }
.eyebrow { color: var(--accent); display: flex; align-items: center; gap: 7px; font-weight: 760; text-transform: uppercase; font-size: 10px; letter-spacing: .15em; margin-bottom: 9px; }
.page-head > div { min-width: 0; }
.page-head h1 { font: 400 clamp(42px, 5vw, 62px)/.98 var(--serif); letter-spacing: -.055em; overflow-wrap: anywhere; }
.page-head p:not(.eyebrow) { color: var(--muted); margin-top: 11px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 43px; padding: 8px 15px; border-radius: 11px; font-weight: 680; line-height: 1.25; text-align: center; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { border-color: var(--line); background: var(--surface); color: var(--accent); }
.btn.secondary:hover, .btn.text:hover { background: var(--tint); }
.btn.text { color: var(--accent); }
.btn.danger { color: #91462f; background: #fbebe4; }
.btn.small { min-height: 35px; padding: 6px 10px; font-size: 12px; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); align-items: start; gap: 20px; }
.stack { display: grid; gap: 18px; min-width: 0; }
.hero { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #748b681d; background: var(--hero); border-radius: var(--radius); min-height: 224px; display: flex; align-items: center; padding: 25px 27px; }
.hero::after { content: ''; position: absolute; z-index: -2; inset: 0; background: radial-gradient(#51614a27 .55px, transparent .65px) 0 0 / 5px 5px; opacity: .36; }
.hero-art { width: min(62%, 404px); height: auto; position: absolute; right: -17px; bottom: -5px; z-index: -1; opacity: .98; }
.hero-copy { max-width: 65%; }
.hero h2 { font: 400 clamp(24px, 2.75vw, 35px)/1.08 var(--serif); letter-spacing: -.045em; margin-bottom: 9px; }
.hero p:not(.eyebrow) { font-size: 13px; color: var(--accent); max-width: 245px; }
.hero .eyebrow { font-size: 9px; }
.hero-progress { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; color: var(--accent); font-weight: 740; margin-top: 17px; padding: 7px 10px; border-radius: 20px; background: #fffdf7c9; }
.hero-progress .meter { width: 55px; height: 5px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card.pad { padding: 20px; }
.card-title { font: 400 25px/1.12 var(--serif); letter-spacing: -.032em; overflow-wrap: anywhere; }
.card-caption { color: var(--muted); font-size: 12px; margin-top: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-width: 0; margin-bottom: 14px; }
.title-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tile-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tint); color: var(--accent); flex: 0 0 auto; }
.tile-icon.warm { background: #f5e3d8; color: var(--clay); }
.tile-icon.gold { background: #f6edd7; color: #765619; }
.task-card { padding: 19px 19px 12px; }
.counter { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 740; color: var(--accent); border-radius: 20px; padding: 3px 8px; background: var(--tint); }
.segments { display: flex; gap: 3px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--canvas); width: fit-content; margin-bottom: 10px; }
.segments button { border: 0; color: var(--muted); font-size: 12px; font-weight: 650; padding: 5px 10px; border-radius: 7px; }
.segments button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); color: var(--accent); }
.task-periods { display: grid; gap: 8px; }
.task-period-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 9px; padding: 2px 4px 2px 10px; background: var(--tint); }
.task-period-head h3 { font-size: 13px; font-weight: 700; color: var(--accent); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-row { display: flex; align-items: center; min-height: 62px; gap: 10px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-toggle { width: 36px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; color: var(--accent); }
.task-toggle span { width: 20px; height: 20px; border: 1.5px solid var(--strong-line); border-radius: 7px; display: grid; place-items: center; }
.task-toggle:hover span { border-color: var(--accent); background: var(--tint); }
.task-toggle.done span { background: var(--tint); border-color: transparent; }
.task-details { min-width: 0; flex: 1; text-align: left; border: 0; padding: 8px 0; border-radius: 4px; }
.task-title { display: block; font-weight: 660; line-height: 1.3; overflow-wrap: anywhere; }
.task-details:hover .task-title { color: var(--accent); }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 9px; align-items: center; color: var(--muted); font-size: 10px; margin-top: 5px; }
.task-meta .late { color: var(--clay); }
.task-meta .flag { color: var(--clay); }
.folder-tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; background: var(--chip); color: var(--chip-ink); padding: 1px 6px; max-width: 100%; overflow-wrap: anywhere; }
.folder-tag .dot { width: 5px; height: 5px; }
.task-row .icon-btn { background: none; border: 0; color: var(--muted); }
.task-row .icon-btn:hover { background: var(--tint); }
.quick-add { display: flex; gap: 9px; align-items: center; margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.quick-add label { display: flex; align-items: center; color: var(--accent); min-width: 0; flex: 1; gap: 6px; padding-left: 7px; }
.quick-add input { background: transparent; border: 0; border-radius: 6px; padding: 9px 5px; width: 100%; font-size: 13px; }
.quick-add input::placeholder { color: var(--muted); }
.quick-add button { flex: 0 0 auto; }
.demo-note { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); margin-top: 8px; font-size: 11px; }
.demo-note .btn { min-height: 29px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: 13px 0 16px; }
.mini-day { display: grid; place-items: center; gap: 3px; border: 1px solid transparent; min-width: 0; padding: 5px 0; border-radius: 9px; font-size: 13px; font-weight: 670; }
.mini-day:hover, .mini-day.current { background: var(--tint); color: var(--accent); }
.mini-day.current { border-color: #788e742b; }
.mini-day span:first-child { color: var(--muted); font-size: 9px; font-weight: 670; }
.mini-day .day-dot { width: 4px; height: 4px; background: transparent; border-radius: 50%; }
.mini-day .day-dot.has-plan { background: var(--accent); }
.week-progress { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; color: var(--muted); font-size: 11px; }
.week-progress strong { color: var(--accent); font-size: 13px; }
.meter { display: block; width: 100%; height: 6px; overflow: hidden; appearance: none; border: 0; border-radius: 10px; background: var(--tint); color: var(--accent); }
.meter::-webkit-progress-bar { background: var(--tint); }
.meter::-webkit-progress-value { background: var(--accent); border-radius: 10px; }
.meter::-moz-progress-bar { background: var(--accent); border-radius: 10px; }
.week-progress + .meter { margin-top: 7px; }
.mood-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 14px 0 5px; }
.mood { display: grid; justify-items: center; align-content: center; gap: 4px; background: var(--canvas); border-color: var(--line); border-radius: 11px; min-height: 47px; padding: 5px 1px; color: var(--accent); }
.mood svg { width: 25px; height: 25px; }
.mood:hover, .mood[aria-pressed="true"] { background: var(--tint); border-color: var(--accent); }
.mood-foot { color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 8px; }
.mood-foot .btn { min-height: 30px; padding: 4px 6px; }
.menu-preview { background: #f7eee0; border-color: #eee2d0; }
.menu-preview .card-title { font-size: 23px; }
.menu-preview .card-head { margin-bottom: 3px; }
.menu-preview .card-caption { color: #665749; }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; padding: 14px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.workspace-footer > span:first-child { font-size: 9px; font-weight: 770; letter-spacing: .13em; }
.tabbar { display: none; }
.empty { text-align: center; padding: 23px 14px; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 3px; }
.empty svg { color: var(--accent); margin-bottom: 5px; }
.week-nav { display: flex; align-items: center; gap: 9px; }
.week-nav strong { font-size: 13px; text-align: center; }
.week-page { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 20px; align-items: start; }
.week-page .week-days { margin-top: 0; }
.week-page .mini-day { padding: 8px 0; min-height: 53px; }
.week-page .mini-day[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); }
.meal-list { display: grid; list-style: none; padding: 0; margin: 7px 0 0; }
.meal-row { display: flex; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid var(--line); }
.meal-row:last-child { border: 0; }
.meal-number { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: var(--tint); color: var(--accent); flex: 0 0 auto; font-size: 11px; font-weight: 730; }
.meal-row .task-details { font-size: 13px; }
.meal-row .task-details span { display: block; font-size: 11px; color: var(--muted); }
.meal-add { width: 100%; margin-top: 13px; }
.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.personal-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.folder-card { padding: 18px; display: flex; align-items: center; gap: 12px; min-height: 100px; }
.folder-card:hover { border-color: var(--accent); }
.folder-card .tile-icon { background: var(--chip); color: var(--chip-ink); width: 40px; height: 40px; }
.folder-card div { min-width: 0; flex: 1; }
.folder-card .card-title { font-size: 23px; }
.folder-card > svg { color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.summary-stat { border: 1px solid var(--line); background: var(--canvas); border-radius: 14px; padding: 13px; }
.summary-stat strong { display: block; color: var(--accent); font: 400 31px/1.2 var(--serif); }
.summary-stat span { display: block; color: var(--muted); font-size: 12px; }
.summary-text { margin: 14px 0; }
.summary-text .meter { margin-top: 11px; }
.result-page { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, 1fr); gap: 18px; align-items: start; }
.savings-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.savings-balance strong { color: var(--accent); font-size: clamp(20px, 5vw, 32px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.savings-plan-totals { margin: 12px 0 8px; }
.savings-plan-totals .week-progress { font-size: 13px; margin-top: 5px; }
.plan-row-details { flex: 1; min-width: 0; padding-block: 10px; overflow-wrap: anywhere; }
.wish-actions { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; }
.wish-actions .btn { justify-content: start; padding-inline: 4px; text-align: left; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(270px, 1fr); align-items: start; gap: 18px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.theme-choice { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 11px; padding: 7px; text-align: left; font-size: 12px; font-weight: 660; }
.theme-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-choice .swatch { height: 47px; border-radius: 7px; background: var(--swatch); }
.theme-choice .theme-name { padding-left: 3px; overflow-wrap: anywhere; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); width: min(480px, calc(100% - 28px)); border-radius: 21px; padding: 21px; box-shadow: 0 15px 65px #262f294d; max-height: calc(100dvh - 40px); overflow: auto; }
.dialog::backdrop { background: #27332b66; backdrop-filter: blur(2px); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.dialog-header h2 { font: 400 29px/1.12 var(--serif); letter-spacing: -.04em; margin-top: 3px; }
.dialog-form { display: grid; gap: 13px; }
.field { display: grid; gap: 5px; min-width: 0; font-weight: 650; font-size: 12px; }
.field input, .field select, .field textarea { border: 1px solid var(--strong-line); border-radius: 9px; background: var(--surface); padding: 9px 10px; min-height: 41px; font-weight: 450; font-size: 16px; width: 100%; }
.field textarea { resize: vertical; min-height: 100px; }
.field small { color: var(--muted); font-weight: 450; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.check-label input { accent-color: var(--accent); width: 17px; height: 17px; }
.dialog-actions { display: flex; align-items: center; justify-content: end; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.dialog-actions .danger { margin-right: auto; }
.dialog-error { color: #91462f; font-size: 12px; }
.dialog p + p { margin-top: 10px; }
.recipe-content { display: grid; gap: 16px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.recipe-content h3 { font-size: 14px; margin: 0 0 5px; }
.recipe-content ul { margin: 0; padding-inline-start: 20px; }
.recipe-content p { white-space: pre-wrap; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; max-width: min(460px, calc(100% - 28px)); display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 15px; border-radius: 13px; background: var(--accent); color: var(--on-accent); box-shadow: 0 9px 25px #24312733; font-size: 13px; }
.toast button { color: inherit; font-weight: 750; padding: 6px; border-radius: 6px; }
.toast button:focus-visible { outline-color: var(--on-accent); }
.storage-warning { position: fixed; z-index: 11; bottom: 10px; left: 10px; max-width: min(450px, calc(100% - 20px)); background: #fff0e7; color: #793d2c; border: 1px solid #cd9d8f; padding: 12px; border-radius: 10px; }
.noscript { padding: 20px; }

@media (max-width: 1120px) {
  .layout { grid-template-columns: 193px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .workspace { padding-inline: 24px; }
  .dashboard { gap: 14px; grid-template-columns: minmax(0, 1.5fr) minmax(253px, 1fr); }
  .card.pad, .task-card { padding-inline: 16px; }
  .hero { padding-inline: 18px; }
  .hero-art { right: -27px; }
}
@media (max-width: 850px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .workspace { max-width: 790px; padding-inline: 20px; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .topbar { min-height: calc(63px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .topbar .brand { display: flex; margin: 0; }
  .topbar .brand img { width: 32px; height: 32px; }
  .topbar .brand-sub, .crumb { display: none; }
  .topbar .brand-name { font-size: 19px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 5; bottom: 0; inset-inline: 0; border-top: 1px solid var(--line); background: var(--surface); padding: 5px max(10px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .tabbar .nav-link { min-height: 49px; min-width: 0; flex-direction: column; gap: 3px; justify-content: center; font-size: 10px; padding: 5px; margin: 0 3px; }
  .toast, .storage-warning { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (max-width: 630px) {
  html { scrollbar-width: none; }
  .workspace { padding-inline: max(15px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .page-head { padding-top: 23px; padding-bottom: 17px; }
  .page-head h1 { font-size: clamp(35px, 10.4vw, 51px); overflow-wrap: anywhere; }
  .page-head p:not(.eyebrow) { font-size: 12px; margin-top: 7px; }
  .page-head .btn { min-height: 40px; font-size: 12px; padding-inline: 11px; }
  .local-label { display: none; }
  .dashboard, .week-page, .result-page, .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .dashboard .stack { gap: 15px; }
  .hero { min-height: 178px; padding: 18px 16px; }
  .hero-art { width: min(61%, 310px); right: -14px; }
  .hero h2 { font-size: 27px; }
  .hero p:not(.eyebrow) { font-size: 12px; }
  .hero-progress { margin-top: 11px; }
  .task-row { gap: 7px; }
  .task-toggle { width: 31px; }
  .task-card, .card.pad { padding-inline: 14px; }
  .quick-add input { font-size: 16px; }
  .quick-add input::placeholder { font-size: 13px; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .folder-card { min-height: 82px; }
  .workspace-footer { margin-top: 18px; }
}
@media (max-width: 370px) {
  .hero-copy { max-width: 77%; }
  .hero-art { opacity: .56; }
  .summary-grid { gap: 6px; }
  .summary-stat { padding: 9px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  button, .nav-link, .mini-day { transition: background-color .15s, border-color .15s, color .15s; }
}

.appearance-card { margin-bottom: 18px; }
.appearance-card .card-head { flex-wrap: wrap; }
.appearance-card .card-head .btn { white-space: nowrap; }
.appearance-card .card-title { overflow-wrap: normal; }
.settings-grid > :only-child { grid-column: 1 / -1; }
.design-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.design-choice { min-width: 0; display: grid; align-content: start; gap: 7px; background: var(--canvas); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 12px; text-align: left; }
.design-choice:hover { border-color: var(--strong-line); }
.design-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.design-choice-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 5px; }
.design-choice-label strong { font-size: 15px; }
.design-check { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: var(--on-accent); visibility: hidden; }
.design-choice[aria-pressed="true"] .design-check { visibility: visible; }
.design-description { padding: 0 5px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.design-preview { --preview-bg: #faf7ef; --preview-side: #e9eadc; --preview-banner: #e4ebda; --preview-line: #c8d2bc; --preview-text: #333e31; display: grid; grid-template-columns: 24% minmax(0, 1fr); min-height: 118px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--preview-bg); color: var(--preview-text); }
.preview-nav { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 13px 5px; background: var(--preview-side); }
.preview-nav i { width: 70%; height: 3px; border-radius: 6px; background: var(--preview-line); }
.preview-nav i:first-child { height: 10px; width: 10px; margin-bottom: 5px; background: var(--preview-text); }
.preview-page { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 7px; }
.preview-page b { font: 700 13px/1.1 Georgia, 'Times New Roman', serif; }
.preview-hero { display: grid; justify-items: end; align-items: center; height: 45px; border-radius: 4px; overflow: hidden; background: var(--preview-banner); }
.preview-hero img { width: min(83px, 80%); height: auto; }
.preview-rows { display: grid; gap: 5px; padding: 4px 2px; }
.preview-rows i { width: 90%; height: 3px; border-radius: 5px; background: var(--preview-line); }
.preview-rows i:nth-child(2) { width: 72%; }
.preview-rows i:nth-child(3) { width: 83%; }
.design-preview.rhythm { --preview-bg: #f4f6fd; --preview-side: #fff; --preview-banner: #4055be; --preview-line: #adb9eb; --preview-text: #2a398e; grid-template-columns: minmax(0, 1fr); grid-template-rows: 20px auto; }
.rhythm .preview-nav { flex-direction: row; justify-content: flex-start; padding: 4px 7px; }
.rhythm .preview-nav i { width: 15%; }
.rhythm .preview-nav i:first-child { width: 8px; height: 8px; margin: 0; }
.rhythm .preview-page b { font-family: var(--sans); }
.rhythm .preview-hero { height: 35px; }
.design-preview.dusk { --preview-bg: #211b31; --preview-side: #171322; --preview-banner: #3a2a55; --preview-line: #76668d; --preview-text: #f3eaff; grid-template-columns: 19% minmax(0, 1fr); }

:root[data-design="botanical"] .hero { background-color: var(--hero); }
:root[data-design="botanical"] .task-card { background-image: linear-gradient(90deg, #9c684d0f 1px, transparent 1px); background-position: 18px 0; background-size: 100% 100%; background-repeat: no-repeat; }

:root[data-design="rhythm"] {
  --canvas: #f1f4fc;
  --surface: #ffffff;
  --sidebar: #ffffff;
  --ink: #192443;
  --muted: #53617d;
  --line: #dae2f4;
  --strong-line: #a1afd3;
  --accent: #354bb3;
  --accent-hover: #273a91;
  --on-accent: #fff;
  --tint: #e5ebff;
  --hero: #3b51b4;
  --clay: #9b4e32;
  --shadow: 0 4px 13px #2439710b;
  --serif: var(--sans);
  --radius: 13px;
}
:root[data-design="rhythm"] .page-head h1 { font-weight: 790; letter-spacing: -.065em; }
:root[data-design="rhythm"] .card-title, :root[data-design="rhythm"] .dialog-header h2 { font-weight: 740; }
:root[data-design="rhythm"] .card-title { font-size: 21px; }
:root[data-design="rhythm"] .hero { min-height: 148px; background: linear-gradient(110deg, #263888, #455bc7 70%, #5168d1); }
:root[data-design="rhythm"] .hero::after { background: linear-gradient(100deg, transparent 45%, #d9e7ff14); opacity: 1; }
:root[data-design="rhythm"] .hero h2 { color: #fff; font-weight: 740; }
:root[data-design="rhythm"] .hero .eyebrow { color: #d9ff9c; }
:root[data-design="rhythm"] .hero p:not(.eyebrow) { color: #f0f3ff; max-width: 320px; }
:root[data-design="rhythm"] .hero-art { width: min(50%, 365px); right: 5px; bottom: 50%; transform: translateY(50%); }
:root[data-design="rhythm"] .hero-progress { color: #fff; background: #182659a8; margin-top: 12px; }
:root[data-design="rhythm"] .hero-progress .meter { --accent: #cfff8b; --tint: #f1f5ff38; }
:root[data-design="rhythm"] .task-toggle span, :root[data-design="rhythm"] .icon-btn, :root[data-design="rhythm"] .btn { border-radius: 7px; }
:root[data-design="rhythm"] .local-label::before { background: #546bce; }
:root[data-design="rhythm"] .menu-preview { background: #e9eefc; border-color: #dbe2f5; }
:root[data-design="rhythm"] .menu-preview .card-caption { color: var(--muted); }
:root[data-design="rhythm"] .menu-preview .tile-icon { background: #dce4ff; color: var(--accent); }

:root[data-design="dusk"] {
  color-scheme: dark;
  --canvas: #181424;
  --surface: #242036;
  --sidebar: #1c182a;
  --ink: #f4eefc;
  --muted: #c5bbd2;
  --line: #3d3550;
  --strong-line: #857798;
  --accent: #e5d6fc;
  --accent-hover: #f2e7ff;
  --on-accent: #271a39;
  --tint: #3c3255;
  --hero: #332748;
  --clay: #ffc0ab;
  --shadow: 0 6px 22px #100b1b47;
  --radius: 25px;
}
:root[data-design="dusk"] body { background: radial-gradient(ellipse at 75% 8%, #2d203c 0%, var(--canvas) 56%); }
:root[data-design="dusk"] .sidebar { border-color: #393047; }
:root[data-design="dusk"] .page-head .eyebrow, :root[data-design="dusk"] .hero .eyebrow { color: #f2c9d2; }
:root[data-design="dusk"] .hero { min-height: 210px; background: linear-gradient(110deg, #30233f, #422d59 68%, #38284e); border-color: #67537f; }
:root[data-design="dusk"] .hero::after { background: radial-gradient(#eecff58c .55px, transparent .75px) 0 0 / 12px 12px; opacity: .25; }
:root[data-design="dusk"] .hero-art { width: min(56%, 410px); right: 0; bottom: 0; }
:root[data-design="dusk"] .hero h2 { font-style: italic; }
:root[data-design="dusk"] .hero p:not(.eyebrow) { color: #e8d9f4; }
:root[data-design="dusk"] .hero-progress { background: #291e3dbb; color: #f4e9ff; }
:root[data-design="dusk"] .hero-progress .meter { --accent: #f0bdd2; --tint: #f2deff3b; }
:root[data-design="dusk"] .local-label::before { background: #c5a8ed; }
:root[data-design="dusk"] .tile-icon.warm { color: #f4bfc7; background: #543744; }
:root[data-design="dusk"] .tile-icon.gold { color: #f0cf9e; background: #4e3d3c; }
:root[data-design="dusk"] .menu-preview { background: #34283f; border-color: #4f3c58; }
:root[data-design="dusk"] .menu-preview .card-caption { color: #e0cddf; }
:root[data-design="dusk"] .sage { --dot: #a5c7a9; --chip: #31433d; --chip-ink: #cbebd0; }
:root[data-design="dusk"] .clay { --dot: #df9c89; --chip: #543941; --chip-ink: #ffd0bd; }
:root[data-design="dusk"] .sand { --dot: #d7b575; --chip: #4e4233; --chip-ink: #f7dca8; }
:root[data-design="dusk"] .lilac { --dot: #bb9edc; --chip: #493653; --chip-ink: #e9d0fb; }
:root[data-design="dusk"] .blue { --dot: #9abada; --chip: #303e55; --chip-ink: #d2e4ff; }
:root[data-design="dusk"] .btn.danger { color: #ffcabd; background: #55313d; }
:root[data-design="dusk"] .dialog-error { color: #ffcabd; }

@media (min-width: 851px) {
  :root[data-design="rhythm"] .layout { display: block; }
  :root[data-design="rhythm"] .sidebar { height: auto; min-height: 69px; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(10px, 2vw, 33px); padding: 10px clamp(20px, 4vw, 56px); overflow: visible; border: 0; border-bottom: 1px solid var(--line); }
  :root[data-design="rhythm"] .sidebar > .brand { margin: 0; }
  :root[data-design="rhythm"] .sidebar .brand-name { font-size: 19px; }
  :root[data-design="rhythm"] .sidebar > .side-label, :root[data-design="rhythm"] .sidebar > nav[aria-label="Папки"] { display: none; }
  :root[data-design="rhythm"] .sidebar > nav[aria-label="Планирование"] { display: flex; justify-content: center; gap: 4px; margin: 0; }
  :root[data-design="rhythm"] .sidebar .nav-link { gap: 7px; min-height: 39px; padding: 6px 10px; border-radius: 7px; }
  :root[data-design="rhythm"] .side-bottom { display: flex; gap: 4px; padding: 0; border: 0; margin: 0; }
  :root[data-design="rhythm"] .side-bottom .install-link { margin: 0; }
  :root[data-design="rhythm"] .workspace { max-width: 1350px; }
  :root[data-design="rhythm"] .topbar { min-height: 47px; }
  :root[data-design="rhythm"] .topbar .icon-btn { display: none; }
  :root[data-design="dusk"] .layout { grid-template-columns: 200px minmax(0, 1fr); }
  :root[data-design="dusk"] .sidebar .brand-name { font-size: 19px; }
}
@media (min-width: 851px) and (max-width: 1050px) {
  :root[data-design="rhythm"] .side-bottom .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (min-width: 631px) {
  :root:is([data-design="rhythm"], [data-design="dusk"]) .dashboard > .stack { display: contents; }
  :root:is([data-design="rhythm"], [data-design="dusk"]) .dashboard > .stack > .hero { grid-column: 1 / -1; }
  :root:is([data-design="rhythm"], [data-design="dusk"]) .dashboard .task-card { grid-column: 1; grid-row: 2 / span 3; }
  :root:is([data-design="rhythm"], [data-design="dusk"]) .dashboard .stack > .pad { grid-column: 2; }
  :root[data-design="rhythm"] .dashboard { grid-template-columns: minmax(0, 1.8fr) minmax(245px, 1fr); }
  :root[data-design="dusk"] .dashboard .dashboard-week { grid-row: 2; }
  :root[data-design="dusk"] .dashboard .dashboard-mood { grid-row: 3; }
}
@media (max-width: 630px) {
  .appearance-card .card-title { font-size: 23px; }
  .design-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .design-choice { grid-template-columns: minmax(88px, 36%) minmax(0, 1fr); align-content: center; align-items: start; gap: 4px 8px; padding: 8px; }
  .design-preview { grid-row: 1 / span 2; min-height: 84px; }
  .preview-page { padding: 5px; gap: 3px; }
  .preview-page b { font-size: 9px; }
  .preview-hero { height: 29px; }
  .rhythm .preview-hero { height: 22px; }
  .design-preview.rhythm { grid-template-rows: 14px auto; }
  .preview-rows { gap: 3px; padding-top: 2px; }
  .design-choice-label { align-self: end; }
  :root[data-design="rhythm"] .hero-art { width: 47%; right: -8px; opacity: .76; }
  :root[data-design="dusk"] .hero { min-height: 185px; }
  :root[data-design="dusk"] .hero-art { width: 55%; opacity: .84; }
}
