:root {
  --bg: #f7f6fb;
  --surface: #fdfcff;
  --surface-2: #f2f0f6;
  --surface-3: #e9e6ee;
  --line: #e1dee6;
  --line-strong: #88848f;
  --track: #dad7e0;
  --ink: #2e2945;
  --ink-body: #3d3951;
  --ink-2: #636172;
  --navy: #484361;
  --navy-hover: #383350;
  --navy-ink: #ffffff;
  --teal: #726f96;
  --teal-strong: #5c587e;
  --teal-muted: #626079;
  --teal-text: #565378;
  --teal-soft: #ecebf9;
  --teal-soft-line: #dbdaec;
  --teal-icon: #e1e1f4;
  --teal-tint: #f5f5fc;
  --amber: #87b5b2;
  --amber-strong: #406d69;
  --amber-muted: #52706d;
  --amber-tint: #f1f9f8;
  --amber-line: #d1e6e4;
  --ok: #4b896c;
  --wait: #a17833;
  --wait-text: #725116;
  --off: #ad6351;
  --none: #88848f;
  --stop: #9c443b;
  --stop-hover: #8c352d;
  --stop-ink: #ffffff;
  --pill: #f0eef4;
  --soft-icon: #6a6883;
  --info-bg: #e9e8f0;
  --warn-ink: #65470f;
  --warn-bg: #faebd3;
  --block-ink: #7b332c;
  --block-bg: #fde7e4;
  --focus: #346aac;
  --cta: #59567b;
  --cta-hover: #4b486c;
  --shadow: 0 1px 2px rgba(46, 41, 69, 0.04);
  --shadow-pop: 0 18px 40px -12px rgba(46, 41, 69, 0.28);
  --backdrop: rgba(21, 20, 24, 0.42);
  --radius-card: 0.875rem;
  --radius-inner: 0.625rem;
  --radius-control: 0.5rem;
  --tap: 2.75rem;
  --gutter: clamp(1rem, 1.6vw, 1.5rem);
  --gap: clamp(0.875rem, 1.3vw, 1.125rem);
  --font: "Avenir Next", Avenir, "Segoe UI Variable Text", "Segoe UI", "Noto Sans", Ubuntu, Cantarell, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151418;
    --surface: #1c1b1f;
    --surface-2: #232227;
    --surface-3: #2c2a2f;
    --line: #2e2d32;
    --line-strong: #727078;
    --track: #333237;
    --ink: #eceaef;
    --ink-body: #d5d3d9;
    --ink-2: #a9a6af;
    --navy: #767191;
    --navy-hover: #6f6a8a;
    --navy-ink: #ffffff;
    --teal: #8481a9;
    --teal-strong: #726f96;
    --teal-muted: #706e89;
    --teal-text: #bbb9df;
    --teal-soft: #282831;
    --teal-soft-line: #3a3947;
    --teal-icon: #32313f;
    --teal-tint: #202026;
    --amber: #91bbb7;
    --amber-strong: #507e7a;
    --amber-muted: #5a7876;
    --amber-tint: #1b2221;
    --amber-line: #212e2d;
    --ok: #63a283;
    --wait: #b48a46;
    --wait-text: #e6c593;
    --off: #c17562;
    --none: #7b7981;
    --stop: #cf7a6f;
    --stop-hover: #e7958a;
    --stop-ink: #161519;
    --pill: #27252a;
    --soft-icon: #706e89;
    --info-bg: #2b2a32;
    --warn-ink: #e7c99a;
    --warn-bg: #342a1a;
    --block-ink: #f6b9b1;
    --block-bg: #362321;
    --focus: #82b4f5;
    --cta: #615e84;
    --cta-hover: #6d6990;
    --shadow: none;
    --shadow-pop: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    --backdrop: rgba(8, 8, 10, 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.mono {
  font-family: var(--mono);
  font-size: 0.875rem;
}

kbd {
  display: inline-block;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.0625rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--ink);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.5rem;
  max-width: 96rem;
  margin: 0 auto;
  padding: 1rem var(--gutter);
}

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

.brand-mark {
  width: 3rem;
  height: 3rem;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-name {
  color: var(--ink);
  font-size: 1.375rem;
  font-weight: 700;
}

.brand-sub {
  color: var(--ink);
  font-size: 1.0625rem;
}

.card {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  min-width: 0;
  padding: clamp(1.125rem, 1.8vw, 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.card-label {
  color: var(--ink-2);
  font-size: 1.0625rem;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.88);
  }
}

.progress-track {
  height: 0.375rem;
  margin-top: 0.625rem;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.9s linear;
}

.eyebrow {
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.settings-button:hover {
  background: var(--surface-2);
}

.settings-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
}

.settings-text {
  display: grid;
  line-height: 1.3;
}

.settings-name {
  font-weight: 600;
}

.settings-sub {
  color: var(--ink-2);
  font-size: 0.8125rem;
}

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

.side {
  display: grid;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--teal-soft-line);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.side[data-side="right"] {
  border-color: var(--amber-line);
}

.side-head {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 1.375rem 1.5rem;
  background: var(--teal-tint);
}

.side[data-side="right"] .side-head {
  background: var(--amber-tint);
}

.side-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.side-sub {
  color: var(--ink-2);
  font-size: 1rem;
}

.side-body {
  padding: 0 1.375rem 1.375rem;
  background: linear-gradient(to bottom, var(--teal-tint) 1.25rem, transparent 1.25rem);
}

.side[data-side="right"] .side-body {
  background: linear-gradient(to bottom, var(--amber-tint) 1.25rem, transparent 1.25rem);
}

.pulse {
  --pulse: var(--teal-muted);
  --pulse-on: var(--teal-strong);
  --badge-ink: var(--teal-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.125rem;
  min-height: 4.875rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-control);
  background: var(--pulse);
  color: #ffffff;
  font-size: 1.375rem;
  font-weight: 600;
  transition: background-color 0.08s linear, box-shadow 0.08s linear, transform 0.08s linear;
}

.side[data-side="right"] .pulse,
.ear[data-side="right"] .pulse {
  --pulse: var(--amber-muted);
  --pulse-on: var(--amber-strong);
  --badge-ink: var(--amber-strong);
}

.pulse-badge {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 50%;
  background: #ffffff;
  color: var(--badge-ink);
  font-size: 1.25rem;
  font-weight: 700;
  transition: box-shadow 0.08s linear;
}

.pulse.is-on {
  background: var(--pulse-on);
  box-shadow: 0 0 0 calc(2px + var(--level, 1) * 5px) color-mix(in srgb, var(--pulse-on) 28%, transparent);
  transform: scale(1.01);
}

.pulse.is-on.is-missed .pulse-badge {
  box-shadow: 0 0 0 3px var(--off);
}

:is(.side, .ear)[data-tone="off"] .pulse,
:is(.side, .ear)[data-tone="none"] .pulse,
:is(.side, .ear)[data-tone="wait"] .pulse {
  background: var(--surface-3);
  color: var(--ink-2);
}

:is(.side, .ear)[data-tone="off"] .pulse-badge,
:is(.side, .ear)[data-tone="none"] .pulse-badge,
:is(.side, .ear)[data-tone="wait"] .pulse-badge {
  background: var(--surface);
  color: var(--ink-2);
}

:is(.side, .ear)[data-tone="off"] .pulse.is-on,
:is(.side, .ear)[data-tone="none"] .pulse.is-on,
:is(.side, .ear)[data-tone="wait"] .pulse.is-on {
  background: var(--pulse-on);
  color: #ffffff;
}

.shared-fields {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.hero-field {
  gap: 0.25rem;
}

.hero-field .field-head label {
  color: var(--ink);
  font-size: 1.1875rem;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem;
  align-items: center;
  gap: 1.25rem;
}

.hero-row .range-ends {
  margin: 0;
  padding: 0;
  font-size: 1rem;
}

.pill {
  display: grid;
  place-items: center;
  min-height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.switch {
  position: relative;
  width: 4.25rem;
  height: 2.375rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.switch-knob {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(46, 41, 69, 0.3);
  transition: transform 0.15s ease;
}

.switch[aria-checked="true"] {
  background: var(--teal);
}

.switch[aria-checked="true"] .switch-knob {
  transform: translateX(1.875rem);
}

.switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hero-hint {
  margin-bottom: 0.25rem;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.more {
  border-top: 1px solid var(--line);
}

.more summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary:hover {
  color: var(--ink);
}

.summary-caret {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  margin-inline: 0.125rem 0.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.more[open] .summary-caret {
  transform: rotate(45deg);
}

.more-body {
  display: grid;
  gap: 1.375rem;
  padding: 0.5rem 0 0.5rem;
}

.start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  min-height: 4.625rem;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--navy);
  color: var(--navy-ink);
  font: inherit;
  font-size: 1.625rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.start:hover:not(:disabled) {
  background: var(--navy-hover);
}

.start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.start-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 50%;
  background: #ffffff;
  color: var(--navy);
}

.start-icon .icon {
  width: 1.375rem;
  height: 1.375rem;
}

.action {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  min-height: 5.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-text {
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.action-name {
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.action-sub {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.action-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 50%;
}

.action-soft {
  background: var(--teal-soft);
  border-color: var(--teal-soft-line);
}

.action-soft:hover:not(:disabled) {
  background: color-mix(in srgb, var(--teal-soft) 80%, var(--teal) 20%);
}

.action-soft .action-icon {
  background: var(--soft-icon);
  color: #ffffff;
}

.action-outline {
  background: var(--surface);
  border: 2px solid var(--line-strong);
}

.action-outline:hover:not(:disabled) {
  background: var(--surface-2);
}

.action-outline .action-icon {
  color: var(--navy);
}

.action-outline .action-icon .icon {
  width: 2rem;
  height: 2rem;
  stroke-width: 1.75;
}

.actions-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.75;
}

.info-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--navy);
}

.info-icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  min-height: var(--tap);
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.btn:hover:not(:disabled) {
  background: var(--surface-3);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--navy-ink);
}

.btn.primary:hover:not(:disabled) {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.btn.outline {
  background: var(--surface);
  border: 2px solid var(--line-strong);
}

.btn.outline:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}

.btn.quiet:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}

.btn.wide {
  width: 100%;
}

.btn.danger {
  background: var(--stop);
  border-color: var(--stop);
  color: var(--stop-ink);
}

.btn.danger:hover:not(:disabled) {
  background: var(--stop-hover);
  border-color: var(--stop-hover);
}

.btn.danger-outline {
  background: transparent;
  border: 2px solid var(--stop);
  color: var(--stop);
}

.btn.danger-outline:hover:not(:disabled) {
  background: var(--stop);
  border-color: var(--stop);
  color: var(--stop-ink);
}

.btn.step {
  width: var(--tap);
  flex: none;
  padding: 0;
  border-radius: 50%;
  border-color: transparent;
  font-size: 1.25rem;
  line-height: 1;
}

.icon-button {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--warn-ink);
  background: var(--warn-bg);
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
  white-space: nowrap;
}

.strip {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: var(--radius-inner);
  padding: 0.75rem 1rem;
}

.strip::first-letter,
.note::first-letter {
  text-transform: uppercase;
}

.note {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.code-input {
  width: 100%;
  min-height: var(--tap);
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.invite-row {
  display: flex;
  gap: 0.5rem;
}

.invite-input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.note:empty {
  display: none;
}

.sheet {
  width: min(40rem, calc(100vw - 2rem));
  max-height: min(52rem, calc(100vh - 2rem));
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink-body);
  box-shadow: var(--shadow-pop);
  overflow: auto;
}

.sheet[open] {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.sheet::backdrop {
  background: var(--backdrop);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sheet-title {
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
}

.sheet-note {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.sheet-foot {
  display: flex;
  justify-content: flex-end;
}

.fields {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.settings-tabs {
  display: grid;
  gap: 1.375rem;
}

.group {
  gap: 1.375rem;
}

.group-title {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
}

.group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: calc(var(--radius-control) + 0.25rem);
  background: var(--surface-2);
}

.tab {
  display: grid;
  gap: 0.125rem;
  justify-items: start;
  min-width: 0;
  min-height: var(--tap);
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.tab-name {
  font-weight: 600;
}

.tab-status {
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab[aria-current="page"] {
  background: var(--teal-soft);
  color: var(--teal-text);
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

.tab[aria-current="page"] .tab-status {
  color: var(--teal-text);
}

.tab:not([aria-current="page"]):hover {
  color: var(--ink);
  background: var(--surface-3);
}

.tab:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.tab-panel {
  display: grid;
  align-content: start;
  min-width: 0;
}

.tab-panel[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.field-head label {
  color: var(--ink);
  font-weight: 600;
}

.value {
  margin-left: auto;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.375rem;
  padding-inline: calc(var(--tap) + 0.75rem);
  font-size: 0.75rem;
  color: var(--ink-2);
}

.range {
  --fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: var(--tap);
  margin: 0;
  background: transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  touch-action: manipulation;
}

.range::-webkit-slider-runnable-track {
  height: 0.625rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--teal) var(--fill), var(--track) var(--fill));
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.875rem;
  height: 1.875rem;
  margin-top: -0.625rem;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: radial-gradient(circle, #ffffff 0 0.1875rem, var(--teal) 0.21875rem);
  box-shadow: 0 1px 4px rgba(46, 41, 69, 0.3);
}

.range::-moz-range-track {
  height: 0.625rem;
  border-radius: 999px;
  background: var(--track);
}

.range::-moz-range-progress {
  height: 0.625rem;
  border-radius: 999px;
  background: var(--teal);
}

.range::-moz-range-thumb {
  box-sizing: border-box;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: radial-gradient(circle, #ffffff 0 0.1875rem, var(--teal) 0.21875rem);
  box-shadow: 0 1px 4px rgba(46, 41, 69, 0.3);
}

.range:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.choice legend {
  float: none;
  padding: 0;
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.75rem, 1fr));
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: calc(var(--radius-control) + 0.25rem);
  background: var(--surface-2);
}

.segment {
  position: relative;
  display: flex;
  min-width: 0;
}

.segment input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segment > span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 0.75rem;
  border-radius: var(--radius-control);
  color: var(--ink-2);
  font-weight: 500;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segment input:checked + span {
  background: var(--teal-soft);
  color: var(--teal-text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--teal);
}

.segment input:not(:checked):not(:disabled):hover + span {
  color: var(--ink);
  background: var(--surface-3);
}

.segment input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.segment input:disabled {
  cursor: not-allowed;
}

.segment input:disabled + span {
  opacity: 0.45;
}

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

.keys {
  margin-top: -0.75rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  text-align: center;
}

a.tab,
a.brand,
a.btn,
a.cta,
a.start,
a.action {
  text-decoration: none;
}

.flash {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  background: var(--surface-2);
  color: var(--ink);
}

.flash[data-kind="alert"] {
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.button-form {
  display: contents;
}

a.brand {
  color: inherit;
}

.takeover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--gutter, 1rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
}

.takeover[hidden] {
  display: none;
}

.takeover-card {
  display: grid;
  gap: 1rem;
  max-width: 30rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.18);
}

.takeover-title {
  margin: 0;
  font-size: 1.25rem;
}

.takeover-text {
  margin: 0;
  color: var(--ink-2);
}
