:root,
[data-theme="meadow"] {
  --bg0: #eef3eb;
  --bg1: #e2ebe0;
  --bg2: #d7e2d6;
  --glow-a: rgba(31, 122, 77, 0.16);
  --glow-b: rgba(196, 136, 42, 0.12);
  --ink: #14201a;
  --ink-soft: #3d4f45;
  --muted: #6b7c72;
  --line: rgba(20, 32, 26, 0.12);
  --panel: rgba(255, 252, 247, 0.78);
  --panel-solid: #fbf8f2;
  --brand: #1a4d3c;
  --brand-deep: #0f3328;
  --ok: #1f7a4d;
  --ok-soft: #d8f0e3;
  --live: #c0392b;
  --tick: #c5d0c8;
  --tick-on: #1f7a4d;
  --tick-warm: #c4882a;
  --radius: 14px;
  --radius-sm: 10px;
  --pad: 18px;
  --gap: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-max: 440px;
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Syne", "Figtree", sans-serif;
  --font-num: "Space Grotesk", "Figtree", sans-serif;
  --shell-bg: transparent;
  --theme-color: #e8efe6;
}

/* Cool technical monitoring */
[data-theme="slate"] {
  --bg0: #e8eef2;
  --bg1: #dde6ec;
  --bg2: #d0dbe4;
  --glow-a: rgba(15, 90, 110, 0.14);
  --glow-b: rgba(40, 70, 90, 0.1);
  --ink: #152028;
  --ink-soft: #3a4a56;
  --muted: #667888;
  --line: rgba(21, 32, 40, 0.12);
  --panel: rgba(248, 251, 253, 0.86);
  --panel-solid: #f5f8fb;
  --brand: #0f5a6e;
  --brand-deep: #0c3340;
  --ok: #0f7a62;
  --ok-soft: #d4efe8;
  --live: #c0392b;
  --tick: #c5d0d8;
  --tick-on: #0f7a62;
  --tick-warm: #b7791f;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Figtree", sans-serif;
  --font-num: "Space Grotesk", "Figtree", sans-serif;
  --theme-color: #e8eef2;
}

/* Editorial folio — titles in Literata, crisp metrics */
[data-theme="folio"] {
  --bg0: #f3f1ea;
  --bg1: #ebe7dc;
  --bg2: #e2ddd0;
  --glow-a: rgba(45, 70, 50, 0.1);
  --glow-b: rgba(90, 70, 40, 0.08);
  --ink: #1c1a16;
  --ink-soft: #4a453c;
  --muted: #7a7366;
  --line: rgba(28, 26, 22, 0.14);
  --panel: rgba(255, 254, 250, 0.9);
  --panel-solid: #fffcf7;
  --brand: #2f4a38;
  --brand-deep: #1d2e23;
  --ok: #2f6b45;
  --ok-soft: #e2f0e6;
  --live: #b33a2b;
  --tick: #d2cdc2;
  --tick-on: #2f6b45;
  --tick-warm: #a67c2d;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "Figtree", "Segoe UI", sans-serif;
  --display: "Literata", "Georgia", serif;
  --font-num: "Space Grotesk", "Figtree", sans-serif;
  --theme-color: #f3f1ea;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
svg.icon { width: 1em; height: 1em; display: block; flex-shrink: 0; }

body {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 12% -8%, var(--glow-a), transparent 55%),
    radial-gradient(700px 380px at 100% 8%, var(--glow-b), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 48%, var(--bg2));
}

.num,
.metric .value,
.behavior-row .pct,
.remain,
.range .range-label,
.spark-meta,
.spark-axis,
.stamp,
.cam-id {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.app-shell {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}
.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding-top: var(--safe-top);
  padding-bottom: calc(22px + var(--safe-bottom));
}
body.is-live #app { padding-bottom: 0; overflow: hidden; }

.screen {
  padding: 10px var(--pad) 32px;
  min-height: 100dvh;
  animation: rise .22s ease;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* brand */
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: var(--brand-deep);
  line-height: 1;
}
.brand span { color: var(--ok); }

.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}
.theme-opt {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: left;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s ease, transform .12s ease;
}
.theme-opt:active { transform: scale(0.98); }
.theme-opt.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.theme-opt .swatch {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}
.theme-opt .swatch i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: block;
  border: 1px solid rgba(0,0,0,0.08);
}
.theme-opt .t {
  font-size: 12px;
  font-weight: 750;
  color: var(--brand-deep);
  letter-spacing: -0.01em;
}
.theme-opt .d {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.25;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 8px;
  gap: 10px;
}
.nav-right { display: flex; align-items: center; gap: 8px; }

.btn-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  position: relative;
  color: var(--ink);
}
.btn-icon .icon { width: 20px; height: 20px; }
.btn-icon .badge {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 2px var(--panel-solid);
}
.btn-back {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  margin-left: -6px;
  color: var(--ink);
}
.btn-back .icon { width: 22px; height: 22px; }

.page-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.title {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--brand-deep);
}
.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}
.text-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}

/* home list */
.horse-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.horse-row {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 16px 14px 16px 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: transform .15s ease, border-color .15s ease;
}
.horse-row:active { transform: scale(0.99); }
.horse-row .rail {
  align-self: stretch;
  width: 6px;
  border-radius: 0 8px 8px 0;
  background: var(--ok);
}
.horse-row .name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.horse-row .meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.horse-row .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.horse-row .status .icon { width: 14px; height: 14px; }

.home-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* detail */
.pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 16px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.pill .icon { width: 14px; height: 14px; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--gap);
  margin-bottom: 22px;
}
.hero-status {
  background: linear-gradient(145deg, var(--ok-soft), #eff8f2);
  border: 1px solid rgba(31, 122, 77, 0.22);
  border-radius: var(--radius);
  min-height: 112px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.hero-status .top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-status .top .icon { width: 16px; height: 16px; }
.hero-status .label {
  font-family: var(--display);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 750;
  letter-spacing: -0.04em;
  color: var(--brand-deep);
  line-height: 1.05;
}
.hero-live {
  border: 1px solid var(--line);
  background: var(--brand-deep);
  color: #f4f7f4;
  border-radius: var(--radius);
  min-height: 112px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  gap: 14px;
}
.hero-live .live-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hero-live .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #ff5a4f;
}
.hero-live .txt {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-live .play {
  align-self: flex-end;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
}
.hero-live .play .icon { width: 16px; height: 16px; }

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 12px;
  flex-wrap: wrap;
}
.section-row h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}
.range {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 3px;
}
.range .range-label {
  min-width: 6.6em;
  text-align: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-soft);
  white-space: nowrap;
}
.range .mini {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink);
}
.range .mini:hover { background: rgba(20,32,26,0.05); }
.range .mini .icon { width: 14px; height: 14px; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.grid2 .full { grid-column: 1 / -1; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  backdrop-filter: blur(10px);
}

.metric {
  min-height: 128px;
  display: flex;
  flex-direction: column;
}
.metric .head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-soft);
}
.metric .head .icon { width: 15px; height: 15px; color: var(--brand); }
.metric .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.metric .value {
  margin-top: auto;
  font-family: var(--font-num);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}
.metric .unit {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.metric.processing .clock-wrap {
  margin-top: auto;
  color: var(--muted);
}
.stress-clock { width: 42px !important; height: 42px !important; }

.timeline-card .flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ok);
}
.timeline-card .flags .ck {
  color: var(--muted);
  margin-right: 4px;
  font-weight: 500;
}
.spark {
  height: 34px;
  display: flex;
  align-items: stretch;
  gap: 1.5px;
}
.spark i {
  flex: 1 1 0;
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: 1px;
  background: var(--tick);
}
.spark i.on { background: var(--tick-on); }
.spark i.on2 { background: #16663f; }
.spark i.warm { background: var(--tick-warm); }
.spark i.warm2 { background: #9a6a1c; }
.spark-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.spark-axis {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.wide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.wide-head .left {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 650; color: var(--ink-soft);
}
.wide-head .left .icon { width: 15px; height: 15px; color: var(--brand); }
.wide-head .right {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-deep);
  white-space: nowrap;
}

.behavior-strip { margin-top: 22px; }
.behavior-strip h3,
.behavior-panel + .section-row h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--brand-deep);
}
.behavior-panel { padding: 8px 14px 10px; }
.behavior-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.behavior-row:last-child { border-bottom: 0; }
.behavior-copy { min-width: 0; }
.behavior-row .label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.2;
}
.behavior-row .hint {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.behavior-row .pct {
  font-family: var(--font-num);
  font-weight: 650;
  font-size: 22px;
  color: var(--ok);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.behavior-row .bar {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 99px;
  background: rgba(20,32,26,0.08);
  overflow: hidden;
  margin-top: 2px;
}
.behavior-row .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--ok));
  border-radius: 99px;
}
.note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 12px;
}

.moments-block { margin-top: 24px; }
.moments-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.moment-chip {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}
.moment-chip img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #111;
}
.moment-chip span {
  display: block;
  padding: 8px 10px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.25;
}

/* live */
.live-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #0d1612;
  color: #f2f5f2;
  padding: 8px 0 0;
}
.live-bar {
  padding: 0 var(--pad);
  display: flex; align-items: center; gap: 10px;
}
.live-bar .btn-icon {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.live-pill {
  flex: 1;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 650; font-size: 14px;
}
.live-pill .icon { width: 15px; height: 15px; }
.live-stage {
  margin-top: 16px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.live-stage img,
.live-stage video {
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  background: #000;
}

/* highlights */
.hl-list { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.empty-state {
  color: var(--muted);
  font-size: 15px;
  padding: 28px 8px;
  text-align: center;
}
.hl-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}
.hl-card .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  padding: 14px 14px 10px;
}
.hl-card .event {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hl-card .when { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.hl-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #111;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.hl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hl-thumb .ov {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(to top, rgba(13,22,18,.35), transparent 45%);
}
.hl-thumb .play-circle {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(251,248,242,0.92);
  color: var(--brand-deep);
  display: grid; place-items: center;
  padding-left: 2px;
}
.hl-thumb .play-circle .icon { width: 18px; height: 18px; }
.hl-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 12px 12px;
}
.hl-actions button {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink-soft);
}
.hl-actions button .icon { width: 18px; height: 18px; }

/* player */
.player {
  padding: 8px var(--pad) 24px;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
.player-stage {
  margin: 20px 0 auto;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1612;
  border: 1px solid var(--line);
}
.player-stage img,
.player-stage video {
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
  display: block;
  background: #000;
  vertical-align: top;
}
.stamp, .cam-id {
  position: absolute;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.stamp { top: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.cam-id { right: 10px; bottom: 10px; }
.controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}
.controls .icon { width: 22px; height: 22px; color: var(--brand-deep); }
.scrub {
  height: 3px; background: rgba(20,32,26,0.12); border-radius: 99px; position: relative;
}
.scrub .fill { position: absolute; inset: 0 auto 0 0; width: 86%; background: var(--brand); border-radius: 99px; }
.scrub .knob {
  position: absolute; right: 14%; top: 50%;
  width: 12px; height: 12px; border-radius: 50%; background: var(--brand-deep);
  transform: translate(50%, -50%);
}
.remain { color: var(--muted); font-size: 13px; font-weight: 600; }

/* settings */
.link-row {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 4px 0 14px;
}
.field {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 8px;
}
.field .val {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.field .lab { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.field-edit {
  display: block;
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-edit:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field-edit .lab {
  display: block;
  margin: 0 0 6px;
  order: -1;
}
.val-input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  outline: none;
  appearance: none;
  border-radius: 0;
}
select.val-input {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 4px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 22px;
}
.passport-form { margin-top: 4px; }
.save-hint {
  margin: 4px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-deep);
}
.save-hint.is-error { color: #9a3b2f; }
.block.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 600;
}

.sec { margin-top: 20px; }
.sec-lab {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.row {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  text-align: left;
  gap: 12px;
}
.row .row-main { min-width: 0; flex: 1; }
.row .t { font-weight: 700; font-size: 15px; }
.row .d { color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.row .v { color: var(--muted); font-size: 14px; text-align: right; word-break: break-word; max-width: 58%; }
.row .chev { flex-shrink: 0; color: var(--muted); }
.row .chev .icon { width: 18px; height: 18px; }
.block {
  width: 100%;
  background: var(--brand-deep);
  color: #f4f7f4;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}
.ver {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0 10px;
}

/* demo alerts entry */
.demo-alerts { margin-top: 28px; }
.demo-alerts .sec-lab { margin-bottom: 8px; }

/* alert / notification screen (for presentation filming) */
.alert-screen { padding-bottom: 28px; }
.alert-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--brand) 12%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}
.alert-pill-live .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c43c2d;
  box-shadow: 0 0 0 3px rgba(196,60,45,0.18);
}
.alert-banner {
  margin: 8px 0 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(20,32,26,0.08);
}
.alert-banner-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.alert-app {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.alert-when {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.alert-banner-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #8a2f24;
}
.alert-banner-body {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.alert-card { margin-top: 6px; }
.alert-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.alert-title {
  margin: 6px 0 6px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}
.alert-hint {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.4;
}
.alert-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d1612;
  margin-bottom: 14px;
}
.alert-media {
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
  display: block;
  background: #000;
}
.alert-stage-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(12, 20, 16, 0.72);
  color: #f4f7f4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 9px;
  border-radius: 999px;
}
.alert-actions .block { margin-bottom: 8px; }

@media (min-width: 768px) {
  :root { --app-max: 760px; --pad: 24px; }
  body { padding: 24px 0; }
  .app-shell {
    min-height: calc(100dvh - 48px);
    border: 1px solid rgba(20,32,26,0.1);
    border-radius: 28px;
    background: rgba(255,252,247,0.35);
    box-shadow: 0 18px 50px rgba(20, 32, 26, 0.08);
  }
  #app, .screen, .player, .live-screen { min-height: calc(100dvh - 48px); }
  .horse-list { display: grid; grid-template-columns: 1fr 1fr; }
  .hl-list { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  :root { --app-max: 1120px; }
  .detail-wrap {
    display: block;
  }
  .hl-list { grid-template-columns: repeat(3, 1fr); }
}
