/* Kontakt-Popup mit Live-Ticket (geteilt von Startseite, 404 und Referenz-Seiten).
   Nutzt die Variablen der Seiten (--ink, --paper, --violet, --blue, --acc, --muted), mit Rückfallwerten. */
.kp-ov{--kp-ink:var(--ink,#17181c);--kp-paper:var(--paper,#f6f4ec);--kp-or:var(--violet,#ff5e3b);--kp-blue:var(--blue,#4a6fe4);--kp-yel:var(--acc,#fedb3f);--kp-muted:var(--muted,#666a75);
  --kp-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='.33 .33 .33 0 0 .33 .33 .33 0 0 .33 .33 .33 0 0 0 0 0 0 .6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(23,24,28,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:kpFade .25s ease both;font-family:var(--font,'Instrument Sans',system-ui,sans-serif);color:var(--kp-ink)}
.kp-ov[hidden]{display:none}
.kp-ov *{box-sizing:border-box}
.kp-dlg{position:relative;width:min(1100px,100%);max-height:100%;display:flex;animation:kpIn .38s cubic-bezier(.2,.8,.2,1) both}
.kp-card{position:relative;display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr);width:100%;max-height:calc(100vh - 48px);background:#fff;border-radius:32px;overflow:hidden;box-shadow:0 40px 100px -30px rgba(10,12,40,.55)}
.kp-x{position:absolute;top:18px;right:18px;z-index:5;width:40px;height:40px;border-radius:50%;border:0;padding:0;background:rgba(255,255,255,.92);color:var(--kp-ink);display:grid;place-items:center;cursor:pointer;transition:background .2s,color .2s}
.kp-x svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round}
.kp-x:hover{background:var(--kp-ink);color:#fff}
.kp-x:focus-visible,.kp-chip:focus-visible,.kp-go:focus-visible,.kp-link:focus-visible{outline:2px solid var(--kp-or);outline-offset:2px}

/* ---- Formular (links) ---- */
.kp-fcol{position:relative;overflow:auto;padding:38px 40px 28px;display:flex;flex-direction:column}
.kp-fcol h3{margin:0;font-size:2rem;line-height:1;letter-spacing:-.045em;font-weight:700}
.kp-sub{margin:8px 0 18px;color:var(--kp-muted);line-height:1.45;max-width:44ch}
.kp-form{display:flex;flex-direction:column;gap:14px}
.kp-row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.kp-f{display:flex;flex-direction:column;gap:6px;min-width:0}
.kp-fl{font-weight:600;font-size:.86rem;display:flex;justify-content:space-between;gap:10px}
.kp-req{color:var(--kp-or);font-weight:700;margin-left:3px}
.kp-fl em{font-style:normal;font-weight:500;color:var(--kp-muted)}
.kp-fw{display:flex;background:var(--kp-paper);border-radius:16px;box-shadow:inset 0 0 0 1.5px transparent;transition:box-shadow .2s,background .2s}
.kp-fw:focus-within{background:#fff;box-shadow:inset 0 0 0 2px var(--kp-or)}
.kp-fw input,.kp-fw textarea{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:.95rem;color:inherit;padding:0 16px;height:48px;outline:0;border-radius:16px}
.kp-fw textarea{height:auto;min-height:84px;padding:12px 16px;resize:vertical;line-height:1.5}
.kp-fw input::placeholder,.kp-fw textarea::placeholder{color:rgba(23,24,28,.38)}
.kp-f.bad .kp-fw{background:#fff;box-shadow:inset 0 0 0 2px #e5483b}
.kp-fe{display:none;color:#b42318;font-size:.84rem;font-weight:500}
.kp-f.bad .kp-fe{display:block;animation:kpShake .4s}
.kp-cnt{font-weight:500;color:var(--kp-muted);font-variant-numeric:tabular-nums}
.kp-chips{display:flex;flex-wrap:wrap;gap:8px}
.kp-chip{border:0;background:var(--kp-paper);color:var(--kp-ink);font:inherit;font-weight:600;font-size:.9rem;padding:8px 14px;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:background .18s,color .18s,transform .18s}
.kp-chip:hover{background:#ece8da}
.kp-chip::before{content:"";width:8px;height:8px;border-radius:50%;background:rgba(23,24,28,.22);transition:background .18s,transform .18s}
.kp-chip[aria-pressed="true"]{background:var(--kp-ink);color:#fff}
.kp-chip[aria-pressed="true"]::before{background:var(--kp-or);transform:scale(1.15)}
.kp-chip:active{transform:scale(.97)}
.kp-chip-alt{background:#ffe3da;color:#b3361b}
.kp-chip-alt:hover{background:#ffd3c5}
.kp-chip-alt::before{background:rgba(255,94,59,.55)}
.kp-chip-alt[aria-pressed="true"]{background:var(--kp-ink);color:#fff}
.kp-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.kp-priv{margin:0;color:var(--kp-muted);font-size:.82rem;line-height:1.5}
.kp-priv a{color:var(--kp-or);font-weight:600}
.kp-go{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;border:0;border-radius:999px;background:var(--kp-ink);color:#fff;font:inherit;font-weight:600;font-size:1rem;padding:16px 26px;cursor:pointer;transition:background .2s}
.kp-go:hover{background:var(--kp-or)}
.kp-go svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kp-sp{display:none;width:18px;height:18px;border-radius:50%;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;animation:kpSpin .7s linear infinite}
.kp-dlg[data-state="loading"] .kp-sp{display:inline-block}
.kp-dlg[data-state="loading"] .kp-go{pointer-events:none;opacity:.9}
.kp-err{display:none;align-items:center;gap:10px;background:#fdeaea;color:#b42318;border-radius:14px;padding:12px 14px;font-weight:500;font-size:.92rem;line-height:1.4}
.kp-dlg[data-state="error"] .kp-err{display:flex;animation:kpShake .4s}
.kp-tojump{display:none}
.kp-link{border:0;background:none;padding:0;font:inherit;font-weight:600;color:var(--kp-or);cursor:pointer}
.kp-link:hover{text-decoration:underline}

/* ---- Erfolg (ersetzt das Formular) ---- */
.kp-done{display:none;flex-direction:column;align-items:flex-start;gap:12px;margin:auto 0;padding:10px 0}
.kp-dlg[data-state="success"] .kp-form,.kp-dlg[data-state="success"] .kp-head{display:none}
.kp-dlg[data-state="success"] .kp-done{display:flex}
.kp-okc{width:72px;height:72px;border-radius:50%;background:#22c55e;color:#fff;display:grid;place-items:center;animation:kpPop .5s cubic-bezier(.2,1.4,.4,1) both}
.kp-okc svg{width:34px;height:34px;stroke:currentColor;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.kp-done h3{margin-top:10px}
.kp-done p{margin:0;color:var(--kp-muted);line-height:1.5;max-width:42ch}
.kp-done p b{color:var(--kp-ink)}
.kp-done .kp-go{width:auto;margin-top:10px}

/* ---- Ticket (rechts) ---- */
.kp-tcol{position:relative;overflow:auto;display:flex;align-items:center;justify-content:center;padding:44px 40px;isolation:isolate;
  background-color:#ff5e3b;
  background-image:var(--kp-grain),radial-gradient(80% 60% at 0% 100%,#4a6fe4 0%,rgba(74,111,228,.7) 45%,rgba(74,111,228,0) 100%),radial-gradient(70% 55% at 100% 100%,#fedb3f 0%,#fedb3f 40%,rgba(254,219,63,0) 100%),radial-gradient(70% 55% at 20% 0%,#e8431f 0%,rgba(232,67,31,0) 100%),radial-gradient(60% 50% at 80% 8%,rgba(255,154,61,.9) 0%,rgba(255,154,61,0) 100%);
  background-size:240px 240px,100% 100%,100% 100%,100% 100%,100% 100%;background-blend-mode:overlay,normal,normal,normal,normal}
.kp-tw{width:100%;max-width:390px;filter:drop-shadow(0 26px 30px rgba(120,30,10,.35)) drop-shadow(0 4px 8px rgba(120,30,10,.18));transition:transform .5s cubic-bezier(.2,.8,.2,1);margin-top:0}
.kp-tw:hover{transform:rotate(-.8deg)}
.kp-t1,.kp-t2{background:#fff;position:relative}
.kp-t1{border-radius:22px 22px 0 0;padding:22px 24px 20px;
  -webkit-mask:radial-gradient(circle 13px at 0 100%,#0000 12.5px,#000 13.5px) left/51% 100% no-repeat,radial-gradient(circle 13px at 100% 100%,#0000 12.5px,#000 13.5px) right/51% 100% no-repeat;
  mask:radial-gradient(circle 13px at 0 100%,#0000 12.5px,#000 13.5px) left/51% 100% no-repeat,radial-gradient(circle 13px at 100% 100%,#0000 12.5px,#000 13.5px) right/51% 100% no-repeat}
.kp-t2{border-radius:0 0 22px 22px;padding:20px 24px 22px;
  -webkit-mask:radial-gradient(circle 13px at 0 0,#0000 12.5px,#000 13.5px) left/51% 100% no-repeat,radial-gradient(circle 13px at 100% 0,#0000 12.5px,#000 13.5px) right/51% 100% no-repeat;
  mask:radial-gradient(circle 13px at 0 0,#0000 12.5px,#000 13.5px) left/51% 100% no-repeat,radial-gradient(circle 13px at 100% 0,#0000 12.5px,#000 13.5px) right/51% 100% no-repeat}
.kp-tperf{position:relative;height:0;z-index:2}
.kp-tperf::before{content:"";position:absolute;left:22px;right:22px;top:-1px;border-top:2px dashed rgba(23,24,28,.16)}
.kp-thead{display:flex;align-items:center;justify-content:space-between;gap:12px}
.kp-tlogo{height:34px;width:auto;display:block}
.kp-tstat{display:inline-flex;align-items:center;gap:7px;background:var(--kp-or);color:#fff;font-weight:700;font-size:.78rem;padding:6px 12px 6px 10px;border-radius:999px;transition:background .3s,color .3s}
.kp-tstat i{width:8px;height:8px;border-radius:50%;background:currentColor}
.kp-tstat svg{display:none;width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.kp-dlg[data-state="success"] .kp-tstat{background:#22c55e;color:#fff}
.kp-dlg[data-state="success"] .kp-tstat i{display:none}
.kp-dlg[data-state="success"] .kp-tstat svg{display:block}
.kp-tno{margin:6px 0 0;font-size:.74rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--kp-muted);display:flex;justify-content:flex-end;gap:10px}
.kp-tno b{color:var(--kp-ink);font-variant-numeric:tabular-nums;letter-spacing:.06em}
.kp-tk{margin:16px 0 4px;font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--kp-muted)}
.kp-tname{margin:0;font-size:1.55rem;line-height:1.08;font-weight:700;letter-spacing:-.035em;overflow-wrap:anywhere}
.kp-tco,.kp-tmail{margin:4px 0 0;font-size:.92rem;color:var(--kp-muted);overflow-wrap:anywhere}
.kp-tmail{display:flex;align-items:center;gap:7px;color:var(--kp-ink);font-weight:500}
.kp-tmail svg{flex:none;width:15px;height:15px;stroke:var(--kp-or);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kp-tchips{display:flex;flex-wrap:wrap;gap:6px}
.kp-tc{font-size:.82rem;font-weight:600;padding:6px 12px;border-radius:999px;background:#eceae0;color:#17181c;animation:kpPop .35s cubic-bezier(.2,1.4,.4,1) both}
.kp-tc.o{background:#ffe3da;color:#b3361b}
.kp-tc.b{background:#e3e9fd;color:#2c47a8}
.kp-tc.y{background:#fff1b0;color:#6b5300}
.kp-tval{margin:0;font-size:.98rem;font-weight:600}
.kp-ph{color:rgba(23,24,28,.26);font-weight:600}
.kp-tmsg{margin:0;font-size:.95rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden;min-height:3em}
.kp-tfoot{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:20px}
.kp-bar{display:block;height:38px;flex:1;min-width:0;max-width:210px}
.kp-tdate{font-size:.74rem;color:var(--kp-muted);font-variant-numeric:tabular-nums;text-align:right;line-height:1.35;flex:none}
.kp-pop{animation:kpBump .35s ease both}
.kp-stamp{position:absolute;right:14px;bottom:20px;z-index:3;transform:rotate(-10deg);border:2.5px solid #16a34a;color:#16a34a;border-radius:10px;padding:4px 11px;font-weight:800;font-size:.9rem;letter-spacing:.12em;text-transform:uppercase;opacity:0;pointer-events:none;background:rgba(255,255,255,.6)}
.kp-dlg[data-state="success"] .kp-stamp{animation:kpStamp .55s .15s cubic-bezier(.2,1.2,.3,1) both}

@keyframes kpFade{from{opacity:0}to{opacity:1}}
@keyframes kpIn{from{opacity:0;transform:translateY(24px) scale(.97)}to{opacity:1;transform:none}}
@keyframes kpShake{0%,100%{transform:translateX(0)}20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(4px)}}
@keyframes kpSpin{to{transform:rotate(360deg)}}
@keyframes kpPop{from{opacity:0;transform:scale(.6)}to{opacity:1;transform:none}}
@keyframes kpBump{0%{opacity:.4;transform:translateY(4px)}100%{opacity:1;transform:none}}
@keyframes kpStamp{from{opacity:0;transform:rotate(-10deg) scale(2)}to{opacity:1;transform:rotate(-10deg) scale(1)}}
@media (prefers-reduced-motion:reduce){.kp-ov,.kp-dlg,.kp-tc,.kp-pop{animation:none!important}.kp-tw{transition:none}}

/* ---- Tablet/Mobil: untereinander, Ticket unter dem Formular ---- */
@media (max-width:900px){
  .kp-ov{padding:12px;align-items:flex-start}
  .kp-dlg{max-height:calc(100dvh - 24px)}
  .kp-card{display:block;max-height:calc(100dvh - 24px);overflow:auto;border-radius:28px}
  .kp-fcol,.kp-tcol{overflow:visible}
  .kp-fcol{padding:34px 22px 24px}
  .kp-fcol h3{font-size:1.7rem;padding-right:44px}
  .kp-tcol{padding:34px 20px}
    .kp-x{position:sticky;top:12px;float:right;margin:12px 12px -52px 0}
  .kp-row2{grid-template-columns:1fr}
  .kp-row2.kp-names{grid-template-columns:1fr 1fr;gap:10px}
  .kp-tojump{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:2px;border:0;border-radius:999px;padding:13px 20px;background:var(--kp-paper);color:var(--kp-ink);font:inherit;font-weight:600;cursor:pointer}
  .kp-tojump svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
  .kp-dlg[data-state="success"] .kp-tcol{display:none}
}
