/* ============================================================
   Fit Coach — thema "Dark Athletic"
   Altijd donker, antraciet-grijs, neon-lime accent, cyaan voor runs.
   Volledig zelfstandige stylesheet; dekt alle selectors uit style.css.
   ============================================================ */

:root {
  /* Neon-lime is het hoofdaccent; oude variabelnamen blijven bestaan
     zodat elke regel uit het originele thema blijft werken. */
  --lime: #c8ff2e;
  --lime-dim: #a3e635;
  --lime-soft: rgba(200, 255, 46, 0.12);
  --cyan: #22d3ee;
  --cyan-dim: #0891b2;
  --cyan-soft: rgba(34, 211, 238, 0.1);

  --indigo: var(--lime);
  --indigo-dark: var(--lime-dim);
  --indigo-soft: var(--lime-soft);
  --run: var(--cyan);
  --run-dark: var(--cyan-dim);
  --success: #a3e635;
  --success-soft: rgba(163, 230, 53, 0.14);
  --danger: #f87171;
  --amber: #fbbf24;

  /* Gradients uit het origineel worden hier vlakke neon-vlakken. */
  --grad-brand: var(--lime);
  --grad-run: var(--cyan);
  --grad-text: linear-gradient(90deg, #c8ff2e, #a3e635);

  --bg: #1b1b1f;
  --card: #26262c;
  --card-2: #2e2e35;
  --ink: #f4f4f2;
  --muted: #9c9c98;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --chip-bg: #32323a;
  --input-bg: #2b2b32;
  --input-border: rgba(255, 255, 255, 0.16);
  --overlay: rgba(12, 12, 14, 0.72);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.45);
  --shadow-pop: none;
  --glow-lime: 0 0 14px rgba(200, 255, 46, 0.28);
  --glow-cyan: 0 0 14px rgba(34, 211, 238, 0.25);
  --radius: 12px;
  --touch: 44px;
  --tab-cols: 5;
  --nav-h: 66px;
  color-scheme: dark;
}

/* Dit thema is altijd donker: .dark is een no-op (zelfde palet). */
html.dark {
  --bg: #1b1b1f;
  --card: #26262c;
  --ink: #f4f4f2;
  color-scheme: dark;
}

html.training-mode {
  --touch: 56px;
}
html.training-mode .btn {
  min-height: var(--touch);
  padding: 16px 18px;
  font-size: 1.05rem;
}
html.training-mode .tab { min-height: 52px; }
html.training-mode input,
html.training-mode select,
html.training-mode textarea {
  min-height: var(--touch);
  font-size: 1.1rem;
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Outfit", "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(255, 255, 255, 0.035), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lime);
  color: #000;
  font-weight: 800;
  padding: 8px 12px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  background: rgba(27, 27, 31, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header h1 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.brand-bolt {
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px rgba(200, 255, 46, 0.6));
}
.header-actions { display: flex; gap: 8px; }

.icon-btn {
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 1.05rem;
  width: var(--touch);
  height: var(--touch);
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.icon-btn:active { transform: scale(0.92); border-color: var(--lime); }
.icon-btn.dark { background: var(--chip-bg); color: var(--ink); border: 1px solid var(--border); }
.icon-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ---------- Bottom tab bar ---------- */
.tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(560px, calc(100% - 20px));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(var(--tab-cols), 1fr);
  gap: 2px;
  padding: 6px;
  background: rgba(40, 40, 46, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
}
.tab {
  border: none;
  background: transparent;
  padding: 7px 2px 6px;
  min-height: 54px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.tab:active { transform: scale(0.94); }
.tab:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.tab-ico {
  font-size: 1.25rem;
  line-height: 1;
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.2s ease, transform 0.2s ease;
}
.tab-txt { line-height: 1; }
.tab.active {
  background: var(--lime);
  color: #000;
  box-shadow: var(--glow-lime);
}
.tab.active .tab-ico { filter: grayscale(1) brightness(0); transform: translateY(-1px); }
html.dark .tab.active { color: #000; }

/* ---------- Layout ---------- */
.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tab-panel { display: none; flex-direction: column; gap: 14px; }
.tab-panel.active { display: flex; animation: panel-in 0.25s ease; }
.tab-panel[hidden] { display: none !important; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
}
.card h2 {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* Hero: vlak zwart met neon-lime linkeraccent i.p.v. gradient */
.card--hero {
  background: var(--card);
  color: var(--ink);
  text-align: center;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--lime);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card--hero::before,
.card--run.card--hero::before {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 255, 46, 0.07), transparent);
  top: -120px; right: -70px;
  pointer-events: none;
}
.card--hero::after {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.03), transparent);
  bottom: -80px; left: -50px;
  pointer-events: none;
}
.card--hero > * { position: relative; z-index: 1; }
.card--hero h2 { color: var(--muted); }

/* Run-kaarten: zelfde vlakke stijl, cyaan accent */
.card--run { background: var(--card); }
.card--run.card--hero::before {
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.08), transparent);
}
.card--run.card--hero { border-left-color: var(--cyan); }
.card--run:not(.card--hero) {
  color: var(--ink);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card--run:not(.card--hero) h2 { color: var(--cyan); }
.card--run:not(.card--hero) .hint { color: var(--muted); }
.card--run:not(.card--hero) label { color: var(--muted); }
.card--run:not(.card--hero) .meta { color: var(--muted); }
.card--run:not(.card--hero) .tip-title { color: var(--ink); }
.card--run .btn { background: var(--cyan); color: #00171c; box-shadow: none; }
.card--run .btn--ghost { background: var(--chip-bg); color: var(--ink); border: 1px solid var(--border); }
.card--run input, .card--run select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--ink);
}
.card--run input:focus, .card--run select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft);
}
.card--run .race-schedule summary { color: var(--muted); }
.card--run .plan-list li { border-color: var(--border); }

.card--tip {
  background: var(--card);
  border: 1px solid rgba(251, 191, 36, 0.28);
}
.card--tip h2 { color: var(--amber); }

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--lime);
}
.card--run .eyebrow { color: var(--cyan); }
.hero-date { margin: 4px 0 12px; color: var(--muted); font-size: 0.95rem; font-weight: 600; text-transform: capitalize; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.hero-label {
  margin: 0;
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}
.hero-value {
  margin: 4px 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.hero-sub { margin: 0; font-size: 0.8rem; color: var(--muted); }
.doel {
  font-size: 3.8rem;
  font-weight: 800;
  margin: 6px 0 0;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--lime);
  text-shadow: 0 0 24px rgba(200, 255, 46, 0.25);
}
.doel-sm {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 8px 0 0;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.doel-sub { margin: 6px 0 16px; color: var(--muted); font-weight: 500; }

/* ---------- Progress: dunne neon-lijnen ---------- */
.progress {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
}
.card:not(.card--hero):not(.card--run) .progress { background: rgba(255, 255, 255, 0.12); }
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--lime);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-shadow: 0 0 8px rgba(200, 255, 46, 0.5);
}
.card:not(.card--hero):not(.card--run) .progress-bar { background: var(--lime); }
.card--run .progress-bar { background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, 0.5); }
.progress-tekst {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.done-badge {
  margin-top: 16px;
  display: inline-block;
  background: var(--lime-soft);
  border: 1px solid var(--lime);
  color: var(--lime);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: var(--glow-lime);
  animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badge-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.done-badge.hidden { display: none; }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 0 0 16px;
}
.week-day {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 2px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.week-day.today {
  background: var(--card-2);
  color: var(--ink);
  outline: 1px solid var(--lime);
  outline-offset: -1px;
}
.week-day .mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}
.week-day.done .mark {
  background: var(--lime);
  color: #000;
  box-shadow: 0 0 10px rgba(200, 255, 46, 0.55);
}

.hint { color: var(--muted); font-size: 0.85rem; margin: 6px 0; line-height: 1.4; }
.tip-title { font-weight: 800; margin: 0 0 6px; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); }
.dagtip { margin: 0; line-height: 1.5; color: #c9c9c4; }
.card--tip .dagtip { color: #c9c9c4; }
.card--tip .hint { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: none;
  background: var(--lime);
  color: #000;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 16px;
  min-height: 46px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.96); box-shadow: var(--glow-lime); }
.btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.btn--ghost {
  background: var(--chip-bg);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid var(--border-strong);
}
.btn--ghost:active { box-shadow: none; border-color: var(--lime); }
.btn--success {
  background: var(--lime);
  color: #000;
  box-shadow: var(--glow-lime);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.full, .full.btn { width: 100%; }
.quick-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.quick-row .btn { flex: 1; min-width: 100px; }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label, label.full {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 8px;
}
label.full { grid-column: 1 / -1; }
input, select, textarea {
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 1rem;
  color: var(--ink);
  background: var(--input-bg);
  min-height: 46px;
  font-family: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-soft);
}
textarea { min-height: 80px; resize: vertical; }
input[type="range"] { min-height: auto; padding: 0; accent-color: var(--lime); }
.range-val { font-size: 1rem; color: var(--lime); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.stats-grid > div {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 6px;
}
.stat-num {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--lime);
}
.stat-label {
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- Timers ---------- */
.timer-display {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 22px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 8px 0;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(200, 255, 46, 0.3);
}
.timer-display--rest {
  background: var(--input-bg);
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}

/* ---------- Lists ---------- */
.plan-list, .log-list, .tips-list, .goal-list, .checklist { list-style: none; margin: 0; padding: 0; }
.plan-list li, .log-list li, .tips-list li, .goal-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.plan-list li:last-child, .log-list li:last-child, .tips-list li:last-child, .goal-list li:last-child { border-bottom: none; }
.plan-list strong, .tips-list strong { display: block; margin-bottom: 2px; font-weight: 800; color: var(--ink); }
.meta { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }

.empty-state {
  text-align: center;
  padding: 20px 8px;
  color: var(--muted);
}
.empty-state .btn { margin-top: 10px; }

.cat-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: var(--lime-soft);
  color: var(--lime);
  border: 1px solid rgba(200, 255, 46, 0.3);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}
html.dark .cat-pill { color: var(--lime); }
.cat-pill.voeding {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(163, 230, 53, 0.3);
}
html.dark .cat-pill.voeding { color: var(--success); }
.cat-pill.lifestyle {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
}
html.dark .cat-pill.lifestyle { background: rgba(251, 191, 36, 0.12); color: var(--amber); }

/* ---------- Chips ---------- */
.filter-row, .exercise-picker, .day-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  border: 1px solid var(--border-strong);
  background: var(--chip-bg);
  color: var(--muted);
  font-family: inherit;
  border-radius: 8px;
  padding: 10px 15px;
  min-height: 44px;
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:active { transform: scale(0.94); }
.chip.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #000;
  box-shadow: var(--glow-lime);
}
.chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.fav-btn {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted);
  min-width: 44px;
  min-height: 44px;
}
.fav-btn.on { color: var(--amber); filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5)); }
.fav-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.tip-row { display: flex; gap: 8px; align-items: flex-start; }
.tip-row .tip-main { flex: 1; }

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist input { width: 22px; height: 22px; min-height: 22px; accent-color: var(--lime); }

.plan-editor { display: flex; flex-direction: column; gap: 10px; }
.plan-day {
  display: grid;
  grid-template-columns: 48px 1fr 72px 72px;
  gap: 6px;
  align-items: center;
}
.plan-day .wd { font-weight: 800; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.plan-day input, .plan-day select { min-height: 40px; padding: 8px; font-size: 0.85rem; }

.check-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.check { flex-direction: row; align-items: center; gap: 8px; margin-top: 8px; text-transform: none; letter-spacing: normal; font-size: 0.9rem; color: var(--ink); }
.check input[type="time"] { margin-left: auto; }
.check input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; accent-color: var(--lime); }

.banner {
  background: var(--card);
  border: 1px solid rgba(200, 255, 46, 0.35);
  border-left: 3px solid var(--lime);
  color: var(--ink);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: var(--shadow);
}
.banner.hidden { display: none; }

/* ---------- Calendar ---------- */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-label { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head {
  text-align: center;
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 0;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 0;
}
.cal-cell.muted { color: var(--muted); opacity: 0.35; }
.cal-cell.today { outline: 1px solid var(--lime); outline-offset: -1px; font-weight: 900; color: var(--lime); }
.cal-cell.done {
  background: var(--lime);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(200, 255, 46, 0.35);
}
html.dark .cal-cell.done { color: #000; }
.cal-cell .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan); margin-top: 2px;
}
.cal-cell.done .dot { background: currentColor; }

.chart-wrap { width: 100%; overflow-x: auto; }
.chart-wrap svg { width: 100%; height: 160px; display: block; }

.goal-list .goal-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.goal-list .goal-fill {
  height: 100%;
  background: var(--lime);
  width: 0;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(200, 255, 46, 0.5);
  transition: width 0.5s ease;
}

/* ---------- Overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.overlay.hidden { display: none; }
.drawer {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  color: var(--ink);
  animation: drawer-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes drawer-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.drawer--center {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  margin: auto 16px;
  max-height: 85vh;
  align-self: center;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer-head h2 { margin: 0; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 1rem; }
.drawer h2 { font-weight: 800; letter-spacing: 0.06em; }
fieldset { border: 1px solid var(--border); border-radius: 10px; margin: 12px 0; padding: 12px; }
legend { padding: 0 8px; color: var(--muted); font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; }

.ob-steps { display: flex; gap: 8px; justify-content: center; margin: 12px 0 18px; }
.ob-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  transition: all 0.25s ease;
}
.ob-dot.active { background: var(--lime); width: 24px; border-radius: 4px; box-shadow: var(--glow-lime); }
.ob-panel p { color: var(--ink); }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #2e2e35;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--lime);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
html.dark .toast { background: #2e2e35; color: var(--ink); border-color: var(--border-strong); }
.toast.error { background: #3a2226; color: #fecaca; border-left-color: var(--danger); }
.toast .toast-msg { flex: 1; font-size: 0.92rem; line-height: 1.35; font-weight: 500; }
.toast .toast-action {
  border: none;
  background: transparent;
  color: var(--lime);
  font-family: inherit;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0 8px;
}
html.dark .toast .toast-action { color: var(--lime); }
.toast .toast-close {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
}
@keyframes toast-in {
  from { transform: translateY(14px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

/* ---------- Race goal ---------- */
.progress--ink {
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}
.progress--ink .progress-bar { background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, 0.5); }
.race-progress {
  margin-top: 14px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.race-schedule { margin-top: 10px; }
.race-schedule summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.race-schedule summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

@media (min-width: 480px) {
  .tab { font-size: 0.64rem; }
  .tab-ico { font-size: 1.35rem; }
  .plan-day { grid-template-columns: 56px 1.2fr 80px 80px; }
}
