/* Weihnachtsmarkt Fotobox – weihnachtlich, feierlich, elegant
 * SPDX-FileCopyrightText: 2026 Kai Dehling <nimearo@envs.net>
 * SPDX-License-Identifier: GPL-3.0-only */
:root {
  --bg: #0a1526;
  --bg-soft: #10203a;
  --panel: rgba(16, 32, 58, .82);
  --gold: #d4af37;
  --gold-soft: #e9d48a;
  --gold-dim: rgba(212, 175, 55, .45);
  --text: #f3ead7;
  --muted: #b9c4d8;
  --red: #a8232c;
  --green: #2f5d50;
  --gold-visited: #b8954a;
  --shadow: 0 10px 34px rgba(0, 0, 0, .45);
  --serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --sans: -apple-system, 'Segoe UI', Roboto, 'Noto Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 20% -10%, #1a3057 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 110%, #231a2e 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: .8; }
#ornament-top {
  position: fixed; top: 10px; left: 0; right: 0; text-align: center;
  color: var(--gold-dim); letter-spacing: 1.5em; font-size: 14px; z-index: 4;
  user-select: none; pointer-events: none;
}

.app { max-width: 900px; margin: 0 auto; padding: 34px 18px 80px; }
@media (min-width: 1000px) { .app { padding-top: 48px; } }

.serif { font-family: var(--serif); font-weight: 400; }
.title {
  color: var(--gold-soft);
  letter-spacing: .04em;
  margin: 6px 0 4px;
  text-align: center;
  text-shadow: 0 2px 18px rgba(212, 175, 55, .25);
}
.subtitle { text-align: center; color: var(--muted); margin: 0 0 26px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }
.star { text-align: center; color: var(--gold); font-size: 26px; text-shadow: 0 0 18px rgba(212,175,55,.6); }

.panel {
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(4px);
}
.panel + .panel { margin-top: 18px; }

h2.section { font-family: var(--serif); color: var(--gold-soft); letter-spacing: .03em; margin: 4px 0 14px; }
h3 { color: var(--gold-soft); font-family: var(--serif); font-weight: 400; }
hr.ornament { border: 0; height: 1px; margin: 18px 0;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); }

button, .btn {
  display: inline-block;
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
  color: var(--gold-soft);
  font: inherit; font-size: 15px;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  transition: filter .15s, transform .06s;
  text-decoration: none;
}
button:hover, .btn:hover { filter: brightness(1.15); }
button:active, .btn:active { transform: translateY(1px); }
button.danger { border-color: rgba(200,60,60,.5); color: #e9a0a0; background: linear-gradient(180deg, rgba(160,40,40,.2), rgba(160,40,40,.06)); }
button.primary { font-size: 17px; }

input[type=text], input[type=tel], input[type=number], input[type=password], textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(6, 14, 28, .7);
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 10px; padding: 11px 13px;
}
input:focus, textarea:focus { outline: 1px solid var(--gold); }

label.field { display: block; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
label.field > span { display: block; margin-bottom: 5px; }

/* Galerie */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  border: 1px solid var(--gold-dim); border-radius: 12px; overflow: hidden;
  background: #0b1626; position: relative; aspect-ratio: 1;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.card .ph { position: absolute; bottom: 0; left: 0; right: 0; font-size: 11px; padding: 6px 8px;
  background: linear-gradient(0deg, rgba(5,10,20,.85), transparent); color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 44px 10px; }
.empty .big { font-size: 40px; display: block; margin-bottom: 12px; }

/* Lightbox / Vollbild */
#lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(4, 8, 16, .96);
  display: flex; flex-direction: column; }
#lightbox .img-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 10px; }
#lightbox img { max-width: 100%; max-height: 100%; border: 1px solid var(--gold-dim); border-radius: 8px; box-shadow: var(--shadow); }
#lightbox .bar { display: flex; gap: 10px; justify-content: center; padding: 14px; }
#lightbox .close { position: absolute; top: 10px; right: 12px; }

/* QR-Karten */
.qr-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
a.qr-card { text-decoration: none; color: inherit; }
a.qr-card .qr-card-q { transition: transform .15s ease; }
a.qr-card:hover svg, a.qr-card:hover img { outline: 2px solid var(--gold-dim); }
a.qr-card:active .info { filter: brightness(1.3); }
a.qr-card .linkline { color: var(--gold); }
.qr-card svg, .qr-card img { background: #fff; padding: 8px; border-radius: 10px; width: min(240px, 60vw); height: auto; display: block; }
.qr-card.small svg, .qr-card.small img { width: min(150px, 40vw); }
.qr-card .info { flex: 1; min-width: 200px; }
.qr-title { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.linkline { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; margin: 8px 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Ausgabe-Gerät */
.display-root { max-width: none; padding: 0; }
.display-frame { position: fixed; inset: 0; display: flex; }
.display-photo { flex: 1; position: relative; background: #04070d; overflow: hidden; }
/* Foto-Buehne: zwei Ebenen, Crossfade per Opacity-Transition; Vorladen verhindert zeilenweisen Aufbau/Weissblende */
.disp-stage {
  position: absolute; left: 0; right: 0; top: 0; bottom: var(--disp-thumbs-h, 86px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .6s ease; background: #04070d;
}
.disp-stage.show { opacity: 1; }
.disp-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Leere-Ansicht (warte auf erstes Foto) */
.disp-empty {
  position: absolute; left: 0; right: 0; top: 0; bottom: var(--disp-thumbs-h, 86px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; z-index: 5;
}
/* Thumbnail-Leiste der bisherigen Fotos */
.disp-thumbbar {
  --disp-thumbs-h: 86px;
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--disp-thumbs-h);
  display: flex; gap: 8px; padding: 11px 14px; z-index: 12;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
  background: rgba(4, 7, 13, .72); border-top: 1px solid rgba(212, 175, 55, .25);
}
.disp-thumb {
  flex: 0 0 auto; width: 64px; height: 64px; padding: 0; cursor: pointer;
  border: 2px solid rgba(212, 175, 55, .3); border-radius: 10px;
  overflow: hidden; background: #0a1526;
}
.disp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.disp-thumb.active { border-color: var(--gold); box-shadow: 0 0 12px rgba(212, 175, 55, .55); }
/* Touch-Displays: groessere, gut treffbare Kacheln */
.display-photo.touch .disp-thumbbar { --disp-thumbs-h: 104px; }
.display-photo.touch .disp-thumb { width: 80px; height: 80px; }
.display-sidebar {
  width: min(340px, 34vw); min-width: 250px;
  border-left: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(10,21,38,.92), rgba(10,21,38,.78));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 20px; z-index: 10;
}
.display-sidebar .qr-card svg, .display-sidebar .qr-card img { width: min(220px, 24vw); }
.display-badge { position: absolute; top: 12px; left: 14px; z-index: 11;
  font-family: var(--serif); color: var(--gold-soft); letter-spacing: .08em; font-size: 15px;
  text-shadow: 0 2px 8px #000; }
@media (max-width: 720px) {
  .display-frame { flex-direction: column; }
  .display-sidebar { width: auto; min-height: 200px; height: 38vh; border-left: 0; border-top: 1px solid var(--gold-dim); flex-direction: row; }
}

/* Toast + Chips */
#toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; width: min(420px, 90vw); }
.toast { background: rgba(12, 24, 44, .95); border: 1px solid var(--gold-dim); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; box-shadow: var(--shadow); animation: dfade .3s ease; }
.toast.err { border-color: rgba(200,80,80,.6); }

.music-chip {
  position: fixed; right: 14px; bottom: 14px; z-index: 80;
  border-radius: 999px; padding: 9px 16px; font-size: 14px;
  background: rgba(12, 24, 44, .9);
}
.music-chip.off { opacity: .55; }

.timer-chip { display: inline-block; border: 1px solid var(--gold-dim); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; color: var(--gold-soft); margin-left: 8px; }
.timer-chip.warn { color: #ffb2a0; border-color: rgba(220,110,80,.6); }

/* Tour */
#tour { position: fixed; inset: 0; z-index: 95; background: rgba(4, 8, 16, .8); display: flex; align-items: center; justify-content: center; }
#tour .card { max-width: 420px; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-dim); }
.tour-dots span.on { background: var(--gold); }

/* Hilfe-Knopf oben rechts + Hilfe-/Impressum-Overlay */
.help-btn {
  position: fixed; top: 10px; right: 12px; z-index: 60;
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer;
}
body.in-display .help-btn { display: none; } /* Kiosk-Ausgabe ohne Bedien-Chrome */
#help-overlay {
  position: fixed; inset: 0; z-index: 120; padding: 22px;
  background: rgba(4, 8, 16, .8);
  display: flex; align-items: center; justify-content: center;
}
.help-card { max-width: 580px; width: 100%; max-height: 86vh; overflow-y: auto; }
.help-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.help-close { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 6px; }
.help-close:hover { color: #fff; }
.help-lead { font-size: 15px; line-height: 1.6; margin: 10px 0 4px; }
.help-card h3 { margin: 18px 0 4px; font-size: 14px; color: var(--gold-soft); letter-spacing: .06em; text-transform: uppercase; }
.help-card ul { margin: 4px 0; padding-left: 20px; }
.help-card li { font-size: 14px; line-height: 1.55; margin: 5px 0; color: #e8e4d8; }
.help-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; }
/* Impressum / Datenschutz-Seiten */
.legal h3 { margin: 20px 0 4px; font-size: 14px; color: var(--gold-soft); letter-spacing: .06em; text-transform: uppercase; }
.legal p { font-size: 14px; line-height: 1.7; margin: 8px 0; }
.legal a, .help-card a { color: var(--gold); }
/* Besuchte Links: gedaempftes Altgold statt Browser-Violett - bleibt in der
 * Goldfamilie des feierlichen Weihnachtsschemas und markiert Gesehenes leise.
 * Button-Links (a.btn, z. B. Impressum/Datenschutz/Neuigkeiten) ausdruecklich
 * ausgespart: ihre Button-Farben duerfen sich durch Besuchen nicht verschieben. */
.legal a:visited, .help-card a:not(.btn):visited { color: var(--gold-visited); }
.legal a:visited:hover, .help-card a:not(.btn):visited:hover { color: var(--gold); }
/* Text-Links im Startseiten-Fuss (Was gibt's Neues / Impressum / Datenschutz):
 * sattes Gold mit feiner Goldlinie statt Browser-Blau, Altgold sobald besucht,
 * helles Champagner-Gold beim Draueberfahren - komplett im Weihnachtsschema. */
.hint a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(212, 175, 55, .4); }
.hint a:visited { color: var(--gold-visited); border-bottom-color: rgba(184, 149, 74, .4); }
.hint a:hover { color: var(--gold-soft); border-bottom-color: var(--gold-dim); }
/* Installations-Karte auf der Startseite (a.home-install): Karten-Link mit
 * eigenem Layout anstelle von Inline-Stilen. Farbe ausdruecklich vererbt
 * AUCH im Besucht-Zustand: ohne eigene :visited-Farbe schaltet der Browser
 * nach dem ersten Besuch auf sein Standard-Violett um (text-decoration:none
 * alleine verhindert das nicht). Besucht bleibt hier bewusst unsichtbar -
 * wie bei Button-Links (siehe Kommentar oben). */
.home-install { text-decoration: none; display: inline-flex; gap: 12px; align-items: center; color: inherit; }
.home-install:visited { color: inherit; }
.home-install:hover { filter: brightness(1.15); }

/* Admin */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.tabs button { font-size: 14px; padding: 9px 14px; border-radius: 999px; }
.tabs button.active { background: linear-gradient(180deg, rgba(212,175,55,.32), rgba(212,175,55,.12)); color: #fff; }
.next-btn {
  display: block; width: 100%; padding: 26px; font-size: 24px;
  font-family: var(--serif); letter-spacing: .06em; margin: 6px 0 4px;
  background: linear-gradient(180deg, rgba(168,35,44,.55), rgba(120,20,30,.35));
  border: 1px solid rgba(212,175,55,.55); color: #fff;
}
.badge { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 6px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(212,175,55,.18); }
table.list th { color: var(--muted); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.arch-group { margin-bottom: 26px; }
.arch-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.arch-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.icon-btn { font-size: 14px; padding: 6px 10px; }
.arch-head .cnt { color: var(--muted); font-size: 13px; }
.arch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.arch-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid rgba(212,175,55,.3); }

/* Fotograf */
.cam-wrap { text-align: center; padding: 18px 0 6px; }
.cam-btn { font-size: 19px; padding: 18px 26px; border-radius: 14px; }
.cam-live-box { margin-top: 12px; }
.cam-live-box video { width: 100%; max-width: 640px; border-radius: 12px; background: #000; display: block; }
.cam-live-bar { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.recent img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--gold-dim); }
.upbar { height: 4px; background: rgba(212,175,55,.15); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.upbar > i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }

.hidden { display: none !important; }
startup, .startup { text-align: center; padding-top: 14vh; }

/* ---------------- Was gibt's Neues? (Changelog-Popup + Historie) ---------------- */
#help-btn.news::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
}
#whatsnew {
  position: fixed; inset: 0; z-index: 120; padding: 22px;
  background: rgba(4, 8, 16, .82);
  display: flex; align-items: center; justify-content: center;
}
.wn-card { max-width: 540px; width: 100%; max-height: 86vh; overflow-y: auto; }
.wn-scroll { max-height: 54vh; overflow-y: auto; margin: 8px 0 4px; padding-right: 6px; }
.wn-rel h3 { margin: 14px 0 2px; font-size: 15px; color: var(--gold-soft); }
.wn-rel ul { margin: 4px 0; padding-left: 20px; }
.wn-rel li { font-size: 14px; line-height: 1.55; margin: 5px 0; color: #e8e4d8; }
.wn-date { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------------- GPLv3 (seit Lizenz-Umstellung) ---------------- */
/* Kleines Logo-Badge in den Hilfe-Knöpfen, grosses auf der Lizenz-Seite */
.gplv3-badge { height: 18px; width: auto; vertical-align: -4px; margin-right: 8px; }
.gplv3-badge-lg { height: 64px; width: auto; }
.gplv3-center { text-align: center; margin: 10px 0 4px; }
.gplv3-center a { display: inline-block; }
.gplv3-center img { display: block; }

/* ---------------- Rudy: Chat-Bot (Rentier, Bubble unten rechts) ----------------
 * Icon/Grafik: handgeschriebenes Comic-SVG im Stil des Promo-Videos
 * (gleiche Quelle wie die Maskottchen-Referenz im Promo-Bundle). */
.chat-fab {
  position: fixed; right: 14px; bottom: 66px; z-index: 60;  /* ueber dem Musik-Chip */
  width: 58px; height: 58px; padding: 2px; border-radius: 16px;
  cursor: pointer; overflow: hidden;
  transition: transform .15s;
}
.chat-fab:hover { transform: scale(1.08); }
.chat-fab svg { display: block; width: 100%; height: 100%; }
.chat-fab:visited { color: inherit; }
body.in-display .chat-fab { display: none; } /* Kiosk-Ausgabe ohne Bedien-Chrome */

.rudy-panel {
  position: fixed; right: 14px; bottom: 132px; z-index: 90;
  width: min(360px, calc(100vw - 28px));
  height: min(520px, calc(100vh - 160px));
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
  box-shadow: var(--shadow);
}
.rudy-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid rgba(212, 175, 55, .25);
  background: rgba(212, 175, 55, .08);
}
.rudy-avatar { width: 40px; height: 40px; flex: none; }
.rudy-avatar svg { display: block; width: 100%; height: 100%; border-radius: 12px; }
.rudy-headtext b { display: block; font-family: var(--serif); font-size: 17px; letter-spacing: .04em; }
.rudy-headtext span { display: block; font-size: 11px; color: var(--muted); }
.rudy-head .rudy-close { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 6px; }
.rudy-head .rudy-close:hover { color: #fff; }
.rudy-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.rudy-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; }
.rudy-msg-user { margin-left: auto; flex-direction: row-reverse; }
.rudy-mini { width: 26px; height: 26px; flex: none; }
.rudy-mini svg { display: block; width: 100%; height: 100%; border-radius: 8px; }
.rudy-text {
  font-size: 14px; line-height: 1.5; padding: 8px 11px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid rgba(212, 175, 55, .18);
}
.rudy-msg-user .rudy-text {
  background: rgba(212, 175, 55, .16); border-color: rgba(212, 175, 55, .4);
}
.rudy-typing .rudy-text { color: var(--muted); font-style: italic; }
.rudy-ticket {
  text-align: center; padding: 8px; border: 1px dashed rgba(212, 175, 55, .5);
  border-radius: 10px; font-size: 13px;
}
.rudy-ticket a { color: var(--gold); }
.rudy-inputrow {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(212, 175, 55, .25); background: rgba(16, 32, 58, .6);
}
.rudy-inputrow input {
  flex: 1; min-width: 0; font-size: 14px; padding: 9px 12px;
  border-radius: 10px; border: 1px solid rgba(212, 175, 55, .3);
  background: rgba(10, 21, 38, .8); color: var(--text);
}
.rudy-inputrow button { padding: 9px 14px; border-radius: 10px; font-size: 14px; }
body.in-display .rudy-panel { display: none; }

/* ---------------- Roboter-Kamera: Selfie (Besucher) ---------------- */
.selfie-hero { max-width: 560px; margin: 18px auto; text-align: center; padding: 30px 22px; }
.selfie-star { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.selfie-star.small { font-size: 34px; }
.count-label { color: var(--gold-soft); font-size: 17px; margin: 8px 0 2px; letter-spacing: .03em; }
.count-num {
  font-family: var(--serif); font-size: 118px; line-height: 1.15; color: var(--gold);
  text-shadow: 0 0 34px rgba(212, 175, 55, .5); margin: 4px 0 10px;
}
.selfie-start { font-size: 19px; margin-top: 18px; }

.selfie-result { max-width: 640px; margin: 0 auto; }
.swipe-stage {
  position: relative; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--gold-dim); background: #04070d;
  box-shadow: var(--shadow); touch-action: pan-y;
}
.swipe-pane { display: none; }
.swipe-pane.show { display: block; animation: pane-in .28s ease; }
@keyframes pane-in { from { opacity: 0; } to { opacity: 1; } }
.swipe-pane img { width: 100%; display: block; }
.card-wait { padding: 70px 20px; text-align: center; color: var(--muted); min-height: 320px; }
.card-wait .selfie-star.small { margin-bottom: 12px; }
.pane-tabs { display: flex; gap: 8px; padding: 10px; justify-content: center; background: rgba(4, 7, 13, .85); }
.pane-tab { font-size: 14px; padding: 8px 14px; }
.pane-tab.active { background: rgba(212, 175, 55, .28); color: var(--gold-soft); }
.swipe-hint {
  text-align: center; font-size: 12px; color: var(--muted);
  padding: 8px; letter-spacing: .06em;
}
.selfie-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.selfie-actions .primary { flex: none; }

/* ---------------- Roboter-Geraet (Kiosk-Kamera) ---------------- */
.robot-root { max-width: none; padding: 0; }
.robot-frame { position: fixed; inset: 0; background: #04070d; overflow: hidden; }
.robot-frame video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scaleX(-1); /* Spiegel-Vorschau: natuerliches Gefuehl fuer die Gruppe */
}
.robot-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  pointer-events: none; padding: 20px;
  background: radial-gradient(900px 500px at 50% 110%, rgba(4, 7, 13, .55), transparent 60%);
}
.robot-msg { background: rgba(4, 7, 13, .55); border: 1px solid var(--gold-dim);
  border-radius: 14px; padding: 20px 30px; box-shadow: var(--shadow); }
.robot-msg .big { font-size: 42px; display: block; margin-bottom: 6px; }
.robot-title { color: var(--gold-soft); font-size: 22px; letter-spacing: .08em; margin-bottom: 4px; }
.robot-count {
  font-family: var(--serif); font-size: min(46vw, 480px); line-height: 1;
  color: var(--gold); text-shadow: 0 0 60px rgba(212, 175, 55, .55);
}
.badge.on { background: var(--green); }

/* ---- Roboter-Kiosk: Live-Bild frei geben + Stations-QR + Kamerawechsel ---- */
.robot-overlay.cam-live { display: none; } /* Kamera laeuft: Overlay weg, Live-Bild sichtbar */
.robot-qr {
  position: absolute; left: 14px; bottom: 14px; z-index: 5;
  background: rgba(4, 7, 13, .72); border: 1px solid var(--gold-dim);
  border-radius: 12px; padding: 8px 8px 6px; text-align: center;
  pointer-events: none;
}
.robot-qr-img { background: #fff; border-radius: 8px; padding: 5px; width: 84px; height: 84px; }
.robot-qr-img svg { display: block; width: 100%; height: 100%; }
.robot-qr-label { color: var(--gold-soft); font-size: 11px; letter-spacing: .05em; margin-top: 5px; }
.robot-cam-btn {
  /* v1.14.0: am rechten Rand auf halber Hoehe - freie Erreichbarkeit ohne
   * Verdecken des Motivs (vorher unten rechts, zu nah am Bildrand-Mitte). */
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(4, 7, 13, .72); border: 1px solid var(--gold-dim);
  color: var(--gold); cursor: pointer; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center; /* Icon exakt mittig im Kreis */
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.robot-cam-btn svg { display: block; width: 22px; height: 22px; }
.robot-cam-btn:hover {
  background: rgba(212, 175, 55, .22);
  box-shadow: 0 0 16px rgba(212, 175, 55, .35);
}
.robot-cam-btn:active { transform: translateY(-50%) scale(.94); }
.robot-cam-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.in-display .robot-cam-btn { display: flex; } /* Kamera-Wechsel NUR am Kamera-Geraet; Flex bleibt (Icon mittig) */

/* Manuelles Foto am Geraet (v1.14.0): Fotoapparat-Symbol unten in der Mitte,
 * gleiche Optik wie der Kamerawechsel-Knopf (Kreis, Gold). */
.robot-shot-btn {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5;
  width: 62px; height: 62px; border-radius: 50%;
  background: rgba(4, 7, 13, .72); border: 1px solid var(--gold-dim);
  color: var(--gold); cursor: pointer; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.robot-shot-btn svg { display: block; width: 26px; height: 26px; }
.robot-shot-btn:hover {
  background: rgba(212, 175, 55, .22);
  box-shadow: 0 0 18px rgba(212, 175, 55, .4);
}
.robot-shot-btn:active { transform: translateX(-50%) scale(.94); }
.robot-shot-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.in-display .robot-shot-btn { display: flex; } /* Manuelles Foto NUR am Kamera-Geraet; Flex bleibt (Icon mittig) */

/* Bildausschnitt festlegen (v1.18.0): Rahmen-Knopf links auf halber Hoehe
 * (Spiegel des Kamerawechsel-Knopfs), Bearbeitungsleiste oben, aktiver
 * Ausschnitt als goldener gestrichelter Rahmen ueber dem Live-Bild. */
.robot-frame-btn {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(4, 7, 13, .72); border: 1px solid var(--gold-dim);
  color: var(--gold); cursor: pointer; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center; /* Icon exakt mittig im Kreis */
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.robot-frame-btn svg { display: block; width: 22px; height: 22px; }
.robot-frame-btn:hover {
  background: rgba(212, 175, 55, .22);
  box-shadow: 0 0 16px rgba(212, 175, 55, .35);
}
.robot-frame-btn:active { transform: translateY(-50%) scale(.94); }
.robot-frame-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
body.in-display .robot-frame-btn { display: flex; } /* Ausschnitt-Werkzeug NUR am Kamera-Geraet; Flex bleibt (Icon mittig) */

.robot-crop-box {
  position: absolute; z-index: 4; pointer-events: none; display: none;
  border: 2px dashed rgba(212, 175, 55, .85);
  box-shadow: inset 0 0 24px rgba(212, 175, 55, .12);
}
.robot-crop-box.on { display: block; }
.robot-crop-box.edit {
  display: block;
  border-color: var(--gold);
  box-shadow: 0 0 0 9999px rgba(4, 7, 13, .5), inset 0 0 30px rgba(212, 175, 55, .18);
}
.robot-frame.editing { touch-action: none; }
.robot-frame-bar {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: none; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  background: rgba(4, 7, 13, .8); border: 1px solid var(--gold-dim); border-radius: 12px;
  padding: 10px 14px; max-width: min(680px, calc(100vw - 28px));
}
.robot-frame-bar.on { display: flex; }
.robot-frame-hint { color: var(--gold-soft); font-size: 13px; letter-spacing: .03em; }
.robot-frame-bar .btn[disabled] { opacity: .45; cursor: default; }
/* Zoom-Steuerung (v1.21.0): − / Wert / + innerhalb der Rahmen-Leiste. */
.robot-zoom { display: inline-flex; align-items: center; gap: 6px; }
.robot-zoom .btn { padding: 4px 10px; font-size: 15px; line-height: 1; }
.robot-zoom-val { min-width: 42px; text-align: center; color: var(--gold-soft);
  font-size: 14px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }

/* Ecken-Anfasser (v1.19.0): im Bearbeitungsmodus sichtbar. Die Treffer-
   Erkennung laeuft koordinatenbasiert in app.js, deshalb pointer-events:none. */
.crop-h {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 2px solid rgba(4, 7, 13, .72);
  pointer-events: none; display: none;
}
.robot-crop-box.edit .crop-h { display: block; }
.crop-h-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.crop-h-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.crop-h-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.crop-h-se { right: -8px; bottom: -8px; cursor: nwse-resize; }

/* ---------------- Grusskarten-Versand (EchtPost) ---------------- */
.card-flow { max-width: 640px; margin: 18px auto; padding: 24px 22px; }
.card-flow-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.card-flow-grid > div { flex: 1; min-width: 240px; }
.card-flow-thumb { width: 132px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.font-btn.active { outline: 2px solid var(--gold); outline-offset: 1px; }
.badge.fail { background: #a33; }
#card-status-refresh { margin-top: 12px; }

/* ---------------- WDR2-Weihnachtswunder-Spenden-Hinweis (v1.16.0) ----------------
 * Klein, fixiert oben links, scrollt mit; bewusst schmal, damit nichts
 * verdeckt wird. Klick fuehrt zur offiziellen Spendenaktion (neuer Tab). */
#wdr2-badge {
  position: fixed; top: 10px; left: 12px; z-index: 55;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: min(78vw, 340px);
  padding: 7px 12px;
  background: rgba(4, 7, 13, .78);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: #f3efe4; font-size: 12.5px; line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#wdr2-badge b { color: var(--gold); }
#wdr2-badge .wdr2-heart { font-size: 13px; }
#wdr2-badge:hover { border-color: var(--gold); box-shadow: 0 2px 14px rgba(212,175,55,.35); }
body.in-display #wdr2-badge { display: none; } /* Kiosk-Ausgabe ohne Bedien-Chrome */

/* ---------------- Nano-Zahlung + Anleitungs-Diashow (v1.16.0) ---------------- */
.pay-tab[data-on="1"] { outline: 2px solid var(--gold); outline-offset: 1px; }
#nano-guide {
  position: fixed; inset: 0; z-index: 125; padding: 22px;
  background: rgba(4, 8, 16, .8);
  display: flex; align-items: center; justify-content: center;
}
.ng-card { max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; }
.ng-stage { position: relative; margin: 4px 0 2px; }
/* Mock-Bildschirm im Comic-Stil der App (keine echten Screenshots) */
.ng-app {
  position: relative; overflow: hidden;
  background: #0b1220; border: 1px solid var(--gold-dim);
  border-radius: 12px; padding-bottom: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.ng-bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px 6px; border-bottom: 1px solid rgba(212,175,55,.15); }
.ng-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(212,175,55,.28); }
.ng-title { margin-left: 6px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.ng-body { position: relative; padding: 12px 12px 4px; font-size: 13px; color: #e8e4d8; }
.ng-field { margin: 8px 0; padding: 7px 9px; background: rgba(255,255,255,.05); border-radius: 7px; border: 1px solid rgba(255,255,255,.08); }
.ng-input { display: inline-block; min-width: 8ch; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ng-row { display: flex; align-items: center; gap: 8px; margin: 9px 0; }
.ng-ico { font-size: 17px; }
.ng-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ng-btn { margin-left: auto; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--gold-dim); background: rgba(212,175,55,.14); color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; cursor: default; white-space: nowrap; }
.ng-btn-green { background: rgba(64,150,84,.3); border-color: #3c7a4e; color: #bfe8c6; }
.ng-btn-violet { background: rgba(122,90,200,.25); border-color: #6a55b0; color: #d6cbf2; }
.ng-words { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.ng-words span { padding: 3px 8px; background: rgba(255,255,255,.06); border-radius: 6px; font-size: 12px; }
.ng-check { margin: 8px 0; color: #bfe8c6; font-size: 12.5px; }
.ng-chip { display: inline-block; margin: 8px 0; padding: 3px 9px; border-radius: 999px; background: rgba(212,175,55,.12); border: 1px solid var(--gold-dim); font-size: 11.5px; }
/* Stilisierter Mauszeiger: wandert zum Klickziel und pulsieret ("Klick") */
.ng-cursor { position: absolute; z-index: 3; pointer-events: none; animation: ng-move 2.6s ease-in-out infinite; }
.ng-cursor svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); animation: ng-click 2.6s ease-in-out infinite; }
@keyframes ng-move { 0% { transform: translate(46px, 60px); } 45%, 72% { transform: translate(0, 0); } 100% { transform: translate(46px, 60px); } }
@keyframes ng-click { 0%, 40% { transform: scale(1); } 52% { transform: scale(.76); } 64% { transform: scale(1); } 100% { transform: scale(1); } }
/* Tastatur-Badges (gezeigte Tasteneingaben) */
.ng-kbd {
  display: inline-block; padding: 2px 8px; min-width: 22px; text-align: center;
  background: linear-gradient(180deg, #2a2f3a, #171b24);
  border: 1px solid #3a4150; border-bottom-width: 3px;
  border-radius: 6px; color: #f0ede2; font-size: 12px; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ng-keys { display: flex; align-items: center; gap: 5px; margin: 6px 0 2px; }
.ng-plus { color: var(--muted); font-size: 12px; }
.ng-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ng-nav .tour-dots { margin: 0; }
.ng-nav .tour-dots span { cursor: pointer; }

/* -------- Selfie-Gate: rotierender Stations-Code (v1.18.0) -------- */
.sg-manual { display: flex; gap: 8px; justify-content: center; align-items: stretch; margin-top: 16px; }
.sg-manual input[type=text] {
  width: 160px; text-align: center; font-size: 22px; letter-spacing: .3em;
}
.sg-manual .btn { flex: 0 0 auto; }
