:root {
  --bg: #14101f;
  --card: #221b33;
  --text: #f5f2ff;
  --muted: #a99fc4;
  --accent: #ff7a45;
  --accent2: #8b5cf6;
  --ok: #4ade80;
  --err: #f87171;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(circle at 20% 0%, #2c1f4a 0, var(--bg) 600px) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
/* Hintergrund: Standard Konfetti, optional eigenes Bild (abgedunkelt) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg opacity='.35'%3E%3Crect x='20' y='30' width='14' height='6' rx='2' fill='%23ff7a45' transform='rotate(25 27 33)'/%3E%3Ccircle cx='110' cy='40' r='4' fill='%238b5cf6'/%3E%3Crect x='180' y='70' width='12' height='5' rx='2' fill='%23facc15' transform='rotate(-40 186 72)'/%3E%3Ccircle cx='60' cy='120' r='3' fill='%2322d3ee'/%3E%3Crect x='140' y='140' width='14' height='6' rx='2' fill='%23ff4f7b' transform='rotate(60 147 143)'/%3E%3Ccircle cx='210' cy='190' r='4' fill='%23ff7a45'/%3E%3Crect x='40' y='200' width='12' height='5' rx='2' fill='%234ade80' transform='rotate(-20 46 202)'/%3E%3Ccircle cx='120' cy='215' r='3' fill='%23facc15'/%3E%3C/g%3E%3C/svg%3E");
}
body.has-bg::before {
  background-image: linear-gradient(rgba(20, 16, 31, .72), rgba(20, 16, 31, .92)), var(--bg-image);
  background-size: cover; background-position: center;
}
.hero { text-align: center; margin-bottom: 20px; }
.host {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover; display: block; margin: 4px auto 12px;
  border: 4px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
  box-shadow: 0 8px 30px #0008;
}
.host[hidden] { display: none; }
.hero .sub { margin-bottom: 8px; }
.welcome { font-size: 1.05rem; margin: 8px 0 0; white-space: pre-line; }
main { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
main.wide { max-width: 1200px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 8px 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin: 16px 0; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 20px; border: 0; border-radius: var(--radius);
  font: inherit; font-size: 1.25rem; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #ff4f7b);
  text-decoration: none;
}
.btn.secondary { background: #352a4f; font-size: 1.05rem; padding: 16px; margin-top: 12px; }
.btn.small { width: auto; display: inline-flex; padding: 10px 16px; font-size: .95rem; }
.btn:active { transform: scale(.98); }
input[type=file] { display: none; }
.status { display: flex; gap: 16px; flex-wrap: wrap; font-size: 1.05rem; }
.status b { font-size: 1.4rem; }
.ok { color: var(--ok); } .err { color: var(--err); } .muted { color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.note { color: var(--muted); font-size: .85rem; }
.msg { padding: 14px; border-radius: 12px; background: #3b1d2a; color: #ffd0d0; }

/* Galerie */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.grid a { position: relative; display: block; color: #fff; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; background: #2a2340; }
.grid .hidden img { opacity: .25; }
.grid .tag { position: absolute; left: 4px; bottom: 4px; font-size: .7rem; background: #000a; padding: 2px 6px; border-radius: 6px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.lightbox {
  position: fixed; inset: 0; background: #000e; display: none; flex-direction: column;
  align-items: center; justify-content: center; z-index: 10;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100vw; max-height: calc(100vh - 90px); object-fit: contain; }
.lightbox .bar { display: flex; gap: 10px; padding: 12px; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); background: #0008; border: 0; color: #fff; font-size: 2rem; padding: 12px 16px; border-radius: 12px; cursor: pointer; }
.lightbox .prev { left: 8px; } .lightbox .next { right: 8px; }

/* Admin */
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
.switch { width: 54px; height: 30px; border-radius: 15px; border: 0; background: #4b416a; position: relative; cursor: pointer; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--ok); }
.switch.on::after { left: 27px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #4b416a;
  background: #1a1428; color: var(--text); font: inherit;
}
.imgs { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.imgs > div { flex: 1 1 200px; }
.imgs img { width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; display: block; margin: 6px 0; background: #1a1428; }
.imgs .btn { margin-top: 6px; }
.link { word-break: break-all; font-size: .85rem; color: var(--muted); }
