:root {
  --bg: #1c1c1e;
  --bg-2: #2c2c2e;
  --bg-3: #3a3a3c;
  --text: #ffffff;
  --text-2: #86868b;
  --text-3: #48484a;
  --accent: #0a84ff;
  --success: #30d158;
  --warning: #ff9f0a;
  --danger: #ff453a;
  --border: #38383a;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  height: 100%;
  overscroll-behavior: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
}

#view-root {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

#tab-bar {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
}

#tab-bar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-2);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#tab-bar a.active { color: var(--accent); }
#tab-bar .tab-icon { font-size: 22px; }

h1 { font-size: 28px; font-weight: 700; margin: 4px 0 16px; }
h2 { font-size: 22px; font-weight: 600; margin: 16px 0 8px; }
h3 { font-size: 17px; font-weight: 600; }

.label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.card-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: var(--text-2); }

.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
  width: 100%;
}

.btn-success {
  background: var(--success);
  color: black;
  width: 100%;
}

.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 100%;
}

.chip {
  display: inline-block;
  padding: 8px 14px;
  background: var(--bg-3);
  color: var(--text);
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  margin: 4px 4px 4px 0;
}

.chip.active {
  background: var(--accent);
  color: white;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-cue {
  background: var(--bg-2);
  border-left: 3px solid var(--warning);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.form-cue .label { color: var(--warning); }
.form-cue p { font-size: 14px; margin-top: 4px; }

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  padding: 12px;
  border-radius: 12px;
}
.stepper-value {
  font-size: 28px;
  font-weight: 700;
  min-width: 50px;
  text-align: center;
}
.stepper-button {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--bg-3);
  color: var(--text);
  border: none;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.timer-display {
  font-size: 72px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--accent);
  letter-spacing: -2px;
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.list-item {
  background: var(--bg-2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 8px;
  display: block;
  text-decoration: none;
  color: var(--text);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
  font-size: 14px;
}

.session-elapsed {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.session-elapsed.warning { color: var(--warning); }
.session-elapsed.danger { color: var(--danger); }

.workout-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  margin: -16px -16px 16px;
}
