/* Weihnachtsoffensive.de
   Ruhige Nachtfarben, damit die Lichter auf den Fotos wirken.
   Akzente: Tannengrün, Kerzengold, ein gedecktes Weihnachtsrot. */

:root {
  --nacht: #0d1520;
  --nacht-2: #142030;
  --nacht-3: #1b2a3d;
  --linie: #26384f;
  --text: #f4efe6;
  --text-2: #aab4c2;
  --text-3: #7d899a;
  --gold: #e8b85a;
  --gold-hell: #f6d58f;
  --rot: #c8423c;
  --rot-tief: #9f2f2b;
  --gruen: #3f8a62;
  --gruen-tief: #2c6648;
  --ki: #8fb3ff;
  --radius: 14px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --titel: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(232, 184, 90, .07), transparent 70%),
    var(--nacht);
  color: var(--text);
  font: 16px/1.6 var(--schrift);
}

a { color: var(--gold-hell); text-underline-offset: 3px; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
code { font-size: .9em; background: var(--nacht-3); padding: .1em .35em; border-radius: 4px; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Kopf ---------- */

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1.1rem 1.25rem .6rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--titel);
  font-size: 1.45rem;
  letter-spacing: -.01em;
  line-height: 1;
}
.logo b { font-weight: 700; }
.logo-rot { color: var(--rot); }
.logo-de { color: var(--text-3); font-weight: 400; }
.logo-stern { width: 1.35rem; height: 1.35rem; fill: var(--gold); flex: none; filter: drop-shadow(0 0 6px rgba(232, 184, 90, .55)); }

.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  color: var(--text-2);
  text-decoration: none;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .95rem;
}
.nav a:hover { color: var(--text); background: var(--nacht-3); }
.nav a[aria-current="page"] { color: var(--text); background: var(--nacht-3); }
.nav .nav-cta { color: var(--nacht); background: var(--gold); font-weight: 600; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current="page"] { color: var(--nacht); background: var(--gold-hell); }

/* ---------- Weihnachtlicher Rahmen ---------- */

.lichterkette {
  height: 30px;
  margin-top: -.2rem;
  background: url("lichterkette.svg") repeat-x center top / 160px 30px;
  opacity: .9;
}

/* Tannenbaum links, Hochhaus mit Weihnachtsmann rechts: nur wenn neben dem Inhalt Platz ist */
.deko { display: none; }

@media (min-width: 1380px) and (min-height: 640px) {
  .deko {
    display: block;
    position: fixed;
    bottom: 0;
    z-index: 0;
    width: min(230px, calc((100vw - 1080px) / 2 - 20px));
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    object-position: bottom;
    pointer-events: none;
    user-select: none;
  }
  .deko-links { left: 10px; }
  .deko-rechts { right: 10px; }
  .inhalt, .kopf, .fuss { position: relative; z-index: 1; }
}

/* ---------- Inhalt ---------- */

.inhalt {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: .5rem 1.25rem 3rem;
}

.einleitung { text-align: center; max-width: 640px; margin: 1.2rem auto 1.2rem; }
.einleitung h1, .fertig h1, .fertig h2, .text h1 {
  font-family: var(--titel);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin: 0 0 .4rem;
}
.einleitung h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.einleitung p { color: var(--text-2); margin: 0; }

/* Filter / Umschalter */
.filter {
  display: flex;
  justify-content: center;
  gap: .25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.25rem;
  padding: .25rem;
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: 999px;
  overflow-x: auto;
}
.filter a {
  white-space: nowrap;
  color: var(--text-2);
  text-decoration: none;
  font-size: .9rem;
  padding: .4rem .9rem;
  border-radius: 999px;
}
.filter a:hover { color: var(--text); }
.filter a[aria-current="true"] { background: var(--nacht-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--linie); }

/* ---------- Bewerten ---------- */

.bewerten { max-width: 860px; margin: 0 auto; }

.bildrahmen {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #070b11;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  display: flex;
  justify-content: center;
}
.bildrahmen img {
  width: auto;
  height: auto;
  max-height: min(68vh, 640px);
  object-fit: contain;
  transition: opacity .25s ease;
}
.bildrahmen.laedt img { opacity: .25; }
.bildrahmen figcaption {
  position: absolute;
  left: .75rem;
  bottom: .7rem;
  font-size: .85rem;
  padding: .2rem .6rem;
  background: rgba(13, 21, 32, .78);
  border-radius: 999px;
}

.plakette {
  position: absolute;
  top: .7rem;
  left: .75rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: rgba(13, 21, 32, .8);
  border: 1px solid rgba(255, 255, 255, .15);
}
.plakette-echt { color: var(--gold-hell); }
.plakette-ki { color: var(--ki); border-color: rgba(143, 179, 255, .45); }

.wertung { text-align: center; margin-top: 1.25rem; }
.wertung-frage { margin: 0 0 .7rem; font-family: var(--titel); font-size: 1.2rem; }

.skala {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: .4rem;
  max-width: 640px;
  margin: 0 auto;
}
.punkt {
  appearance: none;
  border: 1px solid var(--linie);
  background: var(--nacht-2);
  color: var(--text);
  font: 600 1.1rem/1 var(--schrift);
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.punkt:hover { background: var(--nacht-3); border-color: var(--gold); color: var(--gold-hell); }
.punkt:active { transform: scale(.94); }
.punkt.gewaehlt { background: var(--gold); border-color: var(--gold); color: var(--nacht); }
.wertung[aria-busy="true"] .punkt { pointer-events: none; }

.skala-legende {
  display: flex;
  justify-content: space-between;
  max-width: 640px;
  margin: .4rem auto 0;
  font-size: .8rem;
  color: var(--text-3);
}

.ueberspringen, .textknopf {
  appearance: none;
  background: none;
  border: 0;
  color: var(--text-3);
  font: inherit;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: .4rem .5rem;
}
.ueberspringen { margin-top: .6rem; }
.ueberspringen:hover, .textknopf:hover { color: var(--text); }

.letztes {
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: 460px;
  margin: 1.5rem auto 0;
  padding: .6rem .8rem;
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  font-size: .92rem;
}
.letztes img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.letztes p { margin: 0; }
.letztes-titel { color: var(--text-3); font-size: .8rem; }
.letztes span { margin-right: .7rem; white-space: nowrap; }
.letztes-schnitt b { color: var(--gold-hell); font-size: 1.1rem; }
.letztes-stimmen { color: var(--text-3); }
.letztes.neu { animation: aufleuchten .6s ease; }
@keyframes aufleuchten { from { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 184, 90, .25); } }

/* ---------- Fertig / Hinweisboxen ---------- */

.fertig {
  text-align: center;
  max-width: 560px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.fertig p { color: var(--text-2); }
.fertig-stern { width: 2.4rem; height: 2.4rem; fill: var(--gold); margin: 0 auto .5rem; filter: drop-shadow(0 0 10px rgba(232, 184, 90, .5)); }
.fertig .klein { margin-top: .5rem; }

.knopfreihe { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

.knopf {
  display: inline-block;
  appearance: none;
  border: 1px solid var(--rot);
  background: var(--rot);
  color: #fff;
  font: 600 .95rem/1.2 var(--schrift);
  text-decoration: none;
  padding: .7rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
}
.knopf:hover { background: var(--rot-tief); border-color: var(--rot-tief); color: #fff; }
.knopf-hell { background: transparent; color: var(--text); border-color: var(--linie); }
.knopf-hell:hover { background: var(--nacht-3); border-color: var(--text-3); }
.knopf-gruen { background: var(--gruen); border-color: var(--gruen); }
.knopf-gruen:hover { background: var(--gruen-tief); border-color: var(--gruen-tief); }
.knopf-gross { padding: .85rem 1.6rem; font-size: 1.05rem; }

.meldung {
  max-width: 640px;
  margin: 0 auto 1rem;
  padding: .7rem 1rem;
  border-radius: 10px;
  background: rgba(63, 138, 98, .15);
  border: 1px solid rgba(63, 138, 98, .5);
}
.meldung-fehler { background: rgba(200, 66, 60, .14); border-color: rgba(200, 66, 60, .55); }
.hinweis { color: var(--text-3); font-size: .9rem; }

/* ---------- Top 10 ---------- */

.rangliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.rang {
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
}
.rang-1 { grid-column: 1 / -1; }
.rang-bild { position: relative; display: block; aspect-ratio: 3 / 2; background: #070b11; }
.rang-bild img { width: 100%; height: 100%; object-fit: cover; }
.rang-1 .rang-bild { aspect-ratio: 16 / 8; }
.rang-text { display: flex; align-items: baseline; gap: .7rem; padding: .7rem .9rem .8rem; }
.rang-platz {
  font-family: var(--titel);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-3);
  min-width: 1.6rem;
}
.rang-1 .rang-platz { color: var(--gold); }
.rang-note { font-weight: 700; font-size: 1.25rem; color: var(--gold-hell); }
.rang-note small { color: var(--text-3); font-weight: 400; font-size: .8rem; }
.rang-info { margin-left: auto; color: var(--text-3); font-size: .85rem; text-align: right; }

/* ---------- Formular ---------- */

.formular { max-width: 600px; margin: 0 auto; }
.feld { margin: 0 0 1.4rem; border: 0; padding: 0; }
.feld > label, .feld > legend { display: block; font-weight: 600; margin-bottom: .4rem; padding: 0; }
.optional { font-weight: 400; color: var(--text-3); font-size: .85rem; margin-left: .3rem; }
.feld-hilfe { color: var(--text-3); font-size: .88rem; margin: .4rem 0 0; }
.feld-hilfe.hervor {
  color: var(--text-2);
  background: var(--nacht-2);
  border-left: 3px solid var(--gold);
  padding: .55rem .8rem;
  border-radius: 0 8px 8px 0;
}
.feld-fehler { color: #ff9a92; font-size: .9rem; margin: .4rem 0 0; }

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: .7rem .85rem;
}
input::placeholder { color: var(--text-3); }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 184, 90, .2); }
input[aria-invalid="true"] { border-color: var(--rot); }

.dateiwahl {
  border: 1px dashed var(--text-3);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--nacht-2);
}
.dateiwahl input[type="file"] { width: 100%; color: var(--text-2); font: inherit; }
.dateiwahl input[type="file"]::file-selector-button {
  font: 600 .9rem var(--schrift);
  margin-right: .8rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: var(--nacht-3);
  color: var(--text);
  cursor: pointer;
}
.dateiwahl-vorschau { margin-top: .8rem; max-height: 260px; width: auto; border-radius: 10px; }

.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.wahl-karte {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .8rem;
  background: var(--nacht-2);
  border: 1px solid var(--linie);
  border-radius: 12px;
  cursor: pointer;
}
.wahl-karte:has(input:checked) { border-color: var(--gold); background: var(--nacht-3); }
.wahl-karte input { margin-top: .3rem; accent-color: var(--gold); }
.wahl-karte b { display: block; }
.wahl-karte small { color: var(--text-3); }

.haken { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--text-2); cursor: pointer; }
.haken input { margin-top: .3rem; width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--gold); }

.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Texte ---------- */

.text { max-width: 720px; margin: 1.5rem auto; }
.text h1 { font-size: 2rem; }
.text h2 { font-size: 1.1rem; margin: 2rem 0 .4rem; }
.text p, .text li { color: var(--text-2); }
.text-kurz { background: var(--nacht-2); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.2rem; }

/* ---------- Werbung (vorbereitet) ---------- */

.werbeplatz { max-width: 728px; margin: 2rem auto 0; text-align: center; }
.werbeplatz::before { content: "Anzeige"; display: block; font-size: .7rem; color: var(--text-3); margin-bottom: .3rem; }

/* ---------- Fuß ---------- */

.fuss {
  border-top: 1px solid var(--linie);
  padding: 1.4rem 1.25rem 2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--text-3);
}
.fuss p { margin: .2rem 0; }
.fuss b { color: var(--text-2); }
.fuss-links a { color: var(--text-3); margin: 0 .5rem; }
.fuss-links a:hover { color: var(--text); }

/* ---------- Admin ---------- */

.admin-schmal { max-width: 460px; margin: 2rem auto; }
.admin-schmal h1 { font-family: var(--titel); }
.code { white-space: pre-wrap; word-break: break-all; background: var(--nacht-2); border: 1px solid var(--linie); padding: .8rem; border-radius: 10px; font-size: .85rem; }

.admin-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-tabs { margin: 0; }
.admin-info { color: var(--text-3); font-size: .9rem; }
.admin-info a[aria-current="true"] { color: var(--text); font-weight: 600; }
.admin-h2 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
.zahl { font-variant-numeric: tabular-nums; }
.admin-tabs .zahl { display: inline-block; background: var(--rot); color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .75rem; margin-left: .2rem; }

.inline { display: inline; }
.freigabe-liste { display: grid; gap: 1rem; }
.freigabe { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 1.2rem; background: var(--nacht-2); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem; }
.freigabe img { width: 100%; border-radius: 10px; }
.freigabe .plakette { position: static; margin-right: .4rem; }
.freigabe .knopfreihe { justify-content: flex-start; align-items: center; }

.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th { text-align: left; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--linie); padding: .5rem; }
.tabelle td { border-bottom: 1px solid var(--linie); padding: .5rem; vertical-align: middle; }
.tabelle th.zahl, .tabelle td.zahl { text-align: right; }
.tabelle img { width: 96px; height: 64px; object-fit: cover; border-radius: 6px; }
.tabelle .plakette { position: static; }
.tabelle tr.gesperrt img { opacity: .35; }
.tabelle .leise { color: var(--text-3); }
.aktionen { white-space: nowrap; }
.ort-form { display: flex; gap: .3rem; margin-top: .4rem; }
.ort-form input { padding: .3rem .5rem; font-size: .85rem; max-width: 150px; }
.freigabe-form { display: grid; gap: .5rem; }
.admin-passwort { display: grid; gap: .7rem; max-width: 380px; margin: 0; }
.admin-passwort .knopf { justify-self: start; }
.wahl-klein .wahl-karte { padding: .5rem .7rem; }
.admin-feld { display: grid; gap: .2rem; font-size: .85rem; color: var(--text-3); }
.admin-feld input { padding: .5rem .7rem; }
.freigabe-form .knopf { justify-self: start; margin-top: .3rem; }
.mail-schutz { padding: 0; font-size: inherit; color: var(--gold-hell); }
.rot { color: #ff8d86; }
.gruen { color: #7fd6a4; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.kachel { background: var(--nacht-2); border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem 1rem; }
.kachel span { display: block; color: var(--text-3); font-size: .85rem; }
.kachel b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.kachel small { color: var(--text-3); }

/* ---------- Handy ---------- */

@media (max-width: 640px) {
  .kopf { justify-content: center; padding-top: .9rem; }
  .logo { font-size: 1.3rem; }
  .nav { justify-content: center; }
  .inhalt { padding-left: .8rem; padding-right: .8rem; }
  .einleitung { margin-top: .6rem; }
  .filter { scrollbar-width: none; }
  .filter::-webkit-scrollbar { display: none; }
  .filter a { padding: .4rem .65rem; font-size: .85rem; }
  .einleitung p { font-size: .95rem; }
  .bildrahmen { border-radius: 10px; }
  .bildrahmen img { max-height: 56vh; }
  .skala { grid-template-columns: repeat(5, 1fr); gap: .45rem; max-width: 360px; }
  .punkt { font-size: 1.2rem; }
  .skala-legende { max-width: 360px; }
  .wahl { grid-template-columns: 1fr; }
  .freigabe { grid-template-columns: 1fr; }
  .rang-1 .rang-bild { aspect-ratio: 3 / 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
