/* Handy zuerst. Alles wird mit nassen Händen an der Kabine bedient,
   deshalb sind alle Bedienelemente mindestens 48 Pixel hoch.

   Die Anmutung folgt bvb.de: schwarzer Grund, Gelb als einziger Akzent,
   eckige Kanten ohne Radius, Überschriften in Versalien. Die Hausschrift
   bvb-copy ist nicht öffentlich verfügbar, Archivo kommt ihr am nächsten und
   fällt sauber auf die Systemschrift zurück, wenn das Netz am Platz schwach ist. */

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap");

:root {
  --gelb: #ffd900;
  --gelb-dunkel: #ffc400;
  --schwarz: #000000;
  /* Das Grau der Karten auf bvb.de, dort gemessen. Es hebt sich deutlich vom
     Schwarz ab, ohne grell zu werden. */
  --flaeche: #232323;
  --flaeche-hell: #2e2e2e;
  --linie: #3a3a3a;
  --grau-hell: #9a9a9a;
  --weiss: #ffffff;
  --rot: #e0443e;
  --gruen: #4caf50;

  --schrift: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--schwarz);
  color: var(--weiss);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

main { padding: 0 0 48px; max-width: 640px; margin: 0 auto; }

/* Kopf mit gelbem Balken, wie die Seitenköpfe auf bvb.de */

header {
  background: var(--gelb);
  color: var(--schwarz);
  padding: 22px 16px 30px;
  margin-bottom: 26px;
  /* Schräge Unterkante. Auf bvb.de laufen Flächen im gleichen Winkel aus,
     gemessen sind es 34 Grad. */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), 0 100%);
}

h1 {
  font-size: 27px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0 0 3px;
  color: inherit;
}

header p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(0, 0, 0, 0.72);
}

h2 {
  display: inline-block;
  background: var(--gelb);
  color: var(--schwarz);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 14px;
  padding: 7px 16px;
  transform: skewX(-34deg);
}

h2 > span {
  display: inline-block;
  transform: skewX(34deg);
}

/* Formularfelder */

.feld { display: block; margin-bottom: 22px; border: 0; padding: 0 16px; }

.feld > span, .feld > legend {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--grau-hell);
  padding: 0;
}

select, input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  background: var(--flaeche);
  color: var(--weiss);
  border: 2px solid var(--linie);
  border-radius: 0;
  font-family: var(--schrift);
  font-size: 17px;
  font-weight: 500;
  appearance: none;
}

select:focus, input:focus { outline: none; border-color: var(--gelb); }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath fill='%23ffd900' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

/* Typ-Auswahl als drei große Flächen */

.typ-wahl { display: grid; gap: 6px; }

.typ-knopf {
  min-height: 58px;
  padding: 15px 16px;
  background: var(--flaeche);
  color: var(--weiss);
  border: 2px solid var(--linie);
  border-radius: 0;
  font-family: var(--schrift);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  cursor: pointer;
}

.typ-knopf[aria-pressed="true"] {
  background: var(--gelb);
  color: var(--schwarz);
  border-color: var(--gelb);
}

/* Leitfragen */

.leitfragen {
  background: var(--flaeche);
  padding: 18px 16px 18px 18px;
  margin: 0 16px 22px;
}

/* Karten: eckig, dunkel, mit gelber Kante links. Auf bvb.de sitzen Inhalte in
   solchen Blöcken, hier fasst je eine Karte einen Schritt der Eingabe. */
.karte {
  background: var(--flaeche);
  border-left: 5px solid var(--gelb);
  margin: 0 16px 22px;
  padding: 18px 16px 20px;
}

.karte .feld { padding: 0; }
.karte .feld:last-child { margin-bottom: 0; }
.karte .aufnahme, .karte .medien, .karte .leitfragen { margin: 0; padding: 0; }

.karte ol { margin: 0; padding-left: 18px; }
.karte ol li { margin-bottom: 10px; font-size: 15px; color: #d8d8d8; }
.karte ol li:last-child { margin-bottom: 0; }

/* Bewertungsregler */

input[type="range"] {
  width: 100%;
  height: 48px;
  accent-color: var(--gelb);
  background: transparent;
}

output { color: var(--gelb); font-weight: 700; }

/* Aufnahme */

.aufnahme { margin: 0 0 4px; }

.knopf-aufnahme {
  width: 100%;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--flaeche);
  color: var(--weiss);
  border: 3px solid var(--gelb);
  border-radius: 0;
  font-family: var(--schrift);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.knopf-aufnahme.laeuft {
  background: var(--rot);
  border-color: var(--rot);
  color: var(--weiss);
}

.punkt {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--rot);
  flex: none;
}

.knopf-aufnahme.laeuft .punkt { background: var(--weiss); animation: pulsieren 1.2s infinite; }

@keyframes pulsieren { 50% { opacity: 0.25; } }

@media (prefers-reduced-motion: reduce) {
  .knopf-aufnahme.laeuft .punkt { animation: none; }
}

.laufzeit {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 12px 0 0;
  color: var(--gelb);
}

#abspieler { margin-top: 12px; display: grid; gap: 8px; }
#abspieler audio { width: 100%; }

/* Medien */

.medien { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--linie); }

.knopf-datei, .knopf-klein {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 16px;
  background: transparent;
  color: var(--gelb);
  border: 2px dashed var(--linie);
  border-radius: 0;
  font-family: var(--schrift);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
}

.knopf-klein { border-style: solid; color: var(--grau-hell); min-height: 48px; }

#dateiliste { list-style: none; margin: 10px 0 0; padding: 0; }

#dateiliste li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: var(--flaeche);
  border-left: 3px solid var(--gelb);
  margin-bottom: 6px;
  font-size: 14px;
}

#dateiliste button {
  background: none;
  border: 0;
  color: var(--grau-hell);
  font-size: 22px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

/* Senden */

.knopf-haupt {
  width: calc(100% - 32px);
  margin: 0 16px;
  min-height: 62px;
  background: var(--gelb);
  color: var(--schwarz);
  border: 0;
  border-radius: 0;
  font-family: var(--schrift);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.knopf-haupt:active { background: var(--gelb-dunkel); }
.knopf-haupt:disabled { opacity: 0.4; cursor: default; }

/* Meldungen */

.hinweis, .fehler, .erfolg, .fortschritt { margin: 12px 16px 0; font-size: 15px; }
.karte .hinweis { margin: 12px 0 0; }
.hinweis { color: var(--grau-hell); font-size: 14px; }
.fehler { color: var(--rot); }
.erfolg { color: var(--gruen); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.fortschritt { color: var(--gelb); font-weight: 600; }

/* Zugangstor */

.tor {
  position: fixed;
  inset: 0;
  background: var(--schwarz);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.tor-karte { width: 100%; max-width: 360px; }
.tor-karte h1 { color: var(--gelb); margin-bottom: 8px; }
.tor-karte p { color: var(--grau-hell); font-size: 15px; margin: 0 0 20px; }
.tor-karte input { margin-bottom: 10px; }
.tor-karte .knopf-haupt { width: 100%; margin: 0; }
.tor-karte .fehler { margin-left: 0; margin-right: 0; }

[hidden] { display: none !important; }
