/* Schlichtes Grund-Design, hell und dunkel. Frei anpassbar. */
:root {
  --bg: #f7f7f5;
  --fl: #ffffff;
  --text: #1d1d1f;
  --leise: #6b6b70;
  --rand: #dcdcd8;
  --akzent: #2f6fdf;
  --akzent2: #d9822b;
  --gefahr: #c23b3b;
  --erfolg: #2e7d4f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --fl: #1f1f22;
    --text: #ececef;
    --leise: #9a9aa2;
    --rand: #34343a;
    --akzent: #6d9cff;
    --akzent2: #f0a35a;
    --gefahr: #ff6b6b;
    --erfolg: #5fcf8f;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--akzent); }

header {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--fl);
  border-bottom: 3px solid var(--akzent2);
}
header .logo { font-weight: 700; text-decoration: none; color: var(--text); }
header nav { display: flex; gap: 1rem; align-items: center; }
header .name { color: var(--leise); }

main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
section { margin: 2rem 0; }
h1 { margin-top: 0; }

.formular { display: grid; gap: .75rem; max-width: 26rem; }
.formular.zeile { display: flex; flex-wrap: wrap; align-items: end; max-width: none; margin-bottom: 1rem; }
label { display: grid; gap: .25rem; font-size: .9rem; color: var(--leise); }
input, select, button { font: inherit; }
input, select {
  padding: .5rem .6rem;
  border: 1px solid var(--rand); border-radius: 6px;
  background: var(--fl); color: var(--text);
}
button {
  padding: .5rem .9rem;
  border: 0; border-radius: 6px;
  background: var(--akzent); color: #fff; cursor: pointer;
}
button.leise { background: transparent; color: var(--akzent); padding: 0; }
button.gefahr { background: var(--gefahr); }
form { margin: 0; }

table { width: 100%; border-collapse: collapse; background: var(--fl); display: block; overflow-x: auto; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rand); }
th { font-size: .85rem; color: var(--leise); font-weight: 600; }
td.aktionen { display: flex; gap: .4rem; }

.meldung { padding: .75rem 1rem; border-radius: 6px; border: 1px solid var(--rand); background: var(--fl); }
.meldung.fehler { border-color: var(--gefahr); color: var(--gefahr); }
.meldung.erfolg { border-color: var(--erfolg); }
.meldung .link { width: 100%; font-family: ui-monospace, monospace; font-size: .85rem; }
.hinweis { color: var(--leise); font-size: .9rem; }
.marke { font-size: .75rem; padding: .1rem .4rem; border-radius: 4px; background: var(--akzent2); color: #fff; }

.kacheln { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; }
.kacheln a {
  display: block; padding: 1.5rem 1rem;
  background: var(--fl); border: 1px solid var(--rand); border-radius: 8px;
  text-decoration: none; font-weight: 600;
}

/* Zwei-Faktor-Anmeldung */
.qr { background: #fff; padding: 8px; border-radius: 6px; image-rendering: pixelated; }
.codes { columns: 2; font-family: ui-monospace, monospace; font-size: 1.05rem; padding-left: 1.2rem; }
.schritte li { margin-bottom: 1rem; }

/* Link mit Kopieren-Knopf */
.kopieren { display: flex; gap: .5rem; }
.kopieren .link { flex: 1; }

/* Logo im Kopf */
header .logo { display: flex; align-items: center; gap: .5rem; }
header .logo img { height: 2rem; width: auto; }

/* Erscheinungsbild */
.farben { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.farben input[type=color] { width: 100%; height: 2.5rem; padding: .2rem; }
.formular.breit { max-width: none; }
fieldset { border: 1px solid var(--rand); border-radius: 6px; display: grid; gap: .5rem; }
.logo-vorschau { max-height: 4rem; background: var(--fl); padding: .25rem; border: 1px solid var(--rand); }
.zeile-check { display: flex; gap: .5rem; align-items: center; }

/* --- Fotos ---------------------------------------------------------------- */
.alben { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.alben a {
  display: grid; gap: .25rem; padding: .5rem;
  background: var(--fl); border: 1px solid var(--rand); border-radius: 8px;
  text-decoration: none; color: var(--text);
}
.alben img, .alben .leer { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.alben .leer { display: grid; place-items: center; background: var(--bg); color: var(--leise); }
.alben small { color: var(--leise); }

.raster { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .4rem; }
.raster img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 4px; }

.hochladen { display: grid; gap: .5rem; }
.hochladen form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.ablage {
  flex: 1; min-width: 16rem; padding: 1rem;
  border: 2px dashed var(--rand); border-radius: 8px; cursor: pointer;
}
.ablage.ziel { border-color: var(--akzent); }
.hochladen progress { width: 100%; }
#upload-status.fehler { color: var(--gefahr); }

.einzel { margin: 0; display: grid; gap: .5rem; }
.einzel img { max-width: 100%; max-height: 80vh; margin: 0 auto; display: block; border-radius: 4px; }
.blaettern { display: flex; justify-content: space-between; }
