/* Fedisport design tokens. Calm, editorial, numbers first. */
:root {
  --paper: #f6f4ef;
  --surface: #fffdf9;
  --ink: #1d2321;
  --ink-2: #4c5652;
  --ink-3: #7d8783;
  --line: #e3dfd6;
  --accent: #0f6e63;        /* fjord green */
  --accent-soft: #d9ece8;
  --warm: #d4572e;          /* used sparingly: highlights, fastest split */
  --route: #0f6e63;
  --route-halo: #fffdf9;

  --radius: 14px;
  --radius-sm: 8px;
  --space: 1rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: ui-sans-serif, system-ui, -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgb(29 35 33 / .04), 0 4px 16px rgb(29 35 33 / .05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121614; --surface: #1a1f1d; --ink: #ecefec; --ink-2: #b4bcb8; --ink-3: #87908c;
    --line: #2b3330; --accent: #4fc1b0; --accent-soft: #1d3a35; --warm: #f08a63;
    --route: #4fc1b0; --route-halo: #1a1f1d; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121614; --surface: #1a1f1d; --ink: #ecefec; --ink-2: #b4bcb8; --ink-3: #87908c;
  --line: #2b3330; --accent: #4fc1b0; --accent-soft: #1d3a35; --warm: #f08a63;
  --route: #4fc1b0; --route-halo: #1a1f1d; --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Chrome */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 880px; margin: 0 auto; padding: 1.1rem 1rem;
}
.brand { display: flex; gap: .5rem; align-items: center; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 1.25rem; align-items: center; font-size: .95rem; }
.nav a { color: var(--ink-2); }
.page { max-width: 880px; margin: 0 auto; padding: 0 1rem 3rem; }
.foot { max-width: 880px; margin: 0 auto; padding: 2rem 1rem; color: var(--ink-3); font-size: .85rem; }

.btn {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px;
  background: var(--accent); color: var(--surface); font-weight: 600;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-quiet { background: var(--accent-soft); color: var(--accent); }

/* Home */
.hero { padding: 4rem 0 2rem; max-width: 40rem; }
.eyebrow { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.08; letter-spacing: -.025em; margin: .5rem 0 1rem; }
.lede { color: var(--ink-2); font-size: 1.15rem; }

/* Activity */
.activity { display: grid; gap: 1.25rem; }
.activity-head { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.who { display: flex; gap: .75rem; align-items: center; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.who-name { font-weight: 600; }
.who-meta { color: var(--ink-3); font-size: .88rem; }
.chip { font-size: .8rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.activity-title { font-size: clamp(1.6rem, 4.5vw, 2.3rem); letter-spacing: -.02em; line-height: 1.15; margin: 0; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats > div { padding: 1rem .25rem; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 1rem; }
.stats dt { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.stats dd {
  margin: .15rem 0 0; font: 650 clamp(1.5rem, 4vw, 2rem)/1.1 var(--font-num);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.stats small { font-size: .55em; font-weight: 500; color: var(--ink-2); margin-left: .15em; letter-spacing: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 .75rem; font-weight: 600; }

.map-card { padding: .5rem; overflow: hidden; }
.route { width: 100%; height: auto; display: block; }
.route path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-shadow { stroke: var(--route-halo); stroke-width: 7; }
.route-line { stroke: var(--route); stroke-width: 3.5; }
.map-note { margin: 0 .75rem .5rem; color: var(--ink-3); font-size: .82rem; }

.elevation { width: 100%; height: 140px; display: block; }
.ele-area { fill: var(--accent-soft); }
.ele-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }

.splits { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.splits th { text-align: left; color: var(--ink-3); font-weight: 500; font-size: .8rem; padding: 0 0 .4rem; }
.splits td { padding: .32rem 0; border-top: 1px solid var(--line); }
.splits td:first-child { width: 3.5rem; color: var(--ink-2); }
.splits td:nth-child(2) { width: 6.5rem; font-weight: 600; }
.bar-col { width: auto; }
.bar { width: 100%; height: 10px; display: block; }
.bar rect { fill: var(--accent); opacity: .75; }
.fastest .bar rect { fill: var(--warm); opacity: 1; }
.fastest td:nth-child(2) { color: var(--warm); }

.activity-foot { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .85rem; }
.visibility::before { content: "●"; color: var(--accent); margin-right: .4rem; font-size: .7em; vertical-align: middle; }

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div + div { border-left: 0; padding-left: .25rem; }
  .stats > div:nth-child(even) { border-left: 1px solid var(--line); padding-left: 1rem; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .nav .hide-sm { display: none; }
}

/* Forms, dashboard, feed */
.inline { display: inline; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; }
.linkish:hover { color: var(--accent); }
.nav-user { color: var(--ink-3); font-size: .9rem; }
.muted { color: var(--ink-3); }
.narrow { max-width: 30rem; margin: 2rem auto 0; }
.page-title { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.025em; line-height: 1.1; margin: 1rem 0 .5rem; }
.alert { background: color-mix(in srgb, var(--warm) 12%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warm) 40%, var(--line)); padding: .7rem 1rem; border-radius: var(--radius-sm); }

.form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form small { color: var(--ink-3); font-weight: 400; }
.form input {
  font: inherit; font-weight: 400; padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 100%;
}
.form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.handle-input { display: flex; align-items: center; gap: .3rem; }
.handle-input > span { color: var(--ink-3); font-weight: 600; }
button.btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; justify-self: start; }

.year { margin-bottom: 1.5rem; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.year-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.year-sport { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.year-big { font: 650 2.2rem/1.1 var(--font-num); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: .25rem 0; }
.year-big small { font-size: .45em; font-weight: 500; color: var(--ink-2); margin-left: .2em; letter-spacing: 0; }
.year-meta { color: var(--ink-2); font-size: .88rem; }

.upload-card { margin-bottom: 1.5rem; }
.upload-form { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.file-pick { display: grid; gap: .15rem; cursor: pointer; flex: 1 1 16rem; }
.file-pick input { font-size: .9rem; color: var(--ink-2); }
.file-pick span { font-weight: 600; }
.file-pick small { color: var(--ink-3); }
.upload-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0 0; margin-top: .5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.upload-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-pending .upload-state { color: var(--accent); }
.upload-failed .upload-state { color: var(--warm); }

.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.feed-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .9rem; color: var(--ink);
}
.feed-item:hover { text-decoration: none; border-color: var(--accent); }
.feed-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { color: var(--ink-3); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) {
  .feed-item { grid-template-columns: auto 1fr; }
  .feed-meta { grid-column: 1 / -1; }
}
.map-warn { color: var(--warm); }

/* Theme switch, nav icons */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.theme-switch {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.theme-switch button {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-3); cursor: pointer;
}
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.theme-switch svg, .nav-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch svg .fill { fill: currentColor; stroke: none; }
.nav-icon { display: grid; place-items: center; color: var(--ink-2); }
.nav-icon svg { width: 19px; height: 19px; }
.nav-user, .nav-icon { border-bottom: 2px solid transparent; }
.nav .current { color: var(--accent); }
a.nav-user { color: var(--ink-2); font-weight: 600; }
a.nav-user:hover { color: var(--accent); text-decoration: none; }

/* Settings */
.settings-section { margin-bottom: 1.25rem; }
.section-title { font-size: 1.15rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.sub-title { font-size: .95rem; margin: 1.5rem 0 .25rem; }
.hint { color: var(--ink-2); font-size: .9rem; margin: .25rem 0 .75rem; font-weight: 400; }
.saved { color: var(--accent); font-weight: 600; font-size: .9rem; margin: 0 0 .5rem; }
.form textarea, .form select, .suggestion input, .suggestion select, .hide-start select {
  font: inherit; font-weight: 400; padding: .55rem .7rem; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 100%;
}
.form textarea { resize: vertical; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.choice legend { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; padding: 0; }
.choice-row {
  display: flex !important; gap: .65rem; align-items: flex-start; font-weight: 400 !important;
  padding: .6rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.choice-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.choice-row input { margin-top: .2rem; accent-color: var(--accent); width: auto; }
.choice-row span { display: grid; gap: .1rem; }
.choice-row small { color: var(--ink-3); }
.rec { font-style: normal; font-size: .75rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: .05rem .45rem; border-radius: 999px; margin-left: .35rem; }

.zone-list { list-style: none; padding: 0; margin: .25rem 0 .75rem; display: grid; gap: .4rem; }
.zone-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.zone-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.zone-name { font-weight: 600; }
.zone-meta { color: var(--ink-3); font-size: .88rem; margin-right: auto; }
.linkish.danger:hover { color: var(--warm); }

.suggestion {
  display: grid; gap: .75rem; padding: .9rem 1rem; margin-top: .75rem;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent-soft) 35%, transparent);
}
.suggestion-text { display: grid; gap: .15rem; }
.suggestion-text span { color: var(--ink-2); font-size: .9rem; }
.suggestion-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.suggestion-actions input { flex: 1 1 8rem; width: auto; }
.suggestion-actions select { width: auto; }
.privacy-card { margin-bottom: 1.25rem; }
.privacy-card .suggestion { margin-top: 0; }

.map-warn p { margin: 0 0 .5rem; }
.hide-start { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hide-start select { width: auto; padding: .35rem .5rem; }
.btn-small { padding: .4rem .85rem; font-size: .88rem; }
.hide-start a { font-size: .88rem; }
.who-name a { color: var(--ink); }

/* Profile */
.profile-head { display: flex; gap: 1.25rem; align-items: flex-start; margin: 1.5rem 0 1.5rem; flex-wrap: wrap; }
.avatar-lg { width: 84px; height: 84px; font-size: 2.1rem; flex: none; }
.profile-id { flex: 1 1 16rem; min-width: 0; }
.profile-name { font-size: clamp(1.6rem, 4.5vw, 2.2rem); letter-spacing: -.02em; margin: .1rem 0 0; line-height: 1.15; }
.profile-handle { color: var(--ink-3); font-size: .95rem; }
.profile-bio { margin: .6rem 0 .4rem; color: var(--ink-2); max-width: 38rem; }
.profile-meta { color: var(--ink-3); font-size: .88rem; }
.lock::before { content: "🔒"; font-size: .8em; margin-right: .25rem; }
.profile-edit { align-self: center; }
.profile-stats { margin-bottom: 1.5rem; }
.dd-small { font-size: 1.25rem !important; }
.profile-locked { padding: 1.5rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.year-grid + .card-title, .profile-stats + .card-title { margin-top: 1.75rem; }

@media (max-width: 560px) {
  .nav { gap: .6rem; }
}

/* Layout helpers */
.narrow.wide { max-width: 40rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.toolbar { display: flex; gap: .5rem; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem; }
.form-actions { display: flex; gap: 1rem; align-items: center; }
.unit-input { position: relative; display: block; }
.unit-input input { padding-right: 3.2rem; }
.unit-input > span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; font-size: .88rem; pointer-events: none; }
.choice-inline { display: flex; flex-wrap: wrap; gap: .45rem; }
.choice-inline legend { width: 100%; }
.choice-inline .choice-row { padding: .45rem .75rem; align-items: center; }
.choice-inline .choice-row input { margin-top: 0; }
.legend-note, .choice legend small, .form label small { color: var(--ink-3); font-weight: 400; }

/* Sport picker: big tappable pills */
.sport-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.sport-pick legend { font-weight: 600; font-size: .92rem; margin-bottom: .45rem; padding: 0; width: 100%; }
.sport-option input { position: absolute; opacity: 0; pointer-events: none; }
.sport-option span {
  display: inline-block; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line);
  font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; background: var(--paper);
}
.sport-option input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.sport-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Effort 1–10 */
.effort { border: 0; padding: 0; margin: 0; }
.effort legend { font-weight: 600; font-size: .92rem; margin-bottom: .45rem; padding: 0; }
.effort-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.effort-scale label { display: block !important; }
.effort-scale input { position: absolute; opacity: 0; pointer-events: none; }
.effort-scale span {
  display: grid; place-items: center; height: 2.3rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.effort-scale label:nth-child(n+8) input:checked + span { background: var(--warm); border-color: var(--warm); color: var(--surface); }
.effort-scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.effort-scale input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.effort-ends { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .8rem; margin-top: .3rem; }

/* Activity extras */
.activity-notes { margin: -.5rem 0 0; color: var(--ink-2); white-space: pre-line; max-width: 40rem; }
.activity-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.tag { font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.tag strong { color: var(--ink); }
.manual-mark { font-size: .72rem; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .45rem; margin-left: .35rem; vertical-align: middle; }

/* Gear icons (masks follow currentColor) */
.gear-ico { display: inline-block; width: 18px; height: 18px; background: currentColor; flex: none;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.gear-ico-lg { width: 30px; height: 30px; }
.gear-shoes { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 16v-5.5L7 7l2.5 3.5c1.6.6 3.3.8 5 .9l4.3.6A3 3 0 0 1 21.5 15v1z'/%3E%3Cpath d='M3 16h18.5v1.5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 11l1.5-1.5M12.5 11.5 14 10'/%3E%3C/svg%3E"); }
.gear-bike { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='16' r='3.5'/%3E%3Ccircle cx='18.5' cy='16' r='3.5'/%3E%3Cpath d='M5.5 16 9 9h6l3.5 7M9 9 12 16h-1M15 9l-1-3h2'/%3E%3C/svg%3E"); }
.gear-skis { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20 17 3.5a1.5 1.5 0 0 1 2.3 1.9L7 21M9 21l11-14'/%3E%3Cpath d='M9 13.5l3 2.5'/%3E%3C/svg%3E"); }
.gear-other { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 7.5v9L12 21 4 16.5v-9z'/%3E%3Cpath d='M4 7.5l8 4.5 8-4.5M12 12v9'/%3E%3C/svg%3E"); }

/* Gear on an activity */
.gear-box { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .7rem 0; }
.gear-chips { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.gear-label { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-right: .25rem; }
.gear-chip { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .9rem; }
.gear-chip:hover { text-decoration: none; filter: brightness(.97); }
.gear-chips .btn-small { margin-left: auto; }
.gear-pick { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.gear-option { display: inline-flex; gap: .45rem; align-items: center; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.gear-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, transparent); color: var(--accent); font-weight: 600; }
.gear-option input { accent-color: var(--accent); }
.gear-actions { display: flex; gap: 1rem; align-items: center; width: 100%; margin-top: .25rem; font-size: .92rem; }
.gear-manage { margin-left: auto; }

/* Gear page */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.gear-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); display: grid; gap: .45rem; align-content: start; }
.gear-card:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.gear-card-head { display: flex; gap: .75rem; align-items: center; color: var(--accent); }
.gear-card-id { flex: 1; min-width: 0; color: var(--ink); }
.gear-card-id h3 { margin: 0; font-size: 1.05rem; }
.gear-card-sub { color: var(--ink-3); font-size: .85rem; }
.gear-edit { font-size: .88rem; }
.gear-km { font: 650 2.3rem/1.05 var(--font-num); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.gear-km small { font-size: .42em; font-weight: 500; color: var(--ink-2); margin-left: .2em; letter-spacing: 0; }
.gear-bar svg { width: 100%; height: 6px; display: block; }
.gear-bar .track { fill: var(--line); }
.gear-bar .fill { fill: var(--accent); }
.is-due .gear-bar .fill { fill: var(--warm); }
.gear-alert { font-size: .85rem; color: var(--ink-2); }
.is-due .gear-alert { color: var(--warm); font-weight: 600; }
.gear-meta { color: var(--ink-3); font-size: .85rem; }
.gear-retire { margin-top: .25rem; }
.gear-retire .linkish { font-size: .88rem; }
.is-retired { opacity: .72; box-shadow: none; }
.is-retired .gear-card-head { color: var(--ink-3); }
.retired-title { margin-top: 2rem; }
.gear-add { margin-bottom: 1.5rem; }

/* Danger zone */
.danger-zone { margin-top: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; }
.danger-zone summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.btn-danger { background: var(--warm); color: var(--surface); }

/* Feed head + Add activity menu */
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::before { content: "+"; font-size: 1.15em; line-height: 1; font-weight: 600; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + .45rem); z-index: 10; min-width: 18rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(0 0 0 / .12); padding: .35rem; display: grid;
}
.menu-panel a { display: flex; gap: .75rem; align-items: center; padding: .65rem .75rem; border-radius: var(--radius-sm); color: var(--ink); }
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--accent-soft); text-decoration: none; outline: none; }
.menu-panel span:last-child { display: grid; gap: .1rem; }
.menu-panel small { color: var(--ink-3); font-size: .82rem; }
.menu-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); flex: none; position: relative; }
.menu-ico::after { content: ""; position: absolute; inset: 8px; background: var(--accent);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.menu-upload, .drop-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M7.5 8.5 12 4l4.5 4.5'/%3E%3Cpath d='M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E"); }
.menu-manual { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E"); }

/* Year strip: this year's totals in one quiet line */
.year-strip { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: baseline; padding: .8rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; color: var(--ink-2); font-size: .95rem; }
.year-strip-label { color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.year-strip strong { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 1.1rem; }

/* Feed cards */
.feed-cards { gap: .75rem; }
.feed-card {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; color: var(--ink); box-shadow: var(--shadow);
}
.feed-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.feed-card-main { min-width: 0; flex: 1; display: grid; gap: .35rem; }
.feed-card-top { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.feed-when { color: var(--ink-3); font-size: .85rem; }
.feed-card-title { font-weight: 650; font-size: 1.15rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-stats { display: flex; gap: 1.5rem; margin: .1rem 0 0; }
.feed-stats dt { color: var(--ink-3); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.feed-stats dd { margin: 0; font: 650 1.25rem/1.2 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.feed-stats small { font-size: .6em; font-weight: 500; color: var(--ink-2); margin-left: .15em; }
.feed-route { width: 120px; height: 90px; flex: none; }
.feed-route path { fill: none; stroke: var(--route); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.uploads-card { margin-bottom: .75rem; padding: .6rem 1.1rem .8rem; }
.uploads-card .upload-row:first-child { border-top: 0; margin-top: 0; }
.empty-feed { text-align: center; padding: 2rem 1.5rem; }
@media (max-width: 560px) {
  .feed-route { width: 84px; height: 63px; }
  .feed-stats { gap: 1rem; }
  .feed-stats dd { font-size: 1.05rem; }
  .menu-panel { min-width: 16rem; }
}

/* Upload page */
.upload-drop { display: grid; gap: 1rem; justify-items: center; }
.drop-zone {
  width: 100%; display: grid; gap: .35rem; justify-items: center; text-align: center; cursor: pointer;
  padding: 2rem 1rem; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 30%, transparent);
}
.drop-zone:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.drop-zone input { font-size: .9rem; color: var(--ink-2); max-width: 100%; }
.drop-zone small { color: var(--ink-3); }
.drop-ico { width: 34px; height: 34px; background: var(--accent);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.drop-zone input { margin-top: .5rem; }
.drop-zone input::file-selector-button {
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .45rem 1rem; margin-right: .75rem;
  background: var(--accent); color: var(--surface); cursor: pointer;
}

/* Speed-coloured routes. Diverging around the activity's typical speed:
   0 = fastest (teal-green) … 4 = typical (light neutral) … 8 = slowest (red).
   Arms differ in lightness as well as hue; validated for CVD separation (ΔE ≥ 9). */
:root {
  --pace-0: #00806a; --pace-1: #529682; --pace-2: #81ab9b; --pace-3: #adc0b5; --pace-4: #d9d6cf;
  --pace-5: #d9b2a5; --pace-6: #d68e7d; --pace-7: #ce6753; --pace-8: #c43a26;
  --route-casing: #2b3330;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pace-0: #3dbb9c; --pace-1: #499f87; --pace-2: #4e8373; --pace-3: #4e685f; --pace-4: #4a4e4c;
    --pace-5: #745a51; --pace-6: #9d6555; --pace-7: #c76f58; --pace-8: #f2775a;
    --route-casing: #c9d0cc;
  }
}
:root[data-theme="dark"] {
  --pace-0: #3dbb9c; --pace-1: #499f87; --pace-2: #4e8373; --pace-3: #4e685f; --pace-4: #4a4e4c;
  --pace-5: #745a51; --pace-6: #9d6555; --pace-7: #c76f58; --pace-8: #f2775a;
  --route-casing: #c9d0cc;
}
.route path, .feed-route path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-casing { stroke: var(--route-casing); stroke-width: 6.5; opacity: .9; }
.route .route-seg { stroke: var(--route); stroke-width: 4; }
.feed-route .route-casing { stroke-width: 4.4; }
.feed-route .route-seg { stroke: var(--route); stroke-width: 2.6; }
.route-seg.pace-0 { stroke: var(--pace-0); } .route-seg.pace-1 { stroke: var(--pace-1); }
.route-seg.pace-2 { stroke: var(--pace-2); } .route-seg.pace-3 { stroke: var(--pace-3); }
.route-seg.pace-4 { stroke: var(--pace-4); } .route-seg.pace-5 { stroke: var(--pace-5); }
.route-seg.pace-6 { stroke: var(--pace-6); } .route-seg.pace-7 { stroke: var(--pace-7); }
.route-seg.pace-8 { stroke: var(--pace-8); }
.route .route-seg:hover { stroke-width: 7; }
.km-marker circle { fill: var(--surface); stroke: var(--route-casing); stroke-width: 1.8; }
.km-marker text { fill: var(--ink); font: 700 10px var(--font-num); text-anchor: middle; font-variant-numeric: tabular-nums; }
.pace-legend { display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .75rem; align-items: center; margin: .25rem .75rem .6rem; font-size: .82rem; color: var(--ink-2); }
.pace-legend strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pace-legend-bar { width: 100%; height: 8px; border-radius: 4px; overflow: hidden; display: block; outline: 1px solid var(--line); }
.pace-legend-bar rect.pace-0 { fill: var(--pace-0); } .pace-legend-bar rect.pace-1 { fill: var(--pace-1); }
.pace-legend-bar rect.pace-2 { fill: var(--pace-2); } .pace-legend-bar rect.pace-3 { fill: var(--pace-3); }
.pace-legend-bar rect.pace-4 { fill: var(--pace-4); } .pace-legend-bar rect.pace-5 { fill: var(--pace-5); }
.pace-legend-bar rect.pace-6 { fill: var(--pace-6); } .pace-legend-bar rect.pace-7 { fill: var(--pace-7); }
.pace-legend-bar rect.pace-8 { fill: var(--pace-8); }
.pace-legend-mid { grid-column: 1 / -1; text-align: center; color: var(--ink-3); }

/* Stacked activity charts on a shared distance axis */
.charts { display: grid; gap: .25rem; }
.charts-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.charts-head .card-title { margin: 0; }
.readout { margin: 0; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.chart { display: grid; gap: .2rem; padding-top: .6rem; }
.chart + .chart { border-top: 1px solid var(--line); }
.chart-label { display: flex; gap: .6rem; align-items: baseline; font-size: .85rem; }
.chart-label strong { color: var(--ink); }
.chart-label span { color: var(--ink-3); }
.chart-plot { position: relative; height: 110px; touch-action: pan-y; cursor: crosshair; }
.chart-plot svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-plot .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-area { fill: var(--accent-soft); }
.chart-avg { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 6 4; }
.chart-tick { position: absolute; right: 0; font-size: .72rem; color: var(--ink-3); background: var(--surface); padding: 0 .25rem; border-radius: 4px; font-variant-numeric: tabular-nums; pointer-events: none; }
.chart-tick-top { top: -2px; }
.chart-tick-bottom { bottom: -2px; }
.crosshair { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--ink-2); opacity: 0; pointer-events: none; transition: opacity .1s; }
.crosshair.on { opacity: .75; }
.chart-axis { position: relative; height: 1.4rem; display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); padding-top: .2rem; }
.chart-axis .placed { position: absolute; transform: translateX(-50%); }
.chart-axis .placed:first-child { transform: none; }
.chart-axis-unit { margin-left: auto; padding-left: .5rem; }
.chart-axis:has(.placed) .chart-axis-unit { position: absolute; right: 0; top: 1.15rem; }
.route-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 3; opacity: 0; pointer-events: none; }
.route-dot.on { opacity: 1; }
.hr-col { color: var(--ink-2); font-variant-numeric: tabular-nums; width: 3.5rem; }
.route .route-seg, .route .route-casing { transition: opacity .12s; }
.route.focusing .route-seg { opacity: .3; }
.route.focusing .route-casing { opacity: .35; }
.route-focus { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

/* Import */
.menu-import { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h10l6 6v10H4z'/%3E%3Cpath d='M14 4v6h6M9 15l3 3 3-3M12 11v7'/%3E%3C/svg%3E"); }
.steps { margin: 1rem 0; padding: 1rem 1.25rem 1rem 2.4rem; display: grid; gap: .6rem; color: var(--ink-2); }
.steps strong { color: var(--ink); }
.import-vis { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; justify-self: stretch; }
.import-vis select { font: inherit; font-weight: 400; padding: .5rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.hint-list { color: var(--ink-2); font-size: .9rem; padding-left: 1.2rem; display: grid; gap: .35rem; margin-top: 1rem; }
.import-card { margin: 1rem 0; display: grid; gap: .6rem; }
.import-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.import-state { color: var(--accent); font-weight: 600; }
.import-failed .import-state { color: var(--warm); }
.import-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; margin: 0; }
.import-stats dt { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.import-stats dd { margin: 0; font: 650 1.4rem/1.2 var(--font-num); font-variant-numeric: tabular-nums; }
.import-errors summary { cursor: pointer; color: var(--ink-2); }
.import-errors ul { font-size: .88rem; color: var(--ink-2); }

/* Media carousel: map first, then photos */
.media-card { padding: .5rem; overflow: hidden; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; min-width: 0; }
.slide-photo { display: grid; grid-template-rows: 1fr auto; align-items: center; justify-items: center; background: var(--paper); border-radius: var(--radius-sm); min-height: 320px; }
.photo-link { display: grid; place-items: center; width: 100%; height: 100%; }
.slide-photo img { max-width: 100%; max-height: min(70vh, 640px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); display: block; }
.slide-photo figcaption { padding: .5rem .75rem; color: var(--ink-2); font-size: .88rem; text-align: center; }
.carousel-nav { display: flex; justify-content: center; align-items: center; gap: .75rem; padding: .35rem 0 .15rem; }
.carousel-dots { display: flex; gap: 6px; align-items: center; }
.carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: block; }
.carousel-dots .dot.on { background: var(--accent); width: 18px; border-radius: 4px; }
.carousel-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.1rem; line-height: 1; display: grid; place-items: center; }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.add-photos { margin: -.6rem 0 0; text-align: right; font-size: .9rem; }

/* Feed photo thumbnail */
.feed-photo { position: relative; width: 90px; height: 90px; flex: none; }
.feed-photo img { width: 90px; height: 90px; border-radius: var(--radius-sm); object-fit: cover; display: block; }
.feed-photo-more { position: absolute; right: 4px; bottom: 4px; background: rgb(0 0 0 / .6); color: #fff; font-size: .75rem; font-weight: 600; padding: .05rem .4rem; border-radius: 999px; }
.feed-card:has(.feed-photo) .feed-route { width: 90px; height: 68px; }
@media (max-width: 560px) {
  .feed-photo, .feed-photo img { width: 64px; height: 64px; }
  .feed-card:has(.feed-photo) .feed-route { display: none; }
}

/* Photo manager */
.photo-manager { margin-top: 1.25rem; display: grid; gap: .75rem; }
.photo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.photo-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: .9rem; align-items: center; }
.photo-list img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.photo-alt { display: flex; gap: .5rem; align-items: flex-end; }
.photo-alt label { flex: 1; display: grid; gap: .25rem; font-weight: 600; font-size: .85rem; }
.photo-alt small { color: var(--ink-3); font-weight: 400; }
.photo-alt input { font: inherit; font-weight: 400; padding: .45rem .6rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 100%; }
.photo-upload { display: grid; gap: .75rem; }
.drop-zone-small { padding: 1.1rem 1rem; }
@media (max-width: 560px) { .photo-list li { grid-template-columns: 64px 1fr; } .photo-list img { width: 64px; height: 64px; } }
.import-line { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.import-line strong { color: var(--ink); }
.import-cancel { margin: 0; }
.import-cancelled .import-state { color: var(--ink-3); }
.import-banner { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; margin-bottom: 1rem;
  border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-size: .92rem; font-variant-numeric: tabular-nums; }
.import-banner:hover { text-decoration: none; filter: brightness(.98); }
.import-banner-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; flex: none; }
.import-banner-go { margin-left: auto; color: var(--accent); font-weight: 600; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .import-banner-dot { animation: none; } }

/* Feed paging */
.feed-month { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem .25rem .15rem; border-bottom: 1px solid var(--line); margin-bottom: .1rem; }
.feed-month:first-child { padding-top: .25rem; }
.feed-month h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.01em; }
.feed-month span { color: var(--ink-3); font-size: .85rem; font-variant-numeric: tabular-nums; }
.feed-more { display: grid; place-items: center; padding: 1rem 0; }
.feed-more-loading { display: none; color: var(--ink-3); font-size: .9rem; }
.feed-more.htmx-request .btn { display: none; }
.feed-more.htmx-request .feed-more-loading { display: inline; }
.feed-end { text-align: center; color: var(--ink-3); font-size: .9rem; padding: 1.25rem 0 .25rem; }
.paged-note { margin: 0 0 .75rem; font-size: .9rem; }

/* Privacy-zone suggestion sketch */
.suggestion-body { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.zone-sketch { width: 240px; height: 180px; display: block; }
.sketch-bg { fill: var(--surface); stroke: var(--line); }
.sketch-route { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.sketch-zone { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; transition: r .2s; }
.sketch-centre { fill: var(--accent); }
.sketch-scale { stroke: var(--ink-2); stroke-width: 2; }
.sketch-scale-label { fill: var(--ink-2); font: 600 9px var(--font); }
.suggestion-links { font-size: .88rem; color: var(--ink-2); }
.suggestion-links small { color: var(--ink-3); }
.suggestion-osm { font-size: .88rem; }
.suggestion-osm small { display: block; color: var(--ink-3); font-size: .78rem; }
@media (max-width: 560px) {
  .suggestion-body { grid-template-columns: 1fr; }
  .zone-sketch { width: 100%; height: auto; }
}
@media (prefers-reduced-motion: reduce) { .sketch-zone { transition: none; } }
.suggestion-period { font-weight: 600; font-size: .78rem; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .5rem; margin-left: .35rem; vertical-align: middle; white-space: nowrap; }
.zone-dot-off { background: var(--ink-3); box-shadow: 0 0 0 4px var(--line); }
.zone-row { flex-wrap: wrap; }
.zone-rename { display: flex; gap: .4rem; align-items: center; margin-right: auto; }
.zone-rename input { font: inherit; font-weight: 600; border: 1px solid transparent; background: transparent; color: var(--ink); padding: .2rem .4rem; border-radius: var(--radius-sm); width: 12rem; }
.zone-rename input:hover, .zone-rename input:focus { border-color: var(--line); background: var(--paper); }
.zone-rename button { font-size: .82rem; opacity: 0; transition: opacity .1s; }
.zone-rename:focus-within button, .zone-rename:hover button { opacity: 1; }
.zone-chip { font-size: .78rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .1rem .55rem; }
.zone-visible .zone-chip { color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); }
.zone-visible .zone-rename input { color: var(--ink-2); }
.where::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink-3); margin-right: .3em; vertical-align: .05em; }
.suggestions-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.suggestions-head .sub-title { margin: 0; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card-title-link { font-size: .85rem; }

/* --- Street map under the route (basemap.js); the SVG sketch is the fallback ---- */
.slide-map.has-basemap { position: relative; }
/* Lies exactly over the sketch (same 600:420 box). Two classes, so it beats
   maplibre-gl.css's `.maplibregl-map { position: relative }`, which loads later. */
.slide-map .basemap, .slide-map .basemap.maplibregl-map { position: absolute; top: 0; left: 0;
  width: 100%; aspect-ratio: 600 / 420; border-radius: var(--radius-sm); overflow: hidden;
  visibility: hidden; }
.slide-map.basemap-on .basemap { visibility: visible; }
.slide-map.basemap-on svg.route { visibility: hidden; }
.map-attrib { display: none; margin: 4px 0 0; font-size: 0.72rem; text-align: right; opacity: 0.75; }
.map-attrib a { color: inherit; }
.slide-map.basemap-on .map-attrib { display: block; }
.basemap .maplibregl-ctrl-group { box-shadow: var(--shadow); }

/* Owner's view: the parts privacy settings hide from others, dashed and faint */
.route-hidden { fill: none; stroke: var(--ink); stroke-opacity: .45; stroke-width: 3;
  stroke-dasharray: 1 7; stroke-linecap: round; stroke-linejoin: round; }
.hidden-key { display: inline-block; width: 26px; height: 0; vertical-align: middle;
  border-top: 3px dotted var(--ink); opacity: .5; margin-right: 4px; }

/* Profile pictures */
img.avatar { object-fit: cover; padding: 0; background: var(--accent-soft); }
.avatar-xs { width: 24px; height: 24px; vertical-align: middle; margin-right: .4rem; display: inline-block; }
.nav-user { display: inline-flex; align-items: center; }
.avatar-edit { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.avatar-actions { display: grid; gap: .35rem; justify-items: start; }
.avatar-actions .hint { color: var(--ink-3); }
.avatar-upload label { cursor: pointer; }
.avatar-upload label:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit;
  font-size: .88rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
