/* Hilly, "trail map" look. Colours live here; the map reads --route, --accent, --muted and --good when it draws. */
:root {
  --bg: #e9e2d2;
  --panel: #f8f4ea;
  --raised: #efe8d8;
  --ink: #23301f;
  --muted: #6d7362;
  --line: #ddd4bf;
  --accent: #2f6b45;
  --accent-ink: #ffffff;
  --accent-soft: #dde9d8;
  --route: #b5532a;
  --good: #2f6b45;
  --bad: #b03a2e;
  --shadow: 0 1px 2px rgb(60 50 20 / 0.08), 0 12px 32px rgb(60 50 20 / 0.16);
  --radius: 12px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --head-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
input, select, button, output { font: inherit; color: inherit; }
.panel svg { width: 1em; height: 1em; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- layout: full-screen map with a floating panel ---------- */
.app { position: relative; height: 100%; }
.map { position: absolute; inset: 0; background: var(--bg); }
.panel {
  position: absolute; z-index: 500; top: 16px; left: 16px; bottom: 16px; width: 404px;
  background: var(--panel); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.panel > * { flex-shrink: 0; }
.leaflet-top.leaflet-left { left: 436px; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-zoom a { background: var(--panel) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-tooltip { font: 600 12px/1.3 var(--sans); border-radius: 8px; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.panel .logo {
  width: 44px; height: 44px; padding: 8px; border-radius: 13px;
  color: var(--accent-ink); background: var(--accent);
}
h1 { font: 700 24px/1.1 var(--head-font); margin: 0; letter-spacing: -0.02em; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- form blocks ---------- */
.plan-form { display: flex; flex-direction: column; gap: 14px; }
.block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.block-title { display: flex; align-items: center; gap: 8px; margin: 0; font: 650 14px/1.3 var(--head-font); }
.block-title .n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--panel); font: 700 12px/1 system-ui, sans-serif;
}
.source { margin-left: auto; font-family: var(--sans); font-weight: 600; font-size: 11px; color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.source:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hint { margin: 0; color: var(--muted); font-size: 12px; }

.field-row { display: flex; gap: 8px; }
.field-row > :first-child { flex: 1; min-width: 0; }
input, select {
  width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-icon { position: relative; display: block; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 18px; }
.input-icon input { padding-left: 36px; font-variant-numeric: tabular-nums; }

.numbers { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 8px; }
.num-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.num-field > span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.num-wrap { position: relative; display: flex; align-items: baseline; }
.num-wrap input { padding-right: 34px; font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num-wrap input::-webkit-inner-spin-button, .num-wrap input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num-wrap em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); }
.readout .num-wrap { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
.readout output { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--accent); }
.readout em { position: static; transform: none; margin-left: 4px; }

/* ---------- workout tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tile {
  --kind: var(--muted);
  display: flex; gap: 9px; align-items: center; text-align: left;
  padding: 9px 10px; border-radius: 11px; border: 1.5px solid transparent;
  background: var(--raised); cursor: pointer; transition: border-color .15s, transform .1s;
}
.tile:hover { border-color: var(--line); }
.tile:active { transform: scale(0.98); }
.tile[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tile .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; background: var(--kind); font-size: 17px; }
.tile .t { display: flex; flex-direction: column; min-width: 0; }
.tile b { font-size: 13px; font-weight: 650; line-height: 1.2; }
.tile small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile.k-vo2 { --kind: #d63c3c; }
.tile.k-threshold { --kind: #e2781c; }
.tile.k-sweetspot { --kind: #d5a017; }
.tile.k-sprints { --kind: #8a4fd8; }
.tile.k-endurance { --kind: #2a7fb8; }
.tile.k-recovery { --kind: #2e9b6a; }

.detail { display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 0; }
.why { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.why:empty { display: none; }

/* timeline of workout steps (also used in the ride card) */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { position: relative; padding: 0 0 8px 20px; font-size: 13px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.timeline li::after { content: ""; position: absolute; left: 6.5px; top: 16px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.main::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline li.main { font-weight: 650; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 11px; border: 0; font-weight: 650; cursor: pointer;
  transition: filter .15s, transform .1s, background .15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.65; cursor: progress; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.secondary { background: var(--ink); color: var(--panel); }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); color: var(--ink); }
.btn.icon-only { padding: 0; width: 42px; font-size: 19px; }
.btn.big { padding: 14px 18px; font-size: 16px; border-radius: 14px; }
.btn.big svg { font-size: 18px; transition: transform .2s; }
.btn.big:hover svg { transform: translateX(3px); }
.btn.big:disabled .label::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { margin: -4px 0 0; min-height: 1.2em; color: var(--muted); font-size: 13px; }
.status:empty { display: none; }
.status.error { color: var(--bad); }

/* ---------- ride card ---------- */
.ride:empty { display: none; }
.ride, .results, .calendar { scroll-margin-top: 16px; }
.ride { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); animation: rise .35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.ride-hero {
  padding: 16px; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
}
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.ride-hero h3 { margin: 2px 0 2px; font: 750 20px/1.2 var(--head-font); letter-spacing: -0.01em; }
.ride-hero .where { margin: 0; font-size: 13px; opacity: 0.9; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.stat { background: var(--panel); padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat span { font-size: 11px; color: var(--muted); }
.ride-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.profile-wrap { background: var(--raised); border-radius: 12px; padding: 10px 10px 8px; }
.profile-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.profile-head b { color: var(--ink); }
.panel .profile { width: 100%; height: 84px; display: block; }
.profile .area { fill: url(#profile-fill); }
.profile .edge { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.profile-caption { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.profile-caption span b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ride-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ride-actions .btn { flex: 1; white-space: nowrap; }
.ride-actions .btn.primary { flex-basis: 100%; }
.ride-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
a.btn { text-decoration: none; }
.streetview-link { font: 600 13px/1.3 var(--sans); color: var(--accent); }
.map path.leaflet-interactive:focus { outline: none; }

/* ---------- calendar ---------- */
.calendar { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cal-head { display: flex; gap: 10px; align-items: flex-start; }
.cal-head > svg { font-size: 20px; color: var(--route); margin-top: 1px; }
.cal-head h3 { margin: 0; font-size: 14px; }
.calendar .status { margin: 0; }

/* weather day picker inside the calendar card */
.forecast {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
  margin: 0 -14px; padding: 4px 14px 6px;
}
.day {
  --rate: var(--muted);
  position: relative; flex: 0 0 66px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 7px; border-radius: 12px; border: 1.5px solid transparent;
  background: var(--raised); cursor: pointer; text-align: center; font-variant-numeric: tabular-nums;
  transition: border-color .15s, transform .1s;
}
.day:hover { border-color: var(--line); }
.day:active { transform: scale(0.97); }
.day:focus:not(:focus-visible) { outline: none; }
.day[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--panel); }
.day .dow { font-size: 12px; font-weight: 700; }
.day .dom { font-size: 10px; color: var(--muted); margin-top: -3px; }
.panel .day .sky { width: 30px; height: 30px; }
.day .temp { font-size: 14px; font-weight: 750; }
.day .rain { font-size: 11px; color: #3b7fc4; font-weight: 600; }
.day .rain.dry { color: var(--muted); font-weight: 500; }
.day .wind { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.panel .day .wind svg { width: 11px; height: 11px; color: var(--ink); }
.day .bar { align-self: stretch; height: 4px; margin: 2px 6px 0; border-radius: 2px; background: var(--rate); }
.day.r-great { --rate: var(--good); }
.day.r-good { --rate: #8db255; }
.day.r-fair { --rate: #e0a23a; }
.day.r-poor { --rate: var(--bad); }
.day .best {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  padding: 1px 6px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
  font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.forecast-detail { margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--raised); font-size: 13px; }
.forecast-detail b { font-weight: 700; }
.forecast-detail .rate { display: inline-block; padding: 0 6px; margin-left: 4px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.forecast-detail .r-great { background: var(--good); }
.forecast-detail .r-good { background: #7a9f45; }
.forecast-detail .r-fair { background: #c98a22; }
.forecast-detail .r-poor { background: var(--bad); }
.forecast-detail span.line { display: block; color: var(--muted); margin-top: 2px; }
.credit { margin: 0; font-size: 11px; color: var(--muted); }

/* ---------- options ---------- */
.list-title { margin: 4px 0 8px; font: 650 14px/1.3 var(--head-font); }
.options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.options > li {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center;
  border: 1.5px solid var(--line); border-radius: 13px; padding: 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.options > li:hover { border-color: var(--route); }
.options > li.active { border-color: var(--accent); background: var(--accent-soft); }
.options .kind { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 20px; background: var(--raised); color: var(--route); }
.options .active .kind { background: var(--accent); color: var(--accent-ink); }
.options .title { font-weight: 650; font-size: 14px; line-height: 1.25; }
.options .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.options .grade { font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.options .grade small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.options .notes { grid-column: 2 / -1; margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); }

.attribution { margin-top: auto; padding-top: 4px; color: var(--muted); font-size: 11px; }
.attribution:empty { display: none; }

/* ---------- paper-map header and outlines ---------- */
.brand {
  margin: -20px -20px 0; padding: 22px 20px 18px;
  border-radius: calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' viewBox='0 0 240 120'%3E%3Cg fill='none' stroke='%232f6b45' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M-10 100 C40 60 80 90 130 50 S210 20 260 40'/%3E%3Cpath d='M-10 112 C40 74 85 102 135 64 S215 36 260 54'/%3E%3Cpath d='M-10 88 C38 48 76 78 126 36 S205 6 260 26'/%3E%3Cpath d='M-10 124 C45 88 90 114 140 78 S220 52 260 68'/%3E%3Cpath d='M-10 76 C36 36 72 66 122 22 S200 -8 260 12'/%3E%3C/g%3E%3C/svg%3E") right center / 320px auto no-repeat,
    var(--raised);
  border-bottom: 1px solid var(--line);
}

/* ---------- phone: map on top, panel as a sheet below ---------- */
@media (max-width: 760px) {
  .app { height: auto; }
  .map { position: sticky; top: 0; height: 44vh; z-index: 0; }
  .panel {
    position: relative; top: auto; left: auto; bottom: auto; width: auto;
    margin-top: -22px; border-radius: 22px 22px 0 0; overflow: visible; padding: 18px 16px 28px;
    min-height: 60vh;
  }
  .panel::before { content: ""; position: absolute; z-index: 1; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
  .leaflet-top.leaflet-left { left: 0; }
  .brand { margin: -18px -16px 0; padding: 26px 16px 14px; border-radius: 22px 22px 0 0; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers .readout { grid-column: 1 / -1; }
  .readout .num-wrap { justify-content: center; }
}

/* map style switcher (basemaps.js) */
.basemaps { font: 13px/1.3 var(--sans); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.basemaps button { font: inherit; color: var(--ink); cursor: pointer; }
.basemaps-thumb { display: block; border-radius: 8px; background: var(--raised) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.basemaps-toggle { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); text-align: left; }
.basemaps-toggle .basemaps-thumb { width: 40px; height: 40px; }
.basemaps-toggle:hover { background: var(--raised); }
.basemaps-eyebrow { display: block; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.basemaps-name { font-weight: 600; }
.basemaps-list { width: 308px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.basemaps-head { font-weight: 600; margin: 0 2px 8px; }
.basemaps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.basemaps-option { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 5px; border: 2px solid transparent; border-radius: 12px; background: transparent; text-align: left; }
.basemaps-option .basemaps-thumb { height: 72px; margin-bottom: 4px; }
.basemaps-option b { padding: 0 3px; }
.basemaps-option small { padding: 0 3px 2px; color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.basemaps-option:hover { background: var(--raised); }
.basemaps-option.active { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 760px) {
  /* the map is only the top part of the screen here, so show all styles in two short rows */
  .basemaps-list { width: calc(100vw - 24px); padding: 8px; }
  .basemaps-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .basemaps-option { padding: 3px; }
  .basemaps-option .basemaps-thumb { height: 44px; margin-bottom: 2px; }
  .basemaps-option b { font-size: 12px; line-height: 1.2; }
  .basemaps-option small { display: none; }
}

/* ---------- website: invite code and intervals.icu key ---------- */
.brand-btn { margin-left: auto; }
.settings {
  width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 24px; border: 0; border-radius: calc(var(--radius) + 6px);
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
}
.settings::backdrop { background: rgb(35 48 31 / 0.45); backdrop-filter: blur(2px); }
.settings form { display: grid; gap: 14px; }
.settings .logo { width: 40px; height: 40px; padding: 8px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); }
.settings h2 { margin: 0; font: 650 22px/1.2 var(--head-font); }
.set-field { display: grid; gap: 6px; font-weight: 600; font-size: 13px; }
.set-field em { font-style: normal; font-weight: 400; color: var(--muted); }
.set-field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 16px; /* 16px stops iPhones zooming in on focus */
}
.set-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.set-field small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.4; }
.set-field a { color: var(--accent); }
.settings .status { margin: 0; }
.set-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.set-actions .btn.primary { flex: 1 1 auto; }

/* ---------- my workouts (planned on intervals.icu) ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--raised); }
.tabs button { border: 0; border-radius: 9px; padding: 8px; background: none; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgb(60 50 20 / 0.15); }
.panel[data-mode="coach"] .ride-only, .panel[data-mode="ride"] .coach-only { display: none !important; }
.coach { display: flex; flex-direction: column; gap: 10px; }
.coach .status { margin: 0; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.form-card .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.form-card .nums div { background: var(--raised); border-radius: 10px; padding: 6px 4px; }
.form-card .nums b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.form-card .nums span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.form-card p { margin: 0; font-size: 13px; }
.form-card .label { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; margin-right: 6px; }
.week { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.week > li { border: 1.5px solid var(--line); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.week > li.rest, .week > li.planned { background: var(--raised); border-color: transparent; padding: 8px 12px; }
.week > li.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.week .top { display: flex; align-items: center; gap: 8px; }
.week .when { font-weight: 750; font-size: 13px; min-width: 76px; }
.week .when small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.week .what { flex: 1; font-weight: 650; font-size: 14px; line-height: 1.25; }
.week .rest .what, .week .planned .what { font-weight: 500; color: var(--muted); font-size: 13px; }
.week .wx { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.panel .week .wx svg { width: 22px; height: 22px; }
.week .role { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px; margin-left: 4px; }
.week .role.hard { background: var(--route); color: #fff; }
.week .role.endurance, .week .role.steady { background: var(--accent-soft); color: var(--accent); }
.week .role.recovery { background: var(--line); color: var(--ink); }
.week .where { font-size: 12px; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.week .where svg { color: var(--route); font-size: 15px; }
.week .why { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); font-style: normal; }
.week .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.week .acts .btn { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.week .done { font-size: 12px; color: var(--good); font-weight: 650; align-self: center; }
.week .err { font-size: 12px; color: var(--bad); }
.coach-notes { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.coach-notes:empty { display: none; }
.coach-actions { display: flex; flex-direction: column; gap: 6px; }
.form-card .sum { display: block; color: var(--muted); margin-top: 4px; }
.form-card .acts, .week .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.coach #coach-intro { margin: 0; }
.form-card .by { font-size: 11px; font-weight: 700; color: var(--route); text-transform: uppercase; letter-spacing: .05em; }
.focus-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 13px; background: var(--accent-soft); }
.focus-bar .btn { padding: 7px 10px; font-size: 13px; flex: none; }
.focus-bar b { display: block; font-size: 14px; line-height: 1.25; }
.focus-bar .hint { display: block; }
.panel.focused .plan-form > :not(#status), .panel.focused .tabs { display: none; }
