/* RunFinite - design tokens and components
   Five colour themes share one set of tokens, so every screen follows the chosen theme.
   Accent fills (--emerald) are for fills and marks only; text and links use --brand-ink (≥4.5:1 on the page ground). */

:root {
  --flag-red: #E03A3E;
  --run-1: #F26B1D;
  --run-2: #D9480F;
  --focus: #0A84FF;
  --badge-bg: #D32F2F;   /* count badges: white 11px text needs 4.5:1, so darker than the flag red */
  --font: "RF Digits", "Noto Serif Bengali", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Bangla digits everywhere: RF Digits (fonts.css), the classic "১" of the month calendar.
     Big numbers: Barlow Condensed for Latin digits; Bangla digits in RF Digits (bold: Hind 700, already loaded).
     They used to fall to Noto Serif Bengali, which cost up to four more font files (271 KB) just for ০-৯. */
  --font-metric: "Barlow Condensed", "RF Digits", "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;

  --r-panel: 20px;
  --r-ctl: 12px;
  --rail: 268px;
  --header-h: 60px;
  --bottom-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* Colour themes - the circle button in the top bar cycles through them in this order.
   Names in the code: white, green (dark deep green), marine (marine blue), sky (sky blue), orange.
   --emerald/--mint are the historical names of the accent fill and the page ground in every theme. */
:root, :root[data-theme="white"] {
  --emerald: #00B894;
  --emerald-2: #008F72;
  --brand-ink: #007A62;
  --brand-ink-strong: #006B56;
  --mint: #F6F9F8;
  --mint-2: #EAF1EE;
  --ink: #17252A;
  --muted: #5B6F6A;
  --line: #DCE6E2;
  --card: #FFFFFF;
  --ok-bg: #E3F6EE;
  --on-brand: #FFFFFF;
  --on-accent: #0E2A24;
  --btn-bg: #007A62;
  --btn-bg-hover: #006B56;
  --shadow-lift: 0 10px 24px -12px rgba(23, 37, 42, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  --series-run: #eb6834; --series-ride: #2a78d6; --series-walk: #1baf7a;
  color-scheme: light;
}
:root[data-theme="green"] {
  --emerald: #2ED3A0;
  --emerald-2: #1FB587;
  --brand-ink: #5BE3B8;
  --brand-ink-strong: #8AEDCD;
  --mint: #0A1F17;
  --mint-2: #0F2A1F;
  --ink: #E5F3EC;
  --muted: #9BBBAD;
  --line: #1F4232;
  --card: #11281E;
  --ok-bg: #144232;
  --on-brand: #062016;
  --on-accent: #062016;
  --btn-bg: #2ED3A0;
  --btn-bg-hover: #5BE3B8;
  --shadow-lift: 0 10px 24px -12px rgba(0, 0, 0, .6);
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --series-run: #d95926; --series-ride: #3987e5; --series-walk: #199e70;
  color-scheme: dark;
}
:root[data-theme="marine"] {
  --emerald: #3DA9FC;
  --emerald-2: #2A8AD8;
  --brand-ink: #7CC4FF;
  --brand-ink-strong: #A8D8FF;
  --mint: #0A1628;
  --mint-2: #0F1F36;
  --ink: #E7EEF8;
  --muted: #9FB2CB;
  --line: #223A5C;
  --card: #12233D;
  --ok-bg: #15365A;
  --on-brand: #06142A;
  --on-accent: #06142A;
  --btn-bg: #3DA9FC;
  --btn-bg-hover: #6BBEFD;
  --shadow-lift: 0 10px 24px -12px rgba(0, 0, 0, .6);
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --series-run: #d95926; --series-ride: #3987e5; --series-walk: #199e70;
  color-scheme: dark;
}
:root[data-theme="sky"] {
  --emerald: #2D9CDB;
  --emerald-2: #1B7FBF;
  --brand-ink: #0B64A3;
  --brand-ink-strong: #08518A;
  --mint: #EFF7FD;
  --mint-2: #DFEFFB;
  --ink: #10253A;
  --muted: #4C6379;
  --line: #CBE1F2;
  --card: #FFFFFF;
  --ok-bg: #DDEEFB;
  --on-brand: #FFFFFF;
  --on-accent: #06233A;
  --btn-bg: #0B64A3;
  --btn-bg-hover: #08518A;
  --shadow-lift: 0 10px 24px -12px rgba(16, 37, 58, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  color-scheme: light;
}
:root[data-theme="orange"] {
  --emerald: #F28A2E;
  --emerald-2: #D96F14;
  --brand-ink: #A44800;
  --brand-ink-strong: #873B00;
  --mint: #FFF6EE;
  --mint-2: #FDE9D8;
  --ink: #2B1A0F;
  --muted: #6E5444;
  --line: #F2D8C2;
  --card: #FFFFFF;
  --ok-bg: #FDE7D3;
  --on-brand: #FFFFFF;
  --on-accent: #2B1400;
  --btn-bg: #A44800;
  --btn-bg-hover: #873B00;
  --shadow-lift: 0 10px 24px -12px rgba(43, 26, 15, .28);
  --danger: #C62828;
  --danger-bg: #FDECEC;
  --warn: #8A5A00;
  --warn-bg: #FFF4D6;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Icons (bi.js) without a size of their own stay text-sized instead of filling their box; every rule that sizes an icon wins. */
:where(svg.bi) { width: 1.15em; height: 1.15em; vertical-align: -0.18em; flex: none; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--mint);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;   /* no grey/blue box over links and buttons on phones */
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot-message { max-width: 520px; margin: 15vh auto; padding: 24px; text-align: center; }
/* Loading skeleton: the page's frame in grey shimmering blocks. index.php draws it before any script has loaded;
   app.js shows .skel-page inside the real frame while the first page loads. */
.skel-page i, .boot-skel .bs-rail > i, .boot-skel .bs-tabs > i {
  display: block; border-radius: 14px;
  background: linear-gradient(90deg, var(--mint-2) 0%, color-mix(in srgb, var(--mint-2) 40%, var(--card)) 50%, var(--mint-2) 100%) 0 0 / 200% 100%;
  animation: skel-shine 1.3s ease-in-out infinite;
}
@keyframes skel-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel-page i, .boot-skel i { animation: none; } }
.skel-page { display: grid; gap: 14px; max-width: 1120px; margin: 0 auto; }
.skel-page .sk-h { height: 30px; width: min(60%, 340px); }
.skel-page .sk-search { height: 50px; border-radius: 999px; }
.skel-page .sk-chips { height: 34px; width: min(90%, 520px); border-radius: 999px; }
.skel-page .sk-card { height: 128px; border-radius: 18px; }
.boot-skel { min-height: 100vh; min-height: 100dvh; }
.boot-skel .bs-rail { display: none; }
.boot-skel .bs-top { position: sticky; top: 0; height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) 14px 0;
  display: flex; align-items: center; gap: 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.boot-skel b { font-size: 20px; color: var(--brand-ink); }
.boot-skel .bs-main { padding: 16px 16px calc(var(--bottom-h) + var(--safe-b) + 28px); }
.boot-skel .bs-tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-h) + var(--safe-b)); padding: 0 6% var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; }
.boot-skel .bs-tabs > i { width: 30px; height: 30px; border-radius: 10px; }
.boot-skel .bs-tabs > .bs-run { width: 58px; height: 58px; border-radius: 50%; transform: translateY(-14px); }
@media (min-width: 1024px) {
  .boot-skel { display: grid; grid-template-columns: var(--rail) 1fr; }
  .boot-skel .bs-rail { display: flex; flex-direction: column; gap: 12px; padding: 22px; position: sticky; top: 0; height: 100vh;
    background: var(--card); border-right: 1px solid var(--line); }
  .boot-skel .bs-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
  .boot-skel .bs-brand b { font-size: 24px; }
  .boot-skel .bs-rail > i { height: 36px; }
  .boot-skel .bs-top { height: 64px; }
  .boot-skel .bs-top img, .boot-skel .bs-top b { display: none; }
  .boot-skel .bs-main { padding: 24px 32px; }
  .boot-skel .bs-tabs { display: none; }
}

/* ---------- Shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: calc(var(--header-h) + var(--safe-t));
  padding: var(--safe-t) 8px 0;
  display: flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand b { font-size: 20px; line-height: 1.1; color: var(--brand-ink); }
.brand small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }

/* Inline icons inside text (links, paragraphs) take the text size unless a component sizes them. */
p svg, li svg, dd svg, label svg, h1 svg, h2 svg, h3 svg, summary svg, a:not([class]) svg { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex-shrink: 0; display: inline-block; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--mint-2); }
.icon-btn svg { width: 24px; height: 24px; }
.chip-btn {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--mint-2); color: var(--brand-ink); font-weight: 600; cursor: pointer;
}

.rail { display: none; }
.content { padding: 16px 16px calc(var(--bottom-h) + var(--safe-b) + 28px); max-width: 1120px; margin: 0 auto; }

/* Drawer (mobile) */
.scrim { position: fixed; inset: 0; background: rgba(10, 20, 22, .45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(86vw, 330px);
  background: var(--card); transform: translateX(-102%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding-bottom: var(--safe-b);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.open { transform: none; box-shadow: var(--shadow-lift); }
.drawer-head {
  padding: calc(20px + var(--safe-t)) 20px 18px;
  background: linear-gradient(135deg, var(--emerald), color-mix(in srgb, var(--emerald) 55%, var(--emerald-2)));
  color: var(--on-accent); display: flex; gap: 14px; align-items: center;
}
.drawer-head img { width: 56px; height: 56px; filter: drop-shadow(0 0 3px rgba(255,255,255,.7)); }
.drawer-head b { font-size: 24px; display: block; line-height: 1.15; }
.drawer-head small { font-size: 14px; font-weight: 500; }

.nav-group { padding: 8px 10px; }
.nav-group + .nav-group { border-top: 1px solid var(--line); }
.nav-group h3 { margin: 6px 12px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 48px; padding: 8px 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; font-size: 16px;
}
.nav-item svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.nav-item:hover { background: var(--mint-2); }
.nav-item[aria-current="page"] { background: var(--ok-bg); color: var(--brand-ink); font-weight: 600; }
.nav-item[aria-current="page"] svg { color: var(--brand-ink); }
.nav-item .ext { margin-left: auto; width: 16px; height: 16px; opacity: .6; }
.nav-item .value { margin-left: auto; font-size: 14px; color: var(--brand-ink); font-weight: 600; }
.drawer-foot { margin-top: auto; padding: 16px 22px; font-size: 13px; color: var(--muted); }

/* Bottom navigation (mobile) */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--bottom-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bottombar.no-run { grid-template-columns: repeat(4, 1fr); }   /* website: no Run button (recording is in the Android app only) */
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 100%; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--brand-ink); font-weight: 700; }
.tab-run { position: relative; }
.run-disc {
  width: 66px; height: 66px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #FF8A3D, var(--run-1) 45%, var(--run-2));
  color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .2px;
  box-shadow: 0 8px 18px -6px rgba(217, 72, 15, .7), 0 0 0 5px var(--card);
  transform: translateY(-18px);
  text-decoration: none; border: 0; cursor: pointer;
}
/* Run buttons: a springy press with an orange glow and a ring that bursts outward (no box around them). */
.run-disc, .start-disc { position: relative; isolation: isolate; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease, filter .22s ease; }
.run-disc::after, .start-disc::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(255, 138, 61, .55) 0%, rgba(255, 138, 61, 0) 70%); opacity: 0; transform: scale(.6); }
.run-disc.burst::after, .start-disc.burst::after { animation: run-burst .6s cubic-bezier(.2, .7, .3, 1); }
@keyframes run-burst { 0% { opacity: .95; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.9); } }
.tab-run:active .run-disc, .run-disc:active { transform: translateY(-15px) scale(.9); filter: brightness(1.08);
  box-shadow: 0 3px 10px -4px rgba(217, 72, 15, .8), 0 0 0 5px var(--card), 0 0 0 9px rgba(255, 138, 61, .25); }
.start-disc:not(:disabled):active { transform: scale(.9); filter: brightness(1.08); box-shadow: 0 4px 12px -6px rgba(217, 72, 15, .9), 0 0 0 8px rgba(255, 138, 61, .22); }
.tab-run:focus { outline: none; }
.tab-run:focus-visible .run-disc { box-shadow: 0 8px 18px -6px rgba(217, 72, 15, .7), 0 0 0 5px var(--card), 0 0 0 8px var(--focus); }
.start-disc:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) { .run-disc, .start-disc { transition: none; } .run-disc.burst::after, .start-disc.burst::after { animation: none; } }
.tab-run span.lbl { position: absolute; bottom: 6px; font-size: 13px; color: var(--muted); }
.tab-run[aria-current="page"] span.lbl { color: var(--run-2); font-weight: 700; }

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--rail) 1fr; }
  .rail {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: var(--card); border-right: 1px solid var(--line);
  }
  .rail .brand { padding: 22px 22px 14px; }
  .rail .brand img { width: 44px; height: 44px; }
  .rail .brand b { font-size: 24px; }
  .drawer, .scrim, .bottombar, .topbar .menu-btn, .topbar .brand { display: none; }
  .topbar { padding: 0 24px 0 32px; height: 64px; }
  .content { padding: 28px 40px 64px; }
}

/* ---------- Common blocks ---------- */
.page-head { margin: 4px 0 18px; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel h2 { margin: 0 0 10px; font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: var(--btn-bg); color: var(--on-brand);
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; }
.btn-quiet { background: transparent; color: var(--brand-ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--mint-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-run { background: linear-gradient(180deg, var(--run-1), var(--run-2)); color: #fff; }
.btn-run:hover { background: var(--run-2); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card);
  font-size: 16px;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand-ink); outline: 2px solid color-mix(in srgb, var(--brand-ink) 35%, transparent); outline-offset: 0; }
.field.invalid .input { border-color: var(--danger); }

/* Every dropdown in the app (event sort, filters, forms, admin…): a soft card with a round chevron badge,
   a gentle tint of the theme colour, and a clear focus ring - the same look as the game menus. */
select.input {
  -webkit-appearance: none; appearance: none;
  min-height: 50px; padding: 10px 52px 10px 16px;
  border: 2px solid color-mix(in srgb, var(--brand-ink) 22%, var(--line));
  border-radius: 16px;
  font-weight: 600; cursor: pointer; text-overflow: ellipsis;
  background-color: var(--card);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23006B56' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, color-mix(in srgb, var(--brand-ink) 14%, transparent) 0 15px, transparent 16px),
    linear-gradient(180deg, color-mix(in srgb, var(--card) 100%, transparent), color-mix(in srgb, var(--brand-ink) 5%, var(--card)));
  background-repeat: no-repeat;
  background-size: 20px 20px, 34px 34px, 100% 100%;
  background-position: right 15px center, right 8px center, 0 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--brand-ink) 10%, transparent);
  transition: border-color .18s ease, box-shadow .18s ease, transform .1s ease;
}
select.input:hover { border-color: color-mix(in srgb, var(--brand-ink) 55%, var(--line)); }
select.input:focus, select.input:focus-visible {
  outline: none; border-color: var(--brand-ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-ink) 18%, transparent), 0 8px 20px color-mix(in srgb, var(--brand-ink) 14%, transparent);
}
select.input:active { transform: scale(0.995); }
select.input:disabled { opacity: .55; cursor: not-allowed; }
select.input option { background: var(--card); color: var(--ink); font-weight: 500; }
/* Dark themes: a light chevron */
:root[data-theme="green"] select.input, :root[data-theme="marine"] select.input, :root[data-theme="dark"] select.input {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23BFF5E2' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, color-mix(in srgb, var(--brand-ink) 22%, transparent) 0 15px, transparent 16px),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--brand-ink) 8%, var(--card)));
}
:root[data-theme="sky"] select.input {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%231F6FA8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, color-mix(in srgb, var(--brand-ink) 14%, transparent) 0 15px, transparent 16px),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--brand-ink) 5%, var(--card)));
}
:root[data-theme="orange"] select.input {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23B5470A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, color-mix(in srgb, var(--brand-ink) 14%, transparent) 0 15px, transparent 16px),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--brand-ink) 5%, var(--card)));
}
/* Compact dropdowns inside tables and rows */
select.input.input-sm, .sh-orders select.input, .dn-row select.input, td select.input {
  min-height: 40px; padding: 6px 42px 6px 12px; border-radius: 12px;
  background-size: 16px 16px, 28px 28px, 100% 100%;
  background-position: right 12px center, right 6px center, 0 0;
}
.field.invalid select.input { border-color: var(--danger); }
.field .err { display: block; color: var(--danger); font-size: 14px; margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-wrap .icon-btn { position: absolute; right: 2px; top: 2px; }

.notice { padding: 12px 14px; border-radius: var(--r-ctl); background: var(--ok-bg); margin: 0 0 14px; }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-h) + var(--safe-b) + 18px); z-index: 60; display: grid; gap: 8px; width: min(92vw, 440px); }
@media (min-width: 1024px) { .toast-host { bottom: 28px; } }
.toast { background: var(--ink); color: var(--mint); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lift); font-size: 15px; }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h2 { color: var(--ink); font-size: 20px; margin: 0 0 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--muted); font-size: 14px; background: var(--mint-2); }
table.data tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 10px; border-radius: 999px; background: var(--mint-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--brand-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.tabs a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--card); min-height: 40px; display: inline-flex; align-items: center; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--mint); border-color: var(--ink); }

/* ---------- Auth ---------- */
.auth { max-width: 440px; margin: 8px auto 0; }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-head img { width: 64px; height: 64px; margin: 0 auto 8px; }
.auth-head h1 { margin: 0; font-size: 26px; }
.auth-head p { margin: 2px 0 0; color: var(--muted); }
.auth .switch { text-align: center; margin-top: 16px; }
/* "Continue with Google": Google's own button in a browser, ours (same look) in the Android app */
.google-login { margin: 0 0 4px; }
.google-login .or-line { margin: 16px 0 14px; }
.google-login.busy { opacity: .6; pointer-events: none; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.btn.btn-google { background: #fff; color: #1f1f1f; border-color: #747775; }
.btn.btn-google:hover { background: #f2f2f2; }
.btn.btn-google svg { width: 20px; height: 20px; flex: none; }
.google-login .notice { margin: 12px 0 0; }

/* ---------- দৌড়শিক্ষা ---------- */
.learn { max-width: 760px; margin: 0 auto; }
.wordmark { text-align: center; margin: 10px 0 4px; font-weight: 700; line-height: 1.05; letter-spacing: -0.5px; font-size: clamp(44px, 12vw, 76px); }
.wordmark .a { color: var(--brand-ink); }
.wordmark .b { color: var(--ink); }
.tagline { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: 16px; }
.ask-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 14px; box-shadow: var(--shadow-lift); }
.ask-input {
  width: 100%; min-height: 56px; max-height: 180px; resize: none;
  border: 0; background: transparent; padding: 10px 8px; font-size: 18px; line-height: 1.5;
}
.ask-input:focus { outline: none; }
.ask-card:focus-within { border-color: var(--brand-ink); }
.ask-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.voice-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--mint-2); cursor: pointer; font-weight: 600;
}
.voice-btn .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); display: grid; place-items: center; }
.voice-btn .dot svg { width: 18px; height: 18px; }
.voice-btn.listening .dot { background: var(--flag-red); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--flag-red) 25%, transparent); } }
.ask-actions .btn { margin-left: auto; min-width: 112px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 2px 0; align-items: center; }
.suggestions .lbl { color: var(--muted); font-size: 14px; margin-right: 2px; }
.sugg { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; min-height: 40px; cursor: pointer; font-size: 15px; }
.sugg:hover { border-color: var(--brand-ink); color: var(--brand-ink); }

.answer-zone { margin-top: 24px; display: grid; gap: 16px; }
/* Answer first, then the related articles below it (as on the old দৌড়শিক্ষা page). */
@media (min-width: 1100px) {
  .learn.has-answer { max-width: 860px; }
}
.answer { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; }
.answer h2 { font-size: 18px; margin: 0 0 4px; }
.answer .mode { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.answer .body { max-width: 68ch; font-size: 17px; line-height: 1.75; }
.answer .body p { margin: 0 0 12px; }
.answer .cite { font-size: 12px; vertical-align: super; font-weight: 700; color: var(--brand-ink); text-decoration: none; padding: 0 2px; }
.passage { padding: 10px 14px; margin: 0 0 18px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--emerald) 7%, var(--card)); }
.passage .from { font-size: 14px; color: var(--muted); margin-top: 6px; }
.passage p { margin: 0 0 8px; white-space: pre-line; }
.answer .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.disclaimer { display: flex; gap: 10px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.disclaimer svg { width: 20px; height: 20px; flex: none; color: var(--warn); }

.sources { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.sources h2 { font-size: 16px; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.sources h2 span { color: var(--muted); font-weight: 500; font-size: 14px; }
.source { display: block; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.source:hover { background: var(--mint-2); }
.source b { display: block; font-weight: 600; line-height: 1.4; }
.source small { color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.source .bar { height: 4px; border-radius: 4px; background: var(--mint-2); margin-top: 8px; overflow: hidden; }
.source .bar i { display: block; height: 100%; background: var(--emerald); }

.article { max-width: 72ch; margin: 0 auto; }
.article h1 { font-size: 30px; line-height: 1.3; margin: 0 0 6px; }
.article .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.article .text { font-size: 18px; line-height: 1.8; }
.article .text p { margin: 0 0 16px; white-space: pre-line; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Profile */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--emerald); color: var(--on-accent); font-size: 30px; font-weight: 700; flex: none; }
.profile-head h1 { margin: 0; font-size: 24px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

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

.main-col { min-width: 0; }
#main:focus { outline: none; }
/* Everything on the page (maps use z-index 400–1000 inside) stays below the side menu, its shade, the top bar and
   the bottom bar: the page area is its own layer at the bottom. */
#main { position: relative; z-index: 0; isolation: isolate; }
.answer-zone > :only-child { grid-column: 1 / -1; }
.rail-run { display: flex; align-items: center; gap: 14px; margin: 4px 16px 10px; padding: 10px 12px; border-radius: 16px; text-decoration: none; color: var(--ink); font-weight: 600; background: var(--mint-2); }
.rail-run .run-disc { width: 52px; height: 52px; font-size: 15px; transform: none; box-shadow: 0 6px 14px -6px rgba(217, 72, 15, .7); }
.rail-run:hover { background: var(--ok-bg); }

/* ---------- Recording ---------- */
body.immersive .content { padding: 0; max-width: none; }
@media (max-width: 1023px) {
  body.immersive .topbar, body.immersive .bottombar { display: none; }
}
.rec {
  position: relative; height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: minmax(34vh, 1fr) auto;
  background: var(--card); overflow: hidden;
}
.rec-map { position: relative; min-height: 0; }
.rec-map-canvas { position: absolute; inset: 0; background: var(--mint-2); }
.map-note {
  position: absolute; z-index: 500; left: 12px; right: 12px; bottom: 30px;
  background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lift);
}
.map-locate { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-lift); cursor: pointer; }
.map-locate svg { width: 22px; height: 22px; }
.leaflet-container { font-family: var(--font); isolation: isolate; z-index: 0; }
.rec-panel {
  position: relative; z-index: 600; margin-top: -18px; padding: 10px 16px calc(14px + var(--safe-b));
  background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, .35);
  max-height: 72dvh; overflow-y: auto;
}
.rec-head { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.rec-head .rec-view-btn { margin-left: auto; }
.gps-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--mint-2); color: var(--muted); }
.gps-pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.gps-pill.weak { background: var(--warn-bg); color: var(--warn); }
.gps-pill.lost { background: var(--danger-bg); color: var(--danger); }
.rec-head .gps-pill { margin: 0 auto; }
/* GPS state colours of the recording screen: orange while searching, a bright green once GPS is ready.
   Light themes (white, sky, orange) use these; the dark themes (green, marine) and the orange theme override below. */
.rec {
  --gps-search-1: #FFB054; --gps-search-2: #F76707; --gps-search-3: #C2410C; --gps-search-glow: rgba(247, 103, 7, .45);
  --gps-search-bg: #FFEDD5; --gps-search-ink: #9A3412;
  --gps-ready-1: #5EE68D; --gps-ready-2: #16A34A; --gps-ready-3: #0F7A37; --gps-ready-glow: rgba(22, 163, 74, .5);
  --gps-ready-bg: #DCFCE7; --gps-ready-ink: #166534;
}
:root[data-theme="green"] .rec, :root[data-theme="marine"] .rec, :root[data-theme="dark"] .rec {
  --gps-search-bg: rgba(251, 146, 60, .2); --gps-search-ink: #FDBA74;
  --gps-ready-bg: rgba(74, 222, 128, .18); --gps-ready-ink: #86EFAC; --gps-ready-glow: rgba(74, 222, 128, .55);
}
/* Orange theme: the accent is orange already, so "searching" is a deeper burnt orange with a pulsing ring. */
:root[data-theme="orange"] .rec {
  --gps-search-1: #E8590C; --gps-search-2: #B5470A; --gps-search-3: #8A3306; --gps-search-glow: rgba(138, 51, 6, .5);
  --gps-search-bg: #FFE1C7; --gps-search-ink: #7C2D12;
}
.gps-pill.searching { background: var(--gps-search-bg); color: var(--gps-search-ink); }
.gps-pill.searching i { animation: gps-blink 1.2s ease-in-out infinite; }
.gps-pill.good { background: var(--gps-ready-bg); color: var(--gps-ready-ink); }
@keyframes gps-blink { 50% { opacity: .25; } }
.rec-banner { margin: 8px 0; padding: 10px 14px; border-radius: 14px; background: var(--mint-2); }
.rec-banner p { margin: 4px 0; }
.rec-banner.paused { background: #FFC21A; color: #231B00; }
.rec-banner.paused b { font-size: 18px; }
.rec-banner.error { background: var(--danger-bg); color: var(--danger); }
.rec-banner.error .btn { margin-top: 8px; }
/* Two rows of two (Distance | Current pace, Time | Average pace), every number in the big Time size. The size follows
   the panel width (cqi) so "1:02:33" still fits half of a 360 px phone; browsers without container units use vw. */
.metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; margin: 8px 0 4px; text-align: center; container-type: inline-size; }
.metric { min-width: 0; }
.metric b { display: block; font-family: var(--font-metric); font-weight: 700; font-size: clamp(40px, 13.5vw, 60px); font-size: min(60px, 15cqi); line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: .3px; white-space: nowrap; }
.metric span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.metric-sub { text-align: center; font-size: 13px; color: var(--muted); min-height: 1em; }
.splits-bars { display: grid; gap: 4px; margin: 8px 0; }
.split { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px; font-family: var(--font-metric); font-size: 17px; font-variant-numeric: tabular-nums; }
.split-track { height: 10px; border-radius: 6px; background: var(--mint-2); overflow: hidden; }
.split-track i { display: block; height: 100%; background: var(--emerald); border-radius: 6px; }
.split.partial .split-track i { background: var(--run-1); }
/* Split bars (recording screen and saved activity): label | pace or km | bar (longer = faster) */
.sb-list { display: grid; gap: 2px; }
.sb-row { display: grid; grid-template-columns: 64px 92px 1fr; align-items: center; gap: 10px; padding: 3px 0; font-family: var(--font-metric); font-size: 17px; font-variant-numeric: tabular-nums; }
.sb-head { font-family: var(--font); font-size: 12.5px; color: var(--muted); padding: 0 0 2px; }
.sb-value small { display: block; font-family: var(--font); font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.sb-track { height: 16px; display: block; }
.sb-track i { display: block; height: 100%; background: #1E5BD8; border-radius: 3px; }
.sb-row.partial .sb-track i { background: color-mix(in srgb, #1E5BD8 55%, transparent); }
.sb-row.partial .sb-label { font-style: italic; }
.sb-list.compact { max-height: 132px; overflow-y: auto; margin: 6px 0; padding-right: 4px; }
.sb-list.compact .sb-row { font-size: 15px; grid-template-columns: 54px 84px 1fr; padding: 1px 0; }
.sb-list.compact .sb-track { height: 12px; }
.rec-kcal { text-align: center; font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.rec-kcal b { font-family: var(--font-metric); font-size: 20px; color: var(--ink); }
.rec-kcal svg { width: 16px; height: 16px; vertical-align: -2px; color: var(--run-1); }
/* Steps (walk / trek): one centred line under the four big numbers, a short note below it when needed. */
.rec-steps { text-align: center; font-size: 14px; color: var(--muted); margin: 2px 0 0; overflow-wrap: anywhere; }
.rec-steps b { font-family: var(--font-metric); font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rec-steps svg { width: 17px; height: 17px; vertical-align: -2px; color: var(--emerald); }
.rec-steps-note { display: block; font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.rec-steps-note .btn { margin: 4px 0 0 4px; }
.rec[data-view="big"] .rec-steps b { font-size: clamp(28px, 9vw, 44px); }
.rec-controls { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 12px 0 6px; }
.rec-controls .btn { flex: 1 1 140px; min-height: 60px; font-size: 19px; border-radius: 999px; }   /* Pause / Resume / Finish: pill like the login button */
/* Before Start: round mode button (white, theme border) and the Start button side by side, same size. */
.start-row { display: flex; gap: 22px; align-items: center; justify-content: center; }
.mode-disc { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: #fff; color: var(--brand-ink); border: 3px solid var(--brand-ink); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .35); }
.mode-disc svg, .mode-disc .bi { width: 40px; height: 40px; }
.mode-disc:active { transform: scale(.94); }
.mode-menu { flex-basis: 100%; max-width: 340px; margin: 0 auto 4px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .35);
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mode-menu[hidden] { display: none; }
.mode-menu-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 12px;
  background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.mode-menu-item svg, .mode-menu-item .bi { width: 22px; height: 22px; color: var(--brand-ink); }
.mode-menu-item:hover, .mode-menu-item[aria-selected="true"] { background: var(--mint-2); }
/* The other sports show an emoji in place of an icon (round mode button, chips, menu) */
.mode-emoji { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 19px; line-height: 1; }
.mode-disc .mode-emoji { width: 44px; height: 44px; font-size: 40px; }
/* "⋯" at the top right of the recording map: audio cues */
.rec-more { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; z-index: 500; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--card); color: var(--ink); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .4); font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; }
.rec-more:active { transform: scale(.94); }
.cue-sheet { width: min(460px, 100%); }
.cue-head { display: flex; align-items: center; gap: 8px; }
.cue-head h2 { flex: 1; margin: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.cue-head h2 svg { width: 20px; height: 20px; color: var(--brand-ink); }
.cue-sec { margin: 16px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.cue-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 2px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 600; }
.cue-check { justify-content: space-between; }
.cue-opt input { width: 22px; height: 22px; accent-color: var(--btn-bg); flex: none; }
/* "Other": every sport, grouped */
.sport-sheet { width: min(520px, 100%); max-height: 88vh; padding: 0; display: flex; flex-direction: column; }
.sport-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.sport-head h2 { flex: 1; margin: 0; font-size: 19px; }
.sport-body { overflow-y: auto; padding: 4px 12px 16px; }
.sport-group h3 { margin: 14px 6px 4px; font-size: 16px; }
.sport-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.sport-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 12px; background: none;
  color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.sport-item:hover, .sport-item.on { background: var(--mint-2); }
.sport-emo { width: 28px; text-align: center; font-size: 22px; line-height: 1; flex: none; }
@media (max-width: 380px) { .sport-list { grid-template-columns: 1fr; } }
/* Location pop-up card (recording screen, location not allowed yet): white card, picture and button in theme colours. */
.loc-card-back { position: fixed; inset: 0; z-index: 1000;   /* above the recording panel (600) */ display: grid; place-items: center; padding: 20px;
  background: color-mix(in srgb, var(--ink) 38%, transparent); opacity: 0; transition: opacity .2s; }
.loc-card-back.show { opacity: 1; }
.loc-card { position: relative; width: min(100%, 360px); padding: 30px 26px 26px; border-radius: 26px; text-align: center;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45);
  transform: translateY(14px) scale(.97); transition: transform .22s cubic-bezier(.34, 1.4, .64, 1); }
.loc-card-back.show .loc-card { transform: none; }
.loc-card-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.loc-card-x:hover { background: var(--mint-2); }
.loc-card-x svg { width: 22px; height: 22px; }
.loc-card-art svg { width: 116px; height: 106px; margin: 0 auto 6px; display: block; overflow: visible; }
.loc-card-art .lc-base { fill: color-mix(in srgb, var(--brand-ink) 18%, var(--card)); }
.loc-card-art .lc-ray { fill: none; stroke: color-mix(in srgb, var(--brand-ink) 55%, #FFC24A); stroke-width: 5; stroke-linecap: round;
  animation: lc-blink 1.6s ease-in-out infinite; }
.loc-card-art .lc-pin { fill: var(--brand-ink); }
.loc-card-art .lc-dot { fill: var(--card); }
@keyframes lc-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .loc-card-art .lc-ray { animation: none; } .loc-card, .loc-card-back { transition: none; } }
.loc-card h2 { margin: 6px 0 8px; font-size: 21px; line-height: 1.35; }
.loc-card p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.loc-card-btn { width: 100%; min-height: 54px; font-size: 17px; justify-content: center; border-radius: 14px;
  background: var(--brand-ink); color: var(--on-brand); box-shadow: 0 14px 26px -14px color-mix(in srgb, var(--brand-ink) 85%, transparent); }
.rec-controls .btn svg { width: 22px; height: 22px; }
.btn-wide { flex-basis: 100% !important; }
.btn-dark { background: var(--ink); color: var(--card); }
.btn-dark:hover { background: var(--ink); opacity: .9; }
.rec-intro { flex-basis: 100%; text-align: center; margin: 0 0 4px; }
.start-disc {
  width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #FF8A3D, var(--run-1) 45%, var(--run-2)); color: #fff;
  display: grid; place-items: center; align-content: center; gap: 2px; font-weight: 700; font-size: 18px;
  box-shadow: 0 12px 24px -10px rgba(217, 72, 15, .8);
}
.start-disc svg { width: 34px; height: 34px; }
.start-disc:disabled { background: var(--mint-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
/* Start button by GPS state (classes set in run.js): orange with a pulsing ring while searching, green when ready. */
.start-disc.gps-searching, .start-disc.gps-searching:disabled {
  background: radial-gradient(circle at 30% 25%, var(--gps-search-1), var(--gps-search-2) 45%, var(--gps-search-3)); color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); animation: gps-ring 1.6s ease-out infinite;
}
.start-disc.gps-searching:disabled { cursor: progress; }
.start-disc.gps-ready {
  background: radial-gradient(circle at 30% 25%, var(--gps-ready-1), var(--gps-ready-2) 45%, var(--gps-ready-3)); color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: 0 12px 24px -10px var(--gps-ready-glow), 0 0 0 5px color-mix(in srgb, var(--gps-ready-2) 22%, transparent);
}
.start-disc.gps-ready::after { background: radial-gradient(circle, rgba(34, 197, 94, .55) 0%, rgba(34, 197, 94, 0) 70%); }
.start-disc.gps-ready:not(:disabled):active { box-shadow: 0 4px 12px -6px var(--gps-ready-glow), 0 0 0 8px color-mix(in srgb, var(--gps-ready-2) 25%, transparent); }
@keyframes gps-ring {
  0% { box-shadow: 0 12px 24px -10px var(--gps-search-glow), 0 0 0 0 var(--gps-search-glow); }
  100% { box-shadow: 0 12px 24px -10px var(--gps-search-glow), 0 0 0 18px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .start-disc.gps-searching, .start-disc.gps-searching:disabled { animation: none; box-shadow: 0 0 0 4px var(--gps-search-glow); }
  .gps-pill.searching i { animation: none; }
}
.spinner { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line); border-top-color: var(--brand-ink); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rec-note { font-size: 13px; color: var(--muted); margin: 8px 2px 0; }

/* Large-numbers view (map hidden) */
.rec[data-view="big"] { grid-template-rows: 0 1fr; }
.rec[data-view="big"] .rec-map { visibility: hidden; }
.rec[data-view="big"] .rec-panel { margin-top: 0; border-radius: 0; box-shadow: none; max-height: none; display: flex; flex-direction: column; padding-top: calc(10px + var(--safe-t)); }
.rec[data-view="big"] .metrics { grid-template-columns: 1fr; gap: 14px; flex: 1; align-content: center; }
.rec[data-view="big"] .metric b { font-size: clamp(64px, 22vw, 132px); font-weight: 700; }
.rec[data-view="big"] .metric-time { order: -1; }   /* one column: Time stays on top */
.rec[data-view="big"] .metric-time b { font-size: clamp(56px, 18vw, 110px); }
.rec[data-view="big"] .metric span { font-size: 16px; }
.rec[data-view="big"][data-state="paused"] .rec-head { background: #FFC21A; color: #231B00; margin: -10px -16px 0; padding: calc(10px + var(--safe-t)) 16px 10px; }

/* Save sheet */
.rec[data-state="finishing"], .rec[data-state="saved"] { grid-template-rows: 0 1fr; }
.rec[data-state="finishing"] .rec-map, .rec[data-state="saved"] .rec-map { visibility: hidden; }
.save-sheet { overflow-y: auto; padding: calc(16px + var(--safe-t)) 16px calc(24px + var(--safe-b)); background: var(--mint); }
.save-form { max-width: 720px; margin: 0 auto; }
.save-form h1 { font-size: 24px; margin: 0 0 12px; }
.save-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 14px; margin-bottom: 16px; }
.save-route { color: var(--run-2); background: var(--mint-2); border-radius: 14px; margin-bottom: 10px; }
.save-route svg { width: 100%; height: auto; max-height: 220px; }
.summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0; }
.summary-stats dt { font-size: 13px; color: var(--muted); }
.summary-stats dd { margin: 0; font-family: var(--font-metric); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.radios { display: grid; gap: 6px; margin-bottom: 10px; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.radio.disabled { opacity: .55; cursor: not-allowed; }
.radio input, .check input { width: 20px; height: 20px; accent-color: var(--brand-ink); }
fieldset.plain { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.plain legend { font-weight: 600; margin-bottom: 6px; font-size: 15px; padding: 0; }
.photo-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--mint-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .icon-btn { position: absolute; top: 0; right: 0; width: 32px; height: 32px; background: rgba(0,0,0,.55); color: #fff; border-radius: 0 0 0 10px; }
.save-actions { display: grid; gap: 10px; margin-top: 8px; }
.save-actions .btn-run { min-height: 56px; font-size: 18px; }
/* Save and Resume float at the bottom of the save sheet while it scrolls; Discard waits at the very end. */
.save-float { position: sticky; bottom: calc(10px + var(--safe-b)); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 720px; margin: 18px auto 0; padding: 10px; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 22px; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); }
.save-sheet .save-float .btn { min-height: 54px; min-width: 0; margin: 0; padding: 8px 10px; gap: 6px; border-radius: 16px; font-size: 16px; justify-content: center; white-space: nowrap; }
.save-float .btn svg { flex: none; }
.save-float .btn-run { box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--run-2) 80%, transparent); }
.save-float .btn-quiet { background: var(--mint-2); border-color: var(--line); color: var(--ink); }
.save-end { max-width: 720px; margin: 28px auto 0; padding-top: 18px; border-top: 1px dashed var(--line); }
.save-end .btn { width: 100%; justify-content: center; }
/* Event picker: a search box with a list of every event (favourites first), or the chosen event as a card */
.evp { position: relative; min-width: 0; }
.evp-search { position: relative; }
.evp-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: grid; color: var(--muted); pointer-events: none; }
.evp-ic svg { width: 16px; height: 16px; }
.evp .evp-search input.input { padding-left: 40px; width: 100%; }
.evp-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; max-height: min(320px, 52vh); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 18px 38px -18px rgba(0, 0, 0, .35); }
.evp-list[hidden] { display: none; }
.evp-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px; border-radius: 12px; cursor: pointer; }
.evp-opt:hover, .evp-opt.on { background: var(--mint-2); }
.evp-empty { padding: 10px; color: var(--muted); font-size: 14px; }
.evp-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--mint-2); color: var(--muted); }
.evp-mark svg { width: 16px; height: 16px; }
.evp-mark.fav { background: color-mix(in srgb, var(--emerald) 16%, var(--card)); color: var(--brand-ink); }
.evp-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.evp-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.evp-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.evp-fav { flex: none; }
.evp-chosen { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 6px 8px 10px; border: 1px solid color-mix(in srgb, var(--emerald) 45%, var(--line)); border-radius: var(--r-ctl); background: color-mix(in srgb, var(--emerald) 7%, var(--card)); }
.evp-chosen[hidden] { display: none; }
.evp-clear { flex: none; color: var(--muted); }
/* Event page: name, one line of date · category · mode, then the buttons; the information table follows */
.evd-head { margin: 0 0 16px; }
.evd-head h1 { margin: 0 0 6px; text-wrap: balance; }
.evd-when { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.evd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evd-actions .btn { margin: 0; }
/* #tagging: records tagged with the event and the GPS Ladder */
.evt { margin: 26px 0 18px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--card); scroll-margin-top: calc(var(--header-h) + 12px); }
.evt > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 20px; }
.evt > h2 svg { width: 20px; height: 20px; color: var(--run-1); }
.evt h3 { margin: 18px 0 10px; font-size: 16px; }
.evt-mine h3 { margin-top: 12px; }
.evt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.evt-col { position: relative; min-width: 0; padding: 12px 12px 56px; border-radius: 14px; background: var(--mint); }
/* small round + at the bottom right: tag one of your own records with this event */
.evt-add { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: var(--btn-bg); color: var(--on-brand); cursor: pointer; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .35); }
.evt-add::before { content: ''; position: absolute; inset: -2px; border-radius: 50%; }   /* 44px tap area */
.evt-add .bi, .evt-add svg { width: 20px; height: 20px; }
.evt-add:hover { filter: brightness(1.08); }
.evt-add:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
/* the picker of records to tag */
.evt-pick-modal { width: min(520px, 100%); }
.evt-pick-modal h2 { display: flex; align-items: center; gap: 8px; }
.evt-pick-list { display: grid; gap: 8px; margin: 10px 0 14px; }
.evt-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.evt-pick-row:hover { border-color: color-mix(in srgb, var(--brand-ink) 40%, var(--line)); }
.evt-pick-row:disabled { opacity: .6; cursor: default; }
.evt-pick-row[aria-busy="true"] { opacity: 1; border-color: var(--btn-bg); }
.evt-pick-row, .evt-pick-list { min-width: 0; max-width: 100%; }
.evt-pick-other { color: #B45309 !important; }
:root[data-theme="green"] .evt-pick-other, :root[data-theme="marine"] .evt-pick-other, :root[data-theme="dark"] .evt-pick-other { color: #F59E0B !important; }
.evt-pick-other svg { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; }
.evt-pick-plus { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); }
.evt-pick-plus svg { width: 16px; height: 16px; }
.evt-pick-empty { margin: 8px 0; }
.evt-col h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14.5px; }
.evt-kind { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; }
.evt-kind svg { width: 15px; height: 15px; }
.evt-kind.race { background: color-mix(in srgb, var(--run-1) 16%, var(--card)); color: var(--run-2); }
.evt-kind.training { background: color-mix(in srgb, var(--emerald) 16%, var(--card)); color: var(--brand-ink); }
.evt-list { display: grid; gap: 6px; }
.evt-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.evt-row:hover { border-color: color-mix(in srgb, var(--brand-ink) 40%, var(--line)); }
.evt-row.me { background: color-mix(in srgb, var(--emerald) 6%, var(--card)); }
.evt-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.evt-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.evt-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.evt-badge { flex: none; }
.evt-badge.race { background: color-mix(in srgb, var(--run-1) 14%, var(--card)); color: var(--ink); }
.evt-nums { flex: none; display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; }
.evt-nums b { font-family: var(--font-metric); font-size: 18px; }
.evt-nums small { color: var(--muted); font-size: 12px; }
.evt-board { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.evt-acts-h { display: flex; align-items: center; gap: 6px; }
.evt-acts-h svg { width: 16px; height: 16px; color: var(--muted); }
.evt-empty { padding: 12px 0; }
@media (max-width: 600px) {
  .evt { padding: 14px 12px; }
  .evt-cols { grid-template-columns: 1fr; }
  .evt-badge { display: none; }
}

@media (min-width: 1024px) {
  .rec { height: calc(100vh - 64px); grid-template-rows: 1fr; grid-template-columns: minmax(0, 1fr) 420px; }
  .rec-panel { margin-top: 0; border-radius: 0; max-height: none; box-shadow: none; border-left: 1px solid var(--line); padding: 16px 22px; }
  .rec[data-view="big"] { grid-template-rows: 1fr; grid-template-columns: 0 1fr; }
  .rec[data-view="big"] .rec-panel { border-left: 0; }
  .rec[data-view="big"][data-state="paused"] .rec-head { margin: -16px -22px 0; padding: 12px 22px; }
  .rec[data-state="finishing"], .rec[data-state="saved"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .rec[data-state="finishing"] .rec-map, .rec[data-state="saved"] .rec-map { display: none; }
  .save-sheet { padding: 24px 32px 40px; }
}

/* ---------- Activities ---------- */
.route-svg { display: block; }
.act-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.act-filters .row { display: flex; gap: 8px; flex-wrap: wrap; }
.act-filters .row > * { flex: 1 1 140px; }
.act-list { display: grid; gap: 10px; }
.act-item {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-decoration: none; color: var(--ink);
}
.act-item:hover { border-color: var(--brand-ink); }
.act-thumb { width: 96px; height: 76px; border-radius: 12px; background: var(--mint-2); color: var(--run-2); display: grid; place-items: center; overflow: hidden; }
.act-thumb svg { width: 100%; height: 100%; }
/* Map thumbnails: calmer map colours under the orange route (like the big maps' soft style). */
.map-thumb image { filter: saturate(.7) brightness(1.04); }
.act-item h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.act-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.act-meta b { color: var(--ink); font-family: var(--font-metric); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.act-detail-map { height: 340px; border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--line); background: var(--mint-2); margin-bottom: 16px; position: relative; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat-grid div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat-grid dt { font-size: 13px; color: var(--muted); }
.stat-grid dd { margin: 0; font-family: var(--font-metric); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Saved activity page: label and value of each tile centred (distance, time, pace, elevation, calories …). */
.act-stats div { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.chart-12w { width: 100%; height: auto; }
.chart-12w .bar { fill: var(--emerald); }
.chart-12w .bar.now { fill: var(--run-1); }
.chart-12w text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-12w .grid { stroke: var(--line); }

.notice > svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 1023px) {
  .topbar:has(.title:not(:empty)) .brand b { display: none; }
}
@media (max-width: 1023px) { .map-note { bottom: 34px; } }
@media (min-width: 1024px) { .map-note { bottom: 28px; right: auto; max-width: 70%; } }

.demo-warning { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--warn-bg); color: var(--warn); font-size: 14px; border-bottom: 1px solid var(--line); }
.demo-warning svg { width: 18px; height: 18px; flex: none; }
.demo-warning a { font-weight: 700; color: inherit; }
body.immersive .demo-warning { display: none; }

/* ---------------- Sections: calculators ---------------- */
.tool-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .tool-grid { grid-template-columns: minmax(300px, 420px) 1fr; } }
.cards .tool-card { display: grid; gap: 6px; align-content: start; }
.tool-card { padding: 18px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.tool-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.tool-card b { font-size: 18px; }
.tool-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.tool-icon svg { width: 24px; height: 24px; }
.num-table td, .num-table th { font-variant-numeric: tabular-nums; }
.num-table tr.stop-row td { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.zone-list { display: grid; gap: 8px; }
.zone-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--zc, var(--emerald)) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--zc, var(--emerald)) 38%, transparent); }
.zone-1 { --zc: #74B9FF; } .zone-2 { --zc: #00B894; } .zone-3 { --zc: #F9CA24; } .zone-4 { --zc: #F0932B; } .zone-5 { --zc: #E03A3E; }
.zone-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--zc); color: #0E2A24; font-weight: 700; }
.zone-val { font-family: var(--font-metric); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zone-val small { font-family: var(--font); font-size: 12px; color: var(--muted); }
.vo2-best { margin: 0 0 16px; }
.vo2-best:empty { display: none; }
.vo2-result { margin: 8px 0 0; min-height: 1.4em; }
.vo2-result b { font-family: var(--font-metric); font-size: 30px; color: var(--brand-ink); }
.vo2-result.warn { color: var(--warn); }

/* ---------------- Sections: events ---------------- */
.event-list { display: grid; gap: 10px; }
@media (min-width: 1100px) { .event-list { grid-template-columns: 1fr 1fr; } }
.event-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.event-card:hover { box-shadow: var(--shadow-lift); }
.event-card.past { opacity: .78; }
.event-card h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.event-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.event-main .act-meta svg { width: 14px; height: 14px; vertical-align: -2px; }
.date-block { flex: none; width: 62px; text-align: center; border-radius: 14px; background: var(--ok-bg); color: var(--brand-ink); padding: 6px 4px; line-height: 1.1; }
.date-block b { display: block; font-family: var(--font-metric); font-size: 28px; }
.date-block span { display: block; font-size: 13px; font-weight: 600; }
.date-block small { display: block; font-size: 11px; color: var(--muted); }
.info-list { display: grid; gap: 0; margin: 0 0 18px; }
.info-list > div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--r-panel); margin-bottom: 14px; display: block; }

/* ---------------- Sections: blog / cycling / news ---------------- */
.content-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.content-card { display: flex; flex-direction: column; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; overflow: hidden; }
.content-card:hover { box-shadow: var(--shadow-lift); }
.content-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.content-body { padding: 14px 16px; display: grid; gap: 6px; }
.content-body h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.content-body p { margin: 0; font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.content-body .badge svg { width: 12px; height: 12px; vertical-align: -1px; }

/* ---------------- Sections: doctors & coaches ---------------- */
.pro-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; min-width: 0; }
.pro-card:hover { box-shadow: var(--shadow-lift); }
.pro-card > div { min-width: 0; display: grid; gap: 4px; }
.pro-card .badge svg, .pro-detail .badge svg { width: 12px; height: 12px; vertical-align: -1px; }
.pro-photo { border-radius: 50%; object-fit: cover; flex: none; }
.pro-detail .panel { margin-bottom: 16px; }
.btn-row .btn svg { width: 18px; height: 18px; }
.badge.req-pending { background: var(--warn-bg); color: var(--warn); }
.badge.req-confirmed, .badge.req-completed { background: var(--ok-bg); color: var(--brand-ink); }
.badge.req-rejected { background: var(--danger-bg); color: var(--danger); }
.badge.req-cancelled { background: var(--mint-2); color: var(--muted); }

/* ---------------- Sections: training plans ---------------- */
.plan-card { display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.plan-card:hover { box-shadow: var(--shadow-lift); }
.plan-card.mine { border-color: var(--emerald); }
.plan-card b { font-size: 17px; }
/* Training plans: an icon in front of every plan, lists, bold titles and the references at the end. */
.plan-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.plan-title > b, .plan-title > h1 { min-width: 0; overflow-wrap: anywhere; }
.plan-title > h1 { margin: 0; }
.pl-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); transition: transform .25s ease; }
.pl-ico svg { width: 21px; height: 21px; }
.pl-ico.big { width: 54px; height: 54px; border-radius: 16px; margin-top: 2px; }
.pl-ico.big svg { width: 27px; height: 27px; }
.pl-ico-0 { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.pl-ico-1 { background: linear-gradient(135deg, #34d399, #047857); }
.pl-ico-2 { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.pl-ico-3 { background: linear-gradient(135deg, #f472b6, #be123c); }
.pl-ico-4 { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.pl-ico-5 { background: linear-gradient(135deg, #2dd4bf, #0e7490); }
.plan-card:hover .pl-ico { transform: rotate(-8deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .pl-ico { transition: none; } }
.plan-page .grid-2 > * { min-width: 0; }
.plan-text p { margin: 0 0 12px; line-height: 1.75; }
.plan-text p:last-child { margin-bottom: 0; }
.plan-text p > b:first-child, .plan-text li > b:first-child { color: var(--brand-ink); }
.plan-list { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.7; }
.plan-list li::marker { color: var(--emerald); }
.plan-text a, .plan-refs a { overflow-wrap: anywhere; }
.plan-refs ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.6; }
.plan-refs { margin-top: 16px; }
.progress { height: 8px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--emerald); border-radius: inherit; }
.today-box { padding: 8px 10px; border-radius: var(--r-ctl); background: var(--ok-bg); font-size: 14px; }
.week { margin-bottom: 16px; }
.week h3 { margin: 0 0 8px; font-size: 16px; }
.week-days { display: grid; gap: 6px; }
.day { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.day > summary { display: grid; grid-template-columns: 92px 1fr; gap: 2px 10px; padding: 10px 12px; cursor: pointer; list-style: none; min-height: 44px; align-items: center; }
.day > summary::-webkit-details-marker { display: none; }
.day > summary small { grid-column: 2; }
.day > summary .badge { grid-column: 2; justify-self: start; }
.day-n { font-weight: 600; color: var(--muted); font-size: 14px; grid-row: span 2; }
.day.rest { background: var(--mint); }
.day.rest > summary { color: var(--muted); }
.day.done { border-color: var(--emerald); }
.day.done .day-n { color: var(--brand-ink); }
.day.today { border-width: 2px; border-color: var(--brand-ink); }
.day[open] > summary { border-bottom: 1px solid var(--line); }
.wo-detail { padding: 10px 12px; display: grid; gap: 10px; }
.wo-block b { display: block; font-size: 14px; color: var(--muted); }
.wo-block p { margin: 2px 0 0; white-space: pre-line; }
.mark-box { padding: 10px 12px 12px; display: grid; gap: 8px; border-top: 1px dashed var(--line); }

/* ---------------- Forms & admin helpers ---------------- */
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.check-list { display: grid; gap: 6px; margin: 4px 0 14px; }
.check-row { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--brand-ink); flex: none; }
.img-preview { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.img-preview:empty { display: none; }
.img-preview img { width: 160px; height: 100px; object-fit: cover; border-radius: var(--r-ctl); border: 1px solid var(--line); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.req-admin { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.req-admin .field { margin: 0; }
.sched { display: grid; gap: 8px; }
.sched-week { border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.sched-week > summary { padding: 12px 14px; cursor: pointer; min-height: 44px; }
.sched-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.sched-day { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-ctl); background: var(--mint); }
.sched-n { font-weight: 600; font-size: 14px; color: var(--muted); }
.sched-work { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.sched-work .input:disabled { opacity: .5; }
.day-more > summary { cursor: pointer; color: var(--brand-ink); font-size: 14px; min-height: 32px; }
.day-more .field { margin-top: 8px; }
@media (min-width: 900px) {
  .sched-day { grid-template-columns: 80px minmax(0, 1fr) auto minmax(260px, 1.1fr); align-items: center; }
  .day-more { grid-column: 2 / -1; }
}
.sched-save { position: sticky; bottom: calc(var(--safe-b) + 8px); margin-top: 12px; }
@media (max-width: 1023px) { .sched-save { bottom: calc(var(--bottom-h) + var(--safe-b) + 8px); } }
.act-meta > span:has(> svg) { display: inline-flex; align-items: center; gap: 3px; }
.req-admin > .btn { justify-self: start; }
.badge[class*="req-"] { align-self: flex-start; }

/* Theme button: a circle showing the current theme (page colour + accent). Each click moves to the next theme. */
.theme-swatch { width: 24px; height: 24px; border-radius: 50%; display: block; background: linear-gradient(135deg, var(--mint) 0 50%, var(--emerald) 50% 100%); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 35%, transparent); }
.theme-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-pick button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.theme-pick button[aria-pressed="true"] { border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand-ink); font-weight: 600; }
.theme-pick .theme-swatch { width: 28px; height: 28px; }
.nav-swatch { width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.nav-swatch .theme-swatch { width: 20px; height: 20px; }

/* দৌড়শিক্ষা answers: short answer from the matched article + expandable related articles */
.answer .short-label { font-weight: 700; margin: 0 0 4px; color: var(--brand-ink); }
.answer .from { font-size: 14px; color: var(--muted); }
.full-article { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.full-article > summary, .source > summary { cursor: pointer; list-style: none; }
.full-article > summary { color: var(--brand-ink); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.full-article > summary::-webkit-details-marker, .source > summary::-webkit-details-marker { display: none; }
.full-article .text p, .source-body .text p { white-space: pre-line; }
.badge[class*="match-"] { background: var(--ok-bg); color: var(--brand-ink); }
.badge.match-content { background: var(--mint-2); color: var(--muted); }
details.source { padding: 0; }
details.source > summary { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; }
details.source > summary:hover { background: var(--mint-2); }
.source-head { flex: 1; min-width: 0; display: block; }
.source .expand { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--brand-ink); font-weight: 700; }
details.source[open] .expand { transform: rotate(45deg); }
.source-body { padding: 0 10px 12px; font-size: 15px; }
.source-body .short { font-weight: 600; margin: 4px 0 8px; }
.stat-grid dd small { display: block; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3; letter-spacing: 0; }
.meal-table td:first-child { min-width: 110px; }

/* Bangla / English switch in the top bar */
.lang-toggle { flex: none; border: 1px solid var(--btn-bg); border-radius: 999px; background: var(--btn-bg); color: var(--on-brand); font: inherit; font-size: 14px; font-weight: 700; padding: 0 14px; min-height: 36px; min-width: 64px; cursor: pointer; }
.lang-toggle:hover { filter: brightness(1.08); }
.lang-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Calculators (old pages' full texts) */
.time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-field { display: grid; gap: 2px; }
.time-field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.segment-layout { display: grid; gap: 8px; grid-template-columns: minmax(80px, 1fr) 2fr; align-items: end; }
.seg-row { padding: 8px 10px; border-radius: var(--r-ctl); background: var(--mint-2); }
.table-cards { display: grid; gap: 14px; }
@media (min-width: 1200px) { .table-cards { grid-template-columns: 1fr 1fr; } }
.table-card h3 { margin: 0 0 6px; font-size: 15px; }
.hydration { color: var(--run-1); font-weight: 700; }
.num-table tr.lap-end td { font-style: italic; color: var(--muted); }
.learn-box { margin-top: 16px; line-height: 1.75; }
.learn-box ul { padding-left: 20px; display: grid; gap: 6px; }
.learn-box .formula { font-family: var(--font-metric); font-size: 20px; font-weight: 600; background: var(--mint-2); border-radius: var(--r-ctl); padding: 8px 12px; display: inline-block; }
.zone-table td { vertical-align: middle; }
.zone-table .zone-num { display: inline-grid; width: 26px; height: 26px; font-size: 14px; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vo2-result .big { font-family: var(--font-metric); font-size: 28px; color: var(--brand-ink); }
.group-title { font-size: 18px; margin: 0; }
.hero-tags { margin-top: 10px; }
@media print { .topbar, .rail, .bottombar, .drawer, .btn, .demo-warning { display: none !important; } .main-col { margin: 0 !important; } }

/* Training calendar */
.phase-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--pc, var(--emerald)) 14%, var(--card)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--pc, var(--emerald)) 45%, transparent); }
.phase-recovery_week { --pc: #74B9FF; } .phase-base_build { --pc: #00B894; } .phase-endurance_build { --pc: #F9CA24; }
.phase-ultra_specific_build { --pc: #F0932B; } .phase-peak_ultra_training { --pc: #E03A3E; } .phase-peak_simulation { --pc: #9B59B6; }
.phase-taper { --pc: #636E72; } .phase-race_week { --pc: #2D3436; }
.phase-foundation { --pc: #55EFC4; } .phase-build { --pc: #00B894; } .phase-consolidation { --pc: #0984E3; } .phase-endurance_development { --pc: #F9CA24; }
.phase-cutback { --pc: #74B9FF; } .phase-threshold_development { --pc: #F0932B; } .phase-strength_threshold { --pc: #E17055; } .phase-specific_preparation { --pc: #E03A3E; }
.type-pill { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12.5px; background: var(--ok-bg); color: var(--brand-ink); white-space: nowrap; }
.type-pill.wt-rest { background: var(--mint-2); color: var(--muted); }
.type-pill.wt-strength, .type-pill.wt-cross { background: var(--warn-bg); color: var(--warn); }
.cal-table td { vertical-align: top; }
.cal-table tr.rest td { color: var(--muted); }
.cal-table tr.today td { background: var(--ok-bg); font-weight: 600; }
.nowrap { white-space: nowrap; }
.glossary { margin-top: 16px; }
.glossary > summary { cursor: pointer; min-height: 36px; }
.glossary h3 { margin: 14px 0 8px; font-size: 16px; }
.glossary-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.glossary-card { padding: 12px; border-radius: var(--r-ctl); background: color-mix(in srgb, var(--pc, var(--emerald)) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--pc, var(--emerald)) 30%, transparent); }
.glossary-card p { margin: 6px 0 0; font-size: 14.5px; }
.terms { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 0; }
.terms > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.terms dt { font-weight: 700; }
.terms dd { margin: 4px 0 0; font-size: 14.5px; }
.week-pick { max-width: 320px; }
.sched-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.sched-f { display: grid; gap: 3px; min-width: 0; }
.sched-f > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.sched-wide { grid-column: 1 / -1; }
.pick { display: grid; gap: 6px; }
.sched-day.rest { opacity: .85; }
@media (min-width: 900px) {
  .sched-day { grid-template-columns: 90px minmax(0, 1fr); align-items: start; }
  .sched-grid { grid-template-columns: 1.2fr 1fr 1.4fr .7fr; }
  .day-more { grid-column: 2 / -1; }
}
.sched-n { display: grid; gap: 2px; }
.week-phase { max-width: 220px; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.import-box { margin-bottom: 12px; }
.import-box > summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; min-height: 36px; }
.plan-import { padding: 10px 0; }

/* Events: runner submissions */
.head-actions { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.narrow { max-width: 760px; }
.review-box { display: grid; gap: 6px; margin-top: 8px; max-width: 420px; }
.faq-box { display: flex; gap: 8px; align-items: center; }
/* Calendar table becomes stacked cards on phones (no sideways scrolling) */
@media (max-width: 760px) {
  .cal-table thead { display: none; }
  .cal-table, .cal-table tbody, .cal-table tr, .cal-table td { display: block; width: 100%; }
  .cal-table tr { border: 1px solid var(--line); border-radius: var(--r-ctl); margin-bottom: 8px; padding: 6px 10px; background: var(--card); }
  .cal-table td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 100px 1fr; gap: 8px; text-align: left; white-space: normal; }
  .cal-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; }
  .schedule-table .table-wrap { overflow: visible; }
}
.sched-f textarea.input { min-height: 44px; height: 44px; resize: vertical; }
.tool-grid > * { min-width: 0; }
.chips .chip { max-width: 100%; white-space: normal; text-align: left; }
.field > .hint { overflow-wrap: anywhere; }

/* ===== Profile, profile card and Run Stat (Android-style layout) ===== */
.pf-hero { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 0 16px 18px; margin-bottom: 16px; overflow: hidden; text-align: center; }
.pf-cover { height: 96px; margin: 0 -16px; background: linear-gradient(120deg, var(--emerald-2), var(--emerald)); position: relative; }
.pf-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.25), transparent 55%); }
.pf-avatar { position: relative; width: 112px; height: 112px; margin: -56px auto 8px; border-radius: 50%; background: var(--emerald); color: var(--on-accent); display: grid; place-items: center; font-size: 42px; font-weight: 700; box-shadow: 0 0 0 5px var(--card); }
.pf-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pf-cam { position: absolute; right: -2px; bottom: -2px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--card); background: var(--btn-bg); color: var(--on-brand); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pf-cam svg { width: 20px; height: 20px; }
.pf-id h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.pf-profession { margin-top: 4px; font-weight: 600; color: var(--brand-ink); }
.pf-chips { justify-content: center; margin-top: 10px; }
.pf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.pf-actions .btn { width: 100%; justify-content: center; }
.fill-prompt { display: block; text-decoration: none; color: var(--ink); margin-bottom: 16px; }
.info-list-rows { display: grid; }
.info-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; min-height: 58px; padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.info-row:last-child { border-bottom: 0; }
.info-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.info-ic svg { width: 20px; height: 20px; }
.info-row small { display: block; font-size: 13px; }
.photo-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-edit .pf-avatar { margin: 0; width: 96px; height: 96px; font-size: 34px; box-shadow: none; }
@media (min-width: 900px) {
  .pf-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0 20px; text-align: left; padding: 0 24px 20px; }
  .pf-cover { grid-column: 1 / -1; margin: 0 -24px; height: 120px; }
  .pf-avatar { margin: -56px 0 0; width: 128px; height: 128px; }
  .pf-chips { justify-content: flex-start; }
  .pf-actions { grid-template-columns: repeat(2, minmax(170px, auto)); margin: 20px 0 0; align-self: end; }
}

.card-layout { display: grid; gap: 18px; }
.card-preview canvas { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; border-radius: 22px; box-shadow: var(--shadow-lift); }
.card-actions { justify-content: center; margin-top: 14px; }
.toggle-list { display: grid; }
.toggle-row { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); cursor: pointer; overflow-wrap: anywhere; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--brand-ink); }
.toggle-row small { display: block; }
.toggle-row.missing { cursor: default; opacity: .75; }
.swatch { width: 26px; height: 26px; border-radius: 50%; display: inline-block; border: 1px solid var(--line); }
@media (min-width: 900px) { .card-layout { grid-template-columns: minmax(320px, 460px) 1fr; align-items: start; } .card-layout > div:first-child { position: sticky; top: 84px; } }

/* Stats screen */
.top-tabs { position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--mint); border-bottom: 1px solid var(--line); margin: 0 -16px 14px; padding: 0 8px; }
.top-tabs button { min-height: 48px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; }
.top-tabs button[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand-ink); }
@media (min-width: 1024px) { .top-tabs { top: 64px; margin: 0 0 18px; padding: 0; max-width: 560px; background: transparent; } }
.stats-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--mint-2); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; padding: 0 4px; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--brand-ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.stats-controls .chip { display: inline-flex; align-items: center; gap: 6px; }
.period-nav { display: grid; grid-template-columns: 44px 1fr 44px auto; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.period-nav .period-label { text-align: center; font-size: 17px; }
.period-nav .icon-btn { width: 44px; height: 44px; color: var(--brand-ink); }
.period-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.period-nav .icon-btn[hidden] { display: block; visibility: hidden; }
.period-nav.solo { grid-template-columns: 1fr; padding: 10px 12px; }
.period-nav.solo .icon-btn { display: none; }
.period-nav.solo .period-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.stats-controls .segmented { grid-template-columns: repeat(4, 1fr) 46px; }
.segmented .seg-filter { display: grid; place-items: center; color: var(--brand-ink); padding: 0; }
.segmented .seg-filter svg { width: 17px; height: 17px; }
.range-box { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.range-box[hidden] { display: none; }
.range-box .field { margin: 0; }
.range-box .notice { grid-column: 1 / -1; }
@media (max-width: 420px) { .range-box { grid-template-columns: 1fr 1fr; } .range-box .btn { grid-column: 1 / -1; } }
.icon-btn.flip svg { transform: scaleX(-1); }
.btn-sm { min-height: 36px; padding: 2px 12px; font-size: 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.kpi dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi dd { margin: 2px 0 0; }
.kpi dd b { font-family: var(--font-metric); font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi dd small { color: var(--muted); font-size: 14px; }
.kpi-delta { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi-delta.up, .kpi-delta.down { color: var(--ink); font-weight: 600; }
/* a line under a number that says where it comes from (VO2 max: the best 12 minutes; a link to that run) */
.kpi-note { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
a.kpi-note { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.chart .hit { fill: transparent; cursor: pointer; outline: none; }
.chart .hit:focus-visible { stroke: var(--brand-ink); stroke-width: 2; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: var(--card); border-radius: 10px; padding: 6px 10px; font-size: 13px; line-height: 1.4; white-space: nowrap; box-shadow: var(--shadow-lift); }
.chart-tip b { display: block; }
.chart-table { margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sport-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.sport-dot.run { background: var(--series-run); } .sport-dot.ride { background: var(--series-ride); } .sport-dot.walk { background: var(--series-walk); }
.sport-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sport-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 2px; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; }
.sport-card > *:not(.sport-dot):not(b) { grid-column: 1 / -1; }
.sport-card strong { font-family: var(--font-metric); font-size: 24px; font-weight: 600; }
.stat-list { display: grid; }
.stat-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.stat-row:last-child { border-bottom: 0; }
.stat-row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row-main small { display: block; }
.stat-row-nums { text-align: right; }
.stat-row-nums b { display: block; font-family: var(--font-metric); font-size: 19px; font-weight: 600; }
.stat-row-nums small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.dl-panel h2 { display: flex; align-items: center; gap: 8px; }
.dl-panel h2 svg { width: 22px; height: 22px; }
.rec-list { display: grid; margin: 0; }
.rec-item { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rec-item:last-child { border-bottom: 0; }
.rec-item dt { font-size: 14px; color: var(--muted); }
.rec-item dd { margin: 0; display: grid; }
.rec-item dd b { font-family: var(--font-metric); font-size: 22px; font-weight: 600; }
@media (min-width: 700px) { .rec-item { grid-template-columns: 1fr 1fr; align-items: center; } }
.goal-list { display: grid; gap: 12px; }
.goal { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.goal.done { border-color: var(--brand-ink); }
.goal-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.goal-head .icon-btn { width: 40px; height: 40px; color: var(--muted); }
.progress { height: 12px; background: var(--mint-2); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--emerald); border-radius: 999px; }
.goal-nums { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--bottom-h) + var(--safe-b) + 16px); z-index: 25; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--btn-bg); color: var(--on-brand); font-size: 32px; line-height: 1; text-decoration: none; box-shadow: 0 8px 20px -6px rgba(0,0,0,.45); }
@media (min-width: 1024px) { .fab { display: none; } }
.stats-screen { padding-bottom: 72px; }
@media (min-width: 1024px) { .stats-screen { padding-bottom: 0; } }

/* Hand-entered activity */
.narrow-page { max-width: 720px; }
.pace-preview { margin: -4px 0 12px; min-height: 1.2em; font-weight: 600; color: var(--brand-ink); }
.more-box { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 14px; }
.more-box > summary, .more-box > legend { font-weight: 600; cursor: pointer; padding: 4px 0; }
.more-box[open] > summary { margin-bottom: 10px; }
.act-thumb-icon { width: 96px; height: 76px; display: grid; place-items: center; border-radius: 12px; background: var(--mint-2); }
.act-thumb-icon svg { width: 34px; height: 34px; }
.act-thumb-icon.run { color: var(--series-run); } .act-thumb-icon.ride { color: var(--series-ride); } .act-thumb-icon.walk { color: var(--series-walk); }
.btn-block { width: 100%; justify-content: center; }
@media (max-width: 380px) { .pf-actions { grid-template-columns: 1fr; } .kpi dd b { font-size: 26px; } }

/* Long status badges and values in info lists wrap instead of running off a phone screen. */
.info-list dd { min-width: 0; overflow-wrap: anywhere; }
.info-list dd .badge { white-space: normal; line-height: 1.4; display: inline-block; max-width: 100%; }

/* Related articles list: title, relevance %, + to open */
.sources h2 { align-items: baseline; flex-wrap: wrap; }
.sources h2 .src-title { color: var(--ink); font-size: 16px; font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }
.sources h2 .src-title svg { width: 18px; height: 18px; color: var(--brand-ink); }
details.source { border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
details.source.is-best { border-color: var(--emerald); }
details.source > summary { align-items: center; }
.source .pct { flex: none; font-size: 13px; font-weight: 700; color: var(--brand-ink); background: var(--ok-bg); border-radius: 999px; padding: 3px 10px; font-variant-numeric: tabular-nums; }
.source .best-tag { color: var(--brand-ink); font-weight: 700; }
.source-body .relevance-line { font-weight: 700; color: var(--brand-ink); margin: 2px 0 10px; display: flex; gap: 10px; align-items: center; }
.source-body .relevance-line .bar { flex: 1; max-width: 160px; height: 6px; border-radius: 6px; background: var(--mint-2); overflow: hidden; margin: 0; }
.source-body .relevance-line .bar i { display: block; height: 100%; background: var(--emerald); }

/* Running news (like the old runnews page) */
.news-strip { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.news-strip .live { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .04em; }
.news-strip .live i { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); animation: news-pulse 1.6s ease-in-out infinite; }
@keyframes news-pulse { 50% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } }
.news-head { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.news-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin: 4px 0 12px; }
.news-controls .news-count { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .news-controls { grid-template-columns: 1fr 1fr; } .news-controls input { grid-column: 1 / -1; } }
.news-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.news-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 16px 14px; overflow: hidden; min-width: 0; }
.news-card.is-manual { border-color: color-mix(in srgb, var(--run-1) 40%, var(--line)); background: color-mix(in srgb, var(--run-1) 4%, var(--card)); }
.news-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.news-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.news-badges > span { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: var(--mint-2); color: var(--ink); }
.news-badges .news-cat { background: var(--ok-bg); color: var(--brand-ink); }
.news-badges .news-manual { background: #fff1e6; color: #b4470a; }
.news-badges .news-pin { background: #fff7d6; color: #8a6100; }
.news-no { flex: none; min-width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); }
.news-headline { font-size: 18px; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.news-headline a { color: inherit; text-decoration: none; }
.news-headline a:hover { color: var(--brand-ink); text-decoration: underline; }
.news-summary { margin: 0; color: var(--muted); font-size: 15px; }
.news-meta { font-size: 14px; display: grid; gap: 2px; }
.news-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.news-read { font-weight: 700; color: var(--brand-ink); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.news-footer { text-align: center; margin-top: 18px; }
.news-admin-list { list-style: none; margin: 0; padding: 0; }
.news-admin-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.news-admin-list li:last-child { border-bottom: 0; }
.news-admin-list a { font-weight: 600; overflow-wrap: anywhere; }

/* "Result" label on every calculator output, with a lightly tinted first result card */
.result-zone:not(:empty)::before, .vo2-best:not(:empty)::before {
  content: attr(data-label); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--on-brand); background: var(--btn-bg); border-radius: 10px 10px 0 0; padding: 5px 14px; margin: 0 0 -1px 14px; position: relative; z-index: 1;
}
.result-zone > :first-child, .vo2-best { background: color-mix(in srgb, var(--emerald) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 45%, var(--line)); }
.vo2-best { border-radius: var(--r-panel); padding: 12px 16px; }
.vo2-best:not(:empty)::before { display: flex; width: max-content; margin: -12px 0 10px -16px; border-radius: var(--r-panel) 0 10px 0; }
.vo2-result.result-zone:not(:empty)::before { display: inline-flex; margin: 0 8px 4px 0; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.vo2-result.result-zone > :first-child { background: none; border: 0; }
.vo2-result.result-zone:not(:empty) { background: color-mix(in srgb, var(--emerald) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 40%, var(--line)); border-radius: 12px; padding: 8px 12px; }
.usage-note { font-size: 13px; color: var(--muted); background: var(--mint-2); border-radius: 999px; padding: 4px 12px; display: inline-block; margin: 0 0 8px; }
.usage-note.low { background: #fff4e5; color: #8a4b00; }
/* Sign-up offer on the login / sign-up pages: a gold gift badge beside the offer, on a soft brand-tinted card. */
.free-year { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--emerald) 16%, var(--card)), color-mix(in srgb, #F5A623 10%, var(--card)));
  border: 1px solid color-mix(in srgb, var(--emerald) 35%, var(--line)); }
.fy-badge { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; color: #fff;
  background: linear-gradient(145deg, #FFC23D, #F08A00); box-shadow: 0 6px 14px -6px rgba(240, 138, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .45); }
.fy-badge svg { width: 24px; height: 24px; }
.fy-text { display: grid; gap: 2px; min-width: 0; }
.fy-text b { font-size: 16px; color: var(--ink); }
.fy-text span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.free-limit h2 { margin-top: 0; }

@media (max-width: 640px) {
  .ev-head { margin-bottom: 8px; }
  .ev-head p { margin-bottom: 8px; }
  .ev-head .btn-row { flex-wrap: wrap; gap: 8px; }
  .ev-head .btn-row .btn:first-child { flex-basis: 100%; }
  .ev-head .btn-row .btn { min-height: 40px; padding: 0 12px; font-size: 14px; flex: 1 1 auto; justify-content: center; }
  .ev-filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-right: -16px; padding-right: 16px; }
  .ev-filters .chips::-webkit-scrollbar { display: none; }
  .ev-filters .chips .chip { flex: none; }
}

/* Event cards: date · name / organizer, place / days left, distances · flag + finished tick */
.event-card { position: relative; align-items: center; }
.event-card .ev-link { color: var(--ink); text-decoration: none; }
.event-card .ev-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* the whole card opens the event */
.ev-line { font-size: 14px; }
.ev-dist { font-weight: 600; color: var(--ink); }
.ev-marks { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; align-self: center; }
.ev-mark { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; background: var(--card); color: var(--muted); border: 1.5px solid var(--line); }
.ev-mark svg { width: 20px; height: 20px; }
.ev-flag[aria-pressed="true"] { color: #e4570f; border-color: #f3b38f; background: #fff3ec; }
.ev-flag[aria-pressed="true"] svg { fill: currentColor; }
.ev-tick { color: #a7b4b6; border-color: #cfd8d9; }
.ev-tick[aria-pressed="true"] { background: #16a34a; border-color: #16a34a; color: #fff; }
.ev-tick[aria-pressed="true"] svg { stroke-width: 3; }
.ev-mark:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.event-card.is-done { border-color: #86d3a4; }

/* Answer card buttons: "পুরো লেখা পড়ুন" (Bootstrap Icons down arrow) next to "পড়ে শোনান" */
.answer .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.read-full-btn svg.bi { width: 20px; height: 20px; flex: none; transition: transform .2s ease; }
.read-full-btn[aria-expanded="true"] svg.bi { transform: rotate(180deg); }
.full-article-text { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.75; }
.full-article-text p { white-space: pre-line; margin: 0 0 12px; }
.answer .actions { flex-wrap: nowrap; }
.answer .actions > * { flex: 1 1 0; min-width: 0; }
.answer .actions .btn { width: 100%; justify-content: center; padding: 0 10px; gap: 8px; white-space: nowrap; }
.answer .actions > span { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 4px !important; }
@media (min-width: 640px) { .answer .actions > * { flex: 0 1 auto; } .answer .actions .btn { padding: 0 18px; } .answer .actions > .btn { width: auto; } }
.read-aloud-btn svg.bi { width: 20px; height: 20px; flex: none; }

/* ---------- PC account button (after the theme button; hidden on phone/tablet, where the drawer and "Me" tab do this) ---------- */
.acct { display: none; position: relative; flex: none; margin-left: 4px; }
.acct-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid var(--btn-bg); background: transparent; color: var(--btn-bg); padding: 0;
}
.acct-btn svg.bi { width: 22px; height: 22px; }
.acct-btn.is-in { background: var(--btn-bg); color: var(--on-brand); }
.acct-btn.has-pic { overflow: hidden; background: var(--card); }
.self-pic { display: block; border-radius: 50%; object-fit: cover; }
.acct-pic { width: 100%; height: 100%; }
.acct-avatar .self-pic { width: 100%; height: 100%; }
.tab-pic { width: 26px; height: 26px; border: 2px solid var(--line); }
.tab[aria-current="page"] .tab-pic { border-color: var(--brand-ink); }
.acct-btn:hover { filter: brightness(1.08); box-shadow: 0 0 0 4px var(--mint-2); }
.acct-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; padding: 6px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--btn-bg); color: var(--on-brand); }
.acct-avatar svg.bi { width: 24px; height: 24px; }
.acct-who { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.acct-who b { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who small { color: var(--muted); font-size: 12px; }
.acct-role { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--mint-2); color: var(--brand-ink); }
.acct-role.role-admin { background: #fde68a; color: #7c2d12; }
.acct-note { margin: 6px 10px 8px; font-size: 13px; color: var(--muted); }
.acct-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.acct-item svg { width: 20px; height: 20px; flex: none; }
.acct-item:hover, .acct-item:focus-visible { background: var(--mint-2); outline: none; }
.acct-item.danger { color: #dc2626; }
.acct-sep { height: 1px; background: var(--line); margin: 6px 4px; }
@media (min-width: 1024px) { .acct { display: block; } }
.answer .actions > span > .small:empty { display: none; }

/* ---------- Admin → Articles: faq list and add form side by side ---------- */
.legacy-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.legacy-strip .badge { vertical-align: 1px; }
.faq-admin { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
@media (min-width: 900px) { .faq-admin { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.faq-admin .panel { margin: 0; }
.faq-admin h2 { display: flex; align-items: center; gap: 6px; }
.faq-list-panel > .input { margin-bottom: 10px; }
.faq-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 72vh; overflow-y: auto; }
.faq-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.faq-item.is-editing { border-color: var(--btn-bg); box-shadow: 0 0 0 2px var(--mint-2); }
.faq-item-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.faq-item-text b { line-height: 1.35; }
.faq-item-text .small.muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-item-actions { display: flex; gap: 6px; flex: none; }
.faq-item-actions .btn svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .faq-item { flex-direction: column; align-items: stretch; } .faq-item-actions .btn { flex: 1; justify-content: center; } }
@media (min-width: 900px) { .faq-form-panel { position: sticky; top: 76px; } }
.faq-form-panel.is-editing { border-color: var(--btn-bg); }
.faq-form textarea[name=content] { min-height: 220px; }
.req-star { color: #dc2626; font-weight: 700; }
.my-ev.is-rejected { border-color: color-mix(in srgb, #dc2626 35%, var(--line)); }

/* ---------- Runners' Blog: three columns of cards ---------- */
.bl-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 760px) { .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bl-grid .bl-curated { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bl-grid .bl-curated { grid-column: auto; } }
.bl-events-btn { display: inline-flex; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.bl-events-btn svg { width: 15px; height: 15px; }
.bl-col { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-col-head { display: flex; gap: 10px; align-items: flex-start; }
.bl-col-head h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.bl-col-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.bl-col-icon { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.bl-col-icon svg { width: 20px; height: 20px; }
.bl-events .bl-col-icon { background: #0891b2; }
.bl-mine .bl-col-icon { background: #0891b2; }
.bl-users .bl-col-icon { background: #0d9488; }
.bl-curated .bl-col-icon { background: #2563eb; }
.bl-list { display: grid; gap: 8px; }
.bl-events .event-list { gap: 8px; }
.bl-events .event-card { margin: 0; }
.bl-more { align-self: stretch; justify-content: center; }
.bl-card { position: relative; display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--mint); transition: border-color .15s, box-shadow .15s; }
.bl-card:hover { border-color: var(--btn-bg); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.bl-card-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.bl-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-card-title { font-weight: 600; line-height: 1.4; }
.bl-card-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-card-meta svg { width: 12px; height: 12px; vertical-align: -1px; }
.bl-card .bl-del { width: 38px; height: auto; min-height: 38px; color: var(--muted); border-radius: 0 12px 12px 0; }
.bl-card .bl-del svg { width: 18px; height: 18px; }
.bl-card .bl-del:hover { color: #dc2626; }
.bl-add-btn { align-self: flex-start; }
.bl-add-form { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
.bl-group { border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; }
.bl-group[open] { padding-bottom: 10px; }
.bl-group > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 2px; font-weight: 700; list-style: none; }
.bl-group > summary::-webkit-details-marker { display: none; }
.bl-group > summary::after { content: '+'; font-size: 18px; color: var(--muted); margin-left: 4px; }
.bl-group[open] > summary::after { content: '–'; }
.bl-group > summary .badge { margin-left: auto; }
.bl-admin-lists { display: grid; gap: 16px; min-width: 0; }
.bl-admin-lists .panel { margin: 0; }
.bl-admin-form.is-editing { border-color: var(--btn-bg); }
@media (min-width: 900px) { .bl-admin-form { position: sticky; top: 76px; } }
.share-panel h2 { display: flex; align-items: center; gap: 6px; }
.share-panel h2 svg { width: 20px; height: 20px; }
.share-panel.is-new { border-color: var(--btn-bg); box-shadow: 0 0 0 3px var(--mint-2); }
.share-url { font-size: 14px; direction: ltr; }
.bl-list > *, .bl-card, .bl-card-link { min-width: 0; }
.bl-card-meta svg { display: inline-block; }
.bl-events .event-list { grid-template-columns: minmax(0, 1fr) !important; }
.bl-events .event-card { padding: 10px 12px; gap: 10px; }
.bl-events .event-card h3 { font-size: 15px; }

/* ---------- Side menu dropdowns (My activities, Calculators, Articles) ---------- */
.nav-drop-btn { font-weight: 600; }
.nav-drop-btn .nav-chev { margin-left: auto; display: inline-flex; transition: transform .2s ease; }
.nav-drop-btn .nav-chev svg { width: 16px; height: 16px; }
.nav-drop-btn[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }
.nav-drop-btn[aria-expanded="true"] { color: var(--brand-ink); }
.nav-drop-btn[aria-expanded="true"] > svg:first-child { color: var(--brand-ink); }
.nav-sub { margin: 2px 0 6px 23px; padding-left: 10px; border-left: 2px solid var(--line); }
.nav-sub[hidden] { display: none; }
.nav-sub .nav-item { min-height: 42px; font-size: 15px; gap: 12px; }
.nav-sub .nav-item svg { width: 20px; height: 20px; }
/* Bootstrap icons in the menu are drawn on a 16-unit grid: a little smaller than the 24-unit line icons so they look the same weight. */
.nav-item > svg.bi:first-child { width: 20px; height: 20px; margin: 0 1px; }
.tab > svg.bi { width: 22px; height: 22px; }

/* Blog card icons: 20 Bootstrap icons in turn, on 10 aqua / sea colours */
.bl-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  box-shadow: 0 3px 8px rgba(8, 80, 90, .18), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .25s cubic-bezier(.3,1.5,.6,1); }
.bl-ico svg { width: 20px; height: 20px; }
.bl-ico-0 { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.bl-ico-1 { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.bl-ico-2 { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.bl-ico-3 { background: linear-gradient(135deg, #34d399, #059669); }
.bl-ico-4 { background: linear-gradient(135deg, #5eead4, #14b8a6); }
.bl-ico-5 { background: linear-gradient(135deg, #67e8f9, #06b6d4); }
.bl-ico-6 { background: linear-gradient(135deg, #7dd3fc, #0ea5e9); }
.bl-ico-7 { background: linear-gradient(135deg, #4ade80, #16a34a); }
.bl-ico-8 { background: linear-gradient(135deg, #22d3ee, #0e7490); }
.bl-ico-9 { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.bl-card:hover .bl-ico { transform: rotate(-10deg) scale(1.08); }
.bl-card.is-new { animation: bl-new-card 1.6s ease-out; }
.bl-card.is-new .bl-ico { animation: bl-spin-in .9s cubic-bezier(.2,.9,.3,1.2); }
@keyframes bl-spin-in { from { transform: rotate(-360deg) scale(.3); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes bl-new-card { 0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, .55); } 100% { box-shadow: 0 0 0 14px rgba(20, 184, 166, 0); } }
@media (prefers-reduced-motion: reduce) { .bl-ico, .bl-card.is-new, .bl-card.is-new .bl-ico { animation: none; transition: none; } }
.bl-admin-row .faq-item-text { flex: 1; } .bl-admin-row .bl-ico { width: 34px; height: 34px; border-radius: 10px; } .bl-admin-row .bl-ico svg { width: 17px; height: 17px; }
@media (max-width: 520px) { .bl-admin-row .bl-ico { display: none; } }

/* ---------- Notification bell (top bar, phone and PC) ---------- */
.bell { position: relative; flex: none; }
.bell-btn { position: relative; }
.bell-btn.has-new svg { animation: bell-ring 1.2s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
.bell-badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--badge-bg); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--card);
}
.bell-badge[hidden] { display: none; }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 360px; max-height: min(70vh, 520px);
  display: flex; flex-direction: column; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden;
}
.notif-panel[hidden] { display: none; }
@media (max-width: 640px) { .notif-panel { position: fixed; left: 8px; right: 8px; width: auto; top: calc(var(--header-h) + var(--safe-t) + 6px); } }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.notif-link { border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px; }
.notif-list { overflow-y: auto; padding: 4px; }
.notif-empty { margin: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.notif-foot { display: block; padding: 10px; text-align: center; border-top: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--brand-ink); text-decoration: none; }
.notif-item {
  width: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.notif-item:hover, .notif-item:focus-visible { background: var(--mint-2); outline: none; }
.notif-item.unread { background: color-mix(in srgb, var(--emerald) 9%, transparent); }
.notif-ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--mint-2); color: var(--brand-ink); }
.notif-ico svg { width: 18px; height: 18px; }
.notif-item.unread .notif-ico { background: var(--btn-bg); color: var(--on-brand); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.45; }
.notif-item.unread .notif-text { font-weight: 600; }
.notif-note { color: var(--muted); font-size: 13px; }
.notif-time { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.notif-dot { font-size: 11px; font-weight: 700; color: #E53935; }
.notif-page { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel, 16px); padding: 6px; }

/* ---------- Appointment flow ---------- */
.badge.req-accepted, .badge.req-paid { background: #E0EEFF; color: #1D4F91; }
.badge.req-booked { background: var(--ok-bg); color: var(--brand-ink); }
:root[data-theme="green"] .badge.req-accepted, :root[data-theme="green"] .badge.req-paid,
:root[data-theme="marine"] .badge.req-accepted, :root[data-theme="marine"] .badge.req-paid,
:root[data-theme="dark"] .badge.req-accepted, :root[data-theme="dark"] .badge.req-paid { background: #1B2E4A; color: #9CC6FF; }
.chip.chip-alert:not([aria-pressed="true"]) { border-color: #E53935; color: #B71C1C; }
.req-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.req-msg { margin: 8px 0; white-space: pre-line; }
.req-card .act-meta { align-items: center; }
.mode-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mint-2); color: var(--brand-ink); white-space: nowrap; }
.mode-chip svg { width: 13px; height: 13px; }
.req-steps { list-style: none; display: flex; gap: 0; margin: 12px 0 6px; padding: 0; counter-reset: s; }
.req-steps li { flex: 1; position: relative; text-align: center; font-size: 12px; color: var(--muted); padding-top: 20px; }
.req-steps li .dot { position: absolute; top: 2px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); z-index: 1; }
.req-steps li::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.req-steps li:first-child::before { display: none; }
.req-steps li.done .dot { background: var(--btn-bg); border-color: var(--btn-bg); }
.req-steps li.done::before, .req-steps li.now::before { background: var(--btn-bg); }
.req-steps li.now { color: var(--ink); font-weight: 700; }
.req-steps li.now .dot { border-color: var(--btn-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 25%, transparent); }
.mode-field { border: 0; padding: 0; margin: 0 0 14px; }
.mode-field legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.mode-opts { display: grid; gap: 8px; margin-bottom: 4px; }
@media (min-width: 640px) { .mode-opts { grid-template-columns: 1fr 1fr; } }
.mode-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.mode-opt:has(input:checked) { border-color: var(--btn-bg); background: color-mix(in srgb, var(--emerald) 8%, var(--card)); }
.mode-opt input { width: 20px; height: 20px; accent-color: var(--btn-bg); flex: none; }
.mode-ico svg { width: 20px; height: 20px; color: var(--brand-ink); }
.mode-field.invalid .mode-opt { border-color: var(--danger); }
.pay-box { margin-top: 12px; padding: 14px; border: 2px solid var(--btn-bg); border-radius: 14px; background: color-mix(in srgb, var(--emerald) 6%, var(--card)); }
.pay-box h3 { margin: 0 0 6px; font-size: 17px; }
.pay-box .pay-to { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px dashed var(--btn-bg); font-size: 16px; }
.booked-box { margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); display: grid; gap: 8px; }
.booked-box > b { color: var(--brand-ink); display: flex; align-items: center; gap: 6px; }
.booked-box > b svg { width: 20px; height: 20px; flex: none; }
.booked-box .info-list { margin: 0; }
.booked-box .info-list dd a { word-break: break-all; }
.booked-box .btn { justify-self: start; }
.btn-wa { background: #25D366; border-color: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }
.btn-wa svg { width: 18px; height: 18px; }
.wa-row { align-items: center; }
.pay-info-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.pay-info-form .field { flex: 1 1 320px; margin: 0; }
.login-panel h2 { margin-top: 0; }

/* ---------- Modal (doctor login shown once) ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.modal { max-height: calc(100dvh - 32px); overflow: auto; width: min(460px, 100%); background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal h2 { margin-top: 0; }
.cred-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin: 8px 0; border-radius: 10px; background: var(--mint-2); }
.cred-row code { font-size: 18px; font-weight: 700; letter-spacing: .04em; user-select: all; }

/* ---------- Ratings ---------- */
.stars-view { display: inline-flex; gap: 1px; color: #F5A623; vertical-align: -0.15em; }
.stars-view svg { width: var(--star, 16px); height: var(--star, 16px); }
.star-picks { display: flex; gap: 4px; }
.star-pick { width: 44px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; color: #C9CED6; display: grid; place-items: center; border-radius: 10px; }
.star-pick svg { width: 32px; height: 32px; }
.star-pick.on { color: #F5A623; }
.star-pick:hover { background: var(--mint-2); }
.star-pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rating-box { margin-top: 16px; }
.rating-box h2 svg, .pro-ratings h2 svg { color: #F5A623; }
.rating-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating-item { padding: 10px 0; border-top: 1px solid var(--line); }
.rating-item p { margin: 6px 0 0; white-space: pre-line; }
.pro-ratings { margin-top: 16px; }
.rating-card.rt-hidden { opacity: .7; }

/* ---------- About App ---------- */
.about-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.about-head img { flex: none; }
.about-head h1 { margin: 0 0 4px; }
.about-head p { margin: 0; color: var(--muted); }
.about-intro { margin: 4px 0 20px; }
.about-intro p { margin: 0 0 14px; color: var(--muted); line-height: 1.7; }
/* "Donate For Development": a warm gradient pill with a soft shine, after the intro. */
.donate-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 22px 8px 8px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 16px; color: #fff; background: linear-gradient(120deg, #f97316, #e11d48 55%, #be185d); box-shadow: 0 8px 22px rgba(225, 29, 72, .32); transition: transform .2s ease, box-shadow .2s ease; }
.donate-cta::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); animation: donate-shine 3.2s ease-in-out infinite; }
.donate-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(225, 29, 72, .4); }
.donate-cta:active { transform: scale(.97); }
.donate-cta-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.22); }
.donate-cta-ico svg { width: 19px; height: 19px; animation: donate-beat 1.6s ease-in-out infinite; }
.donate-cta-arrow { font-size: 18px; transition: transform .2s ease; }
.donate-cta:hover .donate-cta-arrow { transform: translateX(3px); }
@keyframes donate-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes donate-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .donate-cta::after, .donate-cta-ico svg { animation: none; } }
#donate { scroll-margin-top: 80px; }
/* Activity list: "Record Analysis" in the donate pill's style, cool green-blue. */
.analysis-cta { text-decoration: none; background: linear-gradient(120deg, #10b981, #0ea5e9 55%, #6366f1); box-shadow: 0 8px 22px rgba(14, 165, 233, .32); }
.analysis-cta:hover { box-shadow: 0 12px 26px rgba(14, 165, 233, .42); color: #fff; }
.analysis-cta .donate-cta-ico svg { animation: none; }
.page-head > .btn { margin-top: 10px; }
.about-grid { display: grid; gap: 12px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-item { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px; }
.about-ico { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--mint-2); color: var(--brand-ink); }
.about-ico svg { width: 22px; height: 22px; }
.about-item h2 { font-size: 17px; margin: 0 0 4px; }
.about-item p { margin: 0 0 6px; line-height: 1.6; }
.about-link { font-size: 14px; font-weight: 600; }
.about-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Fellow Runners ---------- */
.fr-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .fr-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .fr-grid { grid-template-columns: 1fr 1fr 1fr; } }
.fr-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; }
.fr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 10px; }
.fr-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.fr-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; text-decoration: none; color: inherit; }
/* The name shrinks (…) before it reaches the Follow button; the ticks stay whole after it. */
.fr-who > span { min-width: 0; }
.fr-who b { display: flex; align-items: center; min-width: 0; }
.fr-who .fr-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fr-who .tick { flex: none; }
.fr-who small { color: var(--muted); }
.fr-avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--mint-2); }
.fr-initials { display: grid; place-items: center; color: var(--brand-ink); font-weight: 700; }
.fr-follow { min-height: 34px; padding: 2px 12px; }
.fr-follow svg { width: 16px; height: 16px; }
.fr-follow.on { background: transparent; color: var(--brand-ink); border-color: var(--btn-bg); }
.fr-act { display: block; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.fr-act:hover { background: color-mix(in srgb, var(--emerald) 5%, var(--card)); }
.fr-map { height: 130px; background: var(--mint-2); display: grid; place-items: center; }
.fr-map svg { width: 100%; height: 100%; }
.fr-act-body { padding: 10px 12px 12px; }
.fr-act-body h3 { margin: 4px 0 6px; font-size: 16px; }
.fr-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.fr-type { font-weight: 700; color: var(--brand-ink); }
.fr-type.t-ride { color: #2a78d6; }
.fr-type.t-trail_run { color: #8a5a00; }
.fr-empty { padding: 0 12px 12px; margin: 0; }
.fr-profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.fr-profile-head h1 { margin: 0; }
.fr-profile-head .btn-row { align-items: center; margin-top: 8px; }
/* "Mobile number: Private": a quiet chip the same height as the buttons beside it */
.fr-mobile-private { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--mint-2); color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fr-mobile-private svg { width: 15px; height: 15px; flex: none; }
.fr-compare td.fr-win b { color: var(--brand-ink); }
.fr-compare td.fr-win b::after { content: ' ▲'; font-size: 11px; }
/* Approved ticks next to a name (verified runner, shop owner) */
.tick { display: inline-flex; vertical-align: middle; margin-left: 5px; width: 1em; height: 1em; }
.tick svg { width: 100%; height: 100%; }
.tick-runner { color: var(--brand-ink); }
.tick-seller { color: #c77700; }
.tick-coach { color: #6d28d9; }
.tick-doctor { color: #0e7490; }
.tick-physio { color: #db2777; }
/* Required box: red star after the label (forms, sign-up, login, calculators). */
.req-star { color: #e11d48; font-weight: 700; margin-left: 3px; }
/* "Who are you in this app?" panel: the box under a ticked choice, and the note before Apply. */
#ticks .tk-row .field { margin: 6px 0 4px 34px; }
#ticks .tk-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 12px; }
#ticks .tk-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
/* Body numbers card at the end of a runner's profile */
.fr-health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fr-health-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line, #ddd); border-radius: 12px; }
.fr-health-tile b { font-size: 1.5rem; }
/* Fellow Runners: title row with the Ladder Board button, day-grouped activity feed, Load more */
.fr-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fr-ladder-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.fr-ladder-btn svg { width: 16px; height: 16px; }
.fr-day { font-size: 16px; margin: 18px 0 0; color: var(--muted); }
.fr-day + .fr-grid { margin-top: 8px; }
.fr-more-row { display: flex; justify-content: center; margin: 16px 0; }
.fr-more-row .fr-more[hidden] { display: none; }
/* Ladder Board: podium (1st left, 2nd middle, 3rd right), position + month, rankings list */
.fr-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; padding: 14px 6px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.fr-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.fr-pod-trophy { color: #E0A100; line-height: 0; }
.fr-pod-trophy svg { width: 30px; height: 30px; }
.fr-pod-ring { position: relative; display: inline-block; padding: 3px; border-radius: 50%; border: 3px solid #9AA7B0; text-decoration: none; line-height: 0; }
.fr-pod.p1 .fr-pod-ring { border-color: #E0A100; border-width: 4px; }
.fr-pod.p3 .fr-pod-ring { border-color: #B87333; }
.fr-pod.none .fr-pod-ring { border-style: dashed; border-color: var(--line); }
.fr-pod-rank { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1; color: #fff; background: #7E8B93; border: 2px solid var(--card); }
.fr-pod.p1 .fr-pod-rank { background: #E0A100; color: #2A1E00; }
.fr-pod.p3 .fr-pod-rank { background: #B87333; }
.fr-pod-name { font-weight: 700; color: var(--ink); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.fr-pod.p1 .fr-pod-name { font-size: 15px; }
.fr-pod-box { border: 1px solid var(--line); border-radius: 12px; padding: 4px 8px; max-width: 100%; font-size: 13px; }
.fr-pod-box b { font-size: 17px; font-family: var(--font-metric); }
.fr-pod-box small { display: block; color: var(--muted); }
.fr-pod.p1 .fr-pod-box { border-color: #E0A100; }
.fr-pod.p1 .fr-pod-box b { color: var(--warn); }
.fr-pod.me .fr-pod-name { color: var(--brand-ink); }
/* Month filter alone, in the right corner under the podium */
.fr-lb-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 14px 0 6px; }
/* "Total Km" / "Total Time" labels (podium boxes and ranking rows) */
.fr-lb-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); line-height: 1.2; }
.fr-pod-box .fr-lb-label + div { margin-bottom: 3px; }
.fr-pod-time { font-family: var(--font-metric); font-weight: 600; font-size: 14px; }
.fr-lb-nums { gap: 4px; }
.fr-lb-nums > span { display: grid; justify-items: end; line-height: 1.15; }
.fr-lb-nums .fr-lb-label { font-size: 9.5px; }
select.input.fr-lb-month { width: auto; max-width: 70%; margin-left: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.fr-lb-month { width: auto; max-width: 100%; margin-left: auto; min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
.fr-lb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 14px 2px 8px; }
.fr-lb-head b { text-transform: uppercase; letter-spacing: .06em; }
.fr-lb-list { display: grid; gap: 8px; }
.fr-lb-row { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.fr-lb-row:hover { border-color: var(--brand-ink); }
.fr-lb-row.me { border: 2px solid var(--brand-ink); background: color-mix(in srgb, var(--emerald) 10%, var(--card)); }
.fr-lb-rank { font-weight: 700; font-size: 18px; text-align: center; color: var(--muted); font-family: var(--font-metric); }
.fr-lb-row.top1 .fr-lb-rank { color: #E0A100; }
.fr-lb-row.top2 .fr-lb-rank { color: #7E8B93; }
.fr-lb-row.top3 .fr-lb-rank { color: #B87333; }
.fr-lb-name { min-width: 0; display: grid; }
.fr-lb-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-lb-name .badge { margin-left: 6px; vertical-align: 1px; }
.fr-lb-nums { display: grid; justify-items: end; text-align: right; white-space: nowrap; }
.fr-lb-nums b { font-size: 18px; font-family: var(--font-metric); }
@media (max-width: 400px) {
  .fr-podium { gap: 4px; padding: 12px 2px 14px; }
  .fr-lb-row { grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .fr-pod-box { padding: 3px 5px; }
}
.tk-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; }
.tk-row .field { flex: 1 1 200px; margin: 0; }

/* Sponsored event: floating card (bottom right; above the bottom bar on phones) */
.sponsor-card { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(360px, calc(100vw - 32px)); padding: 16px 16px 14px;
  background: var(--card); color: inherit; border: 2px solid var(--brand-ink); border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; }
.sponsor-card.show { opacity: 1; transform: none; }
.sponsor-card h3 { margin: 4px 28px 6px 0; font-size: 1.1rem; }
.sponsor-card p { margin: 0 0 8px; }
.sponsor-card .btn-row { margin-top: 10px; }
.sponsor-label { color: var(--brand-ink); font-weight: 600; }
.sponsor-x { position: absolute; top: 6px; right: 6px; }
@media (max-width: 760px) { .sponsor-card { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); right: 16px; left: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .sponsor-card { transition: none; } }
.sponsor-tick { margin: 8px 0 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
.sponsor-tick p { margin: 4px 0 0; }

/* Admin → Club management */
.acl-list { display: grid; gap: 10px; }
.acl-row { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.acl-logo { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); }
.acl-logo-none { display: grid; place-items: center; color: var(--brand-ink); background: color-mix(in srgb, var(--brand-ink) 10%, var(--card)); font-size: 26px; }
.acl-body { flex: 1; min-width: 0; }
.acl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.acl-top h3 { margin: 0; font-size: 1.05rem; }
.acl-body p { margin: 6px 0; }
.acl-desc { white-space: pre-line; }
.acl-edit { margin-top: 4px; }
@media (max-width: 480px) { .acl-row { flex-direction: column; } }

/* Morality Alert: a switch-style tick */
.mo-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 8px; }
.mo-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mo-slider { position: relative; flex: 0 0 52px; height: 30px; border-radius: 30px; background: var(--line); transition: background .2s; }
.mo-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.mo-switch input:checked + .mo-slider { background: var(--brand-ink); }
.mo-switch input:checked + .mo-slider::after { transform: translateX(22px); }
.mo-switch input:focus-visible + .mo-slider { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.mo-card p { margin: 4px 0 0; }
.mo-list { padding-left: 1.6em; display: grid; gap: 8px; }
.mo-list li { line-height: 1.5; }

/* Inbox: search people you follow; admin message to everyone */
.ib-search { margin: 0 0 14px; }
.ib-search-results:empty { display: none; }
.ib-search-results { margin-top: 8px; }
.ib-broadcast textarea { margin-bottom: 10px; }

/* Games */
/* Two games side by side (also on phones): icon, name, Play. Runner = aqua green, cycling = aqua blue. */
.game-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; max-width: 720px; }
.game-card { --g1: #0fb9a0; --g2: #2dd4bf; --g3: #e6fbf6; --gi: #045e52;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 18px 12px;
  border: 2px solid color-mix(in srgb, var(--g1) 35%, var(--line));
  background: linear-gradient(170deg, color-mix(in srgb, var(--g3) 70%, var(--card)), var(--card) 70%); }
.game-card.aqua-blue { --g1: #0891b2; --g2: #38bdf8; --g3: #e5f6fd; --gi: #0b4f6c; }
.game-hero { position: relative; width: 104px; height: 104px; display: grid; place-items: center; border-radius: 30px;
  color: #fff; transform: rotate(-6deg);
  background: linear-gradient(145deg, var(--g2), var(--g1) 55%, var(--gi));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--g1) 40%, transparent), inset 0 -6px 0 rgba(0, 0, 0, .12), inset 0 4px 0 rgba(255, 255, 255, .25); }
.game-hero svg { width: 54px; height: 54px; transform: rotate(6deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.game-hero-ring { position: absolute; inset: -7px; border-radius: 36px; border: 2px dashed color-mix(in srgb, var(--g1) 55%, transparent); }
.game-card h2 { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.3; color: color-mix(in srgb, var(--gi) 70%, var(--ink)); }
.game-play { min-width: 0; width: 100%; max-width: 180px; justify-content: center;
  background: linear-gradient(135deg, var(--g2), var(--g1)); border-color: transparent; color: #fff; }
.game-play:hover { filter: brightness(1.06); }
/* Both cards the same size, side by side: no "space between panels" margin on the second one, and the name always
   takes two lines' room so the icons and buttons line up. */
.game-list > .game-card.panel, .game-list > .game-card.panel + .game-card.panel { margin: 0; align-self: stretch; }
.game-card h2 { min-height: 2.6em; display: grid; place-items: center; }
.game-card .game-play { margin-top: auto; }
:root[data-theme="green"] .game-card h2, :root[data-theme="marine"] .game-card h2, :root[data-theme="dark"] .game-card h2 { color: color-mix(in srgb, var(--g2) 70%, #fff); }
:root[data-theme="green"] .game-card, :root[data-theme="marine"] .game-card, :root[data-theme="dark"] .game-card {
  background: linear-gradient(170deg, color-mix(in srgb, var(--g1) 22%, var(--card)), var(--card) 75%); }
@media (max-width: 420px) {
  .game-list { gap: 10px; }
  .game-card { padding: 14px 8px; }
  .game-hero { width: 78px; height: 78px; border-radius: 24px; }
  .game-hero svg { width: 40px; height: 40px; }
  .game-hero-ring { border-radius: 29px; inset: -6px; }
  .game-card h2 { font-size: 0.92rem; }
}

/* About → App Management Team */
.about-team-btn { text-align: center; margin: 18px 0 8px; }
.team-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.team-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 3px solid var(--brand-ink); flex: 0 0 auto; }
.team-card h2 { margin: 0 0 6px; }
.team-card p { margin: 10px 0 0; max-width: 60ch; }
@media (max-width: 520px) { .team-card { flex-direction: column; text-align: center; } }

/* Shop */
.sh-title-ic { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.12em; color: var(--brand-ink); }
.sh-title-ic svg { width: 100%; height: 100%; }
.sh-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sh-filters .field { flex: 0 1 220px; }
.sh-filters input[type=search] { flex: 1 1 220px; }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
/* Phones: 3 products in a row, compact cards */
@media (max-width: 640px) {
  .sh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .sh-card { border-radius: 10px; }
  .sh-card-body { padding: 6px 6px 8px; gap: 4px; }
  .sh-card-body h3 { font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sh-price { font-size: 0.85rem; flex-wrap: wrap; gap: 4px; }
  .sh-btns { flex-direction: column; gap: 4px; }
  .sh-btns .btn { min-height: 30px; padding: 2px 4px; font-size: 0.72rem; }
}
.sh-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sh-card-pic { display: block; aspect-ratio: 1 / 1; background: var(--line); }
.sh-img, .sh-big, .sh-mini, .sh-thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sh-noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.sh-noimg svg { width: 40%; height: 40%; }
.sh-card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.sh-card-body h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.sh-price { font-weight: 700; color: var(--brand-ink); display: flex; gap: 8px; align-items: center; }
.sh-price.big { font-size: 1.6rem; margin: 6px 0; }
/* Product page: the price and "Order Now" side by side. */
.sh-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 8px; }
.sh-price-row .sh-price.big { margin: 0; }
.sh-price-row .btn { flex: none; }
.sh-btns { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.sh-btns .btn { flex: 1 1 auto; justify-content: center; }
.sh-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .sh-detail { grid-template-columns: 1fr; } }
.sh-main-pic { aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--line); }
.sh-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.sh-thumb { width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.sh-info h1 { margin: 0; }
.sh-details p { margin: 0 0 8px; }
.sh-order { margin-top: 18px; }
.sh-total { font-size: 1.2rem; font-weight: 700; }
.sh-more { margin-top: 22px; }
.sh-more-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .sh-more-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sh-more-item { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.sh-more-item .sh-img { aspect-ratio: 1 / 1; border-radius: 10px; }
.sh-mini { width: 56px; height: 56px; border-radius: 8px; }
.sh-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-orders select.input { min-width: 120px; }
.fr-compare th[scope="row"] { text-align: left; }

/* ---------- Recording: mode choice, live bar, too-short pop-up ---------- */
.rec-head .gps-pill { margin: 0 0 0 auto; }
.rec-head .rec-view-btn { margin-left: 0; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--mint-2); color: var(--ink); }
.mode-pill svg, .mode-pill .bi { width: 16px; height: 16px; }
.mode-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 2px; }
.mode-label { width: 100%; text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.mode-chip svg, .mode-chip .bi { width: 20px; height: 20px; }
.mode-chip[aria-checked="true"] { border-color: var(--emerald); background: var(--mint-2); color: var(--emerald-ink, var(--ink)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 25%, transparent); }
.mode-chip:focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }
.live-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #C62828; color: #fff; text-decoration: none; font-size: 15px; position: sticky; top: calc(var(--header-h) + var(--safe-t)); z-index: 29; }
.live-bar[hidden] { display: none; }
.live-bar[data-state="paused"] { background: #FFC21A; color: #231B00; }
.live-bar[data-state="finishing"] { background: var(--btn-bg); color: var(--on-brand); }
.live-bar .live-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: live-blink 1.2s infinite; }
.live-bar[data-state="paused"] .live-dot, .live-bar[data-state="finishing"] .live-dot { animation: none; }
.live-bar .live-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.live-bar .live-open { margin-left: auto; font-weight: 700; text-decoration: underline; }
@keyframes live-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-bar .live-dot { animation: none; } }

/* ---------- My shoes & bikes ---------- */
.gear-panel { margin-top: 16px; }
.gear-group h3 { margin: 4px 0 8px; font-size: 16px; }
.gear-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.gear-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.gear-row.retired { opacity: .7; }
.gear-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mint-2); flex: none; }
.gear-ic svg, .gear-ic .bi { width: 20px; height: 20px; }
.gear-main { flex: 1 1 140px; min-width: 0; }
.gear-main .badge { margin-left: 6px; }
.gear-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.gear-form { width: 100%; }
.chip.bl-sec { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; font-weight: 700; }
.chip.bl-sec svg { width: 20px; height: 20px; flex: none; }

/* Blog columns fold on a phone (+ / – in each heading); on wider screens they are always open. */
.bl-col-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-col-title { flex: 1; min-width: 0; }
.bl-col-toggle { flex: none; width: 36px; height: 36px; margin: 1px -4px 0 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); font: inherit; font-size: 22px; font-weight: 700; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.bl-col-toggle:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
@media (max-width: 759px) {
  .bl-col-title { cursor: pointer; }
  .bl-col.is-folded { gap: 0; }
  .bl-col.is-folded .bl-col-body { display: none; }
}
@media (min-width: 760px) { .bl-col-toggle { display: none; } }

/* Admin panel: the section buttons as boxes side by side (they wrap onto more rows) */
.tabs.admin-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
.tabs.admin-tabs a { justify-content: center; text-align: center; white-space: normal; line-height: 1.3; border-radius: 10px; padding: 8px 10px; min-height: 46px; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tabs.admin-tabs a:hover { border-color: var(--btn-bg); }
.tabs.admin-tabs a:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
.tabs.admin-tabs a[aria-current="page"] { background: var(--btn-bg); color: var(--on-brand); border-color: var(--btn-bg); }
@media (max-width: 420px) { .tabs.admin-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tabs.admin-tabs a { font-size: 14px; padding: 6px; } }

/* ---------- Menu badge (Inbox) ---------- */
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge[hidden] { display: none; }
.input.bad { border-color: #dc2626; box-shadow: 0 0 0 2px color-mix(in srgb, #dc2626 25%, transparent); }

/* ---------- Admin → User Stats ---------- */
.us-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.us-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.us-kpi-label { font-size: 13px; color: var(--muted); }
.us-kpi b { font-family: var(--font-metric); font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.us-kpi-sub { font-size: 12px; color: var(--muted); }
.us-charts { display: grid; gap: 16px; margin-bottom: 16px; align-items: stretch; }
@media (min-width: 900px) { .us-charts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.us-charts .panel { margin: 0; min-width: 0; }
.us-pie-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.us-pie { width: 180px; height: 180px; flex: none; }
.us-slice { stroke: var(--card); stroke-width: 2; }
.us-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.us-legend li { display: flex; align-items: center; gap: 8px; }
.us-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.us-legend b { font-variant-numeric: tabular-nums; }
.us-gicon { width: 16px; height: 16px; color: var(--muted); }
.us-search { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.us-search .input { flex: 1 1 260px; max-width: 460px; }
.us-views { display: inline-flex; flex: none; padding: 3px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.us-view { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.us-view svg { width: 16px; height: 16px; }
.us-view:hover { color: var(--ink); background: var(--mint-2); }
.us-view[aria-current="page"] { background: var(--btn-bg); color: var(--on-brand); }
.us-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.us-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.us-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.us-card.is-off { opacity: .7; }
.us-top { display: flex; gap: 10px; align-items: center; }
.us-av { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.us-initials { display: grid; place-items: center; background: var(--mint-2); color: var(--ink); font-weight: 700; }
.us-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.us-id b { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.us-id .badge { margin-left: 6px; }
.us-g { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none; }
.us-g svg { width: 15px; height: 15px; }
.us-g.male { color: var(--series-ride); background: color-mix(in srgb, var(--series-ride) 14%, transparent); }
.us-g.female { color: var(--series-run); background: color-mix(in srgb, var(--series-run) 14%, transparent); }
.us-km { text-align: right; flex: none; }
.us-km b { display: block; font-family: var(--font-metric); font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.us-km span { font-size: 12px; color: var(--muted); }
.us-contact { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; }
.us-contact a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 4px; }
.us-contact a:hover { text-decoration: underline; }
.us-contact svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.us-contact a.is-blocked { color: #b91c1c; text-decoration: line-through; }
.us-meta { margin: 0; }
.us-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.us-spacer { flex: 1; }
.us-ibtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.us-ibtn svg { width: 19px; height: 19px; }
.us-ibtn:hover { border-color: var(--btn-bg); }
.us-ibtn:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 2px; }
.us-ibtn.call { color: #0d9488; } .us-ibtn.wa { color: #16a34a; } .us-ibtn.mail { color: #dc2626; } .us-ibtn.inbox { color: var(--series-ride); }
.us-more > summary { cursor: pointer; list-style: none; width: 40px; text-align: center; border-radius: 10px; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 0 6px; }
.us-more > summary::-webkit-details-marker { display: none; }
.us-more[open] > summary { color: var(--ink); }
.us-blocks > summary { cursor: pointer; }
.us-block-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.us-block-form .input { flex: 1 1 200px; }
.us-block-form select.input { flex: 0 0 120px; }
.us-block-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.us-block-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; }
.us-block-list li span { flex: 1; overflow-wrap: anywhere; }
.us-block-list svg { width: 16px; height: 16px; color: var(--muted); }
.us-plan-list { padding-left: 18px; }

/* ---------- Inbox ---------- */
.ib-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ib-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.ib-row:hover { border-color: var(--btn-bg); }
.ib-row.unread { border-color: var(--btn-bg); background: color-mix(in srgb, var(--btn-bg) 6%, var(--card)); }
.ib-row.unread .ib-last { color: var(--ink); font-weight: 600; }
.ib-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.ib-initials { display: grid; place-items: center; background: var(--mint-2); font-weight: 700; }
.ib-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-row-main .badge { margin-left: 6px; }
.ib-last { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.ib-count { min-width: 22px; height: 22px; border-radius: 999px; background: var(--badge-bg); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.ib-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ib-head h1 { margin: 0; font-size: 22px; }
.ib-head > div { flex: 1; min-width: 0; }
.ib-thread { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--mint); margin-bottom: 10px; }
.ib-msg { max-width: 82%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.ib-msg.mine { align-self: flex-end; background: color-mix(in srgb, var(--btn-bg) 14%, var(--card)); border-color: color-mix(in srgb, var(--btn-bg) 35%, var(--line)); border-radius: 16px 16px 4px 16px; }
.ib-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-msg small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.ib-empty { text-align: center; margin: 20px 0; }
.ib-compose { display: flex; gap: 8px; align-items: flex-end; }
.ib-compose textarea { flex: 1; min-height: 48px; resize: vertical; }

/* ---------- Block and Report: "⋯" menu, report form, Settings → Blocked users, Admin → Reports ---------- */
.bk-more { position: relative; display: inline-flex; }
.bk-more-btn { min-width: 40px; font-size: 20px; line-height: 1; letter-spacing: 1px; }
.bk-menu { min-width: 190px; }
.bk-blocked p { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.rp-reasons { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.rp-reasons legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.rp-reason { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rp-reason:has(input:checked) { border-color: var(--btn-bg); background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); }
.rp-reason input { margin: 0; width: 18px; height: 18px; flex: none; }
.act-report { margin-top: 18px; text-align: center; }
.act-report a { color: var(--muted); }
/* Report form: "Why are you reporting this …?" with one row per reason (icon, text, ›), then details */
.rp-modal { position: relative; padding-top: 18px; }
.rp-modal > h2 { padding-right: 40px; font-size: 1.05rem; }
.rp-close { position: absolute; top: 10px; right: 10px; }
.rp-why { font-weight: 700; font-size: 1.1rem; margin: 0 0 8px; }
.rp-list { display: grid; margin: 0 -8px; }
.rp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 8px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.rp-row:last-child { border-bottom: 0; }
.rp-row:hover, .rp-row:focus-visible { background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); }
.rp-row-ic { flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--btn-bg) 12%, var(--card)); color: var(--btn-bg); }
.rp-row-text { flex: 1; }
.rp-row-go { flex: none; color: var(--muted); }
.rp-note { margin: 12px 0 0; }
.rp-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; cursor: pointer; margin-bottom: 8px; }
.rp-modal .bi { width: 16px; height: 16px; flex: none; }
.rp-close .bi { width: 18px; height: 18px; }
.rp-chosen { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.rp-btn { color: var(--muted); }
.sh-buy { display: flex; align-items: center; gap: 8px; }   /* Order Now and the "⋯" menu */
.sh-unhide { text-align: center; margin: 4px 0 0; }
.ev-report { margin-top: 8px; }
.bl-list { display: grid; gap: 8px; }
.bl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.bl-name { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.ar-list { display: grid; gap: 10px; margin-top: 12px; }
.ar-row { margin: 0; }
.ar-row.is-open { border-color: #f59e0b; }
.ar-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ar-who { margin: 8px 0; }
.ar-who .badge { margin-left: 6px; }
.ar-details { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ar-msg { margin: 8px 0; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--mint-2); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- My own training plans ---------- */
.mp-panel { margin-top: 16px; }
.mp-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mp-panel-head h2 { margin: 0; display: flex; align-items: center; gap: 6px; }
.mp-panel-head h2 svg { width: 20px; height: 20px; }
.mp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-item { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: var(--card); }
.mp-item:hover { border-color: var(--btn-bg); }
.mp-bar { display: block; height: 6px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.mp-bar i { display: block; height: 100%; background: var(--btn-bg); border-radius: 999px; }
.mp-progress { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mp-progress .mp-bar { width: min(260px, 100%); }
.mp-table td.mp-tick { width: 44px; text-align: center; }
.mp-table input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--btn-bg); }
.mp-table tr.is-done td:not(.mp-tick) { color: var(--muted); }
.mp-table tr.is-done b { text-decoration: line-through; }
.mp-table tr.is-today { background: color-mix(in srgb, var(--btn-bg) 8%, transparent); }
.mp-table .mp-date { white-space: nowrap; }
.mp-table .mp-date .badge { margin-left: 6px; }
.mp-edit td { padding: 4px; vertical-align: top; }
.mp-edit .input { min-width: 0; }
.mp-edit td:nth-child(1) .input { min-width: 140px; }
.mp-edit td:nth-child(2) .input { min-width: 150px; }
.mp-edit td:nth-child(3) .input { width: 90px; }
.mp-edit td:nth-child(4) .input { min-width: 160px; }

/* ---------- More calculators (cards on the Calculators page) ---------- */
.more-calcs { margin-top: 24px; }
.more-calcs h2 { margin-bottom: 4px; }
/* Calculator cards: all the same - icon and name on one line, a short description below. */
.calc-cards { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .calc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .calc-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.calc-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.calc-card-head { display: flex; align-items: center; gap: 12px; }
.calc-card-head .tool-icon { flex: none; width: 42px; height: 42px; }
.calc-card-head b { font-size: 17px; line-height: 1.3; }
.calc-card:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: 3px; }
.more-calcs { margin-top: 24px; }

/* "How to use" tutorial on calculator pages */
.tutorial { margin: 10px 0 4px; }
.tutorial > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tutorial > summary::-webkit-details-marker { display: none; }
.tutorial > summary svg { width: 16px; height: 16px; }
.tutorial[open] > summary { background: var(--mint-2); }
.tutorial-body { margin-top: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); line-height: 1.7; }
.tutorial-body h3 { margin: 8px 0 2px; font-size: 15px; } .tutorial-body h3:first-child { margin-top: 0; }
.tutorial-body p { margin: 0 0 4px; } .tutorial-body ul { margin: 0 0 4px; padding-left: 20px; }

/* Health & nutrition */
.hl-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) { .hl-layout { grid-template-columns: minmax(280px, 360px) 1fr; } .hl-side { position: sticky; top: 76px; } }
.hl-cards { display: grid; gap: 16px; min-width: 0; }
.hl-card h2 { margin-top: 0; }
.hl-card.hl-focus { box-shadow: 0 0 0 3px var(--btn-bg); }
.hl-ftin { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hl-ftin[hidden] { display: none; }
.hl-out { margin-top: 8px; }
.hl-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 6px 0 8px; }
.hl-big small { width: 100%; color: var(--muted); font-size: 13px; }
.hl-big b { font-family: var(--font-metric); font-size: 44px; line-height: 1; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.hl-unit { color: var(--muted); font-weight: 600; }
.hl-pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--pc, var(--emerald)) 14%, var(--card)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--pc, var(--emerald)) 45%, transparent); }
.bmi-thin { --pc: #74B9FF; } .bmi-normal { --pc: #00B894; } .bmi-over { --pc: #F0932B; } .bmi-ob { --pc: #E03A3E; }
.bf-essential { --pc: #74B9FF; } .bf-athlete { --pc: #00B894; } .bf-fitness { --pc: #55EFC4; } .bf-average { --pc: #F0932B; } .bf-obese { --pc: #E03A3E; }
.hl-stats { margin: 8px 0; }
.hl-stats dd .hl-range { font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.4; display: block; }
.hl-src { color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-bottom: 4px; }
.hl-disclaimer { margin-top: 16px; }
.en-target b { font-size: 52px; }
.more-tool h3 { margin: 12px 0 6px; font-size: 16px; }
.split-table tr.partial td { font-style: italic; }
@media print {
  .topbar, .rail, .bottombar, .drawer, .scrim, .live-bar, .db-update, .demo-warning, .usage-note, .no-print, .toast-host, .page-head a { display: none !important; }
  .content { padding: 0 !important; }
  .tool-grid { display: block !important; }
  .result-zone::before { display: none !important; }
  .panel { border: 0 !important; box-shadow: none !important; }
}

/* About → Support RunFinite (donations) */
.donate { margin-top: 16px; border-color: color-mix(in srgb, var(--btn-bg) 40%, var(--line)); background: color-mix(in srgb, var(--btn-bg) 5%, var(--card)); }
.donate h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.donate h2 svg { width: 22px; height: 22px; color: var(--btn-bg); }
.donate-number { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px dashed var(--btn-bg); border-radius: 14px; background: var(--card); margin: 8px 0 12px; }
.donate-number small { display: block; }
.donate-digits { font-family: var(--font-metric); font-size: 30px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.donate-thanks { margin-bottom: 0; font-weight: 600; color: var(--btn-bg); }
.donate-admin { margin-top: 12px; }
.donate-accounts { display: grid; gap: 8px; margin: 8px 0 12px; }
.donate-accounts .donate-number { margin: 0; }
.donate-accounts .donate-digits { font-size: 26px; display: block; }
.pay-badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 10px; border-radius: 999px; color: #fff; background: #636E72; margin-bottom: 2px; }
.pay-bkash { background: #E2136E; } .pay-nagad { background: #EC1C24; } .pay-rocket { background: #8C3494; } .pay-upay { background: #0A4A9E; }
.donate-trx { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.donate-trx h3 { margin: 0 0 8px; }
.donate-trx #dn-trx { text-transform: uppercase; letter-spacing: .5px; max-width: 280px; }
.dn-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.dn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dn-row select { flex: 0 0 130px; } .dn-row input { flex: 1 1 120px; min-width: 0; } .dn-row input[inputmode="tel"] { flex: 2 1 160px; }
.dn-row input[hidden] { display: none; } .dn-row .icon-btn { flex: none; }
/* Donation rows: service ▾ · number · BDT amount, side by side */
.dn-row .dn-amount { flex: 1 1 110px; display: flex; align-items: center; gap: 6px; margin: 0; }
.dn-row .dn-amount span { font-weight: 600; color: var(--muted); }
.dn-row .dn-amount input { flex: 1 1 auto; min-width: 0; }
.dn-head { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.dn-head span:nth-child(1) { flex: 0 0 130px; } .dn-head span:nth-child(2) { flex: 2 1 160px; } .dn-head span:nth-child(3) { flex: 1 1 110px; padding-right: 40px; }
@media (max-width: 520px) { .dn-head { display: none; } }
.donate-number .badge { margin-top: 4px; }
.contact-admin { margin-top: 16px; }
.contact-admin h2 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.contact-admin h2 svg { width: 22px; height: 22px; color: var(--btn-bg); }
.donate-admin h3 { margin-top: 0; }

/* ---------- Events: four action tiles ---------- */
.ev-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 16px; }
.ev-action { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.25; transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; min-width: 0; }
.ev-action:hover { box-shadow: var(--shadow-lift); transform: translateY(-1px); border-color: color-mix(in srgb, var(--btn-bg) 40%, var(--line)); }
.ev-action.on { border-color: var(--btn-bg); background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); }
.ev-action-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-bg); color: var(--brand-ink); }
.ev-action-ic svg { width: 20px; height: 20px; }
.ev-action:first-child .ev-action-ic { background: var(--btn-bg); color: var(--on-brand); }
@media (max-width: 760px) { .ev-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .ev-action { padding: 10px; font-size: 14px; } .ev-action-ic { width: 34px; height: 34px; } }
/* My events: a gradient tile in the spirit of the Record Analysis pill, in every theme */
:root[data-theme] .ev-action.ev-action-glow { position: relative; overflow: hidden; border-color: transparent; color: #FFFFFF; font-weight: 700;
  background: linear-gradient(120deg, #f97316, #ec4899 55%, #8b5cf6); box-shadow: 0 8px 22px rgba(236, 72, 153, .3); }
:root[data-theme] .ev-action.ev-action-glow:hover { border-color: transparent; color: #FFFFFF; box-shadow: 0 12px 26px rgba(236, 72, 153, .42); }
:root[data-theme] .ev-action.ev-action-glow.on { border-color: #FFFFFF; box-shadow: 0 0 0 2px #ec4899, 0 8px 22px rgba(236, 72, 153, .3); }
:root[data-theme] .ev-actions .ev-action.ev-action-glow .ev-action-ic { background: rgba(255, 255, 255, .22); color: #FFFFFF; border-color: transparent; box-shadow: none; }
.ev-action-glow::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(-120%); animation: donate-shine 3.2s ease-in-out infinite; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ev-action-glow::after { animation: none; } }

/* ---------- Events: month calendar ---------- */
.evc-panel { padding: 18px; }
.evc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.evc-titlebox h1 { margin: 0 0 6px; }
.evc-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.evc-year { font-family: var(--font-metric); font-size: 20px; font-weight: 700; color: var(--muted); margin-right: 14px; }
.evc-month { font-size: 20px; min-width: 6.5em; text-align: center; }
.evc-nav .icon-btn { width: 34px; height: 34px; }
.evc-nav .icon-btn svg { width: 16px; height: 16px; }
.evc-prev svg { transform: rotate(90deg); } .evc-next svg { transform: rotate(-90deg); }
.evc-spark { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.evc-bars { display: flex; align-items: flex-end; gap: 2px; height: 40px; width: min(232px, 60vw); border-bottom: 2px solid #1E88E5; }
.evc-bars i { flex: 1; background: transparent; border-radius: 2px 2px 0 0; }
.evc-bars i.on { background: #1E88E5; }
.evc-spark small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }
.evc-stats { display: flex; gap: 22px; margin: 0; }
.evc-stats div { text-align: center; }
.evc-stats dd { margin: 0; font-family: var(--font-metric); font-size: 34px; font-weight: 500; line-height: 1; }
.evc-stats .hi dd { color: #1E88E5; }
.evc-stats dt { font-size: 12px; color: var(--muted); margin-top: 4px; }
.evc-grid { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); display: grid; gap: 1px; }
.evc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.evc-head div { background: color-mix(in srgb, var(--btn-bg) 8%, var(--card)); text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .3px; padding: 8px 2px; text-transform: uppercase; }
.evc-cell { background: var(--card); min-height: 104px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; min-width: 0; outline: none; }
.evc-cell.out { background: color-mix(in srgb, var(--line) 35%, var(--card)); cursor: default; }
.evc-cell.out .evc-date { color: var(--muted); opacity: .6; }
.evc-cell:hover:not(.out) { background: color-mix(in srgb, var(--btn-bg) 5%, var(--card)); }
.evc-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.evc-cell.sel { box-shadow: inset 0 0 0 2px var(--btn-bg); }
.evc-date { align-self: flex-end; font-family: var(--font-metric); font-size: 15px; font-weight: 600; line-height: 1; }
.evc-cell.today .evc-date { background: var(--btn-bg); color: var(--on-brand); border-radius: 999px; padding: 3px 7px; }
.evc-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.evc-ev { display: flex; align-items: center; gap: 3px; padding: 1px 5px; font-size: 12.5px; font-weight: 600; line-height: 1.3;
  color: color-mix(in srgb, var(--c, #1E88E5) 75%, var(--ink)); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px;
  background: color-mix(in srgb, var(--c, #1E88E5) 15%, transparent); }
.evc-ev span { overflow: hidden; text-overflow: ellipsis; }
.evc-ev svg { flex: none; width: 11px; height: 11px; }
.evc-ev:hover { background: color-mix(in srgb, var(--c, #1E88E5) 18%, transparent); }
.evc-ev.past { opacity: .62; }
.evc-ev.done span { text-decoration: line-through; text-decoration-thickness: 1px; }
.evc-more { font-size: 11.5px; color: var(--muted); padding-left: 6px; }
.evc-dots { display: none; }
.evc-more.m { display: none; }
.evc-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 10px; }
.evc-cat { font-size: 12.5px; padding: 1px 8px; background: color-mix(in srgb, var(--c) 15%, transparent); border-radius: 4px; }
.evc-agenda { margin-top: 16px; }
.evc-agenda h2 { font-size: 18px; margin: 0 0 10px; }
@media (max-width: 700px) {
  .evc-panel { padding: 12px 10px; }
  .evc-top { align-items: flex-start; }
  .evc-stats { gap: 14px; width: 100%; justify-content: space-between; }
  .evc-stats dd { font-size: 26px; }
  .evc-year { font-size: 16px; margin-right: 4px; } .evc-month { font-size: 17px; min-width: 5.5em; }
  .evc-cell { min-height: 64px; padding: 4px 3px 5px; gap: 2px; }
  .evc-date { font-size: 13px; }
  .evc-head div { font-size: 11px; padding: 6px 0; letter-spacing: 0; }
  .evc-ev { font-size: 10.5px; padding: 0 2px 0 3px; border-left-width: 2px; }
  .evc-ev svg { display: none; }
  .evc-evs .evc-ev:nth-child(n+3) { display: none; }
  .evc-more { font-size: 10px; padding-left: 2px; }
  .evc-more.pc { display: none; } .evc-more.m { display: block; }
}
@media (max-width: 380px) {
  .evc-evs { display: none; }
  .evc-dots { display: flex; gap: 2px; justify-content: center; margin-top: auto; }
  .evc-dots i { width: 6px; height: 6px; border-radius: 50%; }
}

/* Privacy policy / account deletion */
.legal { max-width: 820px; margin-inline: auto; line-height: 1.7; }
.legal h1 { margin: 0 0 4px; }
.legal h2 { font-size: 1.08rem; margin: 22px 0 6px; }
.legal ul, .legal ol { padding-inline-start: 22px; margin: 6px 0; }
.legal li { margin: 4px 0; }
.legal-links a { font-weight: 600; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--line, transparent)); }
.danger-zone h2 { color: var(--danger); }

/* Live position: blue dot with a white ring, a soft pulse, and a light beam toward the direction of travel. */
.me-pos { position: relative; pointer-events: none; }
.me-pos .me-dot { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #0A6CFF; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.me-pos .me-halo { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: rgba(10, 108, 255, .35); animation: me-pulse 2.2s ease-out infinite; }
@keyframes me-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.2); opacity: 0; } }
.me-pos .me-beam { position: absolute; left: 50%; top: 50%; width: 64px; height: 56px; margin: -56px 0 0 -32px;
  transform-origin: 50% 100%; transition: transform .35s ease-out;
  background: linear-gradient(to top, rgba(10, 108, 255, .7), rgba(10, 108, 255, 0) 92%);
  clip-path: polygon(50% 100%, 12% 0, 88% 0); filter: blur(.4px); }
@media (prefers-reduced-motion: reduce) { .me-pos .me-halo { animation: none; } .me-pos .me-beam { transition: none; } }

/* ---------------- Clubs ---------------- */
.clubs .cl-tabs { grid-template-columns: 1fr 1fr; }
.clubs .cl-tabs3 { grid-template-columns: repeat(3, 1fr); }
.cl-create { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 12px 16px; margin-bottom: 12px; font-weight: 600; }
.cl-list { display: grid; gap: 10px; }
@media (min-width: 900px) { .cl-list { grid-template-columns: 1fr 1fr; } }
.cl-list-head { font-size: 1.05rem; margin: 6px 0 10px; }
.cl-row { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 12px; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.cl-row:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .35); }
.cl-row-body { flex: 1; min-width: 0; }
.cl-row-body h3 { margin: 0 0 2px; font-size: 1.06rem; line-height: 1.3; }
.cl-row-right { flex: none; }
.cl-logo { border-radius: 16px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--mint-2); }
.cl-logo-txt { color: #fff; font-weight: 800; letter-spacing: .5px; background: linear-gradient(135deg, var(--run-1), var(--run-2)); }
.cl-logo-txt.ride { background: linear-gradient(135deg, #2D8CFF, #1B4FB8); }
.cl-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13.5px; }
.cl-meta span { display: inline-flex; align-items: center; gap: 4px; }
.cl-meta svg { width: 15px; height: 15px; }
.cl-invites .cl-row { border: 0; padding: 6px 0; }
.cl-inv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cl-inv-actions .small { margin-right: auto; }
/* club page */
.cl-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; margin-bottom: 12px; }
.cl-cover { height: 120px; display: grid; place-items: end; padding: 12px 16px; color: rgba(255, 255, 255, .35);
  background: radial-gradient(120% 140% at 0% 0%, #FFB37A 0%, var(--run-1) 40%, var(--run-2) 100%); }
.cl-hero.ride .cl-cover { background: radial-gradient(120% 140% at 0% 0%, #8EC5FF 0%, #2D8CFF 45%, #1B4FB8 100%); }
.cl-cover svg { width: 64px; height: 64px; }
.cl-hero-body { padding: 0 16px 16px; }
.cl-hero-body .cl-logo { margin-top: -44px; border: 4px solid var(--card); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.cl-hero-body h1 { margin: 8px 0 4px; font-size: 1.6rem; line-height: 1.25; }
.cl-desc { margin: 8px 0 0; white-space: pre-line; }
.cl-join { margin-top: 12px; display: grid; gap: 6px; justify-items: start; }
.cl-circles { display: flex; flex-wrap: wrap; gap: 10px 14px; padding: 4px 2px 12px; }
.cl-circle { flex: none; display: grid; justify-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--ink); font: inherit; min-width: 72px; -webkit-tap-highlight-color: transparent; }
.cl-circle-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), background .18s; }
.cl-circle-ico svg { width: 24px; height: 24px; }
.cl-circle:active .cl-circle-ico { transform: scale(.9); background: var(--mint-2); }
.cl-circle small { font-size: 13px; }
.cl-circle.danger { color: var(--danger); }
/* ladder */
.cl-month { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.cl-month .icon-btn { width: 40px; height: 40px; font-size: 24px; color: var(--brand-ink); }
.cl-month .icon-btn:disabled { opacity: .3; }
.cl-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 520px) { .cl-tiles { grid-template-columns: 1fr 1fr; } }
.cl-tiles > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.cl-tiles small { display: block; color: var(--muted); font-size: 12.5px; }
.cl-tiles b { font-size: 1.15rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ladder { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.cl-ladder-head { display: grid; grid-template-columns: 34px 44px 1fr auto; gap: 10px; padding: 8px 14px; font-size: 12.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); background: var(--mint-2); }
.cl-ladder-row { position: relative; display: grid; grid-template-columns: 34px 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.cl-ladder-row.me { background: color-mix(in srgb, var(--run-1) 8%, transparent); }
.cl-ladder-row.zero { opacity: .6; }
.cl-rank { font-weight: 700; text-align: center; font-size: 1.05rem; color: var(--muted); }
.cl-ladder-row.top1 .cl-rank, .cl-ladder-row.top2 .cl-rank, .cl-ladder-row.top3 .cl-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .95rem; }
.cl-ladder-row.top1 .cl-rank { background: linear-gradient(135deg, #F7C948, #D99A00); }
.cl-ladder-row.top2 .cl-rank { background: linear-gradient(135deg, #C9D1D9, #8D99A6); }
.cl-ladder-row.top3 .cl-rank { background: linear-gradient(135deg, #E3A27A, #B5652F); }
.cl-ladder-name { min-width: 0; display: grid; gap: 1px; }
.cl-ladder-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-ladder-name small { font-size: 12.5px; }
.cl-bar { display: block; height: 4px; border-radius: 4px; margin-top: 4px; background: linear-gradient(90deg, var(--run-1), var(--run-2)); }
.cl-ladder-km { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
/* members */
.cl-members { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); }
.cl-member { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cl-member:first-child { border-top: 0; }
.cl-member-name { flex: 1; min-width: 140px; display: grid; text-decoration: none; color: inherit; }
.cl-waiting { margin-bottom: 12px; }
.cl-waiting .cl-member { padding: 10px 0; }
/* form */
.cl-form { max-width: 640px; }
.cl-form h1 { font-size: 1.4rem; margin-top: 0; }
.cl-logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.cl-logo-row b { display: block; margin-bottom: 6px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; }
.cl-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cl-chip svg { width: 18px; height: 18px; }
.cl-chip:has(input:checked) { border-color: var(--run-1); background: color-mix(in srgb, var(--run-1) 12%, var(--card)); color: var(--run-2); }
.cl-chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* invite dialog */
.cl-modal { width: min(520px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.cl-inv-list { margin-top: 10px; overflow-y: auto; max-height: 50vh; display: grid; gap: 2px; }
.cl-inv-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; cursor: pointer; }
.cl-inv-item:hover { background: var(--mint-2); }
.cl-inv-item input { width: 20px; height: 20px; accent-color: var(--run-1); }
.cl-inv-item > span:not(.fr-avatar) { flex: 1; display: grid; }
.cl-inv-item.is-member { opacity: .6; cursor: default; }

/* Stats: 4 tabs, best efforts, lifetime map */
.stats-screen .top-tabs { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1024px) { .stats-screen .top-tabs { max-width: 680px; } }
.ef-list { display: grid; gap: 8px; }
@media (min-width: 760px) { .ef-list { grid-template-columns: 1fr 1fr; } }
.ef-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--run-1) 10%, var(--card)), var(--card)); border: 1px solid var(--line); }
.ef-item:hover { border-color: var(--run-1); }
.ef-dist { font-weight: 700; }
.ef-time { grid-row: span 2; text-align: right; display: grid; align-content: center; }
.ef-time b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ef-time small { color: var(--muted); }
.ef-act { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.life-map { height: min(68vh, 560px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--mint-2); }
.life-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.life-legend i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #22C55E; border: 2px solid #E53935; }

.cl-ladder-head span:nth-child(2) { grid-column: 2 / 4; }
.cl-hero-body .small svg, .cl-row-body .small svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.cl-member-name b, .cl-inv-item b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-inv-item > span.badge { flex: none; display: inline-block; }
.badge svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }

/* Standard OpenStreetMap tiles: calmer colours, so main roads are pale instead of bright orange (until a CARTO key is set). */
.map-soft .leaflet-tile-pane { filter: saturate(.42) brightness(1.04) contrast(.97); }
.map-soft .leaflet-overlay-pane, .map-soft .leaflet-marker-pane { filter: none; }

/* No internet: a small badge at the top; recording still works and uploads later. */
.offline-pill { position: fixed; z-index: 60; top: calc(var(--header-h, 56px) + var(--safe-t, 0px) + 6px); left: 50%; transform: translateX(-50%);
  padding: 3px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: #5B6B63;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); pointer-events: none; }
.offline-pill::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #FFB020; margin-right: 6px; vertical-align: 1px; }
/* online, but a record could not be uploaded: a warning colour and a red dot */
.offline-pill.warn { background: #8A3B2E; }
.offline-pill.warn::before { background: #FF8A7A; }

/* Admin → one user, activity dialog, Event Timing */
.modal.modal-wide { width: min(720px, 100%); }
.us-name { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--btn-bg) 45%, transparent); text-underline-offset: 3px; }
.us-name:hover { color: var(--brand-ink); }
.ap-head { display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: center; }
.ap-head .ap-kpis, .ap-head .btn-row { grid-column: 1 / -1; }
.ap-head h1 { margin: 0; font-size: 24px; }
.ap-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.ap-initials { display: grid; place-items: center; background: var(--mint-2); font-weight: 700; font-size: 22px; }
.ap-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ap-kpis > div { background: var(--mint-2); border-radius: 12px; padding: 8px 10px; text-align: center; }
.ap-kpis b { display: block; font-family: var(--font-metric); font-size: 22px; }
.ap-kpis span { font-size: 13px; color: var(--muted); }
.ap-form { display: grid; gap: 10px; }
.ap-form .field { margin: 0; }
@media (min-width: 640px) { .ap-form .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.ap-acts td { vertical-align: top; }
.ap-row-btns { gap: 4px; flex-wrap: nowrap; }
.ap-row-btns .icon-btn { width: 36px; height: 36px; }
.ap-del { color: var(--danger, #c0392b); }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand-ink); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ap-map { height: 240px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; margin: 0 0 10px; }
.ap-grid dt { font-size: 12px; color: var(--muted); }
.ap-grid dd { margin: 0; font-weight: 600; }
.ap-splits { columns: 2; font-size: 14px; }
.et-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.et-filters select { flex: 1 1 260px; max-width: 520px; }
.et-filters select[hidden] { display: none; }
/* event card: the runner's own BIB and certificate tags beside "Completed" */
.badge.ev-tag-bib, .badge.ev-tag-cert, .badge.ev-tag-race { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.badge.ev-tag-race { background: #FDE4E1; color: #A3161F; }
.badge.ev-tag-race svg { width: 13px; height: 13px; flex: none; }
:root[data-theme="green"] .badge.ev-tag-race, :root[data-theme="marine"] .badge.ev-tag-race, :root[data-theme="dark"] .badge.ev-tag-race { background: rgba(248, 113, 113, .16); color: #FCA5A5; }
.badge.ev-tag-bib { background: #E3EEF9; color: #1C5A99; }
.badge.ev-tag-cert { background: #FCEFD6; color: #8A5A00; }
.badge.ev-tag-bib svg, .badge.ev-tag-cert svg { width: 13px; height: 13px; flex: none; }
:root[data-theme="green"] .badge.ev-tag-bib, :root[data-theme="marine"] .badge.ev-tag-bib, :root[data-theme="dark"] .badge.ev-tag-bib { background: rgba(124, 200, 242, .16); color: #9FD3F5; }
:root[data-theme="green"] .badge.ev-tag-cert, :root[data-theme="marine"] .badge.ev-tag-cert, :root[data-theme="dark"] .badge.ev-tag-cert { background: rgba(242, 183, 5, .16); color: #F5CD5B; }
/* Admin → Overview cards: text in the middle */
.ad-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.et-summary h2 { margin: 0 0 4px; }
.et-table .et-row { cursor: pointer; }
.et-table .et-row:hover, .et-table .et-row:focus { background: color-mix(in srgb, var(--btn-bg) 8%, transparent); outline: none; }
.et-group td { background: var(--mint-2); font-weight: 700; }
.et-place { width: 56px; text-align: center; font-weight: 700; }
.et-medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-weight: 700; }
.et-medal.m1 { background: linear-gradient(135deg, #fbbf24, #d97706); }
.et-medal.m2 { background: linear-gradient(135deg, #cbd5e1, #64748b); }
.et-medal.m3 { background: linear-gradient(135deg, #f0a46b, #b45309); }
/* Event form: "Distances and fees" rows (distance, fee, start, cut-off, slots; a card per row on phones) */
.evd-rows { display: grid; gap: 8px; margin: 6px 0 8px; }
.evd-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.evd-cell { display: grid; gap: 4px; min-width: 0; }
.evd-cell > span { font-size: 12px; color: var(--muted); }
.evd-cell .input { min-width: 0; }
.evd-del { align-self: end; color: var(--muted); }
.evd-del svg { width: 16px; height: 16px; display: inline-block; }
.evd-add svg { width: 16px; height: 16px; display: inline-block; }
@media (max-width: 640px) {
  .evd-row { grid-template-columns: 1fr 1fr; }
  .evd-cell.evd-d { grid-column: 1 / -1; }
  .evd-del { grid-column: 2; justify-self: end; }
}
/* Event page: the per-distance table */
.evd-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.evd-table { width: 100%; }
.evd-table th[scope="row"] { text-align: left; white-space: nowrap; }
.evd-table td, .evd-table th { white-space: nowrap; }
/* Calculator layout (title / hint / input) */
.calc-title { display: flex; align-items: center; gap: 12px; }
.calc-title .tool-icon { flex: none; width: 44px; height: 44px; }
h2.calc-title .tool-icon { width: 36px; height: 36px; border-radius: 12px; }
h2.calc-title .tool-icon svg { width: 20px; height: 20px; }
.calc-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 10px; }
.calc-actions .tutorial { margin: 0; flex: 1 1 180px; min-width: 0; }
.vo2-methods { margin-top: 16px; }
.vo2-method > h2 { margin-bottom: 8px; }
.vo2-method .field > span { font-weight: 400; }
.vo2-formula { margin: 8px 0 0; overflow-wrap: anywhere; }
/* =====================================================================================================
   Compact & modern layer (last in the file, so it wins). Phones showed everything too big: a serif body
   font at 16px/1.6, 20px card padding, 28px titles, 48px buttons. Here: a clean sans font, tighter type
   and spacing, pill buttons and chips, flat list rows with thin dividers (like Strava), lighter cards.
   ===================================================================================================== */
:root {
  --font: "RF Digits", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-panel: 16px;
  --r-ctl: 12px;
  --card-shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 1px 1px rgba(16, 24, 32, .03);
}
body { font-size: 15px; line-height: 1.5; letter-spacing: .1px; }
h1, h2, h3 { letter-spacing: -.2px; }

/* Page heads and panels */
.page-head { margin: 2px 0 14px; }
.page-head h1 { font-size: 24px; font-weight: 700; line-height: 1.2; }
.page-head p { font-size: 14px; }
.panel { padding: 16px; box-shadow: var(--card-shadow); }
.panel + .panel { margin-top: 12px; }
.panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

/* Buttons: pills */
.btn { min-height: 42px; padding: 8px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; gap: 6px; }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 34px; padding: 4px 14px; font-size: 13.5px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-quiet { background: var(--card); border: 1.5px solid var(--line); }
.btn-quiet:hover { border-color: color-mix(in srgb, var(--brand-ink) 45%, var(--line)); background: var(--card); }
.btn-row { gap: 8px; }

/* Forms */
.field { margin-bottom: 12px; }
.field > span { font-size: 14px; margin-bottom: 4px; }
.input, textarea.input { min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
textarea.input { min-height: 90px; }
select.input { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
input[type="search"].input { border-radius: 999px; padding-left: 16px; background: var(--mint-2); border-color: transparent; }
input[type="search"].input:focus { background: var(--card); }

/* Chips, tabs, badges, notices */
.chip { min-height: 34px; padding: 4px 14px; font-size: 14px; border-width: 1.5px; }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--brand-ink) 10%, var(--card)); color: var(--brand-ink); border-color: var(--brand-ink); font-weight: 700; }
.tabs a { min-height: 34px; padding: 4px 14px; font-size: 14px; }
.top-tabs button { min-height: 44px; font-size: 15px; }
.badge { font-size: 11.5px; padding: 1px 8px; }
.notice { padding: 10px 12px; font-size: 14px; }
.empty { padding: 28px 12px; }
.empty h2 { font-size: 17px; }

/* Stats: small grey label, bold number (Strava style) */
.summary-stats dd, .stat-grid dd { font-size: 24px; }
.stat-grid div { border-radius: 12px; padding: 8px 10px; }

/* Cards that stay cards: lighter */
.act-item, .fr-card, .content-card, .about-item, .pf-hero, .cl-hero, .cl-ladder, .cl-tiles > div, .sh-card, .game-card { box-shadow: var(--card-shadow); }
.act-item { border-radius: 14px; gap: 12px; padding: 8px; }
.act-item h3 { font-size: 15.5px; }
.about-item { padding: 12px; gap: 12px; border-radius: 14px; }
.about-item h2 { font-size: 15.5px; }
.about-item p { font-size: 14px; line-height: 1.5; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  :root { --header-h: 54px; --bottom-h: 60px; }
  body { font-size: 14.5px; }
  .content { padding: 10px 12px calc(var(--bottom-h) + var(--safe-b) + 20px); }
  .topbar .title { font-size: 16px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 22px; height: 22px; }
  .brand img { width: 30px; height: 30px; }
  .brand b { font-size: 17px; }
  .top-tabs { margin: 0 -12px 12px; }

  /* Bottom bar: slimmer, smaller labels, smaller run button */
  .tab { font-size: 11.5px; gap: 1px; }
  .tab svg { width: 22px; height: 22px; }
  .run-disc { width: 56px; height: 56px; font-size: 15px; transform: translateY(-14px); }
  .tab-run:active .run-disc, .run-disc:active { transform: translateY(-12px) scale(.9); }

  .page-head h1 { font-size: 21px; }
  .page-head p { font-size: 13.5px; }
  .panel { padding: 14px; border-radius: 14px; }
  .panel h2 { font-size: 16px; }
  .btn { min-height: 40px; font-size: 14.5px; padding: 6px 16px; }
  .btn-sm { min-height: 32px; font-size: 13px; padding: 3px 12px; }

  /* Flat list rows with thin dividers instead of big cards: clubs, inbox, members */
  .cl-list, .ib-list { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--card-shadow); }
  .cl-list:empty, .ib-list:empty { display: none; }
  .cl-row, .ib-row { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 10px 12px; gap: 12px; }
  .cl-row + .cl-row, .ib-list li + li .ib-row { border-top: 1px solid var(--line); }
  .cl-row:hover { transform: none; box-shadow: none; background: var(--mint-2); }
  .cl-row .cl-logo { width: 46px !important; height: 46px !important; border-radius: 12px; font-size: 16px !important; }
  .cl-row-body h3 { font-size: 15px; font-weight: 600; margin: 0; }
  .cl-meta { font-size: 12.5px; gap: 2px 10px; }
  .cl-meta svg { width: 13px; height: 13px; }
  .cl-row-body .small { font-size: 12.5px; }
  .ib-av { width: 42px; height: 42px; }
  .ib-row.unread { background: color-mix(in srgb, var(--btn-bg) 6%, transparent); }
  .cl-create { padding: 10px 12px; border-radius: 14px; }

  /* Activities */
  .act-list { gap: 8px; }
  .act-item { grid-template-columns: 72px 1fr; padding: 8px; }
  .act-thumb, .act-thumb-icon { width: 72px; height: 58px; border-radius: 10px; }
  .act-item h3 { font-size: 15px; }
  .act-meta { font-size: 12.5px; }

  /* Notifications, info rows, stat rows */
  .notif-item { padding: 8px; }
  .info-row { min-height: 48px; grid-template-columns: 34px 1fr; gap: 10px; }
  .stat-row { min-height: 54px; }
  .summary-stats dd, .stat-grid dd { font-size: 22px; }

  /* Club page */
  .cl-cover { height: 96px; }
  .cl-hero-body h1 { font-size: 1.3rem; }
  .cl-circle-ico { width: 50px; height: 50px; }
  .cl-circle { min-width: 62px; }
  .cl-circle small { font-size: 12px; }

  /* Fellow runners */
  .fr-grid { gap: 10px; }
  .fr-card { border-radius: 14px; }

  /* Admin tabs: smaller tiles */
  .tabs.admin-tabs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .tabs.admin-tabs a { min-height: 38px; padding: 4px 6px; font-size: 13px; }
}
/* Activities: dates and km limits folded behind a "Filters" pill */
.act-more-filters > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; width: auto; font-weight: 600; }
.act-more-filters > summary::-webkit-details-marker { display: none; }
.act-more-filters[open] > summary { background: color-mix(in srgb, var(--brand-ink) 10%, var(--card)); color: var(--brand-ink); border-color: var(--brand-ink); }
.act-more-filters > .row { margin-top: 10px; }
.act-filters { gap: 8px; }
/* Event list: each event's date icon gets one of twenty "app icon" gradients (top-left → bottom-right, two neighbouring
   hues), two soft see-through circles, white text and a blurred glow of its own colour underneath.
   The colour follows the event id, so it stays. */
.date-block.tone { --c1: #2f5bf6; --c2: #7c6cf8; --glow: #5b63f7; color: #fff; border: 0; position: relative; isolation: isolate;
  overflow: hidden; border-radius: 16px; background: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 0 10px 18px -8px color-mix(in srgb, var(--glow) 70%, transparent), 0 3px 6px -3px color-mix(in srgb, var(--glow) 45%, transparent); }
.date-block.tone::before, .date-block.tone::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .13); }
.date-block.tone::before { width: 130%; aspect-ratio: 1; left: -45%; top: 26%; }    /* big circle, lower left */
.date-block.tone::after { width: 95%; aspect-ratio: 1; right: -48%; top: -22%; }     /* smaller circle, upper right */
/* Square (1:1) like an app icon: day, month and year centred in it. */
.date-block.tone { width: 66px; aspect-ratio: 1; padding: 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; align-self: flex-start; }
/* Each line of the date gets a soft shadow below it (70% transparent black), so it stands out on every colour. */
.date-block.tone b, .date-block.tone span, .date-block.tone small { text-shadow: 0 2px 3px rgba(0, 0, 0, .3); }
.date-block.tone b { color: #fff; font-size: 25px; line-height: 1; }
.date-block.tone span { color: rgba(255, 255, 255, .96); text-transform: uppercase; letter-spacing: .4px; font-size: 12px; line-height: 1.25; margin-top: 2px; }
.date-block.tone small { color: rgba(255, 255, 255, .85); font-size: 10px; line-height: 1.1; }
.date-block.tone-0 { --c1: #2f5bf6; --c2: #7c6cf8; --glow: #5b63f7; }   /* indigo → violet */
.date-block.tone-1 { --c1: #17c0b6; --c2: #11dcb0; --glow: #14c9b0; }   /* teal → mint */
.date-block.tone-2 { --c1: #ff5f86; --c2: #f2386a; --glow: #f54b78; }   /* pink → rose */
.date-block.tone-3 { --c1: #ffa77f; --c2: #ffd56a; --glow: #ffb870; }   /* peach → yellow */
.date-block.tone-4 { --c1: #ff5257; --c2: #ff7b6e; --glow: #ff6060; }   /* red → coral */
.date-block.tone-5 { --c1: #0a82ec; --c2: #18aaf2; --glow: #1196ef; }   /* blue → sky */
.date-block.tone-6 { --c1: #8e9eab; --c2: #b8c6d1; --glow: #9aa9b5; }   /* ash → silver */
.date-block.tone-7 { --c1: #22b573; --c2: #7ed957; --glow: #45c463; }   /* green → lime */
.date-block.tone-8 { --c1: #b39ddb; --c2: #f6a5c0; --glow: #d3a1cf; }   /* pastel lavender → pastel pink */
.date-block.tone-9 { --c1: #00c6d7; --c2: #5ef0d0; --glow: #2fdad6; }   /* aqua → aquamarine */
.date-block.tone-10 { --c1: #a259ff; --c2: #e45bd9; --glow: #c45aed; }  /* purple → magenta */
.date-block.tone-11 { --c1: #ff8a3d; --c2: #ffbf3c; --glow: #ffa23c; }  /* orange → amber */
.date-block.tone-12 { --c1: #6a85f6; --c2: #9fb4ff; --glow: #8098fa; }  /* periwinkle */
.date-block.tone-13 { --c1: #ff7eb3; --c2: #ffb199; --glow: #ff97a6; }  /* rose → peach */
.date-block.tone-14 { --c1: #14a3a8; --c2: #3b8cf0; --glow: #2697cc; }  /* teal → blue */
.date-block.tone-15 { --c1: #f7b733; --c2: #f9d976; --glow: #f8c650; }  /* gold → light gold */
.date-block.tone-16 { --c1: #43d8a8; --c2: #6ec6f5; --glow: #58cfcf; }  /* mint → sky */
.date-block.tone-17 { --c1: #f06bc4; --c2: #9d7bff; --glow: #c873e2; }  /* fuchsia → violet */
.date-block.tone-18 { --c1: #ff6a5b; --c2: #ff9f6e; --glow: #ff8464; }  /* sunset orange */
.date-block.tone-19 { --c1: #a3b18a; --c2: #cfd9a8; --glow: #b6c298; }  /* sage → pastel olive */
.event-card.past .date-block.tone { filter: saturate(.55) brightness(.97); box-shadow: none; }
/* Record Analysis: Calendar tab - month calendar with activity marks, and the year chart (km bars, hours line) */
.stats-screen .top-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-screen .top-tabs button { padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .stats-screen .top-tabs button { font-size: 13.5px; } }
@media (min-width: 1024px) { .stats-screen .top-tabs { max-width: 760px; } }
/* Month calendar: title left, month and arrows right; every day a soft rounded square, active days filled
   (a run is the orange gradient, other sports their colour, several sports in slices), days of the next and
   last month striped. */
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 0 0 14px; }
.cal-head h2 { margin: 0; }
.cal-panel .period-nav.cal-nav { display: flex; align-items: center; gap: 2px; padding: 0; margin: 0; background: none; border: 0; }
.cal-nav .period-label { min-width: 0; padding: 0 4px; font-size: 16px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cal-grid { display: grid; gap: 8px; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-wd { text-align: center; font-size: 14px; font-weight: 500; color: var(--muted); padding: 0 0 2px; }
.cal-cell { display: grid; place-items: center; min-width: 0; }
.cal-cell.out { width: 100%; max-width: 52px; justify-self: center; aspect-ratio: 1; border-radius: 13px;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ink) 9%, transparent) 0 1.5px, transparent 1.5px 6px), color-mix(in srgb, var(--mint-2) 70%, transparent); }
.cal-mark { width: 100%; max-width: 52px; aspect-ratio: 1; min-height: 36px; border-radius: 13px; display: grid; place-items: center; border: 0; padding: 0;
  background: var(--mint-2); font: inherit; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-mark.on { color: #fff; font-weight: 700; cursor: pointer; text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 12px -6px rgba(0, 0, 0, .35); }
.cal-mark.on.run { background: linear-gradient(160deg, #FF7A45, var(--run-1) 45%, var(--run-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px -6px var(--run-2); }
.cal-mark.today { font-weight: 700; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand-ink); }
.cal-mark.on.today { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand-ink); }
.cal-mark.sel, .cal-mark.on.sel { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.cal-mark:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cal-legend .sport-dot.run { background: linear-gradient(160deg, var(--run-1), var(--run-2)); }
@media (max-width: 380px) { .cal-grid, .cal-row { gap: 5px; } .cal-mark, .cal-cell.out { border-radius: 10px; } .cal-mark { font-size: 14px; } }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0; }
.cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cal-sub { font-size: 16px; margin: 16px 0 8px; }
.cal-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 8px; }
.yr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 12px; }
.yr-kpis .kpi { padding: 10px; }
.cal-kpis .kpi dd b, .yr-kpis .kpi dd b { font-size: 22px; }
.yr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.yr-head h2 { margin: 0; }
.yr-pick { width: auto; min-width: 140px; }
/* Record Analysis: every small number card centred. */
.stats-screen .kpi { text-align: center; }
.stats-screen .kpi .kpi-delta { text-align: center; }
/* Year: shoes & bikes table at the end (km, activities, share of all km with a thin bar). */
.yr-gear { margin-top: 18px; }
.yr-gear h3 { margin: 0 0 8px; font-size: 16px; }
.yr-gear-table td:first-child svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; color: var(--brand-ink); }
.yr-gear-table td:nth-child(n+2), .yr-gear-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.yr-gear-pct { display: inline-block; width: 48px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.yr-gear-pct i { display: block; height: 100%; border-radius: inherit; background: var(--brand-ink); }
.yr-chart .yr-bar { fill: var(--emerald); }
.yr-chart .yr-bar.now { fill: var(--brand-ink); }
.yr-chart .yr-line { stroke: var(--run-1); }
.yr-chart .yr-dot { fill: var(--run-1); stroke: var(--card); stroke-width: 1.5; pointer-events: none; }
.yr-chart text.yr-h-axis { fill: var(--run-2); }
.yr-chart text.now { fill: var(--ink); font-weight: 700; }
.legend .yr-key-bar { background: var(--emerald); }
.legend .yr-key-line { height: 3px; border-radius: 2px; background: var(--run-1); }
@media (min-width: 640px) {
  .cal-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Challenges (views/challenges.js): monthly challenge cards, progress and the completion celebration ---------- */
.ch-tabs { grid-template-columns: repeat(2, 1fr); }
/* Two cards side by side on a phone (360-400 px), more on wider screens. */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ch-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 14px 12px 12px; box-shadow: var(--card-shadow); }
.ch-card h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.3; }
.ch-card.done { border-color: color-mix(in srgb, var(--emerald) 55%, var(--line)); }
/* The badge: the event list's gradient tile (.date-block.tone-N) with an icon, the number and its unit. */
.date-block.tone.ch-badge { width: 64px; gap: 1px; }
.date-block.tone.ch-badge svg.bi { width: 20px; height: 20px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.date-block.tone.ch-badge b { font-size: 19px; line-height: 1.05; font-family: var(--font-metric); }
.date-block.tone.ch-badge small { font-size: 10px; }
/* Completed: a green tick in a round badge with a white ring (fixed colours, like the tile's own gradient) */
.ch-badge-done { position: absolute; right: 3px; top: 3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #16a34a; color: #fff; border: 2px solid #fff; box-sizing: border-box; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.date-block.tone.ch-badge .ch-badge-done svg.bi { width: 12px; height: 12px; filter: none; }
.ch-sport { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.ch-sport svg { width: 16px; height: 16px; flex: none; }
.ch-desc { margin: 0; font-size: 13.5px; line-height: 1.45; }
.ch-dates { margin: 0; font-size: 12.5px; color: var(--muted); }
.ch-left { color: var(--brand-ink); font-weight: 600; }
.ch-action { margin-top: auto; padding-top: 8px; }
.ch-action .btn { min-height: 40px; }
.ch-joined { color: var(--brand-ink); }
.ch-progress { margin: 6px 0 2px; }
.ch-bar { height: 8px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.ch-bar i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--emerald), var(--brand-ink)); transition: width .6s ease; }
.ch-progress-text { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.ch-progress-text b { color: var(--ink); }
.ch-done-line { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.ch-done-line svg { width: 16px; height: 16px; flex: none; color: #e0a100; }
/* All Challenges card: icon, name, dates, bar and button centred; a tap opens the details pop-up. */
.ch-card { align-items: center; text-align: center; cursor: pointer; }
.ch-card .date-block.tone.ch-badge, .ch-modal .date-block.tone.ch-badge { align-self: center; }
.ch-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ch-card .ch-progress, .ch-card .ch-action { align-self: stretch; }
.ch-card .ch-progress-text { flex-direction: column; align-items: center; gap: 2px; }
.ch-card .ch-done-line { justify-content: center; }
.ch-modal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ch-modal h2 { margin: 6px 0 0; font-size: 20px; }
.ch-modal .ch-progress { align-self: stretch; }
.ch-modal .ch-rules { text-align: left; margin: 8px 0 0; }
.ch-modal-x { position: absolute; top: 8px; right: 8px; color: var(--muted); }
/* My Challenges: one row per challenge. */
.ch-section { margin: 0 0 20px; }
.ch-section h2 { display: flex; align-items: center; gap: 6px; font-size: 17px; margin: 0 0 10px; }
.ch-section h2 svg { width: 18px; height: 18px; }
.ch-list { display: grid; gap: 10px; }
.ch-row { position: relative; display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-panel); padding: 12px; box-shadow: var(--card-shadow); }
.ch-row .date-block.tone.ch-badge { width: 56px; }
.ch-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-row-body h3 { margin: 0; font-size: 16px; }
.ch-act-link { color: var(--brand-ink); font-weight: 600; }
.ch-none { margin: 0; }
.ch-rules { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; }
.ch-rules svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* Celebration when a challenge is completed: the badge pops and six little stars fly out of it. */
.ch-celebrate .ch-badge { animation: ch-pop .7s cubic-bezier(.3, 1.6, .5, 1) 2; }
.ch-burst { position: absolute; left: 44px; top: 46px; width: 0; height: 0; pointer-events: none; z-index: 2; }
.ch-row .ch-burst { left: 40px; top: 40px; }
.ch-burst i { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; color: #f7b733; opacity: 0; animation: ch-fly 1.3s ease-out forwards; }
.ch-burst i svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.ch-burst .s0 { --dx: -46px; --dy: -34px; }
.ch-burst .s1 { --dx: 0px; --dy: -54px; color: #ff6a5b; animation-delay: .08s; }
.ch-burst .s2 { --dx: 48px; --dy: -30px; color: #17c0b6; animation-delay: .16s; }
.ch-burst .s3 { --dx: 54px; --dy: 18px; animation-delay: .1s; }
.ch-burst .s4 { --dx: -50px; --dy: 22px; color: #a259ff; animation-delay: .2s; }
.ch-burst .s5 { --dx: 10px; --dy: 50px; color: #ff6a5b; animation-delay: .26s; }
@keyframes ch-pop { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.18) rotate(-6deg); } }
@keyframes ch-fly { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(40deg); } }
@media (prefers-reduced-motion: reduce) { .ch-celebrate .ch-badge, .ch-burst i { animation: none; } .ch-burst { display: none; } .ch-bar i { transition: none; } }

/* ---------- Activity page extras (views/activity-extras.js): owner drawer, feeling scale, best efforts, charts,
   replay, crop; calories on cards ---------- */
.act-head { display: flex; align-items: flex-start; gap: 8px; }
.act-head-main { flex: 1; min-width: 0; }
.act-head-main h1 { overflow-wrap: anywhere; }
.act-menu-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; font-size: 26px; line-height: 1; color: var(--ink); }
.act-menu-btn span { transform: translateY(-2px); }

/* "⋯" owner menu: a white dropdown card under the button (right edge), like a small app menu. */
.act-menu-wrap { position: relative; flex: none; }
.act-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 220px; padding: 6px; border-radius: 14px;
  background: #fff; color: #1f2933; border: 1px solid rgba(0, 0, 0, .06); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35);
  display: grid; gap: 2px; animation: act-pop-in .14s ease-out; transform-origin: top right; }
@keyframes act-pop-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.act-pop-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 9px 14px; border: 0; border-radius: 9px;
  background: transparent; color: inherit; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.act-pop-item svg { width: 19px; height: 19px; flex: none; color: #6b7785; }
.act-pop-item:hover, .act-pop-item:focus-visible { background: var(--brand-ink); color: var(--on-brand); outline: none; }
.act-pop-item:hover svg, .act-pop-item:focus-visible svg { color: #fff; }
.act-pop-item.danger, .act-pop-item.danger svg { color: #dc2626; }
.act-pop-item.danger:hover, .act-pop-item.danger:focus-visible { background: #dc2626; color: #fff; }
.act-pop-item.danger:hover svg, .act-pop-item.danger:focus-visible svg { color: #fff; }
@media (prefers-reduced-motion: reduce) { .act-pop { animation: none; } }
/* Edit / Share from the menu: a centred pop-up window. */
.act-sheet { width: min(560px, 100%); padding: 0; display: flex; flex-direction: column; }
.act-sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.act-sheet-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; }
.act-sheet-body { padding: 14px 18px 20px; }
.act-sheet-body .panel { border: 0; padding: 0; background: transparent; box-shadow: none; margin: 0; }
.act-sheet-body .panel > h2:first-child { display: none; }
/* Love (❤) on an activity and the owner's quick share */
.act-love { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; line-height: 1; }
.act-love.static { cursor: default; }
.act-love .act-love-ic { display: inline-flex; }
.act-love svg { width: 18px; height: 18px; display: inline-block; }
.act-love.on { color: #e11d48; border-color: rgba(225, 29, 72, .35); background: rgba(225, 29, 72, .1); }
.act-love.static.on, .act-love.static { color: #e11d48; }
.act-love:not(.static):hover { border-color: #fda4af; color: #e11d48; }
.act-love.pop .act-love-ic { animation: love-pop .35s ease-out; }
@keyframes love-pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .act-love.pop .act-love-ic { animation: none; } }
.act-love-n:empty { display: none; }
.act-card-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.act-card-actions .act-love { min-height: 30px; padding: 2px 10px; font-size: 13px; }
.act-qshare svg { width: 17px; height: 17px; display: inline-block; }
.act-card-actions .act-qshare { width: 32px; height: 32px; min-height: 32px; }
.act-share-wrap { display: inline-flex; }
.act-card-actions .act-share-wrap .act-pop { right: auto; left: 0; }   /* cards: the menu opens to the right of the button */
/* the owner's "⋯" beside the share button: the same size as it; its dropdown opens to the left (room on a phone) */
.act-card-menu { display: inline-flex; }
.act-card-actions .act-menu-btn { width: 32px; height: 32px; min-height: 32px; padding: 0; display: grid; place-items: center; font-size: 20px; }
.act-card-actions .act-menu-btn .spinner { width: 14px; height: 14px; }
/* "Share with photo": the finished picture with Share / Download / Other photo */
.sm-modal { width: min(520px, 100%); }
.sm-preview { display: block; width: 100%; height: auto; max-height: 62dvh; object-fit: contain; border-radius: 14px; margin: 4px 0 14px; background: var(--mint-2); }
.sm-btns { justify-content: center; }
.act-head-btns { display: flex; align-items: center; gap: 4px; flex: none; }
.act-lovers { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: -8px 0 14px; }
.act-lovers svg { width: 14px; height: 14px; color: #e11d48; display: inline-block; margin-right: 4px; }
.fr-stats .act-love { margin-left: auto; min-height: 30px; padding: 2px 10px; font-size: 13px; }
/* Result Link of a finished event (event page, Admin → event edit) */
.ev-result { margin: 16px 0; }
.ev-result h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 10px; }
.ev-result h2 svg, .ev-result-by svg { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; color: var(--brand-ink); }
.ev-result-link { margin: 0 0 6px; }
.ev-result-by { margin: 0 0 10px; }
.ev-result .btn-row { margin-top: 6px; }
/* My event record: the runner's own BIB number, certificate and event photos links (event page, only they see it) */
.ev-myinfo { margin: 16px 0; }
.ev-myinfo-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 0 0 10px; }
.ev-myinfo-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0; }
.ev-myinfo-head h2 svg { width: 18px; height: 18px; color: var(--brand-ink); }
.ev-myinfo-private { display: inline-flex; align-items: center; gap: 4px; }
.ev-myinfo-private svg { width: 12px; height: 12px; }
.ev-myinfo-empty { margin: 0 0 6px; }
.ev-myinfo-bib { display: inline-flex; flex-direction: column; gap: 2px; margin: 0 0 12px; padding: 10px 18px; min-width: 132px;
  background: var(--mint-2); border: 1px solid var(--line); border-top: 6px solid var(--brand-ink); border-radius: 10px; }
.ev-myinfo-bib span { font-size: 12px; color: var(--muted); }
.ev-myinfo-bib b { font-size: 28px; line-height: 1.1; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--ink); overflow-wrap: anywhere; }
.ev-myinfo-links { margin: 0 0 6px; }
.ev-myinfo .btn-row { margin-top: 6px; }
.ev-myinfo-form .field { margin-bottom: 12px; }
/* Privacy Edit: a tick and an eye per part (eye-slash and grey when hidden), then the charts that follow them. */
.act-pv-list { display: grid; gap: 8px; margin: 0 0 14px; }
.act-pv-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.act-pv-row input { width: 20px; height: 20px; margin: 0; accent-color: var(--btn-bg); flex: none; }
.act-pv-eye { display: inline-flex; color: var(--brand-ink); }
.act-pv-eye svg, .act-pv-graphs svg, .act-pv-badge svg, .act-pv-mark svg { width: 18px; height: 18px; display: inline-block; flex: none; }
.act-pv-name { flex: 1; font-weight: 600; }
.act-pv-state { color: var(--brand-ink); font-weight: 600; }
.act-pv-row.off { background: var(--mint-2); }
.act-pv-row.off .act-pv-eye, .act-pv-row.off .act-pv-state, .act-pv-row.off .act-pv-name { color: var(--muted); }
.act-pv-sub { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.act-pv-graphs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; }
.act-pv-graphs li { display: flex; align-items: center; gap: 10px; padding: 4px 2px; color: var(--brand-ink); }
.act-pv-graphs li span { flex: 1; color: var(--ink); }
.act-pv-graphs li small { font-weight: 600; }
.act-pv-graphs li.off, .act-pv-graphs li.off span { color: var(--muted); }
.act-pv-badge { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--muted); }
.act-pv-mark { display: inline-flex; color: var(--muted); }
/* feeling scale: 5 dots on a line, like a slider */
.feel .feel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 0 6px; }
.feel-now { font-size: 17px; }
.feel-clear { border: 0; background: none; color: var(--run-2); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 0; }
/* Effort slider: the whole 48px-tall strip takes the finger (touch-action: none keeps the page from scrolling while
   dragging); the thumb follows the finger and settles on the nearest of the 5 steps when let go. */
.feel-track { --feel: 0; position: relative; height: 48px; padding: 0 16px; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; border-radius: var(--r-ctl); }
.feel-track:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.feel-rail { position: relative; height: 100%; }
.feel-line, .feel-fill { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; background: var(--line); }
.feel-fill { right: auto; width: calc(100% * var(--feel)); background: linear-gradient(90deg, color-mix(in srgb, var(--run-1) 55%, var(--card)), var(--run-1)); transition: width .22s cubic-bezier(.22, 1, .36, 1); }
.feel-tick { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.feel-tick.on { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--run-1) 70%, var(--card)); }
.feel-thumb { position: absolute; top: 50%; left: calc(100% * var(--feel)); width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--card); border: 3px solid var(--run-1); box-shadow: 0 3px 10px -2px rgba(0, 0, 0, .28); transition: left .22s cubic-bezier(.22, 1, .36, 1), transform .15s; }
.feel-track.dragging .feel-fill, .feel-track.dragging .feel-thumb { transition: none; }
.feel-track.dragging .feel-thumb { transform: scale(1.15); }
.feel-track.is-empty .feel-fill { display: none; }
.feel-track.is-empty .feel-thumb { border-color: var(--line); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .feel-fill, .feel-thumb { transition: none; } }
/* Tags: Race Day or Training first, then the workout tags of Training */
.tag-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tag-kind { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.tag-kind svg { width: 18px; height: 18px; color: var(--muted); }
.tag-kind:hover { border-color: color-mix(in srgb, var(--brand-ink) 45%, var(--line)); }
.tag-kind[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-brand); }
.tag-kind[aria-pressed="true"] svg { color: var(--on-brand); }
.tag-kind:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tag-chips { margin-top: 10px; }
.tag-hint { margin: 8px 0 0; }
.feel-ends { display: flex; justify-content: space-between; }
.feel-desc { min-height: 1.2em; margin: 6px 0 0; }

.act-feel-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: -4px 0 16px; }
.act-feel { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.act-feel svg { width: 24px; height: 24px; color: var(--run-2); }
.act-best-btn { display: inline-flex; align-items: center; gap: 8px; }
.act-best-btn svg { width: 18px; height: 18px; color: #C8901A; }
.act-best-head { display: flex; align-items: center; gap: 8px; }
.act-best-head h2 { flex: 1; margin: 0; }
.act-best-n { font-size: 18px; color: var(--muted); }
.act-best-list { list-style: none; margin: 12px 0 0; padding: 0; }
.act-best-list li { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.act-best-list li + li { border-top: 1px solid var(--line); }
.act-best-list b { display: block; font-size: 17px; font-weight: 600; }
.act-best-num { font-family: var(--font-metric); font-size: 18px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: pre; }
.act-best-ic { --be: var(--brand-ink); flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--be) 75%, #fff), var(--be)); box-shadow: 0 6px 12px -6px var(--be); }
.act-best-ic svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

/* charts */
.act-charts { display: grid; gap: 16px; margin-bottom: 16px; }
.act-chart-panel h2 { margin-top: 0; }
.act-chart-wrap { position: relative; }
.act-chart { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; }
.act-chart text { font-size: 11px; fill: var(--muted); font-family: var(--font-metric); }
.act-chart .grid { stroke: var(--line); stroke-width: 1; }
.act-chart .frame { fill: none; stroke: var(--line); }
.act-chart .area { fill: color-mix(in srgb, var(--series-ride) 70%, transparent); }
.act-chart .line { fill: none; stroke: var(--series-ride); stroke-width: 1.5; stroke-linejoin: round; }
.act-chart.elev .area { fill: color-mix(in srgb, var(--muted) 35%, transparent); }
.act-chart.elev .line { stroke: var(--muted); }
.act-chart .avg { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; }
.act-chart .cross { stroke: var(--ink); stroke-width: 1; }
.act-chart .dot { fill: var(--card); stroke: var(--ink); stroke-width: 2; }
.act-chart-read { margin: 0 0 4px; min-height: 1.3em; font-weight: 600; font-variant-numeric: tabular-nums; }
.act-chart-stats { margin: 12px 0 0; }
.act-chart-stats > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.act-chart-stats dt { color: var(--muted); }
.act-chart-stats dd { margin: 0; font-weight: 700; font-family: var(--font-metric); font-size: 18px; font-variant-numeric: tabular-nums; }
.act-chart-tip { margin: -8px 0 0; }

/* replay */
.act-map-wrap { position: relative; }
.act-play { position: absolute; right: 12px; bottom: 28px; z-index: 1000; width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--card); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); display: grid; place-items: center; cursor: pointer; }
.act-play svg { width: 26px; height: 26px; margin-left: 3px; }
.act-play:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.act-replay { margin: -6px 0 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.act-replay-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-replay-row + .act-replay-row { margin-top: 4px; justify-content: space-between; }
.act-replay-range { flex: 1; min-width: 120px; accent-color: var(--run-1); }
.act-replay-read { font-family: var(--font-metric); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.act-replay-speeds { display: flex; gap: 6px; }
.act-replay-speeds .chip { min-height: 34px; padding: 2px 10px; }

/* crop screen */
html.act-crop-open { overflow: hidden; }
.act-crop { position: fixed; inset: 0; z-index: 1600; background: var(--card); color: var(--ink); display: flex; flex-direction: column;
  padding: var(--safe-t) 0 var(--safe-b); }
.act-crop-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-bottom: 1px solid var(--line); }
.act-crop-head h1 { flex: 1; margin: 0; font-size: 20px; }
.act-crop-map { flex: 1; min-height: 200px; background: var(--mint-2); }
.act-crop-panel { padding: 8px 16px 14px; max-width: 720px; width: 100%; margin: 0 auto; }
.act-crop-panel .notice { margin: 4px 0 8px; }
.act-crop-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.act-crop-total b { font-family: var(--font-metric); font-size: 22px; font-variant-numeric: tabular-nums; }
.act-crop-ends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 2px; text-align: center; }
.act-crop-ends small { color: var(--muted); font-weight: 600; }
.act-crop-step { display: flex; align-items: center; justify-content: center; }
.act-crop-val { font-family: var(--font-metric); font-size: 16px; font-variant-numeric: tabular-nums; min-width: 0; line-height: 1.2; }
.act-crop-nudge { width: 32px; height: 40px; color: var(--run-2); font-size: 26px; line-height: 1; }
.act-range { --s: 0; --e: 1; position: relative; height: 44px; margin: 0 14px; }
.act-range-track, .act-range-fill { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: var(--line); }
.act-range-fill { left: calc(var(--s) * 100%); right: calc((1 - var(--e)) * 100%); background: var(--run-1); }
.act-range input { position: absolute; left: -14px; width: calc(100% + 28px); top: 0; height: 44px; margin: 0; background: none;
  -webkit-appearance: none; appearance: none; pointer-events: none; z-index: 2; }
.act-range input::-webkit-slider-runnable-track { background: none; border: 0; }
.act-range input::-moz-range-track { background: none; border: 0; }
.act-range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  background: #00A86B; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.act-range input::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  background: #00A86B; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.act-range input + input::-webkit-slider-thumb { background: #FF4FA3; border-color: #111; }
.act-range input + input::-moz-range-thumb { background: #FF4FA3; border-color: #111; }
.act-range input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--focus); }

/* calories: activity cards and the "add your weight" hints */
.act-meta .act-kcal { font-size: 13px; color: var(--muted); }
.kcal-hint svg { color: var(--run-2); }

/* Add an activity: three ways (by hand, JSON / CSV, GPX), each a big button; then the chosen one's panel */
.an-choices { display: grid; gap: 12px; }
.an-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.an-choice:hover, .an-choice:focus-visible { border-color: color-mix(in srgb, var(--emerald) 45%, var(--line)); }
.an-choice > .bi:last-child { width: 18px; height: 18px; color: var(--muted); flex: none; }
.an-choice-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--mint); color: var(--emerald); }
.an-choice-ic .bi { width: 24px; height: 24px; }
.an-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.an-choice-text b { font-size: 17px; }
.an-back { margin: 0 0 10px; }
.gx-found { margin: 16px 0 10px; font-size: 18px; }
.gx-map { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 12px; aspect-ratio: 2 / 1; background: var(--mint); color: var(--emerald); }
.gx-map svg { display: block; width: 100%; height: 100%; }
.gx-stats { margin: 0 0 8px; }
.gx-stats dd { font-size: 20px; }
.gx-splits { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.gx-splits li { padding: 6px 10px; border-radius: 10px; background: var(--mint); font-variant-numeric: tabular-nums; }
.an-rows .an-row-skipped td, .an-rows .an-row-demo td { color: var(--muted); }

/* Several GPX files: one row each (tick, small map, name / type / date · km · time · pace) */
.gx-list { display: grid; gap: 10px; margin-bottom: 14px; }
.gx-item { box-sizing: border-box; min-width: 0; display: grid; grid-template-columns: auto 96px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.gx-item-bad { grid-template-columns: 96px minmax(0, 1fr); opacity: .85; }
.gx-item-bad:has(.gx-item-pick) { grid-template-columns: auto 96px minmax(0, 1fr); }
.gx-item-pick { display: flex; padding-top: 10px; }
.gx-item-pick input { width: 20px; height: 20px; accent-color: var(--emerald); }
.gx-item-map { width: 96px; height: 68px; border-radius: 10px; overflow: hidden; background: var(--mint); color: var(--emerald); }
.gx-item-map svg { display: block; width: 100%; height: 100%; }
.gx-item-body { display: grid; gap: 6px; min-width: 0; }
.gx-item-body .input { width: 100%; min-width: 0; box-sizing: border-box; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.gx-item-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gx-item-row select.input { flex: 1 1 140px; }
.gx-item-line, .gx-item-err { margin: 0; }
.gx-item-err { color: var(--danger, #C62828); }
.gx-item-status.ok { color: var(--emerald); font-weight: 600; }
.gx-item-status.bad { color: var(--danger, #C62828); }
@media (max-width: 420px) {
  .gx-item, .gx-item-bad:has(.gx-item-pick) { grid-template-columns: auto 72px minmax(0, 1fr); }
  .gx-item-bad { grid-template-columns: 72px minmax(0, 1fr); }
  .gx-item-map { width: 72px; height: 56px; }
}

/* Club chat: the Chat circle with its "new" count, and the group thread (others' messages with a small photo and name) */
.cl-chat-ic { position: relative; display: inline-grid; place-items: center; }
.cl-chat-badge { position: absolute; top: -9px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--badge-bg); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--card); }

/* Chat screen (inbox and club chat, assets/js/views/chat-ui.js). Ideas from the "mgs" messenger: a full-height
   column, a thin 7-day strip, coloured own bubbles with a small corner, time and ✓✓ inside, a reaction pill on the
   bubble's edge, and a tap on a message for the reaction row and an action sheet. Colours come from the theme. */
.inbox-chat, .club-chat { max-width: 820px; margin: 0 auto; }
.cx { display: flex; flex-direction: column; min-height: 320px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 10px 34px -18px rgba(23, 49, 59, .28); }
.cx-head { display: flex; align-items: center; gap: 10px; flex: none; min-height: 66px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.cx-back, .cx-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; color: var(--emerald-2, var(--emerald)); background: transparent; }
.cx-back:hover, .cx-icon:hover { background: var(--mint-2); }
.cx-back .bi, .cx-icon svg { width: 20px; height: 20px; }
.cx-head .ib-av, .cx-head .cx-av { width: 44px; height: 44px; border: 2px solid var(--card); box-shadow: 0 4px 12px rgba(34, 62, 72, .14); }
.cx-who { flex: 1; min-width: 0; }
.cx-who h1 { margin: 0; font-size: 17px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-who p { margin: 2px 0 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-head-act { display: flex; align-items: center; gap: 4px; flex: none; }
.cx-banner { display: flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-height: 28px; padding: 4px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--emerald) 7%, var(--card)); color: color-mix(in srgb, var(--ink) 80%, var(--card)); font-size: 11.5px; text-align: center; }
.cx-banner .bi { width: 13px; height: 13px; flex: none; color: var(--emerald-2, var(--emerald)); }
.cx-body { position: relative; flex: 1; min-height: 0; display: flex; }
.cx-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; overscroll-behavior-y: contain; padding: 14px 12px 18px;
  background: radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--emerald) 7%, transparent), transparent 30%), linear-gradient(180deg, var(--mint), var(--mint-2)); scrollbar-width: thin; }
.cx-day { display: flex; justify-content: center; margin: 10px 0 6px; }
.cx-day span { padding: 3px 11px; border-radius: 999px; background: color-mix(in srgb, var(--card) 85%, transparent); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
.cx-row { display: flex; align-items: flex-end; gap: 7px; width: 100%; margin-top: 7px; }
.cx-row.cx-cont { margin-top: 0; }
.cx-row.mine { justify-content: flex-end; }
.cx-row.has-rx { margin-bottom: 15px; }
.cx-av-slot { flex: none; width: 30px; }
.cx-av { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; color: var(--on-brand); font-size: 11px; font-weight: 800; }
.cx-initials { background: linear-gradient(145deg, var(--emerald), var(--btn-bg)); }
.cx-club .bi { width: 20px; height: 20px; }
.cx-bubble { position: relative; max-width: min(78%, 560px); padding: 8px 11px 5px; border-radius: 18px; box-shadow: 0 3px 10px rgba(30, 57, 67, .07); cursor: pointer; overflow-wrap: anywhere; transition: transform .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent; }
.cx-bubble:hover { box-shadow: 0 6px 16px rgba(30, 57, 67, .11); }
.cx-bubble:active { transform: scale(.985); }
.theirs .cx-bubble { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--ink); }
.mine .cx-bubble { background: linear-gradient(145deg, var(--emerald), var(--btn-bg)); color: var(--on-brand, #fff); border-bottom-right-radius: 5px; }
.cx-cont.theirs .cx-bubble { border-top-left-radius: 8px; }
.cx-cont.mine .cx-bubble { border-top-right-radius: 8px; }
.cx-name { display: block; margin: 0 0 2px; color: var(--brand-ink); font-size: 12px; }
.cx-text { font-size: 15px; line-height: 1.42; white-space: pre-wrap; }
.cx-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.cx-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 2px; font-size: 10.5px; opacity: .78; white-space: nowrap; }
.theirs .cx-meta { color: var(--muted); }
.cx-ticks { font-weight: 800; letter-spacing: -3px; padding-right: 3px; }
.cx-ticks.seen { color: color-mix(in srgb, var(--on-brand, #fff) 55%, #22D38A); opacity: 1; text-shadow: 0 1px 2px rgba(0, 60, 30, .2); }
.cx-head .ib-initials, .cx-empty .ib-initials { display: grid; place-items: center; background: linear-gradient(145deg, var(--emerald), var(--btn-bg)); color: var(--on-brand); font-weight: 800; }
/* the reaction pill on the bubble's lower edge */
.cx-rx { position: absolute; bottom: -15px; z-index: 2; display: inline-flex; align-items: center; gap: 1px; height: 24px; padding: 0 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: 0 3px 10px rgba(30, 57, 67, .14); font-size: 14px; line-height: 1; cursor: pointer; }
.cx-rx[hidden] { display: none; }
.mine .cx-rx { right: 8px; }
.theirs .cx-rx { left: 8px; }
.cx-rx-e { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; }
.cx-rx-e.mine { background: color-mix(in srgb, var(--emerald) 20%, transparent); }
.cx-rx b { margin-left: 2px; font-size: 11px; color: var(--muted); }
.cx-empty { display: grid; justify-items: center; gap: 6px; margin: auto; padding: 24px; text-align: center; color: var(--muted); }
.cx-empty .ib-av, .cx-empty .cx-av { width: 68px; height: 68px; font-size: 22px; }
.cx-empty b { color: var(--ink); font-size: 17px; }
.cx-empty p { margin: 0; max-width: 300px; font-size: 13px; }
.cx-down { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--emerald-2, var(--emerald)); box-shadow: 0 8px 24px -8px rgba(24, 59, 70, .35); cursor: pointer; opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none; transition: .18s; }
.cx-down.visible { opacity: 1; transform: none; pointer-events: auto; }
/* composer */
.cx-compose { display: flex; align-items: flex-end; gap: 8px; flex: none; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.cx-field { flex: 1; min-width: 0; display: flex; border: 1px solid var(--line); border-radius: 22px; background: var(--mint-2); transition: .16s; }
.cx-field:focus-within { border-color: color-mix(in srgb, var(--emerald) 55%, var(--line)); background: var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 12%, transparent); }
.cx-field textarea { flex: 1; min-width: 0; min-height: 42px; max-height: 132px; padding: 10px 14px; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.4; }
.cx-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: linear-gradient(145deg, var(--emerald), var(--btn-bg)); color: var(--on-brand, #fff); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--btn-bg) 60%, transparent); cursor: pointer; transition: transform .15s, opacity .15s; }
.cx-send:hover:not(:disabled) { transform: translateY(-1px) rotate(-4deg); }
.cx-send:disabled { opacity: .45; cursor: default; box-shadow: none; }
.cx-send .bi { width: 19px; height: 19px; }
.cx-cannot { display: grid; gap: 6px; justify-items: start; }
.cx-cannot p { margin: 0; color: var(--muted); font-size: 13px; }
/* tap on a message: the reaction row next to it, the actions at the bottom, over a dimmed page */
body.cx-sheet-open { overflow: hidden; }
.cx-sheet { position: fixed; inset: 0; z-index: 120; opacity: 0; transition: opacity .16s; }
.cx-sheet.visible { opacity: 1; }
.cx-scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(19, 33, 39, .32); backdrop-filter: blur(2px); cursor: default; }
.cx-picker { position: fixed; z-index: 2; display: flex; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: 0 12px 30px rgba(22, 50, 59, .22); transform: translateY(6px) scale(.96); transition: transform .16s; }
.cx-sheet.visible .cx-picker { transform: none; }
.cx-picker button { display: grid; justify-items: center; gap: 1px; width: 56px; padding: 5px 2px 4px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); cursor: pointer; transition: transform .14s, background .14s; }
.cx-picker button span { font-size: 28px; line-height: 1.1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .08)); }
.cx-picker button small { font-size: 9.5px; font-weight: 700; }
.cx-picker button:hover, .cx-picker button:focus-visible { background: var(--mint-2); transform: translateY(-3px); color: var(--ink); }
.cx-picker button.on { background: color-mix(in srgb, var(--emerald) 16%, var(--card)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--emerald) 45%, transparent); color: var(--emerald-2, var(--emerald)); }
.cx-actions { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); gap: 2px; width: min(520px, calc(100% - 20px)); padding: 6px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: 0 14px 32px rgba(22, 50, 59, .22); transform: translate(-50%, 16px); transition: transform .18s; }
.cx-sheet.visible .cx-actions { transform: translate(-50%, 0); }
.cx-actions button { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 62px; padding: 6px; border: 0; border-radius: 15px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.cx-actions button:hover, .cx-actions button:focus-visible { background: var(--mint-2); color: var(--emerald-2, var(--emerald)); }
.cx-actions button.danger { color: var(--danger); }
.cx-actions button.danger:hover { background: var(--danger-bg, #FDECEC); }
.cx-actions .bi { width: 21px; height: 21px; }
/* the inbox list: conversation cards */
.inbox .ib-row { border-radius: 18px; transition: background .15s, transform .15s; }
.inbox .ib-row:hover { background: color-mix(in srgb, var(--emerald) 7%, var(--card)); transform: translateX(2px); }
.inbox .ib-row.unread { background: color-mix(in srgb, var(--emerald) 9%, var(--card)); }
.inbox .ib-av { border: 2px solid var(--card); box-shadow: 0 4px 12px rgba(34, 62, 72, .12); }
.inbox .ib-count { background: var(--emerald); color: var(--on-brand, #fff); box-shadow: 0 4px 10px color-mix(in srgb, var(--emerald) 35%, transparent); }
@media (max-width: 760px) {
  .inbox-chat, .club-chat { margin: -6px -10px 0; }
  .cx { border-radius: 18px; }
  .cx-head { min-height: 60px; padding: 7px 8px; gap: 8px; }
  .cx-head .ib-av, .cx-head .cx-av { width: 40px; height: 40px; }
  .cx-list { padding: 10px 8px 14px; }
  .cx-bubble { max-width: 84%; }
  .cx-text { font-size: 14.5px; }
  .cx-compose { gap: 6px; padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); }
  .cx-picker button { width: 52px; }
  .cx-picker button span { font-size: 26px; }
  .cx-actions { grid-auto-columns: minmax(72px, 1fr); }
}

/* Training plans: Session and Details columns, the English fields in the plan editor, and the runner's own plans
   (read-only summary on the profile; the own-plan table becomes labelled cards on phones). */
.cal-table td.cal-session { min-width: 110px; }
.cal-table td.cal-details { min-width: 240px; max-width: 520px; overflow-wrap: anywhere; }
.cal-table td.cal-details .small { margin-top: 4px; }
.plan-en { margin: 4px 0 12px; padding: 4px 12px 8px; border: 1px dashed var(--line); border-radius: var(--r-ctl); background: var(--card); }
.plan-en > summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.mp-item-view, .mp-item-view:hover { border-color: var(--line); cursor: default; }
.mp-table td.mp-details { min-width: 180px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .cal-table td.cal-details { min-width: 0; max-width: none; }
  .mp-table thead { display: none; }
  .mp-table, .mp-table tbody, .mp-table tr, .mp-table td { display: block; width: 100%; }
  .mp-table tr { border: 1px solid var(--line); border-radius: var(--r-ctl); margin-bottom: 8px; padding: 6px 10px; background: var(--card); }
  .mp-table td, .mp-table td.mp-tick, .mp-table td.num { border: 0; padding: 3px 0; display: grid; grid-template-columns: 100px 1fr; gap: 8px; align-items: center; text-align: left; white-space: normal; }
  .mp-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; }
  .mp-table td.mp-details { min-width: 0; }
}

/* "Before you start" card on the Run screen: a round mode badge sits on the top edge, the choices scroll inside,
   OK stays at the bottom. */
.prerun-back { padding: 16px; }
.prerun { position: relative; display: flex; flex-direction: column; width: min(100%, 400px); max-height: calc(100dvh - 72px); margin-top: 36px;
  padding: 46px 20px 20px; border-radius: 22px; background: var(--card); color: var(--ink); text-align: start;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45); transform: translateY(14px) scale(.97); transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.prerun-back.show .prerun { transform: none; }
.prerun:focus { outline: none; }
.prerun-badge { position: absolute; top: -36px; left: 50%; transform: translateX(-50%); width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-ink); color: var(--on-brand); border: 5px solid var(--card);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--brand-ink) 85%, transparent); }
.prerun-badge svg { width: 30px; height: 30px; }
.prerun-badge .mode-emoji { font-size: 28px; line-height: 1; }
.prerun h2 { margin: 0 0 6px; text-align: center; font-size: 21px; line-height: 1.35; }
.prerun-sub { margin: 0 0 16px; text-align: center; color: var(--muted); font-size: 14px; text-wrap: pretty; }
.prerun-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 -6px; padding: 2px 6px 6px; }
.prerun-body .field:last-child { margin-bottom: 0; }
/* The event search draws its own icon: no second one from a theme's search-box picture (Colorful). */
:root[data-theme] .evp .evp-search input[type="search"].input { background-image: none; }
.prerun .evp-list { position: static; margin-top: 6px; max-height: 220px; }
.prerun-ok { flex: none; margin-top: 16px; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .prerun { transition: none; } }
.gear-add-btn { margin-top: 8px; gap: 6px; }
.gear-pick select[hidden] + .gear-add-btn, .gear-pick select[hidden] ~ .gear-add-btn { margin-top: 0; }
.gear-add { margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--bg); }
.gear-add-title { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 15px; }
.gear-add-title svg { width: 16px; height: 16px; color: var(--brand-ink); }
.gear-add .field { margin-bottom: 10px; }
.gear-add-note { margin: 0 0 10px; }
.gear-add .btn-row { margin: 0; }

/* Inbox: three tabs side by side (General, Favourite, To Admin) and the favourite star on each chat. */
.ib-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.ib-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 6px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600;
  line-height: 1.25; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.ib-tab svg { width: 19px; height: 19px; color: var(--muted); }
.ib-tab:hover { border-color: color-mix(in srgb, var(--brand-ink) 45%, var(--line)); }
.ib-tab[aria-selected="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-brand); }
.ib-tab[aria-selected="true"] svg { color: var(--on-brand); }
.ib-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ib-tab-count { position: absolute; top: 6px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--badge-bg); color: var(--on-brand); font-size: 11.5px; font-weight: 700; }
.ib-item { position: relative; }
.ib-item .ib-row { padding-right: 58px; }
.ib-fav { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--muted); cursor: pointer; }
.ib-fav svg, .ib-fav-head svg { width: 20px; height: 20px; }
.ib-fav:hover, .ib-fav:focus-visible { background: var(--mint-2); }
.ib-fav[aria-pressed="true"], .ib-fav-head[aria-pressed="true"] { color: var(--warn); }
.ib-fav[aria-busy="true"], .ib-fav-head[aria-busy="true"] { opacity: .5; }
.ib-fav-head { border: 0; cursor: pointer; }
.ib-last i { font-style: normal; opacity: .8; }
.ib-fav-note { margin: 0 0 8px; }
.ib-pane .empty svg { width: 28px; height: 28px; color: var(--warn); }
.pro-msg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
.pro-msg .btn { gap: 6px; }
.req-msg-row { margin: 10px 0 0; }
/* "Uploading…" badge of a record going up in the background (My activities) */
.badge .sync-spin { width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; border-width: 2px; }
.req-msg-row .btn { gap: 6px; }

/* Touch screens: every tap target is at least 44x44 px. Small controls keep their look; an invisible layer centred
   on them takes the tap. (A rule like ".photo .icon-btn { position: absolute }" is more specific and still wins.) */
@media (pointer: coarse) {
  .icon-btn, .cx-back, .cx-icon, .lang-toggle, .btn-sm, .topbar .brand, .cx-av-slot a { position: relative; }
  .icon-btn::after, .cx-back::after, .cx-icon::after, .lang-toggle::after, .btn-sm::after, .topbar .brand::after,
  .cx-rx::after, .cx-down::after, .cx-av-slot a::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
  }
  .nav-item, .top-tabs button, .top-tabs a, .btn:not(.btn-sm) { min-height: 44px; }
}

/* ===== Colorful theme (রঙিন): the "options" designs (Events, Tracking, Performance, Shop). A light grey-white page,
   white cards with soft shadows, bold black titles, and many colours: green actions, orange Run / Record, blue, red,
   teal and purple on icon tiles, number cards and product photos, black / mint chips, a grey segmented switch, and the
   recording screen with one big distance and round buttons. Every rule is under :root[data-theme="colorful"]. ===== */
:root[data-theme="colorful"] {
  color-scheme: light;
  --bar: #F3F5F4;
  --mint: #F3F5F4;
  --mint-2: #E9EEEB;
  --ink: #0F1A14;
  --muted: #56625C;
  --line: #E3E8E5;
  --card: #FFFFFF;
  --emerald: #13A066;
  --emerald-2: #0E7A4E;
  --brand-ink: #0E7A4E;
  --brand-ink-strong: #0B6640;
  --btn-bg: #0E7A4E;
  --btn-bg-hover: #0B6640;
  --ok-bg: #E2F3EA;
  --on-brand: #FFFFFF;
  --on-accent: #FFFFFF;
  --danger: #BE123C;
  --danger-bg: #FDE8EC;
  --warn: #B45309;
  --warn-bg: #FFF1DC;
  --run-1: #F97316;
  --run-2: #EA580C;
  --shadow-lift: 0 10px 24px -12px rgba(15, 26, 20, .24);
  --series-run: #F97316; --series-ride: #2563EB; --series-walk: #13A066;
  /* the colour set: a strong colour and a soft one of each */
  --c1: #0E7A4E; --p1: #E2F3EA;
  --c2: #F97316; --p2: #FFEDE0;
  --c3: #2563EB; --p3: #E6EEFF;
  --c4: #E11D48; --p4: #FDE8EC;
  --c5: #0E8F8F; --p5: #DDF3F2;
  --c6: #7C3AED; --p6: #EFE9FF;
  /* icons only: light ash, aqua green, aqua blue and light brown (a soft tile and a deeper glyph), soft white border */
  --i1: #ECEFF0; --ik1: #5E6A70;
  --i2: #DCF4EC; --ik2: #1B8C74;
  --i3: #DCEFF7; --ik3: #1A7FA3;
  --i4: #F2E7DA; --ik4: #8C6A4B;
  --i-ring: 2px solid rgba(255, 255, 255, .95);
  --i-shadow: 0 1px 2px rgba(15, 26, 20, .06), 0 3px 8px -3px rgba(15, 26, 20, .14);
  --r-panel: 22px;
  --r-ctl: 16px;
  --card-shadow: 0 1px 2px rgba(15, 26, 20, .04), 0 10px 26px -14px rgba(15, 26, 20, .16);
}

:root[data-theme="colorful"] .topbar { background: color-mix(in srgb, var(--mint) 94%, transparent); border-bottom: 0; }
:root[data-theme="colorful"] .topbar .title { font-weight: 800; }
:root[data-theme="colorful"] .topbar #theme-btn, :root[data-theme="colorful"] .topbar .bell-btn, :root[data-theme="colorful"] .act-menu-btn, :root[data-theme="colorful"] .rec-more { background: var(--card); border: 0; border-radius: 14px; box-shadow: var(--card-shadow); }
:root[data-theme="colorful"] .bell-badge { background: var(--c2); }
:root[data-theme="colorful"] .lang-toggle { border-radius: 14px; background: var(--ink); border-color: var(--ink); color: #fff; }
:root[data-theme="colorful"] .bottombar { background: var(--card); border-top: 0; box-shadow: 0 -8px 24px -16px rgba(15, 26, 20, .22); }
:root[data-theme="colorful"] .tab { color: var(--muted); font-weight: 600; }
:root[data-theme="colorful"] .tab[aria-current="page"] { color: var(--c1); font-weight: 700; }
:root[data-theme="colorful"] .run-disc { background: radial-gradient(circle at 32% 26%, #FF9A4D, var(--c2) 48%, var(--run-2)); box-shadow: 0 12px 24px -8px rgba(249, 115, 22, .65), 0 0 0 6px var(--card); }
:root[data-theme="colorful"] .drawer-head { background: linear-gradient(135deg, var(--c1), #13A066 55%, var(--c5)); color: #fff; }
:root[data-theme="colorful"] .nav-item { border-radius: 14px; }
:root[data-theme="colorful"] .nav-item[aria-current="page"] { background: var(--p1); color: var(--c1); }
/* menu icons: ash, aqua green, aqua blue, light brown in turn */
:root[data-theme="colorful"] .nav-item:nth-child(4n+1) svg { color: var(--ik1); }
:root[data-theme="colorful"] .nav-item:nth-child(4n+2) svg { color: var(--ik2); }
:root[data-theme="colorful"] .nav-item:nth-child(4n+3) svg { color: var(--ik3); }
:root[data-theme="colorful"] .nav-item:nth-child(4n+4) svg { color: var(--ik4); }

:root[data-theme="colorful"] .page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; }
:root[data-theme="colorful"] .panel h2, :root[data-theme="colorful"] .sh-more h2, :root[data-theme="colorful"] .fr-day, :root[data-theme="colorful"] .ch-section h2 { font-weight: 800; letter-spacing: -.3px; }
:root[data-theme="colorful"] .panel:nth-of-type(4n+1) > h2 svg { color: var(--ik2); }
:root[data-theme="colorful"] .panel:nth-of-type(4n+2) > h2 svg { color: var(--ik3); }
:root[data-theme="colorful"] .panel:nth-of-type(4n+3) > h2 svg { color: var(--ik4); }
:root[data-theme="colorful"] .panel:nth-of-type(4n+4) > h2 svg { color: var(--ik1); }

:root[data-theme="colorful"] .panel, :root[data-theme="colorful"] .event-card, :root[data-theme="colorful"] .fr-card, :root[data-theme="colorful"] .content-card, :root[data-theme="colorful"] .act-item, :root[data-theme="colorful"] .sh-card, :root[data-theme="colorful"] .kpi, :root[data-theme="colorful"] .stat-grid div, :root[data-theme="colorful"] .ch-card, :root[data-theme="colorful"] .ch-row, :root[data-theme="colorful"] .cl-hero, :root[data-theme="colorful"] .about-item, :root[data-theme="colorful"] .pf-hero, :root[data-theme="colorful"] .cl-ladder, :root[data-theme="colorful"] .game-card, :root[data-theme="colorful"] .notif-item, :root[data-theme="colorful"] .ib-list, :root[data-theme="colorful"] .cl-list, :root[data-theme="colorful"] .sources, :root[data-theme="colorful"] .answer, :root[data-theme="colorful"] .ask-card, :root[data-theme="colorful"] .tool-card, :root[data-theme="colorful"] .ev-action {
  border-color: transparent; box-shadow: var(--card-shadow);
}
:root[data-theme="colorful"] .panel, :root[data-theme="colorful"] .event-card, :root[data-theme="colorful"] .fr-card, :root[data-theme="colorful"] .content-card, :root[data-theme="colorful"] .sh-card, :root[data-theme="colorful"] .ch-card, :root[data-theme="colorful"] .ch-row, :root[data-theme="colorful"] .answer, :root[data-theme="colorful"] .sources, :root[data-theme="colorful"] .tool-card { border-radius: var(--r-panel); }
:root[data-theme="colorful"] .act-item { border-radius: 20px; }
:root[data-theme="colorful"] .event-card:hover, :root[data-theme="colorful"] .content-card:hover, :root[data-theme="colorful"] .act-item:hover, :root[data-theme="colorful"] .tool-card:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(15, 26, 20, .05), 0 16px 32px -16px rgba(15, 26, 20, .24); }

/* Buttons: green for actions, orange for run / start, black, red for danger */
:root[data-theme="colorful"] .btn { border-radius: 16px; font-weight: 700; }
:root[data-theme="colorful"] .btn-quiet { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
:root[data-theme="colorful"] .btn-quiet:hover { background: var(--card); border-color: color-mix(in srgb, var(--c1) 40%, var(--line)); }
:root[data-theme="colorful"] .btn-run { background: linear-gradient(180deg, var(--c2), var(--run-2)); color: #fff; }
:root[data-theme="colorful"] .btn-dark { background: var(--ink); color: #fff; }
:root[data-theme="colorful"] .btn-danger { color: var(--c4); border-color: color-mix(in srgb, var(--c4) 40%, transparent); }

:root[data-theme="colorful"] .input, :root[data-theme="colorful"] select.input, :root[data-theme="colorful"] textarea.input { border-radius: 14px; background-color: var(--card); border: 1.5px solid var(--line); }
:root[data-theme="colorful"] .input:focus, :root[data-theme="colorful"] select.input:focus, :root[data-theme="colorful"] textarea.input:focus { border-color: var(--c1); }
:root[data-theme="colorful"] input[type="search"].input {
  min-height: 50px; border-radius: 18px; background-color: var(--card); border: 1.5px solid var(--line); padding-left: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2366736D'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px 50%; background-size: 18px 18px;
}
:root[data-theme="colorful"] input[type="search"].input:focus { background-color: var(--card); border-color: var(--c1); }

/* Chips: mint pills, the chosen one black */
:root[data-theme="colorful"] .chip, :root[data-theme="colorful"] .tabs a { min-height: 38px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid transparent; background: var(--p1); color: var(--c1); font-weight: 600; }
:root[data-theme="colorful"] .chip:hover, :root[data-theme="colorful"] .tabs a:hover { border-color: color-mix(in srgb, var(--c1) 35%, transparent); }
:root[data-theme="colorful"] .chip[aria-pressed="true"], :root[data-theme="colorful"] .tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
/* Badges: green for good news, red pill for "hurry" (days left, out of stock) */
:root[data-theme="colorful"] .badge { border-radius: 999px; }
:root[data-theme="colorful"] .badge.ok { background: var(--p1); color: var(--c1); }
:root[data-theme="colorful"] .badge.warn { background: var(--c4); color: #fff; }

/* Segmented switch */
:root[data-theme="colorful"] .top-tabs { margin: 0 0 14px; padding: 4px; gap: 4px; background: var(--mint-2); border: 0; border-radius: 18px; }
:root[data-theme="colorful"] .top-tabs button, :root[data-theme="colorful"] .top-tabs a { min-height: 44px; border: 0; border-radius: 14px; color: var(--muted); font-weight: 600; }
:root[data-theme="colorful"] .top-tabs button[aria-selected="true"], :root[data-theme="colorful"] .top-tabs a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 700; border-bottom: 0; box-shadow: 0 2px 6px -2px rgba(15, 26, 20, .18); }

/* Number cards: each a different soft colour (like the personal-best tiles) */
:root[data-theme="colorful"] .kpi, :root[data-theme="colorful"] .stat-grid div { border-radius: 18px; padding: 12px 14px; }
:root[data-theme="colorful"] .kpi:nth-child(4n+1), :root[data-theme="colorful"] .stat-grid div:nth-child(4n+1) { background: var(--p1); }
:root[data-theme="colorful"] .kpi:nth-child(4n+2), :root[data-theme="colorful"] .stat-grid div:nth-child(4n+2) { background: var(--p3); }
:root[data-theme="colorful"] .kpi:nth-child(4n+3), :root[data-theme="colorful"] .stat-grid div:nth-child(4n+3) { background: var(--p2); }
:root[data-theme="colorful"] .kpi:nth-child(4n+4), :root[data-theme="colorful"] .stat-grid div:nth-child(4n+4) { background: var(--p6); }
:root[data-theme="colorful"] .kpi, :root[data-theme="colorful"] .stat-grid div { box-shadow: none; }
:root[data-theme="colorful"] .kpi dt, :root[data-theme="colorful"] .stat-grid dt { font-weight: 600; color: var(--muted); }
:root[data-theme="colorful"] .kpi dd b, :root[data-theme="colorful"] .stat-grid dd { font-weight: 700; color: var(--ink); }

/* Events: the four buttons each in their own colour; "days left" orange */
:root[data-theme="colorful"] .ev-action { border-radius: 18px; background: var(--card); }
:root[data-theme="colorful"] .ev-action-ic { border: var(--i-ring); box-shadow: var(--i-shadow); }
:root[data-theme="colorful"] .ev-action:nth-child(1) .ev-action-ic { background: var(--i2); color: var(--ik2); }
:root[data-theme="colorful"] .ev-action:nth-child(2) .ev-action-ic { background: var(--i4); color: var(--ik4); }
:root[data-theme="colorful"] .ev-action:nth-child(3) .ev-action-ic { background: var(--i3); color: var(--ik3); }
:root[data-theme="colorful"] .ev-action:nth-child(4) .ev-action-ic { background: var(--i1); color: var(--ik1); }
:root[data-theme="colorful"] .event-card { padding: 14px; gap: 14px; background: var(--card); }
:root[data-theme="colorful"] .event-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
:root[data-theme="colorful"] .event-card .date-block.tone { border-radius: 18px; width: 70px; }
:root[data-theme="colorful"] .event-card .badge.ok { background: var(--p2); color: #C2410C; }
:root[data-theme="colorful"] .ev-dist { color: var(--c1); }
:root[data-theme="colorful"] .ev-flag[aria-pressed="true"] { color: #fff; border-color: var(--c2); background: var(--c2); }
:root[data-theme="colorful"] .ev-tick[aria-pressed="true"] { background: var(--c1); border-color: var(--c1); }

/* Shop: each product photo on its own soft colour; Order Now black */
:root[data-theme="colorful"] .sh-card { padding: 10px; background: var(--card); overflow: hidden; }
:root[data-theme="colorful"] .sh-card-pic { display: block; border-radius: 16px; overflow: hidden; background: var(--p3); }
:root[data-theme="colorful"] .sh-card:nth-child(4n+2) .sh-card-pic { background: var(--p2); }
:root[data-theme="colorful"] .sh-card:nth-child(4n+3) .sh-card-pic { background: var(--p1); }
:root[data-theme="colorful"] .sh-card:nth-child(4n+4) .sh-card-pic { background: var(--p6); }
:root[data-theme="colorful"] .sh-card-body { padding: 10px 4px 2px; }
:root[data-theme="colorful"] .sh-card-body h3 { font-weight: 700; }
:root[data-theme="colorful"] .sh-card .btn:not(.btn-quiet) { background: var(--ink); color: #fff; }
:root[data-theme="colorful"] .sh-price { font-weight: 800; color: var(--ink); }
:root[data-theme="colorful"] .sh-price.big { font-size: 26px; letter-spacing: -.4px; color: var(--c1); }
:root[data-theme="colorful"] .sh-main-pic, :root[data-theme="colorful"] .sh-big { border-radius: 20px; background: var(--p3); }

/* Activities: the sport tiles in their colours */
:root[data-theme="colorful"] .act-item { background: var(--card); }
:root[data-theme="colorful"] .act-thumb, :root[data-theme="colorful"] .act-thumb-icon { border-radius: 14px; }
:root[data-theme="colorful"] .act-thumb-icon { background: var(--i1); color: var(--ik1); border: var(--i-ring); box-shadow: var(--i-shadow); }
:root[data-theme="colorful"] .act-thumb-icon.run { background: var(--i4); color: var(--ik4); }
:root[data-theme="colorful"] .act-thumb-icon.ride { background: var(--i3); color: var(--ik3); }
:root[data-theme="colorful"] .act-thumb-icon.walk { background: var(--i2); color: var(--ik2); }
:root[data-theme="colorful"] .fr-card { background: var(--card); }
:root[data-theme="colorful"] .fr-follow:not(.on) { background: var(--c1); border-color: var(--c1); color: #fff; }
:root[data-theme="colorful"] .act-love.on { background: var(--p4); color: var(--c4); border-color: transparent; }

/* Icon tiles in cards (tools, about, profile rows, club buttons): ash, aqua green, aqua blue, light brown in turn */
:root[data-theme="colorful"] .tool-icon, :root[data-theme="colorful"] .about-ico, :root[data-theme="colorful"] .info-ic, :root[data-theme="colorful"] .cl-circle-ico { border-radius: 14px; border: var(--i-ring); box-shadow: var(--i-shadow); }
:root[data-theme="colorful"] .tool-card:nth-child(4n+1) .tool-icon, :root[data-theme="colorful"] .about-item:nth-child(4n+1) .about-ico, :root[data-theme="colorful"] .info-row:nth-child(4n+1) .info-ic, :root[data-theme="colorful"] .cl-circle:nth-child(4n+1) .cl-circle-ico { background: var(--i2); color: var(--ik2); }
:root[data-theme="colorful"] .tool-card:nth-child(4n+2) .tool-icon, :root[data-theme="colorful"] .about-item:nth-child(4n+2) .about-ico, :root[data-theme="colorful"] .info-row:nth-child(4n+2) .info-ic, :root[data-theme="colorful"] .cl-circle:nth-child(4n+2) .cl-circle-ico { background: var(--i3); color: var(--ik3); }
:root[data-theme="colorful"] .tool-card:nth-child(4n+3) .tool-icon, :root[data-theme="colorful"] .about-item:nth-child(4n+3) .about-ico, :root[data-theme="colorful"] .info-row:nth-child(4n+3) .info-ic, :root[data-theme="colorful"] .cl-circle:nth-child(4n+3) .cl-circle-ico { background: var(--i4); color: var(--ik4); }
:root[data-theme="colorful"] .tool-card:nth-child(4n+4) .tool-icon, :root[data-theme="colorful"] .about-item:nth-child(4n+4) .about-ico, :root[data-theme="colorful"] .info-row:nth-child(4n+4) .info-ic, :root[data-theme="colorful"] .cl-circle:nth-child(4n+4) .cl-circle-ico { background: var(--i1); color: var(--ik1); }
:root[data-theme="colorful"] .cl-circle.danger .cl-circle-ico { background: var(--p4); color: var(--c4); }
:root[data-theme="colorful"] .an-choice { border-color: transparent; border-radius: var(--r-panel); box-shadow: var(--card-shadow); }
:root[data-theme="colorful"] .an-choice-ic { border: var(--i-ring); box-shadow: var(--i-shadow); }
:root[data-theme="colorful"] .an-choice:nth-child(1) .an-choice-ic { background: var(--i2); color: var(--ik2); }
:root[data-theme="colorful"] .an-choice:nth-child(2) .an-choice-ic { background: var(--i3); color: var(--ik3); }
:root[data-theme="colorful"] .an-choice:nth-child(3) .an-choice-ic { background: var(--i4); color: var(--ik4); }
:root[data-theme="colorful"] .sugg:nth-child(4n+1) { background: var(--p1); color: var(--c1); border-color: transparent; }
:root[data-theme="colorful"] .sugg:nth-child(4n+2) { background: var(--p3); color: var(--c3); border-color: transparent; }
:root[data-theme="colorful"] .sugg:nth-child(4n+3) { background: var(--p2); color: #C2410C; border-color: transparent; }
:root[data-theme="colorful"] .sugg:nth-child(4n+4) { background: var(--p6); color: var(--c6); border-color: transparent; }

/* Bars and progress in the theme colours */
:root[data-theme="colorful"] .split-track i, :root[data-theme="colorful"] .ch-bar i { background: linear-gradient(90deg, #13A066, var(--c1)); }
:root[data-theme="colorful"] .sb-track i { background: var(--c1); }

/* Menus and pop-ups */
:root[data-theme="colorful"] .modal { border-radius: 24px; }
:root[data-theme="colorful"] .act-pop { border-radius: 18px; }
:root[data-theme="colorful"] .act-pop-item:hover, :root[data-theme="colorful"] .act-pop-item:focus-visible { background: var(--p1); color: var(--c1); }
:root[data-theme="colorful"] .act-pop-item:hover svg, :root[data-theme="colorful"] .act-pop-item:focus-visible svg { color: var(--ik2); }

/* Recording: map, then a white sheet: one big distance, three numbers in a row, round buttons */
:root[data-theme="colorful"] .rec-panel { border-radius: 28px 28px 0 0; margin-top: -26px; padding-top: 18px; box-shadow: 0 -12px 30px -18px rgba(15, 26, 20, .4); }
:root[data-theme="colorful"] .rec-panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 999px; background: rgba(102, 115, 109, .35); }
:root[data-theme="colorful"] .gps-pill { border-radius: 999px; font-weight: 700; }
:root[data-theme="colorful"] .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 0; margin: 4px 0 8px; }
:root[data-theme="colorful"] .metrics .metric:nth-child(1) { grid-column: 1 / -1; order: 0; margin-bottom: 6px; display: flex; flex-direction: column; }
:root[data-theme="colorful"] .metrics .metric:nth-child(1) b { font-size: min(96px, 26cqi); font-weight: 700; letter-spacing: -1px; line-height: 1; }
:root[data-theme="colorful"] .metrics .metric:nth-child(1) span { order: -1; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; font-size: 12.5px; margin-bottom: 2px; }
:root[data-theme="colorful"] .metrics .metric-time { order: 1; }
:root[data-theme="colorful"] .metrics .metric:nth-child(2) { order: 2; }
:root[data-theme="colorful"] .metrics .metric:nth-child(4) { order: 3; }
:root[data-theme="colorful"] .metrics .metric:not(:nth-child(1)) b { font-size: min(40px, 10.5cqi); }
:root[data-theme="colorful"] .metrics .metric:nth-child(2), :root[data-theme="colorful"] .metrics .metric:nth-child(4) { border-left: 1px solid var(--line); }
:root[data-theme="colorful"] .metrics .metric:nth-child(2) b { color: var(--c3); }
:root[data-theme="colorful"] .rec-kcal, :root[data-theme="colorful"] .rec-steps { background: var(--mint-2); border-radius: 999px; padding: 6px 14px; margin: 6px auto 0; width: fit-content; max-width: 100%; }
:root[data-theme="colorful"] .rec-controls { gap: 26px; margin: 16px 0 6px; }
:root[data-theme="colorful"] .rec-controls .btn-run, :root[data-theme="colorful"] .rec-controls .btn-dark { flex: none; width: 96px; height: 96px; min-height: 0; padding: 0; border-radius: 50%; border: 0;
  display: grid; place-items: center; align-content: center; gap: 2px; font-size: 14px; }
:root[data-theme="colorful"] .rec-controls .btn-run { background: radial-gradient(circle at 32% 26%, #FF9A4D, var(--c2) 48%, var(--run-2)); color: #fff; box-shadow: 0 14px 28px -10px rgba(249, 115, 22, .7); }
:root[data-theme="colorful"] .rec-controls .btn-run.btn-wide { width: 112px; height: 112px; flex-basis: auto !important; }
:root[data-theme="colorful"] .rec-controls .btn-dark { background: var(--p4); color: var(--c4); box-shadow: none; }
:root[data-theme="colorful"] .rec-controls .btn-run svg, :root[data-theme="colorful"] .rec-controls .btn-dark svg { width: 30px; height: 30px; }
:root[data-theme="colorful"] .start-disc { box-shadow: 0 14px 28px -10px rgba(249, 115, 22, .7); }
:root[data-theme="colorful"] .mode-disc { border-color: var(--c3); color: var(--c3); }

@media (max-width: 760px) {
  :root[data-theme="colorful"] { --r-panel: 20px; --bottom-h: 64px; }
  :root[data-theme="colorful"] .content { padding: 12px 16px calc(var(--bottom-h) + var(--safe-b) + 28px); }
  :root[data-theme="colorful"] .page-head h1 { font-size: 28px; }
  :root[data-theme="colorful"] .panel { padding: 16px; border-radius: var(--r-panel); }
  :root[data-theme="colorful"] .btn { border-radius: 14px; }
  :root[data-theme="colorful"] .run-disc { width: 60px; height: 60px; transform: translateY(-18px); }
  :root[data-theme="colorful"] .tab-run:active .run-disc, :root[data-theme="colorful"] .run-disc:active { transform: translateY(-16px) scale(.92); }
  :root[data-theme="colorful"] .tab svg, :root[data-theme="colorful"] .tab > svg.bi { width: 24px; height: 24px; }
  :root[data-theme="colorful"] .cl-list, :root[data-theme="colorful"] .ib-list { border-radius: var(--r-panel); }
  :root[data-theme="colorful"] .act-item { padding: 10px; }
  :root[data-theme="colorful"] .top-tabs { margin: 0 0 12px; }
  :root[data-theme="colorful"] .sh-price.big { font-size: 24px; }
}
@media (min-width: 1024px) {
  :root[data-theme="colorful"] .rail { background: var(--card); border-right: 0; box-shadow: 1px 0 0 var(--line); }
}

/* ===== Dark theme (ডার্ক): from the "Colors" pictures. The same layout as deep green; only the colours change:
   a black-to-ash gradient page, ash gradient cards with a thin light edge, orange gradient buttons with dark text,
   orange chips when chosen and colourful icons on dark tiles. Every rule is under :root[data-theme="dark"]. ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bar: #0B0B0C;
  --mint: #0B0B0C;
  --mint-2: #232326;
  --ink: #F5F5F6;
  --muted: #A6A6AD;
  --line: #2E2E33;
  --card: #1C1C1F;
  --emerald: #F59A2C;
  --emerald-2: #E07A10;
  --brand-ink: #FFB04D;
  --brand-ink-strong: #FFC67E;
  --btn-bg: #F59A2C;
  --btn-bg-hover: #FFAE4A;
  --ok-bg: #33281A;
  --on-brand: #1A1106;
  --on-accent: #1A1106;
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --run-1: #FF9A2E;
  --run-2: #E8700C;
  --shadow-lift: 0 14px 30px -14px rgba(0, 0, 0, .85);
  --series-run: #F59A2C; --series-ride: #4EA8FF; --series-walk: #3DD68C;
  /* the three gradients of the theme */
  --dk-page: linear-gradient(180deg, #000000 0%, #0B0B0C 30%, #161618 70%, #222225 100%);
  --dk-card: linear-gradient(155deg, #2B2B2F 0%, #1E1E21 48%, #161618 100%);
  --dk-ash: linear-gradient(180deg, #2A2A2E, #1F1F22);
  --dk-orange: linear-gradient(180deg, #FFB24F 0%, #F59A2C 50%, #E57C12 100%);
  --dk-edge: rgba(255, 255, 255, .08);
  --dk-glow: 0 10px 24px -12px rgba(245, 154, 44, .7);
  /* icon colours on dark tiles (like the colourful icons of the pictures) */
  --dk-i1: #FFB04D; --dk-i2: #5CB8FF; --dk-i3: #4BDC97; --dk-i4: #FF7A8A; --dk-i5: #B99BFF;
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 30px -20px rgba(0, 0, 0, .9);
}

/* Page: black at the top melting into ash, fixed behind everything */
:root[data-theme="dark"] body { background: #0B0B0C; }
:root[data-theme="dark"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--dk-page); }
:root[data-theme="dark"] body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 260px; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 100% at 50% 0%, rgba(245, 154, 44, .13), transparent 70%); }

/* Top bar: see-through black, a thin orange horizon line, round dark icon buttons, an orange language pill */
:root[data-theme="dark"] .topbar { background: rgba(8, 8, 9, .78); border-bottom: 0; }
:root[data-theme="dark"] .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245, 154, 44, .55) 30%, rgba(255, 255, 255, .12) 70%, transparent); }
:root[data-theme="dark"] .topbar .menu-btn:hover, :root[data-theme="dark"] .icon-btn:hover { background: #2A2A2E; }
:root[data-theme="dark"] .bell-badge { background: var(--emerald-2); color: #fff; }
:root[data-theme="dark"] .lang-toggle { background: var(--dk-orange); border: 0; color: var(--on-brand); box-shadow: var(--dk-glow); }

/* Side menu and desktop rail */
:root[data-theme="dark"] .drawer, :root[data-theme="dark"] .rail { background: linear-gradient(180deg, #19191C, #0E0E10); }
:root[data-theme="dark"] .rail { border-right: 1px solid var(--dk-edge); }
:root[data-theme="dark"] .drawer-head { color: var(--ink);
  background: radial-gradient(120% 140% at 0% 0%, rgba(245, 154, 44, .35), transparent 60%), linear-gradient(135deg, #2A2A2E, #121214); border-bottom: 1px solid var(--dk-edge); }
:root[data-theme="dark"] .drawer-head small { color: var(--muted); }
:root[data-theme="dark"] .nav-group + .nav-group { border-top-color: var(--dk-edge); }
:root[data-theme="dark"] .nav-item:hover { background: rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .nav-item[aria-current="page"] { background: linear-gradient(90deg, rgba(245, 154, 44, .24), rgba(245, 154, 44, .06)); color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--emerald); }
:root[data-theme="dark"] .rail-run { background: var(--dk-card); border: 1px solid var(--dk-edge); }

/* Bottom bar: ash gradient (same place and size as in deep green) */
:root[data-theme="dark"] .bottombar { background: linear-gradient(180deg, #222225, #151517); border-top-color: var(--dk-edge); }
:root[data-theme="dark"] .run-disc { background: radial-gradient(circle at 32% 26%, #FFC06A, #F59A2C 48%, #D96A08); color: var(--on-brand);
  box-shadow: 0 12px 26px -8px rgba(245, 154, 44, .75), 0 0 0 5px #222225; }
:root[data-theme="dark"] .tab-run[aria-current="page"] span.lbl { color: var(--brand-ink); }

/* Cards: ash gradient with a thin light edge */
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .event-card, :root[data-theme="dark"] .fr-card, :root[data-theme="dark"] .content-card, :root[data-theme="dark"] .act-item,
:root[data-theme="dark"] .sh-card, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .stat-grid div, :root[data-theme="dark"] .ch-card, :root[data-theme="dark"] .ch-row,
:root[data-theme="dark"] .cl-hero, :root[data-theme="dark"] .cl-row, :root[data-theme="dark"] .about-item, :root[data-theme="dark"] .pf-hero, :root[data-theme="dark"] .cl-ladder,
:root[data-theme="dark"] .cl-tiles > div, :root[data-theme="dark"] .notif-item, :root[data-theme="dark"] .notif-page, :root[data-theme="dark"] .sources, :root[data-theme="dark"] .answer,
:root[data-theme="dark"] .ask-card, :root[data-theme="dark"] .tool-card, :root[data-theme="dark"] .ev-action, :root[data-theme="dark"] .table-wrap, :root[data-theme="dark"] .an-choice {
  background: var(--dk-card); border-color: var(--dk-edge); box-shadow: var(--card-shadow);
}
:root[data-theme="dark"] .event-card:hover, :root[data-theme="dark"] .content-card:hover, :root[data-theme="dark"] .act-item:hover, :root[data-theme="dark"] .tool-card:hover,
:root[data-theme="dark"] .cl-row:hover, :root[data-theme="dark"] .ev-action:hover { border-color: rgba(255, 176, 77, .45); box-shadow: var(--card-shadow), 0 0 0 1px rgba(255, 176, 77, .12); }
/* Feature cards (the "Daily Challenges" look): a warm orange glow from the corner and an orange edge */
:root[data-theme="dark"] .ask-card, :root[data-theme="dark"] .pf-hero, :root[data-theme="dark"] .kpi-grid .kpi:first-child, :root[data-theme="dark"] .ch-card.done {
  background: radial-gradient(130% 120% at 0% 0%, rgba(245, 154, 44, .26), transparent 55%), var(--dk-card); border-color: rgba(255, 176, 77, .32); }
:root[data-theme="dark"] .ask-card:focus-within { border-color: var(--brand-ink); }
:root[data-theme="dark"] .event-card.is-done { border-color: rgba(75, 220, 151, .45); }

/* Buttons: orange gradient with dark text; quiet ones are ash pills with a light edge; Dark is white with black text */
:root[data-theme="dark"] .btn:not(.btn-quiet):not(.btn-danger):not(.btn-dark):not(.btn-google):not(.btn-run) { background: var(--dk-orange); color: var(--on-brand); border: 0; box-shadow: var(--dk-glow); }
:root[data-theme="dark"] .btn:not(.btn-quiet):not(.btn-danger):not(.btn-dark):not(.btn-google):not(.btn-run):hover { filter: brightness(1.07); }
:root[data-theme="dark"] .btn-run { background: var(--dk-orange); color: var(--on-brand); box-shadow: var(--dk-glow); }
:root[data-theme="dark"] .btn-quiet { background: var(--dk-ash); color: var(--ink); border: 1px solid rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .btn-quiet:hover { background: #2E2E33; border-color: rgba(255, 176, 77, .45); }
:root[data-theme="dark"] .btn-dark { background: #FFFFFF; color: #111113; }
:root[data-theme="dark"] .btn-danger { background: transparent; }
:root[data-theme="dark"] .chip-btn, :root[data-theme="dark"] .voice-btn { background: var(--dk-ash); border-color: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .voice-btn .dot { background: var(--dk-orange); }

/* Inputs: dark ash wells with a light edge, an orange ring on focus */
:root[data-theme="dark"] .input, :root[data-theme="dark"] textarea.input { background-color: #18181B; border: 1px solid rgba(255, 255, 255, .1); }
:root[data-theme="dark"] input[type="search"].input { background-color: #1E1E21; border: 1px solid rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .input:focus, :root[data-theme="dark"] input[type="search"].input:focus { border-color: var(--brand-ink); background-color: #1E1E21; outline: 2px solid rgba(245, 154, 44, .3); outline-offset: 0; }
:root[data-theme="dark"] select.input { border-color: rgba(255, 255, 255, .12); box-shadow: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%231A1106' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, #F59A2C 0 14px, transparent 15px),
    var(--dk-ash); }
:root[data-theme="dark"] select.input:focus { border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(245, 154, 44, .25); }
:root[data-theme="dark"] select.input option { background: #1C1C1F; }

/* Chips and tabs: ash pills, the chosen one an orange gradient pill with dark text */
:root[data-theme="dark"] .chip, :root[data-theme="dark"] .tabs a, :root[data-theme="dark"] .sugg { background: var(--dk-ash); border-color: rgba(255, 255, 255, .1); color: var(--ink); }
:root[data-theme="dark"] .chip:hover, :root[data-theme="dark"] .tabs a:hover, :root[data-theme="dark"] .sugg:hover { border-color: rgba(255, 176, 77, .5); color: var(--ink); }
:root[data-theme="dark"] .chip[aria-pressed="true"], :root[data-theme="dark"] .tabs a[aria-current="page"] { background: var(--dk-orange); color: var(--on-brand); border-color: transparent; font-weight: 700; box-shadow: var(--dk-glow); }
:root[data-theme="dark"] .top-tabs { background: rgba(11, 11, 12, .9); backdrop-filter: blur(10px); border-bottom-color: var(--dk-edge); }
:root[data-theme="dark"] .top-tabs button[aria-selected="true"], :root[data-theme="dark"] .top-tabs a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--emerald); }

/* Badges: "days left" and states as orange pills, like "Ongoing / Paid" */
:root[data-theme="dark"] .badge { background: #2A2A2E; color: #D4D4D8; }
:root[data-theme="dark"] .badge.ok { background: var(--dk-orange); color: var(--on-brand); font-weight: 700; }
:root[data-theme="dark"] .badge.warn { background: var(--warn-bg); color: var(--warn); }
:root[data-theme="dark"] .notice { background: #2A2215; border: 1px solid rgba(255, 176, 77, .22); }
:root[data-theme="dark"] .notice.error { background: var(--danger-bg); border-color: rgba(255, 138, 128, .3); }
:root[data-theme="dark"] .notice.warn { background: var(--warn-bg); border-color: rgba(255, 210, 122, .25); }

/* Icon tiles: dark rounded squares with colourful icons, in turn */
:root[data-theme="dark"] .ev-action-ic, :root[data-theme="dark"] .tool-icon, :root[data-theme="dark"] .about-ico, :root[data-theme="dark"] .info-ic,
:root[data-theme="dark"] .cl-circle-ico, :root[data-theme="dark"] .act-thumb-icon, :root[data-theme="dark"] .an-choice-ic {
  background: linear-gradient(160deg, #2E2E33, #1D1D20); border: 1px solid rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px -8px rgba(0, 0, 0, .8); color: var(--dk-i1); }
:root[data-theme="dark"] .ev-action:nth-child(4n+1) .ev-action-ic { background: var(--dk-orange); color: var(--on-brand); border-color: transparent; }
:root[data-theme="dark"] .ev-action:nth-child(4n+2) .ev-action-ic, :root[data-theme="dark"] .tool-card:nth-child(5n+2) .tool-icon, :root[data-theme="dark"] .about-item:nth-child(5n+2) .about-ico, :root[data-theme="dark"] .info-row:nth-child(5n+2) .info-ic, :root[data-theme="dark"] .cl-circle:nth-child(5n+2) .cl-circle-ico, :root[data-theme="dark"] .an-choice:nth-child(3n+2) .an-choice-ic { color: var(--dk-i2); }
:root[data-theme="dark"] .ev-action:nth-child(4n+3) .ev-action-ic, :root[data-theme="dark"] .tool-card:nth-child(5n+3) .tool-icon, :root[data-theme="dark"] .about-item:nth-child(5n+3) .about-ico, :root[data-theme="dark"] .info-row:nth-child(5n+3) .info-ic, :root[data-theme="dark"] .cl-circle:nth-child(5n+3) .cl-circle-ico, :root[data-theme="dark"] .an-choice:nth-child(3n+3) .an-choice-ic { color: var(--dk-i3); }
:root[data-theme="dark"] .ev-action:nth-child(4n+4) .ev-action-ic, :root[data-theme="dark"] .tool-card:nth-child(5n+4) .tool-icon, :root[data-theme="dark"] .about-item:nth-child(5n+4) .about-ico, :root[data-theme="dark"] .info-row:nth-child(5n+4) .info-ic, :root[data-theme="dark"] .cl-circle:nth-child(5n+4) .cl-circle-ico { color: var(--dk-i4); }
:root[data-theme="dark"] .tool-card:nth-child(5n+5) .tool-icon, :root[data-theme="dark"] .about-item:nth-child(5n+5) .about-ico, :root[data-theme="dark"] .info-row:nth-child(5n+5) .info-ic, :root[data-theme="dark"] .cl-circle:nth-child(5n+5) .cl-circle-ico { color: var(--dk-i5); }
:root[data-theme="dark"] .act-thumb-icon.run { color: var(--dk-i1); } :root[data-theme="dark"] .act-thumb-icon.ride { color: var(--dk-i2); } :root[data-theme="dark"] .act-thumb-icon.walk { color: var(--dk-i3); }
:root[data-theme="dark"] .cl-circle.danger .cl-circle-ico { color: var(--danger); }

/* Numbers and prices in orange, like the challenge numbers and "899Tk" */
:root[data-theme="dark"] .sh-price { color: var(--brand-ink); font-weight: 800; }
:root[data-theme="dark"] .kpi dd b, :root[data-theme="dark"] .cl-tiles b { color: var(--brand-ink); }
:root[data-theme="dark"] .split-track i, :root[data-theme="dark"] .ch-bar i, :root[data-theme="dark"] .sb-track i, :root[data-theme="dark"] .source .bar i { background: var(--dk-orange); }
:root[data-theme="dark"] .sh-card .btn:not(.btn-quiet) { background: #FFFFFF; color: #111113; box-shadow: none; }

/* Pop-ups and menus */
:root[data-theme="dark"] .modal { background: linear-gradient(160deg, #26262A, #18181B); border: 1px solid var(--dk-edge); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); }
:root[data-theme="dark"] .modal-scrim, :root[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .62); }
:root[data-theme="dark"] .act-pop { background: #1E1E21; color: #fff; border: 1px solid var(--dk-edge); box-shadow: var(--shadow-lift); }
:root[data-theme="dark"] .act-pop-item.danger, :root[data-theme="dark"] .act-pop-item.danger svg, :root[data-theme="glass"] .act-pop-item.danger, :root[data-theme="glass"] .act-pop-item.danger svg { color: #F87171; }
:is(:root[data-theme="dark"], :root[data-theme="glass"]) .act-pop-item.danger:is(:hover, :focus-visible), :is(:root[data-theme="dark"], :root[data-theme="glass"]) .act-pop-item.danger:is(:hover, :focus-visible) svg { color: #fff; }
:root[data-theme="dark"] .act-pop-item svg { color: var(--muted); }
:root[data-theme="dark"] .act-pop-item:hover, :root[data-theme="dark"] .act-pop-item:focus-visible { background: rgba(245, 154, 44, .16); color: var(--brand-ink); }
:root[data-theme="dark"] .act-pop-item:hover svg, :root[data-theme="dark"] .act-pop-item:focus-visible svg { color: var(--brand-ink); }
:root[data-theme="dark"] .toast { background: #F5F5F6; color: #111113; }
:root[data-theme="dark"] table.data th { background: #232326; }

/* Recording screen */
:root[data-theme="dark"] .rec, :root[data-theme="dark"] .rec-panel { background: #141416; }
:root[data-theme="dark"] .rec-panel { border-top: 1px solid var(--dk-edge); }
:root[data-theme="dark"] .start-disc { box-shadow: 0 14px 28px -10px rgba(245, 154, 44, .75); }
:root[data-theme="dark"] .map-locate, :root[data-theme="dark"] .map-note { background: #1E1E21; border: 1px solid var(--dk-edge); }

/* ---------- Coach subscriptions (coaching.js, admin-coaching.js) ---------- */
.cz-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.cz-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cz-chips .chip { white-space: nowrap; flex: none; }
.cz-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .cz-list { grid-template-columns: 1fr 1fr; } }
.cz-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; min-width: 0; box-shadow: var(--card-shadow, none); transition: border-color .15s ease, transform .15s ease; }
.cz-card:hover { border-color: var(--brand-ink); transform: translateY(-1px); }
.cz-photo { flex: none; border-radius: 50%; object-fit: cover; }
.cz-card-body { flex: 1; min-width: 0; }
.cz-card-body h3 { margin: 0; font-size: 17px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cz-card-body p { margin: 2px 0 0; }
.cz-ver { display: inline-flex; align-items: center; gap: 2px; }
.cz-ver svg { width: 13px; height: 13px; }
.cz-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); margin: 4px 0 0; }
.cz-meta svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.cz-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cz-card-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--brand-ink); text-align: right; max-width: 34%; }
.cz-card-price b { font-size: 14px; line-height: 1.3; }
.cz-card-price svg { width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 480px) {
  .cz-card { flex-wrap: wrap; }
  .cz-card-body { flex-basis: calc(100% - 80px); }
  .cz-card-price { max-width: none; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
}
.cz-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 6px; text-decoration: none; font-weight: 600; }
.cz-back svg { width: 16px; height: 16px; }
.cz-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cz-hero-body { flex: 1; min-width: 220px; }
.cz-hero-body h1 { margin: 0; font-size: 26px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cz-hero-body p { margin: 4px 0 0; }
.cz-about { display: grid; gap: 14px; }
.cz-about:empty { display: none; }
.cz-info h3 { margin: 0 0 4px; font-size: 16px; color: var(--brand-ink); }
.cz-info p { margin: 0 0 8px; }
.cz-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cz-features li { display: flex; gap: 8px; align-items: flex-start; }
.cz-features svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand-ink); }
.cz-h2 { font-size: 20px; margin: 22px 0 10px; }
.cz-programs { display: grid; gap: 14px; }
@media (min-width: 1000px) { .cz-programs { grid-template-columns: 1fr 1fr; } }
.cz-program { display: flex; flex-direction: column; gap: 12px; margin: 0 !important; }
.cz-program-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.cz-program h3 { margin: 0; font-size: 18px; line-height: 1.35; }
.cz-program h4 { margin: 0 0 6px; font-size: 15px; color: var(--muted); }
.cz-desc p { margin: 0 0 8px; }
.cz-prices { font-size: 15px; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.cz-prices td b { color: var(--brand-ink); }
.cz-get { margin-top: auto; display: grid; gap: 4px; }
.cz-get .btn { width: 100%; }
.cz-get p { margin: 0; }
/* admin */
.cz-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; margin: 0 0 12px; cursor: pointer; }
.cz-check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--emerald); }
.cz-check .hint { display: block; font-size: 13px; color: var(--muted); }
.cz-check .err { color: var(--danger); font-size: 14px; }
.cz-check-inline { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; cursor: pointer; }
.cz-check-inline input { width: 20px; height: 20px; accent-color: var(--emerald); }
.cz-specs-set, .cz-prices-set { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px 12px; margin: 0 0 14px; }
.cz-specs-set legend, .cz-prices-set legend { font-weight: 600; padding: 0 6px; }
.cz-specs-set .cz-specs { gap: 2px 16px; margin: 0; }
.cz-prices-set .hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.cz-prices-set > .err, .cz-price-row .err { color: var(--danger); font-size: 14px; }
.cz-price-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.cz-price-row:first-of-type { border-top: 0; }
.cz-price-row small, .cz-price-row .err { grid-column: 2 / -1; }
.cz-price-row small:empty, .cz-price-row .err:empty { display: none; }
.cz-price-row.invalid .input { border-color: var(--danger); }
.cz-price-m { font-weight: 600; }
.cz-grid { display: grid; gap: 0 14px; }
@media (min-width: 700px) { .cz-grid { grid-template-columns: 1fr 1fr; } }
.cz-pform h3 { margin: 0 0 12px; }
.cz-admin-list { display: grid; gap: 8px; }
.cz-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  color: var(--ink); text-decoration: none; min-height: 44px; }
.cz-admin-row:hover { border-color: var(--brand-ink); }
.cz-admin-row p { margin: 4px 0 0; }
.cz-manage { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-ink); font-weight: 600; flex: none; }
.cz-manage svg { width: 16px; height: 16px; }/* questionnaire (coaching-assess.js) */
.qa-form { display: grid; gap: 4px; }
.qa-progress { display: grid; gap: 6px; margin-bottom: 8px; font-weight: 600; color: var(--muted); font-size: 14px; }
.qa-bar { height: 8px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.qa-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--emerald); transition: width .25s ease; }
.qa-step h2 { margin: 4px 0 10px; font-size: 20px; }
.qa-step h2:focus { outline: none; }
.qa-q { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.qa-q legend { font-weight: 600; padding: 0; margin-bottom: 8px; line-height: 1.45; }
.qa-q .hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.qa-q .err, .qa-consent .err { display: block; color: var(--danger); font-size: 14px; margin-top: 4px; }
.qa-q.invalid legend { color: var(--danger); }
.qa-q.invalid .input { border-color: var(--danger); }
.qa-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.qa-pill { position: relative; display: inline-flex; cursor: pointer; }
.qa-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qa-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 15px; line-height: 1.3; transition: background .15s ease, border-color .15s ease; }
.qa-pill:hover span { border-color: var(--brand-ink); }
.qa-pill input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--on-brand); font-weight: 700; }
.qa-pill input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.qa-pill input:disabled + span { opacity: .45; cursor: not-allowed; }
.qa-check { margin-top: 8px; }
.qa-num { display: flex; align-items: center; gap: 10px; max-width: 280px; }
.qa-num .input { flex: 1; min-width: 0; }
.qa-row { display: flex; gap: 10px; flex-wrap: wrap; }
.qa-row .qa-num { max-width: 160px; }
.qa-step .qa-pills + .qa-num, .qa-step .qa-pills + .qa-row { margin-top: 10px; }
.qa-sub { border-left: 3px solid var(--line); padding-left: 14px; margin: -6px 0 18px; }
.qa-note { display: flex; gap: 8px; align-items: flex-start; }
.qa-note svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.qa-consent { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 4px 0 8px; flex-wrap: wrap; }
.qa-consent input { width: 22px; height: 22px; flex: none; margin-top: 3px; accent-color: var(--emerald); }
.qa-consent span:not(.err) { flex: 1; min-width: 0; }
.qa-consent .err { flex-basis: 100%; }
.qa-nav { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.qa-nav .btn { flex: 1 1 160px; }
.qa-nav .btn[hidden] { display: none; }
/* recommendations */
.rc-summary h2 { margin: 0; }
.rc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.rc-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--mint-2); min-width: 0; }
.rc-stat b { font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.rc-stat small { font-size: 12.5px; line-height: 1.35; }
.rc-main { border: 2px solid var(--brand-ink); }
.rc-price { color: var(--brand-ink); white-space: nowrap; }
.rc-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rc-flag { margin: 0; display: flex; gap: 8px; align-items: center; }
.rc-flag svg { width: 18px; height: 18px; flex: none; }
.rc-details { display: grid; gap: 10px; }
.rc-details p { margin: 0; }
.rc-actions .btn { flex: 1 1 150px; }
.rc-card > p.muted.small:last-child { margin: -6px 0 0; }/* coach-defined plans: request state, inbox strip, offer card (coaching-inbox.js) */
.cz-custom-price { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.cz-custom-price svg, .co-state svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.rc-request { display: grid; gap: 8px; }
.co-state { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.co-state p { margin: 0; display: flex; gap: 8px; flex: 1 1 240px; }
.co-state-hot { border: 2px solid var(--brand-ink); }
.co-strip { flex: none; border-bottom: 1px solid var(--line); background: var(--card); max-height: 55%; display: flex; flex-direction: column; min-height: 0; }
.co-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 14px; border: 0; background: color-mix(in srgb, var(--emerald) 10%, var(--card));
  color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.co-toggle svg { width: 18px; height: 18px; color: var(--brand-ink); }
.co-toggle .co-chev { margin-left: auto; display: inline-flex; transition: transform .2s ease; }
.co-toggle[aria-expanded="false"] .co-chev { transform: rotate(-90deg); }
.co-body { overflow-y: auto; padding: 10px 14px 12px; display: grid; gap: 12px; overscroll-behavior: contain; }
.co-item { display: grid; gap: 10px; }
.co-item + .co-item { border-top: 1px dashed var(--line); padding-top: 12px; }
.co-req { display: grid; gap: 8px; }
.co-req-head, .co-offer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.co-req-head p { margin: 2px 0 0; }
.co-note { margin: 0; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--mint-2); white-space: pre-line; }
.co-req .notice { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
.co-req .notice svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.co-req > p.small { margin: 0; }
.co-answers { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 4px 12px; margin: 0; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--mint-2); font-size: 14px; }
.co-answers dt { color: var(--muted); }
.co-answers dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.co-form { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.co-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.co-price { display: grid; gap: 4px; }
.co-offer { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--card); box-shadow: var(--card-shadow, none); }
.co-offer.open { border: 2px solid var(--brand-ink); }
.co-offer h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.co-offer p { margin: 0; }
.co-offer-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.co-offer-price b { font-size: 26px; line-height: 1.1; color: var(--brand-ink); font-family: var(--font-metric); }
.co-details { white-space: pre-line; }
.co-offer .btn-row .btn, .co-req .btn-row .btn { flex: 1 1 140px; }
@media (max-width: 480px) { .co-answers { grid-template-columns: 1fr; } .co-answers dd { margin-bottom: 4px; } .co-grid { grid-template-columns: 1fr; } }/* coaching checkout, payment, subscriptions (coaching-subs.js, admin-coaching-pay.js) */
.cz-my-link, .cz-pay-link { margin: 0 0 14px; }
.cs-form h2 { margin: 0; }
.cs-form > p.muted { margin: 2px 0 14px; }
.cs-lengths { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.cs-len { position: relative; cursor: pointer; }
.cs-len input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cs-len > span { display: grid; gap: 2px; padding: 12px 14px; min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.cs-len > span > span { font-size: 18px; font-weight: 700; color: var(--brand-ink); }
.cs-len input:checked + span { border: 2px solid var(--brand-ink); background: color-mix(in srgb, var(--emerald) 8%, var(--card)); }
.cs-len input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.cs-len-fixed > span { cursor: default; }
.cs-steps { list-style: none; display: flex; gap: 6px; margin: 12px 0 14px; padding: 0; }
.cs-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; color: var(--muted); position: relative; }
.cs-steps li + li::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.cs-steps li.done + li::before, .cs-steps li.done + li.now::before { background: var(--emerald); }
.cs-dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--mint-2); color: var(--muted); border: 2px solid var(--line); }
.cs-dot svg { width: 16px; height: 16px; }
.cs-steps li.done .cs-dot { background: var(--emerald); border-color: var(--emerald); color: var(--on-brand); }
.cs-steps li.now .cs-dot { border-color: var(--brand-ink); color: var(--brand-ink); background: var(--card); }
.cs-steps li.now { color: var(--ink); font-weight: 600; }
.cs-break { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.cs-break dt { color: var(--muted); }
.cs-break dd { margin: 0; text-align: right; font-weight: 600; }
.cs-break .cs-final { padding-top: 8px; border-top: 1px solid var(--line); font-size: 18px; color: var(--ink); }
.cs-break dd.cs-final { color: var(--brand-ink); font-weight: 800; }
.cs-pay h2 { margin: 0 0 8px; }
.cs-info { white-space: pre-wrap; font-family: inherit; font-size: 17px; font-weight: 600; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--mint-2); }
.cs-amount { font-size: 17px; margin: 0 0 12px; }
.cs-amount b { color: var(--brand-ink); font-size: 20px; }
.cs-trx { text-transform: uppercase; letter-spacing: 1px; font-family: ui-monospace, Consolas, monospace; }
.cs-live { display: grid; gap: 8px; justify-items: start; }
.cs-live p { margin: 0; }
.cs-dates { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.cs-dates svg { width: 18px; height: 18px; color: var(--brand-ink); }
.cp-list { display: grid; gap: 12px; margin: 12px 0; }
.cp-row h3 { margin: 0; font-size: 17px; }
.cp-facts { display: grid; grid-template-columns: minmax(80px, auto) 1fr; gap: 4px 12px; margin: 10px 0; font-size: 15px; }
.cp-facts dt { color: var(--muted); }
.cp-facts dd { margin: 0; overflow-wrap: anywhere; }
.cp-trx { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: .5px; }/* training calendar (coaching-cal.js) and weekly template (admin-coaching.js) */
.tc-today h2 { margin: 0 0 10px; }
.tc-today .tc-w + .tc-w { margin-top: 10px; }
.tc-w { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--card); }
.tc-w p { margin: 0; }
.tc-w-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tc-w-head b { font-size: 16px; }
.tc-target { font-weight: 600; color: var(--brand-ink); }
.tc-ins { white-space: pre-line; font-size: 15px; }
.tc-w.tc-completed { border-color: color-mix(in srgb, var(--emerald) 60%, var(--line)); background: color-mix(in srgb, var(--emerald) 7%, var(--card)); }
.tc-w.tc-missed { border-style: dashed; }
.tc-w.tc-skipped { opacity: .75; }
.tc-rest { display: flex; gap: 8px; align-items: center; color: var(--muted); border-style: dashed; }
.tc-rest svg { width: 18px; height: 18px; }
.tc-w svg { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }
.tc-mark { display: grid; gap: 8px; }
.tc-nav { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.tc-nav .btn { min-width: 44px; padding: 8px 12px; }
.tc-nav-label { flex: 1; display: grid; justify-items: center; gap: 4px; text-align: center; }
.tc-this { min-height: 36px !important; padding: 2px 12px !important; font-size: 14px; }
.tc-week { display: grid; gap: 12px; }
.tc-day { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tc-day:last-child { border-bottom: 0; }
.tc-day-label { font-weight: 700; color: var(--muted); font-size: 14px; }
.tc-day.is-today .tc-day-label { color: var(--brand-ink); }
.tc-day.is-today .tc-day-label::after { content: " •"; }
.tc-add { justify-self: start; }
.tc-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.tc-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.cr-card { display: grid; gap: 10px; margin: 0 !important; }
.cr-card h3 { margin: 0; font-size: 17px; }
.cr-today { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.tp-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tp-row:first-of-type { border-top: 0; }
.tp-day { font-size: 14px; }
.tp-extra { grid-column: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tp-extra[hidden] { display: none; }
.tp-extra input[name^="tp_title"], .tp-extra input[name^="tp_notes"] { grid-column: span 2; }
@media (max-width: 480px) { .tp-extra { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tc-grid3 { grid-template-columns: 1fr 1fr; } }/* activity matching (coaching-match.php) */
.tc-actual { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tc-actual a { font-size: 14px; }
.tc-match { display: grid; gap: 8px; justify-items: start; }
.tc-pick { display: grid; gap: 6px; width: 100%; padding: 10px; border-radius: var(--r-ctl); background: var(--mint-2); }
.tc-pick-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; }/* runner dashboard (coaching-dash.js) */
.cd-head h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; }
.cd-head p { margin: 0; }
.cd-msg { display: flex; gap: 8px; align-items: center; text-decoration: none; font-weight: 600; }
.cd-msg svg { width: 18px; height: 18px; }
.cd-week { grid-column: 1 / -1; }
.cd-bar { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; margin-top: 4px; }
.cd-bar i { display: block; height: 100%; border-radius: inherit; background: var(--emerald); }
.cd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cd-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cd-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cd-list li > span:last-child { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.cd .panel h2 { margin-top: 0; }/* coach dashboard (coach/runners) */
.cr-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 14px 0 12px; }
.cr-filters select.input { width: auto; min-width: 140px; }
.cr-warn b { color: var(--warn); }
.cr-card.cr-needs { border-left: 4px solid var(--warn); }
.cr-card p { margin: 0; }
/* renewal notice (coaching-dash.js) */
.cd-renew { display: grid; gap: 10px; justify-items: start; }
.cd-renew p { margin: 0; }

/* Find a coach: two tabs (coaching plans / advice & appointments) */
.cz-tabs { margin: 0 0 14px; }
.cz-tabs a { min-height: 44px; font-weight: 600; }

/* RunFinite wordmark (brand-text.js / wordmark.js): bigger in the app's header, a little gap for the share-picture buttons */
.brand b .rf-word, .bs-brand .rf-word, .bs-top .rf-word { height: 1em; width: 5.284em; vertical-align: -.1em; }
.act-share-pics { margin-top: 12px; }
/* Import from Strava (views/strava-import.js): the steps in Bangla and English, the progress bar */
.stv-langs { display: grid; gap: 12px; margin: 4px 0 16px; }
.stv-steps { padding: 14px 16px; border-radius: var(--r-ctl); background: var(--mint); border: 1px solid var(--line); }
.stv-steps h3 { margin: 0 0 8px; font-size: 16px; }
.stv-steps ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.55; }
/* marked words: bold, each kind its own colour (mixed with the text colour, so they stay readable in dark themes) */
.stv-k { font-weight: 700; }
.stv-k-ui { color: #1D5FD1; color: color-mix(in srgb, #1D5FD1 75%, var(--ink)); }      /* what to press or open */
.stv-k-warn { color: #C2410C; color: color-mix(in srgb, #C2410C 78%, var(--ink)); }    /* what not to do */
.stv-k-file { color: #7C3AED; color: color-mix(in srgb, #7C3AED 75%, var(--ink)); }    /* the email and the zip */
.stv-k-ok { color: #15803D; color: color-mix(in srgb, #15803D 78%, var(--ink)); }      /* reassurance */
.stv-k-green { color: #15803D; color: color-mix(in srgb, #15803D 78%, var(--ink)); }
.stv-k-blue { color: #1D5FD1; color: color-mix(in srgb, #1D5FD1 75%, var(--ink)); }
.stv-k-red { color: #DC2626; color: color-mix(in srgb, #DC2626 80%, var(--ink)); }
.stv-k-pink { color: #DB2777; color: color-mix(in srgb, #DB2777 80%, var(--ink)); }
.stv-sub { margin: 4px 0 2px; padding-left: 20px; display: grid; gap: 4px; list-style: disc; }
.stv-strava-btn { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin: 2px 0; min-height: 36px; padding: 0 14px;
  background: #FC4C02; color: #fff; border-color: #FC4C02; font-weight: 700; }
.stv-strava-btn:hover { background: #E04402; }
.stv-strava-btn .bi { width: 15px; height: 15px; }
.stv .is-busy { opacity: .55; }
.stv-out { margin-top: 6px; }
.stv-phase { margin: 14px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.stv-bar span { transition: width .3s ease; }
.stv-counts { margin: 0 0 12px; }
.stv-problems ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .stv-bar span { transition: none; } }
/* Heart rate beside each split (splits.js), when the activity has it */
.sb-list.has-hr .sb-row { grid-template-columns: 64px 92px 1fr 56px; }
.sb-list.compact.has-hr .sb-row { grid-template-columns: 54px 84px 1fr 52px; }
.sb-hr { display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.sb-hr .bi { width: 14px; height: 14px; flex: none; color: var(--danger); }
.sb-head .sb-hr { justify-content: flex-end; }
/* Salt Calculator (views/salt.js) */
.sl-top { margin: 0 0 14px; }
.sl-dash-wrap { margin: 0 0 14px; }
.sl-dash-wrap > h2 { font-size: 18px; margin: 0 0 10px; }
.sl-dash, .sl-cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .sl-dash { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sl-cards { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.sl-cards { margin: 12px 0; }
.sl-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); }
.sl-card.ok { border-left-color: var(--emerald); }
.sl-card.warn { border-left-color: var(--warn); }
.sl-card.bad { border-left-color: var(--danger); }
.sl-card-l { font-size: 13px; color: var(--muted); line-height: 1.3; }
.sl-card b { font-family: var(--font-metric); font-size: 24px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.sl-card-s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.sl-card .sl-gauge { width: 88px; margin-top: 2px; }
.sl-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 6px 0 4px; scrollbar-width: thin; }
.sl-tabs .chip { flex: none; min-height: 44px; white-space: nowrap; }
.sl-pane h2 { font-size: 19px; margin: 4px 0 12px; }
.sl-steps { margin: 6px 0 14px; }
.sl-steps .chip, .sl-chips .chip { min-height: 44px; }
.sl-q { margin: 0 0 18px; }
.sl-q h3 { font-size: 16px; margin: 0 0 8px; line-height: 1.4; }
.sl-q > .small { margin: -4px 0 8px; }
.sl-field { margin-bottom: 10px; }
.sl-grid { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-step-btns { margin: 8px 0; }
.sl-tests { display: grid; gap: 12px; margin: 0 0 12px; }
.sl-test { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--mint); }
.sl-test-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.sl-test-head .input { flex: 1; min-width: 0; }
.sl-use { margin: 4px 0 8px; }
.sl-mini { display: grid; gap: 8px 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 10px 0; }
.sl-mini dt { font-size: 12.5px; color: var(--muted); }
.sl-mini dd { margin: 0; font-weight: 600; }
.sl-mini .wide { grid-column: 1 / -1; }
.sl-as { padding: 6px 10px; border-radius: 10px; font-weight: 500; font-size: 14px; }
.sl-as.good, .sl-as.mild { background: var(--ok-bg); }
.sl-as.moderate { background: var(--warn-bg); }
.sl-as.high, .sl-as.gained { background: var(--danger-bg); color: var(--danger); }
.sl-sub { margin: 18px 0 8px; }
.sl-sub > h2 { font-size: 17px; }
.sl-bars { display: grid; gap: 8px; margin: 6px 0 12px; }
.sl-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.sl-bar-l { color: var(--muted); line-height: 1.3; }
.sl-bar-t { height: 14px; border-radius: 999px; background: var(--mint-2); overflow: hidden; }
.sl-bar-t i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--emerald) 55%, var(--line)); }
.sl-bar.on .sl-bar-t i { background: var(--emerald); }
.sl-bar.on .sl-bar-l { color: var(--ink); font-weight: 600; }
.sl-bar b { font-family: var(--font-metric); font-size: 16px; white-space: nowrap; }
.sl-four th { width: 46%; font-weight: 600; }
.sl-items .input { min-height: 40px; padding: 6px 8px; }
.sl-items .sl-num { width: 84px; }
.sl-items td { vertical-align: middle; }
.sl-need { font-family: var(--font-metric); font-size: 16px; white-space: nowrap; }
.sl-sched td, .sl-sched th { white-space: nowrap; }
.sl-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.sl-check input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.sl-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }
.sl-gauge path.off { stroke: var(--mint-2); }
.sl-gauge path.on.l0 { stroke: var(--danger); }
.sl-gauge path.on.l1 { stroke: var(--warn); }
.sl-gauge path.on.l2, .sl-gauge path.on.l3 { stroke: var(--emerald); }
.sl-ready { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.sl-ready .sl-gauge { width: 130px; flex: none; }
.sl-ready b { font-size: 20px; line-height: 1.3; }
.sl-list { padding-left: 20px; display: grid; gap: 6px; margin: 8px 0; }
.sl-conv { margin-top: 18px; }
.sl-conv-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.sl-conv-row > span { padding-bottom: 14px; color: var(--muted); }
.sl-report .sl-rp-sec { margin: 0 0 14px; }
.sl-report h3 { font-size: 16px; margin: 16px 0 8px; }
.sl-report th { width: 42%; font-weight: 600; vertical-align: top; }
.sl-refs { padding-left: 20px; font-size: 13.5px; display: grid; gap: 6px; }
.sl-actions { margin: 0 0 12px; }
.sl-foot { margin-top: 16px; }
.sl-print { display: none; }
@media print {
  html.sl-printing body > :not(.sl-print) { display: none !important; }
  html.sl-printing .sl-print { display: block; color: #000; background: #fff; padding: 0; }
  html.sl-printing .sl-print table { width: 100%; border-collapse: collapse; }
  html.sl-printing .sl-print th, html.sl-printing .sl-print td { border-bottom: 1px solid #ccc; padding: 4px 6px; text-align: left; vertical-align: top; }
  html.sl-printing .sl-print h3 { break-after: avoid; }
}@media (max-width: 759px) { .sl-card b { font-size: 20px; } .sl-card { padding: 10px 12px; } }
/* Filter bar of My activities and Record Analysis (act-filter.js): search, then Mode / Category / Date buttons */
.af { display: grid; gap: 10px; }
.af-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.af-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.af-btn .bi { width: 16px; height: 16px; flex: none; }
/* A chosen filter button (open, or a filter set) stands out: a dark gradient of the theme colour in the light themes,
   a light gradient in the dark themes (green, marine, dark). */
:root[data-theme] .af-btn[aria-expanded="true"], :root[data-theme] .af-btn[aria-pressed="true"] {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--emerald) 62%, #06140F), color-mix(in srgb, var(--emerald-2) 48%, #020806));
  box-shadow: 0 3px 10px -4px color-mix(in srgb, var(--emerald) 60%, #000);
}
:root[data-theme="green"] .af-btn[aria-expanded="true"], :root[data-theme="green"] .af-btn[aria-pressed="true"],
:root[data-theme="marine"] .af-btn[aria-expanded="true"], :root[data-theme="marine"] .af-btn[aria-pressed="true"],
:root[data-theme="dark"] .af-btn[aria-expanded="true"], :root[data-theme="dark"] .af-btn[aria-pressed="true"] {
  color: #0B1712;
  background: linear-gradient(135deg, #FFFFFF, color-mix(in srgb, var(--emerald) 30%, #FFFFFF));
  box-shadow: 0 3px 12px -4px color-mix(in srgb, var(--emerald) 55%, transparent);
}
.af-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.af-panel .field { margin: 0; flex: 1 1 220px; min-width: 0; }
.af-dates { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 100%; }
.af-dates .field { flex: 1 1 150px; }
.af-period { display: grid; gap: 10px; flex: 1 1 100%; min-width: 0; }

/* Training plan days (plan-status.js): completed green, not completed, missed red */
.plan-st { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.plan-st .bi { width: 14px; height: 14px; flex: none; }
.plan-st.done { color: #fff; background: linear-gradient(135deg, #22C55E, #0E9F6E); box-shadow: 0 1px 4px color-mix(in srgb, #0E9F6E 35%, transparent); }
.plan-st.not { color: var(--ink); background: var(--mint-2); border: 1px solid var(--line); }
.plan-st.missed { color: #fff; background: linear-gradient(135deg, #F04438, #C62828); box-shadow: 0 1px 4px color-mix(in srgb, #C62828 35%, transparent); }

/* Shoe and bike mileage card (Record Analysis → Records) */
.rc-gear-ic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--ok-bg); color: var(--brand-ink); }
.rc-gear-ic svg { width: 18px; height: 18px; }
/* Drawer top (the phone's side menu): always a deep shade of the theme colour, the app name in white.
   The drawer itself has the same colour as the desktop side menu (both var(--card); the dark theme: one gradient). */
:root[data-theme] .drawer-head { background: linear-gradient(135deg, color-mix(in srgb, var(--emerald) 55%, #03110C), color-mix(in srgb, var(--emerald-2) 42%, #010504)); color: #fff; border-bottom: 0; }
:root[data-theme] .drawer-head small { color: rgba(255, 255, 255, .86); }
:root[data-theme="dark"] .drawer-head { background: radial-gradient(120% 140% at 0% 0%, rgba(245, 154, 44, .35), transparent 60%), linear-gradient(135deg, #2A2A2E, #121214); }
/* ---------- Option buttons: the "radius button" look (chips, chip tabs, coach tabs, the period choice) ----------
   Not chosen: outline in the theme colour. Hover: a light tint. Keyboard focus: a soft ring. Chosen: filled with the
   theme's button colour, white (or dark, on the dark themes) text and a small lift. Disabled: grey.
   Colours come from each theme's own tokens: --btn-bg (fill), --brand-ink (outline text), --on-brand (text on fill). */
:root[data-theme] {
  --opt: var(--btn-bg);
  --opt-ink: var(--brand-ink);
  --opt-on: var(--on-brand);
  --opt-hover: color-mix(in srgb, var(--btn-bg) 86%, #000);
}
:root[data-theme] .chip, :root[data-theme] .tabs a {
  border-radius: 8px; border: 1.5px solid color-mix(in srgb, var(--opt) 70%, transparent);
  background: var(--card); color: var(--opt-ink); font-weight: 600; min-height: 40px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
:root[data-theme] .chip:hover, :root[data-theme] .tabs a:hover {
  background: color-mix(in srgb, var(--opt) 12%, var(--card)); border-color: var(--opt); color: var(--opt-ink);
}
:root[data-theme] .chip:focus-visible, :root[data-theme] .tabs a:focus-visible {
  outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--opt) 38%, transparent);
}
:root[data-theme] .chip:not(.af-btn)[aria-pressed="true"], :root[data-theme] .tabs a[aria-current="page"] {
  background: var(--opt); border-color: var(--opt); color: var(--opt-on); font-weight: 700;
  box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--opt) 65%, transparent);
}
:root[data-theme] .chip:not(.af-btn)[aria-pressed="true"]:hover, :root[data-theme] .tabs a[aria-current="page"]:hover {
  background: var(--opt-hover); border-color: var(--opt-hover); color: var(--opt-on);
}
:root[data-theme] .chip:not(.af-btn)[aria-pressed="true"]:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--opt) 38%, transparent), 0 4px 10px -3px color-mix(in srgb, var(--opt) 65%, transparent);
}
:root[data-theme] .chip:disabled, :root[data-theme] .chip[aria-disabled="true"] {
  background: var(--mint-2); border-color: transparent; color: var(--muted); box-shadow: none; cursor: not-allowed; opacity: 1;
}
:root[data-theme] .chip.chip-alert:not([aria-pressed="true"]) { border-color: var(--danger); color: var(--danger); }
/* the dark theme fills with its orange gradient */
:root[data-theme="dark"] .chip:not(.af-btn)[aria-pressed="true"], :root[data-theme="dark"] .tabs a[aria-current="page"],
:root[data-theme="dark"] .chip:not(.af-btn)[aria-pressed="true"]:hover, :root[data-theme="dark"] .tabs a[aria-current="page"]:hover {
  background: var(--dk-orange); border-color: transparent; color: var(--on-brand); box-shadow: var(--dk-glow);
}
/* the period choice of Record Analysis (week / month / year / all time / dates) */
:root[data-theme] .segmented { border-radius: 10px; padding: 4px; background: var(--mint-2); border: 1.5px solid color-mix(in srgb, var(--opt) 35%, transparent); }
:root[data-theme] .segmented button { border-radius: 7px; color: var(--opt-ink); font-weight: 600; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
:root[data-theme] .segmented button:hover { background: color-mix(in srgb, var(--opt) 12%, transparent); }
:root[data-theme] .segmented button[aria-pressed="true"] { background: var(--opt); color: var(--opt-on); font-weight: 700; box-shadow: 0 4px 10px -3px color-mix(in srgb, var(--opt) 65%, transparent); }
:root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: var(--dk-orange); color: var(--on-brand); }
@media (max-width: 759px) { :root[data-theme] .chip, :root[data-theme] .tabs a { min-height: 44px; } }
/* Recording screen: total distance in green, average pace in orange, the Pause button a teal gradient (all themes) */
:root[data-theme] .metric-dist b { color: #0A6CFF; }   /* the same blue as the GPS point on the map */
:root[data-theme] .metric-avg b { color: #EE6200; }
.metric b .pc-min, .metric b .pc-colon, .metric b .pc-sec { display: inline; font: inherit; line-height: inherit; }   /* not the label style */
:root[data-theme] .metric-avg b .pc-min { color: #4A943E; }
:root[data-theme] .metric-avg b .pc-colon { color: #000000; }
/* dark themes (dark recording panel): a white colon, so it stays visible */
:root[data-theme="green"] .metric-avg b .pc-colon, :root[data-theme="marine"] .metric-avg b .pc-colon, :root[data-theme="dark"] .metric-avg b .pc-colon { color: #FFFFFF; }
:root[data-theme] .metric-avg b .pc-sec { color: #EE6200; }
:root[data-theme] .rec-controls .btn-run.btn-pause, :root[data-theme] .btn-run.btn-pause {
  background: linear-gradient(180deg, #1C98AB, #167D8D 55%, #0F5F6B); color: #fff; border: 0;
  box-shadow: 0 10px 22px -10px rgba(22, 125, 141, .75);
}
:root[data-theme] .rec-controls .btn-run.btn-pause:hover, :root[data-theme] .btn-run.btn-pause:hover { background: linear-gradient(180deg, #198A9B, #126C7A 55%, #0C4F59); }
/* the profile's shoe / bike order arrows */
.gear-move { min-width: 40px; padding-left: 8px; padding-right: 8px; }
.gear-move .bi { width: 16px; height: 16px; }
.gear-move:disabled { opacity: .35; }

/* My event record: certificate file and result link (event-fields.js) */
.ev-cert { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--mint); min-width: 0; }
.ev-cert-img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--card); flex: none; }
.ev-cert-pdf { width: 64px; height: 64px; flex: none; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 10px; background: color-mix(in srgb, var(--emerald) 14%, var(--card)); color: var(--brand-ink); }
.ev-cert-pdf .bi { width: 26px; height: 26px; }
.ev-cert-pdf small { font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.ev-cert-body { display: grid; gap: 2px; min-width: 0; }
.ev-cert-body b { overflow-wrap: anywhere; font-size: 15px; }
.ev-cert-body .btn-row { margin-top: 6px; }
.ev-cert-field .btn-row { margin: 0 0 6px; }
.ev-cert-field .ev-cert { margin-bottom: 8px; }
.ev-cert-field .ev-cert-body > .small { display: none; }   /* the field label above already says it */
.ev-cert-chosen { margin: 0 0 4px; color: var(--brand-ink); font-weight: 600; overflow-wrap: anywhere; }
.ev-cert-del { color: var(--danger); }
/* Settings → Preferences: "Watch view" (Android app only) */
.wv-check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; cursor: pointer; }
.wv-check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--brand-ink); }
.wv-check small { display: block; margin-top: 2px; line-height: 1.4; }
.evd-pagelink { margin: 16px 0; }
/* Profile photo: the 1:1 cropper (crop-square.js) */
.cq-modal { max-width: 380px; text-align: center; }
.cq-modal .btn-row { justify-content: center; }
.cq-frame { position: relative; margin: 6px auto 12px; border-radius: 12px; overflow: hidden; background: #111; touch-action: none; }
.cq-canvas { display: block; cursor: grab; touch-action: none; }
.cq-canvas:active { cursor: grabbing; }
.cq-canvas:focus-visible { outline: 3px solid var(--focus, var(--emerald)); outline-offset: -3px; }
.cq-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); pointer-events: none; outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px; }
.cq-zoom-row { display: flex; align-items: center; gap: 10px; margin: 0 auto 14px; max-width: 300px; }
.cq-zoom-row .bi { width: 18px; height: 18px; color: var(--muted); flex: none; }
.cq-zoom { flex: 1; min-height: 44px; accent-color: var(--brand-ink); }
/* My activities: "Duplicate data" (overlapping times) - fixed yellow so it reads the same in every theme */
.dup-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dup-banner .bi { width: 18px; height: 18px; flex: none; }
.dup-banner span { flex: 1; min-width: 180px; }
.act-item.is-dup { box-shadow: inset 4px 0 0 #E8B100; }
.badge.dup-badge { display: inline-flex; align-items: center; gap: 4px; border: 0; cursor: pointer; min-height: 26px; padding: 2px 10px;
  background: #FFF1B8; color: #6B4E00; font: inherit; font-size: 12px; font-weight: 700; }
.badge.dup-badge .bi { width: 13px; height: 13px; }
.dup-modal { max-width: 560px; }
.dup-modal h2 { display: flex; align-items: center; gap: 8px; }
.dup-groups { display: grid; gap: 12px; margin: 8px 0 12px; max-height: 60vh; overflow-y: auto; }
.dup-group { border: 1px solid #E8B100; border-radius: 12px; padding: 4px 12px; background: color-mix(in srgb, #FFF1B8 35%, var(--card)); }
.dup-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dup-row:last-child { border-bottom: 0; }
.dup-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dup-main b { overflow-wrap: anywhere; }
/* Runner profile: event BIBs and certificates (by the runner's choice) */
/* "Completed Events" beside Message on a runner's profile, and its pop-up (views/runners.js) */
.fr-done-btn .badge { margin-left: 2px; font-size: 12px; }
.fr-done-modal h2 { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.fr-done-modal h2 .bi { width: 22px; height: 22px; color: var(--brand-ink); }
.fr-done-modal .btn-row { margin-top: 12px; justify-content: flex-end; }
a.fr-evrec-cert { text-decoration: none; }
.fr-evrec-list { display: grid; gap: 8px; }
.fr-evrec-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.fr-evrec-item:last-child { border-bottom: 0; }
.fr-evrec-main { flex: 1; min-width: 0; display: grid; }
.fr-evrec-main b { overflow-wrap: anywhere; }
.fr-evrec-bib { display: grid; justify-items: center; padding: 4px 10px; border-radius: 10px; background: color-mix(in srgb, var(--emerald) 10%, var(--card)); border-top: 3px solid var(--emerald); }
.fr-evrec-bib small { font-size: 11px; color: var(--muted); }
.fr-evrec-bib b { font-variant-numeric: tabular-nums; }
.fr-evrec-cert { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; cursor: pointer; border-radius: 50%; background: var(--mint-2); color: var(--brand-ink); flex: none; }
/* the certificate tile on the event page is a button that opens the pop-up; the download button sits above it */
.evm-cert-view { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; }
.evm-cert-view:focus-visible { outline: 3px solid var(--btn-bg); outline-offset: -3px; }
.evm-cert .evm-dl { z-index: 1; }
/* the certificate pop-up */
.modal.cert-modal { width: min(820px, 100%); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px 16px; overflow: hidden; }
.cert-view-head { display: flex; align-items: center; gap: 10px; }
.cert-view-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cert-view-x { flex: none; }
.cert-view-body { min-height: 0; display: grid; place-items: center; border-radius: 12px; background: var(--mint); overflow: auto; }
.cert-view-img { display: block; max-width: 100%; max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.cert-view-pdf { display: block; width: 100%; height: calc(100dvh - 190px); max-height: 1000px; border: 0; background: #FFFFFF; }
.cert-view-msg { display: grid; justify-items: center; gap: 10px; padding: 28px 16px; text-align: center; }
.cert-view-foot { margin: 0; justify-content: flex-end; }
.fr-evrec-cert .bi { width: 20px; height: 20px; }
/* My event record, finished: BIB card and certificate side by side; small round edit and download buttons */
.evm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 8px; }
.evm-tile { position: relative; min-height: 112px; border-radius: 14px; border: 1px solid var(--line); background: var(--mint); overflow: hidden; display: grid; place-items: center; }
/* The BIB card looks like a printed race bib, the same in every theme: blue band with the event name, the number
   big and black on white, blue band at the bottom. */
.evm-bib { --bib-band: #1C6DB8; --bib-ink: #FFFFFF; grid-template-rows: auto 1fr auto; place-items: stretch; padding: 0; background: #F7F7F7;
  border: 1px solid var(--bib-band); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }
.evm-bib-top, .evm-bib-foot { background: var(--bib-band); color: var(--bib-ink); }
/* band colours, one per event: blue, deep red, light yellow, deep yellow, light orange, deep orange, light green,
   deep green, aqua green, sky blue, off white. Light bands carry black text. */
.evm-bib.bib-c0 { --bib-band: #1C6DB8; --bib-ink: #FFFFFF; }
.evm-bib.bib-c1 { --bib-band: #A3161F; --bib-ink: #FFFFFF; }
.evm-bib.bib-c2 { --bib-band: #FFE98A; --bib-ink: #000000; }
.evm-bib.bib-c3 { --bib-band: #F2B705; --bib-ink: #000000; }
.evm-bib.bib-c4 { --bib-band: #FFC48C; --bib-ink: #000000; }
.evm-bib.bib-c5 { --bib-band: #D9480F; --bib-ink: #FFFFFF; }
.evm-bib.bib-c6 { --bib-band: #A8E6A1; --bib-ink: #000000; }
.evm-bib.bib-c7 { --bib-band: #1E6B34; --bib-ink: #FFFFFF; }
.evm-bib.bib-c8 { --bib-band: #14B8A6; --bib-ink: #000000; }
.evm-bib.bib-c9 { --bib-band: #7CC8F2; --bib-ink: #000000; }
.evm-bib.bib-c10 { --bib-band: #EDE6D3; --bib-ink: #000000; border-color: #C9BFA5; }
.evm-bib-top { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 7px 8px 6px; text-align: center;
  font-family: Georgia, "Times New Roman", "RF Digits", "Hind Siliguri", serif; font-weight: 700; font-size: 13px; line-height: 1.2; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.evm-bib-no { display: grid; place-items: center; padding: 4px 8px; color: #000000; font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; text-align: center; overflow-wrap: anywhere; }
.evm-bib-foot { display: flex; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.evm-bib-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .evm-bib-no { font-size: 36px; } .evm-bib-top { font-size: 12px; } }
.evm-cert-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.evm-cert .ev-cert-pdf { width: 100%; height: 100%; border-radius: 0; }
.evm-cert-link, .evm-cert-add { color: var(--brand-ink); cursor: pointer; font: inherit; }
.evm-cert-link .bi, .evm-cert-add .bi { width: 30px; height: 30px; }
.evm-cert-add { border-style: dashed; }
.evm-round { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; flex: none;
  background: var(--card); color: var(--brand-ink); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .3); }
.evm-round .bi { width: 18px; height: 18px; }
.evm-round[aria-busy="true"] { opacity: .6; }
.evm-dl { position: absolute; right: 6px; bottom: 6px; }
.evm-dl .bi { width: 22px; height: 22px; }
.ev-myinfo-head .evm-edit { margin-left: auto; }
/* the form: label and box side by side (BIB, certificate) */
.evm-row { display: grid; grid-template-columns: minmax(84px, 30%) minmax(0, 1fr); gap: 8px 12px; align-items: center; margin: 0 0 12px; }
.evm-lbl { font-weight: 600; line-height: 1.3; }
.evm-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.evm-ctl > .input { width: 100%; }
.evm-cur { display: flex; align-items: center; gap: 6px; flex-basis: 100%; min-width: 0; font-size: 14px; }
.evm-cur > .bi { width: 16px; height: 16px; flex: none; color: var(--brand-ink); }
.evm-cur > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evm-ctl .ev-cert-chosen { flex-basis: 100%; margin: 0; }
.evm-hint { margin: -4px 0 12px; }
.ev-myinfo-note { margin: 10px 0 0; display: flex; align-items: center; gap: 4px; }
.ev-myinfo-note .bi { width: 14px; height: 14px; flex: none; }

/* Event page: the organizer's list and delete request (events.js) */
.evo { margin: 16px 0; }
.evo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.evo-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0; }
.evo-head h2 .bi { width: 18px; height: 18px; color: var(--brand-ink); }
.evo-counts { margin: 6px 0 10px; }
.evo-del { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.evo-del .notice { display: flex; align-items: flex-start; gap: 6px; }
.evo-del .notice .bi { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.evo-del-btn { color: var(--danger); }
.evo-del-form textarea { resize: vertical; font: inherit; }
/* Admin: delete requests of events (admin-sections.js) */
.ad-edr { margin: 0 0 16px; }
.ad-edr h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.ad-edr-item { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.ad-edr-item:last-child { border-bottom: 0; }
.ad-edr-why { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--mint-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Admin → event: organizers (admin-sections.js) */
.ad-org h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.ad-org-list, .ad-org-found { display: grid; gap: 6px; margin: 0 0 12px; }
.ad-org-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ad-org-name { flex: 1; min-width: 0; display: grid; }
.ad-org-name b { overflow-wrap: anywhere; }

/* Club posts (club-posts.js) */
.clubs .cl-tabs4 { grid-template-columns: repeat(4, 1fr); }
.cp { display: grid; gap: 14px; }
.cp-compose-top { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.cp-compose-line { flex: 1; min-width: 0; display: grid; gap: 2px; }
textarea.input.cp-line { resize: none; min-height: 44px; height: 44px; max-height: 240px; overflow-y: auto; font: inherit; line-height: 1.45; padding-top: 10px; padding-bottom: 10px; }
.cp-count { justify-self: end; font-size: 12px; }
.cp-count[hidden] { display: none; }
.cp-share-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px 50px; }
.cp-share { display: flex; align-items: center; gap: 8px; }
.cp-share-label { font-weight: 600; font-size: 14px; color: var(--muted); }
.cp-share-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 1px solid transparent; position: relative; }
.cp-share-btn::before { content: ''; position: absolute; inset: -2px; }   /* 44px tap area */
.cp-share-btn svg { width: 18px; height: 18px; }
.cp-share-act { background: #FDE7DA; color: #C2410C; }
.cp-share-pic { background: #DBEAFE; color: #1D4ED8; }
.cp-share-btn[aria-pressed="true"] { border-color: currentColor; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px currentColor; }
.cp-share-btn:disabled { opacity: .6; cursor: progress; }
.cp-share-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root[data-theme="green"] .cp-share-act, :root[data-theme="marine"] .cp-share-act, :root[data-theme="dark"] .cp-share-act { background: rgba(249, 115, 22, .2); color: #FDBA74; }
:root[data-theme="green"] .cp-share-pic, :root[data-theme="marine"] .cp-share-pic, :root[data-theme="dark"] .cp-share-pic { background: rgba(59, 130, 246, .22); color: #93C5FD; }
.cp-chosen { margin: 0 0 10px; }
.cp-chosen[hidden] { display: none; }
.cp-chosen .cp-preview { margin-top: 0; }
.cp-chosen-act { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 52px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--mint); }
.cp-chosen-act .cp-preview-x { top: 50%; transform: translateY(-50%); }
.cp-chosen-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #FDE7DA; color: #C2410C; }
.cp-chosen-ic svg { width: 18px; height: 18px; }
.cp-keep { display: inline-flex; align-items: center; gap: 4px; }
.cp-keep .bi { width: 13px; height: 13px; flex: none; }
@media (max-width: 420px) { .cp-share-row { margin-left: 0; } }
.cp-modes { grid-template-columns: 1fr 1fr; }
.cp-modes button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; }
.cp-modes button .bi { width: 16px; height: 16px; }
.cp-attach { margin: 0 0 10px; }
.cp-attach[hidden] { display: none; }
.cp-preview { position: relative; margin-top: 10px; max-width: 320px; }
.cp-preview img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: var(--mint-2); }
.cp-preview-x { position: absolute; top: 6px; right: 6px; background: var(--card); border-radius: 999px; box-shadow: var(--card-shadow); }
.cp-compose-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.cp-compose-foot small { display: inline-flex; align-items: center; gap: 4px; }
.cp-compose-foot small .bi { width: 13px; height: 13px; flex: none; }
.cp-send { min-height: 44px; }
.cp-feed { display: grid; gap: 14px; }
.cp-empty { text-align: center; }
.cp-empty .bi { width: 28px; height: 28px; color: var(--muted); }
.cp-post { padding: 14px 16px; }
.cp-head { display: flex; align-items: center; gap: 10px; }
.cp-who { flex: 1; min-width: 0; display: grid; }
.cp-name { font-weight: 700; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.cp-who small { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.cp-who small .bi { width: 12px; height: 12px; }
.cp-del { flex: none; }
.cp-body { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 16px; }
.cp-act { display: grid; gap: 6px; padding: 12px 14px; margin: 0 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--mint); color: var(--ink); text-decoration: none; }
.cp-act:hover { border-color: color-mix(in srgb, var(--emerald) 45%, var(--line)); }
.cp-act-ic { justify-self: start; }
.cp-act-title { font-size: 16px; overflow-wrap: anywhere; }
.cp-act-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cp-act-nums > span { display: grid; }
.cp-act-nums small { font-size: 12px; color: var(--muted); }
.cp-act-nums b { font-family: var(--font-metric); font-size: 20px; font-variant-numeric: tabular-nums; }
.cp-act-date { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.cp-act-date .bi { width: 12px; height: 12px; }
/* the whole picture, any shape (tall 9:16, wide 16:9, square): never cut; tall ones get side margins */
.cp-photo { display: block; width: 100%; height: auto; max-height: min(78vh, 640px); object-fit: contain; border-radius: 14px; margin: 0 0 10px; background: var(--mint-2); }
.cp-sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 8px; font-size: 14px; color: var(--muted); }
.cp-sum[hidden] { display: none; }
.cp-sum-rx { display: inline-flex; align-items: center; gap: 2px; }
.cp-sum-e { font-size: 16px; line-height: 1; }
.cp-sum-rx > span:last-child { margin-left: 4px; }
.cp-sum-c { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0; min-height: 32px; }
.cp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; }
.cp-react-wrap { position: relative; }
.cp-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.cp-btn:hover { background: var(--mint-2); }
.cp-btn .bi { width: 18px; height: 18px; }
.cp-btn.on { color: var(--brand-ink); }
.cp-mine-e { font-size: 18px; line-height: 1; }
.cp-picker { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 20; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lift, 0 10px 30px -10px rgba(0,0,0,.35)); }
.cp-picker[hidden] { display: none; }
.cp-pick { display: grid; justify-items: center; gap: 1px; min-width: 52px; min-height: 52px; padding: 4px 2px; border: 0; border-radius: 14px; background: transparent; cursor: pointer; color: var(--muted); font: inherit; }
.cp-pick span { font-size: 24px; line-height: 1.1; transition: transform .15s ease; }
.cp-pick small { font-size: 10.5px; white-space: nowrap; }
.cp-pick:hover span, .cp-pick:focus-visible span { transform: scale(1.2); }
.cp-pick[aria-pressed="true"] { background: color-mix(in srgb, var(--emerald) 14%, var(--card)); color: var(--brand-ink); }
@media (prefers-reduced-motion: reduce) { .cp-pick span { transition: none; } }
.cp-comments { display: grid; gap: 8px; margin: 10px 0 0; }
.cp-comments:empty { display: none; }
.cp-c { display: flex; gap: 8px; align-items: flex-start; }
.cp-c-bubble { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 14px; background: var(--mint-2); }
.cp-c-bubble p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-c-name { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.cp-c-del { flex: none; width: 36px; height: 36px; }
.cp-c-del .bi { width: 14px; height: 14px; }
.cp-cform { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; }
.cp-cform .input { flex: 1; min-width: 0; min-height: 44px; }
.cp-cform .btn { min-height: 44px; min-width: 44px; }
@media (max-width: 420px) { .cp-pick { min-width: 46px; } .cp-pick small { font-size: 9.5px; } }

/* Run-Walk Method Calculator (views/runwalk.js) */
.rw-modes { grid-template-columns: 1fr 1fr; }
.rw-modes button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; font-size: 15.5px; }
.rw-modes button .bi { width: 18px; height: 18px; flex: none; }
.rw-ms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rw-presets .chip { min-height: 44px; }
.rw-pane[hidden] { display: none; }
.rw-result > h3 { font-size: 16px; margin: 18px 0 8px; }
.rw-paces { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.rw-pace { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.rw-pace > span { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.rw-pace > span .bi { width: 14px; height: 14px; flex: none; }
.rw-pace b { font-family: var(--font-metric); font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.rw-pace small { font-size: 12px; color: var(--muted); }
.rw-pace.run { background: color-mix(in srgb, var(--emerald) 14%, var(--card)); border-color: color-mix(in srgb, var(--emerald) 55%, var(--line)); }
.rw-pace.run b { font-size: 32px; color: var(--brand-ink); }
.rw-pace.run > span { color: var(--brand-ink); font-weight: 600; }
@media (max-width: 420px) { .rw-paces { grid-template-columns: 1fr 1fr; } .rw-pace.run { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; } .rw-pace.run > span { flex-basis: 100%; } }
.rw-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .rw-sum { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rw-sum dd { font-size: 24px; }
.rw-sum dd small { display: inline; margin-left: 4px; }
.rw-bar { display: flex; height: 30px; margin: 12px 0 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.rw-bar i { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; font-style: normal; }
.rw-bar i.run { background: var(--series-run); color: #fff; }
:root[data-theme="dark"] .rw-bar i.run { color: var(--on-brand); }
.rw-bar i.walk { background: color-mix(in srgb, var(--series-walk) 30%, var(--card)); color: var(--ink); }
.rw-details { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
@media (min-width: 640px) { .rw-details { grid-template-columns: 1fr 1fr; } }
.rw-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rw-kv > span { color: var(--muted); font-size: 14px; }
.rw-kv > b { text-align: right; font-size: 15px; }
.rw-how { margin: 16px 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--mint); border: 1px solid var(--line); border-left: 4px solid var(--emerald); }
.rw-how h3 { display: flex; align-items: center; gap: 6px; font-size: 16px; margin: 0 0 6px; }
.rw-how h3 .bi { width: 18px; height: 18px; color: var(--brand-ink); }
.rw-how p { margin: 6px 0; line-height: 1.6; }
.rw-how p:first-of-type { font-size: 16px; font-weight: 600; }
.rw-sched { margin: 0 0 12px; }
.rw-sched td, .rw-sched th { white-space: nowrap; padding: 8px 7px; font-size: 14px; }
.rw-sched { padding: 8px 10px; }
.rw-sched tr.partial td, .rw-partial-key { background: var(--warn-bg); }
.rw-partial-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid var(--line); }
.rw-notes { margin-top: 16px; }
.rw-notes p { line-height: 1.6; }

/* Recovery calculator (views/recovery.js) */
.rv, .rv > *, .rv-card, .rv-daybody { min-width: 0; max-width: 100%; }
.rv-actions { margin: 0 0 12px; }
.rv-form h3 { font-size: 15px; margin: 4px 0 10px; color: var(--muted); }
.rv-q { margin-bottom: 14px; }
.rv-q .chip { min-height: 44px; }
.rv-opt { margin-top: 6px; }
.rv-cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0 0 14px; }
@media (min-width: 900px) { .rv-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rv-cards .rv-card { margin: 0; }
.rv-card > h2 { font-size: 18px; margin: 0 0 10px; }
.rv-card > h3 { font-size: 15px; margin: 14px 0 6px; }
.rv-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rv-kv:last-of-type { border-bottom: 0; }
.rv-kv > span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.rv-kv > b { font-family: var(--font-metric); font-size: 17px; color: var(--ink); text-align: right; white-space: nowrap; }
.rv-kv > small { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.35; }
.rv-kv > .rv-zone { justify-self: end; }
.rv-kv.wide { grid-template-columns: minmax(0, 1fr); }
.rv-kv.wide > b { text-align: left; white-space: normal; font-family: inherit; font-size: 15px; line-height: 1.45; }
.rv-zone { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
/* the readiness zones keep their own colours in every theme: green / yellow / red must read as exactly that */
.rv { --rv-green: #3BA55D; --rv-yellow: #D9A21B; --rv-red: #DD4B4B; }
.rv-zone.green { background: color-mix(in srgb, var(--rv-green) 18%, transparent); color: color-mix(in srgb, var(--rv-green) 62%, var(--ink)); }
.rv-zone.yellow { background: color-mix(in srgb, var(--rv-yellow) 22%, transparent); color: color-mix(in srgb, var(--rv-yellow) 62%, var(--ink)); }
.rv-zone.red { background: color-mix(in srgb, var(--rv-red) 18%, transparent); color: color-mix(in srgb, var(--rv-red) 62%, var(--ink)); }
.rv-table td, .rv-table th { white-space: nowrap; }
.rv-table td.rv-ins { white-space: normal; min-width: 260px; font-size: 14px; line-height: 1.4; }
.rv-table tr.rv-extra td { background: var(--warn-bg); }
.rv-table tr.rv-done td:first-child { box-shadow: inset 4px 0 0 var(--rv-green); }
.rv-daylist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 10px 0 14px; }
.rv-day, .rv-checkin { min-width: 0; }
.rv-daybody .table-wrap { max-width: 100%; }
.rv-day { border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; background: var(--card); }
.rv-day.green { border-left-color: var(--rv-green); }
.rv-day.yellow { border-left-color: var(--rv-yellow); }
.rv-day.red { border-left-color: var(--rv-red); }
.rv-day > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 48px; padding: 8px 12px; cursor: pointer; }
.rv-day > summary .bi { width: 18px; height: 18px; color: var(--rv-green); }
.rv-day.done > summary > b { text-decoration: line-through; text-decoration-color: var(--muted); }
.rv-day-act { flex: 1 1 140px; min-width: 0; color: var(--muted); font-size: 14px; }
.rv-daybody { padding: 0 12px 12px; }
.rv-daybody > p { margin: 8px 0; line-height: 1.5; }
.rv-list { padding-left: 20px; display: grid; gap: 4px; margin: 6px 0 10px; line-height: 1.45; }
.rv-food { font-size: 14px; }
.rv-food tr.rv-meal th { background: var(--mint); color: var(--ink); }
.rv-food tr.rv-tot th, .rv-food tr.rv-tot td { font-weight: 600; }
.rv-food th, .rv-food td { padding: 8px 10px; }
.rv-food td:first-child { width: 55%; }
.rv-food td small { display: block; margin-top: 2px; }
.rv-checkin { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--mint); border: 1px solid var(--line); }
.rv-checkin h4 { margin: 0 0 4px; font-size: 15px; }
.rv-checkin > .input { margin: 0 0 10px; }
.rv-check { display: flex; gap: 10px; align-items: center; min-height: 44px; margin: 0 0 6px; }
.rv-check input { width: 22px; height: 22px; flex: none; accent-color: var(--brand-ink); }
.rv-fooddb .rv-num { width: 76px; min-height: 40px; padding: 6px 8px; }
.rv-fooddb td { vertical-align: middle; }
.rv-saved { margin: 0 0 14px; }
.rv-save-row { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.rv-save-row .input { flex: 1; min-width: 0; }
.rv-plans { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.rv-plans li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rv-method p { line-height: 1.55; }
@media (max-width: 520px) { .rv-save-row { flex-wrap: wrap; } .rv-save-row .btn { width: 100%; } }
/* ---------- Cross Training → Gym → Train With Me (views/gym.js) ---------- */
/* "Cross Training" in the Training page's chip row, next to "My plans": the size of a chip, a flat gradient pill.
   Cyan on the left running into aqua green on the right, white text, a soft shadow of its own colour under it; no
   outline, no gloss. The colour reaches the very edge (background-origin: border-box): the gradient used to start
   again under the chip's transparent border and showed as a thin ring of another colour. A shade deeper than the
   pastel of the sample, so the white text is readable (contrast 4.6 on the left, 3.8 in the middle). */
:is(:root, :root[data-theme]) .chip.ct-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
  font-weight: 700; color: #FFFFFF; text-decoration: none; text-shadow: 0 1px 1px rgba(0, 50, 62, .35);
  border-color: transparent; background-origin: border-box; background-clip: border-box;
  background-image: linear-gradient(90deg, #0A7F9E 0%, #0C919D 52%, #0F9F8C 100%);
  box-shadow: 0 8px 16px -7px rgba(12, 145, 157, .7), 0 2px 4px rgba(10, 90, 110, .2); }
:is(:root, :root[data-theme]) .chip.ct-chip:hover { color: #FFFFFF; border-color: transparent; filter: brightness(1.05); box-shadow: 0 11px 20px -7px rgba(12, 145, 157, .85), 0 2px 4px rgba(10, 90, 110, .22); }
:is(:root, :root[data-theme]) .chip.ct-chip:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
:is(:root, :root[data-theme]) .chip.ct-chip svg { width: 16px; height: 16px; flex: none; }
.ct-tile-ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.ct-tile-ic svg { width: 26px; height: 26px; }
.ct-tile-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ct-tile-txt span { font-size: 13.5px; opacity: .92; }
.ct-banner-go { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.18); }
.ct-banner-go svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { :is(:root, :root[data-theme]) .chip.ct-chip::after { animation: none; } }
.ct-tiles { display: grid; gap: 12px; }
.ct-tile { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px; border-radius: var(--r-panel); color: #FFFFFF; text-decoration: none;
  background: linear-gradient(120deg, #F97316, #EF4444 55%, #DB2777); box-shadow: 0 10px 24px -12px rgba(239, 68, 68, .6); }
.ct-tile:hover { color: #FFFFFF; filter: brightness(1.05); }
.ct-tile-txt b { font-size: 18px; }

.gym-hero { position: relative; overflow: hidden; padding: 20px 18px 18px; margin: 0 0 16px; border-radius: var(--r-panel); color: #FFFFFF;
  background: radial-gradient(120% 90% at 100% 0%, rgba(244, 63, 94, .55), transparent 55%), linear-gradient(140deg, #0F172A 0%, #1E3A8A 55%, #6D28D9 100%); }
.gym-hero h2 { margin: 6px 0 4px; font-size: 24px; line-height: 1.25; color: #FFFFFF; }
.gym-hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.gym-hero-eyebrow svg { width: 16px; height: 16px; }
.gym-hero-sub { margin: 0 0 10px; font-size: 14px; color: rgba(255,255,255,.82); }
.gym-hero-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; font-weight: 600; }
.gym-hero-stats span { display: inline-flex; align-items: center; gap: 6px; }
.gym-hero-stats svg { width: 16px; height: 16px; opacity: .85; }
.gym-hero-how { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.88); }
.gym-saved { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.12); font-size: 14px; font-weight: 600; }
.gym-hero-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gym-hero .gym-restart { color: #FFFFFF; border-color: rgba(255,255,255,.45); background: transparent; }
.gym-start { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 26px; border: 0; border-radius: 999px;
  font: inherit; font-size: 18px; font-weight: 700; color: #FFFFFF; cursor: pointer; text-decoration: none;
  background: linear-gradient(115deg, #22C55E, #10B981 45%, #06B6D4); box-shadow: 0 10px 22px -8px rgba(16, 185, 129, .7); }
.gym-start svg { width: 22px; height: 22px; }
.gym-start:hover { color: #FFFFFF; filter: brightness(1.06); }
.gym-start:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.gym-start:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.gym-sched h2, .gym-guide h2 { margin-top: 0; }
.gym-list { list-style: none; margin: 0; padding: 0; display: grid; }
.gym-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gym-row:last-child { border-bottom: 0; }
.gym-thumb { flex: none; width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: transparent; border: 0; }
:root[data-theme="green"] .gym-thumb, :root[data-theme="marine"] .gym-thumb, :root[data-theme="dark"] .gym-thumb, :root[data-theme="glass"] .gym-thumb { background: #FFFFFF; }
.gym-thumb-none { display: grid; place-items: center; color: var(--muted); }
.gym-row-main { flex: 1; min-width: 0; }
.gym-row-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gym-row-time { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gym-row-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 4px; }
.gym-row-note { margin: 4px 0 0; }
.gym-guide dl { margin: 0; display: grid; gap: 4px; }
.gym-guide dt { font-weight: 700; margin-top: 8px; }
.gym-guide dd { margin: 0; color: var(--muted); line-height: 1.55; }

/* The workout screen: the whole window, above the app's bars. */
body.gym-on { overflow: hidden; }
.gym-play { position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; background: var(--mint); color: var(--ink);
  padding: calc(10px + var(--safe-t)) 16px calc(12px + var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
.gp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.gp-timer { display: grid; gap: 0; }
.gp-timer-total { text-align: right; }
.gp-num { font-family: var(--font-metric); font-size: 46px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.gp-timer-step .gp-num { color: var(--brand-ink); }
.gym-play[data-kind="rest"] .gp-timer-step .gp-num { color: #0284C7; }
.gym-play[data-kind="ready"] .gp-timer-step .gp-num { color: #D97706; }
.gp-cap { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-height: 18px; }
.gp-cap.gp-paused { color: var(--danger); }
.gp-top-mid { display: flex; gap: 6px; }
.gp-icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; }
.gp-icon-btn svg { width: 20px; height: 20px; }
.gp-icon-btn:focus-visible, .gp-ctl:focus-visible, .gp-main-btn:focus-visible, .gp-end:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* The picture takes the room that is left between the clocks and the text + buttons, and is drawn to fit that room
   (below). Before, it kept its own size (46% of the screen height) while its box was squeezed, so on an exercise with
   long notes it lay over the clocks above and the name below. The body never gets smaller than what is in it: on a
   very short screen the page scrolls instead. */
.gp-body { flex: 1 0 auto; display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.gp-media { flex: 1 1 0; display: grid; place-items: center; min-height: 160px; overflow: hidden; }
/* Rest: the box is as tall as the rest card needs (no picture to fit). */
.gym-play[data-kind="rest"] .gp-media { flex: 1 0 auto; overflow: visible; }
/* The exercise pictures sit straight on the page: no shadow, no frame. Their own background is white, so on the light
   themes the white is blended away (multiply: white takes the page's colour) and the drawing looks placed on the
   page. On the dark themes blending would turn the drawing black, so there the picture keeps a plain white tile. */
.gym-gif { display: grid; place-items: center; background: transparent; border-radius: 22px; overflow: hidden; }
.gym-gif img, img.gym-thumb { mix-blend-mode: multiply; }
/* the player's picture box is a world of its own for blending (it measures itself, see .gp-media below), so it
   carries the page's colour itself for the picture to blend with */
.gym-play .gp-media { background: var(--mint); }
:root[data-theme="green"] .gym-gif, :root[data-theme="marine"] .gym-gif, :root[data-theme="dark"] .gym-gif, :root[data-theme="glass"] .gym-gif { background: #FFFFFF; }
:root[data-theme="green"] :is(.gym-gif img, img.gym-thumb), :root[data-theme="marine"] :is(.gym-gif img, img.gym-thumb),
:root[data-theme="dark"] :is(.gym-gif img, img.gym-thumb), :root[data-theme="glass"] :is(.gym-gif img, img.gym-thumb) { mix-blend-mode: normal; }
.gym-gif img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gym-gif-lg { width: min(100%, 34vh, 520px); aspect-ratio: 1; }   /* old browsers: a size that fits most screens */
/* The square picture is as large as its box allows, in both directions (cqw / cqh: the box's own width and height). */
@supports (width: 1cqh) {
  .gym-play:not([data-kind="rest"]) .gp-media { container-type: size; }
  .gym-gif-lg { width: min(100cqw, 100cqh, 520px); }
}
.gym-gif-sm { width: 64px; height: 64px; border-radius: 12px; box-shadow: none; flex: none; }
.gym-gif-none { display: grid; justify-items: center; gap: 6px; padding: 16px; color: #5B6F6A; font-size: 14px; text-align: center; }
.gym-gif-none svg { width: 32px; height: 32px; }
.gym-play.is-paused .gym-gif img { filter: grayscale(.6); opacity: .75; }
.gp-info { display: grid; gap: 6px; text-align: center; }
.gp-name { margin: 0; font-size: 26px; line-height: 1.2; }
.gp-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gp-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 3px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.gp-chip-set { background: var(--emerald); border-color: transparent; color: var(--on-accent); }
.gp-chip-ready { background: #F59E0B; border-color: transparent; color: #1F1300; }
.gp-chip-soft { color: var(--muted); font-weight: 500; }
.gp-notes { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); max-width: 560px; justify-self: center; }
.gp-next { display: inline-flex; gap: 8px; align-items: baseline; justify-content: center; font-size: 14px; color: var(--muted); }
.gp-next small { text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.gp-next b { color: var(--ink); }
.gp-bottom { display: grid; gap: 10px; }
.gp-prog .progress { height: 10px; margin: 0 0 4px; }
.gp-prog .progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22C55E, #06B6D4, #8B5CF6); transition: width .25s linear; }
.gp-prog-txt { font-size: 13.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.gp-ctls { display: flex; justify-content: center; align-items: center; gap: 22px; }
.gp-ctl { display: grid; justify-items: center; gap: 2px; min-width: 64px; min-height: 56px; padding: 6px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; border-radius: 14px; }
.gp-ctl svg { width: 28px; height: 28px; }
.gp-main-btn { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer; color: #FFFFFF;
  background: linear-gradient(135deg, #10B981, #0EA5E9); box-shadow: 0 10px 24px -8px rgba(14, 165, 233, .7); }
.gp-main-btn svg { width: 32px; height: 32px; }
.gym-play.is-paused .gp-main-btn { background: linear-gradient(135deg, #F59E0B, #EF4444); box-shadow: 0 10px 24px -8px rgba(239, 68, 68, .6); }
.gp-end { justify-self: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; }

/* Rest: a water bottle, gently breathing rings. */
.gp-rest { display: grid; justify-items: center; gap: 6px; text-align: center; width: min(100%, 520px); padding: 18px 16px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(14, 165, 233, .16), rgba(16, 185, 129, .12)); border: 1px solid var(--line); }
.gp-rest b { font-size: 18px; }
.gp-rest p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 380px; }
.gp-rest-art { width: min(52vw, 26vh, 190px); aspect-ratio: 1; }
.gp-rest-art svg { width: 100%; height: 100%; overflow: visible; }
.gr-ring { fill: none; stroke: #38BDF8; stroke-width: 3; opacity: .5; transform-origin: 80px 80px; animation: gr-breathe 5s ease-in-out infinite; }
.gr-ring-2 { stroke: #34D399; animation-delay: -2.5s; }
.gr-bottle { fill: rgba(255,255,255,.75); stroke: #0284C7; stroke-width: 3; }
.gr-cap { fill: #0284C7; }
.gr-water { fill: #38BDF8; animation: gr-wave 2.6s linear infinite; }
.gr-bub { fill: rgba(255,255,255,.85); animation: gr-bubble 2.4s ease-in infinite; }
.gr-bub-2 { animation-delay: .8s; } .gr-bub-3 { animation-delay: 1.6s; }
.gr-shine { stroke: rgba(255,255,255,.9); stroke-width: 3; stroke-linecap: round; fill: none; }
@keyframes gr-breathe { 0%, 100% { transform: scale(.86); opacity: .25; } 50% { transform: scale(1.04); opacity: .7; } }
@keyframes gr-wave { from { transform: translateX(0); } to { transform: translateX(60px); } }
@keyframes gr-bubble { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-62px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gr-ring, .gr-water, .gr-bub { animation: none; } }
.gp-rest-next { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.gp-rest-next span { display: grid; }
.gp-rest-next small { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

.gp-done { flex: 1; display: grid; align-content: center; justify-items: center; gap: 12px; text-align: center; padding: 20px 0; }
.gp-done h1 { margin: 0; font-size: 26px; }
.gp-done p { margin: 0; max-width: 420px; color: var(--muted); }
.gp-done-badge { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; color: #FFFFFF; background: linear-gradient(135deg, #F59E0B, #F43F5E 60%, #8B5CF6); box-shadow: 0 14px 30px -12px rgba(244, 63, 94, .7); }
.gp-done-badge svg { width: 46px; height: 46px; }
.gp-done-stats { display: flex; gap: 28px; }
.gp-done-stats div { display: grid; }
.gp-done-stats b { font-family: var(--font-metric); font-size: 38px; line-height: 1.05; }
.gp-done-stats span { font-size: 13px; color: var(--muted); }

/* Wide screens and phones on their side: picture on the left, the rest on the right. */
@media (min-width: 900px), (orientation: landscape) and (max-height: 560px) {
  .gp-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px 24px; align-items: center; }
  .gp-media { grid-row: 1 / span 2; align-self: stretch; }
  .gym-gif-lg { width: min(100%, 60vh, 620px); }
  @supports (width: 1cqh) { .gym-gif-lg { width: min(100cqw, 100cqh, 620px); } }
  .gp-done { grid-column: 1 / -1; }
}
@media (max-width: 380px) { .gp-num { font-size: 38px; } .gp-name { font-size: 22px; } .gp-ctls { gap: 12px; } }
/* Short phones, upright: a smaller rest card, so the buttons under it stay on the screen. */
@media (max-height: 720px) and (orientation: portrait) {
  .gp-rest { padding: 12px 14px; gap: 4px; }
  .gp-rest-art { width: min(40vw, 12vh, 150px); }
}

/* ===== GLASS-GEN start: made by glasstheme.cjs from the dark theme, do not edit by hand ===== */
:root[data-theme="glass"] select.input {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23BFF5E2' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, color-mix(in srgb, var(--brand-ink) 22%, transparent) 0 15px, transparent 16px),
    linear-gradient(180deg, var(--card), color-mix(in srgb, var(--brand-ink) 8%, var(--card)));
}
:root[data-theme="glass"] .rec {
  --gps-search-bg: rgba(251, 146, 60, .2); --gps-search-ink: #FDBA74;
  --gps-ready-bg: rgba(74, 222, 128, .18); --gps-ready-ink: #86EFAC; --gps-ready-glow: rgba(74, 222, 128, .55);
}
:root[data-theme="glass"] .evt-pick-other { color: #F59E0B !important; }
:root[data-theme="glass"] .badge.req-accepted, :root[data-theme="glass"] .badge.req-paid { background: #1B2E4A; color: #9CC6FF; }
:root[data-theme="glass"] .game-card h2 { color: color-mix(in srgb, var(--g2) 70%, #fff); }
:root[data-theme="glass"] .game-card {
  background: linear-gradient(170deg, color-mix(in srgb, var(--g1) 22%, var(--card)), var(--card) 75%); }
:root[data-theme="glass"] .badge.ev-tag-race { background: rgba(248, 113, 113, .16); color: #FCA5A5; }
:root[data-theme="glass"] .badge.ev-tag-bib { background: rgba(124, 200, 242, .16); color: #9FD3F5; }
:root[data-theme="glass"] .badge.ev-tag-cert { background: rgba(242, 183, 5, .16); color: #F5CD5B; }
:root[data-theme="glass"] {
  color-scheme: dark;
  --bar: #0F1E2E;
  --mint: #0F1E2E;
  --mint-2: #22394F;
  --ink: #F2F5F8;
  --muted: #A9B8C8;
  --line: #2F4A66;
  --card: #1B2F44;
  --emerald: #FF7A2F;
  --emerald-2: #F25F1C;
  --brand-ink: #FFA066;
  --brand-ink-strong: #FFBE8F;
  --btn-bg: #FF7A2F;
  --btn-bg-hover: #FF9450;
  --ok-bg: #3A2A20;
  --on-brand: #2A1004;
  --on-accent: #2A1004;
  --danger: #FF8A80;
  --danger-bg: #3A1D1D;
  --warn: #FFD27A;
  --warn-bg: #3A2F12;
  --run-1: #FF8A3D;
  --run-2: #F2581A;
  --shadow-lift: 0 14px 30px -14px rgba(0, 0, 0, .85);
  --series-run: #FF7A2F; --series-ride: #4EA8FF; --series-walk: #3DD68C;
  /* the three gradients of the theme */
  --dk-page: linear-gradient(180deg, #0B1724 0%, #0F1E2E 30%, #172A3E 70%, #1E3449 100%);
  --dk-card: linear-gradient(155deg, #2A4560 0%, #1D3247 48%, #172A3E 100%);
  --dk-ash: linear-gradient(180deg, #29425B, #203750);
  --dk-orange: linear-gradient(180deg, #FFA25E 0%, #FF7A2F 50%, #F2581A 100%);
  --dk-edge: rgba(255, 255, 255, .08);
  --dk-glow: 0 10px 24px -12px rgba(255, 122, 47, .7);
  /* icon colours on dark tiles (like the colourful icons of the pictures) */
  --dk-i1: #FFA066; --dk-i2: #5CB8FF; --dk-i3: #4BDC97; --dk-i4: #FF7A8A; --dk-i5: #B99BFF;
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 14px 30px -20px rgba(0, 0, 0, .9);
}
:root[data-theme="glass"] body { background: #0F1E2E; }
:root[data-theme="glass"] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--dk-page); }
:root[data-theme="glass"] body::after { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 260px; z-index: -1; pointer-events: none;
  background: radial-gradient(90% 100% at 50% 0%, rgba(255, 122, 47, .13), transparent 70%); }
:root[data-theme="glass"] .topbar { background: rgba(11, 23, 36, .78); border-bottom: 0; }
:root[data-theme="glass"] .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 47, .55) 30%, rgba(255, 255, 255, .12) 70%, transparent); }
:root[data-theme="glass"] .topbar .menu-btn:hover, :root[data-theme="glass"] .icon-btn:hover { background: #29425B; }
:root[data-theme="glass"] .bell-badge { background: var(--emerald-2); color: #fff; }
:root[data-theme="glass"] .lang-toggle { background: var(--dk-orange); border: 0; color: var(--on-brand); box-shadow: var(--dk-glow); }
:root[data-theme="glass"] .drawer, :root[data-theme="glass"] .rail { background: linear-gradient(180deg, #182C41, #0E1C2C); }
:root[data-theme="glass"] .rail { border-right: 1px solid var(--dk-edge); }
:root[data-theme="glass"] .drawer-head { color: var(--ink);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 122, 47, .35), transparent 60%), linear-gradient(135deg, #29425B, #11233A); border-bottom: 1px solid var(--dk-edge); }
:root[data-theme="glass"] .drawer-head small { color: var(--muted); }
:root[data-theme="glass"] .nav-group + .nav-group { border-top-color: var(--dk-edge); }
:root[data-theme="glass"] .nav-item:hover { background: rgba(255, 255, 255, .05); }
:root[data-theme="glass"] .nav-item[aria-current="page"] { background: linear-gradient(90deg, rgba(255, 122, 47, .24), rgba(255, 122, 47, .06)); color: var(--brand-ink); box-shadow: inset 3px 0 0 var(--emerald); }
:root[data-theme="glass"] .rail-run { background: var(--dk-card); border: 1px solid var(--dk-edge); }
:root[data-theme="glass"] .bottombar { background: linear-gradient(180deg, #1E3449, #142639); border-top-color: var(--dk-edge); }
:root[data-theme="glass"] .run-disc { background: radial-gradient(circle at 32% 26%, #FFB27A, #FF7A2F 48%, #E0520F); color: var(--on-brand);
  box-shadow: 0 12px 26px -8px rgba(255, 122, 47, .75), 0 0 0 5px #1E3449; }
:root[data-theme="glass"] .tab-run[aria-current="page"] span.lbl { color: var(--brand-ink); }
:root[data-theme="glass"] .panel, :root[data-theme="glass"] .event-card, :root[data-theme="glass"] .fr-card, :root[data-theme="glass"] .content-card, :root[data-theme="glass"] .act-item, :root[data-theme="glass"] .sh-card, :root[data-theme="glass"] .kpi, :root[data-theme="glass"] .stat-grid div, :root[data-theme="glass"] .ch-card, :root[data-theme="glass"] .ch-row, :root[data-theme="glass"] .cl-hero, :root[data-theme="glass"] .cl-row, :root[data-theme="glass"] .about-item, :root[data-theme="glass"] .pf-hero, :root[data-theme="glass"] .cl-ladder, :root[data-theme="glass"] .cl-tiles > div, :root[data-theme="glass"] .notif-item, :root[data-theme="glass"] .notif-page, :root[data-theme="glass"] .sources, :root[data-theme="glass"] .answer, :root[data-theme="glass"] .ask-card, :root[data-theme="glass"] .tool-card, :root[data-theme="glass"] .ev-action, :root[data-theme="glass"] .table-wrap, :root[data-theme="glass"] .an-choice {
  background: var(--dk-card); border-color: var(--dk-edge); box-shadow: var(--card-shadow);
}
:root[data-theme="glass"] .event-card:hover, :root[data-theme="glass"] .content-card:hover, :root[data-theme="glass"] .act-item:hover, :root[data-theme="glass"] .tool-card:hover, :root[data-theme="glass"] .cl-row:hover, :root[data-theme="glass"] .ev-action:hover { border-color: rgba(255, 160, 102, .45); box-shadow: var(--card-shadow), 0 0 0 1px rgba(255, 160, 102, .12); }
:root[data-theme="glass"] .ask-card, :root[data-theme="glass"] .pf-hero, :root[data-theme="glass"] .kpi-grid .kpi:first-child, :root[data-theme="glass"] .ch-card.done {
  background: radial-gradient(130% 120% at 0% 0%, rgba(255, 122, 47, .26), transparent 55%), var(--dk-card); border-color: rgba(255, 160, 102, .32); }
:root[data-theme="glass"] .ask-card:focus-within { border-color: var(--brand-ink); }
:root[data-theme="glass"] .event-card.is-done { border-color: rgba(75, 220, 151, .45); }
:root[data-theme="glass"] .btn:not(.btn-quiet):not(.btn-danger):not(.btn-dark):not(.btn-google):not(.btn-run) { background: var(--dk-orange); color: var(--on-brand); border: 0; box-shadow: var(--dk-glow); }
:root[data-theme="glass"] .btn:not(.btn-quiet):not(.btn-danger):not(.btn-dark):not(.btn-google):not(.btn-run):hover { filter: brightness(1.07); }
:root[data-theme="glass"] .btn-run { background: var(--dk-orange); color: var(--on-brand); box-shadow: var(--dk-glow); }
:root[data-theme="glass"] .btn-quiet { background: var(--dk-ash); color: var(--ink); border: 1px solid rgba(255, 255, 255, .12); }
:root[data-theme="glass"] .btn-quiet:hover { background: #2F4A66; border-color: rgba(255, 160, 102, .45); }
:root[data-theme="glass"] .btn-dark { background: #FFFFFF; color: #0F1E2E; }
:root[data-theme="glass"] .btn-danger { background: transparent; }
:root[data-theme="glass"] .chip-btn, :root[data-theme="glass"] .voice-btn { background: var(--dk-ash); border-color: rgba(255, 255, 255, .12); }
:root[data-theme="glass"] .voice-btn .dot { background: var(--dk-orange); }
:root[data-theme="glass"] .input, :root[data-theme="glass"] textarea.input { background-color: #172A3D; border: 1px solid rgba(255, 255, 255, .1); }
:root[data-theme="glass"] input[type="search"].input { background-color: #1D3247; border: 1px solid rgba(255, 255, 255, .1); }
:root[data-theme="glass"] .input:focus, :root[data-theme="glass"] input[type="search"].input:focus { border-color: var(--brand-ink); background-color: #1D3247; outline: 2px solid rgba(255, 122, 47, .3); outline-offset: 0; }
:root[data-theme="glass"] select.input { border-color: rgba(255, 255, 255, .12); box-shadow: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%231A1106' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    radial-gradient(circle, #FF7A2F 0 14px, transparent 15px),
    var(--dk-ash); }
:root[data-theme="glass"] select.input:focus { border-color: var(--brand-ink); box-shadow: 0 0 0 3px rgba(255, 122, 47, .25); }
:root[data-theme="glass"] select.input option { background: #1B2F44; }
:root[data-theme="glass"] .chip, :root[data-theme="glass"] .tabs a, :root[data-theme="glass"] .sugg { background: var(--dk-ash); border-color: rgba(255, 255, 255, .1); color: var(--ink); }
:root[data-theme="glass"] .chip:hover, :root[data-theme="glass"] .tabs a:hover, :root[data-theme="glass"] .sugg:hover { border-color: rgba(255, 160, 102, .5); color: var(--ink); }
:root[data-theme="glass"] .chip[aria-pressed="true"], :root[data-theme="glass"] .tabs a[aria-current="page"] { background: var(--dk-orange); color: var(--on-brand); border-color: transparent; font-weight: 700; box-shadow: var(--dk-glow); }
:root[data-theme="glass"] .top-tabs { background: rgba(15, 30, 46, .9); backdrop-filter: blur(10px); border-bottom-color: var(--dk-edge); }
:root[data-theme="glass"] .top-tabs button[aria-selected="true"], :root[data-theme="glass"] .top-tabs a[aria-current="page"] { color: var(--brand-ink); border-bottom-color: var(--emerald); }
:root[data-theme="glass"] .badge { background: #29425B; color: #CFDAE6; }
:root[data-theme="glass"] .badge.ok { background: var(--dk-orange); color: var(--on-brand); font-weight: 700; }
:root[data-theme="glass"] .badge.warn { background: var(--warn-bg); color: var(--warn); }
:root[data-theme="glass"] .notice { background: #3A2A20; border: 1px solid rgba(255, 160, 102, .22); }
:root[data-theme="glass"] .notice.error { background: var(--danger-bg); border-color: rgba(255, 138, 128, .3); }
:root[data-theme="glass"] .notice.warn { background: var(--warn-bg); border-color: rgba(255, 210, 122, .25); }
:root[data-theme="glass"] .ev-action-ic, :root[data-theme="glass"] .tool-icon, :root[data-theme="glass"] .about-ico, :root[data-theme="glass"] .info-ic, :root[data-theme="glass"] .cl-circle-ico, :root[data-theme="glass"] .act-thumb-icon, :root[data-theme="glass"] .an-choice-ic {
  background: linear-gradient(160deg, #2F4A66, #1D1D20); border: 1px solid rgba(255, 255, 255, .09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px -8px rgba(0, 0, 0, .8); color: var(--dk-i1); }
:root[data-theme="glass"] .ev-action:nth-child(4n+1) .ev-action-ic { background: var(--dk-orange); color: var(--on-brand); border-color: transparent; }
:root[data-theme="glass"] .ev-action:nth-child(4n+2) .ev-action-ic, :root[data-theme="glass"] .tool-card:nth-child(5n+2) .tool-icon, :root[data-theme="glass"] .about-item:nth-child(5n+2) .about-ico, :root[data-theme="glass"] .info-row:nth-child(5n+2) .info-ic, :root[data-theme="glass"] .cl-circle:nth-child(5n+2) .cl-circle-ico, :root[data-theme="glass"] .an-choice:nth-child(3n+2) .an-choice-ic { color: var(--dk-i2); }
:root[data-theme="glass"] .ev-action:nth-child(4n+3) .ev-action-ic, :root[data-theme="glass"] .tool-card:nth-child(5n+3) .tool-icon, :root[data-theme="glass"] .about-item:nth-child(5n+3) .about-ico, :root[data-theme="glass"] .info-row:nth-child(5n+3) .info-ic, :root[data-theme="glass"] .cl-circle:nth-child(5n+3) .cl-circle-ico, :root[data-theme="glass"] .an-choice:nth-child(3n+3) .an-choice-ic { color: var(--dk-i3); }
:root[data-theme="glass"] .ev-action:nth-child(4n+4) .ev-action-ic, :root[data-theme="glass"] .tool-card:nth-child(5n+4) .tool-icon, :root[data-theme="glass"] .about-item:nth-child(5n+4) .about-ico, :root[data-theme="glass"] .info-row:nth-child(5n+4) .info-ic, :root[data-theme="glass"] .cl-circle:nth-child(5n+4) .cl-circle-ico { color: var(--dk-i4); }
:root[data-theme="glass"] .tool-card:nth-child(5n+5) .tool-icon, :root[data-theme="glass"] .about-item:nth-child(5n+5) .about-ico, :root[data-theme="glass"] .info-row:nth-child(5n+5) .info-ic, :root[data-theme="glass"] .cl-circle:nth-child(5n+5) .cl-circle-ico { color: var(--dk-i5); }
:root[data-theme="glass"] .act-thumb-icon.run { color: var(--dk-i1); }
:root[data-theme="glass"] .act-thumb-icon.ride { color: var(--dk-i2); }
:root[data-theme="glass"] .act-thumb-icon.walk { color: var(--dk-i3); }
:root[data-theme="glass"] .cl-circle.danger .cl-circle-ico { color: var(--danger); }
:root[data-theme="glass"] .sh-price { color: var(--brand-ink); font-weight: 800; }
:root[data-theme="glass"] .kpi dd b, :root[data-theme="glass"] .cl-tiles b { color: var(--brand-ink); }
:root[data-theme="glass"] .split-track i, :root[data-theme="glass"] .ch-bar i, :root[data-theme="glass"] .sb-track i, :root[data-theme="glass"] .source .bar i { background: var(--dk-orange); }
:root[data-theme="glass"] .sh-card .btn:not(.btn-quiet) { background: #FFFFFF; color: #0F1E2E; box-shadow: none; }
:root[data-theme="glass"] .modal { background: linear-gradient(160deg, #253D55, #172A3D); border: 1px solid var(--dk-edge); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); }
:root[data-theme="glass"] .modal-scrim, :root[data-theme="glass"] .scrim { background: rgba(0, 0, 0, .62); }
:root[data-theme="glass"] .act-pop { background: #1D3247; color: #fff; border: 1px solid var(--dk-edge); box-shadow: var(--shadow-lift); }
:root[data-theme="glass"] .act-pop-item svg { color: var(--muted); }
:root[data-theme="glass"] .act-pop-item:hover, :root[data-theme="glass"] .act-pop-item:focus-visible { background: rgba(255, 122, 47, .16); color: var(--brand-ink); }
:root[data-theme="glass"] .act-pop-item:hover svg, :root[data-theme="glass"] .act-pop-item:focus-visible svg { color: var(--brand-ink); }
:root[data-theme="glass"] .toast { background: #F2F5F8; color: #0F1E2E; }
:root[data-theme="glass"] table.data th { background: #22394F; }
:root[data-theme="glass"] .rec, :root[data-theme="glass"] .rec-panel { background: #13253A; }
:root[data-theme="glass"] .rec-panel { border-top: 1px solid var(--dk-edge); }
:root[data-theme="glass"] .start-disc { box-shadow: 0 14px 28px -10px rgba(255, 122, 47, .75); }
:root[data-theme="glass"] .map-locate, :root[data-theme="glass"] .map-note { background: #1D3247; border: 1px solid var(--dk-edge); }
:root[data-theme="glass"] .af-btn[aria-expanded="true"], :root[data-theme="glass"] .af-btn[aria-pressed="true"] {
  color: #0B1712;
  background: linear-gradient(135deg, #FFFFFF, color-mix(in srgb, var(--emerald) 30%, #FFFFFF));
  box-shadow: 0 3px 12px -4px color-mix(in srgb, var(--emerald) 55%, transparent);
}
:root[data-theme="glass"] .drawer-head { background: radial-gradient(120% 140% at 0% 0%, rgba(255, 122, 47, .35), transparent 60%), linear-gradient(135deg, #29425B, #11233A); }
:root[data-theme="glass"] .chip:not(.af-btn)[aria-pressed="true"], :root[data-theme="glass"] .tabs a[aria-current="page"], :root[data-theme="glass"] .chip:not(.af-btn)[aria-pressed="true"]:hover, :root[data-theme="glass"] .tabs a[aria-current="page"]:hover {
  background: var(--dk-orange); border-color: transparent; color: var(--on-brand); box-shadow: var(--dk-glow);
}
:root[data-theme="glass"] .segmented button[aria-pressed="true"] { background: var(--dk-orange); color: var(--on-brand); }
:root[data-theme="glass"] .metric-avg b .pc-colon { color: #FFFFFF; }
:root[data-theme="glass"] .cp-share-act { background: rgba(249, 115, 22, .2); color: #FDBA74; }
:root[data-theme="glass"] .cp-share-pic { background: rgba(59, 130, 246, .22); color: #93C5FD; }
:root[data-theme="glass"] .rw-bar i.run { color: var(--on-brand); }
/* ===== GLASS-GEN end ===== */
/* ===== Glass theme (গ্লাস): hand-made rules on top of the generated copy of the dark theme above. From the navy
   "glass" pictures: a deep navy page lit by soft steel-blue light, see-through blue-grey glass cards with a thin
   white edge, and the orange gradient (a glowing orange ball for the round buttons) for the main actions.
   Cards are see-through gradients without a blur (many blurred cards make phones slow); only the top bar,
   the bottom bar and pop-ups are frosted. ===== */
:root[data-theme="glass"] {
  --bar: #0F1E2E;
  --dk-page: radial-gradient(120% 60% at 92% 0%, rgba(112, 152, 192, .42), transparent 60%),
    radial-gradient(90% 55% at 0% 52%, rgba(78, 118, 158, .32), transparent 65%),
    radial-gradient(110% 50% at 60% 100%, rgba(142, 166, 192, .22), transparent 70%),
    linear-gradient(180deg, #0F1E2E 0%, #142740 40%, #1A3149 75%, #203A55 100%);
  --dk-card: linear-gradient(155deg, rgba(150, 180, 210, .24) 0%, rgba(95, 128, 162, .16) 50%, rgba(45, 72, 102, .32) 100%);
  --dk-ash: linear-gradient(180deg, rgba(140, 170, 200, .22), rgba(90, 120, 155, .16));
  --dk-orange: linear-gradient(180deg, #FF9A50 0%, #FF7A2F 50%, #F25F1C 100%);
  --dk-edge: rgba(255, 255, 255, .13);
  --dk-glow: 0 10px 24px -10px rgba(255, 122, 47, .75);
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 18px 36px -22px rgba(3, 10, 20, .9);
  --shadow-lift: 0 18px 36px -16px rgba(3, 10, 20, .9);
  --gl-ball: radial-gradient(circle at 34% 28%, #FFC891, #FF7A2F 46%, #E5500F);
  --gl-blur: blur(18px) saturate(140%);
  --series-ride: #6FB7FF;
}
:root[data-theme="glass"] body { background: #0F1E2E; }
:root[data-theme="glass"] body::after { background: radial-gradient(80% 100% at 50% 0%, rgba(255, 122, 47, .07), transparent 70%); }
/* bars and pop-ups: frosted glass */
:root[data-theme="glass"] .topbar { background: rgba(15, 30, 46, .62); -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur); }
:root[data-theme="glass"] .bottombar { background: rgba(22, 40, 60, .74); -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur); }
:root[data-theme="glass"] .drawer, :root[data-theme="glass"] .rail { background: linear-gradient(180deg, #1E344C, #0F1E2E); }
:root[data-theme="glass"] .drawer-head { background: radial-gradient(120% 140% at 0% 0%, rgba(255, 122, 47, .32), transparent 60%), linear-gradient(135deg, #2A4560, #13253A); }
:root[data-theme="glass"] .modal { background: linear-gradient(160deg, rgba(52, 80, 110, .94), rgba(22, 40, 60, .96)); -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur); }
:root[data-theme="glass"] .modal-scrim, :root[data-theme="glass"] .scrim { background: rgba(6, 14, 24, .6); }
/* the round run button: the picture's glowing orange ball */
:root[data-theme="glass"] .run-disc { background: var(--gl-ball); box-shadow: 0 12px 26px -8px rgba(255, 122, 47, .8), 0 0 0 5px rgba(22, 40, 60, .9); }
:root[data-theme="glass"] .start-disc { background: var(--gl-ball); }
/* quiet buttons, chips and inputs: glass pills with a white edge */
:root[data-theme="glass"] .btn-quiet, :root[data-theme="glass"] .chip, :root[data-theme="glass"] .tabs a, :root[data-theme="glass"] .sugg { border-color: rgba(255, 255, 255, .14); }
:root[data-theme="glass"] .input, :root[data-theme="glass"] textarea.input, :root[data-theme="glass"] input[type="search"].input { background-color: rgba(10, 22, 36, .45); border-color: rgba(255, 255, 255, .14); }
:root[data-theme="glass"] select.input option { background: #1B2F44; }
:root[data-theme="glass"] .toast { background: #F2F5F8; color: #0F1E2E; }

/* ---------- Activity list card (views/activities.js activityHeroCard): a big map, a glass pill on it, a card under it ---------- */
/* the map card in a pop-up (opened from the list): no frame of its own, a round close button on the map */
/* "⋯" under the ×: the same round frosted button; its dropdown opens down and to the left */

/* ---------- Record Analysis: distance milestones (views/stats.js distClassesPanel) ---------- */
.dc-panel h2 svg { width: 20px; height: 20px; vertical-align: -3px; color: var(--run-1); }
.dc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dc-tile { position: relative; display: grid; align-content: start; gap: 3px; min-width: 0; padding: 14px 12px 12px; border-radius: 16px; background: var(--mint-2); overflow: hidden; }
.dc-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--emerald); }
/* ultra distances (50 km and more): the orange run gradient */
.dc-tile.dc-50k::before, .dc-tile.dc-100k::before, .dc-tile.dc-100mi::before, .dc-tile.dc-200k::before { background: linear-gradient(90deg, var(--run-1), var(--run-2)); }
.dc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.dc-name { font-size: 15.5px; line-height: 1.3; min-width: 0; }
.dc-count { flex: none; font-family: var(--font-metric); font-size: 28px; font-weight: 700; line-height: 1; color: var(--brand-ink); }
.dc-tile small { font-size: 13px; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.dc-range { color: var(--muted); }
.dc-last { color: var(--muted); }
.dc-tile a { color: var(--brand-ink); }
@media (min-width: 760px) { .dc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
:root[data-theme="dark"] .dc-tile, :root[data-theme="glass"] .dc-tile { background: var(--dk-ash); border: 1px solid var(--dk-edge); }

/* Notifications (the page and the bell's list): a plain sheet, no cards. Rows sit straight on the page with a thin line
   between them; unread ones keep the bold text, the filled icon and the red dot. Last in the file so it wins in every theme. */
:is(:root, :root[data-theme]) .notif-page { background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0; gap: 0; }
:is(:root, :root[data-theme]) .notif-item { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
:is(:root, :root[data-theme]) .notif-page .notif-item + .notif-item, :is(:root, :root[data-theme]) .notif-list .notif-item + .notif-item { border-top: 1px solid var(--line); }
:is(:root, :root[data-theme]) .notif-item:hover, :is(:root, :root[data-theme]) .notif-item:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); }
/* ---------- Pressed state (every theme) ----------
   A finger never gives :hover and the grey tap flash is switched off (-webkit-tap-highlight-color), so a tap used to
   show nothing until the page changed. Everything tappable now answers at once: buttons dip a little, cards dim,
   rows and tabs get a tint. brightness() works on any colour, so one block serves all eight themes.
   A card does not dip when one of its own buttons (love, share, "⋯") is the thing being pressed. */
:where(.btn, .icon-btn, .chip, .tab, .nav-item, .lang-toggle, .act-item, .notif-item, .stat-row, .event-card, .content-card, .plan-card, .tool-card,
  .act-pop-item, .mode-chip, .gp-ctl, .gp-main-btn, .gp-icon-btn, .rg-choice) { touch-action: manipulation; }
:is(:root, :root[data-theme]) :is(.btn, .icon-btn, .chip, .lang-toggle, .mode-chip, .gp-ctl, .gp-main-btn, .gp-icon-btn, .donate-cta):active:not(:disabled) { transform: scale(.96); filter: brightness(.92); }
:is(:root, :root[data-theme]) :is(.act-item, .event-card, .content-card, .plan-card, .tool-card):active:not(:has(button:active)) { transform: scale(.985); filter: brightness(.95); }
:is(:root, :root[data-theme]) .rg-choice:active > span { transform: scale(.985); filter: brightness(.95); }
:is(:root, :root[data-theme]) :is(.nav-item, .notif-item, .stat-row, .act-pop-item, .tab:not(.tab-run)):active { background: color-mix(in srgb, var(--ink) 10%, transparent); }

/* ---------- A page is loading ----------
   A thin bar along the top edge while a tapped page is on its way (app.js pageBusy). It appears after a moment, so a
   page that opens at once shows no flash. With "reduce motion" it does not travel: it is a still, half-clear line. */
.nav-progress { position: fixed; z-index: 3000; top: 0; left: 0; right: 0; height: calc(3px + var(--safe-t)); padding-top: var(--safe-t); overflow: hidden; pointer-events: none;
  opacity: 0; animation: nav-progress-show 0s linear .12s forwards; }
.nav-progress[hidden] { display: none; }
.nav-progress i { display: block; height: 3px; width: 40%; border-radius: 3px; background: var(--brand-ink); animation: nav-progress-run 1.1s ease-in-out infinite; }
@keyframes nav-progress-show { to { opacity: 1; } }
@keyframes nav-progress-run { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .nav-progress { opacity: .6; } .nav-progress i { width: 100%; } }
/* ---------- A page that could not load (app.js errorState) ---------- */
.err-state { display: grid; justify-items: center; gap: 8px; }
.err-state .err-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.err-state .err-ico svg { width: 26px; height: 26px; }
.err-state h2 { margin: 4px 0 0; }
.err-state p { margin: 0; max-width: 420px; color: var(--muted); }
.err-state .btn { margin-top: 8px; min-width: 180px; }
.err-state .btn[aria-busy="true"] svg { animation: err-spin .8s linear infinite; }
@keyframes err-spin { to { transform: rotate(360deg); } }
/* ---------- The app's own dialog (dialog.js openDialog / confirmSheet) ----------
   A card in the middle on wide screens; on a phone a sheet that rises from the bottom edge, with its buttons where the
   thumb is. The red "yes" of a question that deletes something is filled, so it cannot be mistaken for "no". */
.dlg { width: min(440px, 100%); padding: 20px; display: grid; gap: 12px; }
.dlg-title { margin: 0; font-size: 19px; line-height: 1.3; }
.dlg-body { display: grid; gap: 8px; }
.dlg-body p { margin: 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.dlg-confirm .dlg-body p:first-child { font-weight: 600; }
.dlg-btns { justify-content: flex-end; margin-top: 4px; }
.dlg-btns .btn { min-width: 110px; justify-content: center; }
:is(:root, :root[data-theme]) .dlg-btns .btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
:root[data-theme="green"] .dlg-btns .btn-danger, :root[data-theme="marine"] .dlg-btns .btn-danger, :root[data-theme="dark"] .dlg-btns .btn-danger, :root[data-theme="glass"] .dlg-btns .btn-danger { color: #1A0B0B; }
.dlg-scrim { animation: dlg-fade .14s ease-out; }
.dlg-scrim .dlg { animation: dlg-pop .16s ease-out; }
@keyframes dlg-fade { from { opacity: 0; } }
@keyframes dlg-pop { from { opacity: 0; transform: scale(.96); } }
@media (max-width: 600px) {
  .dlg-scrim { place-items: end center; padding: 0; }
  .dlg-scrim .dlg { width: 100%; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + var(--safe-b)); animation-name: dlg-rise; }
  .dlg-btns { display: grid; grid-template-columns: 1fr 1fr; }
  .dlg-btns .btn { min-width: 0; min-height: 50px; }
}
@keyframes dlg-rise { from { transform: translateY(100%); } }
/* ---------- Toast: a tap dismisses it; an action button ("Undo") sits at its right ---------- */
.toast { cursor: pointer; animation: toast-in .16s ease-out; }
.toast.has-action { display: flex; align-items: center; gap: 12px; padding-right: 8px; }
.toast.has-action > span { flex: 1; min-width: 0; }
.toast-act { flex: none; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--mint) 45%, transparent); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- The theme picker in its dialog: two columns of full-width choices ---------- */
.dlg .theme-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg .theme-pick button { width: 100%; min-height: 48px; }

/* ---------- Small buttons on an activity card: a 44px place to tap, the same look ----------
   Share and "⋯" are drawn 32px and the heart 30px tall; the invisible ring around each makes the tap area 44px. */
.act-card-actions .act-qshare, .act-card-actions .act-menu-btn, .act-card-actions .act-love { position: relative; }
.act-card-actions .act-qshare::after, .act-card-actions .act-menu-btn::after { content: ''; position: absolute; inset: -6px; }
.act-card-actions .act-love::after { content: ''; position: absolute; inset: -7px -2px; }

/* ---------- "Reduce motion": a waiting sign still has to move ----------
   The rule that switches every animation off also froze the spinner into a still ring, which reads as "stuck".
   It keeps turning, slowly. */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: spin 1.8s linear infinite !important; }
  .err-state .btn[aria-busy="true"] svg { animation: err-spin 1.8s linear infinite !important; }
}
/* ---------- Lists while they load ---------- */
.skel-page.skel-rows { gap: 12px; margin: 0; max-width: none; }
.skel-rows .sk-card { height: 112px; }
.list-more-err { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0; }
/* the turning sign inside a busy button (Save, Show more) takes the button's own text colour */
.btn .spinner { border-color: color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor; margin-right: 0; }
/* a part of a page that could not load (app.js errorLine): the message, and "Try again" at its right */
.err-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.err-line > span { flex: 1 1 200px; min-width: 0; }
.err-line .btn { flex: none; min-height: 40px; }
/* ---------- Top bar: a back arrow on pages outside the bottom tabs (phones) ----------
   It takes the logo's place (app.js sets .has-back on the top bar), so the bar is no fuller than before. Wide screens
   keep the logo: they have the side menu and the browser's own back button. */
.topbar .back-btn { display: none; flex: none; }
.topbar .back-btn svg { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .topbar.has-back .back-btn { display: inline-grid; place-items: center; }
  .topbar.has-back .brand { display: none; }
}
/* ---------- Registration through RunFinite (views/event-register.js) ----------
   A hero with the event (its cover photo under a brand-coloured veil), then the form in numbered steps beside a
   sticky summary; on a phone the summary sits under the form and a bar above the bottom tabs keeps the total and
   "Register" in reach. Choices are big tappable cards and chips. Everything uses the theme tokens. */
.rg { max-width: 1120px; margin: 0 auto; }
.rg-hero { position: relative; overflow: hidden; border-radius: var(--r-panel, 18px); margin: 0 0 16px; color: #fff; isolation: isolate;
  background: linear-gradient(135deg, color-mix(in srgb, var(--btn-bg) 92%, #000), color-mix(in srgb, var(--emerald) 80%, #000)); }
.rg-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--rg-img, none) center / cover no-repeat; }
.rg-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .7)); }
.rg-hero-in { padding: 26px 22px 22px; display: grid; gap: 10px; }
.rg-hero h1 { margin: 0; font-size: clamp(24px, 5vw, 34px); line-height: 1.15; color: #fff; text-wrap: balance; }
.rg-badge { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rg-badge svg { width: 15px; height: 15px; }
.rg-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14.5px; opacity: .95; }
.rg-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.rg-hero-meta svg { width: 16px; height: 16px; }
.rg-lead { margin: 0 0 12px; color: var(--muted); }
.rg-closed { display: flex; align-items: center; gap: 8px; }

.rg-mine ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rg-mine li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rg-mine li:first-child { border-top: 0; }
.rg-mine-r { display: inline-flex; align-items: center; gap: 8px; }
.rg-st-pending { background: color-mix(in srgb, #F59E0B 18%, var(--card)); color: color-mix(in srgb, #B45309 80%, var(--ink)); }
.rg-st-verified { background: var(--ok-bg, color-mix(in srgb, var(--emerald) 16%, var(--card))); color: var(--brand-ink); }
.rg-st-rejected { background: color-mix(in srgb, var(--danger) 14%, var(--card)); color: var(--danger); }

.rg-form { display: grid; gap: 14px; }
@media (min-width: 960px) {
  .rg-form { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .rg-form > .rg-sec, .rg-form > .form-notice { grid-column: 1; }
  .rg-sum { grid-column: 2; grid-row: 1 / span 6; position: sticky; top: calc(var(--header-h, 64px) + 16px); }
}
.rg-sec { margin: 0; }
.rg-sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 18px; }
.rg-num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; font-size: 15px; font-weight: 700;
  background: var(--btn-bg); color: var(--on-brand); }
.rg-sec .rg-field > span:first-child { font-weight: 600; }
.rg-sec .field[data-field="distance"] > span:first-child, .rg-sec .field[data-field="tshirt"] > span:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rg-opt { font-weight: 400; color: var(--muted); }
.rg-grid2 { display: grid; gap: 4px 16px; }
@media (min-width: 640px) { .rg-grid2 { grid-template-columns: 1fr 1fr; } .rg-grid2 .rg-wide { grid-column: 1 / -1; } }

/* choices: radio inputs kept for keyboards and screen readers, drawn as cards / chips */
.rg-choice { position: relative; display: block; cursor: pointer; }
.rg-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rg-choice > span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.rg-choice:hover > span { border-color: color-mix(in srgb, var(--brand-ink) 45%, var(--line)); }
.rg-radio:checked + span { border-color: var(--brand-ink); background: color-mix(in srgb, var(--emerald) 12%, var(--card)); box-shadow: 0 0 0 1px var(--brand-ink); }
.rg-radio:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.rg-chips, .rg-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-chips .rg-choice > span { border-radius: 999px; min-width: 56px; font-weight: 600; }
.rg-seg { display: grid; grid-template-columns: 1fr 1fr; }
.rg-seg .rg-choice > span { font-weight: 600; }

.rg-cats { display: grid; gap: 10px; }
@media (min-width: 560px) { .rg-cats { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.rg-cats .rg-choice > span { justify-content: flex-start; padding: 14px 16px; border-radius: 16px; }
.rg-cat { display: grid !important; gap: 8px; width: 100%; text-align: left; }
.rg-cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rg-cat-top b { font-size: 19px; }
.rg-cat-fee { font-family: var(--font-metric); font-size: 22px; font-weight: 700; color: var(--brand-ink); }
.rg-cat-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.rg-cat-meta span { display: inline-flex; align-items: center; gap: 4px; }
.rg-cat-meta svg { width: 14px; height: 14px; }
.rg-cats .rg-radio:checked + span { background: linear-gradient(135deg, color-mix(in srgb, var(--emerald) 18%, var(--card)), var(--card)); }

.rg-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rg-size { display: grid !important; gap: 2px; text-align: center; }
.rg-size b { font-size: 16px; }
.rg-size small { font-size: 12px; color: var(--muted); }

.rg-date-wrap { position: relative; display: block; }
.rg-date-wrap svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--brand-ink); pointer-events: none; }
.rg-date { padding-left: 42px; }
.rg-age { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--brand-ink); }

.rg-coupon { display: flex; gap: 8px; }
.rg-coupon .input { flex: 1; min-width: 0; }
.rg-coupon-msg { margin: 6px 0 0; font-size: 14px; min-height: 0; }
.rg-coupon-msg.ok { color: var(--brand-ink); font-weight: 600; }
.rg-coupon-msg.bad { color: var(--danger); }
.rg-coupon-msg svg { width: 15px; height: 15px; vertical-align: -2px; }

.rg-paybox { display: grid; gap: 4px; margin-top: 6px; }
.rg-pms { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rg-pm { display: flex !important; align-items: center; justify-content: flex-start !important; gap: 10px; padding: 12px 14px !important; min-height: 56px !important; }
.rg-pm-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; flex: none; }
.rg-pm-ic svg { width: 18px; height: 18px; }
.rg-pm-bkash .rg-pm-ic { background: #E2136E; }   /* bKash's own pink, a brand mark */
.rg-pm-bank .rg-pm-ic { background: var(--btn-bg); color: var(--on-brand); }
.rg-steps { padding: 12px 14px; border-radius: 14px; background: var(--mint-2); margin: 4px 0 8px; }
.rg-steps p { margin: 0 0 8px; font-size: 14.5px; }
.rg-payto { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rg-payto code { font-size: 17px; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: var(--card); white-space: pre-wrap; overflow-wrap: anywhere; }
.rg-free { display: flex; align-items: center; gap: 8px; }
.rg-agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; line-height: 1.5; }
.rg-agree input { margin-top: 4px; width: 20px; height: 20px; flex: none; }

.rg-sum { margin: 0; display: grid; gap: 10px; }
.rg-sum h2 { margin: 0; font-size: 18px; }
.rg-sum-ev { margin: 0; font-weight: 600; color: var(--muted); }
.rg-sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.rg-sum-row span { color: var(--muted); }
.rg-sum-disc b { color: var(--brand-ink); }
.rg-sum-final { padding-top: 10px; border-top: 1px dashed var(--line); align-items: baseline; }
.rg-sum-total { font-family: var(--font-metric); font-size: 30px; line-height: 1; color: var(--ink); }
.btn.rg-submit { min-height: 52px; font-size: 16px; gap: 8px; }
.rg-safe { margin: 0; display: flex; align-items: center; gap: 6px; }
.rg-safe svg { width: 14px; height: 14px; flex: none; }

/* phone: total and "Register" stay in reach above the bottom tabs */
.rg-bar { display: none; }
@media (max-width: 959px) {
  .rg-bar { position: sticky; bottom: calc(var(--bottom-h, 64px) + var(--safe-b, 0px) + 8px); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
  .rg-bar small { display: block; color: var(--muted); font-size: 12px; }
  .rg-bar strong { font-family: var(--font-metric); font-size: 24px; line-height: 1.1; }
  .rg-bar-btn { min-height: 46px; }
}

.rg-done { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 28px 18px; }
.rg-done h1 { margin: 0; }
.rg-done-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, var(--emerald) 16%, var(--card)); color: var(--brand-ink); }
.rg-done-ic svg { width: 40px; height: 40px; }
.rg-ticket { width: min(100%, 460px); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; margin: 6px 0 10px; text-align: left;
  border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--brand-ink) 45%, var(--line)); background: var(--mint-2); }
.rg-ticket small { display: block; font-size: 12px; color: var(--muted); }
.rg-ticket-no { font-family: var(--font-metric); font-size: 22px; letter-spacing: .02em; }

/* event page and list: the "registration on RunFinite" mark */
.evd-rf-mark { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--emerald) 14%, var(--card)); color: var(--brand-ink); }
.evd-rf-mark svg, .ev-rf-badge svg { width: 15px; height: 15px; }
.badge.ev-rf-badge { background: color-mix(in srgb, var(--emerald) 16%, var(--card)); color: var(--brand-ink); }

/* admin: event list actions, registration settings, registered data */
.ev-admin-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-admin-acts .btn { white-space: nowrap; }
.reg-settings { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--mint-2); }
.reg-settings-body { margin-top: 8px; }
.reg-settings-link, .ar-link { display: grid; gap: 4px; }
.reg-settings-link code, .ar-link code { overflow-wrap: anywhere; font-size: 14px; }
.ar-kpis { margin-top: 0; }
.ar-tools { justify-content: space-between; margin-bottom: 10px; }
.ar-table td { vertical-align: top; }
.ar-status { min-height: 38px; padding: 4px 8px; width: auto; }
.ar-status[data-st="verified"] { border-color: var(--brand-ink); color: var(--brand-ink); }
.ar-status[data-st="rejected"] { border-color: var(--danger); color: var(--danger); }
.ar-more summary { cursor: pointer; font-size: 13px; color: var(--brand-ink); }
.btn.evd-rf-reg { gap: 8px; }
.btn.rg-copy { flex: none; gap: 6px; }
.ar-table td:first-child { white-space: nowrap; }
.ar-table .ar-status { min-width: 9.5em; }

/* ---------- Strava transfer (views/strava.js) ----------
   Settings → Connected apps → Strava, and one status line on the owner's activity page. Strava's own orange is used
   only for its brand marks ("Connect with Strava", "View on Strava"), as Strava's brand guidelines ask. */
.sv-panel h2 { margin-bottom: 12px; }
.sv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sv-head b { display: block; font-size: 17px; }
.sv-head small { display: block; }
.sv-logo, .sv-mark { display: grid; place-items: center; flex: none; border-radius: 12px; background: #FC5200; color: #fff; }
.sv-logo { width: 40px; height: 40px; }
.sv-logo svg { width: 22px; height: 22px; }
.sv-mark { width: 26px; height: 26px; border-radius: 8px; }
.sv-mark svg { width: 15px; height: 15px; }
.sv-ok { color: var(--brand-ink); font-weight: 600; }
.sv-ok svg { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; }
.sv-bad { color: var(--danger); font-weight: 600; }
.sv-lead { margin: 0 0 12px; }
/* Strava's button: its orange with white bold text (large enough for 3:1) */
.btn.sv-connect { background: #FC5200; border-color: #FC5200; color: #fff; font-size: 17px; font-weight: 700; min-height: 48px; padding: 0 22px; box-shadow: none; }
.btn.sv-connect:hover { background: #E34A00; border-color: #E34A00; }
.btn.sv-connect:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sv-auto { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 12px; line-height: 1.45; }
.sv-auto input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.sv-auto small { display: block; margin-top: 2px; }
.sv-last { margin: 0 0 8px; overflow-wrap: anywhere; }
.sv-wait { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.sv-wait svg { width: 15px; height: 15px; }
.sv-failed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sv-note { display: flex; align-items: flex-start; gap: 6px; margin: 12px 0 0; }
.sv-note svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.sv-admin { margin: 12px 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--mint-2); }
.sv-admin small { display: block; line-height: 1.45; }
a.sv-view { color: #FC5200; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.sv-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 14px; font-size: 14.5px; }
.sv-line .spinner { width: 14px; height: 14px; }
.sv-line .btn { margin-left: 4px; }
/* "Making the picture… please wait" while a share picture is drawn (share-card.js makingWindow): centred, cannot be tapped away. */
.sm-wait-scrim { display: grid; place-items: center; padding: 16px; }
.modal.sm-wait { width: min(100%, 360px); padding: 26px 22px 22px; text-align: center; border-radius: 20px; outline: none; }
.sm-wait-ic { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 12px; color: var(--brand-ink); }
.sm-wait-ic .spinner { position: absolute; inset: 0; width: 64px; height: 64px; margin: 0; border-width: 4px; }
.sm-wait-ic svg { width: 26px; height: 26px; }
.sm-wait h2 { margin: 0 0 6px; font-size: 19px; }
.sm-wait p { margin: 0; color: var(--muted); line-height: 1.55; }