/* Transkriptomat - Editor-Optik angelehnt an Trint: heller Grund, ruhiger
   Lesetext, ein Blau als Akzent fuer Wiedergabe und Auswahl. */
:root {
  --grund: #ffffff;
  --flaeche: #f6f7f9;
  --linie: #e4e6eb;
  --text: #1c1e21;
  --leise: #6b7280;
  --akzent: #1f5eff;
  --akzent-hell: #e3ebff;
  --gespielt: #3d4350;
  --treffer: #fff1a8;
  --spieler-h: 156px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--grund);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* --- Startseite --------------------------------------------------------- */
#start { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.kopfzeile { display: flex; align-items: baseline; justify-content: space-between; }
.abmelden { border: 0; background: none; color: var(--leise); font-size: 14px; padding: 4px 8px; border-radius: 6px; }
.abmelden:hover { background: var(--flaeche); color: var(--text); }
.kopf h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 8px; }
.unter { color: var(--leise); margin: 0 0 32px; line-height: 1.5; }
.ablage {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 20px; border: 1.5px dashed #c7ccd6; border-radius: 14px;
  background: var(--flaeche); cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.ablage:hover, .ablage.drueber { border-color: var(--akzent); background: var(--akzent-hell); }
.ablage-titel { font-weight: 600; font-size: 17px; }
.ablage-unter { color: var(--leise); font-size: 14px; }
.optionen { margin: 14px 2px 36px; font-size: 14px; color: var(--leise); }
.optionen select { margin-left: 8px; padding: 5px 8px; border: 1px solid var(--linie); border-radius: 7px; background: #fff; }

.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.liste li { border-bottom: 1px solid var(--linie); }
.liste a { display: flex; gap: 14px; align-items: center; padding: 15px 4px; color: inherit; text-decoration: none; }
.liste a:hover .name { color: var(--akzent); }
.liste .art { width: 34px; height: 34px; border-radius: 8px; background: var(--flaeche); display: grid; place-items: center; color: var(--leise); flex: none; }
.liste .art svg { width: 17px; height: 17px; fill: currentColor; }
.liste .text { flex: 1; min-width: 0; }
.liste .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste .info { color: var(--leise); font-size: 13px; margin-top: 2px; }
.liste .info .fehlertext { color: #b42318; }
.liste .mini { width: 90px; height: 4px; background: var(--linie); border-radius: 2px; overflow: hidden; flex: none; }
.liste .mini div { height: 100%; background: var(--akzent); }
.liste .loeschen { border: 0; background: none; color: var(--leise); padding: 8px; border-radius: 6px; opacity: 0; }
.liste li:hover .loeschen { opacity: 1; }
.liste .loeschen:hover { background: var(--flaeche); color: var(--text); }
.leer { color: var(--leise); padding: 24px 4px; font-size: 14px; }

/* --- Editor ------------------------------------------------------------- */
#editor { min-height: 100vh; }
.leiste {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}
.zurueck { text-decoration: none; color: var(--leise); font-size: 20px; padding: 2px 8px; border-radius: 6px; }
.zurueck:hover { background: var(--flaeche); color: var(--text); }
.titelblock { flex: 1; min-width: 0; }
.titelblock h2 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metazeile { color: var(--leise); font-size: 12.5px; }
#suche { width: 220px; padding: 7px 11px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); }
#suche:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); background: #fff; }
.treffer { color: var(--leise); font-size: 12.5px; min-width: 40px; }
.export { position: relative; }
.export > button { border: 1px solid var(--linie); background: #fff; border-radius: 8px; padding: 7px 12px; }
.export > button:hover { border-color: #c7ccd6; }
.exportmenue {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--linie);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(16,24,40,.12); padding: 6px; min-width: 250px;
}
.exportmenue button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 11px; border-radius: 7px; font-size: 14px; }
.exportmenue button:hover { background: var(--flaeche); }

.fortschritt { display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--flaeche); border-bottom: 1px solid var(--linie); font-size: 13px; color: var(--leise); }
.fortschritt .balken { width: 220px; height: 4px; border-radius: 2px; background: var(--linie); overflow: hidden; }
.fortschritt .balken div { height: 100%; width: 0; background: var(--akzent); transition: width .6s; }

.flaeche { display: flex; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 28px 24px calc(var(--spieler-h) + 48px); }
.transkript { flex: 1; min-width: 0; max-width: 780px; margin: 0 auto; }
.bild { width: 400px; flex: none; position: sticky; top: 84px; align-self: flex-start; }
.bild video { width: 100%; border-radius: 10px; background: #000; display: block; }

.absatz { display: grid; grid-template-columns: 84px 1fr; gap: 6px; margin: 0 0 22px; }
.tc {
  font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--leise); padding-top: 4px;
  border: 0; background: none; text-align: left; user-select: none; -webkit-user-select: none; cursor: pointer; align-self: start;
}
.tc:hover { color: var(--akzent); }
.absatz.aktiv .tc { color: var(--akzent); font-weight: 600; }
.saetze { font-size: 17.5px; line-height: 1.75; margin: 0; }
.saetze span { cursor: pointer; border-radius: 3px; transition: background-color .08s; }
.saetze span:hover { text-decoration: underline; text-decoration-color: #c7ccd6; text-underline-offset: 4px; }
.saetze span.vorbei { color: var(--gespielt); }
.saetze span.jetzt { background: var(--akzent-hell); color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent-hell); }
.saetze span.fund { background: var(--treffer); }
.saetze span.fund.fokus { background: #ffd84d; }
.transkript.vorher .saetze span { color: var(--text); }
.transkript ::selection { background: #cfdcff; }
.platzhalter { color: var(--leise); padding: 40px 0; text-align: center; line-height: 1.6; }
.platzhalter .fehlertext { color: #b42318; }
.zeile-leer { color: var(--leise); }

.hinweis {
  position: fixed; left: 50%; bottom: calc(var(--spieler-h) + 16px); transform: translateX(-50%);
  background: #1c1e21; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 20; max-width: min(560px, 90vw);
}
.hinweis code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #b8c9ff; }

/* --- Spieler + Zeitleiste ------------------------------------------------ */
.spieler {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: var(--spieler-h);
  background: #fff; border-top: 1px solid var(--linie); padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 6px;
}
.steuer { display: flex; align-items: center; gap: 8px; }
.steuer button { border: 1px solid var(--linie); background: #fff; border-radius: 8px; height: 32px; min-width: 40px; padding: 0 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.steuer button:hover { border-color: #c7ccd6; }
.steuer .spielen { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--akzent); color: #fff; display: grid; place-items: center; padding: 0; }
.steuer .spielen:hover { background: #1a50db; }
.steuer .spielen svg { width: 18px; height: 18px; fill: currentColor; }
.steuer .spielen .ico-pause { display: none; }
.spielt .steuer .spielen .ico-pause { display: block; }
.spielt .steuer .spielen .ico-play { display: none; }
.zeit { font-variant-numeric: tabular-nums; font-size: 14px; margin: 0 10px 0 6px; }
.gesamt { color: var(--leise); }
.zoom { margin-left: auto; display: flex; gap: 4px; }
.uebersicht { width: 100%; height: 14px; display: block; cursor: pointer; border-radius: 3px; }
.welle { width: 100%; height: 84px; display: block; cursor: grab; touch-action: none; border-radius: 6px; background: var(--flaeche); }
.welle.zieht { cursor: grabbing; }
button:disabled { opacity: .45; cursor: default; }

@media (max-width: 1000px) {
  .flaeche { flex-direction: column-reverse; gap: 18px; }
  .bild { width: 100%; position: static; }
  .bild video { max-height: 38vh; object-fit: contain; }
}
@media (max-width: 640px) {
  .leiste { padding: 10px 14px; gap: 8px; flex-wrap: wrap; }
  #suche { width: 100%; order: 5; }
  .treffer { order: 6; }
  .flaeche { padding: 18px 14px calc(var(--spieler-h) + 40px); }
  .absatz { grid-template-columns: 1fr; gap: 0; }
  .saetze { font-size: 16.5px; }
  .spieler { padding-left: 12px; padding-right: 12px; }
  .zeit .gesamt { display: none; }
}

/* --- Anmeldung ----------------------------------------------------------- */
.anmeldung { max-width: 340px; margin: 18vh auto 0; padding: 0 24px; }
.anmeldung h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 22px; }
.anmeldung form { display: flex; flex-direction: column; gap: 10px; }
.anmeldung input { padding: 11px 13px; border: 1px solid var(--linie); border-radius: 9px; background: var(--flaeche); font-size: 16px; }
.anmeldung input:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); background: #fff; }
.anmeldung button { padding: 11px; border: 0; border-radius: 9px; background: var(--akzent); color: #fff; font-weight: 600; font-size: 15px; }
.anmeldung button:hover { background: #1a50db; }
.anmeldefehler { color: #b42318; font-size: 14px; min-height: 1.2em; margin: 4px 0 0; }
