:root {
  color-scheme: light;
  --canvas: #f6f7f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #ecefea;
  --ink: #151816;
  --muted: #69706b;
  --line: #dce1dc;
  --line-strong: #bdc6bf;
  --accent: #ff5c2b;
  --accent-strong: #d93b0d;
  --accent-soft: #fff0e9;
  --signal: #087f67;
  --signal-soft: #e6f5f0;
  --shadow-sm: 0 1px 2px rgba(21, 24, 22, 0.05), 0 8px 24px rgba(21, 24, 22, 0.05);
  --shadow-focus: 0 0 0 4px rgba(255, 92, 43, 0.14);
  --radius: 8px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111412;
  --surface: #1a1e1b;
  --surface-raised: #202521;
  --surface-soft: #282e29;
  --ink: #f3f6f2;
  --muted: #a6afa8;
  --line: #333a35;
  --line-strong: #4d5850;
  --accent: #ff7043;
  --accent-strong: #ff936f;
  --accent-soft: #38231c;
  --signal: #56c9ac;
  --signal-soft: #19352d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 12px 32px rgba(0, 0, 0, 0.22);
  --shadow-focus: 0 0 0 4px rgba(255, 112, 67, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
}

.skip-link:focus {
  top: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 10px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--canvas) 90%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}

.brand img {
  display: block;
  width: 38px;
  height: 38px;
}

.tool-nav,
.mode-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.tool-nav button,
.mode-switch button {
  min-height: 36px;
  padding: 7px 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.tool-nav button:hover,
.mode-switch button:hover {
  color: var(--ink);
}

.tool-nav button[aria-selected="true"],
.mode-switch button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(21, 24, 22, 0.09);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.icon-control,
.lang-control,
.plus-link {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: border-color 150ms ease, background 150ms ease;
}

.icon-control:hover,
.lang-control:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.icon-control {
  padding: 0;
  font-size: 18px;
}

.icon-control[aria-pressed="false"] {
  color: var(--muted);
  text-decoration: line-through;
}

.plus-link {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.workspace {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 156px);
  margin: 0 auto;
  padding: 60px 0 28px;
}

.tool-shell {
  min-height: 590px;
}

.tool-view[hidden] {
  display: none;
}

.tool-view {
  min-width: 0;
}

#countdown-view:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(520px, 1.14fr);
  align-items: start;
  gap: 64px;
}

.tool-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

#countdown-view .tool-heading {
  position: sticky;
  top: 132px;
  max-width: 440px;
  padding-top: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 46px;
  font-weight: 760;
  line-height: 1.09;
  letter-spacing: 0;
  text-wrap: balance;
}

#countdown-view h1 {
  font-size: 42px;
}

.headline-line {
  display: block;
  white-space: nowrap;
}

.clock-layout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 84px;
  max-width: 900px;
  margin: 38px auto 0;
}

.clock-face {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.clock-face::after {
  position: absolute;
  inset: 36px;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  content: "";
}

.clock-face svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 10;
}

.ring-track {
  stroke: var(--surface-soft);
}

.ring-progress {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 779.1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 250ms linear;
}

.clock-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.time-display,
.stopwatch-display,
.pomo-display {
  display: block;
  min-width: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.time-display {
  font-size: 72px;
}

.status-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.control-stack {
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.field-label,
.countdown-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stepper {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  height: 54px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.stepper button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.stepper input {
  min-width: 0;
  border: 0;
  border-inline: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  font-size: 21px;
  font-weight: 750;
  appearance: textfield;
}

.stepper input::-webkit-inner-spin-button {
  appearance: none;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.preset-row button,
.secondary-button,
.utility-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease;
}

.preset-row button:hover,
.secondary-button:hover,
.utility-row button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.primary-actions {
  display: flex;
  gap: 9px;
}

.primary-actions.centered {
  justify-content: center;
}

.primary-button,
.secondary-button {
  min-width: 112px;
  min-height: 48px;
  padding: 10px 20px;
}

.primary-button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 7px 18px rgba(217, 59, 13, 0.16);
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.stopwatch-layout,
.pomodoro-layout {
  display: grid;
  justify-items: center;
  gap: 30px;
  max-width: 880px;
  margin: 76px auto 0;
}

.stopwatch-display,
.pomo-display {
  width: 100%;
  text-align: center;
  font-size: 112px;
}

.lap-list {
  width: min(100%, 560px);
  max-height: 190px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  counter-reset: laps;
}

.lap-list li {
  counter-increment: laps;
  display: flex;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.lap-list li::before {
  content: "Lap " counter(laps);
  color: var(--muted);
}

.pomodoro-layout {
  margin-top: 46px;
}

.mode-switch {
  width: fit-content;
  max-width: 100%;
}

.session-dots {
  display: flex;
  gap: 8px;
  min-height: 14px;
}

.session-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.session-dot.completed {
  background: var(--accent);
}

.countdown-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 18px 14px;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.countdown-form input {
  width: 100%;
  min-height: 52px;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.countdown-form input:hover {
  border-color: var(--line-strong);
}

.countdown-form input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.countdown-form input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.countdown-form .primary-button {
  width: 100%;
}

.countdown-result {
  min-height: 410px;
  margin: 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.countdown-event {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.event-phase {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 24px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--signal-soft);
  color: var(--signal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-destination {
  display: grid;
  width: min(100%, 460px);
  gap: 4px;
  margin: 0 auto 26px;
  padding: 15px 18px;
  border: 1px solid color-mix(in srgb, var(--signal) 35%, var(--line));
  border-radius: var(--radius);
  background: var(--signal-soft);
  color: var(--ink);
  text-decoration: none;
}

.event-destination[hidden] {
  display: none;
}

.event-destination strong {
  font-size: 16px;
}

.event-destination span {
  color: var(--muted);
  font-size: 12px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  max-width: 720px;
  margin: 0 auto 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.countdown-grid div {
  min-width: 0;
  padding: 22px 10px 19px;
}

.countdown-grid div + div {
  border-left: 1px solid var(--line);
}

.countdown-grid strong,
.countdown-grid span {
  display: block;
}

.countdown-grid strong {
  font-family: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 46px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-grid span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.share-feedback {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--signal);
  font-size: 13px;
  font-weight: 700;
}

.turnstile-container {
  display: grid;
  place-items: center;
  min-height: 0;
  margin-top: 12px;
}

.sponsor-strip,
.ad-container {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.sponsor-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 16px;
  font-size: 13px;
}

.sponsor-strip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sponsor-strip a {
  color: var(--signal);
  font-weight: 700;
}

.ad-container {
  min-height: 90px;
  overflow: hidden;
}

.utility-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 12px 0;
}

.utility-row button {
  min-height: 34px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

#local-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 24px;
  padding: 24px max(24px, calc((100vw - 1180px) / 2)) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a:hover {
  color: var(--ink);
}

.legacy-note {
  grid-column: 1 / -1;
}

/* Application workspace */
.workspace {
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 140px);
  padding: 28px 0 20px;
}

.tool-shell {
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.tool-view:not(#countdown-view) {
  min-height: 620px;
  padding: 38px 44px;
}

#countdown-view:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(400px, 0.8fr);
  min-height: 620px;
  gap: 0;
}

.draft-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 620px;
  padding: 38px 42px;
  overflow: hidden;
  background: #101310;
  color: #f7faf6;
}

.draft-preview::after {
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 70px solid #1a211c;
  border-radius: 50%;
  content: "";
}

.preview-topline,
.preview-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #929c94;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.preview-wordmark {
  color: #f7faf6;
}

.preview-phase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.preview-phase i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45d6ad;
  box-shadow: 0 0 0 4px rgba(69, 214, 173, 0.12);
}

.preview-main {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  flex: 1;
  min-height: 0;
}

.preview-title {
  max-width: 620px;
  margin: 0 0 34px;
  color: #f7faf6;
  font-family: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.preview-countdown {
  display: grid;
  grid-template-columns: minmax(72px, auto) 12px minmax(72px, auto) 12px minmax(72px, auto) 12px minmax(72px, auto);
  align-items: start;
  justify-content: start;
  gap: 12px;
}

.preview-countdown div {
  min-width: 0;
}

.preview-countdown strong,
.preview-countdown span {
  display: block;
}

.preview-countdown strong {
  font-family: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: 58px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  line-height: 1;
}

.preview-countdown b {
  padding-top: 8px;
  color: #4c554e;
  font-size: 32px;
  font-weight: 400;
}

.preview-countdown span {
  margin-top: 9px;
  color: #7f8981;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.preview-footer {
  padding-top: 22px;
  border-top: 1px solid #282e29;
}

.event-editor {
  min-width: 0;
  padding: 38px 36px;
  border-left: 1px solid var(--line);
  background: var(--surface);
}

#countdown-view .event-editor .tool-heading {
  position: static;
  max-width: none;
  margin-bottom: 26px;
  padding: 0;
}

#countdown-view .event-editor h1 {
  font-size: 30px;
  line-height: 1.12;
}

.event-editor .eyebrow {
  margin-bottom: 11px;
}

.event-editor .headline-line {
  display: inline;
  white-space: normal;
}

.event-editor .headline-line + .headline-line::before {
  content: " ";
}

.event-editor .countdown-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.event-editor .countdown-form label:first-child,
.event-editor .countdown-form label:nth-child(4) {
  grid-column: 1 / -1;
}

.event-editor .countdown-form input {
  min-height: 48px;
}

.event-editor .countdown-form .primary-button {
  min-height: 48px;
}

#countdown-view:has(#countdown-result:not([hidden])) .event-editor {
  display: none;
}

#countdown-view:has(#countdown-result:not([hidden])) {
  grid-template-columns: 1fr;
}

#countdown-view .countdown-result {
  grid-column: 1 / -1;
  min-height: 620px;
  margin: 0;
  padding: 64px 48px;
  border: 0;
  border-radius: 0;
  background: #101310;
  color: #f7faf6;
  box-shadow: none;
}

#countdown-view .countdown-event {
  color: #929c94;
}

#countdown-view .countdown-grid {
  max-width: 820px;
  border-color: #303731;
  background: #171c18;
}

#countdown-view .countdown-grid div + div {
  border-color: #303731;
}

#countdown-view .countdown-grid span {
  color: #929c94;
}

#countdown-view .secondary-button {
  border-color: #394139;
  background: #171c18;
  color: #f7faf6;
}

#countdown-view .secondary-button:hover {
  border-color: #616c63;
  background: #202620;
}

#countdown-view .event-destination {
  border-color: #31594d;
  background: #162b24;
  color: #f7faf6;
}

#countdown-view .event-destination span {
  color: #8da69c;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding-inline: 20px;
  }

  .tool-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
    width: 100%;
    margin-top: 8px;
    overflow-x: auto;
  }

  .tool-nav button {
    flex: 1 0 auto;
  }

  .workspace {
    padding-top: 42px;
  }

  #countdown-view:not([hidden]) {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .draft-preview {
    min-height: 500px;
  }

  .event-editor {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .clock-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .clock-face {
    width: min(70vw, 320px);
  }

  .control-stack {
    width: min(100%, 480px);
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 62px;
    padding: 8px 12px;
  }

  .brand {
    gap: 8px;
    font-size: 16px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .header-actions {
    gap: 4px;
  }

  .icon-control,
  .lang-control,
  .plus-link {
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
  }

  .tool-nav {
    scrollbar-width: none;
  }

  .tool-nav::-webkit-scrollbar {
    display: none;
  }

  .tool-nav button {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .workspace {
    width: calc(100% - 28px);
    min-height: calc(100vh - 160px);
    padding-top: 32px;
  }

  .tool-shell {
    min-height: 560px;
  }

  .tool-view:not(#countdown-view) {
    min-height: 560px;
    padding: 28px 20px;
  }

  .tool-heading {
    margin-bottom: 26px;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  h1 {
    font-size: 34px;
  }

  #countdown-view h1 {
    font-size: 32px;
  }

  #countdown-view:not([hidden]) {
    gap: 0;
  }

  .draft-preview {
    min-height: 430px;
    padding: 24px 20px;
  }

  .preview-title {
    margin-bottom: 26px;
    font-size: 32px;
  }

  .preview-countdown {
    grid-template-columns: minmax(48px, auto) 6px minmax(48px, auto) 6px minmax(48px, auto) 6px minmax(48px, auto);
    gap: 5px;
  }

  .preview-countdown strong {
    font-size: 38px;
  }

  .preview-countdown b {
    padding-top: 4px;
    font-size: 24px;
  }

  .event-editor {
    padding: 26px 20px;
  }

  #countdown-view .event-editor h1 {
    font-size: 26px;
  }

  .clock-face {
    width: min(76vw, 280px);
  }

  .clock-face::after {
    inset: 30px;
  }

  .time-display {
    font-size: 54px;
  }

  .control-stack,
  .countdown-form,
  .countdown-result {
    padding: 20px;
  }

  .stopwatch-layout,
  .pomodoro-layout {
    margin-top: 52px;
  }

  .stopwatch-display,
  .pomo-display {
    font-size: 66px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .mode-switch button {
    padding-inline: 6px;
    font-size: 12px;
  }

  .countdown-form {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
  }

  .event-editor .countdown-form {
    grid-template-columns: 1fr;
  }

  .event-editor .countdown-form label,
  .event-editor .countdown-form label:first-child,
  .event-editor .countdown-form label:nth-child(4) {
    grid-column: auto;
  }

  #countdown-view .countdown-result {
    min-height: 560px;
    padding: 42px 20px;
  }

  .countdown-form input {
    min-height: 50px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-grid div:nth-child(3) {
    border-left: 0;
  }

  .countdown-grid div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .countdown-grid strong {
    font-size: 38px;
  }

  .primary-actions {
    flex-wrap: wrap;
  }

  .primary-actions > button {
    flex: 1;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }

  .legacy-note {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
