﻿/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   800m PACING CALCULATOR â€“ Token-basierte CSS
   â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   DESIGN TOKENS
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

:root {
  /* â”€â”€â”€ Colors â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --bg: #09090b;
  --bg-surface: #111113;
  --bg-card: #18181b;
  --text: #e4e4e7;
  --text-muted: #a1a1a6;
  --border: #27272a;

  /* Strategie-Farben */
  --strategy-1: #f97316;     /* Orange: Aggressiv */
  --strategy-2: #3b82f6;     /* Blau: Abwartend */
  --strategy-3: #22c55e;     /* GrÃ¼n: GleichmÃ¤ÃŸig */
  --strategy-4: #a855f7;     /* Lila: Taktisch */
  --strategy-5: #ec4899;     /* Pink: Dynamic */

  /* Energiesysteme */
  --energy-atp: #f59e0b;      /* Orange: ATP-PC */
  --energy-glyko: #ef4444;    /* Rot: Glykolyse */
  --energy-aerob: #22c55e;    /* GrÃ¼n: Aerob */

  /* Chart-Farben */
  --chart-bar: #06b6d4;       /* Cyan */
  --chart-fast: #22c55e;      /* GrÃ¼n: schneller */
  --chart-slow: #ef4444;      /* Rot: langsamer */

  /* â”€â”€â”€ Spacing â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;

  /* â”€â”€â”€ Typography â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;

  /* â”€â”€â”€ Border Radius â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;

  /* â”€â”€â”€ Shadows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile usability patch: app-like navigation, controlled icons, and thumb-first stopwatch */
.icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.18em;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-md { width: 1.25em; height: 1.25em; }
.icon-lg { width: 1.6em; height: 1.6em; }
.icon-filled { fill: currentColor; }

button,
summary,
select,
input {
  touch-action: manipulation;
}

.table-container {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.splits-table,
.lactate-table,
.sw-splits-table,
.history-table,
.grade-table {
  min-width: max-content;
}

/* â”€â”€â”€ Light Theme â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GLOBAL STYLES
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   HEADER
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.app-header {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-xl);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
}

.header-content {
  flex: 1;
}

.app-header h1 {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--sp-sm);
}

.header-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: var(--border);
  transform: scale(1.05);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MAIN LAYOUT
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.main-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  flex: 1;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  overflow-y: auto;
  padding-right: var(--sp-md);
  border-right: 1px solid var(--border);
}

.content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  overflow-y: auto;
  padding-right: var(--sp-md);
}

/* â”€â”€â”€ Scrollbar Styling â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CONTROL GROUPS (SIDEBAR)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.control-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.control-label {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

/* â”€â”€â”€ Time Display â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.time-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
}

.time-big {
  font-family: var(--font-display);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--strategy-3);
}

.time-unit {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* â”€â”€â”€ Slider â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--strategy-1), var(--strategy-3), var(--strategy-2));
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--text);
  cursor: pointer;
  border: 3px solid var(--bg);
  transition: all 0.2s ease;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--text);
  cursor: pointer;
  border: 3px solid var(--bg);
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  width: 100%;
}

/* â”€â”€â”€ Strategy Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.strategy-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.strategy-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all 0.2s ease;
}

.strategy-btn:hover {
  border-color: var(--text-muted);
  transform: translateX(4px);
}

.strategy-btn.active {
  border-color: var(--strategy-3);
  background: rgba(34, 197, 94, 0.1);
}

.strategy-btn[data-strategy="1"].active {
  border-color: var(--strategy-1);
  background: rgba(249, 115, 22, 0.1);
}

.strategy-btn[data-strategy="2"].active {
  border-color: var(--strategy-2);
  background: rgba(59, 130, 246, 0.1);
}

.strategy-btn[data-strategy="4"].active {
  border-color: var(--strategy-4);
  background: rgba(168, 85, 247, 0.1);
}

.strategy-btn[data-strategy="5"].active {
  border-color: var(--strategy-5);
  background: rgba(236, 72, 153, 0.1);
}

.strategy-emoji {
  font-size: 1.5rem;
}

.strategy-name {
  font-weight: 600;
}

/* â”€â”€â”€ Gender Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.gender-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-sm);
}

.gender-btn {
  padding: var(--sp-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  text-align: center;
}

.gender-btn:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.gender-btn.active {
  border-color: var(--strategy-3);
  background: rgba(34, 197, 94, 0.1);
  color: var(--strategy-3);
}

.gender-btn[data-gender="w"].active {
  border-color: var(--strategy-2);
  background: rgba(59, 130, 246, 0.1);
  color: var(--strategy-2);
}

/* â”€â”€â”€ Age Select â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.age-select {
  padding: var(--sp-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all 0.2s ease;
}

.age-select:hover {
  border-color: var(--text-muted);
}

.age-select:focus {
  outline: none;
  border-color: var(--strategy-3);
}

/* â”€â”€â”€ Strategy Info Panel â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.strategy-info {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.strategy-info h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

.info-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  font-size: var(--font-size-sm);
}

.info-content p {
  margin: 0;
  line-height: 1.5;
}

.energy-bar {
  display: flex;
  height: 20px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--sp-md) 0 var(--sp-sm);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.energy-segment {
  flex: 1;
  background: var(--energy-atp);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.energy-segment.energy-glyko {
  background: var(--energy-glyko);
}

.energy-segment.energy-aerob {
  background: var(--energy-aerob);
  border-right: none;
}

.energy-labels {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   CARDS & CONTENT
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.card h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin: 0;
}

/* â”€â”€â”€ Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.table-container {
  overflow-x: auto;
}

.splits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.splits-table th {
  background: var(--bg-surface);
  padding: var(--sp-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
}

.splits-table td {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.splits-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.splits-table tr:last-child td {
  border-bottom: none;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.05);
}

.split-num {
  font-weight: 600;
  color: var(--strategy-3);
}

.split-fast {
  color: var(--energy-aerob);
}

.split-slow {
  color: var(--energy-glyko);
}

/* â”€â”€â”€ Milestones â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.milestones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.milestone {
  text-align: center;
}

.milestone-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
}

.milestone-time {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--strategy-2);
}

.milestone-hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--sp-sm);
}

/* â”€â”€â”€ Chart â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.chart {
  width: 100%;
  height: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

/* â”€â”€â”€ Lactate Legend â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.lactate-legend {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  font-size: var(--font-size-sm);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* â”€â”€â”€ Comparison â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
}

.comp-item {
  text-align: center;
}

.comp-item h4 {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-sm);
  font-weight: 600;
}

.comp-time {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--strategy-2);
}

.comp-hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--sp-sm);
}

/* â”€â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.footer {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.8;
}

.footer p {
  margin: 0 0 var(--sp-md);
}

.footer p:last-child {
  margin: 0;
}

/* â”€â”€â”€ Card Header with Buttons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-lg);
  flex-wrap: wrap;
}

.card-header h2 {
  margin: 0;
}

.card-buttons {
  display: flex;
  gap: var(--sp-sm);
}

.print-btn {
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.print-btn:hover {
  background: var(--border);
  transform: translateY(-2px);
}

.print-btn:active {
  transform: translateY(0);
}

/* â”€â”€â”€ Laktat Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.lactate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.lactate-table th {
  background: var(--bg-surface);
  padding: var(--sp-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
}

.lactate-table td {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.lactate-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lactate-value {
  font-weight: 600;
  font-family: var(--font-display);
}

.lactate-value.aerob {
  color: var(--energy-aerob);
}

.lactate-value.transition {
  color: var(--energy-atp);
}

.lactate-value.anaerob {
  color: var(--energy-glyko);
}

.lactate-zone {
  font-size: var(--font-size-sm);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-weight: 500;
}

.lactate-zone.aerob {
  background: rgba(34, 197, 94, 0.2);
  color: var(--energy-aerob);
}

.lactate-zone.transition {
  background: rgba(245, 158, 11, 0.2);
  color: var(--energy-atp);
}

.lactate-zone.anaerob {
  background: rgba(239, 68, 68, 0.2);
  color: var(--energy-glyko);
}

/* â”€â”€â”€ Lactate Zones Legend â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.lactate-zones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
  font-size: var(--font-size-sm);
}

.zone-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}

.zone-label {
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  color: white;
  min-width: 80px;
  text-align: center;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESPONSIVE DESIGN
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* iPad (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-layout {
    grid-template-columns: 280px 1fr;
    gap: var(--sp-md);
    padding: var(--sp-md);
  }

  .sidebar {
    padding-right: var(--sp-md);
  }

  .app-header {
    padding: var(--sp-md);
  }

  .card {
    padding: var(--sp-lg);
  }

  .time-big {
    font-size: var(--font-size-2xl);
  }

  .strategy-buttons {
    grid-template-columns: 1fr;
  }

  .chart {
    height: 300px;
  }
}

/* Larger Tablet */
@media (max-width: 1200px) {
  .main-layout {
    grid-template-columns: 300px 1fr;
    gap: var(--sp-md);
    padding: var(--sp-lg);
  }

  .app-header {
    padding: var(--sp-lg);
  }

  .card {
    padding: var(--sp-lg);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
    padding: var(--sp-lg) var(--sp-md);
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: var(--sp-lg);
  }

  .app-header {
    padding: var(--sp-lg) var(--sp-md);
    flex-direction: column;
    align-items: flex-start;
  }

  .app-header h1 {
    font-size: var(--font-size-xl);
  }

  .theme-toggle {
    position: absolute;
    right: var(--sp-md);
    top: var(--sp-md);
  }

  .comparison {
    grid-template-columns: 1fr;
  }

  .strategy-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .strategy-btn {
    flex-direction: column;
    text-align: center;
    padding: var(--sp-md);
    font-size: var(--font-size-sm);
  }

  .control-group {
    margin-bottom: var(--sp-lg);
  }

  .control-label {
    font-size: var(--font-size-base);
  }

  .time-display {
    margin-bottom: var(--sp-md);
  }

  .time-big {
    font-size: var(--font-size-3xl);
  }

  .gender-btn,
  .strategy-btn {
    padding: var(--sp-md);
    font-size: var(--font-size-sm);
  }

  .age-select {
    font-size: var(--font-size-sm);
    padding: var(--sp-md);
  }

  .splits-table {
    font-size: var(--font-size-sm);
  }

  .splits-table th,
  .splits-table td {
    padding: var(--sp-sm);
  }

  .chart {
    height: 250px;
  }
}

/* Mobile: Splits table â€” reduce columns */
@media (max-width: 600px) {
  /* Hide % Zielzeit column on small screens â€” use nth-child */
  .splits-table th:nth-child(5),
  .splits-table td:nth-child(5) {
    display: none;
  }
  .splits-table th:nth-child(4),
  .splits-table td:nth-child(4) {
    display: none;
  }
  .splits-table {
    font-size: 0.78rem;
  }
  .splits-table th, .splits-table td {
    padding: 6px 4px;
  }
  /* Fix card padding for content area */
  .content .card {
    padding: var(--sp-md);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .main-layout {
    padding: var(--sp-md);
  }

  .app-header h1 {
    font-size: var(--font-size-lg);
  }

  .header-subtitle {
    display: none;
  }

  .time-big {
    font-size: var(--font-size-2xl);
  }

  .strategy-buttons {
    grid-template-columns: 1fr;
    gap: var(--sp-sm);
  }

  .strategy-btn {
    padding: var(--sp-md) var(--sp-sm);
    font-size: var(--font-size-sm);
  }

  .gender-buttons {
    gap: var(--sp-sm);
  }

  .gender-btn {
    padding: var(--sp-sm) var(--sp-md);
    font-size: var(--font-size-sm);
  }

  .milestones {
    grid-template-columns: 1fr;
    gap: var(--sp-md);
  }

  .milestone {
    padding: var(--sp-md);
  }

  .splits-table th,
  .splits-table td {
    padding: var(--sp-sm) 0.25rem;
    font-size: 0.75rem;
  }

  .lactate-table th,
  .lactate-table td {
    padding: var(--sp-sm) 0.25rem;
    font-size: 0.75rem;
  }

  .card {
    padding: var(--sp-lg) var(--sp-md);
  }

  .chart {
    height: 200px;
  }

  .slider-labels {
    font-size: 0.75rem;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   TAB NAVIGATION
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.tab-navigation {
  display: flex;
  gap: var(--sp-md);
}

.tab-btn {
  padding: var(--sp-md) var(--sp-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}

.tab-btn:hover {
  border-color: var(--text-muted);
}

.tab-btn.active {
  background: var(--strategy-3);
  color: var(--bg);
  border-color: var(--strategy-3);
}

/* Tab content */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: grid;
  grid-template-columns: 350px 1fr;
  grid-column: 1 / -1;
  gap: var(--sp-lg);
  flex: 1;
  overflow: hidden;
}

#stopwatch-tab.active {
  display: block;
  overflow-y: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* â”€â”€ Stopwatch Screen â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sw-screen {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: var(--sp-md);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: var(--sp-2xl);
}

/* Target banner */
.sw-target-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: rgba(34,197,94,0.12);
  border: 1px solid var(--strategy-3);
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--font-size-sm);
  flex-wrap: wrap;
}
.sw-target-label { color: var(--text-muted); }
.sw-target-time  { font-weight: 700; color: var(--strategy-3); font-family: var(--font-display); }
.sw-target-strategy { color: var(--text-muted); font-size: 0.8rem; }
.sw-target-clear {
  margin-left: auto;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  padding: 2px 6px;
}

/* Main timer */
.sw-timer-block {
  text-align: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-md);
}
.sw-time {
  font-family: 'Courier New', monospace;
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--strategy-1);
  letter-spacing: 0.04em;
  line-height: 1;
}
.sw-split-progress {
  margin-top: var(--sp-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  min-height: 1.4em;
}

/* Live deviation */
.sw-deviation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--font-size-xl);
  animation: devFlash 0.4s ease;
}
.sw-deviation.ahead  { background: rgba(34,197,94,0.15); border: 2px solid var(--strategy-3); }
.sw-deviation.behind { background: rgba(239,68,68,0.15); border: 2px solid #ef4444; }
.sw-deviation.exact  { background: rgba(59,130,246,0.15); border: 2px solid var(--strategy-2); }
.sw-dev-label { font-size: var(--font-size-sm); color: var(--text-muted); font-weight: 400; }
.sw-dev-value { font-size: 2rem; }
.sw-deviation.ahead  .sw-dev-value { color: var(--strategy-3); }
.sw-deviation.behind .sw-dev-value { color: #ef4444; }
.sw-deviation.exact  .sw-dev-value { color: var(--strategy-2); }
.sw-dev-hint { font-size: var(--font-size-sm); color: var(--text-muted); font-weight: 400; }
@keyframes devFlash {
  0%   { opacity: 0; transform: scale(0.92); }
  60%  { opacity: 1; transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Main buttons â€” HUGE */
.sw-controls-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}
.sw-btn {
  padding: var(--sp-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 80px;
  color: white;
  letter-spacing: 0.02em;
}
.sw-btn-start  { background: var(--strategy-3); }
.sw-btn-stop   { background: var(--strategy-5); }
.sw-btn-start:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-2px); }
.sw-btn-stop:hover:not(:disabled)  { filter: brightness(1.1); transform: translateY(-2px); }
.sw-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.sw-btn:active:not(:disabled) { transform: translateY(1px); }

/* Secondary buttons row */
.sw-controls-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--sp-sm);
}
.sw-btn-sec {
  padding: var(--sp-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 52px;
}
.sw-btn-split { border-color: var(--strategy-2); color: var(--strategy-2); }
.sw-btn-lap   { border-color: var(--strategy-4); color: var(--strategy-4); }
.sw-btn-reset { border-color: var(--text-muted); }
.sw-btn-auswertung { border-color: var(--strategy-1); color: var(--strategy-1); font-size: 1.3rem; padding: var(--sp-md); }
.sw-btn-sec:disabled { opacity: 0.4; cursor: not-allowed; }
.sw-btn-sec:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.1); }

/* Distance selector */
.sw-dist-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.sw-dist-label { font-size: var(--font-size-sm); color: var(--text-muted); white-space: nowrap; }
.sw-dist-buttons { display: flex; gap: var(--sp-sm); }
.sw-dist-btn {
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: var(--font-size-sm);
}
.sw-dist-btn.active   { background: var(--strategy-1); border-color: var(--strategy-1); color: white; }
.sw-dist-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Live splits table */
.sw-splits-live { padding: var(--sp-md) var(--sp-lg); }
.sw-splits-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-sm); }
.sw-splits-header h3 { font-family: var(--font-display); font-size: var(--font-size-base); font-weight: 600; margin: 0; }
.sw-splits-summary { font-size: var(--font-size-sm); color: var(--text-muted); }
.sw-splits-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.sw-splits-table th {
  background: var(--bg-surface); padding: 6px 8px;
  text-align: left; font-weight: 600; border-bottom: 2px solid var(--border);
  color: var(--text-muted); white-space: nowrap;
}
.sw-splits-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.sw-splits-table tr:last-child td { border-bottom: none; }
.sw-split-ahead  { color: var(--strategy-3); font-weight: 700; }
.sw-split-behind { color: #ef4444; font-weight: 700; }
.sw-split-exact  { color: var(--strategy-2); font-weight: 700; }

/* 4-item progress row */
.sw-progress-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; padding: 0; overflow: hidden; }
.sw-prog-item { text-align: center; padding: var(--sp-md) var(--sp-sm); border-right: 1px solid var(--border); }
.sw-prog-item:last-child { border-right: none; }
.sw-prog-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.sw-prog-value { font-family: var(--font-display); font-size: var(--font-size-base); font-weight: 700; color: var(--strategy-3); }

/* Settings & history collapsibles */
.sw-settings-panel, .sw-history-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.sw-settings-toggle, .sw-history-toggle {
  display: block;
  padding: var(--sp-md) var(--sp-lg);
  cursor: pointer; font-weight: 600;
  list-style: none; user-select: none;
  font-size: var(--font-size-base);
}
.sw-settings-toggle::marker, .sw-history-toggle::marker { display: none; }
.sw-settings-body { padding: var(--sp-md) var(--sp-lg) var(--sp-lg); border-top: 1px solid var(--border); }
.sw-settings-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); margin-top: var(--sp-md); }

/* Settings group (toggles) */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--strategy-3);
}

.toggle-label span {
  font-size: var(--font-size-base);
  color: var(--text);
}

/* Export & Clear buttons */
.export-btn, .clear-btn {
  padding: var(--sp-md); border: none; border-radius: var(--radius-md);
  font-family: var(--font-body); font-weight: 600;
  cursor: pointer; transition: all 0.15s ease; font-size: var(--font-size-sm);
}
.export-btn { background: var(--strategy-1); color: white; }
.clear-btn  { background: var(--strategy-4); color: white; }

/* History table */
.history-table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.history-table th { background: var(--bg-surface); padding: var(--sp-sm) var(--sp-md); text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); color: var(--text-muted); }
.history-table td { padding: var(--sp-sm) var(--sp-md); border-bottom: 1px solid var(--border); }
.history-table tr:last-child td { border-bottom: none; }

/* Stopwatch tab full-width */
#stopwatch-tab.active { display: flex; flex-direction: column; overflow-y: auto; }

/* Mobile */
@media (max-width: 600px) {
  .sw-screen { padding: var(--sp-sm); gap: var(--sp-sm); }
  .sw-time   { font-size: 3.8rem; }
  .sw-btn    { min-height: 72px; font-size: 1.25rem; padding: var(--sp-lg); }
  .sw-timer-block { padding: var(--sp-lg) var(--sp-sm); }
  .sw-progress-row { grid-template-columns: repeat(2,1fr); }
  .sw-prog-item:nth-child(2) { border-right: none; }
  .sw-prog-item:nth-child(3) { border-top: 1px solid var(--border); }
  .sw-prog-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RESULTS MODAL
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.results-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.results-modal.hidden {
  display: none;
}

.results-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* â”€â”€â”€ Results Header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.results-header h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
}

.results-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--font-size-lg);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.results-close-btn:hover {
  background: var(--border);
  transform: scale(1.05);
}

/* â”€â”€â”€ Results Body â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.results-body {
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

/* â”€â”€â”€ Results Hero â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.results-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.results-time {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--strategy-1);
  line-height: 1;
  letter-spacing: -0.02em;
}

.results-time-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: var(--sp-xs);
}

/* â”€â”€â”€ Grade Badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 2px solid currentColor;
}

.grade-a {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.grade-b {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.grade-c {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.grade-d {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.results-grade-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* â”€â”€â”€ Metrics Grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.metric-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--strategy-3);
  line-height: 1;
}

.metric-value.negative {
  color: #ef4444;
}

.metric-value.positive {
  color: #22c55e;
}

.metric-hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* â”€â”€â”€ Splits Mini Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.splits-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.splits-mini-table th {
  background: var(--bg-surface);
  padding: var(--sp-sm) var(--sp-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.splits-mini-table td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border);
}

.splits-mini-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.splits-mini-table tr:last-child td {
  border-bottom: none;
}

/* â”€â”€â”€ Coach Comment â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.coach-comment {
  font-size: var(--font-size-sm);
  color: #f8fafc;
  line-height: 1.7;
  padding: var(--sp-md) var(--sp-lg);
  border-left: 4px solid var(--strategy-3);
  background: #020617;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* â”€â”€â”€ Recommendations List â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.recommendations-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.recommendations-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: #e5e7eb;
}

.recommendations-list li::before {
  content: "âœ“";
  color: var(--strategy-3);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* â”€â”€â”€ Results QR â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.results-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg);
  padding: var(--sp-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.results-qr h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
}

.results-qr p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-width: 360px;
}

#qrCodeDisplay canvas {
  display: block;
  margin: 0 auto;
  border: 4px solid var(--bg-card);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 8px;
}

/* â”€â”€â”€ Results Actions â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.results-actions {
  display: flex;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-xl);
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.results-actions button {
  flex: 1;
  padding: var(--sp-md) var(--sp-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.results-action-primary {
  background: var(--strategy-3);
  color: #000;
}

.results-action-primary:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.results-action-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border) !important;
}

.results-action-secondary:hover {
  background: var(--border);
  transform: translateY(-2px);
}

/* â”€â”€â”€ Results Modal Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 480px) {
  .results-modal {
    padding: 0;
    align-items: flex-end;
  }

  .results-container {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .results-time {
    font-size: 2.75rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .results-actions {
    flex-direction: column;
  }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MANUAL TAB
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Manual tab-specific active layout */
#manual-tab.active {
  display: block;
  overflow-y: auto;
}

.manual-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-xl) var(--sp-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xl);
}

/* â”€â”€â”€ Manual Hero â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.manual-hero {
  padding: var(--sp-xl);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.manual-hero h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin: 0;
  color: var(--strategy-3);
}

.manual-hero p {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* â”€â”€â”€ Section Blocks â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.manual-section-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.manual-section-block h2 {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin: 0;
  padding-left: var(--sp-lg);
  border-left: 4px solid var(--strategy-3);
  color: var(--text);
}

.manual-section-block h3 {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.manual-section-block p {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.manual-section-block em {
  font-style: italic;
  color: var(--strategy-3);
  font-family: var(--font-display);
  font-weight: 600;
}

/* â”€â”€â”€ Definition Lists â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.manual-section-block dl {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  margin: 0;
}

.manual-section-block dt {
  font-family: var(--font-display);
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--strategy-3);
  padding-bottom: var(--sp-xs);
  border-bottom: 1px dashed var(--border);
}

.manual-section-block dd {
  margin: 0;
  padding: var(--sp-sm) 0 var(--sp-sm) var(--sp-lg);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.7;
  border-left: 2px solid var(--border);
}

/* â”€â”€â”€ Lists â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.manual-section-block ul,
.manual-section-block ol {
  padding-left: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin: 0;
}

.manual-section-block li {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.manual-section-block li strong {
  color: var(--text);
}

/* â”€â”€â”€ Grade Table â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.grade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.grade-table th {
  background: var(--bg-surface);
  padding: var(--sp-md);
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grade-table td {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.grade-table tr:last-child td {
  border-bottom: none;
}

.grade-row-a {
  background: rgba(34, 197, 94, 0.04);
}

.grade-row-a:hover {
  background: rgba(34, 197, 94, 0.08);
}

.grade-row-b {
  background: rgba(59, 130, 246, 0.04);
}

.grade-row-b:hover {
  background: rgba(59, 130, 246, 0.08);
}

.grade-row-c {
  background: rgba(245, 158, 11, 0.04);
}

.grade-row-c:hover {
  background: rgba(245, 158, 11, 0.08);
}

.grade-row-d {
  background: rgba(239, 68, 68, 0.04);
}

.grade-row-d:hover {
  background: rgba(239, 68, 68, 0.08);
}

/* â”€â”€â”€ Tip Box â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.tip-box {
  background: var(--bg-surface);
  border: 1px solid var(--strategy-2);
  border-left: 4px solid var(--strategy-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--sp-lg);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

.tip-box strong {
  color: var(--strategy-2);
  display: block;
  margin-bottom: var(--sp-xs);
}

/* â”€â”€â”€ Manual Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@media (max-width: 768px) {
  .manual-section {
    padding: var(--sp-lg) var(--sp-md) var(--sp-2xl);
    gap: var(--sp-xl);
  }

  .manual-hero h2 {
    font-size: var(--font-size-xl);
  }

  .manual-section-block {
    padding: var(--sp-lg);
  }

  .manual-section-block h2 {
    font-size: var(--font-size-lg);
    padding-left: var(--sp-md);
  }

  .grade-table th,
  .grade-table td {
    padding: var(--sp-sm);
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .manual-section {
    padding: var(--sp-md) var(--sp-md) var(--sp-xl);
    gap: var(--sp-lg);
  }

  .manual-hero {
    padding: var(--sp-lg);
  }

  .manual-hero h2 {
    font-size: var(--font-size-lg);
  }

  .manual-section-block {
    padding: var(--sp-md);
  }

  .manual-section-block h2 {
    font-size: var(--font-size-base);
  }

  .manual-section-block dl,
  .manual-section-block ul,
  .manual-section-block ol {
    padding-left: var(--sp-md);
  }

  .grade-table {
    font-size: 0.7rem;
  }

  .grade-table th,
  .grade-table td {
    padding: var(--sp-xs) var(--sp-sm);
  }
}

/* Final mobile overrides: keep these last so older responsive rules cannot re-break the app. */
@media (max-width: 1024px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .app-container {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .app-header {
    min-height: 52px;
    padding: 8px 56px 8px 12px;
    flex-direction: row;
    align-items: center;
  }

  .app-header h1 {
    font-size: 1.05rem;
    line-height: 1.1;
    margin: 0;
  }

  .header-subtitle {
    display: none;
  }

  .header-controls {
    display: contents;
  }

  .theme-toggle {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tab-navigation {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--bg-card) 94%, transparent);
    border-top: 1px solid var(--border);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
  }

  .tab-btn {
    min-height: 54px;
    padding: 6px 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .tab-btn .icon {
    width: 22px;
    height: 22px;
  }

  .tab-btn.active {
    background: rgba(34, 197, 94, 0.16);
    color: var(--strategy-3);
  }

  .main-layout {
    display: block;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  .tab-content.active,
  #stopwatch-tab.active,
  #manual-tab.active {
    display: block;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--sp-md);
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
  }

  #calculator-tab.active {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    max-width: 100%;
  }

  .sidebar,
  .content {
    overflow: visible;
    padding: 0;
    border: 0;
    gap: var(--sp-md);
    max-width: 100%;
    min-width: 0;
  }

  .strategy-info {
    display: none;
  }

  .strategy-buttons {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 112px;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 28px 10px 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    box-shadow:
      inset -18px 0 18px -18px var(--strategy-3),
      inset 18px 0 18px -18px rgba(15, 23, 42, 0.25);
    scrollbar-color: var(--strategy-3) var(--border);
  }

  .strategy-buttons::-webkit-scrollbar {
    height: 7px;
  }

  .strategy-buttons::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: var(--radius-full);
  }

  .strategy-buttons::-webkit-scrollbar-thumb {
    background: var(--strategy-3);
    border-radius: var(--radius-full);
    border: 1px solid var(--bg-card);
  }

  .strategy-btn,
  .gender-btn {
    min-width: 0;
    min-height: 52px;
    padding: 8px 6px;
    border-radius: 12px;
    font-size: 0.78rem;
    overflow: hidden;
  }

  .strategy-btn {
    scroll-snap-align: start;
  }

  .strategy-btn .icon,
  .strategy-emoji .icon {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
  }

  .strategy-name {
    max-width: 100%;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .card,
  .content .card {
    padding: var(--sp-md);
    border-radius: 14px;
    max-width: 100%;
    overflow: hidden;
  }

  .card h2,
  .card-header h2 {
    font-size: clamp(1.25rem, 6.2vw, 1.8rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .splits-table {
    min-width: 360px;
  }

  .splits-table th,
  .splits-table td,
  .lactate-table th,
  .lactate-table td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  .lactate-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.78rem;
  }

  .lactate-table th,
  .lactate-table td {
    padding: 9px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lactate-table th:nth-child(1),
  .lactate-table td:nth-child(1) { width: 18%; }
  .lactate-table th:nth-child(2),
  .lactate-table td:nth-child(2) { width: 21%; }
  .lactate-table th:nth-child(3),
  .lactate-table td:nth-child(3) { width: 20%; }
  .lactate-table th:nth-child(4),
  .lactate-table td:nth-child(4) { width: 18%; }
  .lactate-table th:nth-child(5),
  .lactate-table td:nth-child(5) { width: 23%; }

  .lactate-zone {
    max-width: 100%;
    padding: 5px 6px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
  }

  .chart {
    height: 190px;
  }
}

@media (max-width: 600px) {
  .sw-screen {
    max-width: none;
    width: 100%;
    min-width: 0;
    padding: 0;
    gap: 8px;
    overflow-x: hidden;
  }

  .sw-target-bar {
    order: 1;
  }

  .sw-timer-block {
    order: 2;
    padding: 14px 8px 10px;
  }

  .sw-time {
    font-size: clamp(2.5rem, 15vw, 3.35rem);
    letter-spacing: 0;
  }

  .sw-deviation {
    order: 3;
    padding: 8px 10px;
  }

  .sw-controls-secondary {
    order: 4;
    position: sticky;
    top: 0;
    z-index: 40;
    grid-template-columns: minmax(92px, 1.6fr) repeat(3, minmax(48px, 1fr));
    gap: 5px;
    padding: 5px;
    margin: 0;
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(12px);
  }

  .sw-btn-sec {
    min-width: 0;
    min-height: 54px;
    padding: 8px 4px;
    font-size: 0.76rem;
    overflow: hidden;
  }

  .sw-btn-split {
    background: var(--strategy-2);
    color: #fff;
  }

  .sw-btn-auswertung {
    font-size: 0;
  }

  .sw-btn-auswertung .icon {
    width: 24px;
    height: 24px;
  }

  .sw-controls-main {
    order: 5;
    gap: 8px;
    min-width: 0;
  }

  .sw-btn {
    min-width: 0;
    min-height: 58px;
    padding: 10px;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .sw-dist-row {
    order: 6;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    min-width: 0;
  }

  .sw-dist-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-width: 0;
  }

  .sw-dist-btn {
    min-width: 0;
    padding-inline: 4px;
    white-space: nowrap;
  }

  .sw-splits-live {
    order: 7;
    max-height: 34vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .sw-splits-live .table-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sw-progress-row {
    order: 8;
    grid-template-columns: repeat(4, 1fr);
  }

  .sw-prog-item {
    padding: 9px 4px;
    border-top: 0 !important;
  }

  .sw-prog-label {
    font-size: 0.6rem;
    letter-spacing: 0;
  }

  .sw-prog-value {
    font-size: 0.78rem;
  }

  .sw-settings-panel {
    order: 9;
  }

  .sw-history-panel {
    order: 10;
  }

  .results-modal {
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .results-modal .results-container {
    max-width: none !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .results-modal .results-time {
    font-size: 2.3rem !important;
    letter-spacing: 0 !important;
  }

  .results-modal .metrics-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .results-modal .results-actions {
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    justify-content: stretch !important;
  }
}
