:root { --muted: #65666d; --line: #e9eaee; --bg: #f6f6f8; }
.topbar { align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.topbar h1 { font-size: 28px; font-weight: 600; letter-spacing: 0; overflow-wrap: anywhere; }
#pageTitle[title] { cursor: pointer; user-select: none; }
.page-heading { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 0 12px; min-width: 0; min-height: 44px; }
.header-date { color: var(--muted); font-size: 14px; white-space: nowrap; }
.date-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: 0;
  font-weight: 400;
  border-radius: 6px;
}
.header-date[hidden] { display: none; }
#headerDatePicker { position: relative; }
.date-picker {
  border: 0; background: transparent; color: var(--muted);
  padding: 0 10px; border-radius: 10px; font-size: 14px;
}
.date-picker:hover, .date-picker[aria-expanded="true"] { color: var(--ink); background: var(--bg); }
#headerDatePicker button:focus-visible { outline: 1px solid var(--muted); outline-offset: 1px; }
#datePickerPanel {
  position: absolute; z-index: 25; inset-block-start: calc(100% + 6px); inset-inline-start: 0;
  width: min(328px, calc(100vw - 32px)); padding: 12px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper);
  box-shadow: 0 12px 32px #21233318;
}
.date-picker-month { display: flex; align-items: center; gap: 4px; padding-inline-start: 8px; }
.date-picker-month strong { flex: 1; font-size: 15px; font-weight: 650; }
#datePickerPanel button { border: 0; border-radius: 9px; background: transparent; }
.date-picker-month button { width: 40px; height: 40px; font-size: 21px; color: var(--muted); }
.date-picker-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.date-picker-days span { color: var(--muted); font-size: 12px; padding-block: 8px; }
.date-picker-days button { min-height: 38px; font-size: 14px; font-variant-numeric: tabular-nums; }
.date-picker-days .outside-month { color: var(--muted); }
#datePickerPanel button:hover { background: var(--bg); }
#datePickerPanel button[aria-current="date"] { font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
#datePickerPanel button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
#datePickerToday { display: block; margin: 6px auto 0; min-height: 40px; padding-inline: 14px; font-size: 13px; font-weight: 600; }
@media (max-width: 720px) {
  .page-heading { position: relative; }
  #headerDatePicker { position: static; }
}
.brand { margin: 0 8px 24px; }
.quick-add {
  background: #26272b;
  color: var(--paper);
  border: 1px solid transparent;
  height: 44px;
  border-radius: 10px;
}
.nav-item { gap: 8px; padding: 8px 12px; }
.nav-count, .task-time { font-variant-numeric: tabular-nums; }
.task { gap: 12px; padding: 16px 0; }
.tag { background: transparent; padding: 0; }
.tag::after { content: " ·"; }
.task-meta { font-size: 13px; gap: 4px; }
.empty { padding: 32px 12px; }
.mobile-fab { box-shadow: 0 4px 12px #1c1c1e1a; }
.mobile-nav { grid-template-columns: repeat(3, 1fr); background: var(--paper); backdrop-filter: none; }
.inline-add { color: var(--ink); }
.primary { background: var(--ink); }
@media (min-width: 1101px) {
  .app-shell { grid-template-columns: 244px minmax(0, 1fr); }
}
.focus-card {
  align-items: center;
  min-height: 0;
  padding: 14px 16px;
  margin-bottom: 32px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: none;
  font-size: 14px;
}
.focus-progress span { color: #606067; }
.section-head { align-items: center; }
.section-head h2 { margin: 0; }
.section-head[hidden] { display: none; }
.project-list { list-style: none; padding: 0; margin: 0; }
.project-list li { border-bottom: 1px solid var(--line); }
.project-link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-height: 48px; padding: 10px 8px; border: 0;
  border-radius: 8px; background: transparent; text-align: start; overflow-wrap: anywhere;
}
.project-link:hover { background: var(--bg); }
.project-link span { color: var(--muted); font-size: 20px; }
.project-actions:not([hidden]) {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.project-actions .inline-add { min-height: 44px; padding: 6px 0; }
.project-action-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 14px; }
#projectGoalText, #projectProgress { margin-block: 12px; overflow-wrap: anywhere; }
#projectGoalText { white-space: pre-wrap; }
#projectProgress { color: var(--muted); font-size: 13px; }
#projectGoal { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.project-group { border-bottom: 1px solid var(--line); }
.project-group-heading { display: flex; align-items: flex-start; gap: 4px; }
.project-group-toggle {
  display: grid; grid-template-columns: auto minmax(0, max-content) minmax(0, 1fr); align-items: center;
  flex: 1; min-width: 0; min-height: 48px; gap: 2px 8px; padding: 10px 0;
  border: 0; border-radius: 6px; background: transparent; text-align: start; overflow-wrap: anywhere;
}
.project-group-toggle::before { content: '›' / ''; color: var(--muted); }
.project-group-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.project-group-toggle:hover { color: var(--muted); }
.project-group-controls { flex: 0 0 auto; }
.project-ungrouped-setting:not([hidden]) { display: flex; align-items: center; }
.project-ungrouped-setting[hidden] { display: none; }
.project-group-count, .project-pin-preview { color: var(--muted); font-size: 13px; }
.project-pin-preview { grid-column: 2 / -1; }
.project-group-toggle[aria-expanded="true"] .project-pin-preview { display: none; }
.project-group-add { min-height: 44px; padding: 6px 0; font-size: 14px; }
#taskProjectGroupField[hidden] { display: none; }
#taskDeadlineTimeField[hidden], #taskRepeatIntervalField[hidden], #taskCalendarFields[hidden], #taskEndField[hidden],
#taskDateFields[hidden] { display: none; }
#taskDateField[hidden] { display: none; }
.task-date-row:has(#taskDateField[hidden]) { grid-template-columns: minmax(0, 1fr); }
.task-repeat-row label { min-width: 0; }
#passwordSettings > summary { min-height: 44px; padding-block: 12px; font-size: 14px; cursor: pointer; }
@media (max-width: 520px) {
  #taskList .project-group .task { grid-template-columns: 28px minmax(0, 1fr); row-gap: 0; }
  .project-group .task .task-row-actions { grid-column: 2; justify-self: end; }
}
select {
  appearance: none;
  padding-inline-end: 30px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64666f 50%),
    linear-gradient(135deg, #64666f 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 11px) 50%;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}
.task-title { overflow-wrap: anywhere; }
.task-meta { flex-wrap: wrap; }
.task-meta:has(.deadline-badge) { align-items: baseline; gap: 5px 8px; }
.deadline-badge {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  background: #eeeff2; color: #545761; font-size: 11px; line-height: 1.35; white-space: nowrap;
}
.deadline-badge.deadline-today { background: #f9e2e8; color: #8b3452; }
.check { position: relative; }
.check::before { content: ""; position: absolute; inset: -11px; }
button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
dialog { width: min(420px, calc(100% - 28px)); }
dialog::backdrop { backdrop-filter: none; }
.modal-head { align-items: center; margin-bottom: 16px; }
.modal-head h2 { font-size: 22px; }
.close-btn { width: 44px; height: 44px; }
#taskForm input, #taskForm select { font-size: 16px; }
#taskDialog { max-height: calc(100dvh - 24px); }
#taskForm { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); padding: 0; }
#taskForm > .modal-head { flex: none; margin: 0; padding: 14px 24px 8px; }
#taskForm > .modal-head h2 { font-size: 20px; }
#taskForm > .modal-actions { flex: none; margin: 0; padding: 8px 24px 12px; }
.task-form-body { min-height: 0; padding: 3px 24px 5px; overflow-y: auto; }
.task-form-title { gap: 5px; margin-block-end: 10px; }
.task-form-section { border-top: 1px solid var(--line); }
.task-form-section > summary {
  min-height: 44px; display: flex; align-items: center; gap: 8px; padding-block: 6px;
  list-style: none; cursor: pointer; font-size: 14px;
}
.task-form-section > summary::-webkit-details-marker { display: none; }
.task-form-section > summary > span:first-child { flex: none; }
.task-form-section > summary::after {
  content: ''; width: 6px; height: 6px; flex: none; margin-inline-start: 2px;
  border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.task-form-section[open] > summary::after { transform: rotate(225deg); }
.task-form-summary { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--muted); text-align: end; font-size: 13px; }
.task-form-fields { padding-block: 4px 10px; }
.task-form-fields label { min-width: 0; margin-block-end: 12px; }
.task-form-fields input:not([type="radio"]), .task-form-fields select { width: 100%; padding-block: 9px; }
.task-form-fields #taskTypeField[hidden] { display: none; }
.task-common-fields { padding-block: 0; }
#taskForm .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#taskForm .task-date-row:has(#taskDateField[hidden]),
#taskForm .task-project-row:has(#taskProjectGroupField[hidden]):has(#taskDeadlineTimeField[hidden]),
#taskForm .task-repeat-row:has(#taskRepeatIntervalField[hidden]) { grid-template-columns: minmax(0, 1fr); }
.task-project-row:has(#taskProjectGroupField:not([hidden])) #taskDeadlineTimeField { grid-column: 1 / -1; }
#taskCalendarFields:has(#taskEndField:not([hidden])) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 400px) {
  #taskCalendarFields:has(#taskEndField:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #taskForm > .modal-head, #taskForm > .modal-actions, .task-form-body { padding-inline: 16px; }
  #taskForm input:not([type="radio"], [type="checkbox"]), #taskForm select { min-height: 44px; padding-inline: 8px; }
}
.task-form-fields .task-icon-picker { margin-block-end: 0; }
.task-form-fields .task-icon-picker label { margin: 0; }
.modal-actions button { min-height: 44px; }
#schedule { margin-bottom: 36px; }
.view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 280px);
  background: var(--bg);
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 22px;
}
.view-switch[hidden] { display: none; }
.view-switch button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  min-height: 38px;
  font-size: 14px;
  color: #606067;
}
.view-switch button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px #1c1c1e1a;
  font-weight: 600;
}
.schedule-tools { flex-wrap: wrap; }
.time-preview {
  position: absolute;
  left: 58px;
  right: 0;
  z-index: 2;
  pointer-events: none;
  height: 0;
  border-top: 1px solid #7999d1;
}
.time-preview-label {
  position: absolute;
  top: 2px;
  left: 0;
  color: #234984;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding: 3px 6px;
  white-space: nowrap;
  background: #e8efff;
  border-radius: 4px;
}
.schedule-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.schedule-tools h2 { font-size: 20px; margin: 0 auto 0 0; }
.schedule-tools button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
#timeline { position: relative; border-bottom: 1px solid var(--line); -webkit-user-select: none; user-select: none; }
.time-hour {
  border-top: 1px solid var(--line);
  color: #606067;
  padding-top: 5px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: crosshair;
}
.time-gap {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px dashed var(--line);
  background: var(--bg);
  color: #606067;
  text-align: left;
  padding-inline: 10px;
  font-size: 13px;
}
.time-event, .time-selection {
  position: absolute;
  border-radius: 5px;
  background: #e8efff;
  color: #234984;
}
.time-event {
  border: 0;
  padding: 0 7px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
}
.time-event:hover { background: #dce7ff; }
.time-selection { left: 58px; right: 4px; z-index: 2; background: #cadbff; }
.time-selection-add {
  display: block; width: 100%; height: 100%; min-height: 18px; padding: 0 8px;
  border: 0; background: transparent; text-align: start; font-size: 12px;
}
.time-selection-handle {
  position: absolute; inset-inline: 0; height: 16px; padding: 0;
  border: 0; background: transparent; cursor: ns-resize; touch-action: none;
}
.time-selection-handle::after { content: ''; position: absolute; inset-inline: 0; height: 2px; background: var(--blue); }
.time-selection-handle[data-edge="from"] { bottom: 100%; }
.time-selection-handle[data-edge="from"]::after { bottom: 0; }
.time-selection-handle[data-edge="to"] { top: 100%; }
.time-selection-handle[data-edge="to"]::after { top: 0; }
#taskAddToListField[hidden], #taskForm .task-project-row[hidden] { display: none; }
#timeline .time-event.timeline-task-entry,
.week-column .time-event.timeline-task-entry { padding-inline-start: 27px; }
.timeline-task-check {
  position: absolute; z-index: 3; width: 16px; height: 16px;
  inset-inline-start: 6px; inset-block-start: 50%; transform: translateY(-50%);
  margin: 0; padding: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; display: grid; place-items: center;
  border: 1px solid #9ca9a4; border-radius: 5px; background: var(--paper);
}
.timeline-task-check:checked { background: #527566; border-color: #527566; }
.timeline-task-check:checked::before {
  content: ''; width: 7px; height: 4px; border: solid #f7faf7; border-width: 0 0 1.5px 1.5px;
  transform: translateY(-1px) rotate(-45deg);
}
.timeline-task-check:focus-visible { outline: 1px solid #527566; outline-offset: 2px; box-shadow: none; }
@media (forced-colors: active) {
  .timeline-task-check { appearance: auto; }
  .timeline-task-check::before { display: none; }
}
.timeline-entry { position: absolute; container-type: inline-size; }
.timeline-entry:is(:hover, :focus-within, .actions-revealed) { z-index: 1; }
#timeline .timeline-entry > .time-event,
.week-column .timeline-entry > .time-event { inset: 0; width: 100%; height: 100%; }
.timeline-entry-actions {
  position: absolute; z-index: 4; display: flex; gap: 2px;
  inset-block-start: 50%; inset-inline-end: 3px; transform: translateY(-50%);
  max-width: calc(100% - 6px); height: min(28px, calc(100% - 2px));
  border-radius: 6px; background: #eff1f5;
  opacity: 0; pointer-events: none;
}
.timeline-entry:has(.timeline-task-check) .timeline-entry-actions { max-width: calc(100% - 27px); }
.timeline-entry:hover .timeline-entry-actions, .timeline-entry:focus-within .timeline-entry-actions,
.timeline-entry.actions-revealed .timeline-entry-actions {
  opacity: 1; pointer-events: auto;
}
.timeline-entry-actions button {
  display: grid; place-items: center; flex: 1 1 26px; width: 26px; min-width: 0; height: 100%; padding: 0;
  border: 0; border-radius: 5px; background: transparent; color: #525763;
}
.timeline-entry-actions svg { width: min(16px, 100%); height: 16px; pointer-events: none; }
.timeline-entry-actions button:hover { background: #dfe3ea; color: var(--ink); }
.timeline-entry-actions button:last-child:hover { color: #9d4650; }
.timeline-entry-actions button:focus-visible { outline: 1px solid var(--muted); outline-offset: -1px; }
@container (width < 70px) {
  .timeline-entry .timeline-entry-actions,
  .timeline-entry:has(.timeline-task-check) .timeline-entry-actions {
    inset-block-start: auto; inset-block-end: 100%; inset-inline-end: 0;
    height: 26px; max-width: none; transform: none;
    border: 1px solid var(--line); background: var(--paper);
  }
}
#timeline .timeline-entry:is(:hover, :focus-within) > .time-event,
.week-column .timeline-entry:is(:hover, :focus-within, .actions-revealed) > .time-event {
  padding-inline-end: min(58px, 45%);
}
@media (pointer: coarse) {
  #timeline .timeline-entry-actions { opacity: 1; pointer-events: auto; }
  #timeline .timeline-entry > .time-event { padding-inline-end: min(58px, 45%); }
  .week-column .timeline-entry:not(.actions-revealed) .timeline-entry-actions:not(:has(:focus-visible)) {
    opacity: 0; pointer-events: none;
  }
}
#eventForm input { width: 100%; font-size: 16px; }
.schedule-active { padding-top: 20px; }
.main:has(#todayViews:not([hidden])) { padding-top: 20px; }
.main:has(#todayViews:not([hidden])) .topbar { margin-bottom: 20px; }
.view-switch { width: 180px; margin: 0 0 0 auto; }
.view-switch button { min-height: 36px; }
.schedule-tools { gap: 8px; margin-bottom: 4px; }
.calendar-stepper { display: flex; align-items: center; gap: 2px; }
.calendar-stepper button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
}
.calendar-stepper button:hover { background: var(--bg); }
.schedule-tools #newEvent { white-space: nowrap; }
.period-switch {
  display: flex;
  margin-inline-start: auto;
  padding: 2px;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
}
@media (max-width: 520px) {
  .topbar .page-heading { flex-basis: 100%; }
}
.schedule-tools .period-switch button {
  min-width: 36px;
  min-height: 32px;
  border-radius: 6px;
  color: var(--muted);
}
.schedule-tools .period-switch button[aria-pressed="true"] {
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
}
#calendarGrid:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.calendar-weekday { padding: 6px; text-align: center; color: var(--muted); font-size: 13px; }
.calendar-day {
  min-height: 76px;
  min-width: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  text-align: left;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
}
.calendar-day[aria-current="date"], .calendar-day:hover { background: var(--bg); }
.calendar-day.outside-month strong { color: var(--muted); font-weight: 400; }
.calendar-entry {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--bg);
  padding: 2px 4px;
  border-radius: 4px;
}
@media (max-width: 720px) {
  .main:has(#todayViews:not([hidden])) { padding-top: 12px; }
  #calendarGrid[data-period="month"] .calendar-day { padding: 4px; }
}
#calendarGrid[data-period="week"]:not([hidden]) { display: block; overflow-x: auto; border: 0; }
.week-timeline {
  display: grid;
  position: relative;
  --week-axis-width: 60px;
  grid-template-columns: var(--week-axis-width) repeat(7, minmax(94px, 1fr));
  min-width: calc(var(--week-axis-width) + 7 * 94px);
}
.week-axis, .week-column { position: relative; min-width: 0; }
.week-axis { position: sticky; left: 0; z-index: 2; background: var(--paper); }
.week-heading {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  width: 100%;
  height: var(--week-heading-height);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
button.week-heading { border-radius: 12px; }
button.week-heading:hover { background: var(--bg); }
.week-heading strong {
  min-width: 30px;
  border-radius: 8px;
  padding: 2px 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.week-heading[aria-current="date"] strong {
  box-shadow: inset 0 0 0 1px #daddE3;
  font-weight: 650;
}
.week-heading.week-selected span { color: var(--ink); font-weight: 600; }
.week-heading.week-selected strong {
  min-width: 34px;
  background: #e4e7ed;
  box-shadow: inset 0 0 0 1px #d4d8e0;
  font-weight: 650;
}
.week-hour, .week-end {
  border-top: 1px solid #eceef1;
  padding: 3px 10px 0 0;
  color: #535660;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.week-hour { height: var(--week-hour-height); }
.week-end { min-height: 24px; }
.week-axis :is(.week-hour, .week-end) { border-top-color: transparent; }
.week-column .week-reference { border-color: #dfe3ea; }
.week-guide {
  position: absolute;
  inset-inline: var(--week-axis-width) 0;
  z-index: 1;
  border-top: 1px solid #91a7cc;
  pointer-events: none;
}
.week-guide span {
  position: absolute;
  inset-block-start: 2px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf2fc;
  color: #315479;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Neutral surfaces keep date selection and real schedule entries distinct. */
.main { background: var(--paper); }
.view-switch, .period-switch { background: #f2f3f5; }
#timeline { border-bottom-color: transparent; }
.schedule-active:has(#dayViewport:not([hidden])) #schedule { margin-bottom: 0; }
#dayViewport {
  --timeline-bottom: 8px;
  max-height: max(160px, calc(100dvh - var(--timeline-top, 164px) - var(--timeline-bottom)));
  overflow-y: auto;
  scrollbar-width: thin;
}
#dayViewport:focus-visible { outline: 1px solid var(--line); outline-offset: -1px; }
.saved-time-handle {
  position: absolute; z-index: 1; height: 9px; border: 0; padding: 0;
  inset-inline: 0; background: transparent; cursor: ns-resize; touch-action: none;
}
.saved-time-handle[data-edge="start"] { inset-block-start: 0; }
.saved-time-handle[data-edge="end"] { inset-block-end: 0; }
.saved-time-handle::after {
  content: ''; position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
  width: min(32px, 60%); height: 3px; border-radius: 3px; background: var(--muted);
  opacity: 0;
}
#timeline .time-event:has(+ .saved-time-handle):hover + .saved-time-handle::after,
#timeline .time-event:has(+ .saved-time-handle):hover + .saved-time-handle + .saved-time-handle::after,
.saved-time-handle:hover::after, .saved-time-handle:focus-visible::after { opacity: 1; }
@media (pointer: coarse) {
  .saved-time-handle::after { opacity: .65; }
}
.time-hour { border-top: 1px solid transparent; text-align: right; padding-right: calc(100% - 48px); }
#timeline :is(.time-hour, .time-midnight) { position: relative; }
#timeline :is(.time-hour, .time-midnight)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 58px;
  right: 0;
  border-top: 1px solid #e9ebef;
  pointer-events: none;
}
#timeline .time-midnight { width: auto; padding-right: calc(100% - 48px); }
.time-midnight {
  padding: 4px 0 8px;
  width: 48px;
  text-align: right;
  color: #606067;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  #dayViewport { --timeline-bottom: calc(80px + env(safe-area-inset-bottom)); }
}
#timeline .time-event {
  display: flex;
  flex-flow: row wrap;
  align-content: center;
  align-items: baseline;
  column-gap: 8px;
  background: #f7f8fa;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding-inline: 10px;
}
#timeline .time-event:hover { background: #eff1f5; border-color: #d5d8df; }
.event-name, .event-time { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.event-name { font-weight: 600; }
.event-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
#calendarGrid { background: var(--paper); }
.week-column .time-event {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-content: center;
  align-items: stretch;
  inset-inline: 4px;
  background: #f0f2f5;
  border-radius: 8px;
  color: var(--ink);
}
.week-column .time-event.week-event-compact { flex-direction: row; align-items: center; justify-content: flex-start; gap: 4px; }
.week-event-compact .event-name { order: -1; flex-shrink: 0; max-width: 100%; }
.week-column .time-event:hover { background: #e6eaf0; }
#taskList { background: var(--paper); padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; }
#taskList .task:last-child { border-bottom: 0; }
#taskList.grouped-tasks { gap: 8px; padding: 0; border: 0; background: transparent; }
.task-group { padding: 4px 0 0; border-top: 1px solid var(--line); }
.main:has(> #taskPane:not([hidden]) > #inboxQueue:not([hidden])) {
  display: flex; flex-direction: column; min-height: 100dvh; padding-block-end: 24px;
}
#taskPane:not([hidden]):has(> #inboxQueue:not([hidden])) { display: flex; flex-direction: column; flex: 1; gap: 24px; }
.inbox-queue { margin-block-start: auto; border-radius: 10px; background: var(--bg); }
#inboxQueueHeading { margin: 0; font-weight: 600; }
#inboxQueueCount { font-weight: 400; }
#inboxQueueToggle {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px;
  padding: 0 12px; border: 0; border-radius: 10px; background: transparent;
  color: var(--muted); font-size: 13px; text-align: start;
}
#inboxQueueToggle:hover, #inboxQueueToggle:focus-visible { color: var(--ink); }
#inboxQueueToggle::after {
  content: ''; width: 6px; height: 6px; margin-inline-start: auto;
  border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
#inboxQueueToggle[aria-expanded="true"]::after { transform: rotate(225deg); }
#inboxQueueItems { margin-inline: 12px; border-top: 1px solid var(--line); }
.inbox-queue .task { padding-block: 5px; }
.inbox-queue .task:last-child { border-bottom: 0; }
.inbox-queue .task-title { font-size: 14px; }
.inbox-queue .task-meta { font-size: 12px; }
.inbox-queue .check { width: 19px; height: 19px; background: transparent; }
.inbox-queue .task-row-actions button:hover { background: var(--paper); }
.inbox-drag-handle { flex: 0 0 auto; padding-inline: 3px; color: var(--muted); cursor: grab; user-select: none; }
.inbox-drag-handle:active { cursor: grabbing; }
.inbox-dragging [data-inbox-drop] { border-radius: 8px; background: var(--bg); }
.inbox-dragging .inbox-drop-active { outline: 1px solid var(--muted); outline-offset: -1px; }
.task-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-group h3 { margin: 0; font-size: 14px; font-weight: 600; }
.task-group h3 span { margin-left: 4px; color: var(--muted); font-weight: 400; }
.group-add { min-height: 44px; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 13px; }
.grouped-tasks .task { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; }
.task-row-actions { display: flex; align-items: center; gap: 2px; }
.task-row-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.task-row-actions button:hover { background: var(--bg); color: var(--ink); }
.task-row-actions :is([data-delete-task], [data-delete-project-group]):hover { color: #a23636; }
@media (hover: hover) and (pointer: fine) {
  .task-row-actions { opacity: 0; pointer-events: none; transition: opacity 120ms ease-out; }
  .task:hover .task-row-actions, .task:focus-within .task-row-actions { opacity: 1; pointer-events: auto; }
  .project-group-heading:hover .project-group-controls, .project-group-heading:focus-within .project-group-controls { opacity: 1; pointer-events: auto; }
}
@media (hover: none), (pointer: coarse) {
  .inbox-drag-handle { display: none; }
}
@media (max-width: 720px) {
  .main:has(> #taskPane:not([hidden]) > #inboxQueue:not([hidden])) {
    padding-block-end: calc(158px + env(safe-area-inset-bottom));
  }
}
#deleteTaskName { color: var(--muted); overflow-wrap: anywhere; }
.task-delete-confirm { background: #a23636; color: var(--paper); }
@media (max-width: 720px) {
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mobile-nav ~ .mobile-fab {
    background: var(--paper);
    color: var(--ink);
    border: 1px solid #dedfe4;
    box-shadow: 0 2px 8px #1c1c1e0d;
  }
}
.backup-trigger {
  min-height: 44px;
  border: 0;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: start;
}
.backup-desktop { align-self: flex-start; margin-top: auto; }
.backup-mobile { display: none; }
.backup-panel { padding: 24px; }
.backup-panel p { font-size: 14px; line-height: 1.6; color: var(--muted); }
@media (max-width: 720px) {
  .backup-mobile { display: inline-block; margin-top: 12px; }
}
.view-switch, .period-switch {
  --segment-inset: 3px;
  --segment-count: 2;
  --segment-index: 0;
  --ease-feedback: cubic-bezier(.22, 1, .36, 1);
  position: relative;
  isolation: isolate;
}
.period-switch {
  --segment-inset: 2px;
  --segment-count: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.view-switch:has(#timelineView[aria-pressed="true"]),
.period-switch:has([data-period="week"][aria-pressed="true"]) { --segment-index: 1; }
.period-switch:has([data-period="month"][aria-pressed="true"]) { --segment-index: 2; }
.view-switch::before, .period-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: var(--segment-inset);
  inset-inline-start: var(--segment-inset);
  width: calc((100% - 2 * var(--segment-inset)) / var(--segment-count));
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 1px 3px #1c1c1e1a;
  transform: translateX(calc(var(--segment-index) * 100%));
  transition: transform 180ms var(--ease-feedback);
  pointer-events: none;
}
.view-switch button[aria-pressed="true"],
.schedule-tools .period-switch button[aria-pressed="true"] {
  background: transparent;
  box-shadow: none;
}
.view-switch button, .period-switch button, .quick-add, #newEvent,
.calendar-stepper button, .modal-actions button, .check, .time-event {
  transition: background-color 140ms ease-out, border-color 140ms ease-out, transform 120ms ease-out;
}
.view-switch button:active, .period-switch button:active, .quick-add:active,
#newEvent:active, .calendar-stepper button:active, .modal-actions button:active,
.check:active, .time-event:active { transform: scale(.97); }
dialog[open] { animation: dialog-arrive 180ms ease-out both; }
.task.completed .check.just-completed::after { animation: check-arrive 160ms ease-out both; }
#toast { z-index: 30; }
@media (max-width: 720px) {
  #toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@keyframes dialog-arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes check-arrive {
  from { opacity: .4; transform: scale(.72); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open], .task.completed .check.just-completed::after { animation: none; }
  .view-switch::before, .period-switch::before { transition: none; }
  button:active { transform: none !important; }
}
.event-completed :is(.event-name, .event-time), .calendar-entry.event-completed {
  color: #555f59; text-decoration: line-through; text-decoration-color: #8a9990; text-decoration-thickness: 1px;
}
.event-completed .event-name { font-weight: 500; }
#timeline .time-event.event-completed, .week-column .time-event.event-completed {
  background: #edf3ef; border-color: #dbe6df;
}
#timeline .time-event.event-completed:hover, .week-column .time-event.event-completed:hover {
  background: #e6efe9; border-color: #ccdcd2;
}
.task-confetti { position: fixed; z-index: 100; pointer-events: none; }
.task-confetti i { position: absolute; width: 5px; height: 3px; border-radius: 1px; }
.task-confetti i:nth-child(3n) { width: 3px; height: 7px; }
.task-confetti i:nth-child(4n) { width: 4px; height: 4px; border-radius: 50%; }
.time-event.event-pending { border: 1px dashed #a1a1aa; }
.calendar-entry.event-pending { color: var(--muted); }
.task-title { display: flex; align-items: baseline; gap: 7px; }
.task-title > span:last-child { min-width: 0; }
.task-symbol { flex: 0 0 20px; width: 20px; height: 20px; align-self: center; object-fit: contain; }
.task-icon-picker { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.task-icon-picker legend { margin-bottom: 6px; padding: 0; font-size: 13px; font-weight: 600; }
#taskIconOptions { display: flex; flex-wrap: wrap; gap: 6px; }
.task-icon-picker label { position: relative; display: grid; place-items: center; margin: 0; cursor: pointer; }
.task-icon-picker input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.task-icon-picker .task-icon-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; height: 44px;
  border: 1px solid transparent; border-radius: 9px;
  background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1;
}
.task-icon-chip img { width: 24px; height: 24px; object-fit: contain; }
.task-icon-auto .task-icon-chip { padding-inline: 8px; }
.task-icon-picker input:checked + span { background: #e9eaee; border-color: #d5d7df; color: var(--ink); }
.task-icon-picker input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.account-trigger {
  align-self: flex-start; min-height: 44px; max-width: 100%; padding: 4px 8px; border: 0;
  border-radius: 10px; background: transparent; color: var(--ink); font-size: 14px;
  align-items: center; gap: 8px;
}
.account-trigger:hover { background: var(--bg); }
.account-desktop { display: inline-flex; margin-top: auto; }
.account-mobile { display: none; }
.account-avatar {
  display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 50%; overflow: hidden; background: #e9eaee; color: var(--ink); font-weight: 600;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-row { display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 20px; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.avatar-reset { background: transparent; color: var(--muted); }
[data-account-name] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-form { padding: 0; margin-block: 12px; }
.account-button { min-height: 44px; border: 0; border-radius: 8px; padding: 6px 12px; }
.account-request { display: flex; gap: 6px; align-items: center; margin-block: 8px; }
.account-request span { flex: 1; overflow-wrap: anywhere; }
.event-invite-trigger {
  position: relative; display: grid; place-items: center; flex: 0 0 44px;
  height: 44px; margin-inline-start: auto; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
}
.event-invite-trigger[hidden] { display: none; }
.event-invite-trigger:hover { background: var(--bg); color: var(--ink); }
.event-invite-trigger.has-messages::after {
  content: ''; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px var(--paper);
}
.event-message-group h3 { margin: 0; color: var(--muted); font-size: 13px; }
.event-message-group:not([hidden]) + .event-message-group:not([hidden]) { margin-block-start: 16px; }
#eventGuestField[hidden], #eventCloudStatus:empty, #accountStatus:empty { display: none; }
.task-share-fields { border-top: 1px solid var(--line); }
.task-share-fields .event-share-toggle { margin-bottom: 0; }
#taskShareStatus { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
#taskGuestField[hidden] { display: none; }
.event-share-toggle {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 44px; margin: 0 0 10px; cursor: pointer;
}
.event-share-toggle input {
  appearance: none; display: flex; align-items: center; flex: 0 0 44px;
  width: 44px; height: 26px; margin: 0; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer;
}
.event-share-toggle input::before {
  content: ''; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px #0003;
}
.event-share-toggle input:checked { background: var(--ink); border-color: var(--ink); }
.event-share-toggle input:checked::before { transform: translateX(18px); }
.event-share-toggle input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (forced-colors: active) {
  .event-share-toggle input { appearance: auto; }
  .event-share-toggle input::before { content: none; }
}
#eventCloudStatus { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .topbar .page-heading { flex: 1 0 100%; column-gap: 6px; }
  .account-mobile { display: inline-flex; align-self: center; margin-inline-start: auto; padding-inline: 6px; }
  .event-invite-trigger:not([hidden]) + .account-mobile { margin-inline-start: 0; }
}
.account-sync { margin-block: 12px 16px; padding-block: 12px; border-block: 1px solid var(--line); }
.account-sync h3 { margin: 0; font-size: 14px; }
.account-sync p { margin-block: 6px; }
