/* Arc design system, v3.
   Editorial weight (Anton) over technical light data type (Space Grotesk),
   on a deep green-black ground with ambient glow, film-grain noise and
   layered, light-catching surfaces. Signature: the recessed Day Arc dial.
   Chart series (validated): cardio #27A65F, strength/sleep #5B8DEF, feel #A8811F. */

:root {
  --bg: #0A0D0B;
  --surface: #10140F;
  --card-hi: #1B211C;
  --card-lo: #12171310;
  --card: #141A16;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --ink: #EDF2ED;
  --ink-secondary: #B9C2BA;
  --muted: #7E8981;
  --accent: #3BE886;
  --accent-deep: #1E9E57;
  --accent-soft: rgba(59, 232, 134, 0.1);
  --on-accent: #05130A;
  --good: #4CC787;
  --bad: #D2685B;
  --s-volume: #27A65F;
  --s-sleep: #5B8DEF;
  --s-feel: #A8811F;
  --k-run: #3BE886;
  --k-strength: #5B8DEF;
  --k-mobility: #C9A22F;
  --k-cross: #D98D5A;
  --glass: rgba(24, 32, 26, 0.4);
  --glass-strong: rgba(18, 25, 20, 0.55);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-blur: blur(22px) saturate(160%);
  --radius: 22px;
  --display: "Anton", "Arial Narrow", sans-serif;
  --body: "Space Grotesk", -apple-system, "Helvetica Neue", sans-serif;
  --grad-accent: linear-gradient(135deg, #58F5A2 0%, #22B368 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient light + film grain: what stops the ground reading as a flat fill. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(55% 32% at 18% -4%, rgba(59, 232, 134, 0.17) 0%, transparent 65%),
    radial-gradient(48% 30% at 108% 12%, rgba(91, 141, 239, 0.11) 0%, transparent 60%),
    radial-gradient(60% 34% at 85% 78%, rgba(38, 178, 122, 0.09) 0%, transparent 62%),
    radial-gradient(50% 30% at -8% 62%, rgba(201, 162, 47, 0.06) 0%, transparent 60%),
    radial-gradient(140% 90% at 50% 115%, rgba(0, 0, 0, 0.5) 0%, transparent 60%),
    var(--bg);
}
#bg-matrix {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 18px calc(108px + env(safe-area-inset-bottom));
}
.shell.no-nav { padding-bottom: 44px; }

/* ---------- Type ---------- */
.display, h1.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.0;
}
.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 10.5px;
  color: var(--muted);
}
.eyebrow.accent { color: var(--accent); }
h1.page-title { font-size: 38px; margin: 6px 0 4px; }
.sub { color: var(--muted); font-size: 13px; letter-spacing: 0.01em; }
.num {
  font-family: var(--body);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.section-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 2px;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 16px;
  color: var(--ink);
}
.section-mark .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 10px 1px currentColor; }
.section-mark::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* ---------- Surfaces ---------- */
.card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-top: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    0 20px 40px -24px rgba(0, 0, 0, 0.9);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 22%, transparent 45%);
}
.card.flat { background: var(--glass-strong); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.card h2 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 16px;
  margin-bottom: 8px;
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--grad-accent);
  color: var(--on-accent);
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.4),
    inset 0 -8px 16px rgba(0, 60, 25, 0.25),
    0 10px 24px -10px rgba(59, 232, 134, 0.5);
  transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s;
}
.btn:active { transform: translateY(1px) scale(0.99); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 12px -8px rgba(59, 232, 134, 0.4); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.055);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn.ghost:active { background: rgba(255, 255, 255, 0.09); }
.btn.small { width: auto; padding: 10px 17px; font-size: 12px; }
.btn.done { background: rgba(76, 199, 135, 0.08); color: var(--good); border: 1px solid rgba(76, 199, 135, 0.25); box-shadow: none; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

label.field { display: block; margin-top: 14px; }
label.field span { display: block; font-size: 12.5px; color: var(--ink-secondary); margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px; /* prevents iOS zoom */
  transition: border-color 0.15s;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent-deep); }
input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  flex: 1 1 auto;
  text-align: center;
  padding: 11px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  color: var(--ink-secondary);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.seg input:checked + label {
  background: var(--accent-soft);
  border-color: rgba(59, 232, 134, 0.45);
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 16px -6px rgba(59, 232, 134, 0.5);
}
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.error {
  background: rgba(210, 104, 91, 0.1);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(210, 104, 91, 0.45);
  color: #E9AFA5;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 12px;
}
.notice {
  background: rgba(59, 232, 134, 0.09);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(59, 232, 134, 0.28);
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 13px;
  margin-top: 12px;
  color: var(--ink-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.notice a { color: var(--accent); }

/* ---------- Floating dock ---------- */
.tabbar {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 14px; right: 14px;
  z-index: 50;
  pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto;
  max-width: 420px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(22, 30, 24, 0.42);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 20px 40px -14px rgba(0, 0, 0, 0.85);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 0 10px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 9.5px;
  transition: color 0.15s;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--accent); }
.tab.active svg { filter: drop-shadow(0 0 7px rgba(59, 232, 134, 0.7)); }

/* ---------- Day Arc dial (signature) ---------- */
.dayarc-wrap { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.dial {
  flex: 0 0 auto;
  position: relative;
  border-radius: 50%;
  padding: 10px;
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 45%, rgba(0, 0, 0, 0.25) 100%);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.16),
    inset 0 -8px 18px rgba(0, 0, 0, 0.45),
    0 16px 34px -16px rgba(0, 0, 0, 0.9);
  border: 1px solid var(--glass-border);
}
.dial::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12) 0%, transparent 34%);
}
.dayarc { display: block; }
.dayarc .seg-pending { stroke: rgba(255, 255, 255, 0.09); }
.dayarc .seg-done { stroke: url(#arcGrad); filter: drop-shadow(0 0 7px rgba(59, 232, 134, 0.55)); }
.dayarc-center-num { font-family: var(--body); font-weight: 300; font-size: 46px; letter-spacing: -0.03em; fill: var(--ink); }
.dayarc-center-label { font-family: var(--body); font-weight: 600; font-size: 9px; letter-spacing: 2.4px; fill: var(--muted); text-transform: uppercase; }
.streak-meta { min-width: 0; }
.streak-meta .big { font-size: 24px; }

/* ---------- Activity cards ---------- */
.act {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  padding: 15px 15px 15px 18px;
  margin-top: 12px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 40px -24px rgba(0, 0, 0, 0.9);
}
.act::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.015) 24%, transparent 46%);
}
.act::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--kind, var(--muted)), transparent 140%);
  box-shadow: 0 0 12px 0 var(--kind, transparent);
}
.act.k-run { --kind: var(--k-run); }
.act.k-strength { --kind: var(--k-strength); }
.act.k-mobility { --kind: var(--k-mobility); }
.act.k-cross { --kind: var(--k-cross); }
.act-link { display: block; color: inherit; text-decoration: none; }
.act-link:active { opacity: 0.75; }
.act-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.act-title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 17px; letter-spacing: 0.03em; }
.act-kind { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.16em; font-family: var(--body); font-weight: 600; white-space: nowrap; }
.act-stats { display: flex; gap: 13px; margin-top: 7px; font-size: 12.5px; color: var(--muted); align-items: baseline; flex-wrap: wrap; }
.act-stats .num { font-size: 17px; color: var(--ink); font-weight: 400; }
.zone-pill {
  font-family: var(--body);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(59, 232, 134, 0.28);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.act-detail { margin-top: 8px; font-size: 13px; color: var(--ink-secondary); }
.act-fuel { margin-top: 8px; font-size: 12px; color: var(--k-mobility); }
.act-cta { margin-top: 13px; }
.act.done-act { opacity: 0.75; }
.badge-done { color: var(--good); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; }

/* ---------- Session detail ---------- */
.chips { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 68px;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -16px rgba(0, 0, 0, 0.9);
}
.chip .num { font-size: 24px; font-weight: 300; line-height: 1.05; }
.chip span:last-child { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; font-family: var(--body); font-weight: 600; }
.chip-zone { border-color: rgba(59, 232, 134, 0.3); background: linear-gradient(165deg, rgba(59, 232, 134, 0.13), rgba(59, 232, 134, 0.04)); }
.chip-zone .num { color: var(--accent); font-weight: 400; }

.zonebar { display: flex; gap: 4px; margin-top: 15px; }
.zoneseg {
  flex: 1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -2px 5px rgba(0, 0, 0, 0.25);
  padding: 8px 0 7px;
  text-align: center;
  opacity: 0.6;
}
.zoneseg .zl { display: block; font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--ink-secondary); }
.zoneseg .zb { display: block; font-size: 8.5px; color: var(--muted); margin-top: 1px; text-transform: uppercase; letter-spacing: 0.06em; }
.zoneseg.active {
  opacity: 1;
  border-color: rgba(59, 232, 134, 0.45);
  background: linear-gradient(180deg, rgba(59, 232, 134, 0.16), rgba(59, 232, 134, 0.05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 16px -6px rgba(59, 232, 134, 0.6);
}
.zoneseg.active .zl { color: var(--accent); }
.zoneseg.active .zb { color: var(--ink-secondary); }

.steps { list-style: none; margin-top: 6px; }
.steps li {
  position: relative;
  padding: 9px 0 9px 24px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 8px rgba(59, 232, 134, 0.5);
}

.lift-row { display: grid; grid-template-columns: 1fr 64px 52px 52px; gap: 7px; margin-top: 7px; }
.lift-row input { padding: 9px 10px; font-size: 15px; }

.inline-log { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.inline-log input { flex: 1; min-width: 0; }
.inline-log.wrap { flex-wrap: wrap; }
.inline-log.wrap input[type="text"]:first-child { flex: 1 1 100%; }
.inline-log .btn { flex: 0 0 auto; }

.test-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--line); padding: 10px 0; }
.test-row:first-child { border-top: 0; }
.test-row .t-name { font-size: 13.5px; color: var(--ink-secondary); }
.test-row .t-val { white-space: nowrap; }
.t-delta { font-size: 12px; margin-left: 6px; font-weight: 600; }
.t-delta.up { color: var(--good); }
.t-delta.down { color: var(--bad); }

/* ---------- Feel check-in ---------- */
.feel-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: 8px; }
.feel-row button {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 4px rgba(0, 0, 0, 0.25);
  color: var(--ink-secondary);
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.feel-row button.sel {
  background: var(--grad-accent);
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 14px -4px rgba(59, 232, 134, 0.7);
}

/* ---------- Camera ---------- */
.cam-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px -18px rgba(0, 0, 0, 0.95);
}
.cam-stage video, .cam-stage canvas, .cam-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255,255,255,0.85); text-shadow: 0 1px 3px rgba(0,0,0,0.7); }

/* ---------- Plan ---------- */
.week-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 26px; }
.week-head .display { font-size: 21px; }
.day-row { border-top: 1px solid var(--line); padding: 10px 0; }
.day-row:first-of-type { border-top: 0; }
a.day-link { display: block; color: inherit; text-decoration: none; }
a.day-link:active { opacity: 0.7; }
.day-chevron { float: right; color: var(--muted); font-size: 14px; line-height: 1; }
.day-row.today-row .day-chevron { color: var(--accent); }
.day-date { font-family: var(--body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px; color: var(--muted); }
.day-row.today-row .day-date { color: var(--accent); text-shadow: 0 0 10px rgba(59, 232, 134, 0.5); }
.mini-act { display: flex; justify-content: space-between; gap: 10px; margin-top: 5px; font-size: 13px; }
.mini-act .t { color: var(--ink-secondary); }
.mini-act .t::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 9px; background: var(--kind, var(--muted)); box-shadow: 0 0 6px var(--kind, transparent); }
.mini-act.k-run { --kind: var(--k-run); } .mini-act.k-strength { --kind: var(--k-strength); }
.mini-act.k-mobility { --kind: var(--k-mobility); } .mini-act.k-cross { --kind: var(--k-cross); }
.mini-act .m { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-act.done .t { text-decoration: line-through; opacity: 0.55; }
.rest { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- Charts ---------- */
.chart-card svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-secondary); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-tip {
  position: fixed;
  pointer-events: none;
  background: rgba(28, 36, 30, 0.7);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink);
  z-index: 60;
  display: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.9);
}

/* ---------- Stat tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tiles.tiles-3 { grid-template-columns: 1fr 1fr 1fr; }
.tile {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 15px 14px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 16px 30px -22px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 40%);
}
.tile .v { font-family: var(--body); font-weight: 300; font-size: 31px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 9.5px; color: var(--muted); margin-top: 7px; text-transform: uppercase; letter-spacing: 0.16em; font-family: var(--body); font-weight: 600; }

/* ---------- Tables (admin) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-family: var(--body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line-strong); }
td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* ---------- Intake wizard ---------- */
.wizard-progress { margin-top: 16px; }
.wp-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.wp-bar span { display: block; height: 100%; width: 12.5%; background: var(--grad-accent); border-radius: 2px; box-shadow: 0 0 10px rgba(59, 232, 134, 0.5); transition: width 0.25s ease; }
.step { display: none; }
.step.active { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.flabel { display: block; font-size: 12.5px; color: var(--ink-secondary); margin: 14px 0 6px; font-weight: 500; }
.wizard-nav { display: flex; gap: 10px; margin-top: 20px; }
.wizard-nav .btn { flex: 1; }
.avail-grid { margin-top: 10px; }
.avail-row { display: grid; grid-template-columns: 34px 1fr 96px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.avail-row:first-child { border-top: 0; }
.avail-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.avail-row label { font-size: 14px; color: var(--ink-secondary); }
.avail-row input[type="number"] { padding: 8px 10px; font-size: 14px; }

a { color: var(--accent); }
.list-plain { list-style: none; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code { font-size: 12.5px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
