/* Holdspace — calm countdown for facilitators */

/* Every colour is derived from one hue (--h), an accent strength (--c) and a tint
   strength (--t), so presets and the custom picker all produce a full, readable palette.
   Lightness is fixed per token to keep contrast. --wh is the hue of the final-minute colour. */
:root {
  --h: 185; --c: 0.085; --t: 1; --wh: 65;

  --bg: oklch(0.953 calc(0.007 * var(--t)) var(--h));
  --bg-deep: oklch(0.922 calc(0.012 * var(--t)) var(--h));
  --surface: oklch(0.982 calc(0.004 * var(--t)) var(--h));
  --line: oklch(0.86 calc(0.018 * var(--t)) var(--h));
  --ink: oklch(0.29 calc(0.04 * var(--t)) var(--h));
  --ink-2: oklch(0.41 calc(0.03 * var(--t)) var(--h));
  --muted: oklch(0.51 calc(0.025 * var(--t)) var(--h));
  --faint: oklch(0.68 calc(0.02 * var(--t)) var(--h));
  --accent: oklch(0.52 var(--c) var(--h));
  --accent-ink: oklch(0.98 0.01 var(--h));
  --track: oklch(0.895 calc(0.015 * var(--t)) var(--h));
  --warm: oklch(0.57 0.13 var(--wh));
  --swatch-l: 0.52;
  --flash: var(--accent);
  --shadow: 0 1px 2px rgba(21, 48, 45, .06), 0 8px 24px -12px rgba(21, 48, 45, .18);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.21 calc(0.02 * var(--t)) var(--h)); --bg-deep: oklch(0.18 calc(0.018 * var(--t)) var(--h));
    --surface: oklch(0.25 calc(0.025 * var(--t)) var(--h)); --line: oklch(0.34 calc(0.03 * var(--t)) var(--h));
    --ink: oklch(0.94 calc(0.012 * var(--t)) var(--h)); --ink-2: oklch(0.84 calc(0.02 * var(--t)) var(--h));
    --muted: oklch(0.69 calc(0.025 * var(--t)) var(--h)); --faint: oklch(0.53 calc(0.025 * var(--t)) var(--h));
    --accent: oklch(0.77 calc(var(--c) * 0.95) var(--h)); --accent-ink: oklch(0.2 0.03 var(--h));
    --track: oklch(0.29 calc(0.028 * var(--t)) var(--h)); --warm: oklch(0.77 0.12 var(--wh)); --swatch-l: 0.77;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.21 calc(0.02 * var(--t)) var(--h)); --bg-deep: oklch(0.18 calc(0.018 * var(--t)) var(--h));
  --surface: oklch(0.25 calc(0.025 * var(--t)) var(--h)); --line: oklch(0.34 calc(0.03 * var(--t)) var(--h));
  --ink: oklch(0.94 calc(0.012 * var(--t)) var(--h)); --ink-2: oklch(0.84 calc(0.02 * var(--t)) var(--h));
  --muted: oklch(0.69 calc(0.025 * var(--t)) var(--h)); --faint: oklch(0.53 calc(0.025 * var(--t)) var(--h));
  --accent: oklch(0.77 calc(var(--c) * 0.95) var(--h)); --accent-ink: oklch(0.2 0.03 var(--h));
  --track: oklch(0.29 calc(0.028 * var(--t)) var(--h)); --warm: oklch(0.77 0.12 var(--wh)); --swatch-l: 0.77;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(120% 80% at 50% 0%, var(--surface) 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--ink-2);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }

/* ---------- shared controls ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.bar-actions { display: flex; gap: 8px; align-items: center; }

.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-variation-settings: 'SOFT' 100;
  font-size: 22px; font-weight: 450; color: var(--ink); letter-spacing: -.01em;
}
.wordmark svg { width: 30px; height: 30px; color: var(--ink); flex-shrink: 0; }

.icon-btn, .pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; border: 1px solid var(--line); background: transparent;
  color: var(--muted); border-radius: 999px; transition: border-color .2s, color .2s, background-color .2s;
}
.icon-btn { width: 40px; padding: 0; }
.pill { padding: 0 16px; font-size: 14px; white-space: nowrap; text-decoration: none; }
.icon-btn svg, .pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover, .pill:hover { border-color: var(--accent); color: var(--ink); }
.pill-dashed { border-style: dashed; }

.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink); outline: none; transition: border-color .2s;
}
.input:focus { border-color: var(--accent); }
.input:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.input-big { font-size: 26px; font-family: var(--serif); font-variation-settings: 'SOFT' 100; padding: 8px 14px; font-variant-numeric: tabular-nums; }
.input-sm { min-height: 40px; font-size: 14px; }
select.input { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C716C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
input[type="time"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
:root[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.faint { color: var(--faint); font-weight: 400; margin-left: 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; margin: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg-control {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px;
  background: var(--bg-deep); border-radius: 999px;
}
.seg-control button {
  border: 0; background: transparent; border-radius: 999px; min-height: 40px; padding: 0 10px;
  color: var(--muted); font-size: 15px; transition: background-color .2s, color .2s;
}
.seg-control button[aria-selected="true"], .seg-control button.on {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 500;
}
.seg-small button { font-size: 14px; min-height: 36px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 2px; min-height: 36px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2);
  font-size: 14px; padding: 0 14px; transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip-pair { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.chip-pair .chip { border: 0; background: transparent; padding-right: 6px; }
.chip-pair .chip-x { border: 0; background: transparent; color: var(--faint); width: 30px; height: 34px; border-radius: 999px; font-size: 16px; line-height: 1; }
.chip-pair .chip-x:hover { color: var(--ink); }

.primary {
  min-height: 54px; border: 0; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink);
  font-size: 17px; font-weight: 600; letter-spacing: .01em;
  box-shadow: var(--shadow); transition: filter .2s, transform .1s;
}
.primary:hover { filter: brightness(1.07); }
.primary:active { transform: translateY(1px); }

/* ---------- setup ---------- */
.setup { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.setup-card {
  width: min(480px, calc(100% - 32px)); margin: clamp(24px, 6vh, 64px) auto 64px;
  display: flex; flex-direction: column; gap: 22px;
}
.setup-title {
  margin: 0 0 4px; font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 96;
  font-weight: 350; font-size: clamp(40px, 8vw, 56px); line-height: 1.02; letter-spacing: -.025em; color: var(--ink);
}
.mode-panel { display: flex; flex-direction: column; gap: 14px; }
.zone-preview { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.zone-preview b { font-weight: 500; color: var(--ink-2); }
.zone-preview .you { color: var(--accent); }

.seg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: seg; }
.seg-row { display: grid; grid-template-columns: 22px 1fr 76px auto; gap: 8px; align-items: center; counter-increment: seg; }
.seg-row::before { content: counter(seg); font-size: 13px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.seg-row .input { min-height: 44px; }
.seg-row .mins { text-align: center; padding: 10px 6px; }
.seg-tools { display: flex; }
.seg-tools button { width: 32px; height: 44px; border: 0; background: transparent; color: var(--faint); border-radius: var(--r-sm); }
.seg-tools button:hover:not(:disabled) { color: var(--ink); background: var(--bg-deep); }
.seg-tools button:disabled { opacity: .3; cursor: default; }
.seg-tools svg { width: 16px; height: 16px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 30px; font-size: 14px; }
.templates { display: flex; flex-direction: column; gap: 10px; padding-left: 30px; }
.save-template { display: flex; gap: 8px; }
.recent { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- timer ---------- */
.timer { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(16px, 3vh, 32px); padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }

.dial {
  --size: min(84vw, 66vh, 680px);
  width: var(--size); height: var(--size); position: relative;
  container-type: size;
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring .track { stroke: var(--track); }
.ring .fill { stroke: var(--accent); transition: stroke .8s; }
.ring .past { stroke: var(--track); opacity: .45; }
.final .ring .fill.current { stroke: var(--warm); }
.done .ring .track { stroke: color-mix(in srgb, var(--accent) 30%, var(--track)); }

.dial-face {
  position: absolute; inset: 12%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 2cqh;
}
.dial-label {
  font-size: clamp(14px, 4.4cqw, 26px); color: var(--muted); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .01em;
}
.digits {
  font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 144; font-weight: 320;
  font-size: 23cqw; line-height: .95; letter-spacing: -.03em; color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums; transition: color .8s; white-space: nowrap;
}
.digits.long { font-size: 17cqw; }
.digits .colon { color: var(--faint); margin: 0 .02em; position: relative; top: -.06em; }
.paused .digits { animation: breathe 2.4s ease-in-out infinite; }
.final .digits { color: var(--warm); }
.done-msg {
  font-family: var(--serif); font-style: italic; font-variation-settings: 'SOFT' 100, 'opsz' 144; font-weight: 340;
  font-size: 11cqw; line-height: 1.05; color: var(--ink); letter-spacing: -.02em;
  animation: settle 1.2s cubic-bezier(.2,.7,.2,1) both;
}
.dial-sub { font-size: clamp(13px, 3.6cqw, 22px); color: var(--muted); font-variant-numeric: tabular-nums; }
.done .dial-sub { color: var(--accent); }

.below { display: flex; flex-direction: column; align-items: center; gap: 16px; width: min(640px, 100%); }
.next-line { margin: 0; font-size: 17px; color: var(--ink-2); text-align: center; }
.next-line:empty { display: none; }
.zones { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zones li { white-space: nowrap; }
.zones b { font-weight: 500; color: var(--ink-2); }
.zones .you b, .zones .you { color: var(--accent); }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ctrl {
  min-height: 46px; min-width: 88px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 15px;
  transition: border-color .2s, color .2s;
}
.ctrl:hover { border-color: var(--accent); color: var(--ink); }
.ctrl-main { min-width: 120px; background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }
.ctrl-main:hover { color: var(--bg); filter: brightness(1.15); }

.chrome { transition: opacity .6s ease; }
.idle .chrome { opacity: 0; pointer-events: none; }
.idle { cursor: none; }
.embed .chrome { display: none !important; }
.embed .sound-hint, .embed .zones { display: none !important; }

.sound-hint {
  position: fixed; left: 50%; top: max(72px, calc(env(safe-area-inset-top) + 64px)); transform: translateX(-50%); z-index: 20;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 10px 18px; font-size: 14px; box-shadow: var(--shadow); white-space: nowrap;
}

.flash { position: fixed; inset: 0; background: var(--flash); opacity: 0; pointer-events: none; z-index: 50; }
.flash.go { animation: flash 1.8s ease-out; }

/* ---------- dialogs ---------- */
.sheet {
  width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 48px); padding: 0;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.35);
}
.sheet::backdrop { background: color-mix(in srgb, var(--bg-deep) 70%, transparent); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheetIn .35s cubic-bezier(.2,.7,.2,1); }
.sheet-inner { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-variation-settings: 'SOFT' 100; font-weight: 400; font-size: 28px; color: var(--ink); letter-spacing: -.015em; }
.set-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.set-group legend { padding: 0; margin-bottom: 12px; font-weight: 600; color: var(--ink); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.vol-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.vol-row input { accent-color: var(--accent); width: 100%; }
.add-zone { display: flex; gap: 8px; }

.prose { gap: 10px; line-height: 1.65; }
.prose h3 { margin: 14px 0 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.prose p, .prose ul { margin: 0; max-width: 62ch; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-size: 14px; background: var(--bg-deep); padding: 2px 6px; border-radius: 5px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; align-items: center; }
.keys dd { margin: 0; }
.help-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.help-links a { color: var(--muted); }
kbd { display: inline-block; min-width: 28px; text-align: center; font: 500 13px var(--sans); padding: 3px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); color: var(--ink); }

.toast {
  position: fixed; left: 50%; top: 20px; transform: translate(-50%, -20px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px;
  pointer-events: none; transition: opacity .3s, transform .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- colour swatches ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  position: relative; width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid transparent; background: transparent; display: grid; place-items: center;
  transition: border-color .2s, transform .15s;
}
.swatch::before {
  content: ''; width: 28px; height: 28px; border-radius: 50%;
  background: oklch(var(--swatch-l) var(--sc, 0.09) var(--sh, 185));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.swatch:hover { transform: scale(1.06); }
.swatch[aria-checked="true"] { border-color: var(--ink); }
.swatch-custom::before { background: conic-gradient(from 0deg, oklch(.7 .12 0), oklch(.7 .12 60), oklch(.7 .12 120), oklch(.7 .12 180), oklch(.7 .12 240), oklch(.7 .12 300), oklch(.7 .12 360)); }
.swatch-custom.has-color::before { background: oklch(var(--swatch-l) var(--sc) var(--sh)); }
.swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.swatch-custom:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch-custom .plus { position: absolute; color: #fff; font-size: 16px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.4); pointer-events: none; }
.swatch-custom.has-color .plus { display: none; }
.palette-name { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- segment details, more options, rounds ---------- */
.seg-row .seg-tools button.has-more { color: var(--accent); }
.seg-row.is-break .input:first-of-type { border-style: dashed; }
.seg-details {
  grid-column: 2 / -1; display: flex; flex-direction: column; gap: 12px;
  padding: 14px; margin: 2px 0 8px; border-radius: var(--r-sm); background: var(--bg-deep);
}
.seg-details .check { font-size: 14px; }
textarea.input { resize: vertical; min-height: 0; line-height: 1.45; font-family: var(--sans); }
#peopleInput { min-height: 132px; }
.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more summary { cursor: pointer; list-style: none; padding: 14px 0; font-size: 14px; font-weight: 500; color: var(--ink-2); display: flex; justify-content: space-between; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '+'; font-size: 18px; line-height: 1; color: var(--accent); transition: transform .2s; }
.more[open] summary::after { transform: rotate(45deg); }
.more-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.round-opts { align-items: end; }
.round-shuffle { min-height: 46px; align-items: center; }
.round-shuffle input { margin-top: 0; }

/* ---------- break screen and rounds on the timer ---------- */
.group-msg {
  margin: 0; max-width: 32ch; text-align: center; text-wrap: balance; font-family: var(--serif); font-style: italic;
  font-variation-settings: 'SOFT' 100; font-weight: 340; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.35; color: var(--ink);
}
.group-msg:empty { display: none; }
.breath {
  position: absolute; inset: 14%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent) 0%, color-mix(in srgb, var(--accent) 8%, transparent) 55%, transparent 72%);
  transform: scale(.72); transition: opacity 1.2s ease;
}
.breathing .breath { opacity: 1; animation: breath 10s ease-in-out infinite; }
.breathing .dial-sub { color: var(--accent); font-size: clamp(15px, 4.4cqw, 26px); }
.on-break .ring .fill.current { opacity: .75; }
.rounds .dial-label { font-family: var(--serif); font-variation-settings: 'SOFT' 100; font-size: clamp(22px, 7.5cqw, 46px); color: var(--ink); letter-spacing: -.01em; }
.made-with { margin-top: 4px; font-size: 13px; color: var(--faint); text-decoration: none; }
.made-with b { font-weight: 600; color: var(--muted); }
.made-with:hover, .made-with:hover b { color: var(--accent); }

/* ---------- facilitator view ---------- */
.presenter { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.p-hint { margin: 0; font-size: 14px; color: var(--muted); }
.p-empty { margin: auto; text-align: center; padding: 24px; }
.p-empty h1, .p-title { font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 96; font-weight: 380; color: var(--ink); letter-spacing: -.02em; }
.p-empty h1 { font-size: 40px; margin: 0 0 8px; }
.p-body { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 56px); padding: 24px clamp(16px, 4vw, 48px) 40px; width: min(1200px, 100%); margin: 0 auto; }
.p-now { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.p-pos { margin: 0; font-size: 15px; color: var(--muted); }
.p-pos:empty { display: none; }
.p-title { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }
.p-digits { font-family: var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 144; font-weight: 320; font-size: clamp(72px, 11vw, 140px); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.03em; transition: color .8s; }
.p-body.final .p-digits { color: var(--warm); }
.p-body.paused .p-digits { animation: breathe 2.4s ease-in-out infinite; }
.p-ends { margin: 0; color: var(--ink-2); }
.p-drift { margin: 0 0 6px; padding: 8px 14px; border-radius: 999px; background: var(--bg-deep); font-size: 15px; color: var(--ink-2); }
.p-drift.behind { color: var(--warm); background: color-mix(in srgb, var(--warm) 12%, var(--bg-deep)); }
.p-now .controls { justify-content: flex-start; }
.p-notes { margin-top: 14px; width: 100%; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.p-notes h2, .p-order h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.p-notes p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.p-notes p.empty { font-size: 15px; color: var(--faint); }
.p-group { margin: 4px 0 0; font-size: 15px; color: var(--muted); font-style: italic; }
.p-group:empty { display: none; }
.p-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.p-list li { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: baseline; padding: 12px 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.p-list .p-time { color: var(--muted); font-size: 14px; }
.p-list .p-name { color: var(--ink); }
.p-list .p-mins { color: var(--muted); font-size: 14px; }
.p-list li.past { opacity: .45; }
.p-list li.past .p-name { text-decoration: line-through; text-decoration-color: var(--faint); }
.p-list li.now { background: var(--bg-deep); border-radius: var(--r-sm); border-bottom-color: transparent; }
.p-list li.now .p-name { font-weight: 600; }
.p-tag { margin-left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); vertical-align: 1px; }

.back-link { padding-right: 16px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.back-link::before { content: '← '; }
.back-link:hover { color: var(--ink); }
#setup .bar .wordmark { margin-right: auto; }
a.made-with:not([href]) { cursor: default; }

/* ---------- plan and unlock ---------- */
.plan-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: -6px; padding: 10px 10px 10px 16px; border-radius: var(--r-md);
  background: var(--bg-deep); font-size: 14px; color: var(--ink-2);
}
.plan-note .pill { min-height: 34px; background: var(--surface); }
.seg-control button.locked { color: var(--faint); }
.seg-control .lock { display: inline-block; vertical-align: -2px; margin-left: 6px; }
.seg-control .lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.swatches.locked .swatch:not(:first-child) { opacity: .45; }
.license-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.unlock-reason { margin: -8px 0 0; color: var(--ink); font-weight: 500; }
.unlock-buy { display: flex; flex-direction: column; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.unlock-price { margin: 0; font-size: 16px; color: var(--muted); }
.unlock-price span { font-family: var(--serif); font-variation-settings: 'SOFT' 100; font-size: 40px; color: var(--ink); margin-right: 6px; letter-spacing: -.02em; }
.unlock-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.unlock-cta { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.unlock-form { display: flex; flex-direction: column; gap: 12px; }
.unlock-form .input { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.pill-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); align-self: flex-start; padding: 0 22px; }
.pill-solid:hover { color: var(--bg); filter: brightness(1.15); }
.pill-solid:disabled { opacity: .6; cursor: progress; }
.unlock-msg { margin: 0; font-size: 14px; color: var(--warm); }
.unlock-msg:empty { display: none; }
.unlock-owned { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.unlock-owned p { margin: 0; }

/* ---------- motion ---------- */
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes flash { 0% { opacity: .38; } 100% { opacity: 0; } }
@keyframes settle { from { opacity: 0; transform: scale(.96); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes breath { 0%, 100% { transform: scale(.72); } 40% { transform: scale(1.04); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

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

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .row-2 { grid-template-columns: 1fr; }
  .pill { padding: 0 12px; }
  #shareBtn { font-size: 0; gap: 0; width: 40px; padding: 0; }
  #shareBtn svg { width: 18px; height: 18px; }
  .seg-row { grid-template-columns: 1fr 64px auto; }
  .seg-row::before { display: none; }
  .seg-foot, .templates { padding-left: 0; }
  .ctrl { min-width: 72px; padding: 0 14px; }
  .dial { --size: min(90vw, 60vh); }
  .seg-details { grid-column: 1 / -1; }
  .round-opts { grid-template-columns: 1fr; }
  #presenterBtn { font-size: 0; gap: 0; width: 40px; padding: 0; }
  .seg-control button { font-size: 14px; padding: 0 4px; }
}
@media (max-width: 760px) {
  .p-body { grid-template-columns: 1fr; }
}
