/* ==========================================================================
   v304 — HALLOWEEN AUF DER STARTSEITE (cids-messenger.pages.dev)
   --------------------------------------------------------------------------
   Wunsch: „Überarbeite die Hauptseite … mach da alles Halloween-mäßig".

   Diese Datei gilt NUR, wenn <html> die Klasse .km-hallo trägt. Die setzt das
   kleine Skript im Kopf von vorschau.html — und zwar nur im Event-Fenster
   (19.–31.10.) oder wenn man es mit ?halloween=1 erzwingt. Am 1.11. ist die
   Seite damit ohne jede Änderung wieder ganz normal.

   WICHTIG: Die Farben stehen mit !important da. Die Lichtwahl (☀ / 🌓 / 🌙)
   schreibt ihre Farben als INLINE-Stil auf <html> — ohne !important würde ein
   gespeichertes „☀ Sonne" die dunkle Bühne überschreiben und weiße Schrift auf
   weißem Grund erzeugen. applyPaletteVisuals() setzt im Event zusätzlich gar
   keine Farben (siehe vorschau.html), das hier ist das Sicherheitsnetz.
   ========================================================================== */

html.km-hallo {
  color-scheme: dark;
  --lp-ink: #F8EEFF !important;
  --lp-ink-2: #DCCBF2 !important;
  --lp-muted: #B9A0D8 !important;
  --lp-line: rgba(255, 150, 70, .20) !important;
  --lp-bg: #08040F !important;
  --lp-bg-2: #150A24 !important;
  --lp-surface: #1A0E2B !important;
  --lp-surface-2: #231236 !important;
  --lp-red: #FF8A1E !important;
  --lp-red-dark: #E96C08 !important;
  --lp-red-soft: rgba(255, 138, 30, .16) !important;
  --lp-amber: #FFC451 !important;
  --lp-amber-soft: rgba(255, 196, 81, .16) !important;
  --lp-teal: #8BE07A !important;
  --lp-teal-soft: rgba(139, 224, 122, .14) !important;
  --lp-shadow-card: 0 18px 46px rgba(0, 0, 0, .58), 0 1px 0 rgba(255, 170, 90, .08) inset;
  --lp-shadow-hover: 0 24px 60px rgba(0, 0, 0, .62), 0 10px 30px rgba(255, 138, 30, .22);
  --lp-shadow-float: 0 26px 70px rgba(0, 0, 0, .65);
}

/* ---------------------------------------------------------------- Grundfläche */
html.km-hallo body { background: #08040F; }
html.km-hallo a { color: #FFB169; }
html.km-hallo ::selection { background: rgba(255, 138, 30, .35); color: #fff; }
html.km-hallo .lp-canvas {
  background:
    radial-gradient(1000px 660px at 84% -12%, rgba(255, 160, 60, .24) 0, transparent 62%),
    radial-gradient(900px 720px at 4% 10%, rgba(126, 58, 237, .30) 0, transparent 62%),
    radial-gradient(1000px 760px at 50% 104%, rgba(84, 24, 132, .42) 0, transparent 70%),
    linear-gradient(180deg, #08040F 0, #0D0718 46%, #08040F 100%);
}
html.km-hallo .lp-canvas::after {
  background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255, 200, 120, .11) 1.25px, transparent 0);
  background-size: 30px 30px;
  mask: radial-gradient(1200px 760px at 50% 12%, #000 30%, transparent 78%);
  opacity: .85;
}
html.km-hallo .lp-blob.a { background: radial-gradient(closest-side, rgba(255, 130, 30, .26), transparent 72%); }
html.km-hallo .lp-blob.b { background: radial-gradient(closest-side, rgba(168, 85, 247, .24), transparent 72%); }
html.km-hallo .lp-blob.c { background: radial-gradient(closest-side, rgba(139, 224, 122, .12), transparent 72%); }

/* ------------------------------------------------------------------- Deko-Lage */
/* Hintergrund: Mond, Spinnweben, Glut. Liegt HINTER den Karten (-1), damit
   nichts den Text stört; nur die Fledermäuse dürfen oben darüber fliegen. */
.lp-hallo-deko { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hallo-mond {
  position: absolute; top: -120px; right: -90px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 232, 180, .55), rgba(255, 170, 70, .20) 58%, transparent 72%);
  filter: blur(2px);
}
.hallo-netz {
  position: absolute; top: 0; left: 0; width: 300px; height: 300px; opacity: .32;
  background: url("/halloween/bilder/spinnennetz_ecke.png") top left / contain no-repeat;
}
.hallo-netz.rechts { left: auto; right: 0; transform: scaleX(-1); }
.hallo-glut {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(closest-side, #FFC451, rgba(255, 138, 30, 0));
  box-shadow: 0 0 12px 3px rgba(255, 150, 40, .35);
  animation: hallo-glut 11s ease-in-out infinite alternate;
}
@keyframes hallo-glut {
  0%   { transform: translate(0, 0) scale(.8); opacity: .35; }
  50%  { opacity: .9; }
  100% { transform: translate(14px, -46px) scale(1.25); opacity: .25; }
}
/* Die Fledermäuse liegen ÜBER der Seite (z-index 4), aber ohne Klicks zu fangen.
   Sie sind absichtlich weit oben und rechts — nie über einem Absatz. */
.lp-hallo-flug { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
/* v312: Die Fledermaus fliegt nicht mehr als starres Bild: Die zwei Flügel-
   hälften schlagen um die Schulter (Bildmitte), der Körper bleibt ruhig.
   Alle drei Teile sind dasselbe PNG — kein neues Bild nötig, und die Silhouette
   bleibt exakt die alte. */
.hallo-bat {
  position: absolute; width: 58px; aspect-ratio: 600 / 340; opacity: .62;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)) sepia(.25) saturate(1.6);
  animation: hallo-flug 30s linear infinite;
  will-change: transform;
}
.hallo-bat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.hallo-bat .hallo-bat-links {
  /* Flügel mit 4 % Überlappung unter dem Körper — sonst blitzt an der
     Schnittkante eine helle Naht durch. Drehpunkt ist die Schulter. */
  clip-path: inset(0 52% 0 0);
  transform-origin: 44% 55%;
  animation: hallo-schlag-links .48s ease-in-out infinite;
}
.hallo-bat .hallo-bat-rechts {
  clip-path: inset(0 0 0 52%);
  transform-origin: 56% 55%;
  animation: hallo-schlag-rechts .48s ease-in-out infinite;
}
/* Der Körper (mittlere 12 %) liegt ÜBER den Flügeln und schlägt nicht mit —
   sonst gäbe es beim Aufschlag zwei Köpfe und zwei Augen. */
.hallo-bat .hallo-bat-koerper { clip-path: inset(0 44% 0 44%); z-index: 1; }
@keyframes hallo-schlag-links {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(20deg); }
}
@keyframes hallo-schlag-rechts {
  0%, 100% { transform: rotate(7deg); }
  50%      { transform: rotate(-20deg); }
}
@keyframes hallo-flug {
  0%   { transform: translate3d(-12vw, 0, 0) rotate(-6deg); }
  25%  { transform: translate3d(18vw, 26px, 0) rotate(5deg); }
  50%  { transform: translate3d(48vw, -14px, 0) rotate(-4deg); }
  75%  { transform: translate3d(78vw, 30px, 0) rotate(6deg); }
  100% { transform: translate3d(112vw, 0, 0) rotate(-6deg); }
}
@media (max-width: 760px) {
  .lp-hallo-flug { display: none; }
  .hallo-mond { width: 250px; height: 250px; top: -90px; right: -100px; }
  .hallo-netz { width: 170px; height: 170px; opacity: .26; }
}
@media (prefers-reduced-motion: reduce) {
  .hallo-glut, .hallo-bat, .hallo-bat img { animation: none !important; }
}

/* ---------------------------------------------------------------- Event-Band */
.lp-hallo-band {
  position: relative; z-index: 19; display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; padding: 9px 16px; text-align: center;
  font-family: Nunito, system-ui, sans-serif; font-weight: 800; font-size: 12.5px; line-height: 1.35;
  color: #241004;
  background: linear-gradient(90deg, #FF8A1E 0, #FFC451 48%, #FF8A1E 100%);
  box-shadow: 0 8px 26px rgba(255, 120, 20, .30);
}
/* Der Verweis sitzt auf der hellen Orange-Fläche — als dunkler Knopf ist er
   auch bei Sonnenlicht auf dem Handy gut zu treffen und zu lesen. */
.lp-hallo-band a {
  color: #FFD79A; background: #241004; text-decoration: none;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.lp-hallo-band a:hover { color: #FFE9C4; background: #120700; }
.lp-hallo-band .hallo-band-tag { opacity: .82; font-weight: 700; }
.lp-hallo-band .hallo-band-spruch { font-style: italic; font-weight: 700; opacity: .92; }
@media (max-width: 560px) { .lp-hallo-band { font-size: 11.5px; padding: 8px 12px; } }

/* ------------------------------------------------------------------- Kopfzeile */
html.km-hallo .lp-nav {
  background: color-mix(in srgb, #160A24 92%, transparent);
  border-bottom: 1px solid rgba(255, 150, 70, .28);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .50);
}
html.km-hallo .lp-mark {
  background: linear-gradient(160deg, #2B1338, #150A20);
  box-shadow: 0 12px 30px rgba(255, 120, 20, .32), 0 0 0 1px rgba(255, 160, 60, .34) inset;
  padding: 2px;
}
html.km-hallo .lp-mark svg { display: none; }
html.km-hallo .lp-mark img.lp-mark-kuerbis {
  width: 46px; height: 46px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(255, 120, 20, .55));
}
html.km-hallo .lp-brand-text h1 { text-shadow: 0 0 26px rgba(255, 138, 30, .35); }
html.km-hallo .lp-brand-text p { color: #E0CCF5; }

/* --------------------------------------------------------------------- Knöpfe */
html.km-hallo .lp-btn-primary {
  background: linear-gradient(180deg, #FF9C31, #F0730A);
  color: #1C0C03;
  box-shadow: 0 14px 30px rgba(255, 120, 20, .34);
}
html.km-hallo .lp-btn-primary:hover {
  background: linear-gradient(180deg, #FFAC4C, #FF8A1E);
  box-shadow: 0 18px 38px rgba(255, 130, 25, .40);
}
html.km-hallo .lp-btn-dark {
  background: #221238; color: #F8EEFF; border-color: rgba(255, 150, 70, .28);
}
html.km-hallo .lp-btn-dark:hover { background: #2E1848; }
html.km-hallo .lp-btn-light {
  background: rgba(255, 240, 255, .09); color: #F8EEFF; border-color: rgba(255, 150, 70, .22);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .40);
}
html.km-hallo .lp-btn-light:hover { background: rgba(255, 240, 255, .14); border-color: rgba(255, 160, 80, .34); }
html.km-hallo .lp-btn-ghost {
  background: rgba(255, 138, 30, .12); color: #FFD79A; border-color: rgba(255, 150, 70, .30);
}
html.km-hallo .lp-btn-ghost:hover { background: rgba(255, 138, 30, .20); }
/* Der Installieren-Knopf stand auf der HELLEN Karte als weiße Fläche. Die Karte ist
   jetzt dunkel — deshalb dunkel statt weiß (sonst ein greller Fleck). */
html.km-hallo #btnInstall {
  background: rgba(255, 240, 255, .10); color: #F8EEFF;
  border-color: rgba(255, 160, 80, .32); box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}
html.km-hallo #btnInstall:hover { background: rgba(255, 240, 255, .16); border-color: rgba(255, 170, 90, .45); }
html.km-hallo .lp-palette button.active { border-color: #FF8A1E; background: rgba(255, 138, 30, .18); color: #FFC451; }

/* --------------------------------------------------------------- Hero-Karte */
html.km-hallo .lp-hero-text {
  background: linear-gradient(158deg, #1F1133 0, #150A24 56%, #251139 100%);
  border-color: rgba(255, 150, 70, .24);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .62), 0 0 0 1px rgba(255, 150, 70, .10) inset;
}
html.km-hallo .lp-hero-text::before {
  background: radial-gradient(closest-side, rgba(255, 150, 40, .30), transparent 70%);
}
.hallo-schrei {
  font-family: Creepster, "Baloo 2", system-ui, sans-serif;
  font-size: 34px; line-height: 1; letter-spacing: .01em;
  color: #FF9B2E; text-shadow: 0 0 24px rgba(255, 130, 20, .55), 0 2px 0 rgba(0, 0, 0, .35);
  margin: 0 0 10px;
}
@media (max-width: 560px) { .hallo-schrei { font-size: 26px; margin-bottom: 8px; } }
html.km-hallo .lp-kicker {
  color: #FFC451; background: rgba(255, 138, 30, .14); border-color: rgba(255, 196, 81, .34);
}
html.km-hallo .lp-display .grad {
  background: linear-gradient(92deg, #FFC451 0, #FF8A1E 52%, #C084FC 100%);
  -webkit-background-clip: text; background-clip: text;
}
html.km-hallo .lp-lead { color: #DDCCF0; }
html.km-hallo .lp-lead b { color: #fff; }
html.km-hallo .lp-meta-row .mono { background: rgba(255, 138, 30, .12); border-color: rgba(255, 150, 70, .22); color: #FFD79A; }
html.km-hallo #geraeteLinie { background: rgba(255, 255, 255, .04); border-color: rgba(255, 150, 70, .20); }
/* Kürbis-Wasserzeichen in den Seitenecken (kommen aus seite.js). Sie liegen hinter
   den Karten — sichtbar bleibt nur der Rand. Unter 1100 px ist der Rand zu schmal
   bzw. die Karten decken alles ab, deshalb dort aus. */
.hallo-kuerbis {
  position: absolute; bottom: -26px; width: 210px; height: 210px; object-fit: contain;
  opacity: .22; pointer-events: none;
  filter: drop-shadow(0 12px 30px rgba(255, 120, 20, .40));
}
.hallo-kuerbis.links { left: -34px; transform: rotate(-9deg); }
.hallo-kuerbis.rechts { right: -30px; bottom: auto; top: 44%; transform: rotate(8deg); opacity: .16; }
@media (max-width: 1100px) { .hallo-kuerbis { display: none; } }

/* ------------------------------------------------------------------ Vorschau */
html.km-hallo .lp-device-card {
  background: linear-gradient(180deg, #1D1030, #150A22);
  border-color: rgba(255, 150, 70, .20);
}
html.km-hallo .lp-device-head strong i { background: linear-gradient(180deg, #FF9C31, #F0730A); color: #1C0C03; }
html.km-hallo .lp-device-picker button { background: rgba(255, 240, 255, .07); border-color: rgba(255, 150, 70, .18); }
html.km-hallo .lp-device-picker button.active {
  background: linear-gradient(180deg, #FF9C31, #F0730A); color: #1C0C03; border-color: transparent;
  box-shadow: 0 6px 16px rgba(255, 120, 20, .34);
}
html.km-hallo .lp-pill.ok { background: rgba(139, 224, 122, .14); color: #C8F5BE; border-color: rgba(139, 224, 122, .30); }
html.km-hallo .lp-pill.err { background: rgba(255, 107, 107, .16); color: #FFC9C9; border-color: rgba(255, 107, 107, .30); }
html.km-hallo .lp-frame.iphone, html.km-hallo .lp-frame.android { border-color: #2B1539; }
html.km-hallo .lp-frame.iphone::before { background: #2B1539; }
html.km-hallo .lp-screen { background: #0B0514 !important; }
html.km-hallo .lp-topbar { background: #150A22 !important; border-bottom: 1px solid rgba(255, 150, 70, .22) !important; }
html.km-hallo .lp-topbar .avatar { background: linear-gradient(180deg, #FF9C31, #F0730A); color: #1C0C03; }
html.km-hallo .lp-messages {
  background:
    radial-gradient(820px 560px at 16% 8%, rgba(126, 58, 237, .45) 0, transparent 64%),
    radial-gradient(760px 560px at 86% 12%, rgba(255, 138, 30, .34) 0, transparent 66%),
    radial-gradient(700px 600px at 50% 92%, rgba(60, 12, 92, .55) 0, transparent 70%),
    linear-gradient(148deg, #0A0413 0%, #150A24 30%, #23102F 62%, #0A0413 100%) !important;
}
html.km-hallo .lp-messages::before {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 210, 150, .07) 1px, transparent 0);
  opacity: .5;
}
/* v309: Die Sprechblasen waren im Halloween-Look noch CREMEWEISS („das Weiße“).
   Wunsch: „mach das weiße zu halloween Orange“. Jetzt Kerzenorange wie die
   Knöpfe — dunkle Schrift, damit der Kontrast bleibt (≈ 8:1). Die eigene
   Blase ist etwas kräftiger als die fremde, damit man beide unterscheidet. */
html.km-hallo .lp-bubble.me, html.km-hallo .lp-bubble.other {
  background: linear-gradient(180deg, #FFB454, #FF9526) !important;
  color: #2A1206 !important;
  border: 1px solid rgba(122, 48, 2, .30) !important;
  box-shadow: 0 8px 18px rgba(70, 22, 2, .38) !important;
}
html.km-hallo .lp-bubble.me {
  background: linear-gradient(180deg, #FF9E33, #F0750A) !important;
}
html.km-hallo .lp-bubble .meta { color: #6A3008 !important; opacity: 1 !important; }
/* Die zwei Haken standen mit INLINE-Farbe #E13A0E (rot) in der Blase — auf
   Kürbis-Orange kaum zu sehen. Jetzt dunkles Braun wie die Zeitangabe. */
html.km-hallo .lp-bubble .meta span[title] { color: #6A3008 !important; }
html.km-hallo .lp-bubble.filtered { outline-color: rgba(45, 16, 40, .45) !important; }
/* Der „# gefiltert“-Chip stand als helle Fläche mit weißer Schrift in der hellen
   Sprechblase — im Halloween-Look unlesbar. Jetzt dunkel mit Kerzenorange. */
html.km-hallo .lp-filter-chip { background: #3B1F52 !important; color: #FFD79A !important; }
html.km-hallo .lp-composer { background: #150A22 !important; border-top: 1px solid rgba(255, 150, 70, .22) !important; }
html.km-hallo .lp-composer input {
  background: #1E1030 !important; border-color: #2E1A44 !important; color: #F8EEFF !important;
}
html.km-hallo .lp-composer button { background: linear-gradient(180deg, #FF9C31, #F0730A); color: #1C0C03; }

/* --------------------------------------------------------------- Bento-Karten */
html.km-hallo .lp-bento .card {
  background: linear-gradient(180deg, #1B0E2C, #150A22);
  border-color: rgba(255, 150, 70, .18);
}
html.km-hallo .lp-bento .card h3 {
  font-family: Creepster, "Baloo 2", system-ui, sans-serif; font-weight: 400;
  font-size: 21px; letter-spacing: .02em; color: #FFC451;
  text-shadow: 0 0 18px rgba(255, 130, 20, .40);
}
html.km-hallo .lp-bento .card p { color: #DCCBF2; }
html.km-hallo .lp-iconbox { box-shadow: 0 0 24px rgba(255, 130, 30, .18), 0 0 0 1px rgba(255, 150, 70, .16) inset; }

/* -------------------------------------------------------------- Installations- */
html.km-hallo .lp-guide {
  background: linear-gradient(180deg, #1A0E2B, #150A22);
  border-color: rgba(255, 150, 70, .18);
}
html.km-hallo .lp-guide-head h2 { color: #FFF3DF; }
html.km-hallo #guideGrid > div { border-color: rgba(255, 150, 70, .20) !important; }
html.km-hallo #guideGrid > div[style*="var(--lp-red-soft)"] { background: rgba(255, 138, 30, .12) !important; }

/* ------------------------------------------------------------------ Schlussband */
html.km-hallo .lp-cta-band {
  background: linear-gradient(135deg, #2A123A 0, #3A1547 48%, #5C2410 100%);
  border-color: rgba(255, 150, 70, .26);
}
html.km-hallo .lp-cta-band::before { background: radial-gradient(closest-side, rgba(255, 150, 40, .30), transparent 70%); }
html.km-hallo .lp-cta-band h3 {
  font-family: Creepster, "Baloo 2", system-ui, sans-serif; font-weight: 400;
  font-size: 28px; letter-spacing: .01em; color: #FFD79A;
  text-shadow: 0 0 22px rgba(255, 130, 20, .45);
}
html.km-hallo .lp-cta-band p { color: #E6D6F6; }

/* --------------------------------------------------------------------- Fußzeile */
html.km-hallo .lp-footer { color: #B9A0D8; }
html.km-hallo .lp-footer a { color: #E5D3F7; }
html.km-hallo .lp-footer .hallo-fuss {
  display: inline-flex; align-items: center; gap: 6px;
  color: #FFC451; font-weight: 800;
}
html.km-hallo .lp-wave path { fill: #150A24; }
html.km-hallo .lp-wave path:nth-child(2) { fill: #231236; }

/* --------------------------------------------------------------------- Fenster */
html.km-hallo dialog {
  background: #190D29; border-color: rgba(255, 150, 70, .26); color: #F8EEFF;
}
html.km-hallo dialog::backdrop { background: rgba(6, 2, 12, .66); }
html.km-hallo .lp-toast { background: #2A1539; color: #FFF3DF; border: 1px solid rgba(255, 150, 70, .30); }

/* ------------------------------------------------------------ Lichtwahl-Hinweis */
/* Während des Events ist der Look fest — die drei Licht-Knöpfe würden nur
   versprechen, was sie gerade nicht tun. Statt ihrer steht ein ehrlicher Satz. */
html.km-hallo #paletteChooser { display: none; }
.lp-hallo-licht {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; max-width: 100%;
  width: fit-content; margin: 14px auto 0; padding: 8px 14px; border-radius: 14px; text-align: center;
  font-size: 11.5px; font-weight: 800; line-height: 1.45; color: #FFD79A;
  background: rgba(255, 138, 30, .10); border: 1px solid rgba(255, 150, 70, .24);
}
.lp-hallo-licht b { color: #FFC451; }
@media (max-width: 560px) { .lp-hallo-licht { width: auto; } }
@media print { .lp-hallo-deko, .lp-hallo-flug, .lp-hallo-band { display: none !important; } }
