:root {
  --sky: #54b8ec;
  --sky-deep: #2498d7;
  --sky-pale: #e7f6fc;
  --sky-wash: #f0faff;
  --ink: #173d59;
  --ink-soft: #5f7d90;
  --ink-faint: #8aa2b1;
  --paper: #f6fbfe;
  --white: #ffffff;
  --line: #d8e9f3;
  --line-strong: #c2dce9;
  --danger: #c45f70;
  --rail-width: 76px;
  --radius-sm: 10px;
  --radius-md: 17px;
  --radius-lg: 25px;
  --shadow-soft: 0 18px 48px rgba(31, 108, 147, 0.08);
  --shadow-card: 0 10px 26px rgba(31, 108, 147, 0.11);
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 88% -12%, rgba(84, 184, 236, 0.13), transparent 31rem),
    var(--paper);
  color: var(--ink);
  letter-spacing: 0.005em;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 152, 215, 0.36);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(100%, 1376px);
  margin: 0 auto;
  padding: 32px 48px 72px;
}

.site-header,
.week-heading,
.panel-header,
.detail-header,
.dialog-header,
.steps-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 34px;
  height: 34px;
  gap: 3px;
  padding: 6px 7px;
  border: 1px solid rgba(84, 184, 236, 0.35);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--white), var(--sky-pale));
  box-shadow: 0 6px 14px rgba(84, 184, 236, 0.14);
  transform: rotate(-4deg);
}

.brand-mark i {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: var(--sky);
  transform: skewY(-21deg);
}

.brand-mark i:nth-child(1) {
  height: 8px;
  opacity: 0.45;
}

.brand-mark i:nth-child(2) {
  height: 14px;
  opacity: 0.74;
}

.brand-mark i:nth-child(3) {
  height: 20px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.07em;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.text-button,
.quiet-button,
.primary-button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.text-button {
  padding: 9px 2px;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.text-button:hover {
  color: var(--sky-deep);
  border-color: var(--sky);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--sky);
  border-radius: 999px;
  background: var(--sky);
  box-shadow: 0 8px 18px rgba(36, 152, 215, 0.19);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.primary-button span {
  margin-right: 7px;
  font-size: 19px;
  font-weight: 400;
  line-height: 0;
}

.primary-button:hover {
  background: var(--sky-deep);
  border-color: var(--sky-deep);
  box-shadow: 0 10px 22px rgba(36, 152, 215, 0.26);
  transform: translateY(-1px);
}

.week-section {
  margin-top: 62px;
}

.week-heading {
  align-items: flex-end;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--sky-deep);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin: 0 5px;
  color: var(--line-strong);
  font-weight: 400;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.035em;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 650;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 680;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
}

.date-subheading {
  margin-bottom: 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.3;
}

.week-nav {
  display: flex;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--sky);
  background: var(--sky-pale);
  color: var(--sky-deep);
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 25px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.week-day {
  position: relative;
  display: grid;
  min-height: 78px;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 12px 6px 14px;
  border: 1px solid transparent;
  border-radius: 15px 15px 0 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.week-day::after {
  position: absolute;
  right: 23%;
  bottom: -1px;
  left: 23%;
  height: 2px;
  border-radius: 4px 4px 0 0;
  background: transparent;
  content: "";
}

.week-day:hover {
  background: rgba(231, 246, 252, 0.55);
  color: var(--ink);
  transform: translateY(-1px);
}

.week-day.is-selected {
  border-color: var(--line);
  border-bottom-color: var(--paper);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 -4px 18px rgba(31, 108, 147, 0.04);
}

.week-day.is-selected::after {
  background: var(--sky);
}

.week-day-name {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.week-day-number {
  color: currentColor;
  font-size: 19px;
  font-weight: 680;
  line-height: 1;
}

.week-day-count {
  min-height: 12px;
  color: var(--sky-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.week-day.is-today .week-day-number {
  color: var(--sky-deep);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(315px, 0.82fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
}

.timeline-panel {
  min-height: 530px;
  overflow: hidden;
}

.panel-header {
  align-items: flex-end;
  min-height: 87px;
  padding: 24px 27px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-header .eyebrow {
  margin-bottom: 8px;
}

.panel-note,
.task-count {
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.2;
}

.timeline-scroll {
  max-height: 660px;
  overflow: auto;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.timeline {
  position: relative;
  min-height: 360px;
  margin: 0 25px 20px;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--rail-width);
  width: 1px;
  background: var(--line);
  content: "";
}

.time-line {
  position: absolute;
  top: var(--top);
  right: 0;
  left: var(--rail-width);
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.time-label {
  position: absolute;
  top: var(--top);
  left: 0;
  width: calc(var(--rail-width) - 12px);
  padding-right: 12px;
  color: var(--ink-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
  transform: translateY(-50%);
}

.timeline-card {
  position: absolute;
  top: var(--top);
  left: calc(var(--rail-width) + (100% - var(--rail-width) - 16px) * var(--lane) / var(--lanes));
  display: grid;
  width: calc((100% - var(--rail-width) - 16px) / var(--lanes) - 7px);
  height: max(38px, var(--height));
  align-content: start;
  gap: 4px;
  padding: 10px 13px;
  overflow: hidden;
  border: 1px solid rgba(84, 184, 236, 0.52);
  border-left: 3px solid var(--sky);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #e8f7fd 100%);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  z-index: 2;
}

.timeline-card:hover {
  border-color: var(--sky-deep);
  box-shadow: 0 14px 28px rgba(31, 108, 147, 0.16);
  transform: translateY(-2px);
}

.timeline-card.is-complete {
  border-left-color: var(--line-strong);
  background: linear-gradient(135deg, #f8fcfe 0%, #edf4f7 100%);
  color: var(--ink-soft);
  opacity: 0.78;
}

.timeline-card.is-complete strong {
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.card-time,
.card-meta {
  overflow: hidden;
  color: var(--sky-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  color: var(--ink-faint);
}

.timeline-card strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-line {
  position: absolute;
  top: var(--top);
  right: 0;
  left: var(--rail-width);
  height: 2px;
  border-radius: 2px;
  background: var(--sky-deep);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.12);
  pointer-events: none;
  z-index: 3;
}

.now-line::before {
  position: absolute;
  left: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--sky-deep);
  box-shadow: 0 0 0 2px rgba(84, 184, 236, 0.32);
  content: "";
  transform: translateY(-4px);
}

.now-line span {
  position: absolute;
  right: 0;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--sky-deep);
  color: var(--white);
  font-size: 9px;
  line-height: 1;
}

.empty-state {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 260px;
  gap: 9px;
  padding: 34px;
  color: var(--ink-soft);
}

.empty-state .empty-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-pale);
  color: var(--sky-deep);
  font-size: 14px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.empty-state > span:not(.empty-symbol) {
  max-width: 260px;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.5;
}

.empty-state button {
  margin-top: 7px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--sky);
  background: transparent;
  color: var(--sky-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.timeline-empty {
  min-height: 360px;
  padding-left: calc(var(--rail-width) + 24px);
}

.task-panel {
  display: flex;
  min-height: 530px;
  flex-direction: column;
}

.task-panel-header {
  flex: 0 0 auto;
}

.task-count {
  padding-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.task-list {
  flex: 1 1 auto;
  min-height: 250px;
  padding: 8px 27px 18px;
}

.task-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 26px;
  align-items: center;
  min-height: 70px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

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

.task-check {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: var(--white);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.task-check:hover {
  border-color: var(--sky);
  transform: scale(1.08);
}

.task-row.is-complete .task-check {
  border-color: var(--sky);
  background: var(--sky);
}

.task-open {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.task-name,
.task-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  line-height: 1.2;
}

.task-sub {
  color: var(--ink-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.task-row.is-complete .task-name {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.task-arrow {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 17px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.task-arrow:hover {
  background: var(--sky-pale);
  color: var(--sky-deep);
  transform: translate(1px, -1px);
}

.list-empty {
  min-height: 220px;
  padding: 26px 0;
}

.task-footnote {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
  margin: 0 27px 25px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.footnote-mark {
  flex: 0 0 auto;
  color: var(--sky);
  font-size: 13px;
  line-height: 1.3;
}

.task-footnote p {
  max-width: 220px;
  margin-bottom: 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

.detail-backdrop {
  position: fixed;
  z-index: 9;
  inset: 0;
  visibility: hidden;
  background: rgba(17, 47, 69, 0.23);
  opacity: 0;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.detail-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  width: min(438px, 100%);
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--white);
  box-shadow: -18px 0 48px rgba(25, 73, 99, 0.14);
  visibility: hidden;
  transform: translateX(102%);
  transition: transform 280ms cubic-bezier(0.22, 0.72, 0.26, 1), visibility 280ms ease;
}

.detail-panel.is-open {
  visibility: visible;
  transform: translateX(0);
}

.detail-header {
  flex: 0 0 auto;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.detail-header .eyebrow {
  margin-bottom: 0;
}

.close-button {
  width: 34px;
  height: 34px;
  font-size: 23px;
  font-weight: 300;
}

.detail-content {
  flex: 1 1 auto;
  overflow: auto;
  padding: 34px 29px 40px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.detail-content > h2 {
  margin: 9px 0 12px;
  font-size: 31px;
  line-height: 1.15;
}

.detail-kicker {
  color: var(--sky-deep);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
}

.detail-kicker span {
  color: var(--ink-faint);
  font-weight: 500;
}

.detail-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.detail-time span {
  color: var(--line-strong);
}

.detail-notes {
  margin: 26px 0 28px;
  padding: 16px 17px;
  border-left: 2px solid var(--sky);
  background: var(--sky-wash);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.detail-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 36px;
  color: var(--ink-faint);
  font-size: 10px;
}

.detail-progress strong {
  color: var(--sky-deep);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--sky-pale);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sky);
  transition: width 220ms ease;
}

.detail-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 37px 0 4px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.detail-section-heading span {
  color: var(--ink-faint);
  font-size: 10px;
}

.step-row {
  display: grid;
  grid-template-columns: 20px 25px minmax(0, 1fr);
  align-items: start;
  min-height: 48px;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(216, 233, 243, 0.7);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
}

.step-row input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--sky);
  cursor: pointer;
}

.step-index {
  color: var(--sky-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
}

.step-row.is-complete {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.detail-empty {
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.5;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 30px;
}

.quiet-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.quiet-button:hover {
  border-color: var(--sky);
  background: var(--sky-wash);
  color: var(--sky-deep);
}

.detail-actions .primary-button {
  width: 100%;
  min-height: 40px;
}

.danger-button {
  display: block;
  margin: 25px auto 0;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 10px;
}

.danger-button:hover {
  border-color: currentColor;
}

.detail-placeholder {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 360px;
  gap: 9px;
  color: var(--ink-faint);
  font-size: 12px;
}

.placeholder-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 7px;
  place-items: center;
  border-radius: 50%;
  background: var(--sky-pale);
  color: var(--sky-deep);
}

.detail-placeholder strong {
  color: var(--ink);
  font-size: 15px;
}

.task-dialog {
  width: min(570px, calc(100% - 30px));
  max-height: calc(100dvh - 30px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 80px rgba(18, 65, 91, 0.2);
  color: var(--ink);
}

.task-dialog:not([open]) {
  display: none;
}

.task-dialog::backdrop {
  background: rgba(19, 55, 78, 0.3);
  backdrop-filter: blur(4px);
}

.dialog-frame {
  max-height: calc(100dvh - 30px);
  overflow: auto;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.dialog-header {
  align-items: flex-start;
  padding: 27px 29px 23px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  font-size: 24px;
}

#task-form {
  display: grid;
  gap: 21px;
  padding: 25px 29px 29px;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field-label {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.field-label em {
  margin-left: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--sky-wash);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-field input {
  height: 43px;
  padding: 0 12px;
}

.form-field textarea {
  min-height: 84px;
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--ink-faint);
  opacity: 0.85;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.14);
}

.form-schedule {
  display: grid;
  grid-template-columns: 1.28fr 0.86fr 0.86fr;
  gap: 10px;
}

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

.form-repeat select {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--sky-wash);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.form-repeat select:focus-visible {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.14);
}

.form-weekdays {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-weekdays legend { margin-bottom: 9px; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-options label { cursor: pointer; }
.weekday-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.weekday-options span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--sky-wash);
  color: var(--ink-soft);
  font-size: 12px;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.weekday-options label:hover span { transform: translateY(-2px); border-color: var(--sky); }
.weekday-options input:checked + span { border-color: var(--sky); background: var(--sky); color: white; }
.weekday-options input:focus-visible + span { outline: 3px solid rgba(84, 184, 236, 0.3); outline-offset: 2px; }
.form-repeat [hidden] { display: none !important; }
.detail-repeat { color: var(--ink-soft); font-size: 12px; }

@media (max-width: 480px) {
  .form-repeat { grid-template-columns: 1fr; }
  .weekday-options { gap: 6px; }
  .weekday-options span { width: 32px; height: 32px; }
}

.schedule-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(240, 250, 255, 0.66);
  cursor: pointer;
}

.schedule-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-box {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--white);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.toggle-box::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid transparent;
  border-left: 2px solid transparent;
  content: "";
  transform: rotate(-45deg) translate(1px, -1px);
}

.schedule-toggle input:checked + .toggle-box {
  border-color: var(--sky);
  background: var(--sky);
}

.schedule-toggle input:checked + .toggle-box::after {
  border-color: var(--white);
}

.schedule-toggle input:focus-visible + .toggle-box {
  outline: 3px solid rgba(36, 152, 215, 0.36);
  outline-offset: 3px;
}

.toggle-copy {
  display: grid;
  gap: 2px;
}

.toggle-copy strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.toggle-copy small,
.steps-editor-heading small {
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.3;
}

#task-form.is-unscheduled .form-schedule {
  opacity: 0.5;
}

.steps-editor {
  display: grid;
  gap: 12px;
}

.steps-editor-heading {
  align-items: flex-end;
}

.steps-editor-heading > div {
  display: grid;
  gap: 4px;
}

.add-step-button {
  min-height: 30px;
  padding: 0 11px;
  font-size: 10px;
}

.add-step-button span {
  font-size: 15px;
  font-weight: 400;
  line-height: 0;
}

.form-steps {
  display: grid;
  gap: 8px;
}

.form-step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 7px;
}

.form-step-row input {
  width: 100%;
  min-height: 39px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--sky-wash);
  color: var(--ink);
  font-size: 12px;
}

.form-step-row input:focus {
  border-color: var(--sky);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.14);
}

.form-step-row button {
  display: grid;
  min-height: 39px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 18px;
}

.form-step-row button:hover {
  border-color: rgba(196, 95, 112, 0.24);
  background: rgba(196, 95, 112, 0.06);
  color: var(--danger);
}

.form-error {
  min-height: 16px;
  margin: -5px 0 -5px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.save-button {
  min-width: 128px;
  margin-top: 19px;
}

.save-button span {
  margin-right: 0;
  margin-left: 7px;
  font-size: 14px;
}

@media (max-width: 920px) {
  .app-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  }

  .panel-header {
    padding-right: 21px;
    padding-left: 21px;
  }

  .timeline {
    margin-right: 20px;
    margin-left: 20px;
  }

  .task-list {
    padding-right: 21px;
    padding-left: 21px;
  }

  .task-footnote {
    margin-right: 21px;
    margin-left: 21px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 23px 17px 48px;
  }

  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    gap: 13px;
  }

  .text-button {
    font-size: 11px;
  }

  .add-task-button {
    min-height: 38px;
    padding: 0 13px;
    font-size: 11px;
  }

  .week-section {
    margin-top: 46px;
  }

  h1 {
    font-size: 32px;
  }

  .week-days {
    gap: 3px;
    margin-top: 20px;
  }

  .week-day {
    min-height: 71px;
    padding-right: 2px;
    padding-left: 2px;
    border-radius: 11px 11px 0 0;
  }

  .week-day-name {
    font-size: 9px;
  }

  .week-day-number {
    font-size: 17px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 15px;
  }

  .timeline-panel,
  .task-panel {
    min-height: 0;
  }

  .panel-header {
    min-height: 80px;
    padding: 21px 19px 17px;
  }

  .panel-note {
    max-width: 90px;
    font-size: 10px;
    line-height: 1.45;
    text-align: right;
  }

  .timeline-scroll {
    max-height: 540px;
  }

  .timeline {
    --rail-width: 62px;
    margin-right: 17px;
    margin-left: 17px;
  }

  .timeline-card {
    padding-right: 9px;
    padding-left: 10px;
  }

  .card-time,
  .card-meta {
    font-size: 9px;
  }

  .timeline-card strong {
    font-size: 12px;
  }

  .task-list {
    padding: 4px 19px 12px;
  }

  .task-footnote {
    margin-right: 19px;
    margin-left: 19px;
  }
}

@media (max-width: 480px) {
  .brand-copy small {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }

  .text-button {
    padding-right: 0;
    padding-left: 0;
  }

  .week-heading {
    align-items: flex-start;
  }

  .week-nav {
    padding-top: 3px;
  }

  .icon-button {
    width: 33px;
    height: 33px;
  }

  .week-day {
    min-height: 67px;
  }

  .week-day-count {
    font-size: 9px;
  }

  .task-row {
    grid-template-columns: 23px minmax(0, 1fr) 24px;
    gap: 9px;
  }

  .task-name {
    font-size: 12px;
  }

  .task-sub {
    font-size: 9px;
  }

  .detail-content {
    padding: 29px 21px 34px;
  }

  .detail-header {
    padding-right: 21px;
    padding-left: 21px;
  }

  .detail-content > h2 {
    font-size: 27px;
  }

  .task-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }

  .dialog-frame {
    max-height: calc(100dvh - 20px);
  }

  .dialog-header {
    padding: 23px 20px 19px;
  }

  #task-form {
    gap: 18px;
    padding: 21px 20px 22px;
  }

  .form-schedule {
    grid-template-columns: 1fr 1fr;
  }

  .form-schedule .form-field:first-child {
    grid-column: 1 / -1;
  }

  .steps-editor-heading {
    align-items: flex-start;
    gap: 10px;
  }

  .add-step-button {
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Refined glass system and view-specific surfaces. */
:root {
  --paper: #f3f9fc;
  --sky-pale: #e5f5fb;
  --sky-wash: #eff9fd;
  --line: rgba(157, 201, 220, 0.42);
  --line-strong: rgba(113, 174, 201, 0.56);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-solid: rgba(255, 255, 255, 0.84);
  --glass-shadow: 0 20px 50px rgba(42, 113, 145, 0.11);
  --shadow-card: 0 11px 24px rgba(40, 111, 143, 0.12);
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 93% -7%, rgba(84, 184, 236, 0.2), transparent 29rem),
    radial-gradient(circle at -10% 76%, rgba(118, 211, 220, 0.11), transparent 24rem),
    var(--paper);
}

.app-shell {
  padding-top: 36px;
  padding-bottom: 80px;
}

.site-header {
  min-height: 56px;
}

.brand-mark {
  border-color: rgba(84, 184, 236, 0.42);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(229, 245, 251, 0.78));
  box-shadow: 0 8px 20px rgba(84, 184, 236, 0.17);
}

.brand-copy strong {
  letter-spacing: 0.045em;
}

.week-section {
  margin-top: 50px;
}

.week-heading-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 7px 20px rgba(42, 113, 145, 0.07);
}

.view-switch button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.view-switch button:hover {
  color: var(--ink);
}

.view-switch button[aria-pressed="true"] {
  background: var(--glass-solid);
  box-shadow: 0 4px 12px rgba(42, 113, 145, 0.12);
  color: var(--sky-deep);
}

.week-nav {
  gap: 7px;
}

.week-nav .icon-button {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 6px 16px rgba(42, 113, 145, 0.06);
}

.week-days {
  gap: 9px;
  margin-top: 22px;
}

.week-day {
  background: rgba(255, 255, 255, 0.19);
}

.week-day.is-selected {
  border-color: rgba(157, 201, 220, 0.56);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 9px 24px rgba(42, 113, 145, 0.09);
}

.workspace-grid {
  gap: 22px;
  margin-top: 18px;
}

.panel {
  border-color: rgba(157, 201, 220, 0.5);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.timeline-panel,
.task-panel {
  border-radius: 22px;
}

.panel-header {
  min-height: 91px;
  border-bottom-color: rgba(157, 201, 220, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
}

.timeline-card {
  --task-color: var(--sky);
  border-color: rgba(157, 201, 220, 0.58);
  border-left: 3px solid var(--task-color, var(--sky));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

@supports (background: color-mix(in srgb, white, black)) {
  .timeline-card {
    border-color: color-mix(in srgb, var(--task-color, var(--sky)) 34%, white);
    background: linear-gradient(145deg, color-mix(in srgb, var(--task-color, var(--sky)) 13%, white), color-mix(in srgb, var(--task-color, var(--sky)) 5%, transparent));
  }
}

.timeline-card:hover {
  border-color: var(--task-color, var(--sky));
  box-shadow: 0 15px 30px rgba(40, 111, 143, 0.18);
}

.timeline-card.is-complete {
  border-left-color: var(--line-strong);
  border-left-color: color-mix(in srgb, var(--task-color, var(--sky)) 35%, var(--line-strong));
  background: rgba(246, 251, 254, 0.68);
}

.card-time,
.card-meta {
  color: var(--sky-deep);
  color: color-mix(in srgb, var(--task-color, var(--sky)) 78%, var(--ink-soft));
}

.task-list {
  padding-top: 14px;
}

.task-row {
  --task-color: var(--sky);
  min-height: 68px;
  padding: 8px 10px 8px 9px;
  border: 1px solid rgba(157, 201, 220, 0.42);
  border-left: 3px solid var(--task-color, var(--sky));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 20px rgba(42, 113, 145, 0.055);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

@supports (background: color-mix(in srgb, white, black)) {
  .task-row {
    border-color: color-mix(in srgb, var(--task-color, var(--sky)) 25%, white);
    background: linear-gradient(145deg, color-mix(in srgb, var(--task-color, var(--sky)) 10%, white), color-mix(in srgb, var(--task-color, var(--sky)) 4%, transparent));
  }
}

.task-row + .task-row {
  margin-top: 8px;
}

.task-row:last-child {
  border-bottom: 1px solid var(--line-strong);
  border-bottom: 1px solid color-mix(in srgb, var(--task-color, var(--sky)) 25%, white);
}

.task-row:hover {
  border-color: var(--line-strong);
  border-color: color-mix(in srgb, var(--task-color, var(--sky)) 56%, white);
  box-shadow: 0 12px 24px rgba(42, 113, 145, 0.11);
  transform: translateY(-1px);
}

.task-check {
  border-color: var(--line-strong);
  border-color: color-mix(in srgb, var(--task-color, var(--sky)) 48%, var(--line-strong));
  background: rgba(255, 255, 255, 0.75);
}

.task-check:hover,
.task-row.is-complete .task-check {
  border-color: var(--task-color, var(--sky));
}

.task-row.is-complete .task-check {
  background: var(--task-color, var(--sky));
}

.task-arrow:hover {
  background: var(--sky-pale);
  background: color-mix(in srgb, var(--task-color, var(--sky)) 12%, white);
  color: var(--task-color, var(--sky));
}

.color-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(157, 201, 220, 0.46);
  border-radius: 15px;
  background: rgba(239, 249, 253, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.color-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.color-picker-heading > div {
  display: grid;
  gap: 4px;
}

.color-picker-heading small {
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.3;
}

.custom-color-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.color-picker-preview,
.color-swatch {
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--selected-color, var(--sky));
  box-shadow: 0 0 0 1px rgba(104, 157, 180, 0.35);
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.color-option,
.custom-color-input {
  position: relative;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.color-option:hover,
.color-option.is-active {
  border-color: rgba(23, 61, 89, 0.24);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.color-option.is-active {
  transform: scale(1.08);
}

.color-option .color-swatch {
  width: 22px;
  height: 22px;
  border-width: 3px;
}

.color-option[data-color="#54B8EC"] .color-swatch { background: #54B8EC; }
.color-option[data-color="#6679D6"] .color-swatch { background: #6679D6; }
.color-option[data-color="#49B8A5"] .color-swatch { background: #49B8A5; }
.color-option[data-color="#EC8C7A"] .color-swatch { background: #EC8C7A; }
.color-option[data-color="#E9AE58"] .color-swatch { background: #E9AE58; }
.color-option[data-color="#A77CCB"] .color-swatch { background: #A77CCB; }

.custom-color-input {
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
}

.custom-color-input:hover {
  border-color: var(--sky-deep);
  background: rgba(255, 255, 255, 0.65);
  color: var(--sky-deep);
}

.custom-color-input input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.custom-color-input input:focus-visible + span {
  outline: 3px solid rgba(36, 152, 215, 0.36);
  outline-offset: 3px;
}

.detail-color {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--task-color, var(--sky));
  box-shadow: 0 0 0 2px rgba(84, 184, 236, 0.17);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--task-color, var(--sky)) 17%, white);
  vertical-align: 1px;
}

.detail-content .detail-notes {
  border-left-color: var(--task-color, var(--sky));
}

.detail-content .progress-track span {
  background: var(--task-color, var(--sky));
}

.week-board {
  display: none;
  width: 100%;
  min-width: 0;
}

.timeline-panel.is-week-view .timeline-scroll {
  display: none;
}

.timeline-panel.is-week-view .week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 18px 24px;
}

.week-column {
  display: flex;
  min-width: 0;
  min-height: 360px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(157, 201, 220, 0.38);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.34);
}

.week-column.is-selected {
  border-color: rgba(84, 184, 236, 0.64);
  background: rgba(255, 255, 255, 0.57);
  box-shadow: 0 10px 25px rgba(42, 113, 145, 0.09);
}

.week-column.is-today .week-column-head {
  background: rgba(229, 245, 251, 0.66);
}

.week-column-head {
  display: grid;
  gap: 9px;
  padding: 13px 11px 12px;
  border-bottom: 1px solid rgba(157, 201, 220, 0.34);
}

.week-column-head button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.week-column-head button span {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-column-head button strong {
  color: var(--ink);
  font-size: 23px;
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1;
}

.week-column.is-selected .week-column-head button strong,
.week-column.is-today .week-column-head button strong {
  color: var(--sky-deep);
}

.week-column-head small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.2;
}

.week-column-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 8px;
  min-height: 248px;
  padding: 11px;
}

.week-task {
  --task-color: var(--sky);
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
  padding: 10px 9px;
  border: 1px solid rgba(157, 201, 220, 0.44);
  border-left: 3px solid var(--task-color, var(--sky));
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 7px 15px rgba(42, 113, 145, 0.08);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

@supports (background: color-mix(in srgb, white, black)) {
  .week-task {
    border-color: color-mix(in srgb, var(--task-color, var(--sky)) 28%, white);
    background: linear-gradient(145deg, color-mix(in srgb, var(--task-color, var(--sky)) 12%, white), color-mix(in srgb, var(--task-color, var(--sky)) 4%, transparent));
  }
}

.week-task:hover {
  border-color: var(--task-color, var(--sky));
  box-shadow: 0 11px 20px rgba(42, 113, 145, 0.14);
  transform: translateY(-1px);
}

.week-task-time,
.week-task-progress {
  color: var(--sky-deep);
  overflow: hidden;
  color: color-mix(in srgb, var(--task-color, var(--sky)) 76%, var(--ink-soft));
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-task strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.week-task-progress {
  color: var(--ink-faint);
}

.week-task.is-complete {
  opacity: 0.62;
}

.week-task.is-complete strong {
  text-decoration: line-through;
  text-decoration-color: var(--line-strong);
}

.week-empty {
  align-self: start;
  margin: 5px 2px 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .timeline-panel.is-week-view .week-board {
    gap: 8px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .week-column-head,
  .week-column-list {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding-top: 25px;
  }

  .week-section {
    margin-top: 40px;
  }

  .week-heading-tools {
    gap: 10px;
  }

  .timeline-panel.is-week-view .week-board {
    grid-auto-flow: column;
    grid-auto-columns: minmax(184px, 1fr);
    grid-template-columns: none;
    grid-template-rows: 1fr;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scroll-snap-type: inline mandatory;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }

  .week-column {
    min-height: 335px;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .week-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .week-heading-tools {
    display: grid;
    justify-items: end;
    gap: 9px;
  }

  .view-switch button {
    min-height: 29px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 10px;
  }

  .week-days {
    gap: 2px;
  }

  .timeline-panel.is-week-view .week-board {
    padding: 13px 12px 20px;
  }

  .color-picker-heading {
    align-items: flex-start;
  }
}

/* New shell: top level views, a compact date wheel, and full-width boards. */
[hidden] {
  display: none !important;
}

.main-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  margin-top: 31px;
  padding: 4px;
  border: 1px solid rgba(157, 201, 220, 0.46);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(42, 113, 145, 0.07);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.main-tabs button {
  min-width: 76px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.main-tabs button:hover {
  color: var(--ink);
}

.main-tabs button[aria-selected="true"] {
  background: var(--glass-solid);
  box-shadow: 0 4px 14px rgba(42, 113, 145, 0.12);
  color: var(--sky-deep);
}

.schedule-view,
.todo-view {
  width: 100%;
  max-width: 100%;
}

.schedule-hero {
  margin-top: 28px;
}

.hero-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.hero-caption {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.45;
}

.date-wheel {
  position: relative;
  width: min(100%, 332px);
  aspect-ratio: 1;
  margin: 12px auto 28px;
  overflow: hidden;
  border: 1px solid rgba(157, 201, 220, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.78), rgba(231, 246, 252, 0.24) 58%, rgba(84, 184, 236, 0.09)),
    rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 42px rgba(42, 113, 145, 0.11), inset 0 0 0 7px rgba(255, 255, 255, 0.24);
  isolation: isolate;
}

.date-wheel:focus-visible {
  outline: 3px solid rgba(36, 152, 215, 0.36);
  outline-offset: 5px;
}

/* The marker stays still while the seven-day wheel rotates beneath it. */
.date-wheel::before {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 8;
  width: 2px;
  height: 27px;
  border-radius: 999px;
  background: var(--sky-deep);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.13), 0 5px 11px rgba(36, 152, 215, 0.28);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.date-wheel::after {
  position: absolute;
  top: 25px;
  left: 50%;
  z-index: 8;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sky-deep);
  box-shadow: 0 0 0 4px rgba(84, 184, 236, 0.13);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.wheel-orbit {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  transform: rotate(var(--drag-angle, 0deg));
  transform-origin: 50% 50%;
  transition: transform 260ms cubic-bezier(0.22, 0.72, 0.26, 1);
  touch-action: none;
  user-select: none;
}

.wheel-orbit.is-dragging,
#date-wheel.is-dragging .wheel-orbit {
  cursor: grabbing;
  transition: none;
}

.wheel-orbit.is-dragging .wheel-sector,
#date-wheel.is-dragging .wheel-sector {
  transition: none;
}

.wheel-track {
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid rgba(126, 190, 216, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26), inset 0 0 26px rgba(84, 184, 236, 0.09);
  pointer-events: none;
}

.wheel-track::after {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(126, 190, 216, 0.28);
  border-radius: 50%;
  content: "";
}

.wheel-sector {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(144deg, rgba(255, 255, 255, 0.6), rgba(205, 237, 249, 0.28));
  clip-path: var(--sector-clip);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
  transition: background 180ms ease, filter 180ms ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.wheel-sector:nth-of-type(even) {
  background: linear-gradient(144deg, rgba(238, 249, 254, 0.75), rgba(177, 222, 241, 0.28));
}

.wheel-sector:hover {
  background: linear-gradient(144deg, rgba(255, 255, 255, 0.82), rgba(170, 224, 246, 0.48));
  color: var(--ink);
  filter: saturate(1.08) brightness(1.03);
}

.wheel-sector-label {
  position: absolute;
  top: var(--label-y);
  left: var(--label-x);
  display: grid;
  min-width: 45px;
  justify-items: center;
  gap: 2px;
  padding: 5px 6px;
  color: var(--ink-soft);
  line-height: 1.1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.wheel-sector-label span {
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.wheel-sector-label strong {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 710;
  line-height: 1;
}

.wheel-sector.is-selected {
  z-index: 2;
  background: linear-gradient(145deg, rgba(127, 211, 246, 0.72), rgba(55, 167, 220, 0.42));
  color: var(--sky-deep);
  filter: saturate(1.12) brightness(1.05);
}

.wheel-sector.is-selected .wheel-sector-label {
  color: var(--sky-deep);
}

.wheel-sector.is-selected .wheel-sector-label strong,
.wheel-sector.is-selected .wheel-sector-label span {
  color: var(--sky-deep);
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 152px;
  height: 152px;
  align-content: center;
  justify-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--sky) 0 var(--progress, 0%), rgba(170, 207, 222, 0.42) var(--progress, 0%) 100%);
  box-shadow: 0 15px 30px rgba(42, 113, 145, 0.16), 0 0 0 5px rgba(84, 184, 236, 0.12);
  isolation: isolate;
  transform: translate(-50%, -50%);
}

.wheel-center::before {
  position: absolute;
  z-index: 0;
  inset: 6px;
  border-radius: inherit;
  background: rgba(247, 252, 254, 0.91);
  content: "";
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.wheel-center::after {
  display: none;
}

.wheel-center > * {
  position: relative;
  z-index: 1;
}

.wheel-center .eyebrow {
  margin-bottom: 5px;
  color: var(--sky-deep);
  font-size: 9px;
}

.wheel-center h1 {
  margin-bottom: 5px;
  font-size: clamp(22px, 2.7vw, 28px);
  text-align: center;
  white-space: nowrap;
}

.date-wheel.is-week .wheel-center h1 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.wheel-center .date-subheading {
  max-width: 130px;
  font-size: 10px;
  text-align: center;
}

.schedule-view .timeline-panel {
  width: 100%;
  min-height: 0;
}

.schedule-view .timeline-scroll {
  max-height: none;
}

.schedule-view .timeline {
  min-height: 300px;
}

.schedule-view .timeline-empty {
  min-height: 270px;
}

.timeline-panel.is-week-view .week-board {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
  padding: 16px 18px 20px;
}

.week-column {
  min-height: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.31);
}

.week-column-list {
  min-height: 160px;
  padding: 9px;
}

.week-column-head {
  gap: 7px;
  padding: 11px 9px 10px;
}

.week-column-head button strong {
  font-size: 21px;
}

.week-task {
  padding: 9px 8px;
}

.week-task strong {
  font-size: 11px;
}

.todo-view {
  margin-top: 34px;
}

.todo-view .task-panel {
  width: 100%;
  min-height: 0;
}

.todo-view .task-list {
  display: grid;
  gap: 26px;
  padding: 25px 30px 30px;
}

.todo-section {
  display: grid;
  gap: 12px;
}

.todo-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(157, 201, 220, 0.42);
}

.todo-section-head h3 {
  font-size: 14px;
}

.todo-section-head span {
  color: var(--ink-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

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

.todo-items .task-row {
  margin: 0;
}

.todo-empty {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.45;
}

.todo-view .list-empty {
  min-height: 150px;
  padding: 18px 0;
}

.todo-view .task-footnote {
  margin: 0 30px 28px;
}

@media (max-width: 1100px) {
  .app-shell {
    padding-right: 24px;
    padding-left: 24px;
  }

  .timeline-panel.is-week-view .week-board {
    gap: 7px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .week-column-head,
  .week-column-list {
    padding-right: 8px;
    padding-left: 8px;
  }

  .week-task {
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-right: 17px;
    padding-left: 17px;
  }

  .hero-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .date-wheel {
    width: min(100%, 292px);
    margin-top: 3px;
    margin-bottom: 19px;
  }

  .timeline-panel.is-week-view .week-board {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    grid-template-columns: none;
    grid-template-rows: 1fr;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }

  .week-column {
    scroll-snap-align: start;
  }

  .todo-view .task-list {
    padding-right: 19px;
    padding-left: 19px;
  }

  .todo-items {
    grid-template-columns: 1fr;
  }

  .todo-view .task-footnote {
    margin-right: 19px;
    margin-left: 19px;
  }
}

@media (max-width: 480px) {
  .main-tabs {
    margin-top: 24px;
  }

  .main-tabs button {
    min-width: 68px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .schedule-hero {
    margin-top: 25px;
  }

  .date-wheel {
    width: min(100%, 260px);
  }

  .wheel-center {
    width: 126px;
    height: 126px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .wheel-center h1 {
    max-width: 158px;
    font-size: 21px;
  }

  .date-wheel.is-week .wheel-center h1 {
    font-size: 16px;
  }

  .wheel-center .date-subheading {
    max-width: 112px;
    font-size: 10px;
  }

  .timeline-panel.is-week-view .week-board {
    padding: 12px 12px 17px;
  }

  .todo-view {
    margin-top: 25px;
  }

  .todo-view .task-list {
    padding-top: 19px;
  }
}

/* Compact schedule hero: the wheel and the next actions share one row. */
.schedule-hero {
  margin-top: 27px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(238px, 270px) minmax(0, 1fr);
  align-items: stretch;
  gap: 28px;
  width: 100%;
}

.hero-wheel-column {
  display: grid;
  min-width: 0;
  place-items: center;
}

.date-wheel {
  width: min(100%, 270px);
  margin: 0 auto;
  border-color: rgba(126, 190, 216, 0.54);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.86), rgba(231, 246, 252, 0.46) 58%, rgba(84, 184, 236, 0.12)),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 40px rgba(42, 113, 145, 0.12), inset 0 0 0 6px rgba(255, 255, 255, 0.26);
}

.date-wheel::before {
  height: 22px;
}

.date-wheel::after {
  top: 20px;
  width: 6px;
  height: 6px;
}

.wheel-orbit {
  z-index: 3;
}

.wheel-track {
  inset: 9px;
  z-index: 0;
  border-color: rgba(126, 190, 216, 0.44);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32), inset 0 0 22px rgba(84, 184, 236, 0.08);
}

.wheel-track::after {
  inset: 7px;
  border-color: rgba(126, 190, 216, 0.24);
}

/* The wedges use opaque gradients so their labels stay sharp while rotating. */
.wheel-sector,
.wheel-sector:hover,
.wheel-sector.is-selected {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  filter: none;
}

.wheel-sector {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(210, 239, 249, 0.52));
  transition: background 180ms ease, color 180ms ease;
}

.wheel-sector:nth-of-type(even) {
  background: linear-gradient(145deg, rgba(239, 249, 254, 0.8), rgba(187, 226, 242, 0.56));
}

.wheel-sector:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(183, 229, 247, 0.72));
}

.wheel-sector.is-selected {
  background: linear-gradient(145deg, rgba(129, 211, 246, 0.86), rgba(54, 169, 222, 0.62));
}

.wheel-sector-label {
  transform: translate(-50%, -50%) rotate(var(--label-angle, 0deg));
  transform-origin: center;
  transition: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  filter: none;
}

.wheel-sector-label,
.wheel-sector-label span,
.wheel-sector-label strong {
  text-shadow: none;
}

.wheel-center {
  z-index: 6;
  width: 138px;
  height: 138px;
  padding: 14px;
  cursor: pointer;
  background: conic-gradient(from 180deg, var(--sky) 0 var(--progress, 0%), rgba(170, 207, 222, 0.42) var(--progress, 0%) 100%);
  box-shadow: 0 13px 28px rgba(42, 113, 145, 0.15), 0 0 0 5px rgba(84, 184, 236, 0.12);
}

.wheel-center::before {
  background: rgba(247, 252, 254, 0.94);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.wheel-mode {
  position: relative;
  z-index: 1;
  margin-bottom: 5px;
  color: var(--sky-deep);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
}

.wheel-center h1 {
  margin-bottom: 5px;
  font-size: clamp(22px, 2.7vw, 27px);
  letter-spacing: -0.045em;
}

.date-wheel.is-week .wheel-center h1 {
  font-size: 16px;
  letter-spacing: -0.035em;
}

.wheel-center .date-subheading {
  max-width: 120px;
  font-size: 10px;
}

.wheel-today {
  position: relative;
  z-index: 2;
  display: grid;
  width: 15px;
  height: 15px;
  margin-top: 7px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(84, 184, 236, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.wheel-today span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 2px rgba(84, 184, 236, 0.12);
}

.wheel-today:hover {
  border-color: var(--sky);
  background: var(--sky-pale);
}

/* The clock is an outer dial layer. The center content remains above it. */
.wheel-clock {
  position: absolute;
  z-index: 2;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.date-wheel.is-today.is-clock .wheel-clock {
  visibility: visible;
  opacity: 1;
}

.date-wheel.is-today.is-clock::before,
.date-wheel.is-today.is-clock::after {
  display: none;
}

.date-wheel.is-today.is-clock .wheel-orbit {
  visibility: hidden;
  opacity: 0;
}

.clock-face {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(84, 184, 236, 0.33);
  border-radius: 50%;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.2), inset 0 0 0 7px rgba(126, 190, 216, 0.16);
}

.clock-mark {
  position: absolute;
  inset: 0;
  display: block;
  transform: rotate(var(--angle));
}

.clock-mark::before {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 1px;
  height: 5px;
  border-radius: 999px;
  background: rgba(36, 152, 215, 0.42);
  content: "";
  transform: translateX(-50%);
}

.clock-mark.is-hour::before {
  width: 2px;
  height: 11px;
  background: var(--sky-deep);
}

.clock-hour-mark {
  position: absolute;
  inset: 0;
  display: block;
  transform: rotate(var(--angle));
}

.clock-hour-mark::before {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 1px;
  height: 5px;
  border-radius: 999px;
  background: rgba(29, 114, 171, 0.36);
  content: "";
  transform: translateX(-50%);
}

.clock-hour-mark.is-quarter::before {
  width: 2px;
  height: 8px;
  background: rgba(17, 92, 151, 0.68);
}

.clock-hand {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: 50% 100%;
}

.clock-hand-hour {
  z-index: 2;
  width: 3px;
  height: calc(50% - 36px);
  transform: translate(-50%, -100%) rotate(var(--hour-angle, 0deg));
}

.clock-hand-minute {
  z-index: 3;
  width: 2px;
  height: calc(50% - 16px);
  background: var(--sky-deep);
  transform: translate(-50%, -100%) rotate(var(--minute-angle, 0deg));
}

.clock-hand-second {
  z-index: 4;
  width: 1.5px;
  height: calc(50% - 16px);
  background: #15a6d9;
  box-shadow: 0 0 5px rgba(21, 166, 217, 0.4);
  transform: translate(-50%, -100%) rotate(var(--second-angle, 0deg));
}

.clock-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 7px;
  height: 7px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--sky-deep);
  box-shadow: 0 0 0 2px rgba(36, 152, 215, 0.22);
  transform: translate(-50%, -50%);
}

.recent-panel {
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  border: 1px solid rgba(157, 201, 220, 0.5);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(231, 246, 252, 0.54));
  box-shadow: var(--glass-shadow);
}

.recent-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 21px 24px 17px;
  border-bottom: 1px solid rgba(157, 201, 220, 0.36);
}

.recent-header .eyebrow {
  margin-bottom: 7px;
}

.recent-header h2 {
  font-size: 18px;
}

.recent-overview {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  color: var(--sky-deep);
  white-space: nowrap;
}

.recent-overview span {
  font-size: 14px;
  line-height: 1;
}

.recent-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.recent-item {
  --task-color: var(--sky);
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 24px;
  align-items: center;
  min-width: 0;
  gap: 11px;
  min-height: 57px;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--task-color) 28%, white);
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--task-color) 10%, white), color-mix(in srgb, var(--task-color) 4%, #f4fbfe));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.recent-item:hover {
  border-color: color-mix(in srgb, var(--task-color) 56%, white);
  box-shadow: 0 10px 22px rgba(42, 113, 145, 0.1);
  transform: translateY(-1px);
}

.recent-color {
  width: 7px;
  height: 29px;
  border-radius: 999px;
  background: var(--task-color);
}

.recent-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.recent-copy strong,
.recent-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-copy strong {
  font-size: 12px;
  font-weight: 700;
}

.recent-copy small {
  color: var(--ink-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.recent-arrow {
  color: var(--ink-faint);
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.recent-item:hover .recent-arrow {
  color: var(--sky-deep);
}

.recent-empty {
  margin: 2px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.schedule-view .timeline-panel {
  margin-top: 22px;
}

/* The timeline keeps its accessible heading but gives the action the visual lead. */
.timeline-panel > .panel-header {
  min-height: 66px;
  justify-content: flex-end;
  padding: 12px 20px 11px;
  border-bottom-color: rgba(157, 201, 220, 0.3);
}

.timeline-panel .add-task-button {
  min-height: 38px;
  padding-right: 15px;
  padding-left: 15px;
}

/* The preview is intentionally quiet: its open area is an affordance for the full list. */
.recent-panel {
  min-height: 270px;
  overflow: hidden;
  cursor: pointer;
}

.recent-list {
  flex: 0 0 auto;
  padding: 18px 20px 9px;
}

.recent-open-all {
  display: block;
  flex: 1 1 auto;
  min-height: 48px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.recent-open-all:hover,
.recent-open-all:focus-visible {
  background: rgba(231, 246, 252, 0.55);
}

.recent-open-all:focus-visible {
  outline-offset: -4px;
}

.todo-header-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}

.todo-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  color: var(--sky-deep);
  white-space: nowrap;
}

.todo-back span {
  font-size: 15px;
  line-height: 1;
}

/* Clock details stay below the center content and remain crisp at every size. */
.clock-task-arc {
  position: absolute;
  z-index: 1;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  overflow: visible;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.clock-task-track,
.clock-task-progress {
  fill: none;
  stroke-linecap: round;
}

.clock-task-track {
  stroke: rgba(126, 190, 216, 0.25);
  stroke-width: 1.15;
}

.clock-task-progress {
  stroke: var(--sky-deep);
  stroke-width: 1.9;
}

.clock-task-end {
  fill: var(--sky-deep);
  opacity: 0;
  transition: opacity 180ms ease;
}

.date-wheel.is-today.is-clock.has-active-task .clock-task-arc {
  visibility: visible;
  opacity: 1;
}

.date-wheel.is-today.is-clock.has-active-task .clock-task-end {
  opacity: 1;
}

.clock-time {
  display: none;
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 21px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  line-height: 1;
}

.date-wheel.is-today.is-clock .wheel-mode,
.date-wheel.is-today.is-clock #date-heading,
.date-wheel.is-today.is-clock #date-subheading,
.date-wheel.is-today.is-clock #wheel-today {
  display: none;
}

.date-wheel.is-today.is-clock .wheel-center {
  background: rgba(247, 252, 254, 0.94);
}

.date-wheel.is-today.is-clock .clock-time {
  display: block;
}

.date-wheel.is-today:not(.is-clock) #wheel-today {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-wheel-column {
    justify-items: center;
  }

  .recent-panel {
    min-height: 150px;
  }

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

  .recent-open-all {
    min-height: 34px;
  }

  .schedule-view .timeline-panel {
    margin-top: 18px;
  }
}

@media (max-width: 480px) {
  .schedule-hero {
    margin-top: 24px;
  }

  .date-wheel {
    width: min(100%, 248px);
  }

  .wheel-center {
    width: 126px;
    height: 126px;
  }

  .recent-header {
    padding-right: 18px;
    padding-left: 18px;
  }

  .recent-list {
    grid-template-columns: 1fr;
    padding-right: 14px;
    padding-left: 14px;
  }

  .todo-header-actions {
    gap: 10px;
  }

  .todo-back {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-orbit,
  .wheel-clock,
  .recent-item {
    transition: none;
  }
}

/* Mobile pages keep the clock and tasks together; the timeline gets its own canvas. */
.mobile-pages,
.mobile-schedule-controls,
.week-task-notes { display: none; }

@media (max-width: 760px) {
  .app-shell { padding-bottom: 96px; }

  .mobile-pages {
    position: fixed;
    right: 16px;
    bottom: max(13px, env(safe-area-inset-bottom));
    left: 16px;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
    height: 62px;
    margin: 0 auto;
    padding: 5px;
    border: 1px solid rgba(148, 198, 223, 0.55);
    border-radius: 21px;
    background: rgba(247, 252, 255, 0.92);
    box-shadow: 0 16px 42px rgba(27, 78, 107, 0.17), inset 0 1px rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(22px);
  }

  .is-todo-open .mobile-pages { display: none; }
  .mobile-pages button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 220ms ease, color 220ms ease, box-shadow 220ms ease;
  }
  .mobile-pages button[aria-current="page"] {
    background: #fff;
    box-shadow: 0 5px 17px rgba(39, 118, 159, 0.11);
    color: var(--sky-deep);
  }
  .mobile-pages button:focus-visible { outline: 2px solid var(--sky); outline-offset: -3px; }
  .mobile-tab-icon { position: relative; width: 17px; height: 17px; border: 1.5px solid currentColor; }
  .mobile-tab-clock { border-radius: 50%; }
  .mobile-tab-clock::before,
  .mobile-tab-clock::after { position: absolute; top: 7px; left: 7px; width: 5px; height: 1.5px; border-radius: 2px; background: currentColor; content: ''; transform-origin: 0 50%; }
  .mobile-tab-clock::before { transform: rotate(-90deg); }
  .mobile-tab-clock::after { transform: rotate(25deg); }
  .mobile-tab-plan { border-radius: 4px; }
  .mobile-tab-plan::before { position: absolute; top: 4px; right: 2px; left: 2px; border-top: 1.5px solid currentColor; content: ''; }

  #schedule-view[data-mobile-page="home"] .timeline-panel,
  #schedule-view[data-mobile-page="schedule"] .schedule-hero { display: none; }
  #schedule-view[data-mobile-page="home"] .recent-panel { min-height: 0; }
  #schedule-view[data-mobile-page="home"] .recent-open-all { min-height: 43px; flex: 0 0 auto; border-top: 1px solid var(--line); }
  #schedule-view[data-mobile-page="home"] .recent-open-all::after { content: '全部待办  ↗'; color: var(--sky-deep); font-size: 11px; font-weight: 700; }

  #schedule-view[data-mobile-page="schedule"] .timeline-panel { margin-top: 22px; }
  .mobile-schedule-controls { display: flex; min-width: 0; align-items: center; gap: 7px; }
  .timeline-panel > .panel-header { justify-content: space-between; gap: 8px; padding: 11px 13px; }
  .mobile-date-field input { width: 136px; max-width: 100%; height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 11px; background: rgba(240, 250, 255, 0.68); color: var(--ink); font-size: 11px; }
  .mobile-view-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--sky-wash); }
  .mobile-view-switch button { min-width: 29px; height: 29px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); font-size: 11px; cursor: pointer; }
  .mobile-view-switch button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 7px rgba(27, 78, 107, 0.11); color: var(--sky-deep); }
  .mobile-date-field input:focus-visible,
  .mobile-view-switch button:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

  .timeline-panel.is-week-view .week-board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 8px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 12px;
  }
  .week-column { display: grid; grid-template-columns: 66px minmax(0, 1fr); min-height: 0; scroll-snap-align: none; }
  .week-column-head { align-content: center; border-right: 1px solid var(--line); border-bottom: 0; padding: 10px 7px; }
  .week-column-head button { display: grid; grid-template-columns: 1fr; gap: 3px; justify-items: center; text-align: center; }
  .week-column-head button strong { font-size: 23px; }
  .week-column-head small { text-align: center; font-size: 9px; }
  .week-column-list { min-height: 0; gap: 7px; padding: 8px; }
  .week-task { grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 4px 7px; padding: 9px; }
  .week-task-time { grid-column: 1; grid-row: 1 / span 3; white-space: normal; font-size: 10px; line-height: 1.45; }
  .week-task strong { grid-column: 2; font-size: 13px; }
  .week-task-notes { display: -webkit-box; grid-column: 2; overflow: hidden; color: var(--ink-soft); font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .week-task-progress { grid-column: 2; font-size: 10px; }
  .week-empty { margin: 3px 2px; }

  .detail-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(430px, calc(100vw - 32px));
    max-height: min(80dvh, 710px);
    overflow: hidden;
    border: 1px solid rgba(148, 198, 223, 0.65);
    border-radius: 21px;
    box-shadow: 0 25px 80px rgba(20, 60, 87, 0.24);
    transform: translate(-50%, -45%) scale(0.97);
    transition: transform 250ms cubic-bezier(0.22, 0.72, 0.26, 1), opacity 250ms ease, visibility 250ms ease;
    opacity: 0;
  }
  .detail-panel.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .detail-header { padding: 18px 21px 16px; }
  .detail-content { padding: 20px 21px 25px; }
}

@media (max-width: 390px) {
  .mobile-date-field input { width: 125px; }
  .timeline-panel .add-task-button { padding: 0 9px; font-size: 10px; }
  .week-task { grid-template-columns: 74px minmax(0, 1fr); }
}

@media (max-width: 350px) {
  .timeline-panel > .panel-header { display: grid; grid-template-columns: 1fr auto; }
  .mobile-schedule-controls { grid-column: 1 / -1; justify-content: space-between; }
  .timeline-panel .add-task-button { grid-column: 2; justify-self: end; }
  .week-task { grid-template-columns: 1fr; }
  .week-task-time,
  .week-task strong,
  .week-task-notes,
  .week-task-progress { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-pages button,
  .detail-panel { transition: none; }
}

/* Final wheel pass: the clock is the quiet default and the calendar is its crisp alternate. */
.date-wheel {
  overflow: visible;
}

.wheel-marker {
  position: absolute;
  top: -19px;
  left: 50%;
  z-index: 12;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translateX(-50%);
}

.wheel-marker span {
  display: block;
  width: 2px;
  height: 27px;
  border-radius: 999px;
  background: var(--sky-deep);
  box-shadow: 0 0 0 3px rgba(84, 184, 236, 0.12), 0 4px 10px rgba(36, 152, 215, 0.24);
}

.wheel-marker:hover span,
.wheel-marker:focus-visible span {
  width: 3px;
  background: var(--ink);
}

.date-wheel.is-clock .wheel-marker {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.date-wheel::before,
.date-wheel::after {
  display: none;
}

.wheel-sector,
.wheel-sector:hover,
.wheel-sector.is-selected,
.wheel-sector-label {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  filter: none;
}

.wheel-sector {
  background: linear-gradient(145deg, rgba(104, 149, 173, 0.66), rgba(66, 111, 138, 0.79));
  color: rgba(246, 252, 255, 0.86);
}

.wheel-sector:nth-of-type(even) {
  background: linear-gradient(145deg, rgba(104, 149, 173, 0.66), rgba(66, 111, 138, 0.79));
}

.wheel-sector:hover {
  background: linear-gradient(145deg, rgba(139, 190, 214, 0.84), rgba(73, 137, 169, 0.9));
  color: var(--white);
}

.wheel-sector.is-selected {
  background: linear-gradient(145deg, #8ddcff, #39a9df);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.wheel-sector-label {
  transform: translate(-50%, -50%) rotate(var(--label-angle, 0deg));
  transform-origin: center;
}

.wheel-sector-label span,
.wheel-sector-month {
  color: rgba(239, 249, 254, 0.76);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.1;
  white-space: nowrap;
}

.wheel-sector-label strong,
.wheel-sector-day {
  color: rgba(250, 254, 255, 0.96);
  font-size: 20px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.wheel-sector.is-selected .wheel-sector-label span,
.wheel-sector.is-selected .wheel-sector-label strong,
.wheel-sector.is-selected .wheel-sector-month,
.wheel-sector.is-selected .wheel-sector-day {
  color: #ffffff;
}

.clock-countdown {
  display: none;
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--sky-deep);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.date-wheel.is-clock.has-active-task .clock-countdown {
  display: grid;
  justify-items: center;
  gap: 3px;
  max-width: 108px;
}

.clock-countdown-title,
.clock-countdown-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-countdown-title {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.1;
}

.clock-countdown-value {
  color: var(--sky-deep);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.wheel-time-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.wheel-time-detail-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-time-detail-head [data-wheel-detail-close] {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.wheel-time-detail-head [data-wheel-detail-close]:hover {
  border-color: var(--sky);
  color: var(--sky-deep);
}

.wheel-time-detail-list {
  display: grid;
  gap: 6px;
}

.wheel-time-detail-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  border-top: 1px solid rgba(157, 201, 220, 0.3);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 10px;
}

.wheel-time-detail-row time {
  color: var(--sky-deep);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wheel-time-detail-row strong,
.wheel-time-detail-row > span:last-child {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wheel-time-detail-empty {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.date-wheel.is-clock .wheel-clock {
  visibility: visible;
  opacity: 1;
}

.date-wheel.is-clock .wheel-orbit {
  visibility: hidden;
  opacity: 0;
}

.date-wheel.is-clock::before,
.date-wheel.is-clock::after {
  display: none;
}

.date-wheel.is-clock .wheel-mode,
.date-wheel.is-clock #date-heading,
.date-wheel.is-clock #date-subheading,
.date-wheel.is-clock #wheel-today {
  display: none;
}

.date-wheel.is-clock .wheel-center {
  background: rgba(247, 252, 254, 0.95);
}

.date-wheel.is-clock .clock-time {
  display: block;
}

.date-wheel.is-clock.has-active-task .clock-countdown {
  display: block;
}

.date-wheel.is-today:not(.is-clock) #wheel-today {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.wheel-time-detail {
  width: min(100%, 270px);
  margin: 11px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(157, 201, 220, 0.48);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 9px 22px rgba(42, 113, 145, 0.08);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.wheel-time-detail[hidden] {
  display: none;
}

.clock-task-arc {
  visibility: visible;
}

.clock-task-progress {
  stroke-dashoffset: 0;
}

.clock-task-end {
  opacity: 0;
}

@media (max-width: 760px) {
  .wheel-marker {
    top: -17px;
  }

  .wheel-time-detail {
    width: min(100%, 248px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-marker,
  .wheel-sector-label,
  .clock-task-arc,
  .clock-task-progress,
  .wheel-time-detail {
    transition: none;
  }
}

.timeline-card.is-compact {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  align-content: center;
  column-gap: 12px;
  padding: 5px 11px;
  container-type: inline-size;
  z-index: 4;
}

.timeline-card.is-compact strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.2;
}

@container (max-width: 285px) {
  .timeline-card.is-compact .card-meta {
    display: none;
  }
}

/* Todo page: keep the list content-sized so cards stay directly under each group. */
.todo-view {
  margin-top: 27px;
}

.todo-view .task-panel {
  min-height: 0;
}

.todo-view .task-panel-header {
  min-height: 86px;
  align-items: center;
  padding: 19px 28px 17px;
}

.todo-view .task-panel-header h2 {
  font-size: 23px;
  line-height: 1.15;
}

.todo-view .task-count {
  padding-bottom: 0;
  font-size: 11px;
}

.todo-view .task-list {
  display: grid;
  flex: 0 0 auto;
  align-content: start;
  align-items: start;
  min-height: 0;
  gap: 26px;
  padding: 19px 28px 28px;
}

.todo-view .todo-section {
  display: grid;
  align-content: start;
  align-items: start;
  min-height: 0;
  gap: 10px;
}

.todo-view .todo-section-head {
  justify-content: flex-start;
  align-items: baseline;
  gap: 10px;
  min-height: 26px;
  padding: 0 0 8px;
}

.todo-view .todo-section-head h3 {
  font-size: 14px;
  line-height: 1.2;
}

.todo-view .todo-section-head span {
  color: var(--sky-deep);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.todo-view .todo-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-items: start;
  min-height: 0;
  gap: 10px;
}

.todo-view .todo-items .task-row {
  align-self: start;
  min-height: 72px;
  margin: 0;
}

.todo-view .task-name {
  font-size: 15px;
  line-height: 1.25;
}

.todo-view .task-sub {
  font-size: 11px;
  line-height: 1.25;
}

.todo-view .list-empty {
  min-height: 150px;
  padding: 18px 0;
}

.todo-view .todo-header-actions {
  gap: 20px;
}

.todo-view .todo-back {
  min-width: 93px;
  min-height: 40px;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(157, 201, 220, 0.62);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 6px 15px rgba(42, 113, 145, 0.07);
  color: var(--sky-deep);
  font-size: 12px;
  font-weight: 700;
}

.todo-view .todo-back:hover {
  border-color: var(--sky);
  background: var(--sky-pale);
  box-shadow: 0 8px 18px rgba(42, 113, 145, 0.11);
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .todo-view .task-panel-header {
    padding-right: 19px;
    padding-left: 19px;
  }

  .todo-view .task-list {
    padding-right: 19px;
    padding-left: 19px;
  }

  .todo-view .todo-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .todo-view .task-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 15px;
  }

  .todo-view .todo-header-actions {
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .todo-view .todo-back {
    min-height: 40px;
  }
}

/* A 24-hour light cycle sits beneath the clock's marks and hands. */
.hero-wheel-column {
  align-content: start;
  row-gap: 8px;
}

.solar-cycle {
  position: absolute;
  z-index: 0;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.date-wheel.is-clock.has-solar .solar-cycle {
  visibility: visible;
  opacity: 1;
}

.solar-daylight {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(130, 153, 199, 0.46) 0deg var(--sunrise-angle),
    rgba(242, 189, 96, 0.64) var(--sunrise-angle) var(--sunset-angle),
    rgba(130, 153, 199, 0.46) var(--sunset-angle) 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 26px), #000 calc(100% - 24px), #000 calc(100% - 6px), transparent calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 26px), #000 calc(100% - 24px), #000 calc(100% - 6px), transparent calc(100% - 4px));
}

.solar-boundary {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  transform: rotate(var(--angle));
}

.solar-boundary-rise { --angle: var(--sunrise-angle); }
.solar-boundary-set { --angle: var(--sunset-angle); }

.solar-boundary::before {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 13px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  background: #d29a3e;
  box-shadow: 0 1px 4px rgba(48, 77, 112, 0.12);
  content: "";
  transform: translateX(-50%);
}

.solar-boundary-set::before { background: #6985b4; }

.solar-symbol {
  position: absolute;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  transform: translate(-50%, -50%);
}

.solar-symbol svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.solar-symbol-sun {
  top: var(--sun-y);
  left: var(--sun-x);
  color: #d59a3c;
}

.solar-symbol-moon {
  top: var(--moon-y);
  left: var(--moon-x);
  color: #718bb8;
}

.clock-face { z-index: 1; }
.clock-hand-hour { z-index: 3; }
.clock-hand-minute { z-index: 4; }
.clock-hand-second { z-index: 5; }
.clock-pin { z-index: 6; }

.solar-status {
  display: flex;
  width: min(100%, 270px);
  min-height: 22px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.solar-status[hidden],
.solar-times[hidden],
.solar-locate[hidden] { display: none; }

.solar-locate {
  min-height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--sky-deep);
  cursor: pointer;
  font-size: 11px;
}

.solar-locate:not(:disabled):hover { background: rgba(84, 184, 236, 0.1); }
.solar-locate:disabled { color: var(--ink-faint); cursor: default; }

.solar-times {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.solar-time {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.solar-time strong { color: var(--ink); font-size: 12px; font-weight: 700; }

.solar-time i {
  display: inline-block;
  width: 7px;
  height: 7px;
  align-self: center;
  border-radius: 50%;
  background: #e1ad57;
}

.solar-time-set i { background: #8299c7; }
.solar-time-divider { width: 1px; height: 11px; background: var(--line-strong); }

@media (max-width: 480px) {
  .solar-status { width: min(100%, 248px); }
}

@media (prefers-reduced-motion: reduce) {
  .solar-cycle { transition: none; }
}

.solar-place {
  display: block;
  min-width: 23px;
  max-width: 65px;
  height: 23px;
  flex: 0 0 auto;
  padding: 0 5px;
  border: 1px solid rgba(157, 201, 220, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--sky-deep);
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solar-place:hover { border-color: var(--sky-deep); background: var(--sky-pale); }

.account-entry { display: flex; align-items: center; gap: 11px; }
.account-entry > span { color: var(--ink-faint); font-size: 11px; white-space: nowrap; }
.account-entry > button {
  min-height: 35px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--sky-deep);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.account-entry > button:hover { border-color: var(--sky); background: #fff; transform: translateY(-1px); }
.account-entry > button:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

.account-dialog {
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(148, 198, 223, 0.7);
  border-radius: 22px;
  background: #fbfdff;
  box-shadow: 0 28px 86px rgba(20, 60, 87, 0.24);
  color: var(--ink);
}
.account-dialog::backdrop { background: rgba(18, 53, 77, 0.3); backdrop-filter: blur(5px); }
.account-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.account-head h2 { margin: 5px 0 0; font-size: 23px; }
.account-head .eyebrow { margin: 0; font-size: 9px; letter-spacing: 0.12em; }
.account-modes { display: flex; gap: 4px; margin: 20px 24px 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--sky-wash); }
.account-modes button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 11px; font-weight: 700; }
.account-modes button[aria-pressed="true"] { background: white; box-shadow: 0 3px 10px rgba(39, 118, 159, 0.1); color: var(--sky-deep); }
#account-form { display: grid; gap: 16px; padding: 23px 24px 25px; }
#account-form .form-error { min-height: 0; margin: 0; font-size: 11px; }
#account-submit { width: 100%; min-height: 40px; }
#account-signed-in { display: grid; gap: 12px; padding: 25px 24px; }
#account-signed-in[hidden], #account-signed-out[hidden] { display: none; }
#account-name { font-size: 18px; }
#account-state { color: var(--ink-soft); font-size: 11px; }
#account-logout { justify-self: start; margin-top: 10px; }

@media (max-width: 760px) {
  .account-entry { gap: 5px; }
  .account-entry > span { display: none; }
  .account-entry > button { min-height: 32px; padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-entry > button { transition: none; }
}

.solar-dialog {
  width: min(350px, calc(100vw - 32px));
  max-height: min(90vh, 560px);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(248, 252, 254, 0.98);
  box-shadow: 0 24px 64px rgba(23, 61, 89, 0.22);
  color: var(--ink);
}

.solar-dialog::backdrop { background: rgba(23, 61, 89, 0.23); }

.solar-dialog-head,
.solar-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.solar-dialog-head { margin-bottom: 22px; }
.solar-dialog-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.03em; }

.solar-dialog-head button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 22px;
}

.solar-dialog-head button:hover { background: var(--sky-pale); }

.solar-field { display: grid; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }

.solar-field select,
.solar-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
}

.solar-field select:focus,
.solar-field input:focus { border-color: var(--sky-deep); }

.solar-custom-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.solar-custom-fields[hidden] { display: none; }
.solar-form-error { min-height: 16px; margin: 9px 0 13px; color: var(--danger); font-size: 11px; }

.solar-dialog-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--sky-deep);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.solar-dialog-actions button[type="submit"] {
  border-color: var(--sky);
  background: var(--sky);
  color: var(--white);
}

.solar-dialog-actions button:hover { transform: translateY(-1px); }

@media (max-width: 480px) {
  .solar-times { gap: 8px; }
  .solar-time { gap: 3px; }
}
