/* app.lawshift.de – Gestaltung wie lawshift.de, gebaut fürs Handy */

@font-face { font-family: "Public Sans"; src: url("../fonts/PublicSans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --grund: #F5F2EC;
  --grund-tief: #ECE7DE;
  --tinte: #15181C;
  --text: #2A2E34;
  --leise: #5C616A;
  --linie: #C9C2B6;
  --blau: #2F5D8A;
  --rot: #C2410C;
  --gruen: #2E7D4F;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}

/* Dunkler Modus nach Einstellung des Handys */
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #15181C;
    --grund-tief: #1F2329;
    --tinte: #F2EEE6;
    --text: #E4DFD6;
    --leise: #B9B3A8;
    --linie: #3A3F47;
    --blau: #6E9BC8;
    --rot: #E06A3A;
    --gruen: #5FB884;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--grund);
  color: var(--text);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; }

/* Kopf: Marke und Schalter Zuhause | Unterwegs */
.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 0 8px;
}
.marke { color: var(--tinte); font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.zurueck {
  border: 0;
  background: var(--grund-tief);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 15px;
  color: var(--tinte);
  cursor: pointer;
}

/* Startbildschirm */
.ansicht {
  flex: 1;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 0;
}
h1 { color: var(--tinte); font-size: clamp(30px, 8vw, 40px); line-height: 1.1; margin: 8px 0 8px; letter-spacing: -0.02em; }
.unterzeile { color: var(--leise); margin: 0 0 32px; }

/* Die Schaltkulisse: Linien als Bild, Knöpfe darüber gelegt */
.kulisse {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 260;
  margin: 88px 0 64px; /* oben mehr Luft: die Beschriftungen ragen über die Kulisse hinaus */
  color: var(--linie);
}
.gassen { position: absolute; inset: 0; width: 100%; height: 100%; }

.knopf {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  color: var(--tinte);
  -webkit-tap-highlight-color: transparent;
}
.kugel {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 5px solid var(--tinte);
  background: var(--grund);
  transition: transform .15s ease;
}
/* Beschriftung: oben über der Kugel, unten darunter */
.knopf .text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  text-align: center;
  line-height: 1.25;
  bottom: 100%;
  height: 3.9em;
  padding-bottom: 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.knopf.unten .text { bottom: auto; top: 100%; height: auto; padding: 6px 0 0; }
.knopf .name { display: block; font-weight: 600; font-size: 16px; }
.knopf .bild { display: block; font-size: 13px; color: var(--leise); }

.knopf .kugel {
  border-color: var(--blau);
  background: var(--grund);
}
.knopf.unten .kugel {
  border-color: var(--rot);
  background: var(--grund);
}
.knopf.blau .kugel { background: var(--blau); border-color: var(--blau); width: 56px; height: 56px; }
.knopf.leise .kugel { border-color: var(--linie); }
.knopf.leise .name { color: var(--leise); font-weight: 500; }

.knopf:hover .kugel, .knopf:focus-visible .kugel { transform: scale(1.08); }
.knopf:active .kugel { transform: scale(.94); }
.knopf:focus-visible { outline: none; }
.knopf:focus-visible .kugel { box-shadow: 0 0 0 4px var(--grund), 0 0 0 7px var(--blau); }

.fuss {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 0 24px;
  font-size: 13px;
  color: var(--leise);
  text-align: center;
}
.fuss p { margin: 0; }
.fuss .rechtliches { margin-top: 6px; }
.fuss a { color: inherit; }
.marke sup, .fuss sup { font-size: .55em; font-weight: 500; vertical-align: super; line-height: 0; }

/* Auftanken und Beats */
.kicker { color: var(--rot); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 8px 0 4px; }
h2 { color: var(--tinte); font-size: clamp(26px, 7vw, 34px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.02em; }
#sitzung { text-align: center; }
#sitzung .phase { min-height: 2.3em; display: flex; align-items: center; justify-content: center; }
.kreis-rahmen { display: grid; place-items: center; height: 260px; margin: 16px 0; }
.kreis-rahmen > * { grid-area: 1 / 1; }
.kreis {
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: #fff;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--blau);
  opacity: .85;
  transform: scale(1);
  transition: transform 2s ease;
}
/* 4 s ein (größer), 6 s aus (kleiner) */
.laeuft .kreis.atmet { animation: atmen 10s ease-in-out infinite; }
@keyframes atmen {
  0% { transform: scale(1); }
  40% { transform: scale(1.9); }
  100% { transform: scale(1); }
}
.hinweis { color: var(--leise); min-height: 3em; margin: 0 0 24px; }
.spieler { display: flex; align-items: center; gap: 14px; }
.abspielen {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--tinte);
  color: var(--grund);
  font-size: 18px;
  cursor: pointer;
}
/* Leiste: 6 px sichtbar, aber 36 px hoch zum Antippen und Ziehen; Punkt am Ende zeigt, dass man spulen kann */
.leiste { flex: 1; position: relative; height: 36px; cursor: pointer; touch-action: none; }
.leiste::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 6px; border-radius: 3px; background: var(--grund-tief); }
.fortschritt { position: absolute; left: 0; top: 15px; height: 6px; width: 0; border-radius: 3px; background: var(--blau); }
.fortschritt::after { content: ""; position: absolute; right: -8px; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--blau); }
.zeit { flex: none; font-variant-numeric: tabular-nums; color: var(--leise); font-size: 15px; min-width: 3ch; }

.titel { list-style: none; padding: 0; margin: 24px 0 0; }
.titel li + li { margin-top: 10px; }
.titel button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: var(--grund);
  text-align: left;
  font-weight: 600;
  color: var(--tinte);
  cursor: pointer;
}
.titel button small { margin-left: auto; font-weight: 400; color: var(--leise); font-size: 14px; }
.titel .symbol {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grund-tief);
  font-size: 13px;
}
.titel button.aktiv { border-color: var(--blau); }
.titel button.aktiv .symbol { background: var(--blau); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .laeuft .kreis.atmet { animation-duration: 20s; }
}

/* Echte Uhr im Wahrnehmen-Teil */
.uhr { display: none; width: 220px; height: 220px; border: 0; padding: 0; background: none; cursor: pointer; }
.uhr svg { width: 100%; height: 100%; }
.uhr .stunde, .uhr .minute, .uhr .sekunde { transform-origin: 100px 100px; }
.mit-uhr .uhr { display: block; }
.mit-uhr .kreis { display: none; }


/* Play-Zeichen im Kreis: sichtbar vor dem Start und bei Pause, verschwindet beim Abspielen */
.kreis .play { font-size: 34px; line-height: 1; margin-left: 6px; transition: opacity .6s ease; }
.laeuft .kreis .play { opacity: 0; }
.kreis:focus-visible { outline: 3px solid var(--tinte); outline-offset: 4px; }

.spieler[hidden] { display: none; }

/* Schalter Beats und Stimme im Kopf */
.kopf { flex-wrap: wrap; }
.schalter { display: inline-flex; gap: 6px; margin-left: auto; }
.umschalt {
  border: 1px solid var(--linie);
  background: var(--grund);
  color: var(--leise);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 14px;
  cursor: pointer;
}
.umschalt[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: var(--grund); }

/* Beats: Auswahl */
.titel li { display: flex; gap: 8px; align-items: stretch; }
.titel li .waehlen { flex: 1; }
.titel li.gewaehlt .waehlen { border-color: var(--blau); }
.leise-hinweis { color: var(--leise); font-size: 14px; margin-top: 16px; }

.zahnrad { border: 0; background: none; font-size: 20px; color: var(--leise); cursor: pointer; padding: 2px 4px; }

/* Einstellungen */
.formular { display: grid; gap: 22px; margin-top: 24px; }
.formular label { display: grid; gap: 8px; font-weight: 600; color: var(--tinte); font-size: 16px; }
.formular small { font-weight: 400; color: var(--leise); font-size: 14px; }
.formular input[type="text"], .formular select {
  font: inherit; font-weight: 400; font-size: 17px; color: var(--tinte);
  padding: 10px 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--grund);
}
.formular input[type="range"] { width: 100%; accent-color: var(--blau); }
.zur-musik {
  justify-self: start;
  border: 1px solid var(--linie); background: var(--grund); color: var(--tinte);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 15px; cursor: pointer;
}

/* Auftanken: Wahl zwischen 3 und 12 Minuten. Beide rot, unter Maus oder Finger blau. */
.wahl { display: grid; gap: 14px; margin-top: 24px; }
.wahl-knopf {
  display: grid; gap: 4px; text-align: left;
  padding: 18px 20px; border: 2px solid var(--rot); border-radius: 16px;
  background: var(--grund); color: var(--tinte); font: inherit; cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease;
}
.wahl-knopf .name { font-weight: 600; font-size: 18px; }
.wahl-knopf small { color: var(--leise); font-size: 14px; transition: color .25s ease; }
.wahl-knopf.gewaehlt, .wahl-knopf:active { border-color: var(--blau); background: var(--blau); color: #fff; }
.wahl-knopf.gewaehlt small, .wahl-knopf:active small { color: rgba(255,255,255,.85); }
/* Maus: beim Darüberfahren blau umranden (auf dem Handy gibt es kein Darüberfahren) */
@media (hover: hover) {
  .wahl-knopf:hover { border-color: var(--blau); }
}

/* Hinweis „Zum Home-Bildschirm“ auf der Startseite */
.installieren { display: flex; gap: 12px; align-items: flex-start; color: var(--leise); font-size: 14px;
  margin: 32px 0 0; padding: 12px 14px; border: 1px solid currentColor; border-radius: 10px; }
.installieren[hidden] { display: none; }
.installieren-text { flex: 1; }
.installieren-zu { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; padding: 0 2px; cursor: pointer; }

/* Einstellungen: alles offline speichern */
.offline { display: grid; gap: 8px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linie); }
.offline-knopf {
  justify-self: start;
  border: 1px solid var(--linie); background: var(--grund); color: var(--tinte);
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 15px; cursor: pointer;
}
.offline-knopf:disabled { cursor: default; }
.offline-knopf.gespeichert { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.offline-stand { color: var(--leise); font-size: 14px; }

/* Intro beim ersten Öffnen: deckt die App ganz ab */
.intro { position: fixed; inset: 0; z-index: 50; overflow-y: auto; background: var(--grund);
  padding: 15vh 16px max(32px, env(safe-area-inset-bottom)); }
.intro[hidden] { display: none; }
.intro-rahmen { max-width: 34em; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; }
.intro-karte p:not(.kicker), .intro-karte li { color: var(--text); line-height: 1.55; }
.intro-karte ul { padding-left: 1.1em; margin: 16px 0 0; display: grid; gap: 10px; }
.intro-karte strong { color: var(--tinte); }
.intro-fuss { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 32px; } /* Knopf bleibt unten an derselben Stelle */
.intro-punkte { display: flex; gap: 6px; margin-right: auto; }
.intro-punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--linie); }
.intro-punkte i.an { background: var(--blau); }
.intro-ueberspringen { background: none; border: 0; color: var(--leise); font-size: 15px; padding: 8px 4px; cursor: pointer; }
.intro-weiter { border: 0; border-radius: 999px; padding: 10px 22px; background: var(--blau); color: #fff;
  font-weight: 600; font-size: 16px; cursor: pointer; }
