:root {
  --bg: #100e0c;
  --card: #1b1815;
  --cream: #f4efe6;
  --muted: #a3988c;
  --brass: #e0b56a;
  --brass-deep: #c9844a;
  --ink: #24180c;
  --sage: #8faf8a;
  --line: rgba(244, 239, 230, 0.1);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--cream);
  background:
    radial-gradient(ellipse 70% 45% at 12% -10%, rgba(224, 181, 106, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(143, 175, 138, 0.1), transparent 50%),
    var(--bg);
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

::selection { background: rgba(224, 181, 106, 0.35); }

.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 {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 4;
  margin-bottom: 1.1rem;
  padding: 0.35rem 0 0.85rem;
  background: rgba(16, 14, 12, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid var(--brass);
  position: relative;
  flex: none;
}

.mark::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 0.7rem;
  background: var(--brass);
  left: 50%;
  top: 0.35rem;
  transform: translateX(-50%);
  border-radius: 2px;
}

.brand-name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-date {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.chip-btn,
.week-chip {
  margin: 0;
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  font-size: 0.92rem;
}

.chip-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
}

.chip-btn[aria-pressed="false"] { color: var(--muted); }

.week-chip {
  background: rgba(224, 181, 106, 0.14);
  color: #f0d7a4;
}

.live-chip {
  margin: 0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: var(--brass);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.live-chip[data-mode="paused"] {
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.22);
}

.live-chip[data-mode="alarm"] {
  background: var(--cream);
  color: var(--ink);
}

.live-chip[data-mode="break"] {
  background: var(--sage);
  color: #14210f;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.stage,
.panel {
  background: rgba(27, 24, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.stage {
  padding: 2rem 1.4rem 1.6rem;
  min-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage[data-phase="running"] {
  background:
    radial-gradient(circle at 50% 38%, rgba(224, 181, 106, 0.16), transparent 46%),
    rgba(27, 24, 21, 0.94);
}

.stage[data-phase="break"] {
  background:
    radial-gradient(circle at 50% 38%, rgba(143, 175, 138, 0.18), transparent 48%),
    rgba(27, 24, 21, 0.94);
}

.stage[data-phase="alarm"] {
  animation: alarmPulse 1.15s ease-in-out infinite;
}

@keyframes alarmPulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(224, 181, 106, 0.25), var(--shadow); }
  50% { box-shadow: inset 0 0 0 1px rgba(224, 181, 106, 0.75), 0 0 80px rgba(224, 181, 106, 0.16); }
}

.stage-inner {
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 560;
  color: var(--brass);
}

.ring-wrap {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0.35rem 0 0.15rem;
}

.ring,
.clock {
  grid-area: 1 / 1;
}

.ring { width: 100%; height: 100%; }

.ring-track,
.ring-value {
  fill: none;
  stroke-width: 6;
}

.ring-track { stroke: rgba(244, 239, 230, 0.08); }

.ring-value {
  stroke: var(--brass);
  stroke-linecap: round;
  stroke-dasharray: 326.726;
  stroke-dashoffset: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.25s linear;
}

.stage[data-phase="break"] .ring-value { stroke: var(--sage); }
.stage[data-phase="alarm"] .ring-value { stroke: #f2d48a; }

.clock {
  margin: 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3.6rem, 9vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.session-title {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.28rem;
  line-height: 1.3;
}

.added {
  margin: 0 0 0.8rem;
  color: #f0d7a4;
}

.focus-field {
  width: 100%;
  text-align: left;
  margin-top: 0.35rem;
}

.focus-field label,
.custom-field label,
.subhead,
.panel-head p,
.fine,
.hint,
.stat-note,
.goal-label,
.empty,
.bar-name,
.bar-val,
dt {
  color: var(--muted);
}

.focus-field label {
  display: block;
  margin: 0 0 0.35rem 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  background: rgba(244, 239, 230, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

input::placeholder { color: rgba(243, 234, 223, 0.38); }

.presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.95rem 0 0.85rem;
}

.presets button,
.custom-field {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
}

.presets button {
  min-width: 3.1rem;
  padding: 0.55rem 0.85rem;
}

.presets button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}

.custom-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem 0.2rem 0.75rem;
}

.custom-field label {
  font-size: 0.92rem;
}

.custom-field input {
  width: 4.2rem;
  padding: 0.4rem 0.45rem;
  border: 0;
  background: transparent;
  text-align: center;
}

.presets.is-locked { opacity: 0.45; }

.presets[hidden],
.break-offer[hidden] { display: none; }

.stage[data-intent="break"] .kicker { color: var(--sage); }

.stage[data-intent="break"] .ring-value { stroke: var(--sage); }

.btn.primary.is-break {
  background: var(--sage);
  color: #14210f;
}

.btn.primary.is-break:hover { background: #a9c4a4; }

.break-offer { margin-top: 0.4rem; }

.break-offer-label {
  margin: 0;
  color: var(--sage);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 560;
}

.break-offer .presets { margin-top: 0.45rem; }

.log-time.is-break { color: var(--sage); }

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

.break-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.break-row[hidden] { display: none; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.92rem 1.25rem;
  font-weight: 560;
}

.btn.primary {
  background: var(--brass);
  color: var(--ink);
  min-width: 9.5rem;
}

.btn.primary:hover { background: #f0c98a; }

.btn.ghost {
  background: rgba(244, 239, 230, 0.08);
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.18);
}

.btn.break {
  background: var(--sage);
  color: #14210f;
}

.btn.break:hover { background: #a9c4a4; }

.btn.text {
  background: transparent;
  color: var(--muted);
  padding-inline: 0.7rem;
}

.hint {
  margin: 0.95rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 34rem;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel { padding: 1.25rem 1.2rem 1.15rem; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.panel-head h2,
.subhead {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.panel-head p,
.fine,
.empty,
.stat-note,
.goal-label { margin: 0; }

.big-stat {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3rem, 6vw, 4.15rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.stat-note { font-size: 0.95rem; }

.bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 1.15rem;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.bar-track {
  width: min(100%, 26px);
  height: 96px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.05);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-fill {
  width: 100%;
  height: 0;
  border-radius: inherit;
  background: rgba(224, 181, 106, 0.72);
}

.bar-col.is-today .bar-fill {
  background: linear-gradient(180deg, #f3d7a0, var(--brass-deep));
}

.bar-col.is-today .bar-name { color: var(--cream); }
.bar-col.is-future { opacity: 0.38; }

.bar-name,
.bar-val {
  font-size: 0.68rem;
  line-height: 1.2;
  text-align: center;
}

.bar-val { min-height: 0.85rem; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
  margin: 1.1rem 0 0;
}

.stats div { border-top: 1px solid var(--line); padding-top: 0.7rem; }

dt {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

dd {
  margin: 0.18rem 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.goal-btn {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(224, 181, 106, 0.45);
  text-underline-offset: 0.18em;
}

#goal-form input {
  font-family: var(--serif);
  font-size: 1.2rem;
  padding: 0.25rem 0.4rem;
  width: 5.5rem;
}

.goal { margin-top: 1rem; }

.goal-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.08);
  overflow: hidden;
}

.goal-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brass-deep), #f0d7a4);
}

.goal-label { margin-top: 0.45rem; font-size: 0.9rem; }

.goal-track.is-met .goal-fill { background: var(--sage); }

.subhead {
  margin: 1.15rem 0 0.45rem;
  font-size: 1.15rem;
}

.log, .task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.log {
  max-height: 220px;
  overflow: auto;
}

.log li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
}

.log-title { margin: 0; }
.log-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.log-time {
  font-variant-numeric: tabular-nums;
  color: #f0d7a4;
  white-space: nowrap;
}

.task-form {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.task-form input { flex: 1; min-width: 0; }

.task-form button {
  border: 0;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  padding: 0 1rem;
}

.task-empty, #task-empty { margin-top: 0.85rem; }

.task-list { margin-top: 0.35rem; }

.task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.45rem 0.55rem;
  align-items: center;
  padding: 0.55rem 0.35rem;
  border-radius: 12px;
}

.task.is-selected {
  background: rgba(224, 181, 106, 0.1);
}

.task + .task { border-top: 1px solid transparent; }

.check, .delete-task {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}

.check {
  border: 1.5px solid rgba(244, 239, 230, 0.28);
  background: transparent;
}

.check svg { opacity: 0; }

.task.is-done .check {
  background: var(--sage);
  border-color: var(--sage);
}

.task.is-done .check svg { opacity: 1; }

.delete-task {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}

.task-select {
  background: none;
  border: 0;
  text-align: left;
  padding: 0.2rem 0;
  min-width: 0;
}

.task-select span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.task.is-done .task-select { color: var(--muted); }

.done-block { margin-top: 0.7rem; }

.done-block:not([open]) > :not(summary) { display: none; }

.done-block summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.92rem;
}

.fine {
  margin-top: 0.9rem;
  font-size: 0.8rem;
}

.toast[hidden] { display: none; }

.task-place {
  grid-column: 2 / -1;
  justify-self: start;
  max-width: 100%;
  background: none;
  border: 0;
  padding: 0;
  color: #f0d7a4;
  font-size: 0.82rem;
  text-align: left;
}

.task-place.is-empty { color: var(--muted); }

.task-place.is-note { margin: 0; }

.place-dialog {
  width: min(440px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #1b1815;
  color: var(--cream);
  padding: 1.15rem 1.15rem 1rem;
}

.place-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }

.place-dialog h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 560;
}

.place-task {
  margin: 0.25rem 0 0.9rem;
  color: var(--muted);
}

.place-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0;
}

.place-choice button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.5rem 0.8rem;
}

.place-choice button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}

.place-dialog label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.place-results {
  list-style: none;
  margin: 0.45rem 0;
  padding: 0;
}

.place-results button {
  width: 100%;
  text-align: left;
  background: rgba(244, 239, 230, 0.04);
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-top: 0.35rem;
}

.place-chosen {
  margin: 0.2rem 0 0.4rem;
  color: #f0d7a4;
}

.place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.4rem;
}

.place-dialog .fine { margin-top: 0.85rem; }

.place-alert[hidden] { display: none; }

.place-alert {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 1.5rem));
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  align-items: center;
  background: var(--cream);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
}

.place-alert p { margin: 0; flex: 1 1 180px; }

.place-alert button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.toast {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.7rem 0.85rem 0.7rem 1rem;
  box-shadow: var(--shadow);
}

.toast p { margin: 0; }

.toast button {
  background: none;
  border: 0;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.agenda { margin-top: 1rem; }

.agenda .panel-head {
  flex-wrap: wrap;
  align-items: center;
}

.agenda-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.agenda-tabs button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0.4rem 0.85rem;
}

.agenda-tabs button[aria-selected="true"] {
  background: var(--cream);
  color: var(--ink);
}

.agenda-form[hidden] { display: none; }

.agenda-focus {
  margin: 0.85rem 0 0;
  color: var(--sage);
  font-weight: 560;
}

.agenda-focus[hidden] { display: none; }

.agenda-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.55rem;
}

.agenda-nav button {
  border: 0;
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.agenda-nav p {
  min-width: 8rem;
  text-align: center;
}

.agenda-form input[type="time"][hidden] { display: none; }

#agenda-time-toggle {
  background: transparent;
  color: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(244, 239, 230, 0.18);
  border-radius: 999px;
  font-weight: 560;
  white-space: nowrap;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

#agenda-time-toggle[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
  box-shadow: none;
}

.agenda-when {
  border: 0;
  background: transparent;
  color: #f0d7a4;
  padding: 0.2rem 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.agenda-when.is-empty { color: var(--muted); font-size: 0.82rem; }

.cal-dialog {
  width: min(420px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #1b1815;
  color: var(--cream);
  padding: 1.15rem 1.1rem 1rem;
}

.cal-dialog::backdrop { background: rgba(0, 0, 0, 0.62); }

.cal-dialog h3 {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 560;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cal-head p {
  margin: 0;
  font-weight: 560;
}

.cal-head button {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font-size: 1.35rem;
  line-height: 1;
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.15rem;
}

.cal-weekdays {
  margin: 0.75rem 0 0.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cream);
  padding: 0.2rem 0;
}

.cal-day[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
}

.cal-day.is-today:not([aria-pressed="true"]) {
  box-shadow: inset 0 0 0 1px var(--brass);
}

.cal-day.has-items::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--brass);
}

.cal-day[aria-pressed="true"].has-items::after { background: var(--ink); }

.cal-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.8rem 0 0.3rem;
}

.cal-quick button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  padding: 0.45rem 0.75rem;
}

.cal-quick button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}

.cal-dialog label {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal-dialog input[type="time"] {
  width: 100%;
  margin-top: 0.35rem;
  color-scheme: dark;
  background: rgba(244, 239, 230, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.cal-dialog .fine { margin: 0.45rem 0 0; }

.cal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.9rem;
}

.agenda-list {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
}

.agenda-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.62rem 0.1rem;
  border-top: 1px solid var(--line);
}

.agenda-item time {
  font-variant-numeric: tabular-nums;
  color: #f0d7a4;
}

.agenda-title {
  background: none;
  border: 0;
  text-align: left;
  padding: 0.2rem 0;
  min-width: 0;
}

.agenda-item.is-done .check {
  background: var(--sage);
  border-color: var(--sage);
}

.agenda-item.is-done .check svg { opacity: 1; }

.agenda-item.is-done .agenda-title {
  color: var(--muted);
  text-decoration: line-through;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .stage { min-height: 0; padding: 1.5rem 1rem 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stage[data-phase="alarm"] { animation: none; }
  .ring-value { transition: none; }
}
