/* ═══════════════════════════════════════════════════════════════
   Auto Luxury — Portal: goldene Tür, Hero-Kacheln, Bank-, Anfahrt-
   und Kontakt-Dialoge, Live-Chat. Wird nach atelier.css geladen.
   ═══════════════════════════════════════════════════════════════ */

/* ---------- 1 · Hero: Aktionen über dem Logo ---------- */
.hero-side { position: relative; display: grid; justify-items: center; align-content: start; gap: 0.2rem; }
.hero-side .hero-logo-wrap { margin-top: 0.2rem; }
.hero-side .hero-logo { width: min(178px, 36%); height: auto; }
.hero-side .hero-logo-glow { width: 44%; }

.hx {
  --dw: clamp(184px, 15vw, 218px);          /* Breite des Türrahmens */
  --tw: clamp(112px, 9.4vw, 136px);         /* Breite der Kacheln */
  --open: 0;
  position: relative; z-index: 3;
  display: grid; grid-template-columns: var(--tw) auto var(--tw);
  align-items: center; gap: 18px;
  animation: hxIn 1.1s 0.15s var(--ease-out-expo) both;
}
@keyframes hxIn { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }
.hx-col { display: grid; gap: 16px; }

/* ---------- 2 · Kacheln ---------- */
.hx-tile {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 0.3rem;
  width: 100%; min-height: 138px; padding: 0.95rem 0.55rem 0.85rem;
  text-align: center; color: #f3ead6; font: inherit; cursor: pointer; overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(212, 164, 69, 0.4);
  background: linear-gradient(180deg, rgba(38, 33, 25, 0.86), rgba(15, 13, 11, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.08), 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 22px rgba(212, 164, 69, 0.1);
  backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease-out-expo), border-color 0.25s, box-shadow 0.3s;
}
.hx-tile:hover, .hx-tile:focus-visible, .hx-tile[aria-expanded="true"] {
  transform: translateY(-4px); border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.12), 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 32px rgba(212, 164, 69, 0.3);
}
.hx-tile:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.hx-tile { grid-template-columns: minmax(0, 1fr); }      /* lange Wörter brechen statt abgeschnitten zu werden */
.hx-tile b, .hx-tile small { max-width: 100%; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.hx-tile b { font-size: 0.9rem; font-weight: 750; line-height: 1.2; letter-spacing: 0.01em; }
.hx-tile small { font-size: 0.7rem; color: #b8ac91; line-height: 1.3; }
.hx-ico { display: grid; place-items: center; height: 56px; }
.hx-ico svg { width: 54px; height: 54px; overflow: visible; }
.hx-ico-wide svg { width: 100px; height: 54px; }

/* Lenkrad: dreht nach rechts und links */
.hx-wheel-rot { transform-box: view-box; transform-origin: 32px 32px; animation: hxSteer 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.hx-drive:hover .hx-wheel-rot, .hx-drive:focus-visible .hx-wheel-rot { animation-duration: 1.8s; }
@keyframes hxSteer {
  0%, 8% { transform: rotate(0deg); }
  28%, 38% { transform: rotate(68deg); }
  62%, 72% { transform: rotate(-64deg); }
  92%, 100% { transform: rotate(0deg); }
}

/* Bank: die wichtigste Kachel – goldgefüllt */
.hx-bank {
  color: #1d1407; border-color: rgba(255, 240, 200, 0.65);
  background: linear-gradient(150deg, #fdf0c4 0%, #e6bf68 38%, #c9973e 68%, #9c7128 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 26px rgba(212, 164, 69, 0.42);
  animation: hxBankGlow 3.4s ease-in-out infinite;
}
.hx-bank small { color: #46310c; font-weight: 650; }
.hx-bank:hover, .hx-bank:focus-visible { border-color: #fff4d0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 44px rgba(240, 201, 106, 0.6); }
.hx-bank::after {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
  transform: translateX(-70%); animation: hxSheen 4.8s ease-in-out infinite;
}
@keyframes hxSheen { 0%, 55% { transform: translateX(-70%); } 85%, 100% { transform: translateX(70%); } }
@keyframes hxBankGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.08); } }
/* Geschichten-Intros der großen Kacheln (einmal beim Laden, assets/js/mini.js):
   Probefahrt = Formel 1 · Bank = Euro fliegen von Bank zu Bank · Anfahrt = suchen & losfahren · Kontakt = Anruf bei Auto Luxury.
   Danach erscheint die Kachel wie gewohnt und bleibt so. */
.tl-intro {
  position: absolute; inset: 0; z-index: 2; display: block; pointer-events: none; border-radius: inherit;
  background: inherit; opacity: 0; visibility: hidden;
}
.tl-intro { overflow: hidden; }
.tl-intro svg { display: block; width: 100%; height: 100%; overflow: visible; }   /* Szene reicht über den Rahmen hinaus: füllt auch breite Kacheln (Handy/iPad) */
.hx-tile:not(.hx-bank) .tl-intro { background: #0d0b10; }
.hx-tile.is-intro .tl-intro { opacity: 1; visibility: visible; }
.hx-tile.is-outro .tl-intro { opacity: 0; visibility: visible; transform: scale(1.12); transition: opacity 0.55s ease, transform 0.7s var(--ease-out-expo); }
.hx-tile > .hx-ico, .hx-tile > b, .hx-tile > small { transition: opacity 0.5s 0.15s ease, transform 0.75s 0.15s var(--ease-out-expo); }
.hx-tile.is-intro > .hx-ico, .hx-tile.is-intro > b, .hx-tile.is-intro > small { opacity: 0; transform: scale(0.82) translateY(6px); transition: none; }
.hx-coin { transform-box: fill-box; transform-origin: center; animation: hxCoin 4.4s ease-in-out infinite; }
@keyframes hxCoin { 0%, 64% { transform: scaleX(1); } 72% { transform: scaleX(0.06); } 80% { transform: scaleX(1); } 88% { transform: scaleX(0.06); } 96%, 100% { transform: scaleX(1); } }

/* Anfahrt: Pin pulsiert */
.hx-pin-pulse, #rtPulse { transform-box: fill-box; transform-origin: center; animation: hxPulse 1.9s ease-out infinite; }
@keyframes hxPulse { from { transform: scale(0.55); opacity: 0.95; } to { transform: scale(2); opacity: 0; } }

/* Kontakt: Tipp-Punkte */
.hx-dot { transform-box: fill-box; transform-origin: center; animation: hxDot 1.3s ease-in-out infinite; }
.hx-dot:nth-of-type(2) { animation-delay: 0.18s; }
.hx-dot:nth-of-type(3) { animation-delay: 0.36s; }
@keyframes hxDot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- 2b · Kleine Kacheln mit Mini-Animationen (Rechner · Leistungen · Auto verkaufen) ---------- */
.hx-mini {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 2px;
  width: 0; min-width: 100%;                 /* nimmt die Breite der Tür-Konsole an, statt sie aufzublähen */
}
.hx-mtile {
  position: relative; display: grid; justify-items: center; align-content: start; gap: 0.1rem;
  padding: 0.42rem 0.42rem 0.55rem; border-radius: 14px; text-align: center; text-decoration: none; color: #f3ead6;
  border: 1px solid rgba(212, 164, 69, 0.34);
  background: linear-gradient(180deg, rgba(36, 31, 24, 0.84), rgba(14, 12, 10, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.07), 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: transform 0.4s var(--ease-out-expo), border-color 0.25s, box-shadow 0.3s;
}
.hx-mtile:hover, .hx-mtile:focus-visible {
  transform: translateY(-3px); border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.1), 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 26px rgba(212, 164, 69, 0.28);
}
.hx-mtile:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.hm-stage {
  display: block; width: 100%; aspect-ratio: 150 / 64; margin-bottom: 0.32rem; overflow: hidden;
  border-radius: 9px; border: 1px solid rgba(212, 164, 69, 0.2); background: #0b0a0d;
}
.hm-svg { display: block; width: 100%; height: 100%; }
.hx-mtile b { font-size: 0.78rem; font-weight: 750; line-height: 1.2; }
.hx-mtile small { font-size: 0.62rem; color: #b8ac91; line-height: 1.25; }
.hc-l1 { font-family: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; fill: #e9d9a6; }
.hc-op { fill: #ffd77a; font-weight: 700; }
.hc-vat { fill: #f3cf7a; }
.hc-l2 { font-family: Manrope, system-ui, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; }
.hc-k rect { fill: none; stroke: rgba(212, 164, 69, 0.28); stroke-width: 0.7; transition: fill 0.2s, stroke 0.2s; }
.hc-k text { fill: rgba(212, 164, 69, 0.5); transition: fill 0.2s; }
.hc-k.on rect { fill: #e8c167; stroke: #fff3c8; }
.hc-k.on text { fill: #1d1407; }
.hc-l2.is-done { filter: url(#hcGlow); }
.hk-text { font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; font-style: italic; font-weight: 600; }
[lang="ar"] .hk-text { font-family: Amiri, "Times New Roman", serif; font-style: normal; font-weight: 700; }

/* ---------- 3 · Die goldene Tür ---------- */
.hx-door {
  position: relative; display: grid; justify-items: center; text-decoration: none; color: inherit;
  padding: 26px 0 0; outline: none;
}
.door-stage { position: relative; display: grid; justify-items: center; transition: transform 0.8s cubic-bezier(0.6, 0, 0.2, 1), filter 0.8s; }
.door-aura {
  position: absolute; left: 50%; top: 46%; width: calc(var(--dw) * 2.4); height: calc(var(--dw) * 2.4);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 210, 120, 0.42), rgba(212, 164, 69, 0.14) 46%, transparent 72%);
  opacity: calc(0.38 + var(--open) * 0.62);
  animation: doorAura 4.2s ease-in-out infinite;
}
@keyframes doorAura { 0%, 100% { scale: 1; } 50% { scale: 1.07; } }

.door-frame {
  position: relative; display: block; width: var(--dw); padding: 8px;
  border-radius: calc(var(--dw) / 2) calc(var(--dw) / 2) 8px 8px;
  background: linear-gradient(135deg, #fff3c8 0%, #c9973e 20%, #7a5518 42%, #e8c56f 60%, #fff3c8 74%, #8a6420 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 240, 200, 0.45), inset 0 -3px 6px rgba(60, 40, 8, 0.6),
              0 0 24px rgba(212, 164, 69, 0.35), 0 0 calc(30px + var(--open) * 50px) rgba(255, 200, 100, calc(0.18 + var(--open) * 0.35)),
              0 30px 60px rgba(0, 0, 0, 0.6);
}
.door-frame::before {   /* gravierte Innenkante */
  content: ""; position: absolute; inset: 3px; border-radius: inherit; pointer-events: none;
  border: 1px solid rgba(95, 65, 15, 0.55);
}
.door-key {
  position: absolute; left: 50%; top: -9px; width: 30px; height: 24px; transform: translateX(-50%); z-index: 3;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
  background: linear-gradient(180deg, #fff3c8, #c9973e 55%, #6e4c14);
}
.door-key::after {
  content: ""; position: absolute; left: 50%; top: 5px; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg);
  background: radial-gradient(circle at 35% 35%, #fffbe8, #f3c95c 45%, #8a6420);
  box-shadow: 0 0 10px rgba(255, 220, 140, 0.95);
  animation: gemTwinkle 2.6s ease-in-out infinite;
}
@keyframes gemTwinkle { 0%, 100% { filter: brightness(0.9); } 50% { filter: brightness(1.35); } }
.door-crest { display: none; }

.door-portal {
  position: relative; display: block; width: 100%; aspect-ratio: 198 / 284; overflow: hidden;
  border-radius: calc(var(--dw) / 2 - 8px) calc(var(--dw) / 2 - 8px) 3px 3px;
  background: #050405; perspective: 680px; perspective-origin: 50% 46%;
  box-shadow: 0 0 0 2px #5f410f, 0 0 0 3px rgba(255, 240, 200, 0.45);
}
.door-hall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.door-glow {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 42% at 50% 44%, rgba(255, 214, 130, 0.38), transparent 72%);
  opacity: calc(var(--open) * 1.1);
}
.door-leaf {
  position: absolute; top: 0; height: 100%; width: 50%; overflow: hidden;
  will-change: transform; backface-visibility: hidden;
}
.door-l { left: 0; transform-origin: 0 50%; border-top-left-radius: 100% 34.86%; }
.door-r { right: 0; transform-origin: 100% 50%; border-top-right-radius: 100% 34.86%; }
.door-leaf svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.door-r svg { transform: scaleX(-1); }
.leaf-shade {
  position: absolute; inset: 0; pointer-events: none; opacity: var(--shade, 0);
  background: linear-gradient(90deg, rgba(10, 6, 2, 0.55), rgba(10, 6, 2, 0.85));
}
.door-r .leaf-shade { background: linear-gradient(270deg, rgba(10, 6, 2, 0.55), rgba(10, 6, 2, 0.85)); }
.leaf-sheen {
  position: absolute; inset: -10% -120%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 44%, rgba(255, 250, 225, 0.5) 50%, transparent 56%);
  animation: leafSheen 6.5s ease-in-out infinite;
}
.door-r .leaf-sheen { animation-delay: 0.35s; }
@keyframes leafSheen { 0%, 62% { transform: translateX(-46%); } 86%, 100% { transform: translateX(46%); } }
.door-seam {
  position: absolute; left: 50%; top: 2%; bottom: 0; width: 2px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 246, 208, 0), #fff6d0 18%, #ffd77a 60%, #fff6d0);
  box-shadow: 0 0 12px 3px rgba(255, 214, 120, 0.85), 0 0 34px 10px rgba(255, 190, 80, 0.4);
  opacity: clamp(0, calc(1 - var(--open) * 2.4), 1);
}
.door-step {
  display: block; width: calc(var(--dw) + 28px); height: 10px; margin-top: -1px; border-radius: 3px; position: relative; z-index: 1;
  background: linear-gradient(180deg, #f4d98d, #a87b2c 55%, #5f410f);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}
.door-floor {
  position: absolute; left: 50%; top: calc(100% - 4px); width: calc(var(--dw) * 1.9); height: 74px; pointer-events: none;
  transform: translateX(-50%) scaleX(calc(0.3 + var(--open) * 0.85)); transform-origin: 50% 0;
  background: radial-gradient(55% 100% at 50% 0%, rgba(255, 220, 140, 0.6), rgba(212, 164, 69, 0.16) 55%, transparent 75%);
  clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
  opacity: calc(0.22 + var(--open) * 0.78);
}
.door-sparks { position: absolute; inset: -6% -34% 10%; pointer-events: none; }
.door-sparks i {
  position: absolute; bottom: 8%; width: 4px; height: 4px; border-radius: 50%;
  background: #fff3c4; box-shadow: 0 0 8px 2px rgba(255, 210, 120, 0.85);
  opacity: 0; animation: dsRise 4.8s linear infinite;
}
.door-sparks i:nth-child(1)  { left: 6%;  animation-delay: 0s; }
.door-sparks i:nth-child(2)  { left: 16%; animation-delay: 1.9s; bottom: 30%; }
.door-sparks i:nth-child(3)  { left: 27%; animation-delay: 3.1s; }
.door-sparks i:nth-child(4)  { left: 38%; animation-delay: 0.8s; bottom: 50%; width: 3px; height: 3px; }
.door-sparks i:nth-child(5)  { left: 49%; animation-delay: 2.4s; }
.door-sparks i:nth-child(6)  { left: 58%; animation-delay: 4.1s; bottom: 42%; }
.door-sparks i:nth-child(7)  { left: 68%; animation-delay: 1.3s; }
.door-sparks i:nth-child(8)  { left: 78%; animation-delay: 3.6s; bottom: 24%; width: 3px; height: 3px; }
.door-sparks i:nth-child(9)  { left: 88%; animation-delay: 0.4s; }
.door-sparks i:nth-child(10) { left: 95%; animation-delay: 2.9s; bottom: 56%; }
@keyframes dsRise {
  0% { transform: translateY(0) scale(0.4); opacity: 0; }
  14% { opacity: 1; }
  100% { transform: translateY(-150px) scale(1.05); opacity: 0; }
}
.hx-door:hover .door-sparks i, .hx-door:focus-visible .door-sparks i { animation-duration: 3s; }

.door-plaque { display: grid; justify-items: center; gap: 0.15rem; margin-top: 1.05rem; text-align: center; position: relative; z-index: 2; }
.door-plaque b {
  font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; letter-spacing: 0.13em; text-transform: uppercase;
  background: linear-gradient(180deg, #fff3c8, #e1b65a 55%, #a87b2c); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
[dir="rtl"] .door-plaque b { letter-spacing: 0; font-size: 1.12rem; }
.door-plaque small { font-size: 0.76rem; color: #b9ad92; letter-spacing: 0.03em; }
.door-plaque::after {
  content: ""; display: block; height: 1px; width: 40%; margin-top: 0.35rem;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 0.5s var(--ease-out-expo);
}
.hx-door:hover .door-plaque::after, .hx-door:focus-visible .door-plaque::after { width: 92%; }
.hx-door:focus-visible .door-frame { outline: 2px solid var(--gold-2); outline-offset: 6px; }

/* Eintreten: Tür springt auf, Bild flutet in Gold */
.hx-door.is-entering .door-stage { transform: scale(1.22); filter: brightness(1.25); }
.door-flash {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgba(255, 240, 196, 1) 0%, rgba(232, 190, 100, 0.92) 22%, rgba(10, 8, 6, 0.98) 62%);
  clip-path: circle(0% at var(--fx, 50%) var(--fy, 50%));
  animation: doorFlash 0.72s cubic-bezier(0.6, 0, 0.3, 1) forwards;
}
@keyframes doorFlash { to { clip-path: circle(150% at var(--fx, 50%) var(--fy, 50%)); } }

/* ---------- 4 · Kontakt-Menü (gestaffelt) ---------- */
.hx-tile-wrap { position: relative; }
.cm-menu {
  position: absolute; z-index: 60; top: calc(100% + 10px); inset-inline-end: 0; width: 278px;
  padding: 0.7rem; border-radius: 18px; text-align: start;
  background: rgba(19, 16, 13, 0.97); border: 1px solid rgba(212, 164, 69, 0.42);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65), 0 0 34px rgba(212, 164, 69, 0.16);
  backdrop-filter: blur(10px);
}
.cm-menu.cm-up { top: auto; bottom: calc(100% + 10px); }
.cm-menu[hidden] { display: none; }
.cm-title { margin: 0.15rem 0.45rem 0.55rem; font-size: 0.76rem; color: #b8ac91; letter-spacing: 0.04em; }
.cm-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.55rem; border: 0; border-radius: 12px;
  background: none; color: #f3ead6; font: inherit; text-align: start; cursor: pointer; text-decoration: none;
  opacity: 0; transform: translateY(12px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.45s var(--ease-out-expo), background 0.2s;
}
.cm-menu.is-open .cm-item { opacity: 1; transform: none; transition-delay: calc(var(--i) * 90ms), calc(var(--i) * 90ms), 0s; }
.cm-item:hover, .cm-item:focus-visible { background: rgba(212, 164, 69, 0.13); outline: none; }
.cm-ico { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; }
.cm-wa .cm-ico { background: #25d366; color: #fff; }
.cm-tel .cm-ico { background: linear-gradient(135deg, #f0c96a, #d4a445 45%, #a87d24); color: #1a1405; }
.cm-mail .cm-ico { background: #2b5fad; color: #fff; }
.cm-form .cm-ico { background: #2a241a; color: var(--gold-2); border: 1px solid rgba(212, 164, 69, 0.5); }
.cm-chat .cm-ico { background: linear-gradient(135deg, #fbe7ae, #c9973e); color: #1d1407; }
.cm-txt { display: grid; min-width: 0; }
.cm-txt b { font-size: 0.92rem; font-weight: 700; }
.cm-txt small { font-size: 0.74rem; color: #b8ac91; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 5 · Header-Button Bankverbindung ---------- */
.hdr-bank {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 36px; padding: 0 0.85rem;
  border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-2); background: rgba(212, 164, 69, 0.1);
  font-size: 0.8rem; font-weight: 750; letter-spacing: 0.02em; white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.hdr-bank:hover, .hdr-bank:focus-visible { background: var(--gold); color: #170f02; box-shadow: 0 0 18px rgba(212, 164, 69, 0.45); }
[data-theme="light"] .hdr-bank { color: var(--gold-dark); }
[data-theme="light"] .hdr-bank:hover { color: #170f02; }
.main-nav .nav-bank-m { display: none; }
@media (max-width: 1360px) {
  .hdr-bank { width: 36px; padding: 0; }
  .hdr-bank span { display: none; }
}
@media (max-width: 599px) { .hdr-bank { display: none; } }

/* »Termin buchen« im Kopf: Innenabstand (wurde von ».main-nav a { padding: .3rem 0 }« überschrieben).
   Damit alles in eine Zeile passt, rücken die Menüpunkte minimal enger zusammen; das Logo wird nie gequetscht. */
.brand { flex-shrink: 0; }
@media (min-width: 1281px) {
  .main-nav { gap: 1.1rem; }
  .main-nav .nav-cta { padding: 0.3rem 0.75rem; }
}

/* Burger-Menü schon bis 1199 px – darunter passt die volle Navigation (7 Punkte + Termin + Bank + Sprachen) nicht in eine Zeile */
@media (max-width: 1199px) {
  .header-actions { margin-inline-start: auto; }
  .main-nav .nav-bank-m { display: block; }
}
@media (min-width: 841px) and (max-width: 1199px) {
  .main-nav {
    position: fixed; top: var(--header-h); inset-inline: 0; bottom: 0; margin: 0; background: var(--bg);
    flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 2rem 8%; gap: 1.2rem;
    transform: translateY(-110%); opacity: 0; visibility: hidden; pointer-events: none; overflow-y: auto;
    transition: transform 380ms var(--ease-drawer), opacity 0.3s, visibility 0s 0.38s; z-index: 55;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform 380ms var(--ease-drawer), opacity 0.3s; }
  .main-nav a, .main-nav a.nav-home { display: block; font-size: 1.25rem; }
  .main-nav .nav-cta { display: inline-flex; }
  .nav-burger { display: block; }
  .brand-name { font-size: 1.15rem; }
}

/* ---------- 6 · Dialoge ---------- */
.al-dlg {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: calc(100vw - 24px); max-width: 560px; max-height: calc(100dvh - 24px); overflow: visible;
}
.al-dlg-wide { max-width: 820px; }
.al-dlg::backdrop { background: rgba(6, 5, 8, 0.74); backdrop-filter: blur(4px); }
html.atl-cursor .al-dlg::backdrop { cursor: none; }
/* Animation nur am Inhalt: der Dialog selbst bleibt ohne transform – sonst säße der Zauberstab-Cursor falsch */
.al-dlg[open] > .al-dlg-in { animation: dlgIn 0.5s var(--ease-out-expo); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.al-dlg-in {
  position: relative; max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
  padding: 1.5rem 1.5rem 1.4rem; border-radius: 22px;
  background: linear-gradient(180deg, #1f1d26, #141319); border: 1px solid rgba(212, 164, 69, 0.42);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.65), 0 0 44px rgba(212, 164, 69, 0.16);
}
[data-theme="light"] .al-dlg-in { background: #fffdf8; border-color: rgba(138, 106, 31, 0.4); }
.al-dlg h2 { margin: 0 2.6rem 0.35rem 0; font-size: 1.45rem; }
[dir="rtl"] .al-dlg h2 { margin: 0 0 0.35rem 2.6rem; }
.al-dlg-sub { margin: 0 0 1.1rem; color: var(--ink-2); font-size: 0.92rem; }
.al-dlg-x {
  position: absolute; top: 0.8rem; inset-inline-end: 0.8rem; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); font-size: 1.45rem; line-height: 1; cursor: pointer;
}
.al-dlg-x:hover { background: rgba(212, 164, 69, 0.15); }

/* ---------- 7 · Bankkarte ---------- */
.bk-card {
  position: relative; padding: 1.05rem; border-radius: 18px; color: #f3ead6; text-align: start;
  background: radial-gradient(120% 140% at 0% 0%, rgba(212, 164, 69, 0.22), transparent 55%), linear-gradient(160deg, #27221a, #121014);
  border: 1px solid rgba(212, 164, 69, 0.48); box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.12), 0 14px 34px rgba(0, 0, 0, 0.35);
}
.bk-card-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0.15rem 0.7rem; }
.bk-chip { width: 40px; height: 29px; border-radius: 6px; position: relative; background: linear-gradient(135deg, #fbe7ae, #b98a35); box-shadow: inset 0 0 0 1px rgba(95, 65, 15, 0.5); }
.bk-chip::before { content: ""; position: absolute; inset: 7px 10px; border: 1px solid rgba(95, 65, 15, 0.55); border-radius: 3px; }
.bk-card-top img { width: 42px; height: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)); }
.bk-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.bk-row {
  width: 100%; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lbl act" "val act";
  align-items: center; gap: 0.1rem 0.8rem; padding: 0.68rem 0.85rem; border-radius: 12px; text-align: start;
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.09); color: inherit; font: inherit; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.bk-row:hover, .bk-row:focus-visible { border-color: rgba(212, 164, 69, 0.65); background: rgba(212, 164, 69, 0.09); outline: none; }
.bk-row small { grid-area: lbl; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #b8ac91; }
[dir="rtl"] .bk-row small { letter-spacing: 0; }
.bk-row b { grid-area: val; font-size: 1.02rem; font-weight: 650; word-break: break-word; }
.bk-row b.bk-mono { font-size: 1.08rem; letter-spacing: 0.045em; font-variant-numeric: tabular-nums; }
[dir="rtl"] .bk-row b { text-align: end; }
.bk-act { grid-area: act; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--gold-2); font-size: 0.76rem; font-weight: 750; }
.bk-i-done, .bk-lbl-done, .bk-all-done { display: none; }
.bk-row.is-copied { border-color: #3fbf7f; background: rgba(63, 191, 127, 0.11); }
.bk-row.is-copied .bk-i-copy, .bk-row.is-copied .bk-lbl { display: none; }
.bk-row.is-copied .bk-i-done, .bk-row.is-copied .bk-lbl-done { display: inline; color: #62d79c; }
.is-copied .bk-all-lbl { display: none; }
.is-copied .bk-all-done { display: inline; }
.bk-ref { margin: 0.75rem 0.2rem 0.7rem; font-size: 0.84rem; color: #d3c8b0; }
.bk-ref small { color: #b8ac91; font-size: inherit; }
.bk-all { width: 100%; justify-content: center; }
.bk-safety {
  display: flex; gap: 0.55rem; align-items: flex-start; margin: 0.85rem 0 0; padding: 0.68rem 0.8rem; border-radius: 12px;
  background: rgba(224, 83, 60, 0.09); border: 1px solid rgba(224, 83, 60, 0.3); font-size: 0.78rem; line-height: 1.45; color: #ead2c8;
}
.bk-safety svg { flex: 0 0 auto; color: #f0a28f; margin-top: 1px; }
.bk-safety a { color: var(--gold-2); white-space: nowrap; }
.bk-page-card { max-width: 560px; margin: 0 auto; }
.bk-band-card { max-width: 620px; margin-top: 1.1rem; }

/* ---------- 8 · Anfahrt-Dialog ---------- */
.rt-map { margin: 0.7rem 0 1rem; border-radius: 16px; overflow: hidden; border: 1px solid rgba(212, 164, 69, 0.32); background: #0c0a0f; }
.rt-svg { display: block; width: 100%; height: auto; }
[dir="rtl"] .rt-svg text { direction: ltr; }
.rt-info { display: grid; gap: 0.55rem; }
.rt-addr { display: grid; gap: 0.15rem; }
.rt-addr small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.rt-addr b { font-size: 1.12rem; }
.rt-today { font-size: 0.86rem; color: var(--ink-2); }
.rt-today em { font-style: normal; font-weight: 750; font-size: 0.74rem; margin-inline-start: 0.45rem; padding: 0.12rem 0.55rem; border-radius: 999px; }
.rt-today .is-open { background: rgba(63, 191, 127, 0.15); color: #4fc98b; }
.rt-today .is-closed { background: rgba(224, 83, 60, 0.14); color: #ec8d78; }
.rt-dir, .rt-park { margin: 0; color: var(--ink-2); font-size: 0.9rem; line-height: 1.55; }
.rt-btns { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.3rem; }

/* ---------- 8b · Termin-Dialog (Probefahrt / Besichtigung) ---------- */
.al-dlg-book { max-width: 700px; }
.al-dlg-book .type-grid { grid-template-columns: repeat(2, 1fr); }
.al-dlg-book .type-option label { flex-direction: row; justify-content: center; padding: 0.75rem 0.5rem; }
.al-dlg-book .dp-pop { position: static; margin-top: 0.6rem; box-shadow: none; }
.al-dlg-book .form-grid { margin-top: 0.9rem; }
.al-dlg-book .alert { margin: 0 0 1rem; }
.al-dlg-book .success-panel { padding: 1.4rem 0 0.4rem; }
.al-dlg-book .bkd-msg { color: var(--ink-2); margin: 0.4rem 0 1.4rem; line-height: 1.6; }
.al-dlg-book .success-panel h2 { margin: 0; outline: none; }
#bookingForm.is-busy button[type="submit"] { opacity: 0.65; cursor: progress; }

/* ---------- 8c · Fenster mit ganzer Seite (Rechner · Leistungen · Kaufvertrag) ---------- */
.al-dlg-page { max-width: 1120px; }
.al-dlg-page .al-dlg-in { display: flex; flex-direction: column; height: calc(100dvh - 24px); max-height: none; padding: 0; overflow: hidden; }
.dlp-bar {
  display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; padding: 0.5rem 0.6rem 0.5rem 1.15rem;
  border-bottom: 1px solid rgba(212, 164, 69, 0.3); background: linear-gradient(180deg, rgba(212, 164, 69, 0.13), rgba(212, 164, 69, 0.03));
}
[dir="rtl"] .dlp-bar { padding: 0.5rem 1.15rem 0.5rem 0.6rem; }
.dlp-bar b {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2);
}
[dir="rtl"] .dlp-bar b { letter-spacing: 0; }
.dlp-open {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.75rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--ink-2); font-size: 0.76rem; font-weight: 650; text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.dlp-open:hover, .dlp-open:focus-visible { color: var(--gold-2); border-color: var(--gold); }
[dir="rtl"] .dlp-open svg { transform: scaleX(-1); }
.dlp-bar .al-dlg-x { position: static; flex: 0 0 auto; background: rgba(212, 164, 69, 0.14); border-color: rgba(212, 164, 69, 0.5); }
.dlp-body { position: relative; flex: 1; min-height: 0; background: var(--bg); }
.dlp-frame { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.35s; }
.al-dlg-page.is-loaded .dlp-frame { opacity: 1; }
.dlp-load { position: absolute; inset: 0; display: grid; place-items: center; }
.dlp-load i { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(212, 164, 69, 0.2); border-top-color: var(--gold); animation: dlpSpin 0.9s linear infinite; }
.al-dlg-page.is-loaded .dlp-load { display: none; }
@keyframes dlpSpin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .al-dlg-page { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .al-dlg-page .al-dlg-in { height: calc(100dvh - 16px); border-radius: 16px; }
  .dlp-open span { display: none; }
  .dlp-open { padding: 0.45rem; }
}
/* Seite im Fenster (?embed=1): kein fester Kopf, weniger Abstand oben */
html.is-embed { --header-h: 0px; }
html.is-embed .page-main > .section:first-child { padding-top: 1.5rem !important; }
html.is-embed .atl-progress { display: none; }
/* Rechner im Fenster: genug Platz unten, damit die Reiter mit dem MwSt-Rechner ganz nach oben rücken können */
html.is-embed main:has(.calc-tabs)::after { content: ""; display: block; height: 62vh; }

/* ---------- 9 · Live-Chat ---------- */
.fab-chat { position: relative; color: #1d1407; background: linear-gradient(135deg, #fbe7ae, #c9973e 55%, #8a6420); border: 0; cursor: pointer; }
.fab-badge {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; background: #e0533c; color: #fff; font-size: 0.72rem; font-weight: 800;
  box-shadow: 0 0 0 2px #0c0c10; animation: badgePop 0.5s var(--ease-out-expo);
}
.fab-badge[hidden] { display: none; }
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }
.chat-panel {
  position: fixed; z-index: 120; bottom: 18px; inset-inline-end: 84px;
  width: min(384px, calc(100vw - 24px)); height: min(570px, calc(100dvh - 36px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; color: #f1eadb;
  background: #16151b; border: 1px solid rgba(212, 164, 69, 0.45);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 38px rgba(212, 164, 69, 0.18);
  transform-origin: 100% 100%; animation: chatIn 0.42s var(--ease-out-expo);
}
[dir="rtl"] .chat-panel { transform-origin: 0 100%; }
.chat-panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 0.95rem; border-bottom: 1px solid rgba(212, 164, 69, 0.25); background: linear-gradient(135deg, rgba(212, 164, 69, 0.22), rgba(212, 164, 69, 0.04)); }
.chat-ava { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #0c0b0f; border: 1px solid rgba(212, 164, 69, 0.55); }
.chat-ava img { width: 30px; height: auto; }
.chat-who { flex: 1; display: grid; min-width: 0; }
.chat-who b { font-size: 0.93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { display: flex; align-items: center; gap: 0.35rem; font-size: 0.7rem; color: #b8ac91; line-height: 1.3; }
.chat-status i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #c9973e; }
.chat-status.is-open i { background: #3fbf7f; box-shadow: 0 0 0 3px rgba(63, 191, 127, 0.22); }
.chat-x { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.chat-x:hover { background: rgba(212, 164, 69, 0.15); }
.chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.55rem; }
.msg { max-width: 84%; display: grid; gap: 0.15rem; animation: msgIn 0.35s var(--ease-out-expo); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg p { margin: 0; padding: 0.58rem 0.8rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg-admin { align-self: flex-start; }
.msg-admin p { background: #25232c; border: 1px solid rgba(212, 164, 69, 0.24); border-end-start-radius: 4px; }
.msg-visitor { align-self: flex-end; }
.msg-visitor p { background: linear-gradient(135deg, #f3d27f, #c9973e); color: #1d1407; border-end-end-radius: 4px; }
.msg time { font-size: 0.66rem; color: #8f8571; padding: 0 0.3rem; }
.msg-visitor time { text-align: end; }
.msg.is-pending p { opacity: 0.6; }
.msg.is-failed p { outline: 1px solid #e0533c; }
.chat-sys { align-self: center; max-width: 92%; padding: 0.35rem 0.7rem; border-radius: 10px; font-size: 0.75rem; text-align: center; color: #f0b3a3; background: rgba(224, 83, 60, 0.1); }
.chat-form { position: relative; display: grid; gap: 0.5rem; padding: 0.7rem 0.8rem 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.08); background: #121117; }
.chat-id { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.chat-id[hidden] { display: none; }
.chat-id input, .chat-row textarea {
  width: 100%; min-width: 0; padding: 0.55rem 0.7rem; border-radius: 10px; font: inherit; font-size: 0.85rem;
  background: #1e1d24; border: 1px solid rgba(255, 255, 255, 0.11); color: #f1eadb;
}
.chat-id input:focus, .chat-row textarea:focus { outline: none; border-color: var(--gold); }
.chat-row { display: flex; gap: 0.5rem; align-items: flex-end; }
.chat-row textarea { resize: none; min-height: 42px; max-height: 120px; line-height: 1.4; }
.chat-send { width: 46px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 12px; cursor: pointer; color: #1d1407; background: linear-gradient(135deg, #fbe7ae, #c9973e); }
.chat-send:disabled { opacity: 0.5; cursor: default; }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }
.chat-note { margin: 0; font-size: 0.66rem; color: #8f8571; }
.chat-note a { color: var(--gold-2); }
.chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 10 · Responsiv ---------- */
@media (max-width: 1060px) {
  .hero-side { order: -1; margin-bottom: 0.6rem; }      /* Aktionen ganz oben */
  .hero-side .hero-logo-wrap { display: none; }
  .door-crest { display: block; position: absolute; left: 50%; top: -62px; width: 78px; height: auto; transform: translateX(-50%); z-index: 4; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6)); }
  .hx-door { padding-top: 64px; }
}
@media (max-width: 640px) {
  .hx {
    --dw: min(196px, 54vw);
    grid-template-columns: 1fr 1fr; grid-template-areas: "door door"; gap: 10px; width: 100%;
  }
  .hx-door { grid-area: door; margin-bottom: 0.4rem; }
  .hx-col { display: contents; }
  .hx-tile {
    grid-template-columns: auto 1fr; grid-template-rows: auto auto; justify-items: start; align-items: center;
    text-align: start; min-height: 72px; padding: 0.6rem 0.65rem; column-gap: 0.55rem; row-gap: 0.05rem;
  }
  .hx-tile .hx-ico { grid-row: 1 / span 2; height: 44px; }
  .hx-ico svg { width: 42px; height: 42px; }
  .hx-ico-wide svg { width: 58px; height: 34px; }
  .hx-tile b { font-size: 0.82rem; }
  .hx-tile small { font-size: 0.66rem; }
  .hx-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 0; }   /* Handy: 2 × 2 große Kacheln */
  .hx-mtile { padding: 0.36rem 0.36rem 0.5rem; border-radius: 12px; }
  .hm-stage { border-radius: 8px; margin-bottom: 0.25rem; }
  .hx-mtile b { font-size: 0.8rem; }
  .hx-mtile small { font-size: 0.66rem; }
  .cm-menu { width: min(278px, calc(100vw - 32px)); }
  .chat-panel { inset: auto 0 0 0; width: 100%; height: min(86dvh, 640px); border-radius: 20px 20px 0 0; }
  .chat-id { grid-template-columns: 1fr; }
  .al-dlg-in { padding: 1.25rem 1rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-wheel-rot { animation: none; transform: rotate(24deg); }
  .door-sparks { display: none; }
}
@media print { .hx, .chat-panel, .al-dlg, .hdr-bank { display: none !important; } }

/* Lange Wörter in Überschriften (z. B. »Datenschutzerklärung«) auf dem Handy umbrechen statt die Seite zu verbreitern */
main h1, main h2 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }

/* Sprungziele nicht unter dem festen Kopf verstecken (z. B. /rechner#mwst, /kontakt#anfahrt) */
.calc-tabs, .calc-panels .cc, #kontaktformular, #anfahrt, #bank { scroll-margin-top: calc(var(--header-h, 72px) + 14px); }

/* Dialog offen: Seite dahinter nicht scrollen */
html.dlg-lock { overflow: hidden; scrollbar-gutter: stable; }
/* Ankunft am Ziel: Pin hüpft */
#rtPin { transform-box: fill-box; transform-origin: 50% 100%; }
#rtPin.arrived { animation: pinBounce 0.7s var(--ease-out-expo); }
@keyframes pinBounce { 0% { transform: translateY(0); } 35% { transform: translateY(-12px) scale(1.06); } 100% { transform: translateY(0); } }

/* Schwebende Buttons weichen, solange die Hero-Aktionen im Bild sind (gleiche Funktionen) */
.floating-actions .fab { transition: opacity 0.35s ease, transform 0.5s var(--ease-out-expo); }
.floating-actions.fab-away .fab:not(.has-unread) { opacity: 0; transform: translateX(130%); pointer-events: none; }
[dir="rtl"] .floating-actions.fab-away .fab:not(.has-unread) { transform: translateX(-130%); }

/* Monatsfelder (Erstzulassung, HU) sehen aus wie die übrigen Eingabefelder – auch im Fenster „Was ist mein Auto wert?“ */
.bw-card input[type=month], .kv-form input[type=month] {
  background: var(--bg); border: 1.5px solid var(--line); color: var(--ink); border-radius: var(--radius-sm);
  padding: .68rem .85rem; font: inherit; font-size: .93rem; width: 100%; min-height: 2.9rem; transition: border-color .2s;
}
html:not([data-theme="light"]) .bw-card input[type=month], html:not([data-theme="light"]) .kv-form input[type=month],
html:not([data-theme="light"]) .kv-form input[type=date] { color-scheme: dark; }
/* Erfolgsmeldung der Bewertung: Titel und Text mittig */
.calc-card .success-panel h2 { justify-content: center; }
.calc-card .success-panel p { margin-inline: auto; max-width: 62ch; }
