/* Strecken-Tracker – Logik in web/src/tracker/ */
.st-main { max-width: 720px; }
#st { --st-c: #059669; --st-c2: #4ade80; --st-alt: color-mix(in srgb, #94a3b8 35%, transparent); margin-bottom: var(--sp-7); display: flex; flex-direction: column; gap: var(--sp-4); }
.st-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.st-h { margin: 0 0 var(--sp-3); font-size: 1.15rem; }
.st-hint { color: var(--muted); font-size: var(--fs-s); margin: var(--sp-3) 0 0; }
.st-leer { color: var(--muted); text-align: center; padding: var(--sp-4) 0; margin: 0; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: var(--sp-3); }
.st-mid { justify-content: center; }
.st-mid-txt { text-align: center; }
.st-back { align-self: flex-start; margin-bottom: -6px; }
.st-file { cursor: pointer; }

/* Wochenziel */
.st-woche { display: flex; align-items: center; gap: var(--sp-4); }
.st-ring { position: relative; flex: none; width: 64px; height: 64px; }
.st-ring svg { display: block; }
.st-ring circle:last-child { transition: stroke-dashoffset .8s ease; }
.st-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; }
.st-woche-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.st-woche-txt span { font-size: var(--fs-s); }
.st-woche-txt small { color: var(--muted); }

/* Sportart + Start */
.st-sports { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.st-sport { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; padding: 10px 4px 8px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); font: 500 .78rem/1.2 var(--font); cursor: pointer; transition: all var(--t-fast); }
.st-sport-ico { font-size: 1.7rem; line-height: 1.2; }
.st-sport[aria-checked="true"] { border-color: var(--st-c); background: color-mix(in srgb, var(--st-c) 12%, var(--surface)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--st-c) 40%, transparent); font-weight: 700; }
.st-sport:focus-visible { outline: none; box-shadow: var(--focus); }
.st-wetter { min-height: 1.4em; font-size: var(--fs-s); text-align: center; margin: 4px 0 10px; }
.st-wetter a { white-space: nowrap; }
.st-start { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 172px; height: 172px; margin: 6px auto 4px; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; font: 800 1.6rem/1.1 var(--font); background: radial-gradient(circle at 30% 25%, var(--st-c2), var(--st-c) 70%);
  box-shadow: 0 18px 40px -12px var(--st-c), inset 0 -6px 16px rgba(0,0,0,.15); transition: transform var(--t-fast); animation: stAtmen 3.2s ease-in-out infinite; }
.st-start small { font-size: .85rem; font-weight: 600; opacity: .9; }
.st-start-ico { font-size: 2.2rem; }
.st-start:active { transform: scale(.96); }
.st-start:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--st-c); }
@keyframes stAtmen { 0%, 100% { box-shadow: 0 18px 40px -12px var(--st-c), 0 0 0 0 color-mix(in srgb, var(--st-c) 35%, transparent); } 50% { box-shadow: 0 18px 40px -12px var(--st-c), 0 0 0 14px transparent; } }
.st-extras-on { text-align: center; font-size: var(--fs-s); font-weight: 600; color: var(--st-c); margin: 6px 0 0; }
.st-extra-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: var(--sp-4); }
.st-extra-btns .h-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Listen */
.st-list { display: flex; flex-direction: column; }
.st-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.st-item:last-child { border-bottom: 0; }
.st-item:hover { background: var(--surface-2); }
.st-item-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--st-c) 12%, var(--surface)); font-size: 1.3rem; }
.st-item-ico.st-gross { width: 52px; height: 52px; font-size: 1.7rem; }
.st-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-item-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-item-txt small, .st-item-zahl small { color: var(--muted); font-size: var(--fs-xs); }
.st-item-zahl { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.st-monat { margin: var(--sp-4) 0 4px; font-size: 1rem; }
.st-monat small { color: var(--muted); font-weight: 500; }

/* Blatt (Auswahl) */
.st-sheet-bg { position: fixed; inset: 0; z-index: 900; background: rgba(15, 23, 42, .45); }
.st-sheet { max-width: 640px; margin: 0 auto; }
.st-sheet-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 1.1rem; }
.st-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; margin-top: 10px; }
.st-more { margin-top: var(--sp-4); }
.st-more summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* Live */
.st-live { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.st-live-kopf { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.st-live-sport { flex: 1; }
.st-status { font-size: var(--fs-s); padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--st-c) 15%, var(--surface)); color: var(--st-c); }
.st-status[data-s="p"] { background: var(--warn-soft); color: var(--warn); }
.st-gps { font-size: var(--fs-xs); color: var(--muted); }
.st-gps[data-q="3"] { color: var(--success); } .st-gps[data-q="1"] { color: var(--danger); }
.st-warte { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-6) 0 var(--sp-4); text-align: center; }
.st-warte small { color: var(--muted); }
.st-radar { position: relative; width: 110px; height: 110px; display: grid; place-items: center; margin-bottom: 8px; }
.st-radar span { font-size: 2.6rem; position: relative; }
.st-radar i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--st-c); opacity: 0; animation: stRadar 2s ease-out infinite; }
.st-radar i + i { animation-delay: 1s; }
@keyframes stRadar { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.1); opacity: 0; } }
.st-werte { text-align: center; }
.st-zeit { font: 800 clamp(3.2rem, 17vw, 5.2rem)/1.05 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 10px 0 4px; }
.st-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-zwei b { display: block; font: 800 clamp(2.2rem, 11vw, 3.4rem)/1.05 var(--font); font-variant-numeric: tabular-nums; }
.st-zwei small, .st-klein small { color: var(--muted); font-size: var(--fs-xs); }
.st-klein { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.st-klein b { display: block; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.st-klein [hidden] { display: none; }
.st-banner { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-m); font-weight: 700; }
.st-banner[hidden] { display: none; }
.st-ghost { background: color-mix(in srgb, var(--st-c) 14%, var(--surface)); color: var(--st-c); }
.st-ghost[data-v="hinter"] { background: var(--warn-soft); color: var(--warn); }
.st-intervall { background: var(--info-soft); color: var(--info); }
.st-intervall[data-art="an"] { background: var(--danger-soft); color: var(--danger); }
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-livekarte { height: 260px; margin-top: 12px; border-radius: var(--r-m); overflow: hidden; }
.st-livekarte[hidden] { display: none; }
.st-steuer { display: flex; flex-direction: column; gap: 8px; margin-top: var(--sp-4); }
.st-steuer-gross { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-steuer-gross .st-knopf { min-height: 76px; font-size: 1.2rem; }
.st-steuer-klein { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.st-steuer-klein .st-knopf { min-height: 50px; font-size: .92rem; white-space: nowrap; padding: 0 6px; }
.st-knopf-stop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.st-knopf-stop small { position: relative; font-size: .72rem; font-weight: 500; opacity: .85; }
.st-route { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); color: #b45309; }
.st-steuer[hidden], .st-warte[hidden], .st-werte[hidden] { display: none; }
.st-knopf { position: relative; overflow: hidden; min-height: 60px; border: 0; border-radius: 16px; font: 700 1rem/1.1 var(--font); cursor: pointer; background: var(--st-c); color: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.st-knopf-leise { background: var(--surface-2); color: var(--text); }
.st-knopf-stop { background: #dc2626; }
.st-knopf-stop span { position: relative; }
.st-halt-balken { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(0,0,0,.28); }
.st-knopf-stop.halten .st-halt-balken { width: 100%; transition: width .9s linear; }
.st-knopf:focus-visible { outline: none; box-shadow: var(--focus); }

/* Aktivität */
.st-akt-kopf { display: flex; gap: 12px; align-items: center; }
.st-akt-kopf > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-akt-kopf small { color: var(--muted); }
.st-name { font-weight: 700; font-size: 1.1rem; border-color: transparent; background: transparent; padding-left: 6px; }
.st-name:hover { border-color: var(--border); }
.st-erfolge { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--gold-soft); font-weight: 700; }
.st-erfolge p { margin: 2px 0; }
.st-karte { height: 300px; margin-top: 14px; border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.st-karte-gross { height: min(65vh, 520px); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 14px; }
.st-grid > div { background: var(--surface-2); border-radius: var(--r-m); padding: 10px; }
.st-grid b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.st-grid small { color: var(--muted); font-size: var(--fs-xs); }
.st-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-aktionen .h-btn { flex: 1 1 auto; }
.st-splits { display: flex; flex-direction: column; gap: 4px; }
.st-split { display: grid; grid-template-columns: 44px 1fr 80px 56px; gap: 8px; align-items: center; font-variant-numeric: tabular-nums; font-size: var(--fs-s); }
.st-split-nr { color: var(--muted); text-align: right; }
.st-split-bar { height: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.st-split-bar i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--st-c2), var(--st-c)); }
.st-split.best .st-split-wert { color: var(--st-c); font-weight: 800; }
.st-split small { color: var(--muted); }
.st-lap { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.st-chart svg { display: block; width: 100%; height: 170px; }
.st-chart .st-ax { font-size: 11px; fill: var(--muted); }
.st-chart-x { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--fs-xs); }
.st-legende { color: var(--muted); font-size: var(--fs-xs); margin: 4px 0 0; }
.st-legende i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin-left: 8px; }
.st-legende i.l1 { background: var(--st-c); } .st-legende i.l2 { background: #94a3b8; height: 10px; }
.st-gefuehl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-gefuehl .h-label { margin-right: 6px; }
.st-emo { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 1.4rem; cursor: pointer; filter: grayscale(.6); opacity: .75; }
.st-emo[aria-pressed="true"] { filter: none; opacity: 1; border-color: var(--st-c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--st-c) 35%, transparent); }
.st-sportwahl { flex: 1 1 200px; margin: 0; }
.st-teil-vorschau { display: grid; place-items: center; margin-bottom: 10px; }
.st-teil-canvas { width: min(100%, 300px); height: auto; border-radius: 14px; box-shadow: var(--shadow-2); }
.st-sheet .h-chips { margin-bottom: 6px; }

/* Tagebuch, Rekorde */
.st-seg { margin-bottom: 12px; }
.st-wochen { display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 4px; height: 130px; margin: 16px 0 6px; }
.st-woche-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.st-woche-bar i { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--st-c) 45%, var(--surface-2)); }
.st-woche-bar.jetzt i { background: var(--st-c); }
.st-woche-bar small { font-size: .62rem; color: var(--muted); white-space: nowrap; }
.st-rek-gruppe { margin-bottom: 6px; }
.st-rek { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; width: 100%; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.st-rek:hover { background: var(--surface-2); }
.st-rek small { color: var(--muted); }

/* Kartenmarken */
.st-pin i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); font: 700 9px/1 var(--font); color: #fff; font-style: normal; }
.st-pin.start i { background: #16a34a; } .st-pin.ziel i { background: #dc2626; }
.st-pin.ich i { background: #4f46e5; animation: stPuls 1.6s ease-out infinite; }
.st-pin.ghost i { background: rgba(255,255,255,.9); border-color: #a5b4fc; font-size: 12px; }
@keyframes stPuls { 0% { box-shadow: 0 0 0 0 rgba(79,70,229,.55); } 100% { box-shadow: 0 0 0 16px rgba(79,70,229,0); } }

.st-toast { max-width: calc(100vw - 32px); text-align: center; }
@media (max-width: 520px) {
  .st-card { padding: var(--sp-4); }
  .st-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-split { grid-template-columns: 36px 1fr 72px 50px; }
  .st-extra-btns .h-btn { font-size: .82rem; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { .st-start, .st-radar i, .st-pin.ich i { animation: none; } }

/* Während der Aufzeichnung nur die Werte: Seitenkopf, Erklärtexte und Fußzeile ausblenden */
body.st-rec .tool-head, body.st-rec .seo, body.st-rec .faq, body.st-rec .site-footer, body.st-rec .related, body.st-rec .crumbs, body.st-rec .guide-link { display: none !important; }
body.st-rec .st-main { padding-top: 8px; }

/* Live-Ansicht für Familie und Freunde (/strecken-tracker/live) */
.stl-main { max-width: 720px; }
#stl { margin-bottom: var(--sp-7); display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.stl-kopf { display: flex; align-items: center; gap: 12px; }
.stl-kopf > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stl-kopf small { color: var(--muted); }
.stl-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; font-size: 1.6rem; background: color-mix(in srgb, #059669 12%, var(--surface)); }
.stl-status { padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: var(--fs-s); background: color-mix(in srgb, #059669 15%, var(--surface)); color: #059669; }
.stl-status[data-s="pause"], .stl-status[data-s="alt"] { background: var(--warn-soft); color: var(--warn); }
.stl-status[data-s="ende"] { background: var(--surface-2); color: var(--muted); }
.stl-werte { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.stl-werte b { display: block; font: 800 2.2rem/1.1 var(--font); font-variant-numeric: tabular-nums; }
.stl-werte small { color: var(--muted); }
.stl-karte { height: min(60vh, 460px); border-radius: var(--r-m); overflow: hidden; background: var(--surface-2); }
.stl-hinweis { color: var(--muted); font-size: var(--fs-s); margin: 0; text-align: center; }
.stl-leer { text-align: center; color: var(--muted); }

/* Verlauf: getrennte Kurven mit Achsen (kurven.js) */
.st-kurven { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-2); touch-action: pan-y; }
.st-kurve-kopf { display: flex; gap: 10px; align-items: baseline; font-size: var(--fs-sm); }
.st-kurve-kopf span { color: var(--muted); }
.st-kurve-kopf small { color: var(--muted); margin-left: auto; font-size: var(--fs-xs); }
.st-kurve-flaeche { display: grid; grid-template-columns: auto 1fr; gap: 6px; }
.st-kurve-achse { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11px; text-align: right; min-width: 3.4em; font-variant-numeric: tabular-nums; }
.st-kurve-bild { position: relative; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: crosshair; }
.st-kurve-bild svg { display: block; width: 100%; height: 110px; }
.st-kurve-strich { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--text); opacity: .55; pointer-events: none; }
.st-kurve-wert { min-height: 1.4em; font-size: var(--fs-sm); color: var(--text); font-variant-numeric: tabular-nums; }
.st-chart-x { padding-left: calc(3.4em + 6px); }

.st-hinweis-box { margin-top: var(--sp-3); padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--st-c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--st-c) 30%, transparent); font-size: var(--fs-sm); }
.st-hinweis-box p { margin: 0 0 6px; }
.st-hinweis-box p:last-child { margin-bottom: 0; }
