.nodi-about {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 180px) 24px;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.nodi-about-brand.logo {
  position: relative;
  display: inline-flex;
  margin: 0 0 28px;
}
.nodi-about-brand.logo img {
  width: clamp(100px, 14vw, 132px);
  height: auto;
}
.nodi-about h2 {
  margin: 0 0 32px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.4;
  letter-spacing: -0.04em;
}
.nodi-about-copy {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 2;
}
.nodi-about-origin {
  display: inline-block;
  margin: 44px 0 0;
  padding: 18px 26px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.8;
}
.nodi-about-origin strong {
  color: var(--desk-aboutAccent, var(--desk-accent, #ffb020));
  font-weight: 700;
}
body.is-focusing .nodi-about {
  display: none;
}
.desk-only {
  display: none;
}
.view-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.desk {
  --bg: var(--desk-background);
  --ink: var(--desk-text);
  --paper: var(--desk-card);
  --line: var(--desk-border);
  --muted: var(--desk-muted);
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  color-scheme: dark;
}
.desk header {
  max-width: 1500px;
  padding: 24px 36px;
}
.desk main {
  max-width: 1500px;
  padding: clamp(25px, 7vh, 80px) 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
  gap: 24px 48px;
  align-items: center;
}
.desk .desk-only {
  display: block;
}
.desk #deskIdle {
  align-self: center;
}
.desk-caption {
  font-size: 12px;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin: 0 0 22px;
}
.flip-clock {
  display: flex !important;
  gap: clamp(12px, 2vw, 26px);
}
.flip-card {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--desk-border);
  border-radius: 24px;
  background:
    linear-gradient(
      180deg,
      #00000017 0%,
      #00000025 49.8%,
      #ffffff04 50%,
      #ffffff09 100%
    ),
    var(--desk-card);
  box-shadow: 0 18px 30px #00000020;
  overflow: hidden;
}
.flip-card:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--desk-border);
  box-shadow: 0 2px 8px #00000035;
}
.flip-number {
  font-size: clamp(70px, 12vw, 190px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
  color: var(--desk-clock);
  text-shadow: none;
}
.flip-card small {
  position: absolute;
  bottom: 18px;
  left: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--desk-accent);
}
.flip-card:last-child small {
  left: auto;
  right: 20px;
}
.desk .intro h1 {
  font-size: 28px;
}
.desk .intro #welcomeHint {
  flex-basis: 100%;
}
.desk .tasks-panel {
  box-shadow: none;
  background: var(--desk-card);
  border-radius: 22px;
}
.desk .task.selected {
  background: var(--desk-background);
  border-color: var(--desk-accent);
  box-shadow: inset 3px 0 var(--desk-accent);
}
.desk .task input {
  accent-color: var(--desk-button);
}
.desk #taskForm {
  background: var(--desk-background);
}
.desk .primary {
  background: var(--desk-button);
  color: var(--desk-buttonText);
}
.desk .primary:hover:not(:disabled) {
  filter: brightness(0.9);
}
.desk .primary:disabled {
  background: var(--desk-border);
  color: var(--desk-text);
  opacity: 0.55;
}
.desk .quiet:hover:not(:disabled),
.desk .text-button:hover {
  background: var(--desk-border);
}
.desk .daily-strip,
.desk #news,
.desk #done {
  grid-column: 1/-1;
}
.desk .daily-strip {
  margin-top: 12px;
}
.desk footer {
  max-width: 1500px;
  padding: 24px 36px;
}
.desk #focus {
  grid-column: 1/-1;
  padding: 0 0 20px;
}
.desk #focus h1 {
  margin-bottom: 30px;
}
.desk #deskCountdown {
  max-width: 680px;
  margin: 0 auto;
}
.desk #deskCountdown .flip-card {
  aspect-ratio: 1.35;
}
.desk #timer {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.desk #focusHint {
  margin-top: 28px;
}
.desk[data-routine="focus"] #deskIdle,
.desk[data-routine="break"] #deskIdle,
.desk[data-routine="done"] #deskIdle,
.desk[data-routine="focus"] #deskCalendar,
.desk[data-routine="done"] #deskCalendar {
  display: none;
}
.desk[data-routine="break"] #deskCalendar {
  grid-column: 1/-1;
  max-width: 600px;
  width: 100%;
  justify-self: center;
}
.desk #deskCalendar {
  grid-column: 1/-1;
  max-width: 620px;
  width: 100%;
  justify-self: center;
}
.desk #deskCalendar summary {
  cursor: pointer;
  font-size: 12px;
  padding: 12px;
  opacity: 0.8;
  text-align: center;
}
.desk-calendar-card {
  background: var(--desk-card);
  border: 1px solid var(--desk-border);
  border-radius: 22px;
  overflow: hidden;
  padding-bottom: 16px;
}
.calendar-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--desk-border);
  padding: 18px;
}
.calendar-heading h2 {
  font-size: 22px;
  color: var(--desk-accent);
  margin: 0;
}
.calendar-heading button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: transparent;
  width: 44px;
  height: 44px;
  color: var(--desk-text);
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 12px 18px 0;
  text-align: center;
  gap: 3px;
}
.calendar-weekdays {
  font-size: 12px;
  opacity: 0.6;
}
.calendar-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 18px;
}
.calendar-grid .outside {
  opacity: 0.4;
}
.calendar-grid .today {
  background: var(--desk-button);
  color: var(--desk-buttonText);
  font-weight: 800;
}
#calendarDday {
  text-align: center;
  font-size: 12px;
  color: var(--desk-accent);
}
.desk dialog {
  background: var(--desk-background);
}
#colorFields fieldset {
  border: 0;
  margin: 20px 0;
  padding: 0;
}
.color-preview {
  padding: 16px;
  border: 1px solid var(--preview-border);
  border-radius: 12px;
  background: var(--preview-background);
  color: var(--preview-text);
  text-align: center;
}
.color-preview-label {
  color: var(--preview-accent);
  font-size: 12px;
}
.color-preview-clock {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}
.color-preview-clock > span {
  width: 94px;
  padding: 10px;
  border-radius: 8px;
  background: var(--preview-card);
  color: var(--preview-clock);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.color-preview-clock small {
  display: block;
  margin-top: 6px;
  color: var(--preview-accent);
  font-size: 11px;
}
.color-preview-button {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--preview-button);
  color: var(--preview-buttonText);
  font-size: 12px;
}
#colorFields legend {
  font-size: 13px;
  margin-bottom: 12px;
}
.color-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #888;
}
.color-swatch[aria-pressed="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
#colorFields .custom-color-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}
#colorFields .custom-color-picker:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
#colorFields input[type="color"] {
  width: 32px;
  height: 32px;
  margin: 0;
  cursor: pointer;
  padding: 2px;
  border: 1px solid var(--line);
}
.theme-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.theme-presets button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  font-size: 11px;
}
.desk #notice,
.desk .banner {
  background: var(--desk-card);
  color: var(--desk-text);
}
.desk #notice.error {
  border: 1px solid #cb7850;
}
.desk .eyebrow {
  color: var(--desk-accent);
}
@media (max-width: 900px) {
  .desk main {
    grid-template-columns: 1fr;
    padding: 26px 24px 0;
    max-width: 720px;
    gap: 30px;
  }
  .desk header {
    padding: 20px 24px;
  }
  .desk #deskIdle {
    max-width: 520px;
    width: 100%;
    justify-self: center;
  }
  .flip-card {
    aspect-ratio: 1.3;
  }
  .flip-number {
    font-size: clamp(72px, 20vw, 135px);
  }
  .desk-caption {
    margin-bottom: 14px;
  }
  .desk .daily-strip {
    grid-column: 1;
  }
  .desk #deskCountdown {
    max-width: 540px;
  }
  .desk footer {
    max-width: 720px;
    padding: 22px 24px;
  }
}
@media (max-width: 500px) {
  header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .header-date {
    flex: 1;
  }
  .view-controls {
    margin-left: auto;
  }
  .desk header {
    padding: 16px;
  }
  .desk main {
    padding: 16px;
    gap: 22px;
  }
  .desk .intro h1 {
    font-size: 24px;
  }
  .desk .tasks-panel {
    padding: 18px 14px;
  }
  .flip-card {
    border-radius: 16px;
  }
  .flip-card small {
    font-size: 9px;
    bottom: 11px;
    left: 12px;
  }
  .flip-card:last-child small {
    right: 12px;
  }
  .flip-number {
    font-size: clamp(68px, 22vw, 106px);
  }
  .desk #focus h1 {
    font-size: 24px;
    margin-bottom: 22px;
  }
  .desk .header-date {
    font-size: 10px;
  }
  .desk #deskCountdown .flip-card {
    aspect-ratio: 1;
  }
  .desk footer {
    padding: 20px 16px;
  }
  .calendar-grid span {
    font-size: 15px;
  }
  .calendar-heading h2 {
    font-size: 18px;
  }
}
.desk-only.flip-clock {
  display: none !important;
}
.desk .desk-only.flip-clock {
  display: flex !important;
}
/* Plan workspace: three intentions, one clear next action. */
.desk main {
  display: block;
  max-width: 1320px;
  padding: 24px 36px 0;
}
.desk header {
  max-width: 1440px;
}
.desk .routine-progress {
  max-width: 580px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px auto 46px;
  color: var(--muted);
  font-size: 12px;
}
.routine-progress span {
  white-space: nowrap;
  opacity: 0.55;
}
.routine-progress span:before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 auto 12px;
}
.routine-progress i {
  height: 1px;
  flex: 1;
  background: var(--line);
  margin-bottom: 23px;
}
.routine-progress .active {
  color: var(--desk-accent);
  opacity: 1;
}
.desk .intro {
  margin-bottom: 28px;
  display: flex;
  gap: 12px 20px;
}
.desk .intro h1 {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -1.5px;
}
.desk .intro #welcomeHint {
  font-size: 14px;
}
.desk .workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: stretch;
}
.desk .tasks-panel,
.desk .start-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--desk-card);
  padding: 28px;
}
.desk .section-title {
  margin-bottom: 24px;
}
.desk .section-title h2 {
  font-size: 19px;
}
.desk .task {
  gap: 9px;
  min-height: 84px;
  margin: 0 0 10px;
  padding: 10px 7px;
  border-bottom-color: var(--line);
}
.slot-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--desk-border);
  font-size: 14px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.selected .slot-number {
  background: var(--desk-button);
  color: var(--desk-buttonText);
}
.desk #taskForm {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 0;
  padding: 0;
  background: none;
  margin: 0 0 12px;
}
.desk #taskForm > .slot-number {
  margin-top: 14px;
}
.task-input-body {
  flex: 1;
  min-width: 0;
  background: var(--desk-background);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}
.task-input-body:focus-within {
  border-color: var(--desk-accent);
}
.desk #taskForm input {
  font-size: 14px;
}
.desk #taskForm .quiet {
  padding: 8px 12px;
  min-height: 36px;
}
.desk .empty-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin: 0 0 12px;
  padding: 0;
  text-align: left;
  color: var(--muted);
  opacity: 0.65;
}
.empty-slot-label {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px 12px;
}
.empty-slot > span:last-child {
  margin-left: -40px;
  margin-right: 17px;
  font-size: 19px;
}
.plan-note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  opacity: 0.65;
}
.desk .start-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  margin: 0;
  min-height: 360px;
  text-align: center;
  align-self: stretch;
}
.desk .start-panel .next-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  opacity: 0.65;
}
.desk .start-panel h2 {
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
  overflow-wrap: anywhere;
  margin: 0 0 18px;
  color: var(--ink);
}
#plannedTimer {
  font-size: clamp(58px, 6vw, 92px);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -4px;
  line-height: 1.2;
  color: var(--desk-accent);
}
.desk .start-panel #selectedMeta {
  font-size: 12px;
  margin: 16px 0 26px;
  color: var(--muted);
}
.desk .start-panel .primary {
  margin: 0;
  width: 100%;
  font-size: 16px;
  min-height: 54px;
}
.desk .start-panel .start-help {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  opacity: 0.6;
}
.desk #finishDay {
  margin: 16px auto 0;
  padding: 12px 22px;
}
.desk #deskCalendar {
  margin: 20px auto 0;
}
.desk .daily-strip {
  margin-top: 22px;
}
.desk footer {
  max-width: 1320px;
}
.desk.is-focusing .routine-progress {
  display: none;
}
.desk #focus {
  padding-top: 45px;
}
#headerTime {
  font-size: 12px;
  opacity: 0.65;
  margin-left: auto;
}
.desk .header-date {
  margin-right: 0;
}
.desk .view-controls {
  margin-left: 0;
}
@media (max-width: 850px) {
  .desk main {
    padding: 20px 20px 0;
    max-width: 720px;
  }
  .desk .workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .desk .routine-progress {
    margin-bottom: 30px;
    gap: 10px;
    font-size: 11px;
  }
  .desk .intro h1 {
    font-size: 32px;
  }
  .desk .tasks-panel {
    padding: 22px;
  }
  .desk .start-panel {
    min-height: 0;
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    text-align: left;
  }
  .desk .start-panel .next-label {
    grid-column: 1;
    margin-bottom: 6px;
  }
  .desk .start-panel h2 {
    grid-column: 1/-1;
    font-size: 17px;
    margin-bottom: 12px;
  }
  .desk #plannedTimer {
    grid-column: 1;
    font-size: 52px;
    letter-spacing: -2px;
  }
  .desk .start-panel #selectedMeta {
    grid-column: 1/-1;
    margin: 10px 0 16px;
    font-size: 11px;
  }
  .desk .start-panel .primary {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
    font-size: 14px;
    padding: 12px;
    gap: 12px;
  }
  .desk .start-panel .start-help {
    display: none;
  }
  .desk .section-title {
    margin-bottom: 20px;
  }
  .desk .task {
    gap: 7px;
  }
  .desk .task .slot-number {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
  .desk #deskCalendar {
    max-width: 100%;
  }
}
@media (max-width: 500px) {
  .desk header {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  #headerTime {
    display: none;
  }
  .desk .view-controls {
    margin-left: auto;
  }
  .desk main {
    padding: 10px 16px 0;
  }
  .desk .routine-progress {
    margin: 10px auto 28px;
  }
  .desk .intro h1 {
    font-size: 30px;
  }
  .desk .intro #welcomeHint {
    font-size: 12px;
  }
  .desk .tasks-panel {
    padding: 20px 14px;
  }
  .slot-number {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .desk #taskForm {
    gap: 9px;
  }
  .desk .empty-slot {
    gap: 9px;
  }
  .desk .task-choice strong {
    font-size: 13px;
  }
  .desk .task .remove,
  .desk .edit-task {
    min-width: 24px;
    font-size: 11px;
  }
  .desk .task .remove {
    font-size: 18px;
  }
  .desk .task-choice small {
    font-size: 10px;
  }
  .desk .start-panel {
    padding: 20px;
  }
  .desk #focus {
    padding-top: 28px;
  }
}

/* Consistent, lightweight controls across the desk and dialogs. */
.ui-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.desk .primary,
.desk .quiet,
.desk .file-button,
.desk .theme-presets button {
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.desk .primary {
  gap: 12px;
}
.desk .quiet,
.desk .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-color: color-mix(in srgb, var(--desk-text) 16%, transparent);
}
.desk header .quiet {
  border-color: transparent;
}
.desk .text-button {
  border-radius: 10px;
  min-height: 44px;
}
.desk .text-button .ui-icon {
  margin-left: 6px;
}
.desk .dialog-head button,
.desk .remove {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  font-size: 0;
  color: var(--desk-text);
}
.desk .dialog-head button::before,
.desk .dialog-head button::after,
.desk .remove::before,
.desk .remove::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}
.desk .dialog-head button::after,
.desk .remove::after {
  transform: rotate(-45deg);
}
.desk .calendar-heading button:hover:not(:disabled),
.desk .dialog-head button:hover:not(:disabled),
.desk .remove:hover:not(:disabled),
.desk .theme-presets button:hover:not(:disabled),
.desk .quiet:hover:not(:disabled),
.desk .text-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--desk-text) 8%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .desk button,
  .desk .file-button {
    transition: background-color 150ms ease, border-color 150ms ease;
  }
}

/* Keep the date and clock together as a quiet header detail. */
.desk .header-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-left: auto;
  padding-right: 24px;
  border-right: 1px solid color-mix(in srgb, var(--desk-text) 12%, transparent);
  white-space: nowrap;
}
.desk .header-datetime .header-date {
  flex: none;
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  opacity: 0.65;
}
.desk .header-datetime #headerTime {
  display: block;
  margin: 0;
  color: var(--desk-text);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}
.desk.is-focusing .header-datetime .header-date {
  visibility: visible;
}
@media (max-width: 600px) {
  .desk header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .desk header .logo {
    margin-right: auto;
  }
  .desk .header-datetime {
    order: 1;
    flex: 0 0 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 0;
    padding: 12px 0 0;
    border-right: 0;
    border-top: 1px solid color-mix(in srgb, var(--desk-text) 10%, transparent);
  }
  .desk .header-datetime #headerTime {
    font-size: 16px;
  }
  .desk .view-controls {
    margin-left: 0;
  }
}

.floating-controls {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 8px 28px #0003;
}
.floating-controls .text-button {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 12px;
  border-radius: 999px;
}
.desk footer {
  justify-content: center;
  text-align: center;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}
body.is-focusing .floating-controls {
  visibility: hidden;
}
@media (max-width: 500px) {
  .floating-controls {
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

.desk .task .remove {
  font-size: 0;
}
.desk .start-panel .primary {
  white-space: nowrap;
}
@media (max-width: 500px) {
  .desk .task {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 44px 44px;
    gap: 8px;
    padding: 12px;
  }
  .desk .task > .slot-number {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }
  .desk .task-choice {
    grid-column: 2 / -1;
    grid-row: 1;
  }
  .desk .task input[type="checkbox"] {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    margin: 0;
  }
  .desk .edit-task {
    grid-column: 3;
    grid-row: 2;
    min-height: 44px;
  }
  .desk .task .remove {
    grid-column: 4;
    grid-row: 2;
  }
}
@media (max-width: 380px) {
  .desk .start-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .desk .start-panel .primary {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Tasks grow naturally; the selected task stays within reach on desktop. */
.desk .tasks-panel {
  display: flex;
  flex-direction: column;
}
.desk .task {
  padding: 16px 12px;
  gap: 12px;
  min-height: 84px;
  box-sizing: border-box;
}
.desk .task:last-child:not(.selected) {
  border-bottom-color: transparent;
}
.desk #taskForm {
  margin: 16px 0 0;
}
.desk .plan-note {
  margin-bottom: 0;
  margin-top: 24px;
  padding-top: 20px;
}
.desk .start-panel {
  justify-content: flex-start;
}
.desk .start-panel .start-help {
  margin-top: 24px;
  padding-top: 20px;
}
@media (min-width: 901px) {
  .desk .tasks-panel {
    height: auto;
    box-sizing: border-box;
  }
  .desk #tasks {
    min-height: 0;
    flex: none;
  }
  .desk .start-panel {
    position: sticky;
    top: 24px;
    align-self: start;
    height: auto;
    box-sizing: border-box;
  }
  .desk .start-panel .next-label {
    min-height: 28px;
    margin-bottom: 24px;
    text-align: left;
  }
  .desk .start-panel h2 { margin-bottom: 12px; }
  .desk .start-panel #selectedMeta { margin: 12px 0 24px; }
  .desk .start-panel .start-help { margin-top: 24px; }
}
@media (max-width: 500px) {
  .desk .task input[type="checkbox"] {
    grid-row: 1;
    align-self: center;
  }
}

/* Content determines card height, including the first-task state. */
.desk .workspace { align-items: start; }
.desk .tasks-panel { align-self: start; }
.desk .start-panel { min-height: 0; }
#taskEmptyHint { margin: 0 0 4px; }
.desk .task-input-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}
.desk #taskForm #taskTitle {
  padding: 4px 0;
  margin: 0;
  min-height: 32px;
  border-radius: 0;
}
.desk #taskTitle:focus-visible { outline: none; }
.desk .task-input-body:focus-within { border-color: var(--desk-accent); }
.desk #taskForm .form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.desk #taskForm .form-bottom label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.desk #taskForm .form-bottom button { margin-left: auto; }
#carryDetails {
  margin-top: 20px;
  font-size: 12px;
}
#carryDetails summary { cursor: pointer; }
#carryDetails summary:focus-visible {
  outline: 2px solid var(--desk-accent);
  outline-offset: 4px;
}
#carryTasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
#carryTasks .carry {
  margin: 0;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

/* Review today's records before closing the day. */
.desk .daily-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 24px;
  width: 100%;
  max-width: 620px;
  margin: 36px auto 0;
  padding: 24px 0;
  border-bottom: 0;
}
.desk .daily-strip h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.daily-focus { min-width: 0; }
.daily-label { font-size: 12px; color: var(--muted); }
.daily-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.desk .daily-values strong {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.04em;
}
#dailyCount { font-size: 13px; color: var(--muted); }
.desk #memoButton { justify-self: end; font-size: 13px; padding: 6px 0 6px 12px; }
.desk .daily-strip #finishDay {
  justify-self: end;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 14px;
}
.desk .daily-strip #finishDay:hover {
  background: color-mix(in srgb, var(--ink) 11%, transparent);
}
.desk #deskCalendar { margin: 0 auto; }
.desk #deskCalendar > summary {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 620px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  list-style: none;
}
.desk #deskCalendar > summary::-webkit-details-marker { display: none; }
.desk #deskCalendar > summary::after { content: "▾"; margin-left: auto; }
.desk #deskCalendar[open] > summary::after { content: "▴"; }
.desk #deskCalendar[open] > summary { margin-bottom: 12px; }
@media (max-width: 500px) {
  .desk .daily-strip { margin-top: 28px; gap: 16px 12px; padding: 20px 0; }
  .desk .daily-values strong { font-size: 28px; }
  .desk .daily-strip #finishDay { padding: 10px 12px; font-size: 12px; }
}

/* One type family, with quiet labels and readable everyday text. */
.desk {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.desk .intro h1,
.desk .section-title h2,
.desk #focus h1,
.desk #done h1,
.desk .dialog-head h2,
.desk .nodi-about h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.4;
}
.desk .task-choice strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}
.desk .intro #welcomeHint,
.desk .plan-note,
.desk .start-panel .start-help,
.desk #focusHint,
.desk #taskEmptyHint,
.desk .empty-slot-label {
  font-size: 14px;
  line-height: 1.7;
}
.desk .task-choice small,
.desk .start-panel #selectedMeta,
.desk .start-panel .next-label,
.desk .daily-label,
.desk #carryDetails,
.desk #deskCalendar summary,
.desk .calendar-weekdays,
.desk .floating-controls .text-button,
.desk #colorFields legend,
.desk .theme-presets button {
  font-size: 13px;
  line-height: 1.6;
}
.desk .routine-progress,
.desk .header-datetime .header-date,
.desk footer {
  font-size: 12px;
  line-height: 1.5;
}
.desk .text-button,
.desk .edit-task,
.desk .calendar-grid .today {
  font-weight: 500;
}
.desk .flip-number,
.desk #plannedTimer {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.desk .flip-card small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
@media (max-width: 500px) {
  .desk .task-choice strong { font-size: 15px; }
  .desk .routine-progress { gap: 8px; }
  .desk .flip-card small { font-size: 11px; }
}

.notification-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.notification-welcome strong { font-size: 15px; font-weight: 500; }
.notification-welcome p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.notification-welcome-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.notification-welcome-actions .primary { margin: 0; font-size: 14px; padding: 12px 18px; }
@media (max-width: 600px) {
  .notification-welcome { flex-direction: column; align-items: flex-start; padding: 18px; }
}

/* Glass highlights and depth, with opaque and reduced-motion fallbacks. */
.desk .start-panel {
  background:
    linear-gradient(135deg, #ffffff20, #ffffff00 45%),
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--desk-accent) 14%, transparent), transparent 65%),
    var(--desk-card);
  border-color: color-mix(in srgb, var(--line) 85%, var(--ink));
  box-shadow: inset 0 1px 0 #ffffff55, inset 0 -1px 0 #ffffff10, 0 12px 32px #00000012;
}
.desk .floating-controls {
  background: var(--paper);
  border-color: color-mix(in srgb, var(--line) 85%, var(--ink));
  box-shadow: inset 0 1px 0 #ffffff66, 0 10px 32px #00000020;
}
.desk dialog {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 #ffffff55, 0 24px 72px #00000038;
}
.desk dialog::backdrop {
  background: #00000038;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .desk .floating-controls {
    background: linear-gradient(135deg, #ffffff24, #ffffff00 65%),
      color-mix(in srgb, var(--paper) 76%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
  .desk .start-panel {
    background:
      linear-gradient(135deg, #ffffff20, #ffffff00 45%),
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--desk-accent) 14%, transparent), transparent 65%),
      color-mix(in srgb, var(--desk-card) 85%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .desk dialog {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
@media (hover: hover) and (pointer: fine) {
  .desk .start-panel:hover,
  .desk .start-panel:focus-within {
    border-color: color-mix(in srgb, var(--line) 65%, var(--ink));
    box-shadow: inset 0 1px 0 #ffffff70, 0 18px 40px #0000001c;
  }
  .desk .floating-controls:hover {
    box-shadow: inset 0 1px 0 #ffffff80, 0 14px 36px #00000028;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .desk .start-panel,
  .desk .floating-controls {
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .desk .start-panel:hover { transform: translateY(-3px); }
  .desk .floating-controls:hover { transform: translateY(-2px); }
}
@media (prefers-reduced-transparency: reduce) {
  .desk .start-panel { background: var(--desk-card); }
  .desk .floating-controls { background: var(--paper); }
  .desk dialog { background: var(--bg); }
  .desk .start-panel,
  .desk .floating-controls,
  .desk dialog,
  .desk dialog::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.design-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 16px;
  padding: 0;
  border: 0;
}
.design-options legend { font-size: 14px; margin-bottom: 10px; }
.design-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.design-options label:has(input:checked) {
  border-color: var(--desk-accent);
  background: color-mix(in srgb, var(--desk-accent) 9%, transparent);
}
.design-options input { margin: 0; accent-color: var(--desk-accent); }
.color-preview[data-clock-style="minimal"] .color-preview-clock { gap: 22px; position: relative; }
.color-preview[data-clock-style="minimal"] .color-preview-clock > span { background: transparent; font-weight: 400; }
.color-preview[data-clock-style="minimal"] .color-preview-clock::after {
  content: ":";
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  font-size: 38px;
  color: var(--preview-clock);
}
.calendar-style-preview {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 280px;
  margin: 16px auto 0;
  font-size: 11px;
}
.calendar-style-preview span { padding: 4px 0; border-radius: 6px; }
.calendar-style-preview .preview-today { background: var(--preview-button); color: var(--preview-buttonText); }
.desk[data-calendar-style="week"] .calendar-heading h2 { font-size: clamp(13px, 3vw, 18px); }
.desk[data-calendar-style="week"] .calendar-grid { padding-bottom: 12px; }

/* Custom settings: compact controls with natural, unbroken labels. */
.desk #colorDialog {
  width: min(600px, calc(100% - 28px));
  padding: 24px;
  overscroll-behavior: contain;
}
#colorDialog .dialog-head { margin-bottom: 8px; }
#colorDialog > .hint { margin: 0 0 20px; }
#colorDialog .hint { font-size: 13px; line-height: 1.65; word-break: keep-all; }
#colorDialog .design-options { gap: 8px; margin: 24px 0 16px; }
#colorDialog .design-options label {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  padding: 12px;
  justify-content: center;
  white-space: nowrap;
  font-size: 14px;
}
#colorDialog .design-options input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
}
#colorPreview { padding: 20px; border-radius: 14px; }
#analogPreview { width: 150px; height: 150px; margin: 12px auto; }
#colorPreview[data-clock-style="analog"] #analogPreview { display: block; }
#colorPreview[data-clock-style="analog"] .color-preview-clock { display: none; }
#analogPreview .analog-rim { fill: none; stroke: var(--preview-text); }
#analogPreview .analog-mark { stroke: var(--preview-text); }
#analogPreview .analog-hand { stroke: var(--preview-clock); }
#analogPreview .analog-label { fill: var(--preview-clock); }
#analogPreview .analog-pin { fill: var(--preview-clock); }
.custom-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.custom-actions .primary { margin: 0; }
@media (max-width: 420px) {
  .desk #colorDialog { padding: 18px; }
  #colorDialog .design-options label { font-size: 12px; padding: 10px 6px; gap: 5px; }
  #colorPreview { padding: 14px; }
}

/* Three flip cards: weekday, month, date. */
.desk[data-calendar-style="flip"] .calendar-weekdays,
.desk[data-calendar-style="flip"] #calendarGrid { display: none; }
.desk[data-calendar-style="flip"] .calendar-heading h2 { font-size: 16px; font-weight: 500; }
.flip-calendar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 20px 12px;
  color: var(--desk-text);
}
.flip-date-column { min-width: 0; text-align: center; }
.flip-date-caption { display: block; margin-bottom: 12px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; opacity: 0.65; }
.flip-date-year { grid-column: 1 / -1; text-align: center; font-size: 12px; opacity: 0.5; margin-top: 6px; }
.flip-date-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.95;
  container-type: inline-size;
  border: 1px solid var(--desk-border);
  border-radius: 14px;
  background: linear-gradient(180deg, #00000006 50%, #ffffff08 50%), var(--desk-background);
  box-shadow: 0 4px 0 -1px var(--desk-card), 0 5px 0 -1px var(--desk-border), 0 12px 24px #0000000d;
}
.flip-date-face::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--desk-border);
  opacity: 0.7;
}
.flip-date-face strong {
  font-size: clamp(20px, 30cqw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--desk-clock);
}

.calendar-today { display: block; margin: 0 auto; font-size: 12px; }
#calendarPreview.flip-calendar {
  --desk-text: var(--preview-text);
  --desk-border: var(--preview-border);
  --desk-background: var(--preview-background);
  --desk-card: var(--preview-card);
  --desk-clock: var(--preview-clock);
  gap: 8px;
  padding: 12px 0 0;
}
#calendarPreview.flip-calendar span { padding: 0; }
#calendarPreview .flip-date-face { width: 100%; border-radius: 8px; }
#calendarPreview .flip-date-face strong { font-size: clamp(16px, 30cqw, 26px); }
#calendarPreview .flip-date-caption { font-size: 9px; margin-bottom: 8px; }
#calendarPreview .flip-date-year { font-size: 10px; }
@media (max-width: 500px) {
  #flipCalendar { gap: 10px; padding: 20px 14px 12px; }
  #flipCalendar .flip-date-face { border-radius: 10px; }
  #flipCalendar .flip-date-caption { font-size: 10px; letter-spacing: 0.08em; }
}

/* Editorial serif for the date cards; interface labels stay understated. */
.flip-date-face strong {
  font-family: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(22px, 32cqw, 60px);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
}
.flip-date-column:nth-child(3) .flip-date-face strong {
  font-size: clamp(30px, 46cqw, 82px);
}
#calendarPreview .flip-date-face strong {
  font-size: clamp(17px, 32cqw, 28px);
}
#calendarPreview .flip-date-column:nth-child(3) .flip-date-face strong {
  font-size: clamp(24px, 46cqw, 40px);
}

/* The flip calendar gets its own spacious, viewport-sized stage. */
.desk[data-calendar-style="flip"] #deskCalendar {
  max-width: 1200px;
  width: 100%;
  margin-top: 0;
}
.desk[data-calendar-style="flip"] #deskCalendar > .desk-calendar-card {
  min-height: min(900px, calc(100svh - 100px));
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 4vw, 48px);
  border-radius: 24px;
}
.desk[data-calendar-style="flip"] .calendar-heading {
  padding: 0 0 24px;
  border-bottom: 0;
}
.desk[data-calendar-style="flip"] .calendar-heading h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.desk[data-calendar-style="flip"] #flipCalendar {
  flex: 1;
  align-content: center;
  gap: clamp(12px, 3vw, 36px);
  padding: 12px 0 36px;
}
#flipCalendar .flip-date-caption {
  font-size: clamp(11px, 1.3vw, 16px);
  margin-bottom: clamp(12px, 2vw, 24px);
  letter-spacing: 0.14em;
}
#flipCalendar .flip-date-face { aspect-ratio: 0.85; border-radius: clamp(10px, 1.6vw, 20px); }
#flipCalendar .flip-date-face strong { font-size: clamp(22px, 32cqw, 128px); }
#flipCalendar .flip-date-column:nth-child(3) .flip-date-face strong { font-size: clamp(32px, 46cqw, 180px); }
@media (max-width: 600px) {
  .desk[data-calendar-style="flip"] #deskCalendar > .desk-calendar-card {
    padding: 20px 14px 88px;
    min-height: calc(100svh - 100px);
    border-radius: 18px;
  }
  .desk[data-calendar-style="flip"] #flipCalendar { gap: 10px; padding-bottom: 12px; }
  #flipCalendar .flip-date-face { aspect-ratio: 0.7; }
}

.task-history { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.delete-notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 16px; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: 0 4px 24px #0002; font-size: 13px; }
.delete-notice button { flex-shrink: 0; }
.notification-check, .notification-help { margin: 14px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; line-height: 1.7; }
.notification-check p { margin: 0 0 8px; }
.notification-help summary { cursor: pointer; padding: 6px 0; }
.notification-help summary:focus-visible { outline: 2px solid var(--desk-accent); outline-offset: 3px; }
.notification-help details { border-top: 1px solid var(--line); padding: 6px 0; }
.notification-help ol { padding-left: 20px; margin: 8px 0; }
.notification-help li + li { margin-top: 6px; }
.task-history > summary { cursor: pointer; font-size: 14px; padding: 6px 0; }
.task-history summary:focus-visible { outline: 2px solid var(--desk-accent); outline-offset: 4px; }
#completedTasks { margin-top: 16px; }
#carryTasks .history-day { border-bottom: 1px solid var(--line); padding: 12px 0; }
.history-day > summary { cursor: pointer; font-size: 13px; line-height: 1.7; }
.history-day h3 { margin: 18px 0 8px; font-size: 12px; font-weight: 500; opacity: 0.65; }
.history-task { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.history-task-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.history-task strong { display: block; font-size: 14px; font-weight: 400; }
.history-task small { display: block; margin-top: 4px; font-size: 12px; opacity: 0.6; }
.history-task .quiet { flex-shrink: 0; font-size: 12px; padding: 10px; }
