/* La Salle — La Malle's "premium minimal with a playful spark", turned up for training.
   Near-monochrome surfaces, hairlines, one tangerine ember; metals and medals for the game. */

@font-face {
  font-family: "Geist";
  src: url("/static/geist.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- tokens -------------------------------------------------------------------- */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f3;
  --surface-3: #ececea;
  --line: rgb(24 24 27 / .08);
  --line-2: rgb(24 24 27 / .14);
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #6b6b72;
  --ink: #18181b;
  --ink-text: #fafaf9;
  --ink-text-2: #a1a1aa;
  --accent: #ff6a2b;
  --accent-strong: #f0561a;
  --accent-ink: #1c0a02;
  --accent-text: #c2410c;
  --accent-soft: rgb(255 106 43 / .10);
  --accent-softer: rgb(255 106 43 / .05);
  --hover: rgb(24 24 27 / .035);
  --danger: #b42318;
  --danger-soft: #fef1ef;
  --ok: #15803d;
  --ok-soft: rgb(22 163 74 / .10);
  --glow: rgb(255 106 43 / .10);
  --glow-edge: rgb(255 106 43 / .45);
  --shadow-sm: 0 1px 2px rgb(24 24 27 / .05);
  --shadow: 0 1px 2px rgb(24 24 27 / .04), 0 6px 20px -6px rgb(24 24 27 / .08);
  --shadow-lg: 0 2px 4px rgb(24 24 27 / .06), 0 24px 48px -12px rgb(24 24 27 / .22);
  --dots: rgb(24 24 27 / .09);
  --thumb: #ffffff;
  --stone: #d6d3d1;
  --stone-2: #a8a29e;
  /* activity kinds */
  --k-run: #f0561a;
  --k-strength: #7c3aed;
  --k-gym: #7c3aed;
  --k-walk: #15803d;
  --k-ride: #0284c7;
  --k-swim: #0891b2;
  --k-mobility: #c026d3;
  --k-hiit: #ca8a04;
  --k-other: #71717a;
  --k-quest: #0f766e;
  --k-week: #c2410c;
  --k-trophy: #b45309;
  --k-pr: #be123c;
  /* heatmap */
  --hm-0: rgb(24 24 27 / .06);
  --hm-1: rgb(255 106 43 / .25);
  --hm-2: rgb(255 106 43 / .5);
  --hm-3: rgb(255 106 43 / .78);
  --hm-4: #e8480f;
  /* trophy tiers */
  --t-bronze: #b9773f;
  --t-bronze-2: #e3a46b;
  --t-silver: #8a96a3;
  --t-silver-2: #d6dde4;
  --t-gold: #d29a12;
  --t-gold-2: #f8d667;
  --t-legend: #ff6a2b;
  --t-legend-2: #ffb547;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --surface: #111113; --surface-2: #19191c; --surface-3: #232327;
    --line: rgb(255 255 255 / .07); --line-2: rgb(255 255 255 / .13);
    --text: #ededef; --text-2: #a8a8b0; --text-3: #8c8c95;
    --ink: #f4f4f5; --ink-text: #111113; --ink-text-2: #5c5c66;
    --accent: #ff7a3d; --accent-strong: #ff8a52; --accent-ink: #1c0a02; --accent-text: #ff9a66;
    --accent-soft: rgb(255 122 61 / .14); --accent-softer: rgb(255 122 61 / .06);
    --hover: rgb(255 255 255 / .035);
    --danger: #ff8a80; --danger-soft: rgb(255 90 80 / .12);
    --ok: #4ade80; --ok-soft: rgb(74 222 128 / .12);
    --glow: rgb(255 122 61 / .10); --glow-edge: rgb(255 122 61 / .55);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -8px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .4), 0 24px 56px -12px rgb(0 0 0 / .8);
    --dots: rgb(255 255 255 / .07); --thumb: #2a2a2f;
    --stone: #3f3f46; --stone-2: #52525b;
    --k-run: #ff8a52; --k-strength: #a78bfa; --k-gym: #a78bfa; --k-walk: #4ade80; --k-ride: #38bdf8; --k-swim: #22d3ee;
    --k-mobility: #e879f9; --k-hiit: #facc15; --k-other: #a1a1aa; --k-quest: #2dd4bf; --k-week: #ff9a66; --k-trophy: #fbbf24; --k-pr: #fb7185;
    --hm-0: rgb(255 255 255 / .06); --hm-1: rgb(255 122 61 / .22); --hm-2: rgb(255 122 61 / .45); --hm-3: rgb(255 122 61 / .72); --hm-4: #ff8a52;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --surface: #111113; --surface-2: #19191c; --surface-3: #232327;
  --line: rgb(255 255 255 / .07); --line-2: rgb(255 255 255 / .13);
  --text: #ededef; --text-2: #a8a8b0; --text-3: #8c8c95;
  --ink: #f4f4f5; --ink-text: #111113; --ink-text-2: #5c5c66;
  --accent: #ff7a3d; --accent-strong: #ff8a52; --accent-ink: #1c0a02; --accent-text: #ff9a66;
  --accent-soft: rgb(255 122 61 / .14); --accent-softer: rgb(255 122 61 / .06);
  --hover: rgb(255 255 255 / .035);
  --danger: #ff8a80; --danger-soft: rgb(255 90 80 / .12);
  --ok: #4ade80; --ok-soft: rgb(74 222 128 / .12);
  --glow: rgb(255 122 61 / .10); --glow-edge: rgb(255 122 61 / .55);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -8px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .4), 0 24px 56px -12px rgb(0 0 0 / .8);
  --dots: rgb(255 255 255 / .07); --thumb: #2a2a2f;
  --stone: #3f3f46; --stone-2: #52525b;
  --k-run: #ff8a52; --k-strength: #a78bfa; --k-gym: #a78bfa; --k-walk: #4ade80; --k-ride: #38bdf8; --k-swim: #22d3ee;
  --k-mobility: #e879f9; --k-hiit: #facc15; --k-other: #a1a1aa; --k-quest: #2dd4bf; --k-week: #ff9a66; --k-trophy: #fbbf24; --k-pr: #fb7185;
  --hm-0: rgb(255 255 255 / .06); --hm-1: rgb(255 122 61 / .22); --hm-2: rgb(255 122 61 / .45); --hm-3: rgb(255 122 61 / .72); --hm-4: #ff8a52;
  color-scheme: dark;
}

/* Flame colours unlocked on the Forge Pass (Trophies → Forge Pass). */
:root[data-flame="cobalt"] { --accent: #3b82f6; --accent-strong: #2563eb; --accent-ink: #020617; --accent-text: #1d4ed8; --accent-soft: rgb(59 130 246 / .12); --accent-softer: rgb(59 130 246 / .05); --glow: rgb(59 130 246 / .10); --glow-edge: rgb(59 130 246 / .5); --hm-1: rgb(59 130 246 / .25); --hm-2: rgb(59 130 246 / .5); --hm-3: rgb(59 130 246 / .78); --hm-4: #2563eb; }
:root[data-flame="verdigris"] { --accent: #14b8a6; --accent-strong: #0d9488; --accent-ink: #022c22; --accent-text: #0f766e; --accent-soft: rgb(20 184 166 / .12); --accent-softer: rgb(20 184 166 / .05); --glow: rgb(20 184 166 / .10); --glow-edge: rgb(20 184 166 / .5); --hm-1: rgb(20 184 166 / .25); --hm-2: rgb(20 184 166 / .5); --hm-3: rgb(20 184 166 / .78); --hm-4: #0d9488; }
:root[data-flame="violet"] { --accent: #8b5cf6; --accent-strong: #7c3aed; --accent-ink: #faf5ff; --accent-text: #6d28d9; --accent-soft: rgb(139 92 246 / .12); --accent-softer: rgb(139 92 246 / .05); --glow: rgb(139 92 246 / .10); --glow-edge: rgb(139 92 246 / .5); --hm-1: rgb(139 92 246 / .25); --hm-2: rgb(139 92 246 / .5); --hm-3: rgb(139 92 246 / .78); --hm-4: #7c3aed; }
:root[data-flame="gold"] { --accent: #eab308; --accent-strong: #ca8a04; --accent-ink: #1c1402; --accent-text: #a16207; --accent-soft: rgb(234 179 8 / .14); --accent-softer: rgb(234 179 8 / .06); --glow: rgb(234 179 8 / .12); --glow-edge: rgb(234 179 8 / .55); --hm-1: rgb(234 179 8 / .28); --hm-2: rgb(234 179 8 / .52); --hm-3: rgb(234 179 8 / .8); --hm-4: #ca8a04; }
:root[data-flame="white"] { --accent: #f4f4f5; --accent-strong: #ffffff; --accent-ink: #18181b; --accent-text: #3f3f46; --accent-soft: rgb(120 120 130 / .14); --accent-softer: rgb(120 120 130 / .06); --glow: rgb(255 255 255 / .12); --glow-edge: rgb(180 180 190 / .6); --hm-1: rgb(150 150 160 / .3); --hm-2: rgb(150 150 160 / .5); --hm-3: rgb(150 150 160 / .75); --hm-4: #71717a; }
:root[data-flame="white"] .btn-accent { box-shadow: 0 0 0 1px var(--line-2), var(--shadow-sm); }

/* ---- base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
small { font-size: .72em; font-weight: 500; color: var(--text-3); margin-left: 2px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.accent-text { color: var(--accent-text); font-weight: 600; }
.link { font-size: 13.5px; font-weight: 550; color: var(--accent-text); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---- buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px;
  font-size: 14px; font-weight: 550; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-primary:hover { box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / .12); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 6px 18px -6px var(--glow-edge), inset 0 1px 0 rgb(255 255 255 / .25); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--line-2); background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--surface); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-block { width: 100%; height: 44px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-2);
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn .ico { width: 18px; height: 18px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---- logo ---------------------------------------------------------------------- */
.logo { width: 28px; height: 28px; flex: none; overflow: visible; }
.logo-bg { fill: var(--ink); }
.logo-fg { fill: var(--ink-text); }
.logo-handle { fill: none; stroke: var(--ink-text); stroke-width: 2.7; stroke-linecap: round; }
.logo-band { fill: none; stroke: var(--ink); stroke-width: .9; stroke-linecap: round; opacity: .35; }
.logo-spark { fill: var(--accent); transform-box: fill-box; transform-origin: center; }
.logo-ember { fill: var(--accent); opacity: 0; }
.brand:hover .logo-spark { animation: twinkle-once .5s cubic-bezier(.3,1.4,.5,1); }
.brand:hover .logo-ember-1 { animation: ember 1s ease-out; }
.brand:hover .logo-ember-2 { animation: ember 1s .15s ease-out; }

/* ---- theme toggle -------------------------------------------------------------- */
.theme-toggle { --seg: 32px; position: relative; display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.theme-toggle button { position: relative; z-index: 1; display: grid; place-items: center; width: var(--seg); height: calc(var(--seg) - 4px); padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); transition: color .2s ease; }
.theme-toggle button:hover, .theme-toggle button[aria-pressed="true"] { color: var(--text); }
.theme-toggle .ico { width: 16px; height: 16px; }
.theme-thumb { position: absolute; top: 2px; left: 2px; width: var(--seg); height: calc(var(--seg) - 4px); border-radius: 999px; background: var(--thumb); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); transition: transform .32s cubic-bezier(.3,1.3,.5,1); }
:root[data-theme-pref="light"] .theme-thumb { transform: translateX(var(--seg)); }
:root[data-theme-pref="dark"] .theme-thumb { transform: translateX(calc(var(--seg) * 2)); }
.theme-toggle button[data-set-theme="light"][aria-pressed="true"] .ico { animation: spin-in .45s cubic-bezier(.3,1.4,.5,1); }
.theme-toggle button[data-set-theme="dark"][aria-pressed="true"] .ico { animation: tilt-in .45s cubic-bezier(.3,1.4,.5,1); }
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-old(root) { z-index: 1; }
html.theme-vt::view-transition-new(root) { z-index: 2; }

/* ---- top bar ------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 24px;
  padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right));
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.015em; min-height: 40px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
.nav a { position: relative; padding: 7px 11px; border-radius: 9px; font-size: 14px; font-weight: 520; color: var(--text-2); transition: color .15s ease, background-color .15s ease; }
.nav a:hover { color: var(--text); background: var(--hover); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 2px; border-radius: 2px; background: var(--accent); }
.topbar-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.userbox { display: flex; align-items: center; gap: 4px; padding-left: 10px; border-left: 1px solid var(--line); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--text-2); transition: background-color .15s ease, color .15s ease, transform .4s cubic-bezier(.3,1.4,.5,1); }
.avatar:hover { background: var(--hover); color: var(--text); }
.avatar:hover .ico { transform: rotate(60deg); transition: transform .5s cubic-bezier(.3,1.4,.5,1); }
.avatar .ico { width: 19px; height: 19px; }

.level-chip { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.level-chip .ring { position: absolute; inset: 1px; width: 32px; height: 32px; }
.level-ring .ring-bg { stroke: var(--line-2); }
.level-ring .ring-fg { stroke: var(--metal, var(--accent)); }
.lc-n { position: relative; font-size: 11.5px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.level-chip:hover { background: var(--hover); }

.sync-form { display: contents; }
.sync-btn .ico { transition: transform .5s cubic-bezier(.3,1.2,.5,1); }
.sync-btn:hover .ico { transform: rotate(120deg); }
.sync-btn.spinning .ico { animation: spin 1s linear infinite; color: var(--accent-text); }
.sync-btn.sync-warn { color: var(--danger); }
.sync-btn.sync-warn::after { content: ""; position: absolute; }

.banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; border-top: 1px solid var(--line);
  background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 520;
}
.banner .ico { width: 17px; height: 17px; }
.banner a { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* ---- bottom tab bar (phones) -------------------------------------------------------- */
.tabbar { display: none; }
@media (max-width: 899px) {
  .nav { display: none; }
  .tabbar {
    position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; border-radius: 12px; font-size: 11px; font-weight: 550; color: var(--text-3); transition: color .15s ease; }
  .tabbar a .ico { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar a[aria-current="page"] .ico { color: var(--accent-text); stroke-width: 2; }
  .tabbar .tab-train {
    justify-self: center; width: 54px; height: 54px; margin-top: -22px; padding: 0; justify-content: center;
    border-radius: 18px; background: var(--accent); color: var(--accent-ink);
    box-shadow: 0 6px 20px -4px var(--glow-edge), 0 0 0 4px var(--bg);
    transition: transform .2s cubic-bezier(.3,1.5,.5,1);
  }
  .tabbar .tab-train .ico { width: 26px; height: 26px; stroke-width: 2; color: var(--accent-ink); }
  .tabbar .tab-train:active { transform: scale(.92); }
  body.has-tabbar .page, body:not(.login-page):not(.logger-page) .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .logger-page .tabbar { display: none; }
}

/* ---- page / hero --------------------------------------------------------------- */
.page {
  max-width: 1120px; margin: 0 auto;
  padding: 40px 24px 120px;
  padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right));
}
.hero { margin-bottom: 24px; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.hero-tight { margin-bottom: 18px; }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0; font-size: 13px; font-weight: 550; color: var(--text-3); letter-spacing: .01em; margin-bottom: 8px; }
.dot { margin: 0 7px; opacity: .55; }
.greeting { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.1; font-weight: 680; letter-spacing: -.035em; text-wrap: balance; overflow-wrap: anywhere; }
.greeting .who { text-transform: capitalize; }
.hero-sub { margin-top: 10px; color: var(--text-3); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px -6px; padding: 4px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--text-3); }
.back:hover { color: var(--text); background: var(--hover); }
.back .ico { width: 16px; height: 16px; }

/* ---- cards & grid ---------------------------------------------------------------- */
.card {
  position: relative; isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}
a.card { display: block; transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .2s ease, border-color .2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid > .card { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.grid > .card:nth-child(2) { animation-delay: 40ms; } .grid > .card:nth-child(3) { animation-delay: 80ms; } .grid > .card:nth-child(4) { animation-delay: 120ms; }
.grid > .card:nth-child(5) { animation-delay: 160ms; } .grid > .card:nth-child(n+6) { animation-delay: 200ms; }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-2 { grid-column: span 2; }
}
.grid-2 { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; }
.card-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.card-eyebrow .ico { width: 15px; height: 15px; color: var(--accent-text); }
.card-title { font-size: 22px; font-weight: 680; letter-spacing: -.028em; line-height: 1.2; }
.card-sub { margin-top: 4px; color: var(--text-2); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill .ico { width: 14px; height: 14px; }
.pill-accent { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.pill-ok { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.tag { display: inline-block; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); font-size: 11px; font-weight: 600; color: var(--text-3); vertical-align: 1px; letter-spacing: .02em; }

.tile { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; color: var(--k, var(--text-2)); background: color-mix(in srgb, var(--k, var(--text-3)) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k, var(--text-3)) 18%, transparent); }
.tile .ico { width: 19px; height: 19px; }
.tile-sm { width: 30px; height: 30px; border-radius: 9px; }
.tile-sm .ico { width: 16px; height: 16px; }
.tile-lg { width: 64px; height: 64px; border-radius: 18px; }
.tile-lg .ico { width: 30px; height: 30px; }
.tile-run { --k: var(--k-run); } .tile-strength, .tile-gym { --k: var(--k-strength); } .tile-walk { --k: var(--k-walk); } .tile-ride { --k: var(--k-ride); }
.tile-swim { --k: var(--k-swim); } .tile-mobility { --k: var(--k-mobility); } .tile-hiit { --k: var(--k-hiit); } .tile-other { --k: var(--k-other); }
.tile-quest { --k: var(--k-quest); } .tile-week { --k: var(--k-week); } .tile-trophy { --k: var(--k-trophy); } .tile-pr { --k: var(--k-pr); }

/* XP / HP bars */
.xpbar { display: block; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.xpbar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--metal-2, var(--accent)), var(--metal, var(--accent-strong))); box-shadow: 0 0 12px var(--glow-edge); animation: grow 1s .2s cubic-bezier(.2,.8,.2,1) both; }
.hpbar { position: relative; height: 22px; margin: 12px 0 10px; border-radius: 8px; background: var(--surface-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.hpbar i { position: absolute; inset: 0 auto 0 0; width: var(--p); background: linear-gradient(90deg, #e11d48, #f97316); animation: grow 1.1s .2s cubic-bezier(.2,.8,.2,1) both; }
.hpbar span { position: relative; display: grid; place-items: center; height: 100%; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .45); font-variant-numeric: tabular-nums; }
.hpbar-lg { height: 28px; border-radius: 10px; }
.hpbar-lg span { font-size: 13px; }

/* metals (levels) */
.metal-tin { --metal: #8f8a85; --metal-2: #d6d3d1; }
.metal-copper { --metal: #b4532a; --metal-2: #f0a37a; }
.metal-bronze { --metal: #a2702f; --metal-2: #e7bf7c; }
.metal-iron { --metal: #52525b; --metal-2: #a1a1aa; }
.metal-steel { --metal: #64748b; --metal-2: #cbd5e1; }
.metal-silver { --metal: #8a96a3; --metal-2: #eef2f6; }
.metal-gold { --metal: #c89211; --metal-2: #fde68a; }
.metal-platinum { --metal: #6b8296; --metal-2: #e3eef7; }
.metal-titanium { --metal: #5b6b86; --metal-2: #b9c6dd; }
.metal-mithril { --metal: #0e9fb5; --metal-2: #a5f3fc; }
.metal-adamant { --metal: #7c3aed; --metal-2: #c4b5fd; }
.metal-damascus { --metal: #3f3f46; --metal-2: #d4d4d8; }
.metal-forgemaster { --metal: var(--accent-strong); --metal-2: #ffd29a; }

/* medals */
.medal { width: 100%; height: 100%; overflow: visible; }
.medal .m-outer { fill: var(--t1, var(--metal, var(--stone-2))); }
.medal .m-inner { fill: var(--t2, var(--metal-2, var(--stone))); stroke: rgb(255 255 255 / .35); stroke-width: 1; }
.medal .m-glyph { color: var(--t1, var(--metal)); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.medal .m-num { fill: color-mix(in srgb, var(--metal) 65%, black); font: 750 21px/1 "Geist", ui-sans-serif, sans-serif; letter-spacing: -.04em; }
.tier-bronze { --t1: var(--t-bronze); --t2: var(--t-bronze-2); }
.tier-silver { --t1: var(--t-silver); --t2: var(--t-silver-2); }
.tier-gold { --t1: var(--t-gold); --t2: var(--t-gold-2); }
.tier-legendary { --t1: var(--t-legend); --t2: var(--t-legend-2); }
.medal.tier-legendary { filter: drop-shadow(0 0 8px rgb(255 120 50 / .45)); }
.medal.locked { --t1: var(--stone-2); --t2: var(--surface-3); filter: none; }
.medal.locked .m-inner { stroke: var(--line-2); }
.medal.locked .m-glyph { color: var(--text-3); opacity: .7; }

/* ---- today: status strip ------------------------------------------------------------ */
.status-strip { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 12px; margin-bottom: 16px; animation: rise .45s .05s cubic-bezier(.2,.8,.2,1) both; }
.stat-level, .stat-mini { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .2s ease; }
a.stat-level:hover, a.stat-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-medal { width: 52px; height: 52px; flex: none; animation: float-y 4s ease-in-out infinite; }
.stat-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.stat-label { font-size: 12.5px; font-weight: 550; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 20px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-value small { font-size: 13px; }
.stat-foot { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.stat-mini { flex-direction: column; align-items: flex-start; gap: 2px; }
.stat-ico { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 6px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); }
.stat-ico .ico { width: 17px; height: 17px; }
.flame-ico.hot .ico { animation: flicker 1.6s ease-in-out infinite; fill: color-mix(in srgb, var(--accent) 35%, transparent); }
@media (max-width: 719px) {
  .status-strip { grid-template-columns: 1fr 1fr 1fr; }
  .stat-level { grid-column: 1 / -1; }
  .stat-mini { padding: 12px; }
  .stat-mini .stat-value { font-size: 18px; }
}

/* week strip */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; animation: rise .45s .1s cubic-bezier(.2,.8,.2,1) both; }
.ws-day { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px 9px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: transform .2s cubic-bezier(.3,1.5,.5,1), border-color .2s ease; min-width: 0; }
.ws-day:hover { transform: translateY(-2px); border-color: var(--line-2); }
.ws-name { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.ws-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.ws-ico .ico { width: 16px; height: 16px; }
.ws-title { font-size: 11.5px; font-weight: 550; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ws-today { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ws-today .ws-name { color: var(--accent-text); }
.ws-done .ws-ico { background: var(--accent); color: var(--accent-ink); }
.ws-done .ws-ico .ico { stroke-width: 2.4; }
.ws-active .ws-ico { background: var(--accent-soft); color: var(--accent-text); animation: pulse 1.6s ease-in-out infinite; }
.ws-missed { opacity: .55; }
.ws-rest .ws-ico { background: transparent; color: var(--text-3); }
@media (max-width: 560px) { .ws-title { display: none; } .week-strip { gap: 5px; } .ws-day { padding: 8px 2px; border-radius: 12px; } }

/* session card */
.session-card { display: flex; flex-direction: column; background: radial-gradient(120% 90% at 100% 0%, var(--accent-softer), transparent 60%), var(--surface); }
.session-card .btn-lg { align-self: flex-start; margin-top: 18px; }
.ex-preview { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: ex; }
.ex-preview li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; counter-increment: ex; }
.ex-preview li::before { content: counter(ex); width: 20px; color: var(--text-3); font-size: 12px; font-weight: 600; padding-top: 2px; }
.ex-preview li span:first-of-type { flex: 1; font-weight: 520; }
.done-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 550; color: var(--ok); }
.done-line a { text-decoration: underline; text-underline-offset: 3px; }
.rest-line { margin-top: 14px; color: var(--text-2); }
.run-steps { margin: 14px 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.next-up { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; font-size: 14px; }
.next-up { border-top: 1px solid var(--line); margin-top: 18px; }
.next-up > .ico { margin-left: auto; width: 16px; height: 16px; color: var(--text-3); transition: transform .2s ease; }
.next-up:hover > .ico { transform: translateX(3px); color: var(--text); }
.next-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); }
.next-ico .ico { width: 15px; height: 15px; }

/* quests */
.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 12px; }
.q-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); transition: all .3s ease; }
.q-ico .ico { width: 18px; height: 18px; }
.quest.done .q-ico { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px -4px var(--glow-edge); }
.quest.done .q-ico .ico { stroke-width: 2.4; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.q-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.q-title { font-weight: 580; font-size: 14.5px; }
.q-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.quest.done .q-title { color: var(--text-2); }
.q-desc { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-pips { display: inline-flex; gap: 4px; margin-top: 5px; }
.q-pips i { width: 16px; height: 5px; border-radius: 3px; background: var(--surface-3); }
.q-pips i.on { background: var(--accent); }
.q-xp { font-size: 12.5px; font-weight: 650; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.quest.done .q-xp { opacity: .55; text-decoration: line-through; }
.quest.bonus .q-ico { border-radius: 50%; }
.quest-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.quest-foot .ico { width: 16px; height: 16px; color: var(--accent-text); }

/* boss */
a.boss-card, .boss-card { display: flex; align-items: center; gap: 18px; overflow: hidden; background: radial-gradient(90% 120% at 0% 100%, rgb(225 29 72 / .07), transparent 60%), var(--surface); }
.boss-card .golem { width: 116px; height: 116px; flex: none; }
.boss-body { flex: 1; min-width: 0; }
.golem { overflow: visible; }
.g-shadow { fill: var(--text); opacity: .08; }
.g-stone { fill: var(--stone); stroke: var(--stone-2); stroke-width: 1.4; }
.g-head, .g-body { fill: color-mix(in srgb, var(--stone) 85%, var(--surface)); }
.g-rune { fill: var(--accent); opacity: .85; filter: drop-shadow(0 0 3px var(--accent)); animation: glow 2.6s ease-in-out infinite; }
.g-eye { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }
.g-brow { fill: none; stroke: var(--stone-2); stroke-width: 2.4; stroke-linecap: round; }
.g-crack { fill: none; stroke: color-mix(in srgb, var(--text) 55%, transparent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.g-bob { animation: bob 3.4s ease-in-out infinite; transform-origin: 60px 100px; }
.g-arm-l { transform-box: fill-box; transform-origin: 50% 10%; animation: arm 3.4s ease-in-out infinite; }
.g-arm-r { transform-box: fill-box; transform-origin: 50% 10%; animation: arm 3.4s ease-in-out infinite reverse; }
.g-rubble { opacity: 0; }
.phase-1 .g-crack-1, .phase-2 .g-crack-1, .phase-2 .g-crack-2 { opacity: 1; }
.phase-2 .g-eye { animation: blink 1.4s infinite; }
.defeated .g-bob { opacity: 0; animation: none; }
.defeated .g-rubble { opacity: 1; }
.defeated .hpbar i { background: var(--text-3); }

/* latest activity */
.latest-main { display: flex; gap: 16px; align-items: center; }
.latest-route { width: 104px; height: 104px; flex: none; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 10px 10px, var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.latest-info { min-width: 0; flex: 1; }
.latest-info h3 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.latest-info .muted { font-size: 13px; margin-top: 2px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px 14px; margin: 12px 0 0; }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats dt { font-size: 11.5px; color: var(--text-3); font-weight: 550; }
.mini-stats dd { margin: 0; font-size: 17px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.route-thumb { width: 100%; height: 100%; overflow: visible; }
.rt-line { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.rt-glow { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .14; }
a:hover .rt-line { animation: draw 1.4s cubic-bezier(.3,.6,.3,1); stroke-dasharray: 400; }

/* vitals */
.vitals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.vital { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vital > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.v-value { font-size: 19px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.v-label { font-size: 12px; line-height: 1.3; color: var(--text-3); }
.v-label a { color: var(--accent-text); font-weight: 600; }
.v-spark { width: 54px; height: 40px; flex: none; }
.v-ico { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.ring { width: 54px; height: 54px; flex: none; }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2,.8,.2,1); }
.battery { position: relative; width: 54px; height: 28px; flex: none; margin: 13px 0; border-radius: 7px; border: 2px solid var(--text-3); padding: 2px; }
.battery::after { content: ""; position: absolute; right: -6px; top: 7px; width: 3px; height: 10px; border-radius: 0 2px 2px 0; background: var(--text-3); }
.battery i { display: block; height: 100%; width: var(--p); border-radius: 3px; background: linear-gradient(90deg, #0ea5e9, #22d3ee); }
.spark { width: 100%; height: 100%; overflow: visible; }
.sp-area { fill: var(--accent-soft); }
.sp-line { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.sp-dot { fill: var(--accent); }

/* pass */
.pass-card { background: linear-gradient(135deg, var(--accent-softer), transparent 55%), var(--surface); }
.pass-track { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-bottom: 14px; }
.pass-track i { height: 10px; border-radius: 3px; background: var(--surface-3); }
.pass-track i.got { background: var(--accent); box-shadow: 0 0 8px -1px var(--glow-edge); }
.pass-track i:nth-child(5n) { height: 14px; margin-top: -2px; }
.pass-next { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.pass-next .muted { font-size: 12.5px; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed-label { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 14px; font-weight: 520; }
.feed-label > a, .feed-label > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.feed-label .muted { font-size: 12px; font-weight: 450; }
.feed-xp { font-size: 13px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* charts */
.heatmap-wrap { overflow-x: auto; scrollbar-width: none; direction: rtl; }
.heatmap-wrap > svg { direction: ltr; }
.heatmap { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.hm { fill: var(--hm-0); }
.hm-1 { fill: var(--hm-1); } .hm-2 { fill: var(--hm-2); } .hm-3 { fill: var(--hm-3); } .hm-4 { fill: var(--hm-4); }
.hm:hover { stroke: var(--text); stroke-width: 1.2; }
.axis { fill: var(--text-3); font: 500 10px/1 "Geist", ui-sans-serif, sans-serif; }
.gl { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 3; }
.bars, .linechart { width: 100%; height: auto; display: block; overflow: visible; }
.bar { fill: color-mix(in srgb, var(--accent) 45%, transparent); transition: fill .15s ease; }
.bar:hover { fill: var(--accent); }
.bar-hi { fill: var(--accent); }
.bar-empty { fill: var(--surface-3); }
.lc-area { fill: var(--accent-soft); }
.lc-line, .lc-smooth { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.lc-pt { fill: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.lc-last { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }

/* ---- program --------------------------------------------------------------------- */
.boss-panel { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; margin-bottom: 16px; background: radial-gradient(70% 120% at 0% 50%, rgb(225 29 72 / .08), transparent 70%), var(--surface); }
.boss-art .golem { width: 100%; height: auto; }
.boss-info .muted { font-size: 14px; }
.hits { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hits li { display: inline-flex; gap: 8px; padding: 4px 9px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; font-weight: 550; }
.hits li span:last-child { color: #e11d48; font-variant-numeric: tabular-nums; }
.hits li.crit { background: rgb(225 29 72 / .1); }
.hits li.crit span:last-child::after { content: " crit"; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 640px) { .boss-panel { grid-template-columns: 1fr; } .boss-art { width: 150px; margin: 0 auto; } }
.weeks { display: grid; gap: 16px; }
.week-card.current { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-softer); }
.week-card.forged { background: linear-gradient(135deg, var(--accent-softer), transparent 40%), var(--surface); }
.week-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rpe { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 7px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); vertical-align: 3px; letter-spacing: 0; }
.week-theme { margin: 8px 0 16px; color: var(--text-2); font-size: 14px; max-width: 720px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; min-height: 132px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s cubic-bezier(.3,1.5,.5,1), box-shadow .2s ease, background-color .2s ease; min-width: 0; }
.day:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); background: var(--surface); }
.day-top { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.day-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.day-ico .ico { width: 17px; height: 17px; }
.day-title { font-size: 13.5px; font-weight: 620; letter-spacing: -.01em; }
.day-sub { font-size: 12px; color: var(--text-3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.day-done { background: var(--accent-softer); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.day-done .day-ico { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.day-today { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.day-active .day-ico { color: var(--accent-text); animation: pulse 1.6s ease-in-out infinite; }
.day-missed { opacity: .6; }
.day-rest { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.day-rest .day-ico { background: transparent; box-shadow: none; color: var(--text-3); }
@media (max-width: 899px) {
  .days { grid-template-columns: 1fr; gap: 6px; }
  .day { flex-direction: row; align-items: center; min-height: 0; padding: 10px 12px; gap: 12px; }
  .day-top { flex-direction: column; align-items: center; width: 34px; flex: none; }
  .day-title { flex: none; width: 110px; }
  .day-sub { -webkit-line-clamp: 2; flex: 1; }
}
.pace-list { display: grid; gap: 0; margin: 12px 0 0; }
.pace-list div { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pace-list div:last-child { border-bottom: 0; }
.pace-list dt { color: var(--text-2); font-size: 14px; }
.pace-list dd { margin: 0; font-size: 17px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rules { margin: 0; padding-left: 18px; display: grid; gap: 10px; color: var(--text-2); font-size: 14px; }
.rules strong { color: var(--text); }

/* ---- session (run) page ---------------------------------------------------------------- */
.plan-card .run-steps { font-size: 15.5px; gap: 8px; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---- logger -------------------------------------------------------------------------- */
.page-logger { max-width: 720px; padding-bottom: 140px; }
.logger-bar {
  position: sticky; top: 61px; z-index: 15;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 0 -8px 16px; padding: 10px 8px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lb-stat { display: flex; flex-direction: column; align-items: center; }
.lb-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.lb-label { font-size: 11.5px; color: var(--text-3); font-weight: 550; }
.lb-sync { justify-content: center; gap: 4px; }
.lb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); margin: 7px 0 3px; }
.lb-sync.pending .lb-dot { background: #f59e0b; box-shadow: 0 0 0 4px rgb(245 158 11 / .15); animation: pulse 1.2s ease-in-out infinite; }
.lb-sync.offline .lb-dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.session-tips { margin-bottom: 14px; padding: 12px 16px; }
.session-tips summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
.session-tips summary::-webkit-details-marker { display: none; }
.session-tips summary .ico { width: 17px; height: 17px; color: var(--accent-text); }
.session-tips p { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.exercises { display: grid; gap: 14px; }
.ex-card { padding: 18px 16px 14px; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.ex-card.complete { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.ex-head { display: flex; align-items: flex-start; gap: 10px; }
.ex-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.ex-card.complete .ex-num { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.ex-titles { flex: 1; min-width: 0; }
.ex-titles h2 { font-size: 17px; font-weight: 680; letter-spacing: -.02em; line-height: 1.25; }
.ex-titles p { font-size: 12.5px; color: var(--text-3); }
.ex-tools { display: flex; gap: 2px; margin: -4px -6px 0 0; }
.ex-target { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.ex-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.ex-note .ico { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.ex-note.up { background: var(--accent-soft); color: var(--accent-text); font-weight: 560; }
.ex-cue { margin-top: 10px; font-size: 13.5px; color: var(--text-2); padding-left: 11px; border-left: 2px solid var(--line-2); }
.ex-last { margin-top: 8px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.warmups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); align-items: center; }
.warmups span { padding: 3px 8px; border-radius: 7px; border: 1px dashed var(--line-2); font-variant-numeric: tabular-nums; }
.sets { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.set { display: grid; grid-template-columns: 26px 1fr 1fr 48px; align-items: center; gap: 8px; }
.set-n { font-size: 13px; font-weight: 700; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; }
.set.warm .set-n { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; }
.stepper { display: flex; align-items: center; height: 48px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .15s ease, background-color .15s ease; }
.stepper:focus-within { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface); }
.stepper button { width: 34px; height: 100%; flex: none; border: 0; background: transparent; color: var(--text-3); display: grid; place-items: center; }
.stepper button:active { background: var(--hover); color: var(--text); }
.stepper button .ico { width: 16px; height: 16px; }
.stepper label { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.stepper input { width: 100%; min-width: 0; border: 0; background: transparent; outline: none; text-align: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; letter-spacing: -.02em; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.set-done { width: 48px; height: 48px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-3); display: grid; place-items: center; transition: all .2s cubic-bezier(.3,1.5,.5,1); }
.set-done .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.set-done:hover { border-color: var(--accent); color: var(--accent-text); }
.set.done .set-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.04); box-shadow: 0 6px 16px -6px var(--glow-edge); }
.set.done .set-done .ico { animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.set.done .stepper { background: var(--accent-softer); }
.set.pr .set-n { color: var(--accent-text); }
.set.pr .set-n::after { content: "PR"; display: block; font-size: 9px; letter-spacing: .05em; }
.ex-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.plates { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.plate { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #52525b; }
.plate-25 { background: #dc2626; } .plate-20 { background: #2563eb; } .plate-15 { background: #ca8a04; } .plate-10 { background: #16a34a; }
.plate-5 { background: #f4f4f5; color: #18181b; box-shadow: inset 0 0 0 1px var(--line-2); } .plate-2-5 { background: #27272a; } .plate-1-25 { background: #a1a1aa; }
.swap-select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swap-wrap { position: relative; }
.add-card { margin-top: 14px; padding: 16px; }
.finish-card { margin-top: 20px; display: grid; gap: 12px; }
.field select, .field textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg); padding: 10px 12px; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.field select { height: 44px; padding: 0 12px; }
.field textarea { resize: vertical; min-height: 60px; }
.field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }

/* rest timer */
.rest { position: fixed; z-index: 40; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.rest-inner {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px;
  padding: 10px 10px 10px 12px; border-radius: 20px; pointer-events: auto;
  background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg);
  animation: slide-up .35s cubic-bezier(.3,1.35,.5,1) both;
}
.rest-ring { width: 44px; height: 44px; flex: none; }
.rest-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rr-bg { fill: none; stroke: color-mix(in srgb, var(--ink-text) 18%, transparent); stroke-width: 4; }
.rr-fg { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: var(--off, 0); transition: stroke-dashoffset .25s linear; }
.rest-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rest-label { font-size: 12px; color: color-mix(in srgb, var(--ink-text) 65%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-time { font-size: 24px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rest-actions { display: flex; gap: 4px; }
.rest-btn { height: 40px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ink-text) 12%, transparent); color: var(--ink-text); font-size: 13.5px; font-weight: 650; }
.rest-btn:active { transform: scale(.95); }
.rest-skip { background: var(--accent); color: var(--accent-ink); }
.rest.done .rest-inner { background: var(--accent); color: var(--accent-ink); animation: nudge .5s cubic-bezier(.3,1.6,.5,1); }
.rest.done .rest-label { color: var(--accent-ink); }

/* ---- activities ------------------------------------------------------------------------ */
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.total { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.total .stat-value { font-size: 24px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 16px; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; font-weight: 560; color: var(--text-2); white-space: nowrap; transition: all .15s ease; }
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip[aria-current="true"] { background: var(--ink); color: var(--ink-text); box-shadow: none; }
.chip .n { font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }
.month { margin-top: 22px; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; }
.month-head h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.month-head span { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.act-list { list-style: none; margin: 0; padding: 4px; }
.act-row { display: flex; align-items: center; gap: 14px; padding: 10px 10px; border-radius: 12px; transition: background-color .15s ease; }
.act-row + .act-row { border-top: 1px solid var(--line); }
.act-row:hover { background: var(--hover); }
.act-thumb { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.act-thumb .route-thumb .rt-line { stroke-width: 6; }
.act-thumb .rt-glow { display: none; }
.act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.act-name { font-weight: 560; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-meta { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.act-nums { display: flex; gap: 18px; font-variant-numeric: tabular-nums; }
.act-nums div { display: flex; flex-direction: column; align-items: flex-end; min-width: 54px; }
.act-nums b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.act-nums span { font-size: 11.5px; color: var(--text-3); }
.act-xp { font-size: 12px; font-weight: 700; color: var(--accent-text); min-width: 46px; text-align: right; }
@media (max-width: 640px) { .act-nums div:nth-child(n+2) { display: none; } .act-xp { display: none; } .totals .stat-value { font-size: 19px; } .total { padding: 12px; } }
.pager { display: flex; justify-content: space-between; margin-top: 18px; }

/* activity detail */
.act-hero { display: flex; align-items: center; gap: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sg { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.sg dt { font-size: 12px; color: var(--text-3); font-weight: 550; }
.sg dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.sg.hi { background: var(--accent-softer); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.sg.hi dd { color: var(--accent-text); }
.map-card { padding: 0; overflow: hidden; }
.map { position: relative; height: 380px; background: radial-gradient(var(--dots) 1px, transparent 1.3px) 0 0 / 16px 16px, var(--surface-2); touch-action: pan-y; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .m-route-glow { fill: none; stroke: var(--accent); stroke-width: 12; opacity: .13; stroke-linecap: round; stroke-linejoin: round; }
.map .m-route { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.map .m-km { fill: var(--surface); stroke: var(--line-2); }
.map .m-km-t { fill: var(--text-2); font: 650 9px/1 "Geist", sans-serif; }
.map .m-start { fill: #16a34a; stroke: var(--surface); stroke-width: 3; }
.map .m-end { fill: var(--ink); stroke: var(--surface); stroke-width: 3; }
.map .m-cursor { fill: var(--accent); stroke: var(--surface); stroke-width: 3; filter: drop-shadow(0 0 6px var(--accent)); }
.map-legend { position: absolute; left: 14px; bottom: 12px; display: flex; gap: 10px; font-size: 12px; color: var(--text-3); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 4px 9px; border-radius: 8px; }
.charts { display: grid; gap: 4px; }
.chart { position: relative; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 4px; }
.chart-head h3 { font-size: 13.5px; font-weight: 650; }
.chart-head span { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: 110px; display: block; overflow: visible; }
.ch-area { opacity: .16; }
.ch-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.ch-pace .ch-line { stroke: var(--accent); } .ch-pace .ch-area { fill: var(--accent); }
.ch-hr .ch-line { stroke: #e11d48; } .ch-hr .ch-area { fill: #e11d48; }
.ch-alt .ch-line { stroke: var(--text-2); } .ch-alt .ch-area { fill: var(--text-3); }
.ch-cad .ch-line { stroke: #0ea5e9; } .ch-cad .ch-area { fill: #0ea5e9; }
.ch-pow .ch-line { stroke: #ca8a04; } .ch-pow .ch-area { fill: #ca8a04; }
.ch-cursor { stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 2; }
.readout { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 12px; margin: 0 0 6px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-variant-numeric: tabular-nums; min-height: 36px; }
.readout b { font-weight: 700; }
.laps { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.laps th { text-align: right; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.laps td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.laps th:first-child, .laps td:first-child { text-align: left; }
.laps tr.fast td { color: var(--accent-text); font-weight: 650; }
.lap-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); opacity: .5; vertical-align: middle; }
.table-wrap { overflow-x: auto; }
.zones { display: grid; gap: 8px; }
.zone { display: grid; grid-template-columns: 92px 1fr 64px; align-items: center; gap: 10px; font-size: 13px; }
.zone-bar { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.zone-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; }
.z1 i { background: #94a3b8; } .z2 i { background: #38bdf8; } .z3 i { background: #22c55e; } .z4 i { background: #f59e0b; } .z5 i { background: #e11d48; }
.zone span:last-child { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
.efforts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.effort { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.effort dt { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.effort dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.effort.pr { background: var(--accent-soft); }
.effort.pr dd { color: var(--accent-text); }
.tag-form { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-form button { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; font-weight: 560; color: var(--text-2); }
.tag-form button[aria-pressed="true"] { background: var(--ink); color: var(--ink-text); box-shadow: none; }

/* ---- records / body / trophies --------------------------------------------------------- */
.rec-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rec-table td { padding: 11px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rec-table tr:last-child td { border-bottom: 0; }
.rec-name { font-weight: 620; }
.rec-time { font-size: 18px; font-weight: 720; letter-spacing: -.02em; }
.rec-goal { font-size: 12px; color: var(--text-3); }
.rec-goal b { color: var(--accent-text); }
.big-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.big-day { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); transition: background-color .15s ease; }
a.big-day:hover { background: var(--surface-3); }
.big-day b { display: block; font-size: 17px; letter-spacing: -.02em; }
.big-day span { font-size: 12.5px; color: var(--text-3); }
.year-row { display: grid; grid-template-columns: 48px 1fr 90px; gap: 12px; align-items: center; padding: 6px 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.year-bar { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.year-bar i { display: block; height: 100%; width: var(--p); background: var(--accent); border-radius: inherit; }
.lift-row { display: grid; grid-template-columns: 1fr 120px 90px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lift-row:last-child { border-bottom: 0; }
.lift-row .spark { height: 30px; }
.lift-e1rm { text-align: right; font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; }
.lift-e1rm small { display: block; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .inline-form { grid-template-columns: 1fr 1fr; } .inline-form .btn { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field input {
  height: 44px; padding: 0 13px; width: 100%; min-width: 0;
  border: 1px solid var(--line-2); border-radius: 11px; background: var(--bg);
  font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.field input:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.field input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.field .hint { font-size: 12px; color: var(--text-3); font-weight: 450; }
.weigh-list { list-style: none; margin: 0; padding: 0; }
.weigh-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 14px; }
.weigh-list li:last-child { border-bottom: 0; }
.weigh-list b { font-size: 15.5px; }
.weigh-list form { margin-left: auto; }

.level-hero { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; background: radial-gradient(80% 130% at 0% 50%, color-mix(in srgb, var(--metal) 14%, transparent), transparent 70%), var(--surface); }
.level-hero .medal-big { width: 150px; height: 150px; animation: float-y 4s ease-in-out infinite; filter: drop-shadow(0 10px 20px color-mix(in srgb, var(--metal) 35%, transparent)); }
.level-hero .stat-value { font-size: 30px; }
@media (max-width: 640px) { .level-hero { grid-template-columns: 96px 1fr; gap: 16px; } .level-hero .medal-big { width: 96px; height: 96px; } .level-hero .stat-value { font-size: 23px; } }
.xp-kinds { display: grid; gap: 8px; margin-top: 14px; }
.xp-kind { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.xp-kind .zone-bar i { background: var(--accent); }
.xp-kind span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }
.trophy-group { margin-top: 26px; }
.trophy-group > header { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.trophy-group h2 { font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.trophy-group header span { font-size: 13px; color: var(--text-3); }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.trophy { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .25s cubic-bezier(.3,1.4,.5,1), box-shadow .2s ease; scroll-margin-top: 90px; }
.trophy:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: var(--shadow-lg); }
.trophy .medal { width: 64px; height: 64px; transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.trophy:hover .medal:not(.locked) { transform: rotateY(180deg) scale(1.05); }
.trophy h3 { font-size: 14px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.trophy p { font-size: 12px; color: var(--text-3); line-height: 1.35; }
.trophy .when { font-size: 11.5px; font-weight: 600; color: var(--accent-text); }
.trophy.locked h3 { color: var(--text-2); }
.trophy .prog { width: 100%; margin-top: 2px; }
.trophy .prog .xpbar { height: 5px; }
.trophy .prog span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.trophy.new::after { content: "NEW"; position: absolute; top: 10px; right: 10px; padding: 2px 6px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 750; letter-spacing: .05em; }
.trophy:target { box-shadow: 0 0 0 3px var(--accent); }
.pass-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pt { position: relative; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; min-height: 84px; display: flex; flex-direction: column; gap: 4px; }
.pt b { font-size: 11px; color: var(--text-3); letter-spacing: .05em; text-transform: uppercase; }
.pt.got { background: var(--accent-soft); }
.pt.got b { color: var(--accent-text); }
.pt.next { box-shadow: inset 0 0 0 2px var(--accent); }
.pt form { margin-top: auto; }
.pt button { height: 26px; padding: 0 9px; border-radius: 7px; border: 0; background: var(--ink); color: var(--ink-text); font-size: 12px; font-weight: 600; }
.pt.chosen button { background: var(--accent); color: var(--accent-ink); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.sw-cobalt { background: #3b82f6; } .sw-verdigris { background: #14b8a6; } .sw-violet { background: #8b5cf6; } .sw-gold { background: #eab308; } .sw-white { background: #e4e4e7; box-shadow: inset 0 0 0 1px var(--line-2); } .sw-ember { background: #ff6a2b; }

/* ---- settings ----------------------------------------------------------------------------- */
.settings { display: grid; gap: 16px; max-width: 760px; }
.settings .card { scroll-margin-top: 80px; }
.status-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.status-row:last-of-type { border-bottom: 0; }
.status-row .k { color: var(--text-3); width: 150px; flex: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.status-dot.warn { background: #f59e0b; }
.form-grid { display: grid; gap: 12px; margin-top: 14px; }
.form-grid .btn { justify-self: start; }
.steps-guide { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 9px; font-size: 14px; color: var(--text-2); }
.steps-guide strong, .steps-guide b { color: var(--text); }
.steps-guide a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
code, .code { font: 500 12.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.copy-line { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--surface-2); margin-top: 6px; }
.copy-line code { flex: 1; background: transparent; padding: 0; }
.sync-log { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.sync-log li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sync-log li:last-child { border-bottom: 0; }
.sync-log time { color: var(--text-3); width: 120px; flex: none; font-variant-numeric: tabular-nums; }
.sync-log .err { color: var(--danger); }
.ok-msg { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 550; }
.alert { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; font-weight: 500; animation: shake .4s cubic-bezier(.36,.07,.19,.97) both; }
.progress-line { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.progress-line i { display: block; height: 100%; width: var(--p); background: var(--accent); transition: width .4s ease; }

/* ---- workout summary ------------------------------------------------------------------- */
.ws-ex { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ws-ex:last-child { border-bottom: 0; }
.ws-ex h3 { font-size: 15.5px; font-weight: 650; display: flex; justify-content: space-between; gap: 10px; }
.ws-ex h3 span { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.ws-sets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ws-set { padding: 5px 9px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ws-set.warm { opacity: .55; font-weight: 500; }
.ws-set.pr { background: var(--accent); color: var(--accent-ink); }

/* ---- celebrations ------------------------------------------------------------------------ */
.celebrate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgb(9 9 11 / .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .3s ease both; }
.celebrate .sparks, .dialog .sparks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cel-card { display: none; position: relative; width: 100%; max-width: 400px; padding: 32px 28px 28px; border-radius: 26px; background: var(--surface); text-align: center; box-shadow: var(--shadow-lg), 0 0 80px -20px var(--glow-edge); }
.cel-card.on { display: block; animation: cel-in .6s cubic-bezier(.3,1.4,.5,1) both; }
.cel-badge { width: 112px; height: 112px; margin: -86px auto 14px; display: grid; place-items: center; border-radius: 30px; background: var(--surface); box-shadow: var(--shadow-lg); padding: 12px; animation: badge-spin 1s .1s cubic-bezier(.3,1.4,.5,1) both; }
.cel-badge > .ico { width: 54px; height: 54px; color: var(--accent-text); }
.pass-badge { background: var(--accent); color: var(--accent-ink); font-size: 46px; font-weight: 800; letter-spacing: -.05em; }
.cel-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.cel-card h2, .dialog h2 { font-size: 26px; font-weight: 720; letter-spacing: -.03em; margin: 6px 0 8px; }
.cel-card p, .dialog p { color: var(--text-2); }
.cel-sub { margin-top: 10px; font-size: 13.5px; }
.cel-actions { position: fixed; left: 0; right: 0; bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; justify-content: center; }
.cel-actions .btn { min-width: 160px; height: 48px; border-radius: 14px; font-size: 15px; }
.dialog { width: min(420px, calc(100% - 32px)); border: 0; padding: 0; border-radius: 26px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: visible; }
.dialog::backdrop { background: rgb(9 9 11 / .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog-body { padding: 30px 26px 24px; text-align: center; display: grid; gap: 4px; }
.dialog-body .cel-badge { margin-top: -84px; }
.dialog-body .btn { margin-top: 16px; }
.toast { position: fixed; z-index: 90; left: 50%; top: calc(76px + env(safe-area-inset-top)); translate: -50% 0; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: toast-in .4s cubic-bezier(.3,1.4,.5,1) both; max-width: calc(100% - 32px); }
.toast .ico { color: var(--accent); }
.toast.pr { background: var(--accent); color: var(--accent-ink); }
.toast.pr .ico { color: var(--accent-ink); }

/* ---- empty / login ----------------------------------------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 24px 64px; border: 1px dashed var(--line-2); border-radius: 20px; background: radial-gradient(ellipse 55% 65% at 50% 0%, var(--accent-softer), transparent); animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.empty h1, .empty h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.empty p { color: var(--text-3); max-width: 360px; font-size: 14.5px; }
.empty .btn { margin-top: 14px; }
.empty-art { width: 168px; height: 126px; overflow: visible; }
.ea-shadow { fill: var(--text); opacity: .07; transform-origin: 80px 106px; animation: shadow 3.2s ease-in-out infinite; }
.ea-float { animation: bob 3.2s ease-in-out infinite; }
.ea-anvil { fill: var(--ink); }
.ea-face { fill: none; stroke: var(--ink-text); stroke-width: 2.4; stroke-linecap: round; }
.ea-spark { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.ea-spark-2 { animation-delay: .8s; } .ea-spark-3 { animation-delay: 1.5s; }

.login-page { display: grid; place-items: center; align-content: center; gap: 20px; padding: 80px 16px 40px; position: relative; overflow-x: hidden; }
.login-page::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(var(--dots) 1px, transparent 1.2px); background-size: 22px 22px; -webkit-mask: radial-gradient(ellipse 60% 55% at 50% 45%, #000 30%, transparent 75%); mask: radial-gradient(ellipse 60% 55% at 50% 45%, #000 30%, transparent 75%); }
.login-page::after { content: ""; position: fixed; z-index: -1; pointer-events: none; width: 520px; height: 520px; left: 50%; top: 42%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); filter: blur(10px); }
.login-corner { position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.login-card { width: 100%; max-width: 380px; padding: 36px 32px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.login-mark { margin-bottom: 22px; }
.login-mark .logo { width: 44px; height: 44px; }
.login-mark .logo-spark { animation: twinkle-once .7s .35s cubic-bezier(.3,1.4,.5,1) both; }
.login-mark .logo-ember-1 { animation: ember 1.2s .5s ease-out; }
.login-mark .logo-ember-2 { animation: ember 1.2s .65s ease-out; }
.login-card h1 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.login-lede { margin-top: 6px; color: var(--text-3); font-size: 14.5px; }
.login-form { display: grid; gap: 14px; margin-top: 26px; }
.login-form .btn-block { margin-top: 8px; }
.login-foot { font-size: 12.5px; color: var(--text-3); }

/* ---- small screens --------------------------------------------------------------------- */
@media (max-width: 719px) {
  .topbar-inner { height: 56px; gap: 8px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .topbar-end { gap: 4px; }
  .userbox { padding-left: 6px; gap: 0; }
  .icon-btn { width: 40px; height: 40px; }
  .theme-toggle { display: none; }
  .settings .theme-toggle { display: inline-flex; }
  .page { padding: 24px 16px 120px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hero { margin-bottom: 18px; }
  .card { padding: 16px; border-radius: 16px; }
  .card-title { font-size: 20px; }
  .boss-card .golem { width: 90px; height: 90px; }
  .map { height: 300px; }
  .logger-bar { top: 57px; }
  .login-card { padding: 30px 22px 24px; border-radius: 20px; }
  .xp-kind { grid-template-columns: 110px 1fr 60px; }
  .lift-row { grid-template-columns: 1fr 70px 80px; }
}
@media (pointer: coarse) { .theme-toggle { --seg: 40px; } }

/* ---- keyframes ----------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { width: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-in { from { transform: rotate(-90deg) scale(.6); } }
@keyframes tilt-in { from { transform: rotate(40deg) scale(.6); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes float-y { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
@keyframes arm { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: .08; } 50% { transform: scaleX(.86); opacity: .05; } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.5) rotate(45deg); opacity: .4; } }
@keyframes twinkle-once { 0% { transform: scale(0) rotate(-120deg); } 100% { transform: none; } }
@keyframes ember { 0% { opacity: 0; transform: translateY(2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-5px); } }
@keyframes shake { 20%, 80% { transform: translateX(-2px); } 40%, 60% { transform: translateX(3px); } }
@keyframes pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 33% { transform: scale(1.08, .95) rotate(2deg); } 66% { transform: scale(.95, 1.06) rotate(-1deg); } }
@keyframes glow { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
@keyframes draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } }
@keyframes nudge { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes cel-in { from { opacity: 0; transform: translateY(30px) scale(.9); } }
@keyframes badge-spin { from { transform: rotateY(-180deg) scale(.4); opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.95); } }

/* ---- reduced motion ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 1ms !important; transition-delay: 0s !important; }
}

/* ---- utilities (inline styles are blocked by the CSP) --------------------------------------- */
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mb-16 { margin-bottom: 16px; }
.bleed { margin-left: -10px; margin-right: -10px; }
.page-narrow { max-width: 820px; }
.pr-card { background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.num-r { text-align: right; }

/* ---- Forge Pass badge frames ------------------------------------------------------------------ */
.frame { position: relative; isolation: isolate; }
.frame::before { content: ""; position: absolute; inset: -12%; z-index: -1; border-radius: 50%; }
.frame-ember::before { background: radial-gradient(circle, rgb(255 122 61 / .45), transparent 65%); animation: glow 2.4s ease-in-out infinite; }
.frame-molten::before { inset: -8%; background: conic-gradient(from 0deg, #ff4d00, #ffb547, #ff2d55, #ff4d00); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%, #000 70%, transparent 72%); mask: radial-gradient(circle, transparent 58%, #000 60%, #000 70%, transparent 72%); animation: spin 4s linear infinite; filter: drop-shadow(0 0 6px rgb(255 90 30 / .6)); }
.frame-damascus::before { inset: -9%; background: repeating-conic-gradient(from 0deg, #3f3f46 0 6deg, #a1a1aa 6deg 9deg, #d4d4d8 9deg 12deg, #52525b 12deg 18deg); -webkit-mask: radial-gradient(circle, transparent 57%, #000 59%, #000 71%, transparent 73%); mask: radial-gradient(circle, transparent 57%, #000 59%, #000 71%, transparent 73%); animation: spin 18s linear infinite; }
.banner-soft { background: var(--accent-softer); color: var(--accent-text); }
.public-card { max-width: 520px; }
.public-p { margin-top: 12px; font-size: 14.5px; color: var(--text-2); }
.public-p a, .login-foot a { color: var(--accent-text); }
/* charts are drawn ~640 wide and shrink on phones: keep their labels readable */
@media (max-width: 719px) {
  .linechart .axis, .bars .axis { font-size: 17px; }
}
@media (max-width: 640px) { .laps th:nth-child(5), .laps td:nth-child(5) { display: none; } .laps { font-size: 13px; } }
@media (max-width: 640px) { .status-row .k { width: 108px; } }
.discard { justify-self: center; border: 0; background: none; color: var(--text-3); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.discard:hover { color: var(--danger); }
