/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #eceae4;
  --text: #16181d;
  --muted: #626875;
  --line: #dddad2;
  --accent: #c2410c;
  --accent-strong: #9a3412;
  --accent-ink: #ffffff;
  --accent-soft: #fde9de;
  --ok: #15803d;
  --ok-soft: #dcf2e3;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 6px 18px rgb(0 0 0 / 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e0f12;
    --surface: #181a1f;
    --surface-2: #22252c;
    --text: #eceef2;
    --muted: #9aa1ad;
    --line: #2d3139;
    --accent: #f26b33;
    --accent-strong: #ff8d5c;
    --accent-ink: #1c0a02;
    --accent-soft: #3a1c0f;
    --ok: #4ade80;
    --ok-soft: #12301e;
    --danger: #f87171;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 18px rgb(0 0 0 / 0.3);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep focused fields clear of the sticky top bar and bottom action bar. */
  scroll-padding-top: calc(64px + var(--safe-t));
  scroll-padding-bottom: calc(88px + var(--safe-b));
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); }
@media (min-width: 700px) {
  body { background: var(--surface-2); }
  .app { border-inline: 1px solid var(--line); }
}

.boot { padding: 40px 16px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: calc(56px + var(--safe-t));
  padding: var(--safe-t) 8px 0;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); flex: none; }
.topbar-title { flex: 1; min-width: 0; padding: 0 4px; }
.topbar-title h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  touch-action: manipulation;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.25; cursor: default; }
.icon-btn.small { width: 36px; height: 36px; }

.sync-pill {
  --dot: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sync-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.sync-pill[data-state="ok"] { --dot: var(--ok); }
.sync-pill[data-state="pending"] { --dot: var(--accent); color: var(--text); }
.sync-pill[data-state="syncing"] { --dot: var(--accent); }
.sync-pill[data-state="syncing"]::before { animation: pulse 0.9s ease-in-out infinite; }
.sync-pill[data-state="offline"] { --dot: var(--muted); color: var(--text); }

/* ---------- Layout ---------- */
.page { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px calc(32px + var(--safe-b)); }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}
.btn:active { background: var(--surface-2); transform: translateY(1px); }
.btn:disabled { opacity: 0.55; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:active { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: transparent; }
.btn.dashed { border-style: dashed; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.big { min-height: 52px; font-size: 16px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }

input[type="text"], input[type="search"], input[type="number"], input[type="date"], input:not([type]), textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px; /* 16px avoids the iOS zoom on focus */
}
input[type="date"] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 90px; line-height: 1.4; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }

/* ---------- Key screen ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b)); }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.login-logo { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); margin-bottom: 6px; }
.login-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.login-form .key-input { min-height: 56px; text-align: center; font: 600 20px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.form-error { min-height: 1.4em; color: var(--danger); font-size: 14px; }

/* ---------- History ---------- */
.hint-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hint-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); }
.hint-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.hint-text strong { font-size: 14px; color: var(--text); }

.search { position: relative; display: block; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 40px; }

.list-results section + section { margin-top: 8px; }
.month-title { margin: 6px 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.session-list { display: flex; flex-direction: column; gap: 8px; }
.session-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}
.session-card:active { background: var(--surface-2); }
.session-card > svg { color: var(--muted); }
.date-badge {
  width: 52px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  line-height: 1;
}
.date-badge .d { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.date-badge .m { margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.session-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.session-title, .session-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-title { font-size: 16px; font-weight: 700; }
.session-meta { font-size: 14px; font-variant-numeric: tabular-nums; }
.session-sub { font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 650; vertical-align: 1px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--muted); }
.empty svg { color: var(--line); }
.empty strong { color: var(--text); }

/* ---------- Session detail ---------- */
.detail-head { display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--accent-strong); }
.detail-head h2 { font-size: 25px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.notes { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; white-space: pre-wrap; }
.detail-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

.block-section { display: flex; flex-direction: column; gap: 10px; }
.block-title { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.times { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.times th, .times td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.times tbody tr:last-child > * { border-bottom: 0; }
.times thead th { background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-align: right; text-transform: uppercase; }
.times thead th:first-child { color: var(--accent-strong); text-align: left; }
.times th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  max-width: 10em;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--line);
}
.times tbody th { font-weight: 600; text-align: left; }
.times td { font-weight: 650; text-align: right; }
.nil { color: var(--muted); font-weight: 400; opacity: 0.6; }

/* ---------- Session form ---------- */
.form-page { padding-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 13px; font-weight: 650; color: var(--muted); }
.label em { font-style: normal; font-weight: 500; }
.field-grid { display: grid; gap: 12px; }
@media (min-width: 480px) { .field-grid { grid-template-columns: 190px 1fr; } }
.form-section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 17px; font-weight: 800; }
.section-head .muted { font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }

.block-cards { display: flex; flex-direction: column; gap: 10px; }
.block-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.block-card-head { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.block-index { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.block-preview { flex: 1; font-size: 17px; font-variant-numeric: tabular-nums; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 38px; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}
.chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; flex-direction: column; gap: 6px; }
.stepper-ctl { display: flex; align-items: center; justify-content: space-between; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.step-btn {
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
}
.step-btn:disabled { opacity: 0.35; cursor: default; }
.stepper output { min-width: 2ch; font-size: 19px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }

.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}
.pick input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.pick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.add-inline { display: flex; gap: 8px; }
.add-inline input { flex: 1; min-width: 0; }

.form-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin: 0 -16px;
  padding: 12px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--bg);
}

/* ---------- Time entry ---------- */
.screen-fixed { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.screen-fixed .topbar { position: relative; flex: none; }
.block-tabs, .course-strip { display: flex; gap: 6px; flex: none; overflow-x: auto; scrollbar-width: none; }
.block-tabs::-webkit-scrollbar, .course-strip::-webkit-scrollbar { display: none; }
.block-tabs { padding: 10px 12px 0; }
.tab {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}
.tab.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.course-strip { align-items: center; padding: 10px 12px; scroll-behavior: smooth; }
.strip-label { flex: none; padding: 0 2px 0 8px; font-size: 11px; font-weight: 800; color: var(--muted); }
.strip-label:first-child { padding-left: 2px; }
.cchip {
  flex: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
}
.cchip.partial { border-color: var(--accent); border-style: dashed; }
.cchip.done { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.cchip.current { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }

.course-head { flex: none; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 8px 6px; text-align: center; }
.course-label strong { display: block; font-size: 18px; font-weight: 800; }
.course-label span { font-size: 13px; color: var(--muted); }

.entry-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 2px 12px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.entry-row {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  touch-action: manipulation;
}
.entry-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-row .time { flex: none; font-size: 23px; font-weight: 750; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.entry-row.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.entry-row.active .time::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.1em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
.time.nil { color: var(--muted); font-weight: 500; }
.time.typing { color: var(--accent-strong); }
.time.invalid { color: var(--danger); }
.entry-row.flash { animation: flash 0.6s ease-out; }
.entry-row.shake { animation: shake 0.3s; }

.keypad {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.keypad-hint { grid-column: 1 / -1; font-size: 12px; text-align: center; color: var(--muted); }
.key {
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
  font-size: 25px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.key:active { background: var(--line); transform: scale(0.97); }
.key-fn { font-size: 15px; color: var(--muted); }
.key-ok { grid-row: span 2; height: auto; background: var(--accent); color: var(--accent-ink); font-size: 20px; font-weight: 800; }
.key-ok:active { background: var(--accent-strong); }
.key-zero { grid-column: span 3; }
@media (max-height: 700px) {
  .key { height: 44px; font-size: 22px; }
  .key-fn { font-size: 14px; }
  .key-ok { height: auto; font-size: 18px; }
  .keypad { gap: 6px; padding-top: 6px; }
  .keypad-hint { display: none; }
  .block-tabs { padding-top: 6px; }
  .course-strip { padding-block: 6px; }
  .course-head { padding-bottom: 2px; }
  .course-label strong { font-size: 16px; }
  .course-label span { font-size: 12px; }
  .entry-row { min-height: 48px; }
  .entry-row .time { font-size: 21px; }
}

/* ---------- Athletes ---------- */
.athlete-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.athlete-item { display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); }
.athlete-item:last-child { border-bottom: 0; }
.athlete-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.athlete-info .name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.athlete-info .muted { font-size: 13px; }
.athlete-actions { display: flex; align-items: center; gap: 4px; }
.rename-form { display: flex; gap: 6px; width: 100%; }
.rename-form input { flex: 1; min-width: 0; min-height: 40px; }
.section-label { margin: 4px 4px -6px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- Settings ---------- */
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card h2 { font-size: 16px; font-weight: 800; }
.card p { font-size: 15px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; }

/* ---------- Toast & banner ---------- */
.toast {
  position: fixed;
  bottom: calc(24px + var(--safe-b));
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s, transform 0.18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Above the keypad on the time-entry screen, and above the form's action bar. */
body:has(.keypad) .toast { bottom: calc(318px + var(--safe-b)); }
body:has(.form-actions) .toast { bottom: calc(92px + var(--safe-b)); }
@media (max-height: 700px) {
  body:has(.keypad) .toast { bottom: calc(230px + var(--safe-b)); }
}
.banner {
  position: fixed;
  right: 12px;
  bottom: calc(12px + var(--safe-b));
  left: 12px;
  z-index: 60;
  max-width: 616px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 650;
}
.banner[hidden] { display: none; }
.banner .btn { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

/* ---------- Animations ---------- */
@keyframes pulse { 50% { opacity: 0.25; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes flash { from { background: var(--ok-soft); border-color: var(--ok); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
