/* scouts-cloud – Homescreen-Stil mit Glas-Ordnern.
   Farben und Maße als Variablen, damit sich das Design zentral anpassen lässt. */
:root {
  --nacht: #0F1B33;
  --text: #FFFFFF;
  --text-leise: rgba(255, 255, 255, 0.85);
  --glas: rgba(255, 255, 255, 0.16);
  --glas-stark: rgba(255, 255, 255, 0.22);
  --glas-rand: rgba(255, 255, 255, 0.32);
  --papier: #FFFDF8;
  --tinte: #1F1A16;
  --glut: #FFB25B;
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --kachel: clamp(118px, 15vw, 190px);
  --kachel-klein: clamp(60px, 7vw, 96px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
#ebeneTitel:focus { outline: none; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--nacht);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--text); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--glut); outline-offset: 3px; }

.wall { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.seite {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  padding-bottom: 140px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 19px; text-decoration: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.banner {
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--glut); color: var(--tinte);
}

/* Startseite: 2 x 2 große Kacheln */
.start { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.raster-start {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: clamp(26px, 5vw, 60px) clamp(30px, 7vw, 90px);
}
.kachel {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-decoration: none;
}
.kachel .quadrat {
  width: var(--kachel); aspect-ratio: 1 / 1; border-radius: 24%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -10px 24px rgba(0, 0, 0, 0.18), 0 14px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease;
}
.kachel:hover .quadrat, .kachel:focus-visible .quadrat { transform: scale(1.04); }
.kachel:active .quadrat { transform: scale(0.96); }
.kachel .quadrat svg { width: 46%; height: 46%; }
.kachel .beschriftung {
  font-weight: 700; font-size: clamp(14px, 1.5vw, 18px); text-align: center; line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); max-width: calc(var(--kachel) + 20px);
}

/* Dock */
.dock {
  position: fixed; z-index: 3; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: clamp(10px, 3vw, 18px);
  padding: 12px clamp(12px, 3vw, 18px); border-radius: 32px;
  background: rgba(255, 255, 255, 0.18); border: 1px solid var(--glas-rand);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
}
.dk {
  width: 58px; height: 58px; border-radius: 16px; border: 0; cursor: pointer;
  background: var(--glas-stark); display: flex; align-items: center; justify-content: center;
}
.dk svg { width: 26px; height: 26px; }
.dk-flagge .flagge { width: 34px; height: auto; }

/* Ebene (geöffneter Ordner, Vorschau, Dialoge) */
.ebene {
  position: fixed; inset: 0; z-index: 5; overflow-y: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: rgba(12, 14, 24, 0.38);
  -webkit-backdrop-filter: blur(26px) saturate(1.3); backdrop-filter: blur(26px) saturate(1.3);
}
.ebene-hintergrund { position: fixed; inset: 0; border: 0; background: transparent; cursor: default; }
.ebene-inhalt {
  position: relative; z-index: 1; margin: auto 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  width: 100%; max-width: 760px;
  animation: auf 0.18s ease-out;
}
@keyframes auf { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .ebene-inhalt { animation: none; }
  .kachel .quadrat { transition: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ebene { background: rgba(12, 14, 24, 0.86); }
  .dock, .glas { background: rgba(40, 36, 60, 0.92); }
}

.kopfzeile { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; }
.kopfzeile h2 {
  margin: 0; font-weight: 800; font-size: clamp(24px, 3vw, 36px); line-height: 1.15; text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); text-wrap: balance; min-width: 0;
}
.rund {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.18);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.rund svg { width: 20px; height: 20px; }
.pfad { font-size: 13px; color: var(--text-leise); text-align: center; }

.glas {
  background: var(--glas); border: 1px solid var(--glas-rand); border-radius: 32px;
  -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5);
  padding: clamp(16px, 3vw, 30px);
  max-width: 100%;
}
.raster-ordner { display: grid; gap: 20px clamp(8px, 2.2vw, 28px); }
.raster-ordner .kachel { width: calc(var(--kachel-klein) + 14px); }
.raster-ordner .quadrat { width: var(--kachel-klein); border-radius: 24%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 8px 18px rgba(0, 0, 0, 0.28); }
.raster-ordner .beschriftung { font-size: 12px; font-weight: 600; max-width: none; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.quadrat.papier { background: var(--papier); box-shadow: inset 0 0 14px rgba(110, 62, 18, 0.35), 0 8px 18px rgba(0, 0, 0, 0.28); }
.quadrat.flaggenkachel { background: rgba(255, 255, 255, 0.92); }
.quadrat.flaggenkachel .flagge { width: 70%; height: auto; }
.marke {
  display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 999px;
  background: var(--glut); color: var(--tinte); font-size: 10.5px; font-weight: 800; text-shadow: none;
}

.leer { max-width: 420px; text-align: center; color: var(--text-leise); padding: 10px; }
.leer a { font-weight: 700; }

/* Vorschau */
.vorschau { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; justify-content: center; width: 100%; }
.blatt {
  flex: 0 1 380px; min-width: 0; max-width: 100%;
  background: var(--papier); color: var(--tinte); border-radius: 6px; overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center; min-height: 300px; position: relative;
}
.blatt canvas { display: block; width: 100%; height: auto; }
.blatt .status { padding: 24px; text-align: center; font-size: 15px; }
.seitenspalte { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.doktitel { font-weight: 800; font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.blaettern { display: flex; align-items: center; gap: 10px; }
.blaettern span { flex: 1; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 18px;
  border-radius: 16px; border: 0; background: #FFFFFF; color: var(--tinte); font-weight: 800; text-decoration: none; cursor: pointer;
}
.knopf svg { width: 18px; height: 18px; }
.knopf.zweit { background: var(--glas-stark); color: var(--text); border: 1px solid var(--glas-rand); }
.hinweis { font-size: 13.5px; color: var(--text-leise); margin: 0; }
.sprachchips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--glas-rand); background: var(--glas-stark); font-weight: 700; font-size: 14px;
}
.chip[aria-pressed="true"] { background: #FFFFFF; color: var(--tinte); }
.chip .flagge { width: 22px; height: auto; }

/* Listen (Sprachen, Suche, Gruppen) */
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.zeile {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid transparent; background: var(--glas-stark); text-align: left; text-decoration: none;
}
.zeile:hover { border-color: var(--glas-rand); }
.zeile .flagge { width: 36px; height: auto; flex: 0 0 auto; }
.zeile .klein { display: block; font-size: 12.5px; color: var(--text-leise); }
.zeile .haken { margin-left: auto; }
.zeile .icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.zeile .icon svg { width: 22px; height: 22px; }
.flagge { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); display: block; }

.feld { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.feld label, .feld .label { font-weight: 700; font-size: 14px; }
.feld input, .feld select, .feld textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--glas-rand); background: rgba(255, 255, 255, 0.92); color: var(--tinte);
}
.feld textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; }
.formular { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 520px; }
.formular .zweispaltig { display: flex; flex-wrap: wrap; gap: 14px; }
.formular .zweispaltig .feld { flex: 1 1 200px; }
.versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meldung { padding: 12px 14px; border-radius: 14px; background: var(--glas-stark); font-weight: 600; }

.gruppe { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; background: var(--glas-stark); }
.gruppe strong { font-size: 16.5px; }
.gruppe .klein { font-size: 14px; color: var(--text-leise); }
.gruppe a { font-weight: 700; overflow-wrap: anywhere; }
.karte { width: 100%; height: 360px; border-radius: 18px; overflow: hidden; background: #2A2F45; }
.suchfeld { width: 100%; }
.suchfeld input { font-size: 18px; min-height: 54px; }
.text { max-width: 560px; text-align: left; }
.text p { margin: 0 0 12px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
