/* WHOLE STACK Kontakt-Popup (Variante 2a): Espresso-Szene mit Lichtkegel, Tisch, Glaskarte.
   Folgt html[data-theme]; Desktop als schwebendes Fenster, Tablet schmaler, Handy als Blatt von unten. */
body.kt-lock { overflow: hidden; }
.kt, .kt * { box-sizing: border-box; }
.kt { --kt-gold: #BFAE86; --kt-gold-ink: #665A38; --kt-ease: cubic-bezier(.16, 1, .3, 1);
  --kt-bg: radial-gradient(52% 46% at 50% 22%, rgba(191,174,134,0.34), rgba(191,174,134,0) 70%), linear-gradient(180deg, #F6F0E4, #E8DFCD);
  --kt-ink: #1A1714; --kt-mute: #6B6255; --kt-eye: #665A38; --kt-em: #665A38;
  --kt-card: rgba(247,243,236,0.95); --kt-card-line: rgba(255,255,255,0.85); --kt-card-ink: #1A1714; --kt-card-mute: #6B6255;
  --kt-in: #FFFFFF; --kt-in-line: rgba(26,23,20,0.14); --kt-ph: rgba(26,23,20,0.42);
  --kt-btn: #1A1714; --kt-btn-ink: #F3EEE4; --kt-btn-line: transparent; --kt-dot: #BFAE86; --kt-dot-ink: #1A1714;
  --kt-scrim: rgba(20,17,13,0.4); --kt-x: rgba(26,23,20,0.06); --kt-x-line: rgba(26,23,20,0.16); --kt-x-ink: #1A1714;
  position: fixed; inset: 0; z-index: 960; display: flex; align-items: center; justify-content: center; padding: clamp(14px, 3vw, 36px);
  font-family: 'Libre Baskerville', Georgia, serif; -webkit-font-smoothing: antialiased; }
html[data-theme='dark'] .kt { --kt-bg: radial-gradient(52% 46% at 50% 22%, rgba(191,174,134,0.3), rgba(191,174,134,0) 70%), linear-gradient(180deg, #221C15, #14110D);
  --kt-ink: #F3EEE4; --kt-mute: rgba(243,238,228,0.7); --kt-eye: #BFAE86; --kt-em: #BFAE86;
  --kt-card: rgba(20,17,13,0.74); --kt-card-line: rgba(243,238,228,0.14); --kt-card-ink: #F3EEE4; --kt-card-mute: rgba(243,238,228,0.64);
  --kt-in: rgba(243,238,228,0.06); --kt-in-line: rgba(243,238,228,0.18); --kt-ph: rgba(243,238,228,0.42);
  --kt-btn: rgba(191,174,134,0.14); --kt-btn-ink: #F3EEE4; --kt-btn-line: rgba(191,174,134,0.55); --kt-dot-ink: #14110D;
  --kt-scrim: rgba(8,7,5,0.58); --kt-x: rgba(243,238,228,0.08); --kt-x-line: rgba(243,238,228,0.22); --kt-x-ink: #F3EEE4; }
.kt[hidden] { display: none; }
.kt-scrim { position: absolute; inset: 0; background: var(--kt-scrim); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  opacity: 0; transition: opacity 480ms var(--kt-ease); }
.kt.is-on .kt-scrim { opacity: 1; }

.kt-dlg { position: relative; width: min(880px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; outline: none;
  border-radius: 30px; background: var(--kt-bg); color: var(--kt-ink); box-shadow: 0 60px 140px -40px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.18);
  opacity: 0; transform: translateY(28px) scale(.985); transition: opacity 520ms var(--kt-ease), transform 760ms var(--kt-ease); isolation: isolate; }
.kt.is-on .kt-dlg { opacity: 1; transform: none; }
.kt-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(191,174,134,0.5) transparent; }

.kt-x { position: absolute; z-index: 5; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--kt-x-line); background: var(--kt-x); color: var(--kt-x-ink); transition: transform 500ms var(--kt-ease), border-color 300ms, color 300ms; }
.kt-x:hover { transform: rotate(90deg); border-color: var(--kt-gold); color: var(--kt-gold); }
.kt-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.kt-head { text-align: center; padding: clamp(34px, 5vh, 48px) 64px 0; }
.kt-eye { display: inline-flex; align-items: center; gap: 12px; font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--kt-eye); }
.kt-eye::before, .kt-eye::after { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.kt-h { margin: 12px 0 0; font-weight: 400; font-size: clamp(30px, 4vw, 46px); line-height: 1.06; letter-spacing: -0.01em; }
.kt-h em { font-style: italic; color: var(--kt-em); }
.kt-sub { margin: 12px auto 0; max-width: 44ch; font-size: 14px; line-height: 1.7; color: var(--kt-mute); text-wrap: pretty; }

.kt-bildbox { display: block; margin: clamp(10px, 2vh, 18px) 0 0; aspect-ratio: 1200 / 461; }
.kt-bild { display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.kt-tisch { margin-top: -1px; padding: clamp(24px, 4vh, 36px) clamp(16px, 5vw, 56px) clamp(28px, 5vh, 48px); background: linear-gradient(180deg, #3B2A1D, #2A1E15 45%, #1E1610); }

.kt-form { display: grid; gap: 16px; }
.kt-card { max-width: 740px; margin: 0 auto; padding: clamp(20px, 3vw, 34px); border-radius: 22px; display: grid; gap: 16px;
  background: var(--kt-card); color: var(--kt-card-ink); border: 1px solid var(--kt-card-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 34px 70px -36px rgba(0,0,0,0.8); }
.kt-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kt-f-tel { grid-column: 1 / -1; }
.kt-f span em { font-style: italic; text-transform: none; letter-spacing: 0.02em; opacity: .75; }
.kt-f { display: grid; gap: 7px; min-width: 0; }
.kt-f > span, .kt-f > label > span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--kt-card-mute); }
.kt-in { width: 100%; min-width: 0; height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--kt-in-line); background: var(--kt-in); color: var(--kt-card-ink);
  font: inherit; font-size: 16px; outline: none; transition: border-color 400ms var(--kt-ease), box-shadow 400ms var(--kt-ease), background 400ms; }
textarea.kt-in { height: auto; min-height: 150px; padding: 14px 18px; line-height: 1.6; resize: vertical; }
.kt-in::placeholder { color: var(--kt-ph); }
@keyframes ktAutofill { from { /**/ } to { /**/ } }
.kt-in:-webkit-autofill { animation: ktAutofill 0.01s; }
.kt-in:focus { border-color: var(--kt-gold); box-shadow: 0 0 0 4px rgba(191,174,134,0.2); }
.kt-in[aria-invalid="true"] { border-color: #B4533F; }
.kt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.kt-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.kt-note { margin: 0; max-width: 42ch; font-size: 11.5px; line-height: 1.65; color: var(--kt-card-mute); }
.kt-note a { color: var(--kt-em); text-underline-offset: 3px; }
html[data-theme='light'] .kt-note a, .kt-note a { color: inherit; text-decoration-color: var(--kt-gold); }
.kt-btn { height: 52px; padding: 0 8px 0 24px; display: inline-flex; align-items: center; gap: 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--kt-btn-line); background: var(--kt-btn); color: var(--kt-btn-ink); font: inherit; font-size: 15px;
  transition: transform 500ms var(--kt-ease), background 400ms, box-shadow 500ms var(--kt-ease); }
.kt-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgba(191,174,134,0.7); }
html[data-theme='dark'] .kt-btn:hover { background: rgba(191,174,134,0.28); }
.kt-btn i { width: 36px; height: 36px; border-radius: 999px; background: var(--kt-dot); color: var(--kt-dot-ink); display: flex; align-items: center; justify-content: center; font-style: normal;
  transition: transform 700ms var(--kt-ease); }
.kt-btn:hover i { transform: rotate(45deg); }
.kt-btn[disabled] { opacity: .7; cursor: default; transform: none; }

.kt-done { display: none; }
.kt-card.is-done { padding: 18px; }
.kt-card.is-done .kt-form { display: none; }
.kt-card.is-done .kt-done { display: flex; justify-content: center; animation: ktIn 700ms var(--kt-ease); }
@keyframes ktIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Tablet */
@media (max-width: 1024px) {
  .kt-dlg { width: min(760px, 100%); }
}
/* Handy: Blatt von unten, volle Breite */
@media (max-width: 640px) {
  .kt { padding: 0; align-items: flex-end; }
  .kt-dlg { width: 100%; max-height: calc(100dvh - 18px); border-radius: 26px 26px 0 0; transform: translateY(40px); }
  .kt-dlg::before { content: ''; position: absolute; z-index: 6; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--kt-x-line); }
  .kt-x { top: 14px; right: 14px; width: 40px; height: 40px; }
  .kt-head { padding: 30px 56px 0; }
  .kt-h { font-size: 32px; }
  .kt-sub { font-size: 13px; }
  .kt-bildbox { aspect-ratio: 1200 / 670; width: 132%; margin: 6px 0 0 -16%; }
  .kt-tisch { padding: 20px 14px calc(22px + env(safe-area-inset-bottom)); }
  .kt-card { padding: 18px; border-radius: 18px; gap: 14px; }
  .kt-row { grid-template-columns: 1fr; gap: 12px; }
  textarea.kt-in { min-height: 130px; }
  .kt-foot { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .kt-btn { justify-content: space-between; width: 100%; }
  .kt-note { text-align: center; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .kt-scrim, .kt-dlg, .kt-btn, .kt-btn i { transition: none; } .kt-card.is-done .kt-done { animation: none; } }

/* Telefon: Vorwahl-Wähler + Nummer in einem Feld, Prüfung nach Nummernplan */
.kt-f-tel > label { display: block; }
.kt-tel { position: relative; display: flex; align-items: stretch; height: 52px; border-radius: 14px; border: 1px solid var(--kt-in-line); background: var(--kt-in);
  transition: border-color 400ms var(--kt-ease), box-shadow 400ms var(--kt-ease); }
.kt-tel:focus-within { border-color: var(--kt-gold); box-shadow: 0 0 0 4px rgba(191,174,134,0.2); }
.kt-tel.is-bad { border-color: #B4533F; box-shadow: 0 0 0 4px rgba(180,83,63,0.14); }
.kt-tel.is-ok { border-color: color-mix(in srgb, var(--kt-gold) 70%, transparent); }
.kt-cc { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px 0 14px; margin: 0; border: 0; border-right: 1px solid var(--kt-in-line);
  border-radius: 13px 0 0 13px; background: transparent; color: var(--kt-card-ink); font: inherit; font-size: 15px; cursor: pointer; transition: background 300ms; }
.kt-cc:hover, .kt-cc[aria-expanded="true"] { background: color-mix(in srgb, var(--kt-card-ink) 5%, transparent); }
.kt-cc b { font-weight: 400; font-size: 10.5px; letter-spacing: 0.14em; padding: 4px 7px; border-radius: 6px; color: var(--kt-em); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kt-gold) 55%, transparent); }
.kt-cc span { font-variant-numeric: tabular-nums; }
.kt-cc svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; transition: transform 400ms var(--kt-ease); }
.kt-cc[aria-expanded="true"] svg { transform: rotate(180deg); }
.kt-tel .kt-tel-in { flex: 1 1 auto; height: 100%; border: 0; border-radius: 0 13px 13px 0; background: transparent; box-shadow: none; padding-right: 46px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.kt-tel .kt-tel-in:focus { box-shadow: none; }
.kt-tel-ok { position: absolute; right: 12px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--kt-gold); color: #1A1714; opacity: 0; transform: scale(.6); transition: opacity 400ms var(--kt-ease), transform 500ms var(--kt-ease); pointer-events: none; }
.kt-tel-ok svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kt-tel.is-ok .kt-tel-ok { opacity: 1; transform: none; }
.kt-tel-hint { display: block; min-height: 1.5em; margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: var(--kt-card-mute); transition: color 300ms; }
.kt-tel.is-ok + .kt-tel-hint { color: var(--kt-em); }
.kt-tel.is-bad + .kt-tel-hint { color: #B4533F; }
html[data-theme='dark'] .kt-tel.is-bad + .kt-tel-hint { color: #E08B76; }

.kt-pop { position: absolute; z-index: 10; left: 0; top: calc(100% + 8px); width: min(380px, 100%); border-radius: 18px; overflow: hidden;
  background: #FBF8F2; color: #1A1714; border: 1px solid rgba(26,23,20,0.1); box-shadow: 0 30px 60px -24px rgba(20,17,13,0.45), inset 0 1px 0 rgba(255,255,255,0.9);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: 20% 0; transition: opacity 260ms var(--kt-ease), transform 420ms var(--kt-ease); }
html[data-theme='dark'] .kt-pop { background: #1C1812; color: #F3EEE4; border-color: rgba(243,238,228,0.14); box-shadow: 0 30px 60px -24px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.06); }
.kt-pop.is-on { opacity: 1; transform: none; }
.kt-pop-q { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.kt-pop-q svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; opacity: .55; }
.kt-pop-q input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; outline: none; }
.kt-pop-q input::placeholder { color: color-mix(in srgb, currentColor 45%, transparent); }
.kt-pop-list { list-style: none; margin: 0; padding: 6px; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(191,174,134,0.5) transparent; }
.kt-pop-list li[role="option"] { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; cursor: pointer;
  font-size: 14px; transition: background 250ms, box-shadow 250ms; }
.kt-pop-list li b { font-weight: 400; font-size: 10.5px; letter-spacing: 0.14em; opacity: .7; }
.kt-pop-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kt-pop-list li em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 13px; opacity: .6; }
.kt-pop-list li.is-akt, .kt-pop-list li[role="option"]:hover { background: color-mix(in srgb, currentColor 5%, transparent); box-shadow: inset 0 1px 2px rgba(0,0,0,0.16), inset 0 -1px 0 rgba(255,255,255,0.4); }
html[data-theme='dark'] .kt-pop-list li.is-akt, html[data-theme='dark'] .kt-pop-list li[role="option"]:hover { box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), inset 0 -1px 0 rgba(255,255,255,0.06); }
.kt-pop-list li[aria-selected="true"] { color: #665A38; }
html[data-theme='dark'] .kt-pop-list li[aria-selected="true"] { color: #BFAE86; }
.kt-pop-list li[aria-selected="true"] b, .kt-pop-list li[aria-selected="true"] em { opacity: 1; }
.kt-pop-sep { height: 1px; margin: 6px 10px; background: color-mix(in srgb, currentColor 12%, transparent); }
.kt-pop-leer { padding: 18px 12px; font-size: 13px; opacity: .6; text-align: center; }
@media (max-width: 640px) {
  .kt-pop { width: 100%; }
  .kt-cc { padding: 0 10px 0 12px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .kt-pop, .kt-tel-ok, .kt-cc svg { transition: none; } }

.kt-pop.is-oben { top: auto; bottom: calc(100% + 8px); transform-origin: 20% 100%; transform: translateY(6px) scale(.98); }
.kt-pop.is-oben.is-on { transform: none; }
/* Unter dem Formular bleibt Luft, damit die Länderliste immer Platz zum Aufklappen hat */
.kt-tisch { padding-bottom: max(clamp(28px, 5vh, 48px), 40px); }
