:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --text: #060607;
  --text-secondary: #858780;
  --mono: #6d7068;
  --accent-red: #ff3b30;
  --accent-orange: #ff3b30;
  --accent-blue: #9cff00;
  --accent-green: #9cff00;
  --accent-yellow: #c9cec3;
  --hairline: rgba(6, 6, 7, 0.09);
  --shadow: rgba(6, 6, 7, 0.08);
  --dock: rgba(255, 255, 255, 0.92);
  --radius-card: 22px;
  --radius-pill: 100px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050605;
  --bg-soft: #10110f;
  --surface: rgba(18, 19, 17, 0.94);
  --surface-strong: rgba(28, 30, 26, 0.98);
  --text: #f8f8f4;
  --text-secondary: #aaaea4;
  --mono: #c3c7bd;
  --hairline: rgba(255, 255, 255, 0.11);
  --shadow: rgba(0, 0, 0, 0.5);
  --dock: rgba(18, 19, 17, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(145deg, rgba(156, 255, 0, 0.07), transparent 28rem),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 56%, #f1f2ed 100%);
  color: var(--text);
  transition: background 400ms ease, color 400ms ease;
}

[data-theme="dark"] body {
  background:
    linear-gradient(145deg, rgba(156, 255, 0, 0.08), transparent 22rem),
    linear-gradient(160deg, #050605 0%, #0d0e0c 58%, #030403 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.app-shell {
  min-height: 100vh;
}

.phone-frame {
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px 140px;
  position: relative;
}

.topbar {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.date-kicker {
  color: var(--mono);
  font-family: "Space Mono", monospace;
  font-size: 13px;
}

.red-dot,
.task-dot,
.badge-dot {
  background: var(--accent-red);
  border-radius: 999px;
  display: inline-block;
  height: 6px;
  margin-left: 5px;
  vertical-align: middle;
  width: 6px;
}

.display-title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 0.96;
  margin: 5px 0 0;
}

.icon-button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  transition: transform 180ms ease, background 180ms ease;
  width: 42px;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface);
  outline: none;
  transform: scale(1.04);
}

.mono-label {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timestamp-pill {
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  border: 1px dashed color-mix(in srgb, var(--text) 24%, transparent);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 4px 9px;
  white-space: nowrap;
}

.today-insights {
  display: flex;
  gap: 8px;
  margin: 10px 0 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.today-insights span {
  align-items: center;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  text-transform: uppercase;
}

.today-insights strong {
  color: var(--text);
  font-size: 12px;
}

.today-page {
  padding-bottom: 116px;
}

.today-topbar {
  margin-bottom: 14px;
}

.today-hero {
  align-items: center;
  border-radius: 28px;
  display: grid;
  gap: 16px;
  grid-template-columns: 88px minmax(0, 1fr);
  margin: 8px 0 12px;
  padding: 16px;
}

.today-progress {
  align-items: center;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, var(--surface-strong) 0 57%, transparent 58%),
    conic-gradient(var(--accent-green) var(--progress), color-mix(in srgb, var(--text) 10%, transparent) 0);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.today-progress span {
  font-size: 25px;
  font-weight: 760;
  line-height: 1;
}

.today-progress small {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  margin: 8px 0 0 1px;
}

.today-hero-copy {
  min-width: 0;
}

.today-hero-copy h2 {
  font-size: 21px;
  line-height: 1.1;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.today-hero-copy p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  margin: 8px 0 0;
}

.today-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
}

.today-actions button {
  align-items: center;
  border-radius: 20px;
  color: var(--text);
  display: grid;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 7px;
  justify-items: center;
  min-height: 74px;
  min-width: 0;
  padding: 10px 6px;
  text-transform: uppercase;
}

.today-actions svg {
  height: 22px;
  width: 22px;
}

.today-actions button:hover,
.today-actions button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.today-compact {
  align-items: center;
  border-radius: 22px;
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 10px;
  padding: 8px;
}

.today-compact button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--text);
  display: grid;
  font-family: "Space Mono", monospace;
  font-size: 9px;
  gap: 4px;
  justify-items: center;
  min-height: 52px;
  min-width: 0;
  padding: 7px 4px;
  text-transform: uppercase;
  transition: transform 160ms ease, background-color 160ms ease;
}

.today-compact button:active {
  transform: scale(0.97);
}

.today-compact svg {
  height: 18px;
  width: 18px;
}

.today-metrics {
  border: 1px solid var(--hairline);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
  overflow: hidden;
}

.today-metrics span {
  border-right: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 12px 6px;
  text-align: center;
  text-transform: uppercase;
}

.today-metrics span:last-child {
  border-right: 0;
}

.today-metrics strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 5px;
}

.today-tags {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.today-tags span {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 7px 10px;
  text-transform: uppercase;
}

.today-section-heading {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin: 18px 0 10px;
}

.today-section-heading h2 {
  font-size: 24px;
  line-height: 1;
  margin: 4px 0 0;
}

.today-scope {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
}

.today-scope button {
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  min-width: 48px;
  padding: 8px 10px;
  text-transform: uppercase;
}

.today-scope button.active {
  background: var(--text);
  color: var(--bg);
}

.view-toggle {
  align-items: center;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: inline-grid;
  gap: 3px;
  grid-template-columns: repeat(2, 34px);
  padding: 3px;
}

.view-toggle button {
  align-items: center;
  background: transparent;
  border-radius: 999px;
  color: var(--text-secondary);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: 34px;
}

.view-toggle button.active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 7px 18px color-mix(in srgb, var(--shadow) 48%, transparent);
}

.view-toggle button:active {
  transform: scale(0.96);
}

.view-toggle svg {
  height: 16px;
  width: 16px;
}

.task-toolbar,
.calendar-list-tools {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.task-toolbar {
  margin-top: 14px;
}

.task-toolbar .filter-row {
  flex: 1;
  margin-top: 0;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.page {
  animation: pageIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.timeline {
  margin-top: 12px;
  padding-left: 58px;
  position: relative;
}

.timeline::before {
  border-left: 1px dashed color-mix(in srgb, var(--text) 20%, transparent);
  bottom: 0;
  content: "";
  left: 32px;
  position: absolute;
  top: 14px;
}

.timeline-group {
  margin-bottom: 28px;
  position: relative;
}

.timeline-group > .timestamp-pill {
  left: -54px;
  position: absolute;
  top: 0;
  transform: translateX(-10%);
}

.timeline-content {
  padding-top: 46px;
}

.journal {
  font-size: 16px;
  line-height: 1.48;
  margin: 0 0 18px;
}

.timeline-today {
  margin-top: 0;
  padding: 0 0 18px;
}

.timeline-today::before {
  border-left-color: color-mix(in srgb, var(--text) 13%, transparent);
  left: 76px;
  top: 8px;
}

.timeline-today .timeline-group {
  display: grid;
  gap: 14px;
  grid-template-columns: 88px minmax(0, 1fr);
  margin-bottom: 16px;
}

.timeline-today .timeline-group > .timestamp-pill {
  align-self: start;
  justify-self: start;
  left: auto;
  position: sticky;
  top: 18px;
  transform: none;
  z-index: 1;
}

.timeline-today .timeline-content {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 0;
}

.timeline-today .journal {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  padding: 14px;
}

.timeline-today .task-item {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 14px;
}

.timeline-today .task-title {
  font-size: 17px;
}

.timeline-grid-mode {
  padding-left: 0;
}

.timeline-grid-mode::before {
  display: none;
}

.timeline-grid-mode .task-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-grid-mode .task-item {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 148px;
  padding: 13px;
}

.timeline-grid-mode .task-actions {
  display: none;
}

.timeline-grid-mode .task-title {
  font-size: 15px;
}

.timeline-grid-mode .task-notes {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.journal-card {
  display: grid;
  gap: 10px;
  min-height: 148px;
}

.journal-card .timestamp-pill {
  justify-self: start;
  position: static;
  transform: none;
}

.journal-card p {
  margin: 0;
}

.task-item {
  align-items: flex-start;
  border-bottom: 1px dashed var(--hairline);
  display: grid;
  gap: 12px;
  grid-template-columns: 28px 1fr auto;
  padding: 14px 0;
  position: relative;
  transition: opacity 220ms ease, transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.task-item.completed {
  background: color-mix(in srgb, var(--accent-green) 8%, transparent);
  border-color: color-mix(in srgb, var(--accent-green) 28%, transparent);
  opacity: 0.78;
  transform: translateY(-1px);
}

.task-item.completed-pop {
  animation: completeSettle 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.task-item.completed-pop::before {
  animation: completeGlow 720ms ease both;
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-green) 28%, transparent);
  border-radius: 18px;
  bottom: 6px;
  content: "";
  left: -10px;
  opacity: 0;
  position: absolute;
  right: -10px;
  top: 6px;
  z-index: -1;
}

.task-item.completed::after,
.stash-card.completed::after {
  background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 14px;
  position: absolute;
  right: 14px;
}

.task-checkbox {
  align-items: center;
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--text) 20%, transparent);
  border-radius: 7px;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  margin-top: 1px;
  transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 22px;
}

.task-checkbox.checked {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--text);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-green) 16%, transparent);
}

.task-title {
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
  position: relative;
}

.task-title::after {
  background: currentColor;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  top: 52%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
  width: 100%;
}

.completed .task-title::after {
  background: var(--accent-green);
  transform: scaleX(1);
}

.task-notes {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  margin: 6px 0 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.badge {
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: var(--radius-pill);
  color: var(--mono);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 2px 9px;
}

.badge.filled {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.priority-high,
.priority-badge.priority-high,
.stash-priority.high {
  --priority-color: var(--accent-red);
}

.priority-medium,
.priority-badge.priority-medium,
.stash-priority.medium {
  --priority-color: var(--accent-green);
}

.priority-low,
.priority-badge.priority-low,
.stash-priority.low {
  --priority-color: var(--mono);
}

.task-item.priority-high,
.stash-card.priority-high {
  border-color: color-mix(in srgb, var(--priority-color) 22%, var(--hairline));
}

.priority-badge,
.stash-priority {
  background: color-mix(in srgb, var(--priority-color, var(--text)) 12%, transparent);
  border-color: color-mix(in srgb, var(--priority-color, var(--text)) 34%, transparent);
  color: color-mix(in srgb, var(--priority-color, var(--text)) 86%, var(--text));
}

.task-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.expand {
  color: var(--accent-green);
  font-size: 25px;
  line-height: 1;
  padding-top: 3px;
}

.quick-input {
  align-items: center;
  border-radius: var(--radius-pill);
  bottom: calc(100px + env(safe-area-inset-bottom));
  display: grid;
  gap: 12px;
  grid-template-columns: 24px 1fr 24px;
  left: 50%;
  max-width: 320px;
  padding: 13px 18px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 64px);
  z-index: 20;
}

.quick-input span {
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-row,
.segmented {
  display: flex;
  gap: 7px;
  margin: 18px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.search-field {
  align-items: center;
  border-radius: var(--radius-pill);
  display: grid;
  gap: 10px;
  grid-template-columns: 22px 1fr;
  margin: 18px 0 8px;
  padding: 11px 14px;
}

.search-field input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-size: 13px;
  outline: none;
  text-transform: uppercase;
  width: 100%;
}

.pill-toggle {
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 8px 13px;
  text-transform: uppercase;
}

.pill-toggle.active {
  background: var(--text);
  color: var(--bg);
}

.empty-state {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  line-height: 1.5;
  padding: 44px 14px;
  text-align: center;
}

.calendar-page-header {
  margin-bottom: 12px;
}

.calendar-page-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.3;
  margin: 10px 0 0;
}

.calendar-card {
  display: grid;
  gap: 18px;
  margin: 18px auto 22px;
  overflow: hidden;
  padding: 18px;
  width: 100%;
}

.calendar-card-v2 {
  gap: 10px;
  margin: 14px auto 18px;
  padding: 12px;
}

.calendar-commandbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.calendar-mini-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.calendar-today-button {
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-size: 9px;
  min-height: 38px;
  padding: 0 12px;
  text-transform: uppercase;
}

.calendar-compact-title {
  align-items: center;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.calendar-compact-title h2 {
  font-size: 24px;
  line-height: 1;
  margin: 4px 0 0;
}

.calendar-compact-title p {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 14px;
  margin: 0;
  text-align: right;
  text-transform: uppercase;
}

.calendar-compact-title p strong {
  color: var(--text);
}

.calendar-grid-v2 {
  background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 6px;
}

.calendar-grid-v2 .day-cell {
  min-height: 46px;
}

.calendar-grid-v2 .day-cell.has-items:not(.selected) {
  background: color-mix(in srgb, var(--accent-green) 8%, transparent);
}

.calendar-grid-v2 .task-dot.high {
  background: var(--accent-red);
}

.calendar-grid-v2 .task-dot.medium {
  background: var(--accent-green);
}

.calendar-grid-v2 .task-dot.low {
  background: var(--mono);
}

.calendar-actions-v2 {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.calendar-actions-v2 .calendar-action {
  gap: 8px;
}

.calendar-actions-v2 svg {
  height: 18px;
  width: 18px;
}

.calendar-feedback {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  padding: 9px 11px;
  text-align: center;
}

.calendar-top,
.calendar-monthbar,
.calendar-selected,
.calendar-actions,
.calendar-list-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.calendar-settings-wrap {
  position: relative;
}

.calendar-settings-menu {
  border-radius: 18px;
  display: grid;
  gap: 2px;
  min-width: 146px;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
}

.calendar-settings-menu button {
  background: transparent;
  border-radius: 12px;
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
}

.calendar-settings-menu button:hover,
.calendar-settings-menu button:focus-visible {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  outline: none;
}

.calendar-mode {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  width: min(178px, 58%);
}

.calendar-mode button,
.calendar-action,
.calendar-nav {
  border-radius: var(--radius-pill);
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
}

.calendar-mode button {
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 8px 10px;
}

.calendar-mode button.active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--shadow) 65%, transparent);
}

.calendar-monthbar {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}

.calendar-monthbar > div {
  display: grid;
  gap: 3px;
  justify-items: center;
}

.calendar-monthbar strong {
  font-size: 27px;
  line-height: 1;
}

.calendar-nav {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: inline-flex;
  font-size: 25px;
  height: 38px;
  justify-content: center;
  line-height: 1;
  min-width: 38px;
  padding: 0 0 3px;
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  width: 38px;
}

.calendar-nav span {
  display: block;
  transform: translateY(-1px);
}

.calendar-nav:hover,
.calendar-nav:focus-visible,
.calendar-today-button:hover,
.calendar-today-button:focus-visible {
  background: color-mix(in srgb, var(--accent-green) 18%, var(--surface-strong));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--shadow) 34%, transparent);
  outline: none;
}

.calendar-nav:active,
.calendar-today-button:active {
  transform: scale(0.96);
}

.calendar-selected {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 14px 16px;
}

.calendar-selected span {
  color: var(--text-secondary);
  font-size: 15px;
}

.calendar-selected strong {
  font-size: 42px;
  line-height: 0.9;
}

.week-grid,
.month-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  text-align: center;
}

.month-grid {
  gap: 3px;
}

.day-cell {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
  padding: 8px 2px 7px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.day-cell:hover,
.day-cell:focus-visible {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  outline: none;
}

.day-cell.selected {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-1px);
}

.day-cell.today:not(.selected) {
  border-color: color-mix(in srgb, var(--accent-green) 55%, transparent);
}

.day-cell.outside {
  opacity: 0.36;
}

.month-grid .day-cell {
  border-radius: 12px;
  gap: 2px;
  padding: 4px 1px;
}

.month-grid .day-number {
  font-size: 15px;
  height: 20px;
  width: 20px;
}

.day-name {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.day-number {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  font-weight: 650;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.task-dots {
  align-items: center;
  display: flex;
  gap: 3px;
  height: 5px;
  justify-content: center;
}

.task-dot {
  background: currentColor;
  border-radius: 999px;
  display: inline-block;
  height: 4px;
  opacity: 0.52;
  width: 4px;
}

.calendar-actions {
  gap: 10px;
}

.calendar-action {
  align-items: center;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.calendar-action.secondary {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--text-secondary);
}

.calendar-action.primary {
  background: var(--text);
  color: var(--bg);
}

.calendar-summary {
  justify-self: center;
  margin: -4px 0 0;
}

.calendar-list {
  margin-top: 12px;
}

.calendar-list-heading {
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
  padding: 0 2px 10px;
}

.calendar-list-heading strong {
  align-items: center;
  background: var(--text);
  border-radius: 999px;
  color: var(--bg);
  display: inline-flex;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  height: 24px;
  justify-content: center;
  min-width: 24px;
}

.stash-summary {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 54px 1fr 46px;
  margin: 22px 0 14px;
  padding: 16px;
}

.folders-page .display-title {
  font-size: clamp(34px, 8vw, 50px);
}

.folder-hero {
  align-items: center;
  border-radius: 28px;
  display: grid;
  gap: 14px;
  grid-template-columns: 58px minmax(0, 1fr) 52px;
  margin: 18px 0 12px;
  padding: 16px;
}

.folder-hero-icon,
.folder-create {
  align-items: center;
  border-radius: 18px;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.folder-hero-icon {
  background: color-mix(in srgb, var(--folder-color) 80%, var(--text));
  color: var(--bg-soft);
}

.folder-hero-icon svg,
.folder-create svg,
.folder-tool-actions svg {
  height: 21px;
  width: 21px;
}

.folder-hero h2 {
  font-size: 24px;
  line-height: 1;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.folder-hero p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  margin: 8px 0 0;
}

.folder-create {
  background: var(--text);
  color: var(--bg);
}

.folder-strip {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.folder-pill {
  align-items: center;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  text-transform: uppercase;
}

.folder-pill span {
  background: color-mix(in srgb, var(--folder-color) 86%, var(--text));
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.folder-pill strong {
  color: var(--text);
}

.folder-pill.active {
  background: var(--text);
  color: var(--bg);
}

.folder-pill.active strong {
  color: var(--bg);
}

.folder-tools {
  align-items: stretch;
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
  padding: 8px;
}

.folder-tools .stash-search {
  margin: 0;
}

.folder-tool-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, 42px);
}

.folder-tool-actions button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  font-family: "Space Mono", monospace;
  font-size: 8px;
  gap: 3px;
  justify-items: center;
  min-height: 44px;
  min-width: 0;
  padding: 6px 4px;
  text-transform: uppercase;
}

.folder-tool-actions button svg {
  height: 17px;
  width: 17px;
}

.folder-tool-actions button[data-action="delete"] {
  color: var(--accent-red);
}

.folder-tools .view-toggle-slot {
  grid-column: 1 / -1;
  justify-self: end;
}

.folder-task-list {
  padding-bottom: 26px;
}

.folder-task-list.folder-grid-mode {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.folder-card {
  grid-template-columns: 72px minmax(0, 1fr);
  position: relative;
}

.stash-card.folder-card-grid {
  grid-template-columns: 1fr;
}

.folder-move {
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: 12px;
  padding: 8px 10px;
}

.folder-move select {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  min-width: 0;
  outline: none;
  text-align: right;
}

.stash-summary-icon,
.stash-summary-add {
  align-items: center;
  border-radius: 18px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.stash-summary-icon {
  background: var(--text);
  color: var(--bg);
}

.stash-summary-icon svg,
.stash-summary-add svg,
.stash-actions svg {
  height: 20px;
  width: 20px;
}

.stash-summary strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin: 2px 0 6px;
}

.stash-summary p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.stash-summary-add {
  background: var(--text);
  color: var(--bg);
}

.stash-toolbar {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.stash-search {
  align-items: center;
  border-radius: var(--radius-pill);
  display: grid;
  gap: 9px;
  grid-template-columns: 20px 1fr;
  padding: 10px 13px;
}

.stash-search input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
  outline: none;
}

.stash-chip {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 10px 12px;
  text-transform: uppercase;
}

.stash-list {
  display: grid;
  gap: 12px;
}

.stash-card {
  border-radius: 22px;
  display: grid;
  gap: 14px;
  grid-template-columns: 74px minmax(0, 1fr);
  padding: 14px;
  position: relative;
}

.stash-card-meta {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  min-width: 0;
}

.stash-card-meta span {
  display: block;
  font-size: 12px;
}

.stash-card-meta strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  line-height: 1.1;
  margin-top: 8px;
}

.stash-card-body {
  min-width: 0;
}

.stash-card-topline {
  display: flex;
  justify-content: flex-end;
}

.stash-priority {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.stash-card h2 {
  font-family: "Space Mono", monospace;
  font-size: 18px;
  line-height: 1.28;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.stash-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.42;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.stash-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.stash-actions button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 4px;
  justify-items: center;
  min-height: 54px;
  min-width: 0;
  padding: 8px 4px;
  text-transform: uppercase;
}

.stash-actions button:hover,
.stash-actions button:focus-visible {
  background: var(--text);
  color: var(--bg);
  outline: none;
}

.settings-page {
  padding-bottom: 128px;
}

.settings-topbar {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 46px 1fr;
  justify-content: initial;
}

.settings-card {
  display: grid;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
}

.settings-card h2 {
  font-size: 22px;
  line-height: 1.1;
  margin: 4px 0 0;
}

.settings-card p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0;
}

.settings-segment {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.settings-segment button,
.settings-actions button {
  border-radius: var(--radius-pill);
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
}

.settings-segment button {
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 11px 10px;
}

.settings-segment button.active {
  background: var(--text);
  color: var(--bg);
}

.settings-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-stats span {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 11px 8px;
  text-align: center;
  text-transform: uppercase;
}

.settings-stats strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 6px;
}

.settings-actions {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-actions button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: inline-flex;
  font-size: 11px;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  min-width: 0;
  padding: 0 12px;
}

.settings-actions button:first-child:nth-last-child(3),
.settings-actions button:first-child:nth-last-child(3) ~ button {
  grid-column: auto;
}

.settings-actions button:hover,
.settings-actions button:focus-visible {
  background: var(--text);
  color: var(--bg);
  outline: none;
}

.settings-actions .danger {
  color: var(--accent-red);
}

.settings-feedback {
  min-height: 18px;
}

.settings-nav {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 44px 1fr;
  margin-bottom: 18px;
}

.settings-nav h1 {
  font-size: 34px;
  line-height: 1;
  margin: 0;
}

.settings-profile {
  align-items: center;
  border-radius: 24px;
  display: grid;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr) 22px;
  margin-bottom: 18px;
  padding: 14px;
  text-align: left;
  width: 100%;
}

.profile-avatar {
  align-items: center;
  background: var(--text);
  border-radius: 18px;
  color: var(--bg);
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.profile-avatar.large {
  border-radius: 26px;
  height: 76px;
  margin: 0 auto 12px;
  width: 76px;
}

.profile-avatar svg,
.settings-row-icon svg,
.settings-profile > svg {
  height: 20px;
  width: 20px;
}

.settings-profile strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.settings-profile small {
  color: var(--text-secondary);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.settings-group {
  margin: 18px 0;
}

.settings-group h2 {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px 12px;
  text-transform: uppercase;
}

.settings-today-summary {
  align-items: center;
  border-radius: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: 64px minmax(0, 1fr);
  padding: 14px;
}

.today-progress.mini {
  width: 64px;
}

.today-progress.mini span {
  font-size: 20px;
}

.settings-today-summary h3 {
  font-size: 17px;
  line-height: 1.18;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.settings-today-summary p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 6px 0 0;
}

.settings-list {
  border-radius: 22px;
  overflow: hidden;
}

.settings-row {
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--hairline);
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row-icon {
  align-items: center;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border-radius: 11px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.settings-row > span:nth-child(2) {
  font-size: 16px;
  min-width: 0;
}

.settings-row > svg {
  color: var(--text-secondary);
  height: 18px;
  width: 18px;
}

.settings-row:hover,
.settings-row:focus-visible,
.settings-profile:hover,
.settings-profile:focus-visible {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  outline: none;
}

.settings-row.danger {
  color: var(--accent-red);
}

.mini-segment {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: grid;
  gap: 3px;
  grid-template-columns: 1fr 1fr;
  min-width: 128px;
  padding: 3px;
}

.mini-segment button {
  background: transparent;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 8px 9px;
  text-transform: uppercase;
}

.mini-segment button.active {
  background: var(--text);
  color: var(--bg);
}

.settings-stats-compact {
  border-radius: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.settings-stats-compact span {
  border-right: 1px solid var(--hairline);
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  padding: 13px 6px;
  text-align: center;
  text-transform: uppercase;
}

.settings-stats-compact span:last-child {
  border-right: 0;
}

.settings-stats-compact strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 5px;
}

.profile-hero {
  border-radius: 28px;
  margin-bottom: 20px;
  padding: 22px 18px;
  text-align: center;
}

.profile-hero h2 {
  font-size: 28px;
  line-height: 1;
  margin: 0;
}

.profile-hero p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
  margin: 10px auto 18px;
  max-width: 310px;
}

.profile-primary {
  background: var(--text);
  border-radius: var(--radius-pill);
  color: var(--bg);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  min-height: 48px;
  padding: 0 18px;
  text-transform: uppercase;
  width: 100%;
}

.profile-status {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
}

.onboarding-page,
.auth-page {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

.onboarding-card,
.auth-card {
  border-radius: 34px;
  display: grid;
  gap: 22px;
  max-width: 430px;
  padding: 20px;
  width: 100%;
}

.onboarding-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.onboarding-skip,
.guest-button {
  background: transparent;
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 8px;
  text-transform: uppercase;
}

.onboarding-visual {
  align-items: center;
  aspect-ratio: 1.2;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  display: flex;
  justify-content: center;
}

.onboarding-visual span {
  align-items: center;
  background: var(--text);
  border-radius: 32px;
  color: var(--bg);
  display: inline-flex;
  height: 92px;
  justify-content: center;
  width: 92px;
}

.onboarding-visual svg {
  height: 42px;
  width: 42px;
}

.onboarding-copy h1,
.auth-copy h1 {
  font-size: clamp(34px, 10vw, 48px);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 8px 0 0;
}

.onboarding-copy p,
.auth-copy p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.45;
  margin: 12px 0 0;
}

.onboarding-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.onboarding-dots span {
  background: color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 999px;
  height: 7px;
  transition: width 180ms ease, background 180ms ease;
  width: 7px;
}

.onboarding-dots span.active {
  background: var(--text);
  width: 24px;
}

.onboarding-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.onboarding-actions button,
.auth-primary,
.google-button {
  border-radius: var(--radius-pill);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  min-height: 52px;
  text-transform: uppercase;
}

.onboarding-actions .primary,
.auth-primary {
  background: var(--text);
  color: var(--bg);
}

.onboarding-actions .secondary {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--hairline);
  color: var(--text);
}

.onboarding-actions .secondary:disabled {
  color: var(--text-secondary);
  opacity: 0.45;
}

.auth-mark {
  align-items: center;
  background: var(--surface-strong);
  border-radius: 24px;
  box-shadow: 0 14px 30px var(--shadow);
  color: var(--text);
  display: inline-flex;
  height: 62px;
  justify-content: center;
  overflow: hidden;
  width: 62px;
}

.brand-logo {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.auth-mark .brand-logo {
  height: 62px;
  width: 62px;
}

.onboarding-brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.onboarding-brand .brand-logo {
  border-radius: 10px;
  height: 30px;
  width: 30px;
}

.google-button {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  color: var(--text);
  display: flex;
  gap: 10px;
  justify-content: center;
}

.google-button span {
  align-items: center;
  background: var(--text);
  border-radius: 999px;
  color: var(--bg);
  display: inline-flex;
  font-family: system-ui, sans-serif;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.email-auth {
  display: grid;
  gap: 12px;
}

.email-auth label {
  display: grid;
  gap: 7px;
}

.email-auth input {
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  color: var(--text);
  font-size: 16px;
  min-height: 52px;
  outline: none;
  padding: 0 15px;
  width: 100%;
}

.auth-footer {
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.auth-feedback {
  min-height: 18px;
  text-align: center;
}

.install-banner {
  align-items: center;
  border-radius: 18px;
  display: none;
  gap: 12px;
  justify-content: space-between;
  margin: 12px 0 20px;
  padding: 12px 14px;
}

.install-banner.show {
  display: flex;
}

.sheet-backdrop {
  align-items: flex-end;
  animation: backdropIn 180ms ease both;
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  inset: 0;
  justify-content: center;
  overflow: hidden;
  padding: 16px 8px 0;
  position: fixed;
  z-index: 2000;
}

.add-sheet {
  animation: sheetIn 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-radius: 28px 28px 0 0;
  display: grid;
  gap: 14px;
  max-height: min(76dvh, 640px);
  max-width: min(480px, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  position: relative;
  scroll-padding: 24px 0 120px;
  width: 100%;
}

.add-sheet:focus-within {
  max-height: min(68dvh, 560px);
}

.sheet-handle {
  background: color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: var(--radius-pill);
  height: 5px;
  justify-self: center;
  margin: 0 0 12px;
  width: 56px;
}

.add-sheet label,
.add-sheet fieldset {
  border: 0;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
}

.add-sheet input,
.add-sheet textarea {
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  max-width: 100%;
  min-width: 0;
  outline: none;
  padding: 12px 13px;
  resize: vertical;
  width: 100%;
}

.title-input {
  font-family: "Space Mono", monospace;
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  line-height: 1.15;
  text-transform: none;
}

.sheet-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.priority-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: visible;
}

.priority-row label {
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  display: flex;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 6px;
  justify-content: center;
  min-width: 0;
  padding: 10px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.priority-row input {
  accent-color: var(--text);
  height: auto;
  padding: 0;
}

.submit-task {
  background: var(--text);
  border-radius: var(--radius-pill);
  color: var(--bg);
  font-family: "Space Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  min-height: 54px;
  overflow: hidden;
  padding: 15px 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.folder-sheet {
  animation: sheetIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border-radius: 28px 28px 0 0;
  display: grid;
  gap: 16px;
  max-width: min(480px, 100%);
  padding: 10px 16px calc(22px + env(safe-area-inset-bottom));
  position: relative;
  width: 100%;
}

.folder-sheet h2 {
  font-size: 26px;
  line-height: 1.02;
  margin: 4px 0 0;
}

.folder-sheet p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 7px 0 0;
}

.folder-sheet label {
  display: grid;
  gap: 8px;
}

.folder-sheet input {
  background: var(--surface-strong);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  color: var(--text);
  font-size: 16px;
  outline: none;
  padding: 14px;
}

.folder-sheet-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
}

.folder-sheet-actions button {
  border-radius: var(--radius-pill);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  min-height: 52px;
  text-transform: uppercase;
}

.folder-sheet-actions button:first-child {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  color: var(--text);
}

.folder-sheet-actions button:last-child {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}

.notes-page {
  padding-bottom: 128px;
}

.notes-page.note-modal-open {
  z-index: 2100;
}

.notes-topbar {
  align-items: center;
}

.notes-hero {
  align-items: center;
  border-radius: 26px;
  display: grid;
  gap: 14px;
  grid-template-columns: 54px minmax(0, 1fr) 52px;
  padding: 16px;
}

.notes-hero-icon,
.notes-new {
  align-items: center;
  border-radius: 20px;
  display: inline-flex;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.notes-hero-icon {
  background: var(--text);
  color: var(--bg);
}

.notes-new {
  background: var(--accent-green);
  color: #050605;
}

.notes-hero h2 {
  font-size: 21px;
  line-height: 1.08;
  margin: 2px 0 5px;
}

.notes-hero p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.notes-search {
  align-items: center;
  border-radius: var(--radius-pill);
  display: grid;
  gap: 10px;
  grid-template-columns: 22px minmax(0, 1fr);
  padding: 12px 16px;
}

.notes-search input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
  outline: none;
}

.note-composer {
  border-radius: 26px;
  padding: 12px;
}

.note-composer-form {
  display: grid;
  gap: 9px;
}

.note-composer input,
.note-composer textarea,
.note-composer select,
.note-editor input,
.note-editor textarea,
.note-editor select {
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  color: var(--text);
  min-width: 0;
  outline: none;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.note-composer input,
.note-editor input {
  font-size: 18px;
  font-weight: 760;
}

.note-composer-row {
  align-items: end;
  display: grid;
  gap: 9px;
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto);
}

.note-composer-row label,
.note-folder-select {
  display: grid;
  gap: 6px;
}

.note-composer-row label span {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.note-composer button,
.note-editor-actions button {
  align-items: center;
  border-radius: var(--radius-pill);
  display: inline-flex;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  gap: 7px;
  justify-content: center;
  min-height: 48px;
  text-transform: uppercase;
}

.note-composer button,
.note-editor-actions button:last-child {
  background: var(--text);
  color: var(--bg);
}

.notes-controls {
  display: grid;
  gap: 10px;
}

.notes-folder-strip {
  display: flex;
  gap: 8px;
  margin: 0 -2px;
  overflow-x: auto;
  padding: 0 2px 3px;
  scrollbar-width: none;
}

.notes-folder-strip::-webkit-scrollbar {
  display: none;
}

.notes-folder-strip button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  text-transform: uppercase;
}

.notes-folder-strip button.active {
  background: var(--text);
  color: var(--bg);
}

.notes-folder-strip i {
  background: var(--folder-color, var(--accent-green));
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.notes-controls .view-toggle-slot {
  justify-self: end;
}

.notes-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notes-grid.notes-list-mode {
  grid-template-columns: 1fr;
}

.note-card {
  border-radius: 22px;
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 13px;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.note-card:active {
  transform: scale(0.985);
}

.note-card.pinned {
  border-color: color-mix(in srgb, var(--accent-green) 35%, var(--hairline));
}

.note-card-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.note-card-meta span,
.note-folder-dot {
  color: var(--text-secondary);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.note-folder-dot {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.note-folder-dot::before {
  background: var(--folder-color, var(--accent-green));
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.note-card-open {
  background: transparent;
  color: var(--text);
  display: grid;
  gap: 8px;
  padding: 0;
  text-align: left;
}

.note-card-open h2 {
  font-size: 16px;
  line-height: 1.16;
  margin: 0;
  overflow-wrap: anywhere;
}

.note-card-open p {
  color: var(--text-secondary);
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.42;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.note-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.note-card-actions button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  color: var(--text-secondary);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.note-card-actions button:last-child {
  color: var(--accent-red);
}

.notes-empty {
  align-items: start;
  border-radius: 22px;
  display: grid;
  gap: 9px;
  grid-column: 1 / -1;
  padding: 18px;
}

.notes-empty svg {
  color: var(--text-secondary);
  height: 26px;
  width: 26px;
}

.notes-empty h2 {
  font-size: 19px;
  margin: 0;
}

.notes-empty p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.note-editor-backdrop {
  align-items: end;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 16px;
  position: fixed;
  z-index: 2200;
}

.note-editor {
  border-radius: 28px;
  display: grid;
  gap: 11px;
  max-height: min(82vh, 720px);
  max-width: 480px;
  overflow: auto;
  padding: 14px;
  width: 100%;
}

.note-editor-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.note-editor-top button {
  align-items: center;
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 50%;
  color: var(--text-secondary);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.note-editor-top button:first-child {
  transform: rotate(180deg);
}

.note-editor textarea {
  min-height: 240px;
}

.note-editor-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.note-editor-actions button {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border: 1px solid var(--hairline);
  color: var(--text);
  min-height: 46px;
}

.note-editor-actions button:first-child {
  color: var(--accent-red);
}

.icon-buttonish {
  background: transparent;
  padding: 0;
}

@media (min-width: 760px) {
  body {
    background:
      linear-gradient(145deg, rgba(156, 255, 0, 0.07), transparent 30rem),
      linear-gradient(165deg, var(--bg), var(--bg-soft));
  }

  [data-theme="dark"] body {
    background:
      linear-gradient(145deg, rgba(156, 255, 0, 0.08), transparent 22rem),
      linear-gradient(160deg, #050605 0%, #0d0e0c 58%, #030403 100%);
  }

  .phone-frame {
    margin-top: 28px;
    min-height: calc(100vh - 56px);
  }
}

@media (max-width: 380px) {
  .phone-frame {
    padding-left: 14px;
    padding-right: 14px;
  }

  .timeline {
    padding-left: 52px;
  }

  .timeline-today {
    padding-left: 0;
  }

  .timeline-today .timeline-group {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .timeline-today::before {
    left: 70px;
  }

  .today-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-section-heading {
    align-items: stretch;
    grid-template-columns: 1fr auto;
  }

  .today-section-heading > div:first-child {
    grid-column: 1 / -1;
  }

  .timeline-grid-mode .task-grid,
  .folder-task-list.folder-grid-mode {
    grid-template-columns: 1fr;
  }

  .stash-card {
    grid-template-columns: 1fr;
  }

  .stash-card-meta {
    align-items: baseline;
    display: flex;
    gap: 10px;
  }

  .stash-card-meta strong {
    margin-top: 0;
  }

  .stash-summary {
    grid-template-columns: 46px 1fr 42px;
    padding: 14px;
  }

  .stash-toolbar {
    grid-template-columns: 1fr;
  }

  .folder-hero {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .folder-create {
    grid-column: 1 / -1;
    width: 100%;
  }

  .folder-tools {
    grid-template-columns: 1fr;
  }

  .folder-tool-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .folder-card {
    grid-template-columns: 1fr;
  }

  .add-sheet {
    border-radius: 24px 24px 0 0;
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .sheet-grid {
    grid-template-columns: 1fr;
  }

  .priority-row {
    grid-template-columns: 1fr;
  }

  .priority-row label {
    justify-content: flex-start;
    padding-left: 14px;
  }
}
