/* Deliberately single-theme: "night pitch under floodlights" is the whole point of
   this identity, not one option among two — it always renders dark, regardless of
   the viewer's OS/browser preference. No prefers-color-scheme, no light variant.
   Same tokens as the validated Phase 0 prototype (prototype-alert-flow.html). */
:root {
  --bg: #0B1220;
  --surface: #121B2E;
  --surface-2: #1A2740;
  --ink: #F2F4F8;
  --ink-muted: #98A2B8;
  --ink-faint: #64708A;
  --line: #24314D;
  --accent: #E4A93F;
  --accent-soft: #3A2E12;
  --accent-ink: #F3D79B;
  --success: #4FB67B;
  --success-soft: #15301F;
  --warning: #E08A5B;
  --warning-soft: #3A2013;
  --error: #E5877E;
  --error-soft: #3A1613;
  --shadow: rgba(0, 0, 0, 0.5);
  --glow-1: rgba(228, 169, 63, 0.16);
  --glow-2: rgba(90, 130, 200, 0.13);
  --dot: rgba(242, 244, 248, 0.06);
  --accent-glow: rgba(228, 169, 63, 0.32);
  /* Text/icons drawn on --accent: navy, not white (white is only 2.1:1 on amber). */
  --on-accent: #0B1220;
  --tap: 44px; /* minimum touch-target size */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(640px circle at 14% -8%, var(--glow-1), transparent 60%),
    radial-gradient(520px circle at 102% 18%, var(--glow-2), transparent 55%),
    radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed;
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
button { font-family: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh; /* mobile: excludes the browser's own toolbars */
  display: flex;
  flex-direction: column;
}

/* ---- brand ---- */
.brand-bar { display: flex; align-items: center; gap: 0.55rem; padding: 1.3rem 1.4rem 0; }
.brand-bar svg { width: 24px; height: 24px; flex: none; }
.brand-word { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-word .rule { color: var(--ink); }
.brand-word .trigger { color: var(--accent); }

/* ---- landing / auth ---- */
.brand-bar .brand-login { margin-left: auto; }
.hero { padding: 1.8rem 1.4rem 1.2rem; text-align: center; }
.hero h1 {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.65rem; line-height: 1.15;
  margin: 0.6rem 0 0.6rem; letter-spacing: -0.015em;
}
.hero p { color: var(--ink-muted); margin: 0 auto; font-size: 0.97rem; line-height: 1.5; max-width: 34ch; }

/* Example alert, drawn like a Telegram chat message. */
.tg-sample { margin: 0.4rem 1.4rem 1.2rem; }
.tg-sample-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 0.45rem;
}
.tg-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.tg-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.tg-avatar svg { width: 22px; height: 22px; }
.tg-name { font-weight: 700; font-size: 0.9rem; }
.tg-bot { font-size: 0.75rem; color: var(--ink-muted); }
.tg-bubble {
  background: #1F2C3A; border-radius: 16px 16px 16px 5px; padding: 0.7rem 0.85rem 0.45rem;
  font-size: 0.92rem; line-height: 1.5; max-width: 22rem;
}
.tg-time { display: block; text-align: right; font-size: 0.72rem; color: var(--ink-muted); margin-top: 0.1rem; }

.how-it-works {
  list-style: none; display: flex; flex-direction: column; gap: 0.65rem;
  margin: 0 1.4rem 1.6rem; padding: 1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.how-step { display: flex; align-items: baseline; gap: 0.65rem; font-size: 0.9rem; color: var(--ink-muted); line-height: 1.45; }
.how-step b { color: var(--accent); font-family: "JetBrains Mono", monospace; font-size: 0.8rem; flex: none; }

.trust-list {
  margin: 0 1.4rem 1rem; padding: 0.9rem 1rem 0.9rem 2.1rem; border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink-muted); font-size: 0.85rem; line-height: 1.5;
}
.trust-list li + li { margin-top: 0.35rem; }
.trust-list li::marker { color: var(--accent); }
.site-footer {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem;
  padding: 0.4rem 1.4rem 1.8rem; font-size: 0.85rem; color: var(--ink-muted);
}
.site-footer a, .settings-row a, .field-note a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-footer a { display: inline-flex; align-items: center; min-height: var(--tap); }
.site-footer a:hover, .settings-row a:hover, .field-note a:hover { text-decoration: underline; }

.auth-card { margin: 0 1.4rem 2rem; }
.auth-tabs { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.auth-tab {
  flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  padding: 0.6rem; min-height: var(--tap); border-radius: 10px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.auth-tab[data-active="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.field-row { margin-top: 0.7rem; }
.field-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-muted); margin-bottom: 0.35rem; }
.text-input, textarea.text-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.7rem 0.8rem; font-size: 1rem; min-height: 48px; background: var(--surface); color: var(--ink);
  font-family: "Public Sans", sans-serif; resize: vertical;
}
.text-input:focus { border-color: var(--accent); }
.field-error { color: var(--error); font-size: 0.78rem; margin: 0.3rem 0 0; }
.field-note { color: var(--ink-faint); font-size: 0.78rem; margin: 0.3rem 0 0; }
.auth-msg {
  border-radius: 10px; padding: 0.7rem 0.85rem; font-size: 0.85rem; margin-top: 0.8rem;
}
.auth-msg[data-kind="error"] { background: var(--error-soft); color: var(--error); }
.auth-msg[data-kind="success"] { background: var(--success-soft); color: var(--success); }
.auth-link {
  background: none; border: none; color: var(--accent); font-weight: 600; font-size: 0.88rem;
  cursor: pointer; padding: 0 0.1rem; min-height: var(--tap); text-align: left;
  display: inline-flex; align-items: center;
}
.auth-link.inline { min-height: 0; padding: 0.6rem 0.1rem; }
.auth-link.muted { color: var(--ink-muted); margin-top: 0.3rem; }
.auth-link.danger-link { color: var(--error); }
.auth-switch { margin: 0.6rem 0 0; font-size: 0.88rem; color: var(--ink-muted); }
.pw-wrap { position: relative; }
.pw-wrap .text-input { padding-right: 4.2rem; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; min-width: var(--tap); padding: 0 0.9rem;
  background: none; border: none; color: var(--accent); font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- shared header / body ---- */
.scr-head {
  padding: 1.4rem 1.4rem 0.9rem; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem;
}
.scr-head h1 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.35rem; margin: 0 0 0.2rem; letter-spacing: -0.01em; }
.scr-sub { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }
.icon-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; line-height: 1; cursor: pointer; flex: none;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.scr-body { padding: 1.1rem 1.4rem 1.4rem; flex: 1; }

/* ---- tab bar ---- */
.tab-bar {
  display: flex; border-top: 1px solid var(--line); background: var(--surface);
  position: sticky; bottom: 0; margin-top: auto; z-index: 5;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-btn {
  flex: 1; border: none; background: none; color: var(--ink-faint);
  padding: 0.85rem 0.5rem 0.7rem; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.tab-btn svg { width: 20px; height: 20px; }
.tab-btn[data-active="true"] { color: var(--accent); }

/* ---- rule list ---- */
.new-rule-btn {
  width: 100%; border: none; background: var(--accent); color: var(--on-accent); font-weight: 800;
  font-size: 0.96rem; padding: 0.85rem 1rem; border-radius: 12px; cursor: pointer;
  margin-bottom: 1.1rem; box-shadow: 0 10px 22px -8px var(--accent-glow);
}
.new-rule-btn:hover { filter: brightness(1.06); }
.rule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.rule-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 0.95rem 1rem;
  background: var(--surface); box-shadow: 0 1px 2px var(--shadow);
}
.rule-card[data-enabled="false"] { opacity: 0.58; }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.5rem; }
.rc-name { font-weight: 700; font-size: 0.98rem; }
.rc-controls { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.switch {
  width: 46px; height: 28px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  position: relative; cursor: pointer; flex: none; padding: 0;
}
.switch[data-on="true"] { background: var(--success); border-color: var(--success); }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform 0.15s ease;
}
.switch[data-on="true"]::after { transform: translateX(18px); }
.rc-icon-btn {
  background: none; border: none; color: var(--ink-muted); cursor: pointer; border-radius: 10px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.rc-icon-btn svg { width: 18px; height: 18px; }
.rc-icon-btn:hover { color: var(--ink); }
.rc-icon-btn.danger:hover { color: var(--error); }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.chip { font-size: 0.72rem; font-weight: 600; background: var(--surface-2); color: var(--ink-muted); padding: 0.2rem 0.55rem; border-radius: 20px; }
.chip.score { font-family: "JetBrains Mono", monospace; color: var(--accent-ink); background: var(--accent-soft); }
.chip.live { background: var(--error-soft); color: var(--error); }
.rc-rule { margin: 0; color: var(--ink-muted); font-size: 0.85rem; }
.empty-state { text-align: center; padding: 2rem 0.5rem; }
.empty-hint { color: var(--ink-faint); font-size: 0.85rem; margin: 0 0 1.2rem; }
.example-btn {
  display: block; width: 100%; text-align: left; border: 1px dashed var(--line); background: var(--surface);
  color: var(--ink); border-radius: 12px; padding: 0.75rem 0.9rem; margin-bottom: 0.6rem;
  font-size: 0.85rem; cursor: pointer;
}
.example-btn:hover { border-color: var(--accent); }
.example-btn b { display: block; margin-bottom: 0.15rem; }
.example-btn span { color: var(--ink-muted); font-size: 0.8rem; }

/* ---- settings ---- */
.settings-section { margin-bottom: 1.6rem; }
.settings-section h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1rem; margin: 0 0 0.7rem; }
.settings-row {
  border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 0.95rem; background: var(--surface);
  margin-bottom: 0.6rem;
}
.settings-row p { margin: 0; font-size: 0.85rem; color: var(--ink-muted); }
.push-steps { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--ink-muted); }
.push-steps li { margin: 0.2rem 0; }
.feedback-thanks { color: var(--success) !important; font-weight: 600; }
.alerts-missed { margin: 1.2rem 0 0; font-size: 0.85rem; color: var(--ink-muted); }
select.text-input { cursor: pointer; }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 20px; margin-bottom: 0.5rem;
}
.status-pill[data-connected="true"] { background: var(--success-soft); color: var(--success); }
.status-pill[data-connected="false"] { background: var(--warning-soft); color: var(--warning); }

/* ---- controls / wizard (shared with rule form) ---- */
.progress { display: flex; gap: 5px; padding: 0 1.4rem; margin-top: 0.9rem; }
.progress i { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-2); }
.progress i[data-done="true"] { background: var(--accent); }
.wiz-body { padding: 0 1.4rem 1.2rem; flex: 1; }
.step-head { display: flex; align-items: flex-start; gap: 0.85rem; margin: 1.15rem 0 1.15rem; }
.step-icon {
  width: 42px; height: 42px; border-radius: 13px; flex: none; background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.step-icon svg { width: 21px; height: 21px; }
.step-text { flex: 1; padding-top: 0.1rem; }
.step-eyebrow {
  font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); display: block; margin-bottom: 0.2rem;
}
.wiz-body h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.2rem; margin: 0 0 0.3rem; letter-spacing: -0.01em; }
.wiz-sub { margin: 0; color: var(--ink-muted); font-size: 0.88rem; }

input.ctrl {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: none;
  border: 1.6px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; position: relative;
}
input.ctrl[type="radio"] { border-radius: 50%; }
input.ctrl:checked { background: var(--accent); border-color: var(--accent); }
input.ctrl[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 9px;
  border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
input.ctrl[type="radio"]:checked::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--on-accent); transform: translate(-50%, -50%);
}

.opt-row {
  display: flex; align-items: center; gap: 0.7rem; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.7rem 0.85rem; margin-bottom: 0.55rem; cursor: pointer;
}
.opt-row:hover { border-color: var(--accent); }
.opt-row[data-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.opt-text { display: flex; flex-direction: column; gap: 0.1rem; }
.opt-title { font-weight: 600; font-size: 0.92rem; }

.mode-card { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.6rem; cursor: pointer; }
.mode-card[data-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mode-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.15rem; }
.mode-title { font-weight: 700; font-size: 0.92rem; }
.mode-desc { margin: 0; font-size: 0.83rem; color: var(--ink-muted); padding-left: 1.75rem; }

.num-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem;
  font-size: 1rem; min-height: 48px; background: var(--surface); color: var(--ink); font-family: "JetBrains Mono", monospace;
}
.num-input:focus { border-color: var(--accent); }

.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.9rem; }
.score-opt {
  position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem 0.5rem;
  text-align: center; cursor: pointer;
}
.score-opt[data-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.score-check {
  position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; color: transparent;
}
.score-check svg { width: 12px; height: 12px; }
.score-opt[data-checked="true"] .score-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.score-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.score-val { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 0.98rem; display: block; }
.score-opt.wide { grid-column: 1 / -1; }
.score-val.score-text { font-family: inherit; }
.score-hint { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: var(--ink-muted); }

.adv-panel { border: 1px solid var(--line); border-radius: 12px; padding: 0.85rem 0.9rem; margin-top: 0.2rem; }
.adv-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.adv-label { font-size: 0.88rem; font-weight: 600; }
.adv-note { margin: 0.45rem 0 0; font-size: 0.8rem; color: var(--ink-muted); }
.adv-warn {
  margin: 0.6rem 0 0; padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.8rem; line-height: 1.45;
  background: var(--accent-soft); color: var(--accent-ink);
}
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; margin-top: 0.6rem;
  padding: 0.25rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}
.seg-btn {
  border: none; background: none; color: var(--ink-muted); font-weight: 600; font-size: 0.84rem;
  padding: 0.5rem 0.4rem; min-height: var(--tap); border-radius: 7px; cursor: pointer;
}
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented.three .seg-btn { font-size: 0.8rem; line-height: 1.2; }
.seg-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.minute-readout {
  margin-top: 0.8rem; text-align: center; font-family: "JetBrains Mono", monospace;
  font-size: 1.7rem; font-weight: 700; color: var(--accent); line-height: 1.1;
}
.minute-range {
  --fill: 0%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 0.7rem 0 0;
  border-radius: 999px; cursor: pointer; outline-offset: 4px;
  background: linear-gradient(to right, var(--accent) 0 var(--fill), #3A4A6B var(--fill) 100%);
}
.minute-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.minute-range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.minute-range::-moz-range-track { background: transparent; }
.minute-ticks {
  display: flex; justify-content: space-between; margin-top: 0.35rem;
  font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--ink-muted);
}

.char-count { text-align: right; font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.2rem; }
.preview-box {
  background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 0.8rem 0.9rem;
  margin-top: 1.1rem; font-size: 0.88rem; line-height: 1.5;
}
.preview-label { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; display: block; margin-bottom: 0.3rem; }

.wiz-foot {
  display: flex; gap: 0.6rem; padding: 0.8rem 1.4rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  position: sticky; bottom: 0; z-index: 5;
  background: rgba(11, 18, 32, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn {
  flex: 1; border-radius: 12px; padding: 0.75rem 1rem; min-height: 48px; font-weight: 700; font-size: 0.95rem;
  cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; flex: 2; box-shadow: 0 8px 18px -6px var(--accent-glow); }
.btn.primary:disabled { background: var(--surface-2); border-color: var(--line); color: var(--ink-faint); cursor: not-allowed; box-shadow: none; }
.btn:not(.primary):hover { background: var(--surface-2); }
.btn.primary:not(:disabled):hover { filter: brightness(1.06); }
.btn.full { flex: none; width: 100%; }

.success-scr { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; gap: 0.6rem; }
.success-badge {
  width: 56px; height: 56px; border-radius: 50%; background: var(--success-soft); color: var(--success);
  display: flex; align-items: center; justify-content: center; margin-bottom: 0.4rem;
}
.success-badge svg { width: 26px; height: 26px; }
.success-scr h2 { font-family: "Manrope", sans-serif; font-size: 1.15rem; margin: 0; }
.success-scr p { color: var(--ink-muted); font-size: 0.88rem; margin: 0; max-width: 26ch; }
.success-scr .btn { flex: none; min-width: 200px; margin-top: 1.2rem; }

.loading-hint { color: var(--ink-faint); font-size: 0.85rem; text-align: center; padding: 2rem 0.5rem; }
.no-channel {
  background: var(--warning-soft); border: 1px solid var(--warning); border-radius: 12px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; text-align: left;
}
.no-channel p { color: var(--ink); font-size: 0.88rem; margin: 0; max-width: none; }
.scr-body > .no-channel { margin-bottom: 1rem; }
.success-scr .no-channel { width: 100%; max-width: 340px; margin-top: 0.8rem; }
.success-scr .no-channel .btn { margin-top: 0; min-width: 0; }
.load-failed { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 1.5rem 0; }

.tg-open { display: block; text-align: center; text-decoration: none; margin-top: 0.7rem; }
.tg-waiting { margin: 0.6rem 0 0; font-size: 0.84rem; color: var(--accent-ink); }
.tg-waiting::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem;
  background: var(--accent); vertical-align: middle; animation: tg-pulse 1.2s ease-in-out infinite;
}
@keyframes tg-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tg-waiting::before { animation: none; } }
.pw-title { font-family: "Manrope", sans-serif; font-size: 1.15rem; margin: 0 0 0.3rem; }
.app-notice { margin: 0.9rem 1.4rem 0; }
.league-bulk { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.4rem; }
.league-count { flex: 1; font-size: 0.85rem; color: var(--ink-muted); }
.league-groups { display: flex; flex-direction: column; }
.league-group {
  display: grid; grid-template-columns: 5.6rem 1fr; gap: 0.6rem; align-items: center;
  padding: 0.45rem 0; border-top: 1px solid var(--line);
}
.league-country {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-muted); line-height: 1.25;
}
.league-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.league-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--tap);
  padding: 0 0.8rem 0 0.6rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-muted); font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.league-chip:hover { border-color: var(--accent); }
.league-chip[data-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.league-chip-check {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; flex: none; color: transparent;
}
.league-chip-check svg { width: 12px; height: 12px; }
.league-chip[data-checked="true"] .league-chip-check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.league-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- long-form pages (privacy) ---- */
/* Static "about" text under the landing page (index.html), for signed-out visitors and
   search engines. app.js hides it once signed in. */
.about { max-width: 480px; margin: 0 auto; padding: 0.5rem 1.4rem 0; line-height: 1.6; font-size: 0.95rem; }
body.signed-in .about { display: none; }
.about section { border-top: 1px solid var(--line); padding: 1.2rem 0 0.6rem; }
.about h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.15rem; margin: 0 0 0.5rem; }
.about p, .about li, .about dd { color: var(--ink-muted); }
.about strong, .about dt { color: var(--ink); }
.about ul, .about ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.about li + li { margin-top: 0.35rem; }
.about li::marker { color: var(--accent); }
.about a, .responsible a { color: var(--accent); font-weight: 600; }
.about dl { margin: 0; }
.about dt { font-weight: 700; margin-top: 0.8rem; }
.about dd { margin: 0.15rem 0 0; }
.about .site-footer { padding-bottom: 0.4rem; }
.responsible { text-align: center; font-size: 0.78rem; color: var(--ink-faint); margin: 0 auto; padding: 0 1.4rem 1.8rem; max-width: 60ch; }
.doc { padding: 1.2rem 1.4rem 1rem; line-height: 1.6; font-size: 0.95rem; }
/* Guide pages (/alerts/…, /compare/…): .doc plus these. */
.guide ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.guide li::marker { color: var(--accent); }
.guide-answer {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 0.85rem 1rem; margin: 1rem 0 0.4rem;
}
.guide .guide-sample { margin: 1.2rem 0 0.4rem; }
.guide-cta { margin: 1.4rem 0 0.4rem; }
.guide-cta .btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--on-accent); min-width: 200px; }
.guide-faq dt { color: var(--ink); font-weight: 700; margin-top: 0.8rem; }
.guide-faq dd { color: var(--ink-muted); margin: 0.15rem 0 0; }
.guide-note { font-size: 0.85rem; }
.table-wrap { overflow-x: auto; margin: 0.6rem 0; border: 1px solid var(--line); border-radius: 12px; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 460px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }
.compare thead th { color: var(--ink); background: var(--surface); font-family: "Manrope", sans-serif; }
.compare tbody th { color: var(--ink); font-weight: 700; width: 30%; }
.compare td { color: var(--ink-muted); }
.doc h1 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.6rem; margin: 0.6rem 0 0.3rem; letter-spacing: -0.01em; }
.doc h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.05rem; margin: 1.6rem 0 0.4rem; }
.doc p, .doc li { color: var(--ink-muted); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.doc li + li { margin-top: 0.3rem; }
.doc a { color: var(--accent); font-weight: 600; }
.doc .updated { font-size: 0.85rem; color: var(--ink-muted); margin: 0; }
.brand-bar a.brand-home { display: flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; }
.nowrap { white-space: nowrap; }
.mode-limits { margin: 0.75rem 0 0.1rem 1.75rem; }
.mode-limits.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.odds-field .field-label { margin-bottom: 0.25rem; }
.btn-row { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.mode-example { margin: 0.5rem 0 0 1.75rem; font-size: 0.8rem; color: var(--ink-muted); }
.minute-stepper { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.7rem; }
.minute-stepper .minute-readout { margin-top: 0; min-width: 3.2ch; }
.step-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.3rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.step-btn:hover { border-color: var(--accent); }

/* ---- live status on rule cards ---- */
.rule-card[data-live="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error-soft), 0 1px 2px var(--shadow); }
.rc-status { margin-top: 0.6rem; padding-top: 0.55rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.rc-status[data-kind="idle"] .rc-status-label, .rc-status[data-kind="paused"] .rc-status-label { color: var(--ink-muted); }
.rc-status[data-kind="live"] .rc-status-label { color: var(--error); font-weight: 700; display: inline-flex; align-items: center; gap: 0.45rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--error); animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.live-list li { color: var(--ink); }
.live-meta { color: var(--ink-muted); }

/* ---- alerts tab ---- */
.alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
/* One block per day: "Today · 4 alerts", then that day's alerts. */
.alert-day + .alert-day { margin-top: 1.4rem; }
.alert-day-head {
  margin: 0 0 0.55rem; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink);
}
.alert-day-head span { color: var(--ink-faint); font-weight: 700; }
.alert-swipe { position: relative; border-radius: 14px; overflow: hidden; }
.alert-swipe-bg {
  position: absolute; inset: 0; background: var(--error-soft); color: var(--error);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 1.4rem;
  opacity: 0;
}
.alert-swipe.dragging .alert-swipe-bg, .alert-swipe.leaving .alert-swipe-bg { opacity: 1; }
.alert-swipe-bg svg { width: 22px; height: 22px; }
.alert-item {
  position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 0.95rem;
  background: var(--surface); touch-action: pan-y; transition: transform 0.18s ease;
}
.alert-swipe.dragging .alert-item { transition: none; }
.alert-top { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; margin-bottom: 0.3rem; }
.alert-top-right { display: flex; align-items: center; gap: 0.15rem; margin: -0.5rem -0.6rem -0.5rem 0; }
.alerts-clear-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; flex: none; cursor: pointer;
  min-height: var(--tap); padding: 0 0.85rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  font-weight: 700; font-size: 0.85rem;
}
.alerts-clear-btn svg { width: 16px; height: 16px; }
.alerts-clear-btn:hover { color: var(--error); border-color: var(--error); }
.alerts-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem; }
.alerts-sound-btn:hover { color: var(--ink); border-color: var(--accent); }
.alerts-sound-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
/* Phones: just the bell, so both buttons fit on one row. */
@media (max-width: 480px) {
  .alerts-head-actions { flex-wrap: nowrap; }
  .alerts-sound-btn { padding: 0; width: var(--tap); justify-content: center; }
  .alerts-sound-btn span { display: none; }
}
/* An alert that arrived while the page was open: amber edge and glow, pulsing a few
   times, then steady until clicked or the tab is left. */
.alert-item.is-new {
  border-color: var(--accent); background: linear-gradient(var(--accent-soft), var(--surface) 70%);
  box-shadow: 0 0 0 1px var(--accent), 0 0 22px -4px var(--accent-glow);
  animation: alert-new-pulse 1.1s ease-in-out 4;
}
@keyframes alert-new-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent), 0 0 22px -4px var(--accent-glow); }
  50% { box-shadow: 0 0 0 3px var(--accent), 0 0 34px 2px var(--accent-glow); }
}
@media (prefers-reduced-motion: reduce) { .alert-item.is-new { animation: none; } }
.alert-new-badge {
  display: inline-block; margin-right: 0.45rem; padding: 0.05rem 0.45rem; border-radius: 6px;
  background: var(--accent); color: var(--on-accent); font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 0.1em;
}
.alert-filter {
  display: flex; gap: 0.45rem; overflow-x: auto; margin: 0 0 0.9rem; padding-bottom: 0.2rem;
  scrollbar-width: none;
}
.alert-filter::-webkit-scrollbar { display: none; }
/* Touch: one swipeable row, its edges fading out where more chips are hidden. */
.alert-filter { position: relative; }
.alert-filter.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}
.alert-filter.more-left {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent);
}
.alert-filter.more-left.more-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}
/* Mouse: no swiping, so every chip shows, wrapping onto more rows as needed. */
@media (hover: hover) and (pointer: fine) {
  .alert-filter { flex-wrap: wrap; overflow-x: visible; }
}
.alert-chip {
  flex: none; display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  min-height: 40px; padding: 0 0.85rem; border-radius: 20px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted);
  font-weight: 700; font-size: 0.85rem;
}
.alert-chip:hover { color: var(--ink); }
.alert-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.alert-chip.archived { border-style: dashed; opacity: 0.7; }
.alert-chip-count {
  font-size: 0.72rem; font-weight: 800; background: var(--surface-2); color: var(--ink-muted);
  padding: 0.05rem 0.45rem; border-radius: 10px;
}
.alert-chip[aria-pressed="true"] .alert-chip-count { background: var(--accent); color: var(--on-accent); }
.alerts-swipe-hint { margin: 0.8rem 0 0; font-size: 0.78rem; color: var(--ink-faint); }
@media (hover: hover) and (pointer: fine) { .alerts-swipe-hint { display: none; } }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(72px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 1rem; padding: 0.55rem 0.6rem 0.55rem 1rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 28px -8px var(--shadow); font-size: 0.9rem; color: var(--ink);
}
.toast-undo {
  background: none; border: none; color: var(--accent); font-weight: 800; font-size: 0.9rem;
  cursor: pointer; min-height: 36px; padding: 0 0.6rem; border-radius: 8px;
}
.toast-undo:hover { background: var(--accent-soft); }
@media (min-width: 900px) { .toast { bottom: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .alert-item { transition: none; } }
.alert-rule { font-weight: 700; font-size: 0.92rem; }
.alert-when { font-size: 0.78rem; color: var(--ink-muted); white-space: nowrap; }
.alert-match { font-size: 0.92rem; }
.alert-league { font-size: 0.8rem; color: var(--ink-muted); margin-top: 0.15rem; }
.alert-odds { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.1rem; font-variant-numeric: tabular-nums; }
.alert-undelivered { margin-top: 0.45rem; font-size: 0.8rem; color: var(--warning); }
/* "Your bet?" ✓ Won / ✗ Lost: the owner's own answer, feeding the rule's hit rate. */
.alert-outcome {
  display: flex; align-items: center; gap: 0.45rem; margin-top: 0.6rem; padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}
.alert-outcome-label { font-size: 0.8rem; color: var(--ink-faint); margin-right: auto; }
.outcome-btn {
  min-height: 36px; padding: 0 0.8rem; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-muted);
  font-weight: 700; font-size: 0.82rem;
}
.outcome-btn:hover { color: var(--ink); }
.outcome-btn.won[aria-pressed="true"] { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.outcome-btn.lost[aria-pressed="true"] { background: var(--error-soft); color: var(--error); border-color: var(--error); }
.alerts-awaiting {
  margin: 0 0 0.9rem; padding: 0.6rem 0.8rem; border-radius: 12px; font-size: 0.84rem;
  background: var(--accent-soft); color: var(--accent-ink);
}
.rc-hits { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rc-hits b { color: var(--ink); }
.hit-won { color: var(--success); font-weight: 700; }
.hit-lost { color: var(--error); font-weight: 700; }

/* ---- nav: the brand only shows in the wide-screen top bar ---- */
.tab-bar .tab-brand { display: none; }

/* ---- wide screens ---- */
@media (min-width: 900px) {
  .page[data-view="shell"], .page[data-view="landing"] { max-width: 1040px; }
  .page[data-view="form"] { max-width: 560px; }
  .about { max-width: 760px; }

  /* App: tabs become a top bar with the brand; content gets a comfortable width. */
  .page[data-view="shell"] > div { flex-direction: column; }
  .page[data-view="shell"] .tab-bar {
    order: -1; position: sticky; top: 0; bottom: auto; margin-top: 0;
    border-top: none; border-bottom: 1px solid var(--line); padding: 0 1.4rem;
    align-items: center; gap: 0.3rem; background: rgba(11, 18, 32, 0.92);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .page[data-view="shell"] .tab-bar .tab-brand { display: flex; padding: 0.9rem 0; margin-right: auto; }
  .page[data-view="shell"] .tab-btn {
    flex: none; flex-direction: row; gap: 0.45rem; font-size: 0.9rem; padding: 0 0.9rem;
    min-height: 56px; border-bottom: 2px solid transparent;
  }
  .page[data-view="shell"] .tab-btn[data-active="true"] { border-bottom-color: var(--accent); }
  .page[data-view="shell"] .tab-btn svg { width: 18px; height: 18px; }
  .page[data-view="shell"] .scr-head, .page[data-view="shell"] .scr-body { padding-left: 2rem; padding-right: 2rem; }
  .page[data-view="shell"] .new-rule-btn { max-width: 260px; }
  .page[data-view="shell"] .rule-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; align-items: start; }
  .page[data-view="shell"] .settings-section, .page[data-view="shell"] .alert-day,
  .page[data-view="shell"] .alerts-awaiting { max-width: 640px; }

  /* Landing: the pitch on the left, sign-in on the right. */
  .landing-grid {
    display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.5rem; align-items: start;
    padding: 1rem 1.4rem 0;
  }
  .landing-main .hero { text-align: left; padding-left: 0; padding-right: 0; }
  .landing-main .hero h1 { font-size: 2.3rem; }
  .landing-main .hero p { margin: 0; max-width: 40ch; font-size: 1.05rem; }
  .landing-main .tg-sample, .landing-main .how-it-works { margin-left: 0; margin-right: 0; }
  .landing-side { position: sticky; top: 1.5rem; padding-top: 1.8rem; }
  .page[data-view="landing"] .brand-login { display: none; } /* the form is already on screen */
  .landing-side .auth-card, .landing-side .trust-list { margin-left: 0; margin-right: 0; }
  .landing-side .auth-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem;
  }
}

/* ---- "How it works" dialog ---- */
.how-link { min-height: var(--tap); white-space: nowrap; }
.how-cta { margin: -0.8rem 1.4rem 1.4rem; }
.help-btn { font-weight: 800; font-size: 1rem; }
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(4, 8, 16, 0.7);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 1rem 1.2rem 0.8rem; border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.15rem; margin: 0; }
.modal-body { padding: 0.4rem 1.2rem 1rem; overflow-y: auto; font-size: 0.9rem; line-height: 1.5; }
.modal-body h3 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); margin: 1.1rem 0 0.5rem;
}
.how-intro { margin: 0.7rem 0 0; color: var(--ink); }
.how-parts { margin: 0; padding-left: 1.2rem; }
.how-parts li { margin-bottom: 0.3rem; }
.how-parts li::marker { color: var(--accent); font-weight: 700; }
.how-parts span { color: var(--ink-muted); }
.how-rule {
  background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 0.65rem 0.8rem;
}
.how-rule span { font-size: 0.82rem; }
.how-timeline { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.how-timeline li {
  position: relative; padding: 0.55rem 0.75rem 0.55rem 2.3rem; border: 1px solid var(--line);
  border-radius: 12px; color: var(--ink-muted);
}
.how-timeline li::before {
  position: absolute; left: 0.75rem; top: 0.55rem; font-weight: 800;
}
.how-timeline li[data-kind="watch"]::before { content: "👀"; }
.how-timeline li[data-kind="yes"] { border-color: var(--success); }
.how-timeline li[data-kind="yes"]::before { content: "✓"; color: var(--success); }
.how-timeline li[data-kind="no"]::before { content: "✕"; color: var(--ink-muted); }
.how-when { display: block; font-weight: 700; color: var(--ink); font-size: 0.85rem; }
.how-faq { margin: 0; padding-left: 1.1rem; color: var(--ink-muted); }
.how-faq li + li { margin-top: 0.35rem; }
.how-faq b { color: var(--ink); }
.modal-foot { padding: 0.8rem 1.2rem 1rem; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .landing-main .how-cta { margin-left: 0; }
}

/* ---- wizard: folded league list, custom odds, custom score (2026-09-26) ---- */
.league-summary {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft);
}
.league-summary-text { flex: 1; font-weight: 700; color: var(--accent-ink); }
.league-chip-check.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.custom-odds-fields { display: flex; flex-direction: column; gap: 0.7rem; }
.odds-field-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.odds-field-top .field-label { margin-bottom: 0; }
.odds-clear { font-size: 0.8rem; }
.odds-clear[hidden] { display: none; }
.odds-stepper { display: flex; align-items: center; gap: 0.5rem; }
.odds-stepper .num-input { flex: 1; min-width: 0; text-align: center; }
.odds-stepper .step-btn, .goal-stepper .step-btn { flex: none; }
.step-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.step-btn:disabled:hover { border-color: var(--line); }
.custom-odds .field-error[hidden] { display: none; }
.custom-score { margin-bottom: 0.9rem; }
.goal-steppers { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.goal-stepper { display: flex; align-items: center; gap: 0.4rem; }
.goal-readout {
  min-width: 1.6ch; text-align: center; font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem; font-weight: 700; color: var(--accent);
}
.goal-dash { font-size: 1.3rem; font-weight: 700; color: var(--ink-muted); }
.btn.add-score { flex: 1 0 100%; }
@media (min-width: 480px) { .btn.add-score { flex: 0 0 auto; min-width: 5.5rem; } }
.seg-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.news-list { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.news-list li { margin-bottom: 0.3rem; }
.news-list li::marker { color: var(--accent); }
.modal-body p { margin: 0.5rem 0 0; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--line);
}
.toggle-label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.modal-body p.news-title { margin: 0.8rem 0 0.2rem; font-weight: 700; font-size: 1rem; color: var(--ink); }
