:root {
  color-scheme: light;
  --bg: #f6f5f1;
  --panel: #ffffff;
  --text: #1d1f22;
  --muted: #6b6f76;
  --line: #e3e1db;
  --accent: #e4572e;
  --accent-text: #ffffff;
  --card: #faf9f6;
  --sel: #fff1ec;
  --ok: #2a8f7f;
  --long: #2e86ab;
  --warn-bg: #fff4d6;
  --warn-text: #6e5200;
  --err: #c0392b;
  --tabbar-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #15171a;
    --panel: #1d2024;
    --text: #e9e9e6;
    --muted: #9a9ea6;
    --line: #2f3338;
    --accent: #f06a42;
    --accent-text: #ffffff;
    --card: #23272c;
    --sel: #3a2a24;
    --ok: #4cc2ae;
    --long: #5bb2d6;
    --warn-bg: #3a3220;
    --warn-text: #f0d68a;
    --err: #ff7b6b;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: grid;
  grid-template-columns: 360px 1fr;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- layout: panel left, map / plan / tips right ---------- */
.panel {
  grid-column: 1;
  grid-row: 1;
  background: var(--panel);
  border-right: 1px solid var(--line);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* One view per tab; only the active tab's view and panel section are shown. */
.view { grid-column: 2; grid-row: 1; height: 100vh; height: 100dvh; display: none; overflow-y: auto; background: var(--bg); }
.mapview { overflow: hidden; }
body[data-tab="today"] [data-view="today"],
body[data-tab="plan"] [data-view="plan"],
body[data-tab="record"] [data-view="record"],
body[data-tab="activities"] [data-view="activities"],
body[data-tab="routes"] [data-view="routes"],
body[data-tab="tips"] [data-view="tips"] { display: block; }

.tabpane { display: none; flex-direction: column; gap: 14px; }
body[data-tab="today"] [data-pane="today"],
body[data-tab="plan"] [data-pane="plan"],
body[data-tab="record"] [data-pane="record"],
body[data-tab="activities"] [data-pane="activities"],
body[data-tab="routes"] [data-pane="routes"],
body[data-tab="tips"] [data-pane="tips"] { display: flex; }

/* ---------- tabs ---------- */
.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 2px;
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
}
.tab svg { width: 20px; height: 20px; flex: none; }
.tab-record svg { color: var(--accent); }
body.recording .tab-record svg { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tab.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }

/* ---------- basics ---------- */
h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--muted); }
.block { display: flex; flex-direction: column; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > div, .field { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; gap: 8px; }
.lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); font-weight: 400; }
.err { color: var(--err); }
.hidden { display: none !important; }

input, select {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input:disabled { opacity: .5; }

.btn {
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); padding: 11px 14px; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.wide { flex: 1; width: 100%; }

.status { margin: -4px 0 0; min-height: 1.2em; color: var(--muted); font-size: 13px; }
.status.err { color: var(--err); }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
.seg-btn { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 7px; border-radius: 7px; cursor: pointer; }
.seg-btn.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.pt-label { margin: 0; font-size: 13px; font-weight: 500; }
.pt-label:empty { display: none; }
.pt-icon {
  background: #1d1f22; color: #fff; border: 2px solid #fff; border-radius: 50%;
  font: 700 12px/22px system-ui, sans-serif; text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { flex: 0 0 auto; width: 18px; height: 18px; padding: 0; margin: 0; accent-color: var(--accent); }

/* ---------- route options ---------- */
.card {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.card.sel { background: var(--sel); border-color: var(--accent); }
.swatch { width: 10px; height: 34px; border-radius: 4px; }
.card .main { font-weight: 600; font-variant-numeric: tabular-nums; }
.card .meta, .today-card .meta { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.elev svg { width: 100%; height: 70px; display: block; }
.elev .cap { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

.saved-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.saved-item:last-child { border-bottom: 0; }
.saved-item button.link { flex: 1; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; padding: 0; }
.saved-item .meta { color: var(--muted); font-size: 12px; }
.saved-item .del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; min-width: 32px; min-height: 32px; }

.today-card { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--accent); background: var(--sel); border-radius: 10px; padding: 10px 12px; }
.today-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.today-card .s-title { font-weight: 600; }

.foot { margin-top: auto; color: var(--muted); font-size: 11px; }

.km-icon {
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 50%;
  font: 600 10px/16px system-ui, sans-serif;
  text-align: center;
  width: 20px !important;
  height: 20px !important;
}

/* ---------- training plan ---------- */
.plan-wrap, .tips-wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 14px; }
.plan-head h2, .tips-wrap h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.plan-meta { margin: 4px 0 0; color: var(--muted); }
.warn { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); font-size: 13px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress-text { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.paces { margin-top: 14px; }
.paces h3 { margin: 0 0 4px; font-size: 15px; }
.kv { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 6px; }
.kv td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:last-child { text-align: right; font-weight: 600; padding-left: 12px; }
.calc-sub { display: block; margin-top: 12px; }

.week { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; scroll-margin-top: 12px; }
.week.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.week-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-head h3 { margin: 0; font-size: 16px; }
.phase { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: var(--card); color: var(--muted); border: 1px solid var(--line); }
.phase-recovery { color: var(--ok); }
.phase-race { color: var(--accent); }
.now { font-size: 11px; font-weight: 700; color: var(--accent-text); background: var(--accent); padding: 2px 8px; border-radius: 99px; }
.week-km { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.week-dates { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); }
.sessions { list-style: none; margin: 0; padding: 0; }
.sess { display: grid; grid-template-columns: 26px 40px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.sess:first-child { border-top: 0; }
.s-check { display: flex; padding-top: 2px; cursor: pointer; }
.s-check input { flex: none; width: 20px; height: 20px; margin: 0; padding: 0; accent-color: var(--accent); }
.s-day { font-weight: 700; font-size: 13px; line-height: 1.2; }
.s-day span { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.s-title { font-weight: 600; }
.s-km { color: var(--muted); font-weight: 500; }
.s-details { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sess.done .s-title { text-decoration: line-through; color: var(--muted); }
.sess.today { background: var(--sel); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.sess.t-long .s-day { color: var(--long); }
.sess.t-interval .s-day, .sess.t-tempo .s-day, .sess.t-hills .s-day, .sess.t-fartlek .s-day { color: var(--accent); }
.sess.t-race .s-day { color: var(--err); }
.s-route { padding: 6px 10px; font-size: 13px; }
.rest { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.empty { max-width: 560px; margin: 14vh auto; padding: 0 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); }

/* ---------- tips ---------- */
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tip h3 { margin: 0 0 6px; font-size: 15px; }
.tip p, .tip li { font-size: 13.5px; margin: 0; }
.tip ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.disclaimer { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  /* Scrolling to a field or link must leave room for the bottom tab bar. */
  html { scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  /* Let the page grow with its content, so the bottom padding sits below the last item. */
  html, body { height: auto; min-height: 100%; }
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }
  .view { grid-column: 1; grid-row: 2; height: auto; overflow: visible; }
  .mapview { grid-row: 1; height: 50vh; height: 50dvh; overflow: hidden; }
  body[data-tab="record"] .mapview { height: 38vh; height: 38dvh; }
  .panel {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 16px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
  }
  body:not([data-tab="routes"]):not([data-tab="record"]) .panel {
    grid-row: 1;
    border-top: 0;
    padding-top: max(16px, env(safe-area-inset-top));
  }
  .app-head .sub { display: none; }
  .foot { display: none; }

  /* Bottom tab bar, like a native app */
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: var(--panel);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  }
  .tab { min-height: 52px; font-size: 11px; }
  .tab svg { width: 22px; height: 22px; }
  .live b { font-size: 30px; }
  .live-main b { font-size: 44px; }
  .tab.on { background: none; box-shadow: none; color: var(--accent); }

  /* 16px stops iOS from zooming into form fields */
  input, select { font-size: 16px; padding: 10px; }
  .btn { min-height: 44px; }
  .s-route { min-height: 36px; }

  .plan-wrap, .tips-wrap { padding: 16px 16px 24px; }
  .sess { grid-template-columns: 24px 36px 1fr; }
  .s-route { grid-column: 3; justify-self: start; }
}

/* ---------- shared bits ---------- */
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.big { padding: 16px; font-size: 18px; min-height: 60px; border-radius: 14px; width: 100%; }
.btn.danger { color: var(--err); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.back { color: var(--muted); text-decoration: none; font-weight: 600; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); padding: 2px 8px; border-radius: 99px; margin-top: 4px; }
.badge.big { font-size: 13px; padding: 6px 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.stat-grid > div, .totals > div, .tile { display: flex; flex-direction: column; }
.stat-grid b, .totals b, .tile b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat-grid span, .totals span, .tile span { color: var(--muted); font-size: 12px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* step bar: width = time, height = effort */
.stepbar { display: flex; align-items: flex-end; gap: 2px; height: 26px; margin: 8px 0 4px; }
.sb { display: block; min-width: 3px; border-radius: 2px; }
.sb-rest { height: 25%; background: var(--line); }
.sb-easy { height: 45%; background: var(--ok); }
.sb-mid { height: 72%; background: #e9a03b; }
.sb-high { height: 100%; background: var(--accent); }
.sb-race { height: 100%; background: var(--err); }
.steplist, .steplist ol { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st { display: grid; grid-template-columns: 10px 1fr auto; column-gap: 8px; align-items: baseline; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); align-self: center; }
.st-rest .st-dot { background: var(--line); }
.st-mid .st-dot { background: #e9a03b; }
.st-high .st-dot { background: var(--accent); }
.st-race .st-dot { background: var(--err); }
.st-name { font-weight: 600; }
.st-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.st-target { grid-column: 2 / 4; color: var(--muted); font-size: 12.5px; }
.st-repeat { border-left: 3px solid var(--line); padding-left: 10px; }
.st-rep-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* plan session additions */
.s-open { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.s-open:hover .s-title { text-decoration: underline; }
.s-actual { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ok); }
.s-actions { display: flex; gap: 6px; margin-top: 8px; }
.sess { grid-template-columns: 26px 40px 1fr; }

/* dialogs (bottom sheets on phones) */
.sheet { border: 0; border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: 86vh; background: var(--panel); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.sheet-body { padding: 20px 20px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sheet-body h2 { margin: 0; font-size: 20px; }
.sheet-kicker, .tsess-kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.sheet-actions { display: flex; gap: 8px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* ---------- today ---------- */
.hello h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.tsess { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); display: flex; flex-direction: column; gap: 4px; }
.tsess.done { border-color: var(--ok); }
.tsess-title { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.tsess-meta { color: var(--muted); font-weight: 600; }
.tsess-details { margin: 4px 0 8px; color: var(--muted); font-size: 13.5px; }
.wk-numbers { font-size: 15px; color: var(--muted); }
.wk-numbers b { font-size: 26px; color: var(--text); }
.wk-progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.wk-progress > div { height: 100%; background: var(--accent); }
.today-wrap, .acts-wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 14px; }
.today-wrap h2, .acts-wrap h2 { margin: 0; font-size: 18px; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; min-height: 98px; cursor: pointer; }
.day-name { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.day-num { font-size: 18px; font-weight: 700; }
.day-what { font-size: 12px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-km { font-size: 11.5px; color: var(--muted); margin-top: auto; font-variant-numeric: tabular-nums; }
.day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day.is-done { background: color-mix(in srgb, var(--ok) 12%, var(--panel)); }
.day.is-done .day-what::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.day.is-missed { opacity: .6; }
.day.is-rest .day-what { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recent-run { width: 100%; display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.recent-name { font-weight: 600; }
.recent-meta { color: var(--muted); font-size: 12.5px; }
.coach { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 16px; }
.coach h3 { margin: 4px 0 6px; font-size: 15px; }
.coach p, .coach li { font-size: 13.5px; margin: 0; }
.coach ul { margin: 0; padding-left: 18px; }

/* ---------- record ---------- */
.rec-top { display: flex; justify-content: space-between; align-items: center; }
.gps { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.gps.ok { color: var(--ok); }
.gps.bad { color: var(--err); }
.gps.wait { color: var(--muted); }
.rec-state { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.live { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.live > div { display: flex; flex-direction: column; }
.live b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; }
.live span { font-size: 12px; color: var(--muted); }
.live-main { grid-column: 1 / -1; }
.live-main b { font-size: 40px; }
.stepcard { border-radius: 14px; padding: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sc-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.sc-top span:last-child { color: var(--accent); text-align: right; }
.sc-remaining { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.sc-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.sc-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.rec-buttons { display: flex; gap: 10px; }
.route-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--long) 14%, transparent); }
.route-chip button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; }
.resume-banner { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-text); font-size: 13px; }

/* ---------- activities ---------- */
.wchart { width: 100%; height: auto; display: block; }
.wbar { fill: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.wbar.now { fill: var(--accent); }
.wbase { stroke: var(--line); }
.wlbl { fill: var(--muted); font-size: 10px; }
.acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.act { width: 100%; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.act-map { width: 64px; height: 64px; border-radius: 8px; background: var(--card); }
.act-map path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.act-map-empty { display: grid; place-items: center; color: var(--muted); }
.act-name { font-weight: 700; }
.act-date { font-size: 12.5px; color: var(--muted); }
.act-stats { display: flex; gap: 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.act-stats b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.act-detail h3 { margin: 6px 0 0; font-size: 15px; }
.act-map-big { height: 300px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.splits { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.splits th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.splits td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.splits td:first-child { width: 48px; }
.splits td:nth-child(2) { width: 64px; font-weight: 600; }
.split-bar span { display: block; height: 10px; border-radius: 99px; background: var(--long); }
.file-btn { display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .day { padding: 8px 4px; min-height: 84px; }
  .day-what { font-size: 10.5px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.three { grid-template-columns: repeat(3, 1fr); }
  .today-wrap, .acts-wrap { padding: 16px 16px 24px; }
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 90vh; }
  .sheet-actions { flex-wrap: wrap; }
  .act-map-big { height: 220px; }
}
a { color: var(--accent); }

.cue-text { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
