/* Turmzimmer: warme dunkle Galerie, eine Lichtquelle, viel Raum.
   Statusanzeigen sind dreifach kodiert (Form + Text + Farbe),
   Palette Blau/Orange/Grau statt Grün/Rot (Rot-Grün-Schwäche). */

:root {
  --grund: #201810;        /* tiefes warmes Dunkel */
  --grund-hell: #2a2017;   /* Kachelfläche */
  --grund-hover: #342a1e;
  --creme: #ede4d3;        /* Haupttext */
  --creme-weich: #c9b691;  /* ruhiger Text, Linien */
  --creme-leise: #8a7a60;  /* Meta */
  --glut: #de862c;         /* Akzent, klein und konzentriert */
  --linie: rgba(201, 182, 145, 0.18);
  --status-ok: #5b7f95;    /* Blau */
  --status-warn: #c08a2d;  /* Orange */
  --status-fail: #b45f43;  /* warmes Signal, immer mit Form und Text */
  --status-unknown: #6d6459;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--grund);
  color: var(--creme);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.5;
}

/* eine stille Lichtquelle von oben links */
body {
  background:
    radial-gradient(1200px 700px at 18% -10%, rgba(222, 134, 44, 0.07), transparent 60%),
    var(--grund);
}

.zentriert {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.leise { color: var(--creme-leise); }

/* ---------- Anmeldung und Einrichtung ---------- */

.karte {
  width: 100%;
  max-width: 380px;
  padding: 2.5rem 2.25rem;
  background: var(--grund-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
}

.karte h1 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  font-weight: normal;
  letter-spacing: 0.06em;
}

.karte .unterzeile {
  margin: 0 0 1.75rem;
  font-size: 0.85rem;
  color: var(--creme-leise);
}

.karte label {
  display: block;
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  color: var(--creme-weich);
}

.karte input {
  width: 100%;
  margin-bottom: 1.1rem;
  padding: 0.6rem 0.7rem;
  background: var(--grund);
  border: 1px solid var(--linie);
  border-radius: 3px;
  color: var(--creme);
  font: inherit;
  font-size: 0.95rem;
}

.karte input:focus {
  outline: none;
  border-color: var(--glut);
}

.karte button {
  width: 100%;
  padding: 0.65rem;
  background: transparent;
  border: 1px solid var(--glut);
  border-radius: 3px;
  color: var(--glut);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.karte button:hover { background: rgba(222, 134, 44, 0.12); }

.karte .fehler {
  margin: 0 0 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--status-fail);
  border-radius: 3px;
  font-size: 0.85rem;
  color: var(--creme);
}

.karte .fehler:empty { display: none; }

.karte img.qr {
  display: block;
  margin: 0 auto 1rem;
  border-radius: 3px;
}

.karte code.geheim {
  display: block;
  margin: 0 0 1.25rem;
  padding: 0.5rem;
  background: var(--grund);
  border: 1px solid var(--linie);
  border-radius: 3px;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--creme-weich);
  text-align: center;
}

/* ---------- Launcher ---------- */

header.kopf {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2rem 2.5rem 1rem;
  max-width: 1180px;
  margin: 0 auto;
}

header.kopf h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.08em;
}

header.kopf .suche {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
}

header.kopf .suche input {
  width: 100%;
  padding: 0.55rem 0.8rem;
  background: var(--grund-hell);
  border: 1px solid var(--linie);
  border-radius: 3px;
  color: var(--creme);
  font: inherit;
  font-size: 0.95rem;
}

header.kopf .suche input:focus { outline: none; border-color: var(--glut); }

header.kopf .abmelden {
  background: none;
  border: none;
  color: var(--creme-leise);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

header.kopf .abmelden:hover { color: var(--creme); }

main.flaeche {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.5rem 2.5rem 4rem;
}

section.kategorie h2 {
  margin: 2.25rem 0 0.9rem;
  font-size: 0.85rem;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--creme-leise);
  border-bottom: 1px solid var(--linie);
  padding-bottom: 0.5rem;
}

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.9rem;
}

a.kachel {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--grund-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
  text-decoration: none;
  color: var(--creme);
  transition: background 0.15s ease, border-color 0.15s ease;
}

a.kachel:hover, a.kachel:focus-visible {
  background: var(--grund-hover);
  border-color: rgba(222, 134, 44, 0.45);
  outline: none;
}

.kachel .monogramm {
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--creme-leise);
  border-radius: 3px;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--creme-weich);
}

.kachel .text { min-width: 0; }

.kachel .name {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.kachel .zweck {
  display: block;
  font-size: 0.8rem;
  color: var(--creme-leise);
}

/* Status: Form + Text + Farbe. Wird ab Etappe 2 mit Leben gefüllt. */
.kachel .status {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--creme-weich);
}

.status .form {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
}

.status.ok .form      { background: var(--status-ok); border-radius: 50%; }                /* Kreis */
.status.warn .form    { width: 0; height: 0; background: none; border-left: 0.36rem solid transparent;
                        border-right: 0.36rem solid transparent; border-bottom: 0.62rem solid var(--status-warn); } /* Dreieck */
.status.fail .form    { background: var(--status-fail); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); } /* Achteck */
.status.unknown .form { background: var(--status-unknown); }                               /* Quadrat */

.treffer-leer {
  margin: 3rem 0;
  text-align: center;
  color: var(--creme-leise);
}

footer.fuss {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2.5rem 2rem;
  font-size: 0.75rem;
  color: var(--creme-leise);
}

@media (max-width: 600px) {
  header.kopf, main.flaeche, footer.fuss { padding-left: 1.1rem; padding-right: 1.1rem; }
  .kacheln { grid-template-columns: 1fr; }
}
