/* ZoneKeeper — dark first (trading screens), light when the system asks for it.
   Look follows 09-design-reference: one dark page color, glow-edge boxes, Poppins light headings, pill buttons.
   Green / orange / red are used ONLY for the five-state scale meaning. */
:root {
  --bg: #0b1016;
  --box: #10171f;
  --tile: #10151a;
  --tile-line: #161b20;
  --text: #e5e7ee;
  --head: #ffffff;
  --muted: #a3acb8;
  --accent: #70c3e9;
  --sub: #59b1d6;
  --num: #5084e0;
  --glow: #99c2fe;
  --edge: 0 0 4px #99c2fe;
  --float: 0 0 25px -1px #3d444e;
  --faq-line: rgba(153, 194, 254, 0.38);
  --ghost-line: rgba(153, 194, 254, 0.5);
  --green: #3fae6a;
  --orange: #e8913a;
  --red: #e05a4f;
  --on-band: #0b1016;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fa;
    --box: #ffffff;
    --tile: #ffffff;
    --tile-line: #dde3ea;
    --text: #1f2933;
    --head: #0b1016;
    --muted: #56636d;
    --accent: #1d6f98;
    --sub: #23709a;
    --num: #3563b8;
    --glow: #3563b8;
    --edge: 0 1px 4px rgba(16, 23, 31, 0.12), 0 0 0 1px #dde3ea;
    --float: 0 4px 24px -4px rgba(16, 23, 31, 0.2);
    --faq-line: rgba(53, 99, 184, 0.35);
    --ghost-line: rgba(53, 99, 184, 0.55);
    --green: #23834a;
    --orange: #b96410;
    --red: #c23a2f;
    --on-band: #ffffff;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.85 var(--font-body);
}

body.locked { overflow: hidden; }

.container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 720px) {
  .container { padding-left: 24px; padding-right: 24px; }
}

a { color: var(--accent); }
button { font: inherit; cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 2px;
}

h3 { font: 500 18px/1.4 var(--font-body); color: var(--sub); margin: 20px 0 6px; }

.accent { color: var(--accent); }
.sub { color: var(--sub); font-weight: 500; }
.muted { color: var(--muted); }
.center { text-align: center; }
.soon { color: var(--muted); font-style: italic; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 24px;
  padding-top: 20px;
  padding-bottom: 12px;
}
@media (min-width: 900px) {
  .site-header { justify-content: space-between; padding-top: 28px; }
}
.brand {
  font: 300 24px/1.3 var(--font-head);
  letter-spacing: 2px;
  color: var(--head);
  text-decoration: none;
}
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 18px;
}
.links a {
  padding: 6px 0;
  line-height: 1.5;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.links a:hover { color: var(--glow); }

/* ---------- Section rhythm: space, not colored bands ---------- */
main > section { margin-bottom: 64px; }
@media (min-width: 860px) {
  main > section { margin-bottom: 96px; }
}

.section-title {
  font: 300 clamp(28px, 4vw, 44px)/1.25 var(--font-body);
  color: var(--head);
  text-align: center;
  margin: 0 0 16px;
}
.lead { max-width: 65ch; margin: 0 auto 40px; text-align: center; }

.card-title {
  font: 300 22px/1.35 var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--head);
  margin: 0 0 12px;
}

/* ---------- Hero: text and video, then the breathing timer ---------- */
.hero {
  --hero-violet: #baa7ff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding-top: 24px;
}
@media (min-width: 860px) {
  .hero { padding-top: 56px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.hero-text { min-width: 0; }
.hero-video { width: 100%; max-width: 680px; min-width: 0; margin: 0; justify-self: center; align-self: center; }
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--ghost-line); border-radius: 16px; background: #000; box-shadow: var(--float); }
.hero-video figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.hero-video figcaption strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 16px; font-weight: 600; }
.hero-video figcaption small { display: block; margin-top: 8px; font-size: 12px; }
@media (prefers-color-scheme: light) {
  .hero {
    --hero-violet: #6346a2;
  }
}
.hero h1 {
  font: 300 clamp(36px, 6vw, 60px)/1.05 var(--font-head);
  color: var(--head);
  margin: 0 0 20px;
}
.hero h1.hero-statement {
  font: 700 clamp(30px, 3.8vw, 48px)/1.12 var(--font-body);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-sentence { display: block; }
.hero-sentence + .hero-sentence { margin-top: 6px; }
.hero-statement .hero-sentence:nth-child(2) { color: var(--accent); }
.hero-statement .hero-sentence:nth-child(3) { color: var(--hero-violet); }
.hero-invite {
  max-width: 65ch;
  margin: -10px 0 28px;
  font-weight: 600;
  color: var(--text);
}
.hero-sub {
  font: 300 16px/1.6 var(--font-head);
  color: var(--text);
  letter-spacing: 1px;
  max-width: 65ch;
  margin: 0 0 28px;
}
@media (min-width: 720px) {
  .hero-sub { font-size: 20px; letter-spacing: 1.5px; }
}
.hero-text .muted { margin: 14px 0 0; }
.nowrap { white-space: nowrap; }

/* Roman's intro. On a phone or a short screen it shows 2 lines and a "more" link,
   so the Reset button stays visible without scrolling. */
.intro { max-width: 60ch; margin: -8px 0 24px; font-size: 15px; line-height: 1.7; }
.intro p { margin: 0 0 8px; }
.more-link { display: none; }
@media (min-width: 860px) and (max-height: 859px) {
  .hero { align-items: start; padding-top: 32px; }
}
@media (max-width: 719px), (max-height: 859px) {
  .intro:not(.open) { max-height: 3.4em; overflow: hidden; margin-bottom: 0; }
  .more-link {
    display: block;
    width: fit-content;
    margin: 0 0 8px;
    padding: 2px 0;
    line-height: 1.5;
    border: 0;
    background: none;
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
  }
}
.hero-visual { grid-column: 1 / -1; width: 100%; margin: 0 auto; text-align: center; }
.hero-visual p { margin: 2px 0; }
.hero-visual .breath { width: min(52vw, 240px); max-width: 100%; margin: 16px auto 12px; }
.hero-visual .controls { max-width: 320px; margin: 12px auto; }
@media (max-width: 859px) {
  .hero-visual .controls { position: sticky; bottom: 12px; z-index: 1; padding: 8px; border: 1px solid var(--ghost-line); border-radius: 18px; background: var(--bg); }
}
.breathing-patterns { display: grid; gap: 20px; margin: 24px 0 20px; }
@media (min-width: 860px) {
  .breathing-patterns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.breathing-pattern {
  min-width: 0;
  padding: 20px 16px;
  border: 1px solid var(--ghost-line);
  border-radius: 16px;
  background: var(--box);
}
.breathing-pattern.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pattern-choice { display: grid; grid-template-columns: 20px 1fr; column-gap: 10px; align-items: center; max-width: 240px; margin: 0 auto 10px; text-align: left; cursor: pointer; }
.pattern-choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.pattern-choice strong { font-size: 17px; line-height: 1.5; }
.pattern-selected { grid-column: 2; visibility: hidden; color: var(--accent); font-size: 12px; font-weight: 600; line-height: 1.5; }
.breathing-pattern.on .pattern-selected { visibility: visible; }
.pattern-timing { font-size: 16px; font-weight: 600; }
.pattern-duration, .pattern-note { font-size: 14px; line-height: 1.6; }
.hero-visual p.pattern-use { margin: 14px 0 0; font-size: 14px; line-height: 1.6; text-align: left; }
.pattern-use strong, .pattern-use span { display: block; }
.pattern-use span { margin-top: 4px; }
@media (min-width: 860px) { .pattern-use { min-height: 120px; } }
.breathing-comfort { max-width: 65ch; margin: 16px auto 0 !important; font-size: 14px; line-height: 1.6; }

/* ---------- Pill buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  font: 500 16px/1.2 var(--font-body);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pill:hover { transform: scale(1.03); }
/* Main button: our blue with dark text (contrast about 9.7:1) */
.pill-main {
  background: #70c3e9;
  color: #0b1016;
  box-shadow: 0 0 10px rgba(112, 195, 233, 0.5);
}
.pill-main:hover { box-shadow: 0 0 18px rgba(112, 195, 233, 0.65); }
.hero .pill-main {
  min-height: 64px;
  padding: 18px 64px;
  font-size: 22px;
  letter-spacing: 1px;
}
.pill-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ghost-line);
  box-shadow: 0 0 10px rgba(153, 194, 254, 0.12);
}
.pill-small { padding: 10px 22px; font-size: 15px; margin-top: 8px; }

.controls { display: flex; gap: 10px; margin: 16px 0; }
.controls .pill { flex: 1; min-height: 52px; padding: 15px 12px; }

/* ---------- Audio players (A and C) ---------- */
.player { margin: 8px 0 14px; }
.player p { margin: 4px 0; }
.player-title { font-weight: 500; }
.player audio { display: block; width: 100%; margin: 8px 0 6px; }
.dl { font-size: 15px; }

/* ---------- Five states: descriptions are visible before selection ---------- */
.float-card {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 15px;
  box-shadow: var(--float);
}
@media (min-width: 720px) {
  .float-card { padding: 40px; }
}

/* The original audio/history bands: green 0–3, orange 4–6, red 7+. */
.g { --band: var(--green); }
.o { --band: var(--orange); }
.r { --band: var(--red); }

.scale { margin-top: 24px; }
.scale-ruler {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  isolation: isolate;
}
.scale-ruler::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17px;
  left: 10%;
  right: 10%;
  height: 14px;
  border-radius: 20px;
  background: linear-gradient(90deg, var(--green), #8fb850 25%, var(--orange) 50%, #e57643 75%, var(--red));
}
.ruler-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}
.ruler-option input {
  position: absolute;
  top: 0;
  width: 48px;
  height: 48px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.ruler-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--band);
  border-radius: 50%;
  background: var(--box);
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  transition: background .15s, box-shadow .15s;
}
.ruler-option:hover .ruler-number { background: color-mix(in srgb, var(--band) 15%, var(--box)); }
.ruler-option:has(input:checked) .ruler-number {
  background: var(--band);
  color: var(--on-band);
  box-shadow: 0 0 0 3px var(--box), 0 0 0 5px var(--band);
}
.ruler-option:has(input:focus-visible) .ruler-number { outline: 3px solid var(--glow); outline-offset: 7px; }
.ruler-selected { visibility: hidden; font-size: 12px; font-weight: 600; line-height: 1.5; }
.ruler-option:has(input:checked) .ruler-selected { visibility: visible; }
.state-descriptions { display: grid; gap: 16px; margin-top: 14px; }
.state-description {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 10px;
  border-top: 2px solid var(--band);
  line-height: 1.5;
}
.state-description.on { background: color-mix(in srgb, var(--band) 9%, transparent); }
@media (min-width: 720px) {
  .state-descriptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .state-descriptions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
}
.state-name { font-size: 16px; line-height: 1.35; }
.state-feel { display: block; flex: 1; font-size: 14px; }
.state-action {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.state-audio { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.state-intro { margin: 0; max-width: 65ch; line-height: 1.6; }
.audio-guide { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 719px) {
  .float-card { padding: 24px 16px; }
  .state-descriptions { gap: 4px; }
  .state-description { padding: 12px 8px; }
}

.rule {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 5px solid var(--band);
  border-radius: 6px;
  background: color-mix(in srgb, var(--band) 10%, transparent);
}
.rule p { margin: 2px 0; }

/* "Feels like": normal weight, a bit dimmer than the "Do this" lines */
.feel {
  font-weight: 400;
  color: color-mix(in srgb, var(--text) 85%, transparent);
}
.rule .feel, .scale-table .feel { margin-top: 8px; }
.feel span { display: block; }
.feel .feel-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Framed boxes ---------- */
.box {
  background: var(--box);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--edge);
}
@media (min-width: 720px) {
  .box { padding: 32px; }
}
.box p { max-width: 65ch; }
.box ol, .box ul { padding-left: 1.3em; }
.box li { margin: 4px 0; }
.box > .sub { margin-top: -6px; }

.box-grid { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 960px) {
  .box-grid { grid-template-columns: repeat(3, 1fr); }
}
.box-wide { margin-top: 24px; }
.scale-grid { display: grid; gap: 24px; }
@media (min-width: 860px) {
  .scale-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.checks label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 0;
  min-height: 44px;
  cursor: pointer;
}
.checks input { width: 22px; height: 22px; margin: 4px 0 0; flex: none; accent-color: #70c3e9; }

.scale-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; }
.scale-table th { color: var(--sub); font-weight: 500; }
.scale-table th, .scale-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--tile-line); vertical-align: top; }
.scale-table tbody th { border-left: 5px solid var(--band); font-weight: 700; color: var(--text); }
@media (max-width: 719px) {
  .scale-table { font-size: 14px; }
}

/* ---------- Theta section: fast layer / deep layer table ---------- */
.theta .box ul { margin: 0; }
.layers { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; margin-top: 16px; }
.layers th { color: var(--sub); font-weight: 500; }
.layers th, .layers td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--tile-line); vertical-align: top; }
.layers td:first-child { color: var(--head); font-weight: 700; white-space: nowrap; }

/* ---------- The 7 steps as numbered cards ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  background: var(--tile);
  border: 1px solid var(--tile-line);
  border-radius: 15px;
  padding: 28px 24px;
}
.step-num { display: block; font: 300 25px/1 var(--font-head); color: var(--num); margin-bottom: 12px; }
.step-title {
  font: 300 24px/1.3 var(--font-head);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--head);
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--num);
}
.step-time { color: var(--sub); font-weight: 500; margin: 10px 0 4px; }
.step p { margin: 6px 0; }
.step-say { color: var(--head); font-style: italic; }

/* ---------- Start here + FAQ + footer ---------- */
.start-here { max-width: 960px; margin: 0 auto; text-align: center; }
.start-here .section-title { font-size: clamp(24px, 3.4vw, 36px); }
.start-here p { margin: 0 auto 24px; }

.faq.container { max-width: 860px; }
.faq details { border: 1px solid var(--faq-line); margin-bottom: 10px; }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  font: 700 16px/1.4 var(--font-body);
  color: var(--head);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 18px 18px; max-width: 65ch; }

.site-footer {
  padding-top: 32px;
  padding-bottom: 40px;
  border-top: 1px solid var(--tile-line);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 4px 0; }
.foot-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin: 4px 0 16px; }
.foot-links a { padding: 6px 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none; }
.foot-links a:hover { color: var(--glow); }

/* ---------- Breathing circle: grows on "In", shrinks on "Out" (JS sets the scale) ---------- */
.breath {
  position: relative;
  display: grid;
  place-items: center;
  width: min(56vw, 240px);
  aspect-ratio: 1;
  margin: 16px auto 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--head);
}
.breath::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(80, 132, 224, 0.35);
}
.breath .ball {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid #99c2fe;
  background: radial-gradient(circle at 50% 45%, rgba(112, 195, 233, 0.32), rgba(80, 132, 224, 0.1) 70%);
  box-shadow: 0 0 30px rgba(112, 195, 233, 0.45), inset 0 0 24px rgba(153, 194, 254, 0.25);
  transform: scale(0.45);
}
@media (prefers-color-scheme: light) {
  .breath .ball {
    border-color: #3563b8;
    background: radial-gradient(circle at 50% 45%, rgba(53, 99, 184, 0.2), rgba(53, 99, 184, 0.06) 70%);
    box-shadow: 0 0 18px rgba(53, 99, 184, 0.25);
  }
}
.breath-text { position: relative; display: flex; flex-direction: column; align-items: center; }
.b-word { font: 300 30px/1.2 var(--font-head); letter-spacing: 2px; }
.b-count { font: 300 24px/1.3 var(--font-head); min-height: 1.3em; }

/* ---------- Guided reset screen ---------- */
.run {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  background: var(--bg);
}
.run-inner { max-width: 680px; margin: 0 auto; padding: 16px; }
.run.rating .run-inner { max-width: 1140px; }
.run.rating .controls {
  position: sticky;
  bottom: 12px;
  padding: 10px;
  border: 1px solid var(--ghost-line);
  border-radius: 16px;
  background: var(--bg);
  z-index: 1;
}
.run-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; }
.bar { height: 6px; margin: 8px 0 16px; border-radius: 3px; background: var(--tile-line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5084e0, #70c3e9); }
.step-name {
  font: 300 clamp(30px, 6vw, 44px)/1.2 var(--font-head);
  letter-spacing: 4px;
  text-align: center;
  color: var(--head);
  margin: 8px 0 4px;
}
.step-do { font-size: 19px; line-height: 1.6; text-align: center; margin: 8px 0; }
.step-sec { font-size: 17px; color: var(--sub); text-align: center; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.say {
  font: 300 clamp(22px, 4vw, 30px)/1.4 var(--font-head);
  color: var(--head);
  text-align: center;
  margin: 16px 0;
}
#run-ask { text-align: center; }

/* Nature photo behind the reset (app.js sets it). The dark layer keeps all reset text at 7:1 or more
   on every photo (zk-test checks it); on a wide screen the photo shows more at the sides.
   Light theme too: the photo is dark, so the text stays light. */
.run.photo {
  --text: #e5e7ee;
  --head: #ffffff;
  --muted: #c9d0d9;
  --sub: #9fd6f0;
  --tile-line: rgba(255, 255, 255, 0.18);
  --ghost-line: rgba(153, 194, 254, 0.5);
  background: #0b1016;
  color: var(--text);
}
.run-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
  opacity: 0;
}
.run-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 16, 22, 0.55), rgba(11, 16, 22, 0.82) calc(50% - 360px), rgba(11, 16, 22, 0.82) calc(50% + 360px), rgba(11, 16, 22, 0.55));
}
/* Fade in over 1 s, then a very slow zoom over the 2 minutes */
.run-bg.show { opacity: 1; animation: run-bg-in 1s ease, run-bg-zoom 120s linear forwards; }
@keyframes run-bg-in { from { opacity: 0; } }
@keyframes run-bg-zoom { to { transform: scale(1.06); } }
/* A soft dark halo, so the breathing circle stays clear on the photo */
.run.photo .breath { border-radius: 50%; background: radial-gradient(closest-side, rgba(11, 16, 22, 0.6), rgba(11, 16, 22, 0)); }
.run.photo .rule { background: color-mix(in srgb, var(--band) 10%, rgba(11, 16, 22, 0.72)); }
.run.photo .ruler-number { background: #0b1016; color: #e5e7ee; }
.run.photo .ruler-option:has(input:checked) .ruler-number { background: var(--band); color: var(--on-band); box-shadow: 0 0 0 3px #0b1016, 0 0 0 5px var(--band); }
.run.photo .state-description { background: rgba(11, 16, 22, 0.82); color: #e5e7ee; }
.run.photo .state-description.on { background: color-mix(in srgb, var(--band) 12%, #0b1016); }
.run.photo .state-audio { color: #b9c3cf; }
.run.photo.rating .controls { background: #0b1016; }
@media (prefers-color-scheme: light) {
  .run.photo .breath .ball {
    border-color: #99c2fe;
    background: radial-gradient(circle at 50% 45%, rgba(112, 195, 233, 0.32), rgba(80, 132, 224, 0.1) 70%);
    box-shadow: 0 0 30px rgba(112, 195, 233, 0.45), inset 0 0 24px rgba(153, 194, 254, 0.25);
  }
}

/* ---------- 7+ red screen ---------- */
.redscreen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  background: #8f1d16;
  color: #ffffff;
}
.red-inner { max-width: 680px; margin: 0 auto; padding: 16px; }
.redscreen h2 { font: 300 clamp(36px, 7vw, 56px)/1.2 var(--font-head); text-align: center; margin: 48px 0 8px; }
.redscreen p { text-align: center; }
.redscreen li { margin: 8px 0; font-size: 17px; }
.redscreen .pill {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin: 24px 0;
  border: 2px solid #ffffff;
  background: transparent;
  color: #ffffff;
}

/* With less motion, the In / Out text and count still show the timing. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill { transition: none; }
  .pill:hover { transform: none; }
  .run-bg.show { animation: run-bg-in 1s ease; }
  .breath .ball { transform: scale(0.65) !important; }
}

[hidden] { display: none !important; }
