@font-face { font-family: 'Open Sans'; src: url('./fonts/open-sans-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('./fonts/open-sans-semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Open Sans'; src: url('./fonts/open-sans-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #1a241f;
  --muted: #53605a;
  --accent: #005d3b;
  --focus: #007542;
  --primary: #007c49;
  --primary-hover: #006b40;
  --tint: #ddf8e6;
  --danger: #70433c;
  --date-accent: var(--primary);
  --date-tint: #e8f8ed;
  --date-highlight: #3be77e;
  --leaf: var(--accent);
  --leaf-tint: var(--tint);
  --task-default: #21b77a;
  --surface: #fff;
  --page: #f7f8f7;
  --wash: #eff2f0;
  --border: #e2e7e4;
  --grid-line: #e9ecea;
  --grid-faint: #f4f6f5;
  --gutter: 65px;
  --tap: 48px;
  --radius: 15px;
  --tile-radius: 10px;
  --sheet-radius: 28px;
  --canvas: #eef1ef;
  --card-border: #e3e8e5;
  --card-shadow: 0 1px 2px #233b2d0a, 0 6px 18px #233b2d0b;
  --glass-rim: #ffffffe8;
  --glass-shadow: 0 1px 1px #2d614617, 0 5px 16px #294e3b23,
    inset 0 1px 1px #fff, inset 0 -1px 2px #689b7b36;
  --glass-raised: #f9fbfacc;
  --glass-raised-shadow: 0 2px 6px #254f3826, inset 0 1px 1px #fff, inset 0 -1px 1px #91b49e44;
  --mint-fill: #48e49d;
  --mint-ink: #003b27;
  font: 16px/1.45 'Open Sans', -apple-system, system-ui, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
[hidden] { display: none !important; }
.icon { width: 21px; height: 21px; flex: none; stroke-width: 1.75; }
.app-shell {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100dvh; min-height: 0;
  background: var(--canvas);
}
.topbar { position: relative; z-index: 5; min-width: 0; padding: 8px 20px 6px; }
.toolbar { --toolbar-tap: 44px; }
.toolbar-reveal, .day-strip-reveal, .period-cards-reveal { display: grid; grid-template-rows: 1fr; }
.toolbar-clip, .day-strip-clip, .period-cards-clip { min-height: 0; overflow: hidden; }
.calendar-maximized :is(.toolbar-reveal, .day-strip-reveal, .period-cards-reveal) { grid-template-rows: 0fr; visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .toolbar-reveal, .day-strip-reveal, .period-cards-reveal { transition: grid-template-rows 160ms ease-out, visibility 160ms allow-discrete; }
}
.toolbar-summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 8px; margin-bottom: 6px; padding: 5px 10px;
  border: 1px solid var(--glass-rim); border-radius: 19px;
  background: #fffffff0;
  box-shadow: var(--card-shadow);
}
.toolbar-sticky {
  position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-width: 0; padding: 2px 5px; border: 1px solid var(--glass-rim); border-radius: 20px; box-shadow: var(--glass-shadow);
}
.toolbar-sticky::before { position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: #f3f5f4; content: ''; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 19px; font-weight: 725; letter-spacing: -.5px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--mint-ink); background: var(--mint-fill); }
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 2.1; }
.period-copy { min-width: 0; }
.period-title { font-size: clamp(24px, 2.5vw, 32px); line-height: 1.1; font-weight: 750; letter-spacing: -.04em; }
.period-details { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.15; }
.period-control, .period-arrows { display: flex; align-items: center; gap: 6px; }
.period-arrows { gap: 0; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--glass-raised); }
.period-arrows .icon-button { width: var(--toolbar-tap); min-height: var(--toolbar-tap); color: inherit; }
.period-arrows .icon-button:first-child { border-radius: 999px 0 0 999px; }
.period-arrows .icon-button + .icon-button { border-inline-start: 1px solid var(--border); border-radius: 0 999px 999px 0; }
.toolbar-right { display: flex; flex: none; align-items: center; gap: 8px; }
.icon-button, .create-button, .search-button {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap);
  border-radius: var(--radius); white-space: nowrap; font-size: 14px; font-weight: 650;
}
.icon-button { position: relative; width: var(--tap); padding: 0; color: var(--ink); }
.toolbar-right > .icon-button, .search-button, .creation-dock .create-button { min-height: var(--toolbar-tap); }
.icon-button:hover { background: #ffffff72; }
.search-button { padding: 0 13px; border: 1px solid #ffffffc2; background: #ffffff72; }
.search-button:hover { background: var(--tint); }
.filter-button.has-filter { color: var(--accent); background: var(--tint); }
.filter-count {
  position: absolute; top: 2px; right: 2px; display: grid; place-items: center; min-width: 17px; height: 17px; padding-inline: 3px;
  border-radius: 999px; background: var(--primary); color: white; font-size: 10px; font-weight: 700; line-height: 1;
}
.active-filters { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
.filter-chips { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.filter-chip {
  display: flex; flex: none; align-items: center; gap: 6px; max-width: 180px; min-height: var(--toolbar-tap); padding: 4px 9px;
  border: 1px solid var(--border); border-radius: 999px; background: white; color: var(--ink); font-size: 12px; font-weight: 600;
}
.filter-chip:hover { background: var(--tint); }
.filter-chip .icon { width: 14px; height: 14px; color: var(--muted); }
.filter-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--filter-color); }
.clear-filter { flex: none; width: var(--toolbar-tap); min-height: var(--toolbar-tap); color: var(--accent); }
.clear-filter .icon { width: 16px; height: 16px; }
.menu-button .icon { stroke-width: 3.2; }
.attention-dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.view-switch { display: grid; grid-template-columns: repeat(3, max-content); gap: 4px; min-width: 0; }
.view-switch > button {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--toolbar-tap); padding: 0 15px;
  border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 625; white-space: nowrap;
}
.view-switch > button .icon { width: 17px; height: 17px; }
.view-switch > button:hover { color: var(--ink); background: #ffffff73; }
.view-switch > button[aria-pressed="true"] {
  color: var(--accent); font-weight: 740; background: var(--tint);
  box-shadow: inset 0 0 0 1px #b0e9c2, inset 0 1px 1px #f1fff3;
}
.today-button, .today-button:hover {
  width: var(--toolbar-tap); min-height: var(--toolbar-tap); color: white;
  border-radius: 50%; background: transparent;
}
.today-button .icon {
  width: 23px; height: 23px;
  filter: drop-shadow(0 0 .65px #263f34) drop-shadow(0 1px 0 #263f3488);
}
.creation-dock { display: flex; align-items: center; gap: 8px; }
.create-button {
  padding: 6px 16px; color: var(--mint-ink); background: var(--mint-fill); box-shadow: 0 2px 6px #005f3c2e;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.create-button:hover, .create-button[aria-expanded="true"] { background-color: #83f2ad; }
.create-button[aria-expanded="true"] .icon { rotate: 45deg; }
.quick-add-menu {
  position: fixed; inset: auto; width: min(210px, calc(100% - 24px)); margin: 0; padding: 6px;
  border: 1px solid var(--glass-rim); border-radius: 21px; color: var(--ink); background: var(--page);
  box-shadow: var(--glass-shadow);
  user-select: none; -webkit-user-select: none;
}
.quick-add-menu:popover-open { display: grid; gap: 3px; }
.quick-add-menu > button {
  display: flex; align-items: center; gap: 11px; min-height: 54px; width: 100%; padding: 5px 10px;
  border-radius: 15px; font-size: 15px; font-weight: 650; text-align: left; touch-action: manipulation;
}
.quick-add-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: var(--accent); background: var(--tint); }
.quick-add-icon .icon { width: 19px; height: 19px; }
.quick-add-menu [data-quick-kind="inbox"] .quick-add-icon { color: var(--leaf); background: var(--leaf-tint); }
.quick-add-menu > button.is-highlighted, .quick-add-menu > button:focus-visible { background: #cdebe3dd; }
@media (hover: hover) {
  .quick-add-menu > button:hover { background: #cdebe3dd; }
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .toolbar-sticky::before, .quick-add-menu {
    background: #f8faf8ca;
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  }
  .quick-add-menu { background-color: #f3f6f4a3; }
}

.sidebar { grid-row: 1 / -1; min-height: 0; padding: 23px 12px; overflow-y: auto; border-right: 1px solid var(--card-border); background: var(--page); }
.sidebar > .brand { margin: 0 9px 23px; }
.rail-nav, .rail-category-list { display: grid; gap: 2px; }
.rail-nav > button, .rail-category {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 5px 9px;
  border-radius: 12px; text-align: left; font-size: 14px; font-weight: 570;
}
.rail-nav > button > .icon, .rail-category > .icon { width: 18px; height: 18px; color: var(--muted); }
.rail-nav > button[data-action="inbox"] > .icon { color: var(--leaf); }
.rail-nav > button[aria-current] > .icon { color: var(--accent); }
.rail-nav > button > span, .rail-category > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-nav > button > small { min-width: 22px; padding: 1px 4px; border-radius: 4px; background: white; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rail-nav > button:hover, .rail-category:hover { background: var(--wash); }
.rail-nav > button[aria-current] { background: var(--tint); color: var(--accent); font-weight: 675; }
.rail-category[aria-pressed="true"] { background: var(--tint); font-weight: 680; }
.mini-calendar, .rail-categories { padding: 9px 6px; border: 1px solid var(--card-border); border-radius: 17px; background: #fff; box-shadow: var(--card-shadow); }
.mini-calendar { margin: 14px 0 10px; }
.rail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 0 3px; }
.rail-section-head > h2 { font-size: 14px; font-weight: 720; }
.rail-section-head .icon-button { width: 30px; min-height: 32px; color: var(--muted); border-radius: 10px; }
.rail-section-head .icon-button .icon { width: 16px; height: 16px; }
.mini-arrows { display: flex; }
.mini-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.mini-weekday, .mini-date { display: grid; place-items: center; min-width: 0; padding: 0; min-height: 26px; font-size: 12px; }
.mini-weekday { color: var(--muted); font-size: 11px; font-weight: 650; }
.mini-date { position: relative; border-radius: 9px; font-variant-numeric: tabular-nums; }
.mini-date.outside { color: var(--muted); }
.mini-date:hover { background: var(--wash); }
.mini-date.is-today { color: var(--date-accent); font-weight: 760; }
.mini-date.is-selected { color: var(--mint-ink); background: var(--date-highlight); font-weight: 730; }
.mini-date.has-tasks::after { position: absolute; bottom: 2px; left: calc(50% - 1.5px); width: 3px; height: 3px; border-radius: 50%; content: ''; background: var(--primary); }
.mini-date.is-selected::after { background: var(--mint-ink); }
.rail-categories > .rail-section-head { margin: 0 4px 4px; }
.rail-category { min-height: 39px; }
.rail-category .category-symbol, .rail-category .category-neutral, .all-categories-icon { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 9px; }
.rail-category .category-symbol .icon, .all-categories-icon .icon { width: 16px; height: 16px; }
.all-categories-icon { background: white; color: var(--muted); }
.menu-section { display: grid; gap: 7px; }
.menu-section > button, .search-shortcut > button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 6px 9px;
  border-radius: 13px; text-align: left; font-size: 15px; font-weight: 650;
}
.menu-section > button { border: 1px solid var(--card-border); background: var(--page); }
.menu-section > button:hover { background: var(--wash); }
.menu-section > button > span:first-of-type, .search-shortcut > button > span:first-of-type { flex: 1; }
.menu-section > button > small, .search-shortcut > button > small { background: #fff; color: var(--muted); border-radius: 8px; padding: 1px 6px; font-size: 12px; }
.search-shortcut { margin-top: 8px; }
.search-shortcut > button { color: var(--accent); background: var(--tint); }
.menu-arrow { display: flex; color: var(--muted); }
.menu-arrow .icon { width: 15px; height: 15px; }

.workspace {
  display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; overflow: hidden;
  margin: 0 20px 14px; border: 1px solid var(--card-border); border-radius: 19px; background: white; box-shadow: var(--card-shadow);
}
.about-header { display: flex; align-items: center; gap: 7px; min-height: var(--tap); }
.about-header .icon-button { color: var(--accent); }
.about-open .workspace { user-select: text; background: var(--page); }
.about-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #cddbd1 transparent; }
.about-content { width: min(100%, 860px); margin-inline: auto; padding: clamp(12px, 3vw, 32px); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.about-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(14px, 4vw, 42px);
  padding: clamp(20px, 4vw, 38px); border: 1px solid var(--glass-rim); border-radius: var(--sheet-radius);
  background: linear-gradient(120deg, var(--date-tint), var(--surface) 63%, var(--tint)); box-shadow: var(--card-shadow);
}
.about-hero-copy { min-width: 0; }
.about-eyebrow { color: var(--accent); font-size: .875rem; font-weight: 700; }
.about-hero h2 { margin-top: 7px; font-size: clamp(1.65rem, 4.5vw, 2.5rem); line-height: 1.1; letter-spacing: -.035em; text-wrap: balance; }
.about-lead { max-width: 49ch; margin-top: 13px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.about-start { margin-top: 19px; border-radius: 999px; }
.about-start:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.about-start .icon { width: 19px; height: 19px; stroke-width: 2; }
.about-emblem {
  display: grid; place-items: center; width: clamp(90px, 15vw, 152px); aspect-ratio: 1; border-radius: 31%;
  border: 1px solid var(--glass-rim); background: var(--glass-raised); box-shadow: var(--glass-shadow);
}
.about-emblem-mark { display: grid; place-items: center; width: 71%; aspect-ratio: 1; border-radius: 30%; color: var(--mint-ink); background: var(--mint-fill); }
.about-emblem-mark .icon { width: 59%; height: 59%; stroke-width: 2; }
.about-values { margin-top: clamp(22px, 4vw, 32px); }
.about-values h2 { margin-bottom: 11px; font-size: clamp(1.25rem, 3vw, 1.5rem); letter-spacing: -.02em; }
.about-values ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; list-style: none; }
.about-values li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: start; padding: 14px;
  border: 1px solid var(--card-border); border-radius: 16px; background: var(--surface); box-shadow: var(--card-shadow);
}
.about-values li:last-child { grid-column: 1 / -1; }
.about-value-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--accent); background: var(--tint); }
.about-value-icon .icon { width: 19px; height: 19px; }
.about-values h3 { font-size: 1rem; line-height: 1.3; }
.about-values p { margin-top: 4px; color: var(--muted); font-size: .9375rem; line-height: 1.55; }
@media (max-width: 690px) {
  .about-hero { display: block; }
  .about-eyebrow { display: grid; align-items: center; min-height: 43px; padding-inline-end: 48px; }
  .about-emblem { position: absolute; inset: 14px 16px auto auto; width: 48px; }
  .about-values ul { grid-template-columns: minmax(0, 1fr); }
}
.calendar-scroll { flex: 1; min-height: 0; overflow: auto; overflow-anchor: none; scrollbar-color: #cddbd1 white; }
.period-cards { display: flex; gap: 6px; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.period-card { display: flex; flex: 1; min-width: 0; gap: 2px; align-items: center; padding: 0 4px; border: 1px solid var(--border); border-radius: 14px; background: var(--wash); }
.period-card-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: 7px; min-height: var(--tap); padding: 3px 5px; border-radius: 10px; text-align: start; }
.period-card-open > .icon { width: 18px; height: 18px; color: var(--accent); }
.period-card-open > span:first-of-type { display: grid; flex: 1; min-width: 0; }
.period-card-open strong { font-size: 14px; font-weight: 650; }
.period-card-open small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.period-card-count { flex: none; padding: 1px 6px; border-radius: 6px; color: var(--accent); background: var(--tint); font-size: 12px; font-weight: 650; }
.period-card-add { color: var(--accent); }
.period-card-open:hover, .period-card-add:hover { background-color: white; }
.week-agenda { overflow-x: hidden; padding: 4px 10px; background: #f6f9f7; }
.grouped-day { overflow-x: hidden; padding: 10px 12px calc(86px + env(safe-area-inset-bottom)); background: #f6f9f7; }
.day-task-group + .day-task-group { margin-top: 15px; }
.day-task-group h2 { margin: 0 0 6px 2px; color: var(--muted); font-size: 14px; font-weight: 700; }
.agenda-day { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-date { align-self: start; display: grid; justify-items: center; gap: 1px; min-height: var(--tap); padding: 0; border-radius: 12px; text-align: center; }
.agenda-date strong { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; font-variant-numeric: tabular-nums; }
.agenda-date span { color: var(--muted); font-size: 12px; font-weight: 600; }
.agenda-date[aria-current] span { color: var(--accent); }
.agenda-date[aria-current] strong { color: var(--mint-ink); background: var(--date-highlight); box-shadow: inset 0 1px 1px #ffffff4a; }
.agenda-entries { display: grid; align-content: center; gap: 6px; min-width: 0; }
.agenda-empty { padding-inline-start: 9px; color: var(--muted); font-size: 12px; }
.day-strip, .week-days, .all-day, .time-body { display: grid; }
.day-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.day-heading { min-width: 0; min-height: 70px; padding: 5px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.day-strip .day-heading { border-radius: 12px; }
.day-heading:hover { background: var(--page); }
.day-heading > span { color: var(--muted); font-weight: 590; font-size: 13px; }
.day-heading > strong { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; font-size: 20px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.day-heading.weekend > span { color: var(--date-accent); }
.day-heading.today > strong { background: var(--date-tint); color: var(--date-accent); }
.day-strip .day-heading.selected > strong, .week-days .day-heading.today > strong { background: var(--date-highlight); color: var(--mint-ink); box-shadow: inset 0 1px 1px #ffffff4a; }
.day-strip .day-heading.selected > span:first-child { color: var(--accent); font-weight: 680; }
.day-markers { display: flex; align-items: center; gap: 3px; height: 5px; }
.day-markers i { width: 5px; height: 5px; border-radius: 50%; background: var(--day-color); }
.time-grid { --columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.time-grid.week-grid { --columns: var(--gutter) repeat(var(--days), minmax(112px, 1fr)); min-width: calc(var(--gutter) + var(--days) * 112px); }
.week-days, .all-day, .time-body { grid-template-columns: var(--columns); }
.timeline-head { position: sticky; top: 0; z-index: 4; background: white; }
.timeline-head:empty { display: none; }
.week-days { border-bottom: 1px solid var(--border); background: #fff; }
.week-days > button { border-inline-start: 1px solid var(--grid-line); }
.time-gutter { position: sticky; left: 0; z-index: 2; background: white; color: var(--muted); }
.all-day { border-bottom: 1px solid var(--border); background: #fafcfb; }
.all-day .time-gutter { display: grid; place-items: center; min-width: 0; padding: 4px 2px; background: var(--page); text-align: center; font-size: 11px; line-height: 1.2; }
.all-day-cell { display: grid; align-content: start; min-width: 0; padding: 4px; gap: 4px; border-left: 1px solid var(--grid-line); }
.time-labels { font-variant-numeric: tabular-nums; font-size: 12px; text-align: right; padding-right: 7px; }
.time-labels > span { display: block; height: var(--hour-height); padding-top: 2px; }
.time-column {
  --half-hour: calc(var(--hour-height) / 2);
  position: relative; min-width: 0; height: calc(24 * var(--hour-height) + var(--tile-height)); border-left: 1px solid var(--grid-line); cursor: cell;
}
.time-column::before {
  position: absolute; content: ""; inset: 0 0 var(--tile-height); pointer-events: none;
  background: repeating-linear-gradient(to bottom,
    transparent 0 calc(var(--half-hour) - 1px),
    var(--grid-faint) calc(var(--half-hour) - 1px) var(--half-hour),
    transparent var(--half-hour) calc(var(--hour-height) - 1px),
    var(--grid-line) calc(var(--hour-height) - 1px) var(--hour-height));
}
.week-grid .time-column.today { background: #f5fcf7; }
.now-line { position: absolute; z-index: 3; left: 0; right: 0; height: 2px; background: var(--date-accent); pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: 0; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: inherit; }

.event-tile {
  --event-color: var(--task-default);
  display: flex; align-items: center; min-width: 0; width: 100%; min-height: var(--tap); padding: 4px 8px; container-type: inline-size;
  border: 1px solid color-mix(in srgb, var(--event-color) 12%, var(--border)); border-inline-start: 3px solid var(--event-color);
  border-radius: 9px; text-align: left; background: color-mix(in srgb, var(--event-color) 9%, white);
  box-shadow: 0 1px 2px #1a34200d; font-size: 13px; line-height: 1.22;
}
button.event-tile:hover { background: color-mix(in srgb, var(--event-color) 15%, white); }
.event-body { display: grid; gap: 2px; width: 100%; min-width: 0; }
.event-title { display: flex; align-items: center; gap: 4px; min-width: 0; }
.event-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; letter-spacing: -.01em; }
.event-meta { display: flex; align-items: baseline; gap: 5px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; }
.event-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.event-category { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.event-time + .event-category::before { content: '·'; margin-inline-end: 5px; }
.event-priority {
  display: inline-flex; align-items: center; flex: none; gap: 3px; padding: 2px 5px; border-radius: 6px;
  color: var(--muted); background: #eef2ef; font-size: 11px; font-weight: 700; line-height: 1.25; white-space: nowrap;
}
.event-priority[data-priority^="important"] { color: #175c43; background: #ddf2e6; }
.event-priority[data-priority$="-urgent"] { color: #8d3b31; background: #fae7df; }
.event-priority .icon { flex: none; width: 12px; height: 12px; stroke-width: 2.2; }
.week-agenda .event-meta { align-items: center; flex-wrap: wrap; }
.week-grid .event-meta { align-items: center; }
@container (max-width: 167px) {
  .week-grid .event-priority { padding-inline: 3px; }
  .week-grid .event-priority-label { display: none; }
}
.agenda-entries .event-tile { min-height: 53px; padding: 7px 8px; }
.agenda-entries .event-name { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.category-symbol {
  display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px;
  color: color-mix(in srgb, var(--category-color) 78%, var(--ink));
  background: color-mix(in srgb, var(--category-color) 25%, white);
}
.category-symbol .icon { width: 18px; height: 18px; stroke-width: 2; }
.event-tile.done { border-inline-start-color: color-mix(in srgb, var(--event-color) 48%, white); background: var(--page); }
.event-tile.done .event-name { color: var(--muted); text-decoration: line-through; }
.event-complete { display: flex; flex: none; color: var(--leaf); }
.event-complete .icon { width: 15px; height: 15px; stroke-width: 2.1; }
.timed-event {
  position: absolute; z-index: 2; top: var(--tile-top); left: calc(var(--tile-left) + 3px);
  width: calc(var(--tile-width) - 6px); height: var(--event-height, var(--tile-height)); min-height: 0; overflow: hidden;
}
.timed-event.is-tall, .timed-event.overlap-tile { align-items: flex-start; }
.timed-event.is-tall .event-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: anywhere;
}
.timed-event.is-short .event-body { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.timed-event.is-short .event-category { display: none; }
@container (max-width: 123px) {
  .event-time + .event-category, .is-short .event-meta { display: none; }
}
.overlap-tile { --event-color: #56977c; }

.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekdays { position: sticky; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid var(--border); }
.month-weekdays > span { padding: 10px 4px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 650; }
.month-grid { min-height: calc(100% - 40px); grid-template-rows: repeat(var(--weeks), minmax(108px, auto)); }
.month-cell { min-width: 0; border-right: 1px solid var(--grid-line); border-bottom: 1px solid var(--grid-line); padding: 4px; cursor: pointer; }
.month-cell:nth-child(7n) { border-right: 0; }
.month-cell.outside { background: var(--page); color: var(--muted); }
.month-cell:nth-child(7n):not(.today):not(.outside) { background: #f9fbf9; }
.month-cell.today { background: var(--date-tint); }
.month-date { display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border-radius: var(--radius); }
.month-date:hover, .month-day-button:hover { background: var(--tint); }
.month-number { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; font-size: 14px; font-weight: 625; }
.month-cell.today .month-number { background: var(--date-highlight); color: var(--mint-ink); }
.month-events { display: grid; gap: 3px; min-width: 0; }
.month-events > button.event-tile { min-height: 36px; padding-block: 2px; }
.month-events .event-category { display: none; }
.more-events { justify-self: start; min-height: var(--tap); padding: 4px 8px; border-radius: var(--tile-radius); color: var(--accent); font-size: 13px; font-weight: 690; }
button.more-events:hover { background: var(--tint); }

.primary, .secondary, .plain-button {
  display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 7px; min-height: var(--tap);
  padding: 6px 12px; border-radius: var(--radius); font-size: 15px; font-weight: 650; white-space: nowrap;
}
.primary { color: white; background: var(--primary); padding-inline: 16px; box-shadow: 0 2px 5px #00665723; }
.primary:hover { background: var(--primary-hover); }
.primary:focus-visible { outline-color: white; }
.secondary { color: var(--accent); background: var(--page); border: 1px solid var(--border); }
.secondary:hover, .plain-button:hover { background: var(--tint); }
.plain-button { color: var(--accent); }
.inbox-add { width: 100%; min-height: var(--tap); display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--leaf-tint); color: var(--leaf); border-radius: var(--radius); font-weight: 650; }
.inbox-add:hover { background: #d7f0e4; }
.simple-task-list { display: grid; gap: 6px; margin-top: 8px; }
.simple-task { display: flex; align-items: center; border: 1px solid var(--border); border-inline-start: 3px solid var(--event-color); border-radius: 12px; background: white; }
.task-check { display: grid; flex: none; place-items: center; position: relative; width: var(--tap); height: var(--tap); color: white; padding: 0; }
.task-check::before { position: absolute; content: ""; width: 18px; height: 18px; border: 1.5px solid #849a90; border-radius: 50%; }
.task-check .icon { position: relative; width: 14px; height: 14px; stroke-width: 2.1; }
.done .task-check::before { border-color: var(--leaf); background: var(--leaf); }
.task-name { display: grid; justify-items: start; align-content: center; gap: 2px; flex: 1; min-width: 0; min-height: var(--tap); padding: 6px 8px 6px 0; text-align: left; }
.task-name strong { font-size: 15px; overflow-wrap: anywhere; font-weight: 700; }
.task-name small { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.task-category { display: inline-flex; align-items: center; gap: 4px; }
.task-category .category-symbol { width: 20px; height: 20px; border-radius: 5px; }
.task-category .category-symbol .icon { width: 13px; height: 13px; }
.done .task-name strong { text-decoration: line-through; }
.empty-list { padding: 10px 3px 0; }
.completed-list summary { display: list-item; min-height: var(--tap); color: var(--muted); font-size: 14px; padding: 11px 2px; cursor: pointer; }
.inbox-footer { display: flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.inbox-footer > span { flex: 1; }
.completion-button { display: flex; align-items: center; gap: 7px; margin: 7px 0 0 auto; min-height: var(--tap); padding: 5px 8px; border-radius: var(--radius); color: var(--leaf); font-size: 14px; }
.completion-button:hover { background: var(--leaf-tint); }
.parse-hint { color: var(--accent); font-size: 13px; }

.bottom-sheet {
  --sheet-padding: 22px;
  --sheet-height: 560px;
  --sheet-available: var(--sheet-viewport-height, 100dvh);
  position: fixed; inset: auto 0 var(--sheet-viewport-bottom, 0px); width: min(100%, 540px); max-width: none;
  height: min(var(--sheet-height), max(320px, calc(var(--sheet-available) * .75)), calc(var(--sheet-available) - max(12px, env(safe-area-inset-top))));
  grid-template-rows: auto minmax(0, 1fr) auto; max-height: none; margin: 0 auto; padding: 0;
  border: 1px solid var(--glass-rim); border-bottom: 0; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  color: var(--ink); background: #fcfefc; box-shadow: 0 -16px 60px #112f282e; overflow: hidden;
  transform: translateY(var(--sheet-offset, 0px));
}
.bottom-sheet.shortcuts-sheet { --sheet-height: 344px; }
.bottom-sheet.sheet-compact {
  height: min(var(--sheet-height), calc(var(--sheet-available) - max(6px, env(safe-area-inset-top))));
}
.sheet-compact .sheet-grip { min-height: 14px; }
.sheet-compact .dialog-header { padding-bottom: 2px; }
.sheet-compact .sheet-footer { padding-block: 5px; }
.bottom-sheet.sheet-short { --tap: 44px; }
.sheet-short .sheet-grip { min-height: 10px; }
.sheet-short .sheet-footer { padding-block: 4px; }
.sheet-short .dialog-content { padding-top: 4px; scroll-padding-top: 4px; }
.sheet-short .task-form { gap: 6px; }
.sheet-short .task-title-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.sheet-short .schedule-field { min-height: 48px; padding-block: 2px; }
.bottom-sheet[open] { display: grid; }
.bottom-sheet::backdrop { background: #102c244d; opacity: var(--sheet-shade, 1); }
.bottom-sheet.sheet-leaving { pointer-events: none; }
.bottom-sheet.sheet-leaving::backdrop { opacity: 0; pointer-events: none; }
.sheet-chrome { min-width: 0; }
@media (prefers-reduced-motion: no-preference) {
  .bottom-sheet::backdrop { transition: opacity 260ms cubic-bezier(.2, .6, .35, 1); }
  .bottom-sheet.sheet-sizing::backdrop { transition: none; }
  @starting-style { .bottom-sheet[open]::backdrop { opacity: 0; } }
  .quick-add-menu:popover-open { animation: quick-menu-enter 235ms cubic-bezier(.2, .82, .22, 1); }
  @keyframes quick-menu-enter { from { opacity: .5; scale: .91; } }
  .create-button .icon { transition: rotate 180ms cubic-bezier(.2, .82, .22, 1); }
  .create-button, .today-button, .view-switch > button { transition: scale 155ms cubic-bezier(.2, .82, .22, 1); }
  .create-button:active, .today-button:active, .view-switch > button:active { scale: .95; }
}
.sheet-grip { display: grid; place-items: center; width: 100%; min-height: 24px; padding: 0; touch-action: none; cursor: grab; }
.sheet-grip:active { cursor: grabbing; }
.sheet-grip::before { width: 34px; height: 4px; border-radius: 999px; background: #81958b85; content: ''; }
.dialog-content {
  min-height: 0; padding: 8px var(--sheet-padding) max(18px, env(safe-area-inset-bottom));
  overflow: auto; overscroll-behavior: contain; scroll-padding-block: 8px; scrollbar-color: #cddbd1 transparent;
}
.sheet-footer { min-width: 0; padding: 9px var(--sheet-padding) max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #e5ede8; }
.sheet-footer .dialog-actions { margin: 0; }
.sheet-footer .primary {
  flex: 1; touch-action: manipulation; color: white; background: #08734e;
  border-radius: 18px; box-shadow: 0 2px 5px #00665729;
}
.sheet-footer .primary:hover { background-color: #006747; }
.plain-button.text-action {
  min-width: 92px; color: var(--muted); font-weight: 400; touch-action: manipulation;
  text-decoration: none;
}
.plain-button.text-action:hover, .plain-button.text-action:active { color: var(--ink); background: transparent; }
.task-error {
  margin: 0 0 6px; padding: 7px 10px; border: 1px solid #efdbd4; border-radius: 10px;
  color: var(--danger); background: #fbf2ee; font-size: 13px; font-weight: 640;
}
.dialog-header { display: flex; align-items: center; gap: 11px; padding: 0 var(--sheet-padding) 8px; touch-action: none; }
.dialog-header h2 { flex: 1; font-size: 25px; font-weight: 700; letter-spacing: -.04em; line-height: 1.12; }
.dialog-header .sheet-back { width: 42px; min-height: 42px; margin-inline-start: -8px; color: var(--accent); border-radius: 12px; }
.sheet-back .icon { width: 19px; height: 19px; stroke-width: 2; }
.dialog-header .review-date-cancel { color: var(--muted); }
.bottom-sheet[data-name="task"] .review-date-cancel { display: none; }
.bottom-sheet:has(#schedule-picker[data-field="reviewOn"]:not([hidden])) .review-date-cancel { display: inline-flex; }
.bottom-sheet:has(#schedule-picker[data-field="reviewOn"]:not([hidden])) .task-category-trigger { display: none; }
.discard-alert {
  position:fixed; inset:var(--confirmation-top,0) 0 auto; width:100%; height:var(--confirmation-height,100dvh);
  max-width:none; max-height:none; margin:0; border:0; padding:16px; padding-bottom:max(16px,env(safe-area-inset-bottom));
  align-items:end; justify-items:center; overflow:auto; color:var(--ink); background:transparent;
}
.discard-alert[open] {display:grid;}
.discard-alert::backdrop {background:#10251e5c;}
.discard-card { width: min(100%, 360px); min-width: 0; overflow-wrap: anywhere; padding: 18px; border-radius: 22px; background: white; box-shadow: 0 8px 32px #152f2826; }
.discard-alert h2 { font-size: 20px; line-height: 1.25; }
.discard-alert p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.discard-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.discard-button { color: var(--danger); }
.discard-button:hover { background: #f6edeb; }
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .bottom-sheet {
    background: #fbfefceb;
    -webkit-backdrop-filter: blur(24px) saturate(130%); backdrop-filter: blur(24px) saturate(130%);
  }
}
.dialog-copy { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.dialog-form, .extra-body { display: grid; gap: 10px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { color: var(--muted); font-size: 14px; font-weight: 650; }
.field input, .field textarea, .field select, .search-input {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fbfdfb; font-size: 16px;
}
.field input[type="date"], .field input[type="time"] { display: block; }
.field:has(select) { position: relative; }
.field select { appearance: none; padding-inline-end: 30px; }
.field:has(select)::after {
  content: ''; position: absolute; inset-inline-end: 13px; bottom: 21px; width: 7px; height: 7px;
  color: var(--muted); border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg); pointer-events: none;
}
.task-form { gap: 12px; }
.task-form [name="title"] { padding-inline: 12px; font-weight: 700; background: white; }
.task-form [name="title"]::placeholder { font-weight: 400; }
.schedule-fields {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  min-width: 0; margin: 0; padding: 0; border: 0;
}
.task-form[data-day-only] .schedule-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-form[data-day-only] [data-schedule-picker="endTime"] { display: none; }
.schedule-field {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center; gap: 1px 3px;
  min-width: 0; min-height: 56px; padding: 5px 9px; border: 1px solid #e3ece6; border-radius: 16px; background: #f3f8f5; text-align: start;
}
.schedule-field:hover, .schedule-field:focus-within, .schedule-field[aria-expanded="true"] { background: var(--tint); }
.schedule-field[aria-expanded="true"] { border-color: var(--primary); }
.schedule-label { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.schedule-field .icon { width: 13px; height: 13px; color: var(--muted); stroke-width: 2; }
.schedule-field[aria-expanded="true"] .icon { transform: rotate(180deg); }
.period-fields { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.period-fields legend { margin-bottom: 4px; padding: 0; color: var(--muted); font-size: 14px; font-weight: 650; }
.period-picker { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; text-align: center; border: 1px solid var(--border); border-radius: 16px; background: var(--wash); }
.period-picker strong { padding-inline: 4px; font-size: 15px; font-weight: 650; }
.task-form:has(.schedule-picker:not([hidden])) > :not(.schedule-fields, .schedule-picker, .sheet-popover) { display: none; }
.bottom-sheet:has(.schedule-picker:not([hidden])) .sheet-footer:not(:has(.task-create-cancel)),
.bottom-sheet:has(.schedule-picker:not([hidden])) .sheet-footer :is(.task-error, [data-action="save-task"]) { display: none; }
.schedule-picker { display: grid; gap: 8px; padding: 9px; background: white; border: 1px solid #e3ece6; border-radius: 18px; }
.time-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.time-entry input {
  min-width: 0; min-height: var(--tap); padding: 4px 12px; border: 1px solid #dce8e1; border-radius: 13px;
  background: #f3f8f5; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.time-entry input::placeholder { color: var(--muted); font-size: 16px; font-weight: 600; }
.time-entry .primary { border-radius: 13px; }
.time-suggestions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.time-suggestions > button { min-height: 44px; padding: 0 2px; border-radius: 11px; color: var(--accent); background: #f0f6f2; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.time-suggestions > button:is(:hover, [aria-pressed="true"]) { background: var(--tint); color: #084e34; }
.time-clear { justify-self: start; min-height: 42px; }
.schedule-month { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.schedule-month > button { display: grid; place-items: center; min-height: 44px; border-radius: var(--tile-radius); }
.schedule-month > button:hover { background: var(--wash); }
.schedule-month .icon { width: 16px; height: 16px; }
.schedule-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.schedule-days > span { color: var(--muted); font-size: 12px; font-weight: 650; }
.schedule-days > button { min-height: 40px; padding: 0; border-radius: var(--tile-radius); font-size: 14px; }
.schedule-days > button:is(:hover, [aria-current="date"]) { background: var(--tint); }
.schedule-days > button.outside { color: var(--muted); }
.schedule-days > button[aria-pressed="true"] { background: var(--primary); color: white; font-weight: 700; }
.schedule-days > button[aria-pressed="true"]:focus-visible { outline-color: white; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.task-category-value { display: flex; align-items: center; flex: 1; min-width: 0; font-size: 14px; font-weight: 640; }
.task-category-trigger, .sheet-select-button {
  display: flex; align-items: center; gap: 6px; min-width: 0; min-height: var(--tap); padding: 6px 10px;
  border: 1px solid #e3ece6; border-radius: var(--radius); background: #f3f8f5; color: var(--ink); text-align: start;
}
.task-category-trigger { flex: 0 1 auto; max-width: 48%; min-height: 36px; border-radius: 999px; }
.task-category-trigger .task-category-value { gap: 5px; font-size: 13px; }
.task-category-trigger .task-category-value span:last-child, .sheet-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-category-trigger .category-neutral { display: none; }
.task-category-trigger .category-symbol { width: 8px; height: 8px; border-radius: 50%; background: var(--category-color); }
.task-category-trigger .category-symbol .icon { display: none; }
.task-category-trigger > .icon, .sheet-select-button > .icon { width: 14px; height: 14px; margin-inline-start: auto; color: var(--muted); }
.task-category-trigger[aria-expanded="true"], .sheet-select-button[aria-expanded="true"] { background: var(--tint); border-color: #76b39a; }
.task-category-trigger[aria-expanded="true"] > .icon, .sheet-select-button[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.sheet-compact .task-category-trigger { min-height: 32px; padding-block: 3px; }
.sheet-select-button { font-size: 14px; font-weight: 650; }
.category-icon-current { display: flex; align-items: center; color: var(--accent); }
.category-icon-current .icon { width: 18px; height: 18px; }
.sheet-popover {
  position: fixed; inset: auto; width: min(252px, calc(100vw - 16px)); min-width: 0; margin: 0; padding: 6px;
  gap: 6px; overflow: hidden; border: 1px solid #e3ece6; border-radius: 16px; color: var(--ink); background: #fff;
  box-shadow: 0 8px 32px #1230262b, 0 2px 6px #12302613;
}
.sheet-popover:popover-open { display: flex; flex-direction: column; }
.sheet-popover > :is(.category-choices, .sheet-options, .icon-options) { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-popover > .category-new { flex: 0 0 auto; min-height: 44px; border-radius: 10px; }
.sheet-options { display: grid; gap: 3px; }
.sheet-option { min-height: 44px; padding: 5px 9px; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 650; text-align: start; }
.sheet-option:hover { background: var(--wash); }
.sheet-option[aria-pressed="true"] { border-color: #add7c3; color: #084e34; background: #ddf5e8; }
.sheet-popover .icon-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sheet-popover .icon-option { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .sheet-popover:popover-open { animation: quick-menu-enter 170ms cubic-bezier(.2, .82, .22, 1); }
}
.category-choices { display: grid; gap: 6px; }
.category-choice {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 5px 9px;
  border: 1px solid var(--card-border); border-radius: 12px; background: white; text-align: left; font-size: 14px; font-weight: 640;
}
.category-choice > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.category-choice:hover { background: var(--wash); }
.filter-sorting h3, .filter-categories-title { margin: 0 0 6px 2px; color: var(--muted); font-size: 13px; font-weight: 700; }
.filter-categories-title { margin-top: 14px; }
.filter-sort-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 13px; background: var(--wash); }
.filter-sort-options button { min-height: 44px; padding: 4px; border-radius: 9px; font-size: 13px; font-weight: 650; line-height: 1.2; }
.filter-sort-options button[aria-pressed="true"] { color: var(--accent); background: white; box-shadow: 0 1px 3px #17312218; }
.category-choice[aria-pressed="true"] { border-color: #499877; color: #084e34; background: #ddf5e8; }
.category-neutral { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; color: var(--accent); background: var(--wash); }
.category-neutral .icon { width: 16px; height: 16px; }
.dialog-content .category-neutral { display: none; }
.dialog-content .category-symbol, .category-order-ghost .category-symbol { order: 1; width: 9px; height: 9px; border-radius: 50%; background: var(--category-color); }
.dialog-content .category-symbol .icon, .category-order-ghost .category-symbol .icon { display: none; }
.dialog-content .category-edit > .icon { order: 2; }
.field textarea { min-height: 67px; resize: vertical; }
.field small, .form-note { color: var(--muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
fieldset.field-row { min-width: 0; margin: 0; padding: 0; border: 0; }
.extra-fields { border-block: 1px solid var(--border); }
.extra-fields summary { display: flex; align-items: center; gap: 9px; min-height: var(--tap); padding: 8px 2px; color: var(--accent); font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
.extra-fields summary::-webkit-details-marker { display: none; }
.extra-fields summary .icon { width: 16px; height: 16px; }
.extra-fields summary > span { flex: 1; }
.extra-fields[open] summary .icon:last-child { transform: rotate(180deg); }
.extra-body { padding: 3px 0 10px; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; margin-top: 3px; }
.danger { color: var(--danger); margin-right: auto; }
.danger:hover { background: #f6edeb; }
.category-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--tap);
  padding: 6px 10px; border-radius: var(--radius); background: var(--tint); color: var(--accent); font-weight: 700;
}
.category-new:hover { background: #c5f4d3; }
.categories-order-button { color: var(--muted); }
.categories-order-button:hover { color: var(--accent); background: var(--tint); }
.category-order-done { min-height: 38px; }
.category-order-row { width: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-touch-callout: none; }
.category-order-row:active { cursor: grabbing; }
.category-order-row > .icon { order: 2; stroke-width: 2.5; }
.dialog-content:has(.category-order-list) { overflow-anchor: none; }
.category-order-placeholder { opacity: .23; }
.category-order-ghost { position: absolute; z-index: 1; top: 0; pointer-events: none; background: white; box-shadow: var(--glass-shadow); }
.categories-edit { display: grid; gap: 4px; margin-top: 10px; }
.category-edit {
  display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 5px 8px;
  border-radius: var(--tile-radius); background: var(--page); text-align: left;
}
.category-edit:hover { background: var(--wash); }
.category-edit > span:nth-child(2) { flex: 1; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.category-edit > .icon { width: 17px; height: 17px; color: var(--muted); }
.color-options { display: flex; flex-wrap: wrap; gap: 4px; }
.color-option { width: var(--tap); height: var(--tap); border: 7px solid white; border-radius: 50%; background: var(--cat); }
.color-option[aria-pressed="true"] { outline: 2px solid var(--focus); outline-offset: -3px; }
.category-picked { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; }
.category-picked input { width: var(--tap); height: var(--tap); padding: 5px; }
.category-colors { min-width: 0; margin: 0; padding: 0; border: 0; }
.category-colors legend { margin-bottom: 4px; padding: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.icon-options { display: flex; flex-wrap: wrap; gap: 5px; }
.icon-option {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted);
}
.icon-option:hover { background: var(--page); }
.icon-option[aria-pressed="true"] {
  border-color: var(--picker-color);
  color: color-mix(in srgb, var(--picker-color) 78%, var(--ink));
  background: color-mix(in srgb, var(--picker-color) 15%, white);
}
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border: 0; }
.settings-row strong { font-size: 15px; }
.settings-row p { font-size: 13px; color: var(--muted); }
.switch-label { display: flex; align-items: center; gap: 8px; min-height: var(--tap); color: var(--muted); font-size: 14px; }
.switch-label input { width: 19px; height: 19px; accent-color: var(--accent); }
.search-results { display: grid; gap: 6px; margin-top: 9px; }
.search-result {
  display: grid; width: 100%; min-height: var(--tap); gap: 2px; padding: 7px 9px; text-align: left;
  border: 1px solid var(--border); border-inline-start: 3px solid var(--event-color); border-radius: var(--tile-radius); background: white;
}
.search-result:hover { background: var(--page); }
.search-result strong { font-size: 15px; overflow-wrap: anywhere; }
.search-result small { font-size: 13px; color: var(--muted); }
.storage-notice { margin: 5px 0 0; padding: 6px 9px; border-radius: 9px; color: var(--danger); background: #fbf2ee; font-size: 13px; }


@media (min-width: 901px) {
  .bottom-sheet.shortcuts-sheet { --sheet-height: 165px; }
}

@media (max-width: 900px) {
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { display: none; }
  .view-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
  :root { --gutter: 47px; }
  .topbar { padding: 6px 8px; }
  .toolbar-summary { gap: 7px; padding: 4px 8px; }
  .toolbar-sticky { gap: 3px; padding-inline: 4px; }
  .toolbar-right { gap: 1px; }
  .toolbar-right .icon-button, .search-button { width: 44px; }
  .toolbar-right .icon-button, .search-button { border-radius: 50%; }
  .search-button { padding: 0; border: 0; background: none; }
  .search-button > span { display: none; }
  .period-title { font-size: clamp(19px, 5.25vw, 26px); }
  .period-details { font-size: 12px; }
  .period-control { gap: 4px; }
  .view-switch { flex: 1; gap: 2px; }
  .view-switch > button { gap: 4px; padding: 0 3px; font-size: 13px; }
  .view-switch > button .icon { width: 15px; height: 15px; }
  .creation-dock { position: fixed; z-index: 6; bottom: calc(16px + env(safe-area-inset-bottom)); right: 14px; gap: 8px; }
  .create-button, .create-button:hover, .create-button[aria-expanded="true"] {
    width: 60px; height: 60px; padding: 0; border: 1px solid var(--glass-rim); border-radius: 50%;
    box-shadow: var(--glass-shadow);
  }
  .create-button > span { display: none; }
  .create-button .icon { width: 24px; height: 24px; stroke-width: 2; }
  @supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
    .create-button {
      background-color: #48e49ce6;
      -webkit-backdrop-filter: blur(14px) saturate(155%); backdrop-filter: blur(14px) saturate(155%);
      box-shadow: 0 6px 18px #008f5056, inset 0 1px 2px #fff, inset 0 -2px 2px #027f4966;
    }
    .create-button:hover, .create-button[aria-expanded="true"] { background-color: #6fe9ac; }
  }
  .workspace { margin: 0 8px 8px; border-radius: 17px; touch-action: pan-y pinch-zoom; user-select: none; }
  .calendar-scroll { touch-action: pan-y pinch-zoom; overscroll-behavior-x: contain; }
  .time-scroll, .month-scroll, .week-agenda { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .day-strip { gap: 3px; padding: 5px 7px; }
  .day-heading { min-height: 61px; gap: 2px; }
  .day-heading > strong { width: 29px; height: 29px; font-size: 17px; }
  .time-labels { padding-right: 4px; }
  .month-grid { grid-template-rows: repeat(var(--weeks), minmax(78px, 1fr)); }
  .month-day-button { display: flex; flex-direction: column; align-items: stretch; padding: 3px 2px; text-align: left; }
  .month-number { width: 25px; height: 25px; margin-bottom: 3px; font-size: 13px; }
  .month-events { gap: 2px; }
  .month-events .event-tile { min-height: 18px; padding: 1px 2px; font-size: 10.5px; border-inline-start-width: 2px; border-radius: 4px; box-shadow: none; }
  .month-events .event-complete { display: none; }
  .month-events .more-events { min-height: 0; padding: 0 3px; font-size: 11px; }
  .dialog-header { gap: 8px; }
  .dialog-header h2 { font-size: clamp(21px, 6.2vw, 25px); }
  .bottom-sheet { --sheet-padding: 16px; width: 100%; border-inline: 0; }
}

@media (max-width: 385px) {
  .view-switch > button .icon { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .toolbar-sticky::before, .quick-add-menu, .bottom-sheet, .create-button {
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .toolbar-sticky::before, .quick-add-menu { background: #f3f6f4; }
  .bottom-sheet, .dialog-content { background: white; }
  .create-button { background: #77efab; }
}

.uncategorized-dock {
  position: fixed; z-index: 6; inset-inline-start: 246px; bottom: calc(18px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 11px;
  border: 1px solid var(--glass-rim); border-radius: 999px; color: var(--accent); background: #f8fcf9ee;
  box-shadow: var(--glass-shadow); font-size: 14px; font-weight: 700;
}
.uncategorized-dock > .icon { width: 17px; height: 17px; }
.uncategorized-dock small { min-width: 22px; padding: 1px 4px; border-radius: 999px; background: var(--tint); text-align: center; }
@media (max-width: 900px) { .uncategorized-dock { inset-inline-start: 14px; } }
@media (min-width: 691px) {
  .time-scroll, .month-scroll, .week-agenda { padding-bottom: 68px; }
}
.task-think {
  flex: none; max-width: 40%; min-height: 44px; margin: 3px; padding: 4px 8px;
  border-radius: 10px; color: var(--accent); background: #eef7f1; font-size: 12px; font-weight: 700;
}
.task-think:hover, .task-think.is-due { background: var(--tint); }

.priority-header { display: flex; align-items: center; gap: 6px; min-height: 46px; }
.priority-header .icon-button { color: var(--accent); }
.priorities-open .workspace { margin-bottom: 8px; padding: 8px; background: transparent; border: 0; box-shadow: none; }
.priority-board { display: grid; grid-template-rows: minmax(0, 3fr) minmax(0, 1fr); flex: 1; min-height: 0; gap: 8px; }
.priority-grid { display: grid; grid-template: repeat(2, minmax(0, 1fr)) / repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 0; }
.priority-zone {
  display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 0; padding: 7px;
  border: 1px solid #dce8e2; border-radius: 15px; background: #f4f8f5;
}
.priority-zone[data-priority-zone="important-urgent"] { background: #f9eee9; border-color: #ecded7; }
.priority-zone[data-priority-zone="important-later"] { background: #e8f5ed; border-color: #d9e7de; }
.priority-zone[data-priority-zone="other-urgent"] { background: #f8f3ed; border-color: #e9e2d9; }
.priority-zone[data-priority-zone="unassigned"] { background: #f9fbf9; border-style: dashed; }
.priority-zone h2 { display: flex; align-items: start; justify-content: space-between; gap: 4px; margin: 2px 1px; font-size: clamp(12px, 3.3vw, 15px); line-height: 1.25; }
.priority-zone h2 small { flex: none; color: var(--muted); font-size: 11px; }
.priority-stack { display: grid; align-content: start; gap: 5px; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; }
@media (pointer: coarse) { .priority-stack { padding-inline-end: 8px; } }
.priority-zone[data-priority-zone="unassigned"] .priority-stack { grid-template-columns: repeat(2, minmax(0,1fr)); }
.priority-card {
  display: flex; min-width: 0; min-height: 46px; border: 1px solid #dfe7e2; border-inline-start: 3px solid var(--priority-color);
  border-radius: 10px; background: white; box-shadow: 0 1px 2px #17312210;
  touch-action: none; cursor: grab; -webkit-touch-callout: none;
}
.priority-card:active { cursor: grabbing; }
.priority-task-name { display: grid; align-content: center; flex: 1; gap: 1px; padding: 4px 0 4px 6px; min-width: 0; text-align: start; cursor: inherit; }
.priority-task-name strong {
  display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px;
}
.priority-task-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
.priority-card.is-done strong { color: var(--muted); text-decoration: line-through; }
.priority-grip { display: grid; place-items: center; flex: none; width: 44px; min-height: 44px; padding: 0; color: var(--muted); cursor: inherit; }
.priority-grip .icon { width: 16px; height: 16px; stroke-width: 3; }
.priority-drop-target { outline: 2px solid #08734e; outline-offset: -2px; }
.priority-drag-source { opacity: .35; }
.priority-ghost { position: fixed; inset: 0 auto auto 0; z-index: 20; pointer-events: none; box-shadow: 0 8px 20px #14312633; }
