/* ═══════════════════════════════════════════════════════════
   BREATHFLOW v1 — Components
   ═══════════════════════════════════════════════════════════ */

/* ── Icon-Button ── */
.icon-btn {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--t-soft);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--glass-2); color: var(--t); }
.icon-btn:active { transform: scale(0.9); }
.icon-btn .ico-play, .icon-btn .ico-mute, .icon-btn .ico-sun { display: none; }
:root.dark .icon-btn .ico-moon { display: none; }
:root.dark .icon-btn .ico-sun  { display: block; }
#btn-pause.paused .ico-pause { display: none; }
#btn-pause.paused .ico-play  { display: block; }
#master-mute.muted .ico-vol  { display: none; }
#master-mute.muted .ico-mute { display: block; color: var(--c-alert); }
.icon-btn--stop { color: var(--c-alert); }
.icon-btn--ble.connected { color: var(--c-heart); animation: heartBeat 1.6s ease-in-out infinite; }
@keyframes heartBeat { 0%,100% { transform: scale(1); } 12% { transform: scale(1.18); } 26% { transform: scale(1); } }

.session-ctrls { display: none; gap: 2px; }
body.running .session-ctrls { display: flex; }

/* Zen Focus ist eine Session-Sache — vorher hat der Knopf keinen Zweck */
#btn-zen { display: none; }
body.running #btn-zen { display: grid; }

.master-vol { display: flex; align-items: center; gap: 4px; }
.range--master { width: 66px; }
@media (max-width: 600px) { .range--master { width: 48px; } }
@media (max-width: 400px) { .range--master { display: none; } }

/* ── Range Slider ── */
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 5px; border-radius: var(--r-pill); background: var(--track);
}
.range::-moz-range-track { height: 5px; border-radius: var(--r-pill); background: var(--track); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 17px; height: 17px; margin-top: -6px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  transition: transform var(--t-fast);
}
.range::-moz-range-thumb {
  width: 17px; height: 17px; border: none; border-radius: 50%;
  background: var(--accent); box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.range:active::-webkit-slider-thumb { transform: scale(1.22); }

/* ── Karten / Glas ──
   Zwei Schichten machen den Unterschied: die Fläche selbst und ein
   hauchdünner Lichtsaum an der Oberkante. Ohne den wirkt Glas wie Papier. */
.card, .glass-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: var(--shadow-s), inset 0 1px 0 var(--glass-hi);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  transition: box-shadow var(--t-mid) var(--ease), border-color var(--t-mid);
}
.card:hover, .glass-card:hover { box-shadow: var(--shadow-m), inset 0 1px 0 var(--glass-hi); }
.glass-card { display: grid; gap: var(--sp-3); }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); margin-bottom: var(--sp-3);
}
.card-title { font-size: var(--fs-sm); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.72; }
.mini-label {
  display: block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-faint);
  margin: var(--sp-3) 0 var(--sp-2);
}
.acc-body > .mini-label:first-child,
.mini-label--first { margin-top: 0; }

/* ── Akkordeon ── */
.card--acc { padding: 0; overflow: hidden; }
.card--acc > summary,
.sub-acc > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4);
  transition: background var(--t-fast);
}
.card--acc > summary::-webkit-details-marker,
.sub-acc > summary::-webkit-details-marker { display: none; }
.card--acc > summary:hover, .sub-acc > summary:hover { background: var(--glass-2); }
.card--acc > summary .card-title { margin-right: auto; }
.chev {
  font-size: 1.2rem; color: var(--t-faint); line-height: 1;
  transition: transform var(--t-mid) var(--ease); flex-shrink: 0;
}
details[open] > summary .chev { transform: rotate(90deg); }
/* Oben etwas Luft: aufgeklappt saß der erste Inhalt sonst direkt unter der
   Überschrift — bei „Dein Level", den Session-Kacheln, „Atmung-Audio" und den
   Sound-Bildern gleichermaßen. */
.acc-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); animation: accIn var(--t-mid) var(--ease); }
@keyframes accIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.sub-acc {
  border-top: 1px solid var(--glass-bd);
  margin: var(--sp-3) calc(var(--sp-4) * -1) 0;
}
.sub-acc > summary { padding: var(--sp-3) var(--sp-4); }
.sub-title { display: flex; align-items: center; gap: 6px; margin-right: auto; font-weight: 600; font-size: var(--fs-md); }

/* ── Buttons ── */
.btn-start {
  width: 100%; height: 56px;
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: var(--accent-ct);
  font-size: var(--fs-lg); font-weight: 700; letter-spacing: 0.01em;
  box-shadow: var(--shadow-m);
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.btn-start svg { width: 19px; height: 19px; }
.btn-start:hover { box-shadow: var(--shadow-l); }
.btn-start:active { transform: scale(0.975); }
.btn-start--wide { margin-top: var(--sp-4); }
.btn-start.is-stopping { opacity: 0.6; pointer-events: none; }

.btn-mini {
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  font-size: var(--fs-sm); font-weight: 600; color: var(--t-soft);
  transition: all var(--t-fast);
}
.btn-mini:hover { background: var(--glass-hi); color: var(--t); }
.btn-mini--primary { background: var(--accent); color: var(--accent-ct); border-color: transparent; }
.btn-mini--danger { color: var(--c-alert); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.ghost-btn {
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em;
  color: var(--t-faint); border: 1px solid var(--glass-bd);
  transition: all var(--t-fast);
}
.ghost-btn:hover { color: var(--accent); border-color: var(--accent); }
.ghost-btn--icon { width: 28px; height: 28px; padding: 0; font-size: 1.15rem; line-height: 1; display: grid; place-items: center; }

.text-input {
  flex: 1; min-width: 0;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  color: var(--t); font-size: var(--fs-md); outline: none;
}
.text-input:focus { border-color: var(--accent); }

/* ── Switch ── */
.switch { display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 42px; height: 25px; border-radius: var(--r-pill);
  background: var(--track); position: relative;
  transition: background var(--t-mid) var(--ease);
}
.switch-knob {
  position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.28);
  transition: transform var(--t-mid) var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(17px); }

.row-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--glass-bd);
  font-size: var(--fs-md);
}
.row-toggle:first-of-type { border-top: none; }
/* Zeile mit Erklärung darunter — kein Fachwort ohne Übersetzung */
.row-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-label small {
  font-size: var(--fs-xs); line-height: 1.45; color: var(--t-faint);
}

/* ── Slider-Row ── */
.slider-row { padding: var(--sp-2) 0 var(--sp-3); }
.slider-row.sub { padding-left: var(--sp-3); border-left: 2px solid var(--glass-bd); }
.slider-row label {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); color: var(--t-soft); margin-bottom: 2px;
}
.slider-row label b { color: var(--t); font-weight: 700; }

/* ── Segmented ── */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  border-radius: var(--r-pill);
}
.seg--wide { display: flex; width: 100%; margin-bottom: var(--sp-4); }
.seg--sm { padding: 2px; }
.seg-btn {
  flex: 1; padding: 6px 14px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; color: var(--t-faint);
  white-space: nowrap; transition: all var(--t-fast);
}
.seg--sm .seg-btn { padding: 4px 10px; font-size: var(--fs-xs); }

/* Solange kein Sensor verbunden ist, steht die Atem-Diagnostik allein da.
   Ein Umschalter mit nur einem Feld wirkt wie ein Knopf ins Leere — also
   zeigt sie sich dann als Überschrift der Seite. */
#test-subtabs:has(#subtab-herz.hidden) {
  background: none; border: none; box-shadow: none; padding: 0;
  margin-bottom: var(--sp-5);
}
#test-subtabs:has(#subtab-herz.hidden) .seg-btn {
  background: none; box-shadow: none; color: var(--t);
  padding: 0; text-align: left; cursor: default;
  font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em;
}
.seg-btn.active { background: var(--accent); color: var(--accent-ct); box-shadow: var(--shadow-s); }

/* ── Modus-Schalter ──
   Drei Schalter statt drei Tabs: was du zuschaltest, klappt darunter auf.
   Nichts an heißt Flow — der einfachste Fall braucht keine Entscheidung. */
.mode-switches {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.switch-chip {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  cursor: pointer; user-select: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.switch-chip input { position: absolute; opacity: 0; pointer-events: none; }
.switch-chip .switch-track { width: 36px; height: 21px; flex-shrink: 0; }
.switch-chip .switch-knob { width: 15px; height: 15px; top: 3px; left: 3px; }
.switch-chip input:checked + .switch-track { background: var(--accent); }
.switch-chip input:checked + .switch-track .switch-knob { transform: translateX(15px); }
.switch-label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--t-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color var(--t-fast);
}
/* Aktiv erkennt man am blauen Schalter und an der kräftigeren Schrift.
   Ein Rahmen drumherum zieht den Blick nur vom Atem weg — in beiden Modi. */
.switch-chip:has(input:checked) .switch-label { color: var(--t); }
.switch-chip input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Chips ── */
/* Unten etwas Luft, sonst klebt die Chip-Reihe am nächsten Block. */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-3) 0 var(--sp-2); }
.chip {
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  font-size: var(--fs-sm); font-weight: 600; color: var(--t-soft);
  transition: all var(--t-fast);
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); color: var(--accent-ct); border-color: transparent; }

/* ── Stepper ── */
.stepper-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.stepper-grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .stepper-grid { grid-template-columns: repeat(2, 1fr); } }

.stepper {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  border-radius: var(--r-md); padding: 6px;
}
.step-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--r-sm); background: var(--glass);
  font-size: 1.15rem; font-weight: 600; color: var(--t-soft);
  display: grid; place-items: center;
  transition: all var(--t-fast);
}
.step-btn:hover { background: var(--accent); color: var(--accent-ct); }
.step-btn:active { transform: scale(0.9); }
.step-val { flex: 1; min-width: 0; text-align: center; line-height: 1.15; }
.step-num { display: block; font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.step-unit { display: block; font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--t-faint); }

/* ── Phasen-Pills ── */
.phase-pills { display: grid; gap: 6px; }
@media (min-width: 560px) { .phase-pills { grid-template-columns: repeat(2, 1fr); } }
.pill {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  border-radius: var(--r-md); padding: 5px;
  transition: border-color var(--t-fast), box-shadow var(--t-mid);
}
.pill.live { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 18px -6px var(--c); }
.pill-btn {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-xs);
  background: var(--glass); font-size: 1.05rem; font-weight: 600; color: var(--t-soft);
  display: grid; place-items: center; transition: all var(--t-fast);
}
.pill-btn:hover { background: var(--accent); color: var(--accent-ct); }
.pill-btn:active { transform: scale(0.9); }
.pill-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex-shrink: 0; }
.pill-lbl { flex: 1; font-size: var(--fs-sm); color: var(--t-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-val { font-size: var(--fs-md); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── Quick-Adjust ── */
.quick-adjust {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); margin-top: var(--sp-3);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  border-radius: var(--r-pill); padding: 5px;
}
.qa-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--glass);
  font-size: 1.4rem; font-weight: 400; color: var(--t);
  display: grid; place-items: center;
  box-shadow: inset 0 1px 0 var(--glass-hi);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.qa-btn:hover { background: var(--accent); color: var(--accent-ct); }
.qa-btn:active { transform: scale(0.88); }
.qa-center { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.qa-label { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-faint); }
.qa-mode {
  padding: 3px 12px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--glass-bd);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.02em; color: var(--t-soft);
  white-space: nowrap; transition: all var(--t-fast);
}
.qa-mode:hover { color: var(--accent); border-color: var(--accent); }

.steps-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-3); }
.steps-lbl { font-size: var(--fs-sm); color: var(--t-soft); }

/* ── Info-Dot / Tooltip ── */
.info-dot {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--glass-bd); background: var(--glass-2);
  font-size: 0.6rem; font-weight: 800; font-style: italic;
  color: var(--t-faint); display: grid; place-items: center; line-height: 1;
}
.info-dot:hover { color: var(--accent); border-color: var(--accent); }
.tip {
  position: fixed; z-index: 500; max-width: 280px;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-l);
  font-size: var(--fs-sm); line-height: 1.5;
  animation: tipIn var(--t-fast) var(--ease);
}
.tip b { display: block; margin-bottom: 4px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ── Modal ── */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4, 8, 16, 0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn var(--t-mid) var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: fixed; z-index: 210;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 60px); overflow-y: auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--glass-bd);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow: var(--shadow-l), inset 0 1px 0 var(--glass-hi);
  text-align: center;
  animation: modalIn var(--t-mid) var(--ease);
}
.modal--wide { width: min(640px, calc(100vw - 32px)); }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-ico { font-size: 2.2rem; margin-bottom: var(--sp-2); }
.modal h3 { margin: 0 0 var(--sp-3); font-size: var(--fs-lg); font-weight: 800; }
.modal p { margin: 0 0 var(--sp-4); color: var(--t-soft); font-size: var(--fs-sm); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); font-weight: 700; }
.modal-x { width: 32px; height: 32px; border-radius: 50%; background: var(--glass-2); font-size: 1rem; color: var(--t-soft); }
.btn-modal {
  display: block; width: 100%; padding: 13px; margin-top: var(--sp-2);
  border-radius: var(--r-pill); background: var(--glass-2);
  border: 1px solid var(--glass-bd);
  font-size: var(--fs-md); font-weight: 600; color: var(--t-soft);
  text-decoration: none; text-align: center; transition: all var(--t-fast);
}
.btn-modal:hover { background: var(--glass-hi); color: var(--t); }
.btn-modal--primary { background: var(--accent); color: var(--accent-ct); border-color: transparent; font-weight: 700; }

/* ── Summary ── */
.summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: var(--sp-2); margin-bottom: var(--sp-4);
}
.summary-stat {
  padding: var(--sp-3) var(--sp-2); border-radius: var(--r-md);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
}
.summary-stat b { display: block; font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.summary-stat span { display: block; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-faint); }
.summary-stat.accent b { color: var(--accent); }
.mood-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.mood-btn {
  flex: 1; padding: var(--sp-3) 0; border-radius: var(--r-md);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  font-size: 1.5rem; line-height: 1.2; transition: all var(--t-fast);
}
.mood-btn small { display: block; font-size: 0.62rem; color: var(--t-faint); }
.mood-btn:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ── Toast ── */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--nav-pad-b) + 16px);
  z-index: 300; max-width: min(420px, calc(100vw - 32px));
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow-l), inset 0 1px 0 var(--glass-hi);
  animation: toastIn var(--t-mid) var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translateX(-50%); } }
.toast-ico { font-size: 1.35rem; }
.toast-title { font-weight: 700; font-size: var(--fs-sm); }
.toast-msg { font-size: var(--fs-xs); color: var(--t-soft); }
@media (min-width: 900px) { .toast { bottom: 24px; left: calc(50% + var(--rail-w) / 2); } }

/* ── Zen Overlay ── */
.zen-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: var(--bg-0);
  display: grid; place-items: center;
  animation: fadeIn var(--t-slow) var(--ease);
}
.zen-overlay canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.zen-phase {
  position: relative; z-index: 2;
  font-size: clamp(1.6rem, 6vw, 3rem); font-weight: 200; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--t-soft);
  transform: translateY(28vh);
}
.zen-timer {
  position: absolute; bottom: 12vh; z-index: 2;
  font-size: var(--fs-lg); font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em; color: var(--t-faint);
}
.zen-sub { position: absolute; bottom: 7vh; z-index: 2; font-size: var(--fs-sm); color: var(--t-faint); }
.zen-exit {
  position: absolute; top: calc(var(--safe-t) + 16px); right: 16px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--glass-bd); color: var(--t-soft);
}
.zen-exit svg { width: 19px; height: 19px; }

/* ── BLE Panel ── */
.ble-panel {
  position: fixed; z-index: 150;
  right: 12px; bottom: calc(var(--nav-h) + var(--nav-pad-b) + 12px);
  width: min(330px, calc(100vw - 24px));
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow-l), inset 0 1px 0 var(--glass-hi);
  animation: modalIn var(--t-mid) var(--ease);
}
@media (min-width: 900px) { .ble-panel { bottom: 18px; right: 18px; } }
.ble-panel-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--sp-3); }
.ble-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-good); box-shadow: 0 0 8px var(--c-good); }
.ble-min { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--glass-2); color: var(--t-soft); }
.ble-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: var(--sp-3); }
.ble-stats > div, .mini-stats > div { text-align: center; }
.ble-stats b { display: block; font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ble-stats span { font-size: 0.58rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--t-faint); }
.ble-modes { display: flex; gap: 4px; overflow-x: auto; margin-bottom: var(--sp-2); padding-bottom: 3px; scrollbar-width: none; }
.ble-modes::-webkit-scrollbar { display: none; }
.ble-mode {
  flex: 0 0 auto; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--glass-2); border: 1px solid var(--glass-bd);
  font-size: 0.68rem; font-weight: 700; color: var(--t-faint);
}
.ble-mode.active { background: var(--accent); color: var(--accent-ct); border-color: transparent; }
.ble-canvas { width: 100%; height: 92px; border-radius: var(--r-sm); }
.ble-hint { font-size: var(--fs-xs); color: var(--t-faint); margin-top: 4px; min-height: 1.2em; }
.ble-cockpit #cockpit-canvas { width: 100%; height: 150px; }
.cockpit-status { text-align: center; font-size: var(--fs-sm); color: var(--t-soft); margin: var(--sp-2) 0; }
.cockpit-toggles { display: flex; justify-content: center; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--t-soft); }
.cockpit-toggles label { display: flex; align-items: center; gap: 5px; cursor: pointer; }

.ble-float {
  position: fixed; z-index: 150;
  right: 14px; bottom: calc(var(--nav-h) + var(--nav-pad-b) + 14px);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--glass-bd);
  box-shadow: var(--shadow-m);
}
@media (min-width: 900px) { .ble-float { bottom: 18px; right: 18px; } }
.ble-live-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--c-heart); }
.ble-float.beat .ble-live-dot { animation: dotBeat 0.7s var(--ease); }
@keyframes dotBeat { 0% { transform: scale(1); } 30% { transform: scale(1.6); } 100% { transform: scale(1); } }

.bd-canvas-wrap { position: relative; }
#bd-canvas { width: 100%; height: 190px; border-radius: var(--r-sm); touch-action: none; cursor: grab; }
.bd-zoom { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--t-faint); }

/* ── PWA Prompt ── */
.pwa-prompt {
  position: fixed; z-index: 180;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--nav-pad-b) + 14px);
  width: min(460px, calc(100vw - 24px));
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--glass-bd);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  box-shadow: var(--shadow-l), inset 0 1px 0 var(--glass-hi);
  animation: toastIn var(--t-mid) var(--ease);
}
@media (min-width: 900px) { .pwa-prompt { bottom: 18px; left: calc(50% + var(--rail-w) / 2); } }
.pwa-ico { font-size: 1.6rem; }
.pwa-text { flex: 1; min-width: 0; line-height: 1.35; }
.pwa-text b { display: block; font-size: var(--fs-sm); }
.pwa-text span { font-size: var(--fs-xs); color: var(--t-soft); }
.pwa-close { width: 26px; height: 26px; border-radius: 50%; color: var(--t-faint); font-size: 0.9rem; }

/* ── Notice ── */
.notice {
  padding: var(--sp-5); border-radius: var(--r-lg); text-align: center;
  background: var(--glass-2); border: 1px dashed var(--glass-bd);
}
.notice p { margin: 0 0 var(--sp-3); color: var(--t-soft); font-size: var(--fs-sm); }

/* ══════════════ PRODUKT-TOUR ══════════════
   Ein Scheinwerfer auf ein Element, daneben die Erklärung. Das Loch entsteht
   über einen sehr großen Schlagschatten nach außen — dadurch bleibt das Ziel
   scharf und alles andere legt sich zurück. */
.tour { position: fixed; inset: 0; z-index: 300; pointer-events: none; }

.tour-schatten {
  position: fixed;
  border-radius: var(--r-lg);
  box-shadow: 0 0 0 9999px rgba(6, 16, 30, 0.62);
  transition: left var(--t-mid) var(--ease), top var(--t-mid) var(--ease),
              width var(--t-mid) var(--ease), height var(--t-mid) var(--ease);
  pointer-events: auto;
}
/* Ohne Ziel: die ganze Fläche abdunkeln, die Karte steht mittig. */
.tour-schatten--voll {
  left: 50%; top: 50%; width: 0; height: 0;
  border-radius: 0;
}
:root.dark .tour-schatten { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72); }

.tour-karte {
  position: fixed;
  width: min(340px, calc(100vw - 24px));
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--glass-bd);
  box-shadow: var(--shadow-m);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  transition: left var(--t-mid) var(--ease), top var(--t-mid) var(--ease);
}
.tour-karte h3 { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.tour-karte p { margin: 0 0 var(--sp-3); color: var(--t-soft); font-size: var(--fs-sm); line-height: 1.55; }

.tour-zaehler {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--t-faint); margin-bottom: 4px;
}
.tour-zu {
  position: absolute; top: 8px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--t-faint); font-size: 0.9rem; line-height: 1;
}
.tour-zu:hover { background: var(--glass-2); color: var(--t); }
.tour-knoepfe { display: flex; gap: var(--sp-2); justify-content: flex-end; }

/* Während der Tour nichts verstellen — sie soll erklären, nicht bedienen. */
body.tour-an .shell { pointer-events: none; }
body.tour-an .tour { pointer-events: none; }
