:root {
  --bg: #161616; --bg2: #1a1a1a; --card: #1f1f1f; --card2: #2b2b2b; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #edeeef; --dim: #9da3a8; --dim2: #6f767c; --accent: #35ccb6; --accent-ink: #062823; --danger: #f0606b; --warn: #e89b19; --good: #5dba3b;
  --r: 16px; --r-sm: 12px; --tab-h: 64px;
  --font: "Roboto Flex", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
#app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 0 14px; }
.topbar .eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.topbar h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--text); padding: 0; }
.icon-btn.primary { background: #fff; color: #111; border-color: transparent; }
.icon-btn svg { width: 20px; height: 20px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(22,22,22,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar nav { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tab-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim2); text-decoration: none; font-size: 11px; font-weight: 600; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"] svg { color: #fff; }
.tabbar a[aria-current="page"] span { border-bottom: 2px solid var(--text); padding-bottom: 1px; }

/* ---------- type ---------- */
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.section-head .aside { font-size: 13px; color: var(--dim); }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
p { line-height: 1.5; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 10px; }
.stack > * + * { margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--card2); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.2; }
.chip.accent { background: rgba(53,204,182,.14); color: var(--accent); }
.chip.warn { background: rgba(232,155,25,.15); color: #f2b347; }
.chip.danger { background: rgba(240,96,107,.15); color: #ff8a93; }
.chip.good { background: rgba(93,186,59,.15); color: #8fd56f; }
.chip.info { background: rgba(255,255,255,.07); color: #c9cdd1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.est { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #f2b347; background: rgba(232,155,25,.14); border-radius: 6px; padding: 2px 5px; margin-left: 4px; vertical-align: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15px;
  background: #fff; color: #111; text-decoration: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.outline { background: transparent; border: 1px solid var(--line2); color: var(--text); }
.btn.danger { background: rgba(240,96,107,.16); color: #ff8a93; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- week strip ---------- */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekstrip .d { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 14px; }
.weekstrip .d .l { font-size: 11px; color: var(--dim); font-weight: 700; }
.weekstrip .d .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.weekstrip .d.today .n { background: var(--text); color: #111; }
.weekstrip .dots { display: flex; gap: 3px; height: 6px; }
.weekstrip .dot { width: 6px; height: 6px; border-radius: 50%; }
.weekstrip .dot.ring { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--c); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi .v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.kpi .v small { font-size: 13px; font-weight: 700; color: var(--dim); margin-left: 2px; }
.kpi .k { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* ---------- workout cards (Runna-style) ---------- */
.wcard { position: relative; display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); color: var(--text); text-decoration: none; padding: 0; }
.wcard .hero { padding: 16px 16px 14px; background: linear-gradient(225deg, var(--g1, var(--c)) 0%, var(--g2, var(--c)) 100%); }
.wcard .hero .type { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .92; }
.wcard .hero .title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; line-height: 1.1; }
.wcard .hero .meta { display: flex; gap: 14px; margin-top: 10px; font-size: 14px; font-weight: 600; }
.wcard .hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.wcard .body { padding: 14px 16px 16px; }
.wcard .preview { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin-top: 12px; }
.wcard .preview i { display: block; border-radius: 3px; background: rgba(255,255,255,.85); }

.wrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--text); width: 100%; text-align: left; }
.wrow + .wrow { margin-top: 8px; }
.wicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(225deg, var(--g1, var(--c)), var(--g2, var(--c))); color: #fff; }
.wicon svg { width: 22px; height: 22px; }
.wrow .t1 { font-size: 12px; color: var(--dim); font-weight: 600; }
.wrow, .act .nums b, .kpi .v, .stat .v { font-variant-numeric: tabular-nums; }
.wrow .t2 { font-size: 16px; font-weight: 800; margin-top: 1px; }
.wrow .t3 { font-size: 13px; color: var(--dim); margin-top: 2px; }
.wrow .end { display: flex; align-items: center; gap: 6px; color: var(--dim); }
.check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #34EC7D; color: #08351b; }
.check svg { width: 16px; height: 16px; }
.wrow.done { opacity: .78; }
.wrow.missed { border-color: rgba(240,96,107,.35); }

/* ---------- workout detail ---------- */
.detail-hero { margin: 0 -16px; padding: 14px 16px 22px; background: linear-gradient(225deg, var(--g1, var(--c)) 0%, var(--g2, var(--c)) 100%); }
.detail-hero .back { background: rgba(0,0,0,.25); border: 0; color: #fff; }
.detail-hero .type { margin-top: 18px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.detail-hero h1 { margin: 6px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; }
.detail-hero .when { margin-top: 8px; font-weight: 600; opacity: .9; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.detail-stats div { background: rgba(0,0,0,.22); border-radius: 12px; padding: 10px; }
.detail-stats b { display: block; font-size: 17px; }
.detail-stats span { font-size: 11px; opacity: .85; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.struct-chart { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 0 2px; }
.struct-chart i { display: block; border-radius: 4px; min-width: 6px; }
.steps { margin-top: 14px; }
.step { display: grid; grid-template-columns: 5px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step .rail { border-radius: 4px; }
.step .k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.step .a { font-size: 18px; font-weight: 800; margin-top: 2px; }
.step .tg { font-size: 14px; color: #c9cdd1; margin-top: 2px; line-height: 1.4; }
.step .rec { font-size: 13px; color: var(--dim); margin-top: 4px; }
.notice { border-radius: var(--r); padding: 14px 16px; background: rgba(240,96,107,.1); border: 1px solid rgba(240,96,107,.3); }
.notice.info { background: rgba(53,204,182,.08); border-color: rgba(53,204,182,.28); }
.notice.warn { background: rgba(232,155,25,.09); border-color: rgba(232,155,25,.3); }
.notice h3 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.notice p { margin: 0; font-size: 14px; color: #d6d9dc; }
.fuel h3 { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.fuel p { margin: 4px 0 12px; font-size: 14px; color: #d6d9dc; }
.fuel p:last-child { margin-bottom: 0; }

/* ---------- activities ---------- */
.month-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; }
.month-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.act { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.act + .act { margin-top: 10px; }
.act > button.sum { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 14px 16px; cursor: pointer; }
.act > button.sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.act .head { display: flex; align-items: center; gap: 10px; }
.act .head .wicon { width: 36px; height: 36px; border-radius: 10px; }
.act .head .wicon svg { width: 18px; height: 18px; }
.act .head .tt { font-weight: 800; font-size: 16px; }
.act .head .dd { font-size: 12px; color: var(--dim); margin-top: 1px; }
.act .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.act .nums b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.act .nums span { font-size: 11px; color: var(--dim); font-weight: 600; }
.act .more { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 16px; font-weight: 800; margin-top: 3px; }
.stat .s { font-size: 12px; color: var(--dim); margin-top: 1px; }
.ache-hi { color: #ff8a93; }
.notes-text { font-size: 14px; color: #d6d9dc; margin: 12px 0 0; white-space: pre-wrap; }
.src { font-size: 11px; font-weight: 700; color: var(--dim); background: var(--card2); padding: 2px 7px; border-radius: 6px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--dim); font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--dim); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
table.weeks { width: 100%; border-collapse: collapse; font-size: 14px; }
table.weeks th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 700; padding: 0 0 8px; }
table.weeks td { padding: 10px 0; border-top: 1px solid var(--line); }
table.weeks .r { text-align: right; }
table.weeks tr.cur td { color: var(--accent); font-weight: 700; }

/* ---------- segmented ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 0; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--dim); }
.seg button[aria-pressed="true"] { background: var(--text); color: #111; }

/* ---------- plan calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dh { font-size: 11px; color: var(--dim); font-weight: 700; padding-bottom: 4px; }
.cal .c { aspect-ratio: 1 / 1.08; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text); background: transparent; border: 0; padding: 0; }
.cal .c.out { color: var(--dim2); opacity: .45; }
.cal .c.today { background: var(--text); color: #111; }
.cal .c .pips { display: flex; gap: 2px; height: 6px; }
.cal .c .pip { width: 6px; height: 6px; border-radius: 50%; }
.cal .c .pip.ring { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--c); }
.cal .c.wk-cur { background: rgba(53,204,182,.08); }
.phase { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.phase::-webkit-scrollbar { display: none; }
.phase .p { flex: 0 0 auto; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); min-width: 140px; }
.phase .p.cur { border-color: var(--accent); }
.phase .p .tf { font-size: 11px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.phase .p .tt { font-size: 15px; font-weight: 800; margin-top: 2px; }
.week-block + .week-block { margin-top: 18px; }
.week-block h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; display: flex; justify-content: space-between; align-items: baseline; }
.week-block h3 span { font-size: 13px; color: var(--dim); font-weight: 600; }
.empty-week { padding: 14px 16px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--dim); font-size: 14px; }

/* ---------- coach ---------- */
.note .date { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.note h3 { margin: 6px 0 0; font-size: 17px; font-weight: 800; }
.note p { margin: 6px 0 0; font-size: 14px; color: #d6d9dc; }
dl.profile { margin: 0; }
dl.profile div { padding: 12px 0; border-top: 1px solid var(--line); }
dl.profile div:first-child { border-top: 0; padding-top: 4px; }
dl.profile dt { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
dl.profile dd { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #1d8a7a); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.race { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; }
.race .cal-ico { width: 48px; height: 52px; border-radius: 10px; background: var(--card2); text-align: center; overflow: hidden; }
.race .cal-ico b { display: block; background: #dd525e; font-size: 10px; padding: 3px 0; letter-spacing: .06em; }
.race .cal-ico span { display: block; font-size: 19px; font-weight: 800; padding-top: 4px; }

/* ---------- forms / sheet ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line2); margin: 0 auto 12px; }
.sheet h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.field { margin-top: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--dim); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 .field { margin-top: 14px; }
.err { color: #ff8a93; font-size: 14px; margin-top: 12px; min-height: 1em; }
details.more-fields { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more-fields summary { font-weight: 700; cursor: pointer; color: var(--accent); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.logo { width: 64px; height: 64px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo svg { width: 36px; height: 36px; }
.login h1 { font-size: 32px; margin: 18px 0 4px; font-weight: 800; letter-spacing: -.02em; }
.login input { letter-spacing: .4em; text-align: center; font-size: 22px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: #111; font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 999px; z-index: 60; max-width: calc(100% - 32px); }
.loading { padding: 60px 0; text-align: center; color: var(--dim); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-child { border-top: 0; }
.kv span:first-child { color: var(--dim); }
ol.steps-list { padding-left: 20px; margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: #d6d9dc; }
code { background: var(--card2); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.log-line { font-size: 12px; color: var(--dim); padding: 6px 0; border-top: 1px solid var(--line); }
/* Settings log folds (Oct 22 2026): the logs sit behind a collapsed "Show details" row; a current error stays visible above it. */
.log-line.log-err, .log-err { color: #e89b19; }
details.log-fold > summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent); padding: 10px 0 8px; border-top: 1px solid var(--line); -webkit-user-select: none; user-select: none; }
details.log-fold > summary::-webkit-details-marker { display: none; }
details.log-fold > summary .lf-n { font-weight: 600; font-size: 12px; color: var(--dim); }
details.log-fold > summary .lf-chev { margin-left: auto; display: inline-flex; color: var(--dim); transition: transform .18s ease-out; }
details.log-fold[open] > summary .lf-chev { transform: rotate(90deg); }
details.log-fold > summary .lf-hide, details.log-fold[open] > summary .lf-show { display: none; }
details.log-fold[open] > summary .lf-hide { display: inline; }
@media (prefers-reduced-motion: reduce) { details.log-fold > summary .lf-chev { transition: none; } }

/* no accidental text selection / Touch to Search on tap or scroll (Oct 20) */
html, body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, select, [contenteditable="true"], .selectable, .note-body, pre, code { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

.chip.muted { background: rgba(255,255,255,.08); color: #9aa0a6; }

/* GPS route (Google Health track) in the run detail */
.gps { margin-top: 12px; background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.gps-line { font-size: 14px; }
.gps-map { margin-top: 8px; background: #121314; border-radius: 10px; padding: 6px; min-height: 40px; }
.gps-map svg { display: block; max-height: 220px; }

/* ---- GPS analytics: Leaflet maps, splits, effort, predictor, best efforts, fitness, heatmap ---- */
.lmap { height: 230px; border-radius: 12px; overflow: hidden; margin: 10px 0 6px; background: #1a1d20; }
.lmap.svg { height: auto; background: var(--card2); padding: 6px; }
.leaflet-container { font: inherit; background: #1a1d20; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.6); }
.leaflet-container .leaflet-control-attribution { font-size: 10px; background: rgba(18,19,20,.78) !important; color: #b9bec3; }
.leaflet-control-attribution a { color: #8fe3d6; }
.leaflet-container .leaflet-bar a { background: #24292e; color: #edeeef; border-bottom-color: #33393f; }
.leaflet-container .leaflet-bar a:hover { background: #2d3338; }
.leaflet-container .leaflet-bar { border-color: rgba(255,255,255,.12); }
.leaflet-container .leaflet-popup-content-wrapper, .leaflet-container .leaflet-popup-tip { background: #24292e; color: #edeeef; }
.splits { margin-top: 12px; background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.splits .sp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.splits table { width: 100%; border-collapse: collapse; font-size: 13px; }
.splits th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 700; padding: 2px 0 6px; }
.splits td { padding: 5px 0; border-top: 1px solid rgba(255,255,255,.06); }
.splits .r { text-align: right; padding-left: 8px; }
.splits .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.splits .barcol { width: 42%; padding: 0 8px; }
.spbar { display: block; height: 8px; border-radius: 99px; background: rgba(53,204,182,.45); }
.spbar.best { background: var(--accent); }
.eff { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.stat .eff { font-size: 14px; margin-left: 0; padding: 2px 8px; }
.e-easy { background: rgba(93,186,59,.16); color: #8fd56f; }
.e-moderate { background: rgba(53,204,182,.16); color: #5fdcc9; }
.e-hard { background: rgba(232,155,25,.16); color: #f2b347; }
.e-veryhard { background: rgba(240,96,107,.18); color: #ff8a93; }
.chip.pr { background: rgba(255,196,0,.16); color: #ffd25e; }
.pred { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pred > div { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.pred .k { font-size: 11px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pred .v { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pred .s { font-size: 12px; color: var(--dim); }
.be-row { display: grid; grid-template-columns: 64px auto 1fr 18px; align-items: center; gap: 10px; padding: 10px 2px; color: var(--text); text-decoration: none; border-top: 1px solid var(--line); }
.be-row:first-child { border-top: 0; padding-top: 2px; }
.be-row .k { font-size: 13px; color: var(--dim); font-weight: 700; }
.be-row .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.be-row .s { font-size: 12px; color: var(--dim); text-align: right; }
.be-row svg { width: 16px; height: 16px; color: var(--dim); }
.form-line { margin-bottom: 6px; }
.form-line b { font-size: 18px; }
.heat-link { margin-top: 18px; }
.heat-chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; padding: 7px 12px; border-radius: 999px; background: rgba(255,90,54,.14); color: #ff8a6b; font-size: 13px; font-weight: 700; text-decoration: none; }
.heat-map { height: calc(100vh - 230px); min-height: 360px; border-radius: 14px; overflow: hidden; background: #1a1d20; }

/* no-GPS estimate pill (display only) */
.est-wrap { padding: 0 14px 12px; margin-top: -4px; }
.estpill { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; max-width: 100%; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.07); color: #aeb3b8; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
.estpill .ep-tag { color: #c9cdd1; font-weight: 700; }
.estpill .ep-val { color: #9aa0a6; font-weight: 600; }
.estpill .ep-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: rgba(255,255,255,.12); color: #c9cdd1; font-size: 10px; font-weight: 800; }
.t3 + .estpill, .wrow .estpill { margin-top: 5px; padding: 2px 8px; font-size: 11px; cursor: inherit; }
.est-why { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: rgba(255,255,255,.05); color: #aeb3b8; font-size: 12.5px; line-height: 1.45; }
.est-detail .gps-line b { color: #c9cdd1; }

/* readiness card (phone app / Health Connect) */
.rd-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}
.rd-cell{background:#171a1d;border-radius:12px;padding:8px 10px}
.rd-v{font-size:18px;font-weight:700;margin:2px 0}
.run-kpis{grid-template-columns:1fr 1fr}.run-kpis .v{font-size:30px}

/* HR over the run (Oct 22 2026): same card language as .gps / .splits */
.hrx { margin-top: 12px; background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.hrx .sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.hrx-note { margin-top: 10px; padding: 0 2px; }
.seg.mini { padding: 3px; background: var(--card); }
.seg.mini button { padding: 5px 11px; font-size: 12px; }
.hr-read { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
.hr-read .hr-def { color: var(--dim); } .hr-read .hr-def b { color: var(--text); }
.hr-read .hr-pt { display: inline-flex; align-items: center; gap: 6px; }
.hr-read i, .hz i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.hr-chart { margin-top: 6px; background: #121314; border-radius: 10px; padding: 6px 4px 2px; }
.hrsvg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.hrsvg text { fill: var(--dim); font-size: 9px; font-family: var(--font); }
.hrsvg text.zl { font-weight: 700; font-size: 9px; opacity: .9; }
.hr-zones { margin-top: 10px; display: grid; gap: 7px; }
.hz { display: grid; grid-template-columns: 92px 50px 1fr 38px 30px; align-items: center; gap: 6px; font-size: 12px; }
.hzl { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.hzbar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.hzbar span { display: block; height: 100%; border-radius: 99px; }
.hzt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.hzp { text-align: right; }
.hr-sub { margin-top: 12px; }
.hr-sub table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hr-sub td { padding: 5px 0; border-top: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.hr-sub .r { text-align: right; padding-left: 8px; }
.hr-sub .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.hr-ok { color: #5dba3b; font-size: 11px; font-weight: 700; } .hr-hi { color: #e89b19; font-size: 11px; font-weight: 700; }

/* Touch ripple + press state (site/ripple.js). Overlay only: nothing here changes size, spacing or colours at rest. */
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }
.rc-ripple-host { position: fixed; z-index: 9999; overflow: hidden; pointer-events: none; contain: strict; }
.rc-ripple { position: absolute; border-radius: 50%; transform: scale(0); opacity: .6; pointer-events: none; will-change: transform, opacity; }
.btn, .icon-btn, .chip, .estpill, .heat-chip, [data-act="hr-axis"], [data-act="coach-tab"] { transition: transform 120ms ease-out, filter 120ms ease-out; }
.btn:active:not([disabled]), .icon-btn:active, button.chip:active, .estpill:active, .heat-chip:active, [data-act="hr-axis"]:active, [data-act="coach-tab"]:active { transform: scale(.98); }
.wcard:active, .wrow:active, .be-row:active, .act > button.sum:active, .tabbar a:active, summary:active { filter: brightness(.93); }
@media (prefers-reduced-motion: reduce) {
  .btn, .icon-btn, .chip, .estpill, .heat-chip, [data-act="hr-axis"], [data-act="coach-tab"] { transition: none; }
  .btn:active:not([disabled]), .icon-btn:active, button.chip:active, .estpill:active, .heat-chip:active, [data-act="hr-axis"]:active, [data-act="coach-tab"]:active { transform: none; filter: brightness(.93); }
}

/* ---- Coach tab: chat, check-in, debrief, weekly review; Progress: streaks + badges (Oct 22 2026). Same tokens as the rest. ---- */
.cm-thread { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.cm { max-width: 84%; display: flex; flex-direction: column; }
.cm.me { align-self: flex-end; align-items: flex-end; }
.cm.coach { align-self: flex-start; align-items: flex-start; }
.cm-b { padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm.me .cm-b { background: rgba(53,204,182,.16); color: var(--text); border-bottom-right-radius: 6px; }
.cm.coach .cm-b { background: var(--card2); color: var(--text); border-bottom-left-radius: 6px; }
.cm-t { font-size: 11px; color: var(--dim2); margin: 3px 4px 0; }
.cm-plan { display: flex; align-items: flex-start; gap: 4px; margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--accent); }
.cm-plan svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.cm-wait { align-self: flex-end; font-size: 12px; color: var(--dim); margin: -2px 4px 0; }
.cm-empty { padding: 4px 2px 2px; }
/* Check-in sliders (Oct 22 2026 v2): 1-10 in half steps. Big thumb + tall hit area for a thumb on a 384 px phone. */
.chk-row { display: block; min-width: 0; }
.chk-row + .chk-row { margin-top: 12px; }
.chk-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.chk-k { font-size: 13px; font-weight: 700; color: var(--dim); }
.chk-was { font-size: 11px; color: var(--dim); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chk-v { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; }
.chk-v small { font-size: 12px; font-weight: 700; color: var(--dim); margin-left: 1px; }
.chk-row.unset .chk-v { color: var(--dim); }
.chk-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; max-width: 100%; box-sizing: border-box; height: 40px; margin: 2px 0 0; padding: 0;
  background: transparent; touch-action: pan-y; cursor: pointer; --p: 50%; }
.chk-range:focus { outline: none; }
.chk-range::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--accent) 0 var(--p), var(--card2) var(--p) 100%); }
.chk-range::-moz-range-track { height: 8px; border-radius: 999px; background: var(--card2); }
.chk-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--accent); }
.chk-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--card); box-shadow: 0 0 0 1px rgba(53,204,182,.5), 0 2px 6px rgba(0,0,0,.5); transition: transform .12s ease; }
.chk-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card); }
.chk-range:active::-webkit-slider-thumb { transform: scale(1.15); }
.chk-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(53,204,182,.45); }
.chk-row.unset .chk-range::-webkit-slider-runnable-track { background: var(--card2); }
.chk-row.unset .chk-range::-webkit-slider-thumb { background: var(--card); box-shadow: 0 0 0 2px var(--dim) inset, 0 0 0 1px var(--line); }
.chk-row.unset .chk-range::-moz-range-progress { background: transparent; }
.chk-row.unset .chk-range::-moz-range-thumb { background: var(--card); }
.chk-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--dim); margin-top: -4px; }
.nudge { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--nc); border-radius: 12px; padding: 10px 12px; }
.card .nudge { background: var(--card2); border-color: transparent; border-left-color: var(--nc); margin-top: 0; }
.nudge-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nudge-h i { width: 10px; height: 10px; border-radius: 50%; background: var(--nc); flex: none; }
.feel { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 8px; }
.feel button { min-width: 0; height: 34px; border: 0; border-radius: 10px; background: var(--card2); color: var(--text); font-weight: 800; font-size: 14px; padding: 0; font-variant-numeric: tabular-nums; }
.dbf .feel button { background: #353535; }
.feel button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.feel-scale { display: flex; justify-content: space-between; margin-top: 4px; }
.feel-note { width: 100%; box-sizing: border-box; margin-top: 8px; border-radius: 12px; padding: 9px 10px; background: rgba(255,255,255,.06); color: inherit; border: 1px solid rgba(255,255,255,.12); font: inherit; font-size: 14px; resize: vertical; }
.fb-line { margin: 10px 0 0; color: #d6d9dc; line-height: 1.4; }
.fb-line:empty { display: none; }
.dbf .sp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#reviews-slot a { text-decoration: none; }
.rv-focus { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rv-vote { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rv-vote > span { flex: 1; }
.rv-btn { width: 38px; height: 38px; }
.rv-btn svg { width: 18px; height: 18px; }
.rv-btn[aria-pressed="true"] { background: rgba(53,204,182,.16); border-color: rgba(53,204,182,.5); color: var(--accent); }
details.rv-old > summary { display: grid; grid-template-columns: 1fr auto 16px; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 700; border-top: 1px solid var(--line); }
details.rv-old:first-child > summary { border-top: 0; padding-top: 2px; }
details.rv-old > summary::-webkit-details-marker { display: none; }
details.rv-old > summary .lf-chev svg { width: 16px; height: 16px; color: var(--dim); transform: rotate(90deg); transition: transform 150ms ease-out; }
details.rv-old[open] > summary .lf-chev svg { transform: rotate(-90deg); }
.streak-weeks { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin-top: 14px; }
.streak-weeks i { height: 8px; border-radius: 99px; background: var(--card2); }
.streak-weeks i.on { background: var(--accent); }
.streak-weeks i.cur { background: transparent; border: 1px dashed var(--line2); }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge { position: relative; display: flex; flex-direction: column; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; color: var(--text); text-decoration: none; opacity: .42; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; }
.badge .bi { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--dim); margin-bottom: 6px; }
.badge.on .bi { background: rgba(53,204,182,.16); color: var(--accent); }
.badge .bi svg { width: 19px; height: 19px; }
.badge .bt { font-size: 14px; font-weight: 800; line-height: 1.25; }
.badge .bd { font-size: 12px; color: var(--dim); }
.badge .lock { position: absolute; top: 12px; right: 12px; color: var(--dim); }
.badge .lock svg { width: 15px; height: 15px; }

/* ---- Gear, pain log, race day, sleep vs performance (Oct 22 2026) ---- */
.act-tools { margin: 0 0 12px; }
.act-tools .wrow + .wrow { margin-top: 0; }
.gear-tile .t2, .gear-card .gc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wear { margin-top: 10px; }
.wear.compact { margin-top: 7px; }
.wear-bar { position: relative; overflow: visible; }
.wear.compact .wear-bar { height: 5px; }
.wear-bar > i { border-radius: 99px; }
.wear-bar > b { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.35); border-radius: 2px; }
.wear-bar.warn > i { background: #e89b19; }
.wear-bar.replace > i { background: #f0606b; }
.wear-scale { position: relative; height: 16px; margin-top: 4px; }
.wear-scale span { position: absolute; top: 0; white-space: nowrap; }
.wear-scale span:first-child { left: 0; }
.wear-scale span:last-child { right: 0; }
.gear-card { display: block; color: var(--text); text-decoration: none; }
.gear-card.retired { opacity: .6; }
.gc-head { display: flex; align-items: center; gap: 12px; }
.gc-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(53,204,182,.14); color: var(--accent); }
.gc-ic svg { width: 22px; height: 22px; }
.gc-name { font-size: 16px; font-weight: 800; }
.gc-mi { margin-top: 12px; font-size: 14px; color: var(--dim); font-variant-numeric: tabular-nums; }
.gc-mi b { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.gc-mi.big { margin-top: 0; }
.gc-mi.big b { font-size: 36px; }
.gc-wear { margin-top: 6px; color: var(--dim); }
.gc-wear.warn { color: #f2b347; }
.gc-wear.replace { color: #ff8a93; }
.shoe-chip svg { width: 15px; height: 15px; flex: none; }
.shoe-chip { background: rgba(53,204,182,.14); color: var(--accent); border: 0; max-width: 100%; }
.shoe-pick { margin-top: 14px; }
.shoe-pick .wrow { width: 100%; text-align: left; color: var(--text); font: inherit; }
.shoe-pick .wrow[aria-pressed="true"] { border-color: rgba(53,204,182,.5); }
.shoe-pick .end svg { width: 18px; height: 18px; color: var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--text); }
.check-row input { width: 20px; height: 20px; accent-color: var(--accent); }
/* pain log */
.pain { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.pain-toggle { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: var(--text); padding: 8px 0; font: inherit; font-size: 14px; text-align: left; }
.pain-toggle > span:nth-of-type(1) { flex: 1; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pain-toggle .pain-sum { color: #f2b347; }
.pain-toggle .pt-chev { display: grid; color: var(--dim); transition: transform 150ms; }
.pain-toggle[aria-expanded="true"] .pt-chev { transform: rotate(90deg); }
.pain-body { padding-bottom: 4px; }
.pain-fig { display: block; width: 100%; max-width: 300px; margin: 2px auto 0; touch-action: manipulation; }
.pain-fig .leg path, .pain-fig .leg ellipse { fill: rgba(255,255,255,.04); stroke: #6b7177; stroke-width: 1.4; }
.pain-fig .side { fill: var(--dim); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.pain-fig .lbl { fill: #9aa0a6; font-size: 9.5px; font-weight: 600; }
.pain-fig .spot { cursor: pointer; }
.pain-fig .spot circle { fill: rgba(53,204,182,.1); stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 2.5; }
.pain-fig .spot.on circle { stroke: none; }
.pain-fig .spot text { fill: #111; font-size: 10px; font-weight: 800; pointer-events: none; }
.pain-help { text-align: center; margin-top: 4px; }
.pain-other { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.pain-other .feel-note { margin-top: 0; flex: 1; min-width: 0; }
.pain-other .seg { flex: none; }
.pain-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; min-height: 36px; }
.sev-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.body-card .kv span:last-child { text-align: right; }
/* sleep vs performance */
.sleep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sleep-cols > div { background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.sleep-cols .k { font-size: 12px; color: var(--dim); font-weight: 700; }
.sleep-cols .v { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sleep-cols .v small { font-size: 13px; color: var(--dim); font-weight: 600; }
.sleep-tbl td { vertical-align: top; }
/* race day */
.race-row { margin-bottom: 14px; }
.rd-name { font-size: 20px; font-weight: 800; line-height: 1.2; }
.rd-days { color: var(--accent); }
.rd-h { margin: 0; font-size: 17px; font-weight: 800; }
.rd-pred { display: flex; align-items: center; gap: 8px; min-height: 48px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rd-top .btn-row { align-items: center; }
.rd-status { margin-left: auto; }
.rd-strat { max-width: 260px; margin-bottom: 4px; }
.rd-pace { margin-top: 8px; }
.rd-taper + .rd-taper { margin-top: 10px; }
.rd-tl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rd-fuel { min-height: 150px; }
.rd-check { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rd-check:first-child { border-top: 0; padding-top: 0; }
.rd-check > span { flex: 1; min-width: 0; }
.rd-check > span.done { color: var(--dim); text-decoration: line-through; }
.rd-box { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1.5px solid var(--line2); background: transparent; display: grid; place-items: center; padding: 0; color: var(--accent-ink); }
.rd-box[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.rd-box svg { width: 16px; height: 16px; }
.rd-x { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--dim); font-size: 20px; line-height: 1; padding: 0; }
.rd-add { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.rd-add .feel-note { margin-top: 0; flex: 1; min-width: 0; }
.rd-start { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rd-start input, .rd-trow input[type="time"] { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 7px 8px; color: inherit; font: inherit; font-size: 14px; color-scheme: dark; }
.rd-trow { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rd-trow input[type="time"] { width: 96px; flex: none; }
.rd-trow .feel-note { margin-top: 0; flex: 1; min-width: 0; }

/* ---- Route builder pass 1 (Oct 22 2026) ---- */
.tool-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-tile { display: flex; flex-direction: column; min-width: 0; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.tool-tile .tt-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(53,204,182,.14); color: var(--accent); margin-bottom: 8px; }
.tool-tile .tt-ic.rt { background: rgba(255,90,54,.14); color: #ff8a6b; }
.tool-tile .tt-ic svg { width: 19px; height: 19px; }
.tool-tile .tt-t { font-size: 12px; color: var(--dim); font-weight: 600; }
.tool-tile .tt-v { font-size: 15px; font-weight: 800; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-tile .tt-s { font-size: 12px; color: var(--dim); margin-top: 2px; font-variant-numeric: tabular-nums; }
.tool-tile .wear.compact { margin-top: 8px; }
.rt-actions { margin-bottom: 4px; }
.route-card { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; color: var(--text); text-decoration: none; padding: 10px; }
.rc-map { background: var(--card2); border-radius: 12px; overflow: hidden; line-height: 0; }
.rc-name { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-body { min-width: 0; }
.rb-map { height: 340px; border-radius: var(--r); overflow: hidden; background: var(--card2); border: 1px solid var(--line); }
.rt-map { height: 260px; }
.lp-map { height: 300px; margin-top: 10px; }
.rb-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.rb-bar b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
#rb-note { margin: 4px 2px 0; min-height: 16px; }
.rb-elev { margin-top: 10px; padding: 10px 12px; }
.elev .ev-t { fill: #9aa0a6; font-size: 10px; font-weight: 600; }
.rb-save { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.rb-save .feel-note { margin-top: 0; flex: 1; min-width: 0; }
.lp-form { display: flex; align-items: center; gap: 10px; }
.lp-form input { width: 80px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px 10px; color: inherit; font: inherit; font-size: 16px; }
.lp-form .btn { margin-left: auto; }
.lp-opts { margin-top: 12px; }
.rt-time { color: var(--text); text-decoration: none; align-items: center; }
.rt-time .chip { padding: 2px 7px; font-size: 11px; margin-left: 4px; }
.rt-attach { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.card.rt-attach { margin-top: 0; }
.rt-attach select { flex: 1; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 9px 10px; color: inherit; font: inherit; font-size: 14px; color-scheme: dark; }
.route-mini { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; margin-top: 10px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.route-mini .rm-map { background: var(--card2); border-radius: 10px; overflow: hidden; line-height: 0; }
.route-mini .rm-name { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-mini > span:nth-child(2) { min-width: 0; }
.route-mini .end { color: var(--dim); display: flex; }
a.chip { text-decoration: none; }

/* ---- Oct 22 2026 fixes: Gear/Routes header buttons, gear picker, devices, start points ---- */
.top-actions { flex-shrink: 0; }
.tool-btn { background: rgba(53,204,182,.13); color: var(--accent); border-color: rgba(53,204,182,.38); }
.tool-btn.routes-btn { background: rgba(255,90,54,.12); color: #ff8a6b; border-color: rgba(255,138,107,.38); }
.tool-btn svg { width: 21px; height: 21px; }
.gear-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 0 0 12px; }
.gs-tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font: inherit; font-weight: 700; font-size: 15px; padding: 0 8px; }
.gs-tab svg { width: 18px; height: 18px; }
.gs-tab b { font-size: 12px; min-width: 20px; height: 20px; line-height: 20px; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--dim); font-variant-numeric: tabular-nums; }
.gs-tab[aria-selected="true"] { background: rgba(53,204,182,.16); color: var(--text); }
.gs-tab[aria-selected="true"] b { background: var(--accent); color: #0d1716; }
.gear-list { padding: 4px 0; }
.gear-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; }
.gear-item + .gear-item { border-top: 1px solid var(--line); }
.gear-item.retired { opacity: .6; }
.gi-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(53,204,182,.14); color: var(--accent); }
.gi-ic.dev { background: rgba(106,167,255,.14); color: #8fbcff; }
.gi-ic svg { width: 22px; height: 22px; }
.gi-ic.big { width: 48px; height: 48px; border-radius: 14px; }
.gi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gi-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gi-sub { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.gi-body .wear.compact { margin-top: 6px; }
.gi-end { flex: none; display: flex; align-items: center; gap: 6px; color: var(--dim); }
.gear-type { display: flex; gap: 8px; flex-wrap: wrap; }
.gear-type .chip { min-height: 36px; padding: 0 14px; font-size: 14px; }
.dev-head { display: flex; align-items: center; gap: 12px; }
.grid3 { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid3 .stat .v { font-size: 17px; }
.dev-auto { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-top: 14px; padding: 12px; text-align: left; background: var(--card2, #262b30); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; }
.dev-auto > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.da-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--accent); display: grid; place-items: center; color: #0d1716; }
.dev-auto[aria-pressed="true"] .da-box { background: var(--accent); }
.da-box svg { width: 14px; height: 14px; }
.dev-line { display: flex; align-items: center; gap: 8px; width: 100%; margin: 8px 0 2px; padding: 8px 10px; background: transparent; border: 1px solid var(--line); border-radius: 10px; color: var(--dim); font: inherit; font-size: 13px; text-align: left; }
.dev-line b { color: var(--text); font-weight: 600; }
.dev-line > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-line svg { width: 16px; height: 16px; flex: none; color: #8fbcff; }
.dev-line svg:last-child { color: var(--dim); }
.plan-past-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--dim); text-decoration: none; font-size: 14px; }
.plan-past-link b { color: var(--accent); font-weight: 700; }
.start-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.start-pick .sp-label { font-size: 12px; color: var(--dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.start-pick .chip { min-height: 34px; padding: 0 12px; font-size: 14px; }
.start-pick .chip svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.sp-mode { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; background: rgba(53,204,182,.12); border: 1px solid rgba(53,204,182,.35); font-size: 14px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sp-list .gear-item { cursor: default; }
.map-hint { font-size: 12px; color: var(--dim); margin: 4px 2px 0; }
/* maps: one finger pans inside the map (Leaflet sets touch-action:none there), the page scrolls when the finger starts outside it */
.leaflet-container.leaflet-touch-drag { touch-action: none; }
.nav-wrap { margin: 12px 0 4px; }
.nav-btn { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.nav-btn svg { width: 16px; height: 16px; }
.nav-wrap .map-hint { text-align: center; }

/* Start-point search (Oct 22 2026): a search field under the Start row (Draw, Make me a loop) and above the start-point map. */
.sp-search { position: relative; margin: 0 0 10px; }
.sp-sbox { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 0 10px; min-height: 44px; }
.sp-sbox:focus-within { border-color: var(--accent); }
.sp-sic { display: grid; place-items: center; color: var(--dim); flex: none; }
.sp-sic svg { width: 18px; height: 18px; }
.sp-q { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: inherit; font: inherit; font-size: 16px; padding: 10px 0; }
.sp-q::placeholder { color: var(--dim2); }
.sp-q::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.sp-sugg { margin-top: 6px; padding: 4px; display: flex; flex-direction: column; gap: 2px; max-width: 100%; box-sizing: border-box; }
.sp-sugg[hidden] { display: none; }
.sp-sug { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 10px 8px; color: var(--text); font: inherit; min-height: 48px; }
.sp-sug + .sp-sug { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.sp-pin { color: var(--accent); flex: none; margin-top: 1px; }
.sp-pin svg { width: 18px; height: 18px; }
.sp-txt { display: flex; flex-direction: column; min-width: 0; }
.sp-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.sp-det { font-size: 12.5px; color: var(--dim); margin-top: 2px; overflow-wrap: anywhere; }
.sp-empty { font-size: 13.5px; color: var(--dim); padding: 10px 8px; }
.sp-retry { align-self: flex-start; margin: 0 8px 8px; background: transparent; border: 1px solid var(--line2); color: var(--accent); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; }
.sp-tsave { margin: 0 0 4px; }
.sp-tnote { margin: 4px 2px 10px; }
.start-pick .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-smap { height: 220px; margin-top: 12px; }

/* ---------- in-app confirm sheet (Oct 22 2026, site/confirm.js; replaces window.confirm, which the Android WebView never shows) ---------- */
.cfm-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.62); display: flex; align-items: flex-end; justify-content: center;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom)); animation: cfm-fade .16s ease-out; }
.cfm { width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 20px 18px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: cfm-up .2s cubic-bezier(.2,.8,.3,1); }
.cfm-title { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.cfm-msg { margin: 0 0 18px; font-size: 16px; line-height: 1.4; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.cfm-row { display: flex; gap: 10px; }
.cfm-row .btn { flex: 1; min-width: 0; padding: 0 12px; }
.btn.cfm-danger { background: #e5484d; color: #fff; }
.cfm-bg.out { animation: cfm-fade-out .16s ease-in forwards; pointer-events: none; }
.cfm-bg.out .cfm { animation: cfm-down .16s ease-in forwards; }
@keyframes cfm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cfm-fade-out { to { opacity: 0; } }
@keyframes cfm-up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes cfm-down { to { transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { .cfm-bg, .cfm, .cfm-bg.out, .cfm-bg.out .cfm { animation: none; } }

/* Share location with Tab (Oct 22 2026): on/off switch + interval picker in Settings */
.loc-switch { position: relative; width: 48px; height: 28px; border-radius: 999px; border: 0; padding: 0; background: #3a4046; transition: background 150ms ease-out; flex: none; }
.loc-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #f2f4f5; transition: transform 150ms ease-out; }
.loc-switch[aria-checked="true"] { background: var(--accent); }
.loc-switch[aria-checked="true"] i { transform: translateX(20px); background: #121314; }
.seg.loc-iv { margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .loc-switch, .loc-switch i { transition: none; } }

/* Progress → nightly Sleep chart (Oct 23 2026) */
.sl-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.sl-chart { display: block; cursor: pointer; touch-action: manipulation; }
.sl-detail { min-height: 20px; margin: 6px 0 10px; }
.sl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sl-stats > div { background: var(--card2); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.sl-stats .k { font-size: 11.5px; color: var(--dim); font-weight: 700; white-space: nowrap; }
.sl-stats .v { font-size: 19px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Trails & Routes (Oct 25 2026) ---------- */
.rt-tabs { margin: 0 0 4px; }
.rt-build { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.rt-act { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 76px; }
.rt-act .ra-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(53,204,182,.14); color: var(--accent); }
.rt-act .ra-ic svg { width: 19px; height: 19px; }
.rt-act b { display: block; font-size: 14px; } .rt-act small { display: block; font-size: 11.5px; color: var(--dim); line-height: 1.3; margin-top: 2px; }
.rc-star { color: #ffd25e; display: inline-flex; vertical-align: -2px; margin-right: 4px; } .rc-star svg { width: 14px; height: 14px; }
.rc-kind { margin-top: 1px; } .rc-off { color: var(--accent); display: inline-flex; align-items: center; gap: 2px; } .rc-off svg { width: 11px; height: 11px; }
.route-card + .route-card, .trail-card + .trail-card { margin-top: 10px; }
.trail-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; color: var(--text); text-decoration: none; padding: 10px; }
.trl-map { height: 300px; margin-top: 4px; }
.trl-legend { display: flex; gap: 12px; margin: 6px 2px 0; flex-wrap: wrap; } .trl-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.park-item .gi-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; } .park-item .gi-main b { font-size: 14px; }
.gear-list .gi-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; color: var(--text); text-decoration: none; }
.stat .v.sm { font-size: 14px; line-height: 1.25; }
.tr-from { margin-top: 10px; } .tr-from button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; padding-right: 6px; }
.fav-btn { color: var(--dim); } .fav-btn.on { color: #ffd25e; } .fav-btn svg { width: 20px; height: 20px; }
.off-save { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; } .off-save svg { width: 18px; height: 18px; }
.off-card { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; }
.off-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.07); color: var(--dim); } .off-ic.ok { background: rgba(53,204,182,.14); color: var(--accent); } .off-ic svg { width: 18px; height: 18px; }
.off-t { flex: 1; display: flex; flex-direction: column; min-width: 0; } .off-t b { font-size: 14px; }
.off-map { background: #16191c; } .off-map .leaflet-container { background: #16191c; }
.fr-item { padding: 10px; } .fr-item + .fr-item { margin-top: 10px; } .fr-top { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; } .fr-save { margin-top: 10px; }
.start-pick .chip svg { width: 14px; height: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.seg.mini button svg { width: 13px; height: 13px; vertical-align: -2px; }
.section-head .seg.mini button { padding: 5px 12px; white-space: nowrap; }
.dir-btn { display: flex; align-items: center; justify-content: center; gap: 8px; } .dir-btn svg { width: 16px; height: 16px; }
.off-map.leaflet-container { background: #16191c; }
.trail-card .rc-map { display: grid; place-items: center; }

/* Live cadence (Oct 25 2026, app 0.8): big steps/min next to distance on the run screen, Settings stepper, run-detail chart */
.run-hero{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start;margin:10px 0 2px}
.run-hero .hero-v{font-size:60px;font-weight:800;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.cadbig{border-radius:16px;background:#1f2327;padding:10px 12px 12px;text-align:left;border:1px solid #2a2f34}
.cadbig .cv{font-size:56px;font-weight:800;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:#f2f4f5}
.cadbig .ck{font-size:12px;color:var(--dim);margin-top:4px}
.cadbig .cs{font-size:13px;font-weight:700;margin-top:6px;line-height:1.25}
.cadbig.s-ok{border-color:rgba(53,204,182,.55)}.cadbig.s-ok .cv,.cadbig.s-ok .cs{color:#35ccb6}
.cadbig.s-low{border-color:#e89b19;background:rgba(232,155,25,.10)}.cadbig.s-low .cv,.cadbig.s-low .cs{color:#e89b19}
.cadbig.s-paused .cv,.cadbig.s-warming .cv,.cadbig.s-no_permission .cv,.cadbig.s-no_sensor .cv{color:#5d666e}.cadbig.s-paused .cs,.cadbig.s-warming .cs{color:var(--dim)}
.cadbig.s-no_permission .cs,.cadbig.s-no_sensor .cs{color:#e89b19}
.cad-ctl{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:10px}
.cad-ctl .chip{margin:0}
.cad-step{display:inline-flex;align-items:center;gap:8px}.cad-step b{font-size:20px;min-width:36px;text-align:center;font-variant-numeric:tabular-nums}
.cad-step .btn{min-width:40px;padding-left:0;padding-right:0;font-size:18px}
.cadx{margin-top:14px;background:#1f2327;border-radius:14px;padding:12px}
.cadsvg{display:block;margin-top:6px}
.cadx .sp-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}


/* ---------------- Fix1 (Oct 26 2026): Today hero, compact check-in, run linking, large text, 44 px targets ---------------- */
.hero-today { margin-top: 6px; }
.hero-today .hero-rest { margin: 0 2px 8px; }
.hero-today .done-today { display: block; text-decoration: none; color: inherit; margin-bottom: 12px; }
.hero-today .done-today h3 { display: flex; align-items: center; gap: 8px; }
.hero-today .done-today .check { width: 20px; height: 20px; color: var(--accent); flex: none; }
.hero-today .done-today .check svg { width: 20px; height: 20px; }
.hero-act { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn.big { min-height: 56px; font-size: 18px; background: var(--accent); color: #0d1f1c; }
.hero-today .nudge { margin-top: 10px; }
.nudge-act { margin-top: 10px; }
.chk-compact { margin-top: 12px; }
.chk-compact .card { padding: 4px 6px; }
.chk-line { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "l1 go" "l2 go"; align-items: center; gap: 2px 10px; width: 100%; min-height: 56px; padding: 8px 10px; background: transparent; border: 0; color: inherit; text-align: left; font: inherit; border-radius: 12px; }
.chk-l1 { grid-area: l1; font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.chk-l1 .check, .chk-l1 .check svg { width: 16px; height: 16px; color: var(--accent); }
.chk-l2 { grid-area: l2; min-width: 0; overflow-wrap: anywhere; }
.chk-go { grid-area: go; font-weight: 800; font-size: 14px; color: var(--accent); padding: 10px 4px; }
.chk-body { padding: 4px 10px 12px; }
.notice.runway { margin-top: 14px; background: rgba(53,204,182,.08); border-color: rgba(53,204,182,.28); }
.notice.runway .btn, .outbox-note .btn, .rd-clash .btn-row { margin-top: 10px; }
.outbox-note { margin: 0 0 12px; }
.flabel { display: block; font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.pace-out { min-height: 46px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--card2); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pace-out.warn { color: #f2b347; }
.link-pick { margin-top: 14px; }
.lp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-opt { flex: 1 1 8.5em; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: inherit; text-align: left; }
.lp-opt b { font-size: 14px; }
.lp-opt span { font-size: 12px; color: var(--dim); }
.lp-opt[aria-checked="true"] { border-color: var(--accent); background: rgba(53,204,182,.12); }
.lp-opt[aria-checked="true"] span { color: #bfeee6; }
.lr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.lr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--text); font: inherit; text-align: left; }
.lr-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-log { margin-top: 4px; }
.rd-clash { margin-top: 14px; }

/* Large text (Android font size up to 200%): rows wrap instead of overflowing. Widths are in em, so they grow with the text. */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.topbar > div:first-child { min-width: 0; flex: 1 1 8em; }
.topbar h1 { overflow-wrap: anywhere; }
.top-actions { flex-wrap: wrap; justify-content: flex-end; }
.row2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5em), 1fr)); }
.kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.5em), 1fr)); }
.tabbar nav { height: auto; min-height: var(--tab-h); }
.tabbar a { min-width: 0; padding: 6px 2px; text-align: center; }
.tabbar a span { max-width: 100%; overflow-wrap: break-word; hyphens: manual; line-height: 1.1; }
#app { padding-bottom: calc(var(--tab-real, var(--tab-h)) + 28px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(var(--tab-real, var(--tab-h)) + 18px + env(safe-area-inset-bottom)); }
.section-head { flex-wrap: wrap; row-gap: 4px; }
.btn { text-align: center; }
.btn-row > .btn { min-width: 0; }
.wrow > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.detail-stats { flex-wrap: wrap; }

/* Tap targets: at least 44 px. Round icon buttons grow to 44; small pills keep their look and get a taller invisible hit area. */
.icon-btn { width: 44px; height: 44px; }
.btn.sm, button.chip, .seg.mini button, .seg button, [data-act="sleep-n"], [data-act="cad-mode"], [data-act="cad-voice"], .rd-box, .rd-x, .rv-btn, .feel button { position: relative; }
.btn.sm::after { content: ""; position: absolute; inset: -4px 0; }
button.chip::after { content: ""; position: absolute; inset: -8px 0; }
.seg.mini button::after { content: ""; position: absolute; inset: -10px 0; }
.rd-box::after, .rd-x::after, .rv-btn::after { content: ""; position: absolute; inset: -8px; }
a.aside, .section-head a.aside { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0 0 12px; margin: -14px 0; }
.race-eve { margin-bottom: 10px; }
