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

:root {
  --gruen:      #7ed957;
  --gruen-soft: rgba(126, 217, 87, 0.55);
  --w04: rgba(255,255,255,0.04);
  --w06: rgba(255,255,255,0.06);
  --w08: rgba(255,255,255,0.08);
  --w12: rgba(255,255,255,0.12);
  --w40: rgba(255,255,255,0.40);
  --w55: rgba(255,255,255,0.55);
  --fade: 1.6s;

  --sun:     126, 217, 87;
  --sun-rim: rgba(126,217,87,0.55);
}

body.theme-meer  { --sun: 80,  200, 240;  --sun-rim: rgba(80,200,240,0.6); }
body.theme-berg  { --sun: 255, 226, 150; --sun-rim: rgba(255,226,150,0.65); }
body.theme-blau  { --sun: 130, 180, 255; --sun-rim: rgba(130,180,255,0.5); }
body.theme-nacht { --sun: 120, 170, 255; --sun-rim: rgba(120,170,255,0.55); }
body.theme-wald  { --sun: 100, 210, 120; --sun-rim: rgba(100,210,120,0.6); }
body.theme-bach  { --sun: 80,  200, 200; --sun-rim: rgba(80,200,200,0.6); }
body.theme-regen { --sun: 200, 160, 100; --sun-rim: rgba(200,160,100,0.6); }
body.theme-cafe  { --sun: 255, 160,  60; --sun-rim: rgba(255,160,60,0.6); }
body.theme-zikaden { --sun: 255, 195,  90; --sun-rim: rgba(255,195,90,0.6); }

html, body {
  height: 100%;
  background: #0a2535;
  font-family: 'Inter', system-ui, sans-serif;
  color: #fff;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
/* <html> bis zum physischen Bildschirmrand strecken (large viewport height).
   Der Hintergrund wird per JS (setBg) auf <html> gelegt und fuellt so die
   untere tote Zone, die fixed-Elemente auf iOS nicht erreichen. */
html {
  min-height: 100vh;
  min-height: 100lvh;
  background-size: cover;
  background-position: center;
}

/* ─── Hintergrund ─────────────────────────────────────────── */
#bg {
  /* Oben UND unten ueber den Viewport hinaus verankert (top/bottom negativ).
     Keine feste Pixelhoehe -> passt sich jeder Geraetehoehe selbst an. Der
     100px-Ueberstand deckt iOS-Statusleiste (oben) und Home-Indicator (unten)
     sicher ab, egal was screen.height/innerHeight auf iOS melden. */
  position: fixed; left: 0; right: 0;
  top: -100px; bottom: -100px;
  z-index: 0;
  background: #0a2535;
  transition: background 0.7s ease;
  will-change: transform;
}
#bg-slide {
  position: fixed; left: 0; right: 0;
  top: -100px; bottom: -100px;
  z-index: 0;
  background: #0a2535;
  pointer-events: none;
  transform: translateX(100%);
  will-change: transform;
}
#bg.bg-blau    { background: #080e18; }
#bg.bg-grau    { background: #141414; }
#bg.bg-nacht   { background: #071525; }
#bg.bg-schwarz { background: #000; }
#bg.bg-berg       { background: url('berglandschaft_0.1.jpg') center/cover no-repeat; }
#bg.bg-meer       { background: url('meer_0.2.jpg') center/cover no-repeat; }
#bg.bg-nacht-meer { background: url('nacht_meer_0.1.jpg') center/cover no-repeat; }
#bg.bg-wald       { background: url('wald_0.1.jpg') center/cover no-repeat; }
#bg.bg-bach       { background: url('bach_0.1.jpg') center/cover no-repeat; }
#bg.bg-regen      { background: url('regen_0.1.jpg') center/cover no-repeat; }
#bg.bg-cafe       { background: url('cafe_0.1.jpg') center/cover no-repeat; }
#bg.bg-zikaden    { background: url('zikaden_0.1.jpg') center/cover no-repeat; }

#bg-shade {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.35) 100%);
}

/* ─── Display abdunkeln ───────────────────────────────────── */
#dim-overlay {
  position: fixed; inset: 0; z-index: 4;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ─── App-Wrapper ─────────────────────────────────────────── */
/* position:fixed + top/bottom:0 statt height:100dvh –
   garantiert exakt denselben Viewport wie der Splash-Screen.
   100dvh ist auf iOS PWA manchmal minimal kleiner als die
   physische Displayhöhe, was den Streifen am unteren Rand erzeugt. */
#app {
  position: fixed; z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Header ──────────────────────────────────────────────── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* var(--safe-top) wird beim Start eingefroren (app.js), solange die Statusleiste
     noch sichtbar ist. So springt der Header nicht, wenn StatusBar.hide() die Leiste
     ausblendet (sonst faellt env(safe-area-inset-top) auf 0). Fallback: live env(). */
  padding: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 20px) 24px 0;
  flex-shrink: 0;
  transition: opacity var(--fade) ease;
}
.app-title-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.app-title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--w40);
  line-height: 1;
}
#app-version {
  font-size: 9px;
  color: rgba(255,255,255,0.30);
  letter-spacing: 0.5px;
  margin-left: 4px;
  align-self: flex-end;
  margin-bottom: 1px;
}
.header-ear {
  height: 1.6em;
  font-size: 12px;
  width: auto;
  opacity: 0.85;
  margin-bottom: -3px;
}
#menu-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.82);
  padding: 8px; margin: -8px;
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 2px;
}
/* box-shadow direkt auf den Strichen (nicht drop-shadow am Container –
   das wirkt auf iOS zu schwach). Doppelter Schatten = klar lesbar
   auf hellen Hintergründen wie Wald und Bach. */
#menu-btn span {
  display: block; width: 22px; height: 2px;
  background: currentColor; border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 3px rgba(0,0,0,0.7);
}

/* ─── Stage (Button-Zone) ─────────────────────────────────── */
#stage {
  flex: 1;
  position: relative;
  touch-action: pan-y;
}

#btn-area {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#start-btn {
  width: 128px; height: 128px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--sun-rim);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.6s, transform 0.25s;
  user-select: none;
  position: relative;
}
#start-btn:active { transform: scale(0.97); }

/* Glas-Ebene: konstanter Blur, nur opacity wird gefadet.
   Grund: backdrop-filter-blur-Werte animieren nicht sauber (springen auf iOS/WebView),
   opacity dagegen ist überall butterweich. Idle = sichtbares Frosted Glass,
   Running = fast unsichtbar (klare Glaskugel). */
#start-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity 1.4s ease;
  pointer-events: none;
  z-index: 0;
}

#start-btn::before {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(var(--sun), 0.30) 0%,
    rgba(var(--sun), 0.12) 38%,
    rgba(var(--sun), 0) 70%);
  /* Opacity vollständig per JS gesteuert via --glow-opacity */
  opacity: var(--glow-opacity, 0);
  transition: opacity var(--glow-transition, 0ms);
  pointer-events: none;
  z-index: -1;
}

/* Play/Pause-Symbol */
.glyph {
  position: relative;
  z-index: 1; /* über der Glas-Ebene (::after, z-index 0) */
  width: 30px; height: 34px;
  display: flex; align-items: center; justify-content: center;
}
.glyph::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 15px 0 15px 26px;
  border-color: transparent transparent transparent rgba(255,255,255,0.75);
  margin-left: 5px;
  transition: opacity 0.3s;
  /* dauerhaft eigener Layer → kein Snap am Transition-Ende */
  will-change: opacity;
  transform: translateZ(0);
}
.glyph .bar {
  position: absolute;
  width: 7px; height: 30px;
  background: rgb(var(--sun));
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s;
  will-change: opacity;
}
/* translateZ(0) hält die Striche auf stabilem Layer (kein Compositing-Sprung) */
.glyph .bar.l { transform: translateX(-7px) translateZ(0); }
.glyph .bar.r { transform: translateX(7px) translateZ(0); }

body.running .glyph::before { opacity: 0; }
body.running .glyph .bar    { opacity: 1; }

body.running #start-btn {
  border-color: var(--sun-rim);
  box-shadow: 0 0 22px rgba(var(--sun), 0.30);
  transition: border-color 0.6s, box-shadow 1.4s ease, transform 0.25s;
}
/* Glas-Ebene fadet beim Start sanft weg → klare Glaskugel.
   Langsamer + ease-in-out, damit der sichtbare Teil nicht zu schnell wegrauscht. */
body.running #start-btn::after {
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

#status-word {
  margin-top: 22px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--w40);
  transition: color 0.5s;
}
body.running #status-word { color: var(--sun-rim); }

/* ─── Stummschalter-Hinweis (iPhone, Homescreen-Start) ──────── */
#mute-hint {
  position: fixed;
  left: 20px; right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 150;
  background: rgba(10, 37, 53, 0.94);
  border: 1px solid var(--gruen-soft);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #fff;
  text-align: left;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
#mute-hint.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#mute-hint p { margin: 0 0 10px; }
#mute-hint strong { color: var(--gruen); font-weight: 600; }
#mute-hint button {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  background: var(--gruen);
  color: #0a2535;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ─── „Was ist neu"-Pop-up (gleicher Stil wie Stummschalter-Hinweis) ─── */
#whatsnew {
  position: fixed;
  left: 20px; right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 150;
  background: rgba(10, 37, 53, 0.94);
  border: 1px solid var(--gruen-soft);
  border-radius: 14px;
  padding: 16px 18px;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
#whatsnew.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#whatsnew .wn-title {
  margin: 0 0 10px;
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gruen);
}
#whatsnew ul {
  margin: 0 0 14px; padding-left: 20px;
  font-size: 14px; line-height: 1.5;
}
#whatsnew li { margin-bottom: 6px; }
#whatsnew button {
  display: block; width: 100%;
  padding: 10px;
  background: var(--gruen); color: #0a2535;
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer;
}

/* ─── Unterer Block ───────────────────────────────────────── */
#lower {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 20px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity var(--fade) ease;
  /* Dunkles Kontrast-Panel: macht Kacheln + Timer-Chips auf jedem Hintergrund lesbar */
  background: linear-gradient(to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.6) 35%,
    rgba(0,0,0,0.4) 65%,
    rgba(0,0,0,0.12) 88%,
    transparent 100%);
  padding-top: 28px;
}

/* Textschatten auf allen Bedien-Labels unten → lesbar auf jedem Hintergrund */
.sound-tile .tile-label,
.sound-tile i,
.chip,
#timer-display {
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
body.running.idle #lower { opacity: 0; pointer-events: none; }
body.running.idle header  { opacity: 0; pointer-events: none; }

/* Meditieren läuft: #lower immer weg, unabhängig von idle */
body.medi-active #lower {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
body.medi-active header {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* ─── Sound-Kacheln ───────────────────────────────────────── */
/* Wrapper trägt das negative Margin (statt #sound-row selbst), damit die
   Scroll-Pfeile relativ zum echten Bildschirmrand positioniert werden
   können, statt mit der Kachelreihe selbst wegzuscrollen. */
#sound-row-wrap {
  position: relative;
  margin: 0 -20px;
}
#sound-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Inneres Padding stellt den Abstand wieder her –
     so startet die Maske vom echten Bildschirmrand */
  padding: 4px 20px;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
#sound-row::-webkit-scrollbar { display: none; }

/* Scroll-Hinweis: dezente Pfeile an den Rändern, zeigen neuen Nutzern,
   dass die Kachelreihe seitlich wischbar ist. Per JS ein-/ausgeblendet
   je nach Scroll-Position (updateScrollHints). Blenden mit #lower aus,
   weil sie strukturell darin sitzen (kein eigenes idle-Handling nötig). */
.scroll-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 20px;
  pointer-events: none;
  opacity: 0;
  border-radius: 12px;
  /* Dunkles Pill hinter dem Pfeil: setzt ihn kräftiger von den Kacheln ab,
     statt nackt über sie zu liegen. */
  transition: opacity 0.3s ease;
  z-index: 2;
}
.scroll-hint.show { opacity: 1; }
#scroll-hint-left  { left: 2px; background: linear-gradient(to right, rgba(0,0,0,0.5), transparent); }
#scroll-hint-right { right: 2px; background: linear-gradient(to left, rgba(0,0,0,0.5), transparent); }

.sound-tile {
  flex-shrink: 0;
  width: 54px; height: 54px;
  position: relative;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.15s;
  user-select: none;
}
.sound-tile:active { transform: scale(0.93); }
.sound-tile i {
  font-size: 22px; line-height: 1;
  color: rgba(255,255,255,0.62);
  transition: color 0.25s;
}
.sound-tile .tile-label {
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--w40);
  white-space: nowrap;
  transition: color 0.25s;
}
.sound-tile.active {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.50);
  box-shadow: 0 0 14px rgba(255,255,255,0.08);
}
.sound-tile.active i      { color: var(--gruen); }
.sound-tile.active .tile-label { color: var(--gruen); }

.sound-tile.none-tile.active {
  background: var(--w08);
  border-color: var(--w40);
  box-shadow: none;
}
.sound-tile.none-tile.active i          { color: var(--w55); }
.sound-tile.none-tile.active .tile-label { color: var(--w55); }


/* ─── Timer ───────────────────────────────────────────────── */
#timer-section { display: flex; flex-direction: column; gap: 10px; }

#timer-chips { display: flex; gap: 8px; }
.chip {
  flex: 1;
  padding: 7px 0;
  background: var(--w06);
  border: 1px solid var(--w08);
  border-radius: 22px;
  font-family: inherit;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--w55);
  cursor: pointer; text-align: center;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s;
  user-select: none;
}
.chip:active { transform: scale(0.95); }
.chip.active {
  background: rgba(126,217,87,0.12);
  border-color: var(--gruen-soft);
  color: var(--gruen);
}

#slider-row {
  display: flex; align-items: center; gap: 14px;
  max-height: 60px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.35s ease;
}
#slider-row.collapsed { max-height: 0; opacity: 0; pointer-events: none; }

#timer-display {
  font-size: 30px; font-weight: 200;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.78);
  min-width: 96px; text-align: center;
  font-variant-numeric: tabular-nums;
}
input[type=range] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 2px; background: var(--w12);
  border-radius: 2px; outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%; background: var(--gruen);
  cursor: pointer; box-shadow: 0 0 10px rgba(126,217,87,0.5);
}
input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%; background: var(--gruen);
  cursor: pointer; border: none;
}

/* ─── Menü-Sheet ──────────────────────────────────────────── */
#menu-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 50; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#menu-overlay.open { opacity: 1; pointer-events: all; }

#menu-sheet {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 420px;
  background: #0e160e;
  border-top: 1px solid var(--w12);
  border-radius: 24px 24px 0 0;
  padding: 14px 24px 40px;
  z-index: 51;
  transition: transform 0.4s cubic-bezier(0.32,0.72,0,1);
  max-height: 78vh; overflow-y: auto;
}
#menu-sheet.open { transform: translateX(-50%) translateY(0); }

.sheet-handle {
  width: 38px; height: 4px;
  background: var(--w12);
  border-radius: 2px;
  margin: 0 auto 24px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  touch-action: none;
}
.sheet-handle::before {
  content: '';
  position: absolute;
  inset: -12px -30px;
}
.sheet-handle:active { background: var(--w40); }
.sheet-section { margin-bottom: 28px; }
.sheet-title {
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: var(--w40);
  margin-bottom: 14px;
}
#bg-swatches,
#bg-swatches-natur { display: flex; flex-wrap: wrap; gap: 12px; }
.sheet-hint-natur { margin-top: 16px; }
.bg-swatch {
  width: 52px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; background: none; border: none;
}
.swatch-color {
  width: 44px; height: 44px; border-radius: 12px;
  border: 2px solid var(--w12);
  transition: border-color 0.2s;
}
.bg-swatch.active .swatch-color { border-color: var(--gruen); }
.swatch-label { font-size: 10px; color: var(--w40); }

.dim-slider { width: 100%; }

/* ─── Menü: Hinweistext ──────────────────────────────────── */
.sheet-hint {
  font-size: 11px;
  color: var(--w40);
  margin-top: 6px;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

/* ─── Menü: Update-Button (betont, grüner Akzent) ────────── */
#update-btn {
  width: 100%;
  padding: 11px 0;
  background: rgba(126, 217, 87, 0.10);
  border: 1px solid var(--gruen-soft);
  border-radius: 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: var(--gruen);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
#update-btn:active { background: rgba(126, 217, 87, 0.20); }
#update-btn:disabled { opacity: 0.5; cursor: default; }

#update-status {
  font-size: 11px;
  color: var(--w55);
  text-align: center;
  margin-top: 8px;
  min-height: 18px;
  line-height: 1.5;
}

/* ─── Menü: Feedback-Button (dezent, zurückhaltend) ──────── */
#feedback-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 0;
  background: var(--w06);
  border: 1px solid var(--w12);
  border-radius: 22px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--w55);
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
#feedback-btn:active { background: var(--w12); }

/* ─── Menü: Versionsnummer ───────────────────────────────── */
#menu-version {
  font-size: 10px;
  color: var(--w40);
  letter-spacing: 1.5px;
  text-align: center;
  padding: 8px 0 4px;
}

/* ─── Menü Footer-Links ──────────────────────────────────── */
.sheet-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 12px 0 20px;
  border-top: 1px solid var(--w08);
  margin-top: 4px;
}
.sheet-footer-links a {
  font-size: 11px;
  color: var(--w40);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.sheet-footer-links a:active { color: var(--w55); }

/* ─── Splash Screen ──────────────────────────────────────── */
#splash {
  position: fixed; inset: 0; z-index: 200;
  background: #0a2535;   /* Landingpage-Blau – konsistentes Design */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.9s ease;
}
#splash.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Rundes App-Icon als klare Scheibe auf dunklem Grund, mit weichem Schein */
#splash-icon {
  width: 62%; max-width: 330px; height: auto;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(126,217,87,0.18),   /* dezenter grüner App-Schein */
              0 10px 40px rgba(0,0,0,0.45);       /* sanfte Tiefe */
  animation: splash-fadein 1.1s ease-out both;
}

#splash-night { display: none; }

@keyframes splash-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#splash-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  margin-top: 18px;
  user-select: none;
  animation: splash-fadein 1.4s ease-out both;
}
#splash-title {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(0,0,0,0.45);
}
#splash-dots {
  display: flex; gap: 8px;
  margin-top: 22px;
}
#splash-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #7ed957;
  opacity: 0.25;
  animation: splash-dot 1.4s ease-in-out infinite;
}
#splash-dots span:nth-child(2) { animation-delay: 0.22s; }
#splash-dots span:nth-child(3) { animation-delay: 0.44s; }
@keyframes splash-dot {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 1; }
}
/* Dezenter Beruhigungs-Hinweis, direkt unter den Ladepunkten als eine Gruppe */
#splash-hint {
  margin-top: -3px;
  max-width: 250px;
  font-size: 12.5px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.2px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255,255,255,0.5);
  /* Erst sanft einblenden, danach ruhig weiteratmen (pulsieren) */
  animation: splash-fadein 1.2s ease-out both,
             splash-hint-pulse 3.8s ease-in-out 1.2s infinite;
}
@keyframes splash-hint-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* Klangschalen-Auswahl im Meditieren-Panel – wählbar, außer bei "Nur Klang" */
#gong-schalen {
  display: flex;
  gap: 8px;
}
#gong-schalen .gong-tile {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease, background 0.2s, border-color 0.2s, color 0.2s;
}
/* "Nur Klang" (kein Gong): Schalen blass + nicht wählbar */
#medi-sheet.no-gong #gong-schalen .gong-tile {
  opacity: 0.28;
  pointer-events: none;
}

.gong-tile {
  flex: 1;
  padding: 7px 4px;
  border-radius: 18px;
  background: var(--w06);
  border: 1px solid var(--w08);
  font-family: inherit;
  font-size: 11px; font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--w40);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  user-select: none;
  white-space: nowrap;
}
.gong-tile:active { transform: scale(0.95); }
.gong-tile.active {
  background: rgba(126,217,87,0.10);
  border-color: var(--gruen-soft);
  color: var(--gruen);
}

/* ─── Menü: Modi-Erklärung ────────────────────────────────── */
.mode-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mode-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mode-info-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--gruen);
  letter-spacing: 0.3px;
}
.mode-info-desc {
  font-size: 11px;
  color: var(--w40);
  line-height: 1.5;
}

/* ─── Meditieren-Timer-Anzeige ───────────────────────────── */
#medi-timer {
  margin-top: 20px;
  min-height: 56px;
  font-size: 40px;
  font-weight: 200;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.82);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
body.running.medi-mode #medi-timer {
  opacity: 1;
}
body.running.idle.medi-mode #medi-timer {
  opacity: 0.12;
  transition: opacity 1.6s ease;
}

/* Auto-Dim läuft jetzt über #dim-overlay z-index 4 + JS */


/* ─── Wald + Bach: weißer Rand im Idle (Themenfarbe zu ähnlich zum Bild) ── */
body.theme-wald #start-btn,
body.theme-bach #start-btn {
  border-color: rgba(255,255,255,0.45);
}
body.theme-wald.running #start-btn,
body.theme-bach.running #start-btn {
  border-color: var(--sun-rim);
}

/* ─── Weicher Stop-Übergang ───────────────────────────────── */
/* body.stopping überschreibt body.running – Button faded sanft zurück */
body.stopping #start-btn {
  border-color: var(--w12);
  box-shadow: none;
  transition: border-color 1.5s ease, box-shadow 1.5s ease, transform 0.25s;
}
/* Glas-Ebene fadet beim Stop sanft zurück (Frosted Glass) */
body.stopping #start-btn::after {
  opacity: 1;
  transition: opacity 1.5s ease;
}
body.stopping .glyph .bar {
  opacity: 0;
  transition: opacity 1s ease;
}
body.stopping .glyph::before {
  opacity: 1;
  transition: opacity 1s ease;
}

/* ─── Section-Label (Einschlaf-Timer, Dauer, Klang, Gong) ────── */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--w40);
  margin-bottom: 6px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

/* ─── Meditieren-Einstieg (dezent, unter den Timer-Chips) ────── */
#medi-entry {
  align-self: center;
  display: flex; align-items: center; gap: 7px;
  background: none; border: none;
  color: var(--w55);
  font-family: inherit; font-size: 12px; font-weight: 400;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 4px 14px;
  margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  transition: color 0.2s;
  user-select: none;
}
#medi-entry i { font-size: 16px; }
#medi-entry:active { color: var(--gruen); }

/* ─── Meditieren-Panel ──────────────────────────────────────── */
#medi-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 50; opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#medi-overlay.open { opacity: 1; pointer-events: all; }

#medi-sheet {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 420px;
  background: #0e160e;
  border-top: 1px solid var(--w12);
  border-radius: 24px 24px 0 0;
  padding: 14px 24px 40px;
  z-index: 51;
  transition: transform 0.4s cubic-bezier(0.32,0.72,0,1);
  max-height: 82vh; overflow-y: auto;
}
#medi-sheet.open { transform: translateX(-50%) translateY(0); }

.medi-block { margin-bottom: 22px; }

#medi-chips, #medi-sound-toggle { display: flex; gap: 8px; }

.medi-chip, .medi-toggle {
  flex: 1;
  padding: 9px 0;
  background: var(--w06);
  border: 1px solid var(--w08);
  border-radius: 22px;
  font-family: inherit;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--w55);
  cursor: pointer; text-align: center;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s;
  user-select: none;
}
.medi-chip:active, .medi-toggle:active { transform: scale(0.95); }
.medi-chip.active, .medi-toggle.active {
  background: rgba(126,217,87,0.12);
  border-color: var(--gruen-soft);
  color: var(--gruen);
}

#medi-slider-row {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px;
}
#medi-timer-display {
  font-size: 22px; font-weight: 200;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.78);
  min-width: 78px; text-align: center;
  font-variant-numeric: tabular-nums;
}

#medi-start-btn {
  width: 100%;
  padding: 14px 0;
  background: rgba(126,217,87,0.14);
  border: 1px solid var(--gruen-soft);
  border-radius: 26px;
  font-family: inherit;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--gruen);
  cursor: pointer; text-align: center;
  transition: background 0.2s, transform 0.15s;
}
#medi-start-btn:active { transform: scale(0.97); background: rgba(126,217,87,0.22); }

