:root {
  color-scheme: dark;
  --ink: #6f1420;
  --bg-top: #6f1420;
  --bg-mid: #b83218;
  --bg-bottom: #e87828;
  --bg: #7a1820;
  --glass: rgba(255, 255, 255, 0.11);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --glass-border: rgba(255, 255, 255, 0.2);
  --surface: rgba(255, 255, 255, 0.1);
  --surface-solid: rgba(28, 12, 16, 0.92);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #ffe8cf;
  --accent-2: #ffb36a;
  --danger: #ff8f9d;
  --shadow: 0 24px 60px rgba(40, 8, 8, 0.35);
  --radius: 24px;
  font-family: Inter, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}

:root.purple {
  color-scheme: dark;
  --ink: #4c1d95;
  --bg-top: #12061f;
  --bg-mid: #2a1145;
  --bg-bottom: #5b2d8b;
  --bg: #2a1545;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(196, 181, 253, 0.24);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-solid: rgba(16, 8, 28, 0.94);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(196, 181, 253, 0.22);
  --text: #fff;
  --muted: rgba(221, 214, 254, 0.62);
  --accent: #e9d5ff;
  --accent-2: #c084fc;
  --danger: #f0abfc;
  --shadow: 0 24px 60px rgba(12, 4, 28, 0.48);
}
:root.purple .ambient-one { background: #7c3aed; opacity: .2; }
:root.purple .ambient-two { background: #c084fc; opacity: .14; }

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-top); overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 42%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.hidden { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#icon-spark path { fill: currentColor; stroke: none; }

.glass-panel, .glass-card, .glass-chip {
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow);
}
.glass-panel { background: var(--glass); border-radius: 28px; }
.glass-card { background: var(--glass-strong); border-radius: 22px; }
.glass-chip { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }

.ambient { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; opacity: .22; }
.ambient-one { width: 420px; height: 420px; background: #ff6b35; top: -180px; right: -80px; }
.ambient-two { width: 360px; height: 360px; background: #ffcc70; bottom: -200px; left: 10%; opacity: .18; }

.app-shell { position: relative; z-index: 1; min-height: 100vh; width: 100%; max-width: 100%; }
.main-content { width: min(1180px, 100%); max-width: 100%; margin: 0 auto; padding: 34px 48px calc(80px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.eyebrow, .hero-kicker, .section-heading span, .dialog-heading span, .agenda-date { margin: 0 0 6px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.ai-status { display: inline-flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border); padding: 8px 12px; border-radius: 99px; font-size: 11px; color: var(--muted); backdrop-filter: blur(16px); }
.ai-status i { width: 7px; height: 7px; border-radius: 50%; background: #efb650; box-shadow: 0 0 9px currentColor; }
.ai-status.connected i { background: #fff; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--glass-border); background: var(--glass); border-radius: 50%; cursor: pointer; color: var(--text); backdrop-filter: blur(16px); }
.icon-button:hover { background: rgba(255, 255, 255, 0.18); }

.page { display: block; }
.app-page { display: none; width: 100%; max-width: 100%; box-sizing: border-box; }
.app-page:not(.is-active) { display: none !important; }
.app-page.is-active { display: flex; flex-direction: column; flex: 1; min-height: 0; animation: pageIn 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.listening-label { display: none; }

.status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0;
  pointer-events: none;
  transform: translateY(calc(-120% - env(safe-area-inset-top, 0px)));
  opacity: 0;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
}
.status-banner.show {
  transform: translateY(0);
  opacity: 1;
}
.status-banner-chip {
  margin: 0 auto;
  width: min(440px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  box-shadow:
    0 14px 40px rgba(40, 8, 8, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.status-banner-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 2px solid rgba(111, 20, 32, 0.12);
  border-top-color: var(--ink);
  border-right-color: rgba(111, 20, 32, 0.45);
  animation: voiceSpin .85s linear infinite;
}
.status-banner[data-type="recording"] .status-banner-icon {
  border: 0;
  background: #ff5a5a;
  box-shadow: 0 0 0 4px rgba(255, 90, 90, 0.18);
  animation: statusPulse 1.15s ease-in-out infinite;
}
.status-banner[data-type="error"] .status-banner-icon,
.status-banner[data-type="hint"] .status-banner-icon { display: none; }
.status-banner-text {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  color: #2a1208;
  letter-spacing: -.02em;
}
.status-banner[data-type="error"] .status-banner-text { color: #b42318; }
.status-banner[data-type="hint"] .status-banner-text { color: #5c3d32; }
@keyframes statusPulse { 50% { transform: scale(1.14); opacity: .72; } }
.bottom-mic.thinking { pointer-events: none; cursor: wait; }
.bottom-dock { display: none; }
.dock-track {
  position: relative;
  display: grid;
  grid-template-columns: 58px 58px 58px;
  gap: 26px;
  align-items: center;
}
.dock-highlight {
  position: absolute;
  left: 0;
  top: 50%;
  --dock-highlight-size: 58px;
  width: var(--dock-highlight-size);
  height: var(--dock-highlight-size);
  margin-top: calc(var(--dock-highlight-size) / -2);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  z-index: 0;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.28s ease,
    box-shadow 0.28s ease;
  will-change: transform;
}
body[data-page="home"] .dock-highlight {
  --dock-highlight-size: 58px;
  transform: translateX(calc(58px + 26px));
}
body[data-page="profile"] .dock-highlight {
  --dock-highlight-size: 43.5px;
  transform: translateX(calc((58px - 43.5px) / 2));
}
body[data-page="tasks"] .dock-highlight {
  --dock-highlight-size: 43.5px;
  transform: translateX(calc((58px + 26px) * 2 + (58px - 43.5px) / 2));
}
.dock-slot {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.35s ease, transform 0.18s ease;
}
.dock-slot svg { width: 22px; height: 22px; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.dock-slot:active { transform: scale(0.92); }
.dock-slot--center { overflow: hidden; }
body[data-page="home"] #profileDockButton { color: rgba(255, 255, 255, 0.92); }
body[data-page="profile"] #profileDockButton { color: var(--ink); }
body[data-page="tasks"] #dockMenuButton { color: var(--ink); }
body[data-page="home"] .dock-slot--center { color: var(--ink); }
body[data-page="profile"] .dock-slot--center, body[data-page="tasks"] .dock-slot--center { color: rgba(255, 255, 255, 0.92); }
.dock-center-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.34s ease, transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.dock-center-icon svg { width: 25px; height: 25px; }
body[data-page="home"] .dock-center-icon--mic { opacity: 1; transform: scale(1) rotate(0deg); }
body[data-page="home"] .dock-center-icon--home { opacity: 0; transform: scale(0.68) rotate(-80deg); }
body[data-page="profile"] .dock-center-icon--mic, body[data-page="tasks"] .dock-center-icon--mic { opacity: 0; transform: scale(0.68) rotate(80deg); }
body[data-page="profile"] .dock-center-icon--home, body[data-page="tasks"] .dock-center-icon--home { opacity: 1; transform: scale(1) rotate(0deg); }
.bottom-dock.is-listening .dock-highlight {
  background: #ff5a5a;
  animation: dockPulse 1.1s ease-in-out infinite;
}
.bottom-dock.is-thinking .dock-slot--center { pointer-events: none; cursor: wait; }
.bottom-dock.is-thinking .dock-center-icon--mic { opacity: 0; transform: scale(0.55); }
.bottom-dock.is-thinking .dock-highlight {
  background: rgba(255, 255, 255, 0.94);
  animation: dockPulse 1.35s ease-in-out infinite;
}
.bottom-dock.is-thinking .dock-highlight::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid rgba(111, 20, 32, 0.14);
  border-top-color: var(--ink);
  animation: voiceSpin 0.85s linear infinite;
}
@keyframes dockPulse {
  50% { filter: brightness(1.04); }
}
.bottom-mic {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.bottom-mic > span {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.bottom-mic svg { width: 25px; height: 25px; transition: opacity .2s ease, transform .2s ease; }
.bottom-mic.listening > span { background: #ff5a5a; color: #fff; animation: micPulse 1.1s ease-in-out infinite; }
.bottom-mic.thinking > span { background: rgba(255, 255, 255, 0.94); color: transparent; animation: micPulse 1.35s ease-in-out infinite; }
.bottom-mic.thinking > span svg { opacity: 0; transform: scale(.55); }
.bottom-mic.thinking > span::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2.5px solid rgba(111, 20, 32, 0.16);
  border-top-color: var(--ink);
  border-right-color: rgba(111, 20, 32, 0.45);
  animation: voiceSpin .85s linear infinite;
}

.task-list, .all-tasks, .agenda-list { display: grid; gap: 8px; align-content: start; grid-auto-rows: 132px; }
.agenda-list { scrollbar-width: none; -ms-overflow-style: none; }
.agenda-list::-webkit-scrollbar { display: none; }
.task-card.glass-card {
  position: relative;
  overflow: hidden;
  padding: 17px 16px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  grid-template-areas: "copy delete" "time time";
  align-items: start;
  column-gap: 14px;
  row-gap: 20px;
  width: 100%;
  height: 132px;
  min-height: 132px;
  border-color: rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.11), transparent 35%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.075));
  box-shadow: none;
  transition: background .18s ease, border-color .18s ease;
}
.task-card:hover { border-color: rgba(255, 255, 255, 0.34); }
.task-card.done { opacity: .72; }
.task-card.past { opacity: .55; }
.task-card-copy { position: relative; z-index: 1; grid-area: copy; min-width: 0; min-height: 0; overflow: hidden; padding-top: 1px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.task-title { margin: 0; font-weight: 800; font-size: 22px; line-height: 1.18; letter-spacing: -.035em; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-time-block { position: relative; z-index: 1; grid-area: time; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.task-time-label { color: rgba(255, 255, 255, 0.58); font-size: 10px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; }
.task-time-value { color: var(--text); font-size: 27px; font-weight: 850; line-height: .9; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.task-time-value--none { font-size: 16px; letter-spacing: -.02em; }
.task-note { margin: 7px 0 0; color: rgba(255, 255, 255, 0.55); font-size: 11px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card.done .task-time-value, .task-card.done .task-note { opacity: .6; }
.delete-task { position: relative; z-index: 2; grid-area: delete; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, 0.46); cursor: pointer; transition: color .18s ease, background .18s ease; display: grid; place-items: center; }
.delete-task svg { width: 15px; height: 15px; pointer-events: none; }
.delete-task:hover, .delete-task:focus-visible { color: #fff; background: rgba(255, 120, 130, 0.2); }
.delete-task:active { background: rgba(255, 120, 130, 0.32); }
.confirm-copy { color: var(--muted); font-size: 14px; line-height: 1.55; margin: -8px 0 22px; }
.glass-dialog {
  width: min(340px, calc(100% - 48px));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(44px) saturate(180%);
  -webkit-backdrop-filter: blur(44px) saturate(180%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: #fff;
  overflow: hidden;
}
.glass-dialog--sheet {
  width: min(440px, calc(100% - 32px));
  max-height: min(92vh, 780px);
}
.glass-dialog--sheet .glass-form {
  max-height: min(92vh, 780px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.glass-dialog .dialog-form { padding: 24px 22px 22px; }
.glass-dialog .dialog-heading { margin-bottom: 20px; }
.glass-dialog .dialog-heading span { color: rgba(255, 255, 255, 0.52); }
.glass-dialog .dialog-heading h2 { color: #fff; font-weight: 800; }
.glass-dialog .icon-button { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.88); }
.glass-dialog .icon-button:hover { background: rgba(255, 255, 255, 0.18); }
.glass-dialog .dialog-form > label, .glass-dialog .time-label { color: rgba(255, 255, 255, 0.62); }
.glass-dialog .dialog-form input, .glass-dialog .dialog-form textarea, .glass-dialog .dialog-form select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-dialog .dialog-form input::placeholder, .glass-dialog .dialog-form textarea::placeholder { color: rgba(255, 255, 255, 0.38); }
.glass-dialog .task-time-date { color: #fff; }
.glass-dialog .time-picker-shell { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }
.glass-dialog .time-option { color: rgba(255, 255, 255, 0.34); }
.glass-dialog .time-option.selected { color: #fff; }
.glass-dialog .time-colon { color: rgba(255, 255, 255, 0.42); }
.glass-dialog .time-picker-highlight { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.glass-dialog .time-presets button { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: rgba(255, 255, 255, 0.68); }
.glass-dialog .time-presets button:hover, .glass-dialog .time-presets button.active { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.glass-dialog .dialog-submit {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  margin-top: 8px;
  transition: background .16s ease, transform .16s ease;
}
.glass-dialog .dialog-submit:hover { background: #fff; }
.glass-dialog .dialog-submit:active { transform: scale(.985); }
.glass-dialog::backdrop {
  background: rgba(30, 10, 8, 0.28);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
.glass-alert { display: grid; }
.glass-alert-body { padding: 28px 24px 20px; text-align: center; }
.glass-alert-title { margin: 0 0 10px; font-size: 20px; font-weight: 750; letter-spacing: -.03em; line-height: 1.2; }
.glass-alert-message { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.glass-alert-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.glass-alert-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 13px 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: #fff;
  transition: background .16s ease, transform .16s ease;
}
.glass-alert-btn:hover { background: rgba(255, 255, 255, 0.16); }
.glass-alert-btn:active { transform: scale(.97); }
.glass-alert-btn--danger {
  background: rgba(255, 255, 255, 0.94);
  color: #b42318;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.glass-alert-btn--danger:hover { background: #fff; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.confirm-actions .dialog-submit, .confirm-actions .secondary-button { margin: 0; }
.danger-button { background: var(--danger); color: #fff; }
.danger-button:hover { filter: brightness(1.05); }
.empty-state { padding: 42px 20px; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 22px; text-align: center; color: var(--muted); background: rgba(255, 255, 255, 0.06); backdrop-filter: blur(12px); }
.empty-state strong { display: block; color: var(--text); margin-bottom: 5px; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr); gap: 18px; align-items: start; width: 100%; max-width: 100%; }
.calendar-card { padding: 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; width: 100%; }
.agenda-card { padding: 4px 0 0; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; width: 100%; }
.calendar-header { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; margin-bottom: 18px; padding: 0 2px; }
.calendar-title { text-align: center; min-width: 0; }
.calendar-title span { display: block; margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.calendar-today { border: 0; background: transparent; color: var(--muted); margin: 0 0 4px; padding: 0; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.calendar-today:hover, .calendar-today:focus-visible { color: var(--text); }
.calendar-title h2, .agenda-card h2 { margin: 0; font-size: clamp(22px, 4vw, 28px); letter-spacing: -.04em; font-weight: 800; }
.calendar-nav { width: 36px; height: 36px; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekdays { margin-bottom: 10px; color: rgba(255, 255, 255, 0.62); font-size: 11px; font-weight: 650; text-align: center; }
.calendar-day {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 44px;
  margin: 0 auto;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.calendar-day:hover:not(.selected) { transform: scale(1.05); background: rgba(255, 255, 255, 0.1); }
.calendar-day.outside { color: rgba(255, 255, 255, 0.24); }
.calendar-day.today:not(.selected) {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.calendar-day.selected {
  color: var(--ink);
  background: #fff;
  border-color: #fff;
  font-weight: 800;
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 0 0 4px rgba(255, 255, 255, 0.18);
}
.calendar-day.selected.today { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 0 0 4px rgba(255, 255, 255, 0.28); }
.calendar-day.has-tasks::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4da3ff;
  box-shadow: 0 0 10px rgba(77, 163, 255, 0.75);
}
.calendar-day.selected.has-tasks::after { background: #2563eb; box-shadow: none; bottom: 2px; }
.calendar-day.outside.has-tasks::after { opacity: .55; }
.agenda-header { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; padding: 0 2px; }
.agenda-add { border: 0; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; padding: 10px 14px; }
.agenda-add:hover { background: rgba(255, 255, 255, 0.2); }
.agenda-add svg { width: 16px; }
.task-card { -webkit-tap-highlight-color: transparent; }
dialog { width: min(520px, calc(100% - 28px)); border: 1px solid var(--glass-border); border-radius: 24px; background: var(--surface-solid); color: var(--text); padding: 0; box-shadow: var(--shadow); backdrop-filter: blur(24px); }
dialog::backdrop { background: rgba(4,5,8,.72); backdrop-filter: blur(8px); }
.dialog-form { padding: 27px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 25px; }
.dialog-heading h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.04em; }
.dialog-form > label, .field-row label { display: grid; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 11px; }
.dialog-form input, .dialog-form textarea, .dialog-form select { width: 100%; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: 0; resize: vertical; }
.task-time-section { margin-bottom: 4px; }
.task-time-date { margin: 0 0 14px; font-size: 15px; color: var(--text); font-weight: 650; letter-spacing: -.02em; text-transform: capitalize; }
.time-label { display: grid; gap: 10px; margin-bottom: 0 !important; }
.time-picker-shell { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); min-height: 188px; }
.time-column-wrap { flex: 1; max-width: 78px; height: 168px; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); mask-image: linear-gradient(transparent, #000 24%, #000 76%, transparent); }
.time-column { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 62px 0; }
.time-column::-webkit-scrollbar { display: none; }
.time-option { display: block; width: 100%; border: 0; background: transparent; color: var(--muted); font-size: 24px; font-weight: 650; padding: 11px 0; cursor: pointer; scroll-snap-align: center; font-variant-numeric: tabular-nums; transition: color .15s ease, transform .15s ease; }
.time-option.selected { color: var(--text); transform: scale(1.06); }
.time-colon { font-size: 26px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.time-picker-highlight { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); height: 46px; border-radius: 12px; border: 1px solid rgba(161,255,211,.24); background: rgba(161,255,211,.06); pointer-events: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.time-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.time-presets button { border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); border-radius: 10px; padding: 10px 6px; font-size: 12px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.time-presets button:hover, .time-presets button.active { color: var(--text); border-color: rgba(161,255,211,.35); background: rgba(161,255,211,.08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-submit { width: 100%; border: 0; border-radius: 13px; padding: 13px; margin-top: 5px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.security-badge { display: flex; gap: 13px; border: 1px solid rgba(161,255,211,.2); background: rgba(161,255,211,.055); border-radius: 15px; padding: 15px; }
.security-badge svg { flex: 0 0 20px; color: var(--accent); }
.security-badge strong { font-size: 13px; }
.security-badge p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 5px 0 0; }
.settings-copy ol { color: var(--muted); font-size: 13px; line-height: 2; padding-left: 23px; margin: 20px 0; }
.settings-copy code { color: var(--text); background: var(--surface-2); padding: 2px 5px; border-radius: 5px; }
.plan-dialog { width: min(520px, calc(100% - 32px)); max-height: min(92vh, 820px); }
.plan-review {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(92vh, 820px);
  padding: 22px 20px 18px;
  gap: 0;
}
.plan-review .dialog-heading { margin-bottom: 14px; align-items: center; }
.plan-review .dialog-heading h2 { margin: 4px 0 0; font-size: 24px; }
.plan-meta { margin-bottom: 14px; }
.plan-summary {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
  font-size: 13px;
}
.plan-stats {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.plan-list {
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 2px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}
.plan-list--compact { max-height: min(42vh, 360px); }
.plan-list--detail { display: grid; gap: 10px; max-height: min(46vh, 420px); }
.plan-list--empty { display: grid; place-items: center; min-height: 120px; }
.plan-empty {
  text-align: center;
  padding: 24px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}
.plan-empty strong { display: block; font-size: 14px; margin-bottom: 6px; }
.plan-empty p { margin: 0; color: rgba(255, 255, 255, 0.52); font-size: 12px; line-height: 1.45; }
.plan-group-title {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.plan-group-title input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
  outline: 0;
}
.plan-group-title input:focus { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.12); }
.plan-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.plan-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
}
.plan-row-dot[data-priority="high"] { background: #ff8a80; box-shadow: 0 0 10px rgba(255, 138, 128, 0.45); }
.plan-row-dot[data-priority="medium"] { background: rgba(255, 255, 255, 0.55); }
.plan-row-dot[data-priority="low"] { background: rgba(255, 255, 255, 0.28); }
.plan-row-copy { min-width: 0; display: grid; gap: 2px; }
.plan-row-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-row-copy time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  font-variant-numeric: tabular-nums;
}
.plan-row-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.plan-row-remove svg { width: 15px; height: 15px; }
.plan-row-remove:hover, .plan-row-remove:focus-visible { color: #fff; background: rgba(255, 120, 130, 0.18); }
.plan-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px;
}
.plan-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.plan-item-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plan-item-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.plan-item-meta time { font-size: 12px; color: rgba(255, 255, 255, 0.58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-item-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.plan-item-remove svg { width: 15px; height: 15px; }
.plan-item-remove:hover, .plan-item-remove:focus-visible { color: #fff; background: rgba(255, 120, 130, 0.18); }
.plan-field { display: grid; gap: 7px; margin-bottom: 10px; color: rgba(255, 255, 255, 0.55); font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.plan-field:last-child { margin-bottom: 0; }
.plan-field input, .plan-field textarea, .plan-field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  outline: 0;
  resize: vertical;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
}
.plan-item-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; }
.plan-field--grow, .plan-field--priority { margin-bottom: 0; }
.plan-review-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02));
}
.plan-feedback { margin: 0; }
.plan-feedback > label {
  display: block;
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.plan-feedback-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.plan-feedback-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 14px;
  padding: 0 14px;
  height: 42px;
  outline: 0;
  font-size: 13px;
}
.plan-feedback-row input::placeholder { color: rgba(255, 255, 255, 0.34); }
.plan-feedback-voice, .plan-feedback-send {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.plan-feedback-voice svg, .plan-feedback-send svg { width: 18px; height: 18px; }
.plan-feedback-voice:hover, .plan-feedback-send:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.plan-feedback-send { background: rgba(255, 255, 255, 0.94); color: var(--ink); border-color: rgba(255, 255, 255, 0.55); }
.plan-feedback-send:hover { background: #fff; }
.plan-feedback-voice.listening { color: #ff8a80; border-color: rgba(255, 138, 128, 0.45); animation: breathe 1s ease-in-out infinite; }
.plan-feedback-voice.is-thinking { pointer-events: none; opacity: 0.55; }
.plan-feedback-voice.is-thinking svg { animation: voiceSpin .85s linear infinite; }
.plan-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.plan-actions .dialog-submit { margin: 0; min-height: 46px; border-radius: 14px; font-size: 14px; }
.plan-actions .dialog-submit:disabled { opacity: .45; cursor: not-allowed; }
.plan-cancel {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  padding: 0 14px;
  min-height: 46px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}
.plan-cancel:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.glass-dialog .plan-item input, .glass-dialog .plan-item textarea, .glass-dialog .plan-item select,
.glass-dialog .plan-group-title input, .glass-dialog .plan-feedback-row input {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.profile-page { flex: 1; min-height: 0; overflow: hidden; }
.profile-topbar { margin-bottom: 28px; flex-shrink: 0; }
.profile-topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.profile-form {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.profile-form::-webkit-scrollbar { display: none; }
.profile-section { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.profile-section--last { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.profile-section-title { margin: 0 0 14px; font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.account-state { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.account-state[hidden] { display: none; }
.account-copy { flex: 1; min-width: 0; }
.account-copy strong { display: block; font-size: 14px; font-weight: 750; margin-bottom: 4px; }
.account-copy p { margin: 0; color: rgba(255, 255, 255, 0.58); font-size: 12px; line-height: 1.4; }
.account-avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, 0.12); }
.vk-login-button { border: 0; border-radius: 14px; padding: 12px 15px; background: #07f; color: #fff; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.vk-login-button:disabled { opacity: .5; cursor: not-allowed; }
.account-state .glass-chip { border: 0; padding: 10px 14px; color: #fff; cursor: pointer; }
.usage-meters { display: grid; gap: 14px; }
.usage-meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.usage-meter-head strong { font-size: 13px; font-weight: 700; }
.usage-meter-head span { font-size: 12px; color: rgba(255, 255, 255, 0.62); white-space: nowrap; }
.usage-meter-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.usage-meter-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92)); transition: width .25s ease; }
.usage-meter-bar.is-low span { background: linear-gradient(90deg, #ffb74d, #ff8a65); }
.usage-meter-bar.is-empty span { background: rgba(255, 120, 130, 0.85); }
.usage-reset { margin: 4px 0 0; }
.login-dialog { width: min(400px, calc(100% - 32px)); }
.login-dialog-button { width: 100%; margin-top: 18px; }
.login-dialog .glass-alert-body { padding-bottom: 8px; }
.profile-subtitle { margin: 16px 0 10px; font-size: 11px; font-weight: 650; color: rgba(255, 255, 255, 0.55); }
.profile-hint, .profile-permission { margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.58); }
.profile-permission { margin: 10px 0 0; min-height: 1.2em; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.profile-actions .glass-chip { border: 0; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; padding: 10px 14px; }
.profile-actions .glass-chip:hover { background: rgba(255, 255, 255, 0.2); }
.notification-permission-prompt { margin-top: 14px; display: grid; gap: 10px; }
.notification-permission-prompt[hidden] { display: none; }
.notification-permission-prompt .profile-hint { margin: 0; }
.notification-permission-prompt .glass-chip { border: 0; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; padding: 10px 14px; width: fit-content; }
.notification-permission-prompt .glass-chip:hover { background: rgba(255, 255, 255, 0.2); }
.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  align-items: center;
  column-gap: 14px;
  padding: 12px 0;
  -webkit-tap-highlight-color: transparent;
}
.settings-row + .settings-row { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.settings-row-copy { min-width: 0; }
.settings-row-copy strong { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 3px; }
.settings-row-copy p { margin: 0; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, 0.55); }
.glass-toggle { position: relative; width: 50px; height: 30px; flex-shrink: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.glass-toggle input { position: absolute; opacity: 0; width: 0; height: 0; outline: none; }
.glass-toggle input:focus,
.glass-toggle input:focus-visible { outline: none; }
.glass-toggle input:focus-visible + span { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72); }
.glass-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background .2s ease, border-color .2s ease;
}
.glass-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.glass-toggle input:checked + span { background: rgba(255, 255, 255, 0.92); border-color: rgba(255, 255, 255, 0.92); }
.glass-toggle input:checked + span::after { transform: translateX(20px); background: var(--ink); }
.glass-toggle input:disabled + span { opacity: .45; cursor: not-allowed; }
.offset-toggles { display: grid; gap: 0; }
.offset-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  align-items: center;
  column-gap: 14px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.offset-toggle + .offset-toggle { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.offset-toggle .glass-toggle { justify-self: end; }
.offset-toggle strong { display: block; font-size: 13px; font-weight: 700; }
.offset-toggle-note { display: block; font-size: 11px; color: rgba(255, 255, 255, 0.52); }

.tasks-page { flex: 1; min-height: 0; overflow: hidden; }
.tasks-topbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-shrink: 0; }
.tasks-topbar h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.all-tasks-groups { width: min(760px, 100%); margin: 0 auto; min-height: 0; overflow-y: auto; display: grid; gap: 28px; padding: 2px 2px 80px; scrollbar-width: none; }
.all-tasks-groups::-webkit-scrollbar { display: none; }
.tasks-day-group > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 4px 11px; }
.tasks-day-group > header h2 { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -.02em; text-transform: capitalize; }
.tasks-day-group > header span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.tasks-day-group .all-tasks { gap: 10px; }

.quick-menu-dialog { width: min(480px, calc(100% - 28px)); }
.quick-menu { padding: 24px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.quick-actions > button { min-width: 0; display: flex; align-items: center; gap: 11px; text-align: left; border: 1px solid var(--line); border-radius: 15px; padding: 14px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.quick-actions > button:hover { background: var(--glass-strong); border-color: var(--line-strong); }
.quick-actions svg { flex: 0 0 20px; color: var(--accent); }
.quick-actions span { min-width: 0; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { font-size: 13px; margin-bottom: 3px; }
.quick-actions small { color: var(--muted); font-size: 10px; }
.task-search-label { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong); border-radius: 13px; padding: 0 12px; background: var(--surface-2); color: var(--muted); }
.task-search-label svg { width: 18px; flex: 0 0 18px; }
.task-search-label input { border: 0; background: transparent; padding: 12px 0; color: var(--text); width: 100%; outline: 0; }
.task-search-label input::placeholder { color: var(--muted); }
.task-search-results { display: grid; gap: 4px; max-height: min(42vh, 360px); overflow-y: auto; margin-top: 10px; }
.task-search-result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); padding: 11px 10px; text-align: left; cursor: pointer; }
.task-search-result:hover { background: var(--surface-2); }
.task-search-result > span { min-width: 0; }
.task-search-result strong, .task-search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-search-result strong { font-size: 13px; }
.task-search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-search-result > svg { flex: 0 0 17px; width: 17px; color: var(--muted); }
.task-search-result.done strong { text-decoration: line-through; color: var(--muted); }
.search-empty { padding: 26px 10px; text-align: center; color: var(--muted); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); z-index: 20; background: rgba(255, 255, 255, 0.94); color: var(--ink); padding: 8px 10px 8px 16px; border-radius: 99px; font-size: 12px; font-weight: 650; opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 12px 30px rgba(40, 8, 8, 0.22); display: flex; align-items: center; gap: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; border-radius: 999px; padding: 7px 10px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 750; cursor: pointer; }

@media (max-width: 900px) {
  html, body {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .app-shell {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .main-content.app-page.is-active {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding:
      max(12px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      0
      max(16px, env(safe-area-inset-left));
  }
  .calendar-layout {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    grid-template-columns: unset;
  }
  .calendar-card { flex-shrink: 0; }
  .agenda-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .agenda-header { flex-shrink: 0; }
  .agenda-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .main-content.app-page.is-active {
    padding:
      max(8px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      0
      max(16px, env(safe-area-inset-left));
  }
  .topbar { display: none; }
  .calendar-day { max-width: 40px; font-size: 12px; }
  .agenda-list { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .profile-form { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .all-tasks-groups { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
  .tasks-topbar { margin-bottom: 18px; }
  .profile-topbar { margin-bottom: 18px; }
  .bottom-dock {
    position: fixed;
    z-index: 10;
    left: 0;
    right: 0;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: fit-content;
    max-width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
    margin-inline: auto;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 10px 30px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    box-shadow: 0 16px 44px rgba(40, 8, 8, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
  .toast { bottom: calc(104px + env(safe-area-inset-bottom)); white-space: nowrap; max-width: calc(100% - 30px); overflow: hidden; text-overflow: ellipsis; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .plan-dialog { width: calc(100% - 16px); max-height: 94vh; border-radius: 24px; }
  .plan-review { max-height: 94vh; padding: 18px 16px 16px; }
  .plan-list--compact { max-height: min(36vh, 280px); }
  .plan-item-foot { grid-template-columns: 1fr; }
  .plan-actions { grid-template-columns: 1fr; }
  .plan-actions .dialog-submit { order: -1; }
  .quick-menu-dialog { width: calc(100% - 16px); }
  .quick-menu { padding: 20px 16px; }
  .quick-actions { grid-template-columns: 1fr; }
}

@keyframes micPulse { 50% { transform: scale(1.06); } }
@keyframes voiceSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .dock-highlight, .dock-center-icon, .dock-slot svg { transition-duration: .01ms !important; }
}
