/* ==========================================================================
   Stamply v2 – Design-Layer für /postcard
   Liegt über styles.css. Alle Regeln sind mit "html body.sx" gescoped, damit
   sie die !important-Regeln der Altdatei sicher schlagen. Kartenmaße setzt
   script.js als var(--sx-card-*) – hier wird nur der Wert definiert.
   ========================================================================== */

html.sx-root { background: #f2efe8 !important; }
html.sx-root.sx-dark { background: #121110 !important; }

/* Farben & Regeln: siehe DESIGN.md (Papier, Tinte, Stempelblau – keine Verläufe/Glows) */
html body.sx {
    --sx-paper: #f2efe8;
    --sx-card: #fffefa;
    --sx-ink: #161616;
    --sx-ink-soft: #3a3833;
    --sx-muted: #6e6a62;
    --sx-line: rgba(22, 22, 22, .12);
    --sx-line-strong: rgba(22, 22, 22, .22);
    --sx-chip: #f0ebe1;
    --sx-accent: #27406b;
    --sx-ok: #2f6b45;
    --sx-shadow: 0 1px 0 rgba(22, 22, 22, .06), 0 2px 6px -2px rgba(22, 22, 22, .1);
    --sx-ease: cubic-bezier(.2, .8, .2, 1);

    /* Kartenmaße (von script.js als Inline-var() gelesen) */
    --sx-card-mw: calc(100vw - 20px);
    --sx-card-top: 78px;
    --sx-card-pt: 26px;
    --sx-card-pb: 26px;
    --sx-card-ox: visible;

    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
    color: var(--sx-ink) !important;
    background: var(--sx-paper) !important;
    -webkit-font-smoothing: antialiased;
}
html body.sx.dark {
    --sx-paper: #121110;
    --sx-card: #1c1b19;
    --sx-ink: #f4efe6;
    --sx-ink-soft: #d9d3c7;
    --sx-muted: #9c968a;
    --sx-line: rgba(244, 239, 230, .1);
    --sx-line-strong: rgba(244, 239, 230, .22);
    --sx-chip: #262421;
    --sx-shadow: 0 1px 0 rgba(0, 0, 0, .4);
    --sx-accent: #9fb4dc;
    background: var(--sx-paper) !important;
    color: var(--sx-ink) !important;
}

@media (min-width: 769px) {
    html body.sx {
        --sx-card-w: 600px;
        --sx-card-minw: 0px;
        --sx-card-top: 104px;
        --sx-card-pt: 34px;
        --sx-card-pb: 34px;
    }
    html body.sx #step1.card { --sx-card-w: min(1100px, calc(100vw - 72px)); }
}

html body.sx .background-wave { display: none !important; }

html body.sx button,
html body.sx .btn-primary,
html body.sx .btn-secondary,
html body.sx .address-line-input,
html body.sx .country-select-display { font-family: 'Poppins', system-ui, sans-serif !important; }

/* ---------------------------------------------------------------- Header */
html body.sx #mainHeader {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    padding: 0 14px !important;
    background: var(--sx-paper) !important;
    border-bottom: 1px solid var(--sx-line);
    box-sizing: border-box;
}
html body.sx #mainHeader #logo,
html body.sx #mainHeader #logo-dark {
    position: static !important;
    order: 0;
    height: 44px !important;
    width: auto !important;
    margin: 0 !important;
    flex: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .12));
}
html body.sx #mainHeader #logo.hidden,
html body.sx #mainHeader #logo-dark.hidden { display: none !important; }
html body.sx #mainHeader #langToggle,
html body.sx #mainHeader #themeToggle {
    position: static !important;
    width: 38px !important;
    height: 38px !important;
    flex: none;
    border: 1px solid var(--sx-line-strong) !important;
    border-radius: 8px !important;
    background: var(--sx-card) !important;
    color: var(--sx-ink) !important;
    box-shadow: none !important;
    font: 700 .78rem/1 'Poppins', sans-serif !important;
}
html body.sx #mainHeader #langToggle { order: 2; }
html body.sx #mainHeader #themeToggle { order: 3; }
html body.sx #mainHeader #themeToggle svg { width: 18px; height: 18px; }

/* Fortschritt als Postroute: Stationen mit gestrichelter Strecke, keine Nummernkreise */
.sx-progress { order: 1; flex: 1; display: flex; justify-content: center; min-width: 0; }
.sx-progress[hidden] { visibility: hidden; display: flex; }
.sx-progress ol { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; }
.sx-progress li { display: flex; align-items: center; gap: 10px; color: var(--sx-muted); font-size: .8rem; }
.sx-progress li + li::before { content: ""; width: 26px; border-top: 1.5px dashed var(--sx-line-strong); }
.sx-progress li.is-done { color: var(--sx-ink); }
.sx-progress li.is-done + li::before { border-top-style: solid; border-color: var(--sx-ink); }
.sx-progress li.is-active { color: var(--sx-ink); font-weight: 700; }
.sx-progress li.is-active .sx-lbl { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.sx-progress .sx-dot { display: none; }
.sx-progress-cap { display: none; }
/* Handy: vier Balken + Klartext „Schritt 2 von 4 · Bild" – auf einen Blick lesbar */
@media (max-width: 768px) {
    .sx-progress { flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
    .sx-progress-cap { display: block; font-size: .74rem; color: var(--sx-ink); font-weight: 700; white-space: nowrap; }
    .sx-progress ol { gap: 4px; }
    .sx-progress li { width: 22px; height: 4px; border-radius: 2px; background: var(--sx-line-strong); gap: 0; }
    .sx-progress li::before, .sx-progress li + li::before { display: none; }
    .sx-progress li.is-done, .sx-progress li.is-active { background: var(--sx-ink); }
    .sx-progress .sx-lbl { display: none; }
}
@media (min-width: 769px) {
    html body.sx #mainHeader { height: 72px !important; padding: 0 28px !important; }
    html body.sx #mainHeader #logo, html body.sx #mainHeader #logo-dark { height: 50px !important; }
}

/* ---------------------------------------------------------------- Karten */
/* Abstände mit ID-Selektoren, sonst gewinnen die #stepN.card-Altregeln */
html body.sx #step1.card,
html body.sx #step2.card,
html body.sx #step3.card,
html body.sx #step4.card {
    margin-top: var(--sx-card-top) !important;
    margin-bottom: 18px !important;
    padding-top: var(--sx-card-pt) !important;
    padding-bottom: var(--sx-card-pb) !important;
    min-height: 0 !important;
}
html body.sx .card {
    background: var(--sx-card) !important;
    color: var(--sx-ink) !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--sx-shadow) !important;
    margin-top: var(--sx-card-top) !important;
    margin-bottom: 18px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-top: var(--sx-card-pt) !important;
    padding-bottom: var(--sx-card-pb) !important;
    min-height: 0 !important;
    text-align: center;
}
@media (min-width: 769px) {
    html body.sx .card { padding-left: 36px !important; padding-right: 36px !important; }
}
html body.sx .card h2 {
    font-size: 1.55rem !important;
    line-height: 1.15 !important;
    letter-spacing: -.025em;
    font-weight: 700 !important;
    color: var(--sx-ink) !important;
    margin-bottom: .5rem !important;
}
html body.sx .card p.text-sm,
html body.sx #step3Tip,
html body.sx #step4_hint { color: var(--sx-muted) !important; font-size: .85rem !important; margin-bottom: 1.1rem !important; }

/* Eingangs-Animation pro Schritt (translate/scale/filter, da script.js
   transform+opacity inline mit !important fixiert) */
@keyframes sxEnter {
    from { translate: 0 10px; }
    to   { translate: 0 0; }
}
html body.sx .card.sx-enter { animation: sxEnter .3s var(--sx-ease) both; }

/* ---------------------------------------------------------------- Buttons */
html body.sx .btn-primary,
html body.sx .btn-secondary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 52px !important;
    padding: 0 1.4rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    line-height: 1.15 !important;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease !important;
    -webkit-tap-highlight-color: transparent;
}
/* Hauptbutton: Tinte mit hartem Versatz-Schatten wie ein Gummistempel-Abdruck */
html body.sx .btn-primary {
    background: var(--sx-ink) !important;
    color: var(--sx-paper) !important;
    border: 0 !important;
    box-shadow: 3px 3px 0 var(--sx-accent) !important;
}
html body.sx .btn-primary:hover { transform: translate(-1px, -1px) !important; box-shadow: 4px 4px 0 var(--sx-accent) !important; }
html body.sx .btn-primary:active { transform: translate(2px, 2px) !important; box-shadow: 1px 1px 0 var(--sx-accent) !important; }
html body.sx .btn-primary:disabled { opacity: .7; cursor: progress; transform: none !important; }
html body.sx .btn-secondary {
    background: transparent !important;
    color: var(--sx-ink) !important;
    border: 1.5px solid var(--sx-line-strong) !important;
    box-shadow: none !important;
}
html body.sx .btn-secondary:hover { border-color: var(--sx-ink) !important; transform: none !important; background: rgba(21, 21, 21, .03) !important; }

/* Navigationszeile: Zurück schmal, Weiter breit */
html body.sx .card .justify-between { gap: 10px !important; margin-top: 1rem; }
html body.sx .card .justify-between > .btn-secondary { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; padding: 0 1.15rem !important; }
html body.sx .card .justify-between > .btn-primary { flex: 1 1 auto !important; width: auto !important; }
html body.sx .card .justify-between > .btn-secondary::before { content: "‹"; font-size: 1.35em; line-height: 0; margin-right: .1rem; transform: translateY(-1px); }

/* ================================================================ STEP 1 – Hero */
html body.sx #step1.card { text-align: left; overflow: visible !important; }
.sx-hero-grid { display: grid; gap: 22px; align-items: center; }
.sx-hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
/* Headline mit „aufgeklebter" echter Stamply-Briefmarke statt farbiger Markierung */
.sx-h1wrap { position: relative; padding-right: 64px; }
html body.sx #step1_h1 {
    font-size: clamp(2.15rem, 7.4vw, 3.9rem) !important;
    line-height: 1.06 !important;
    letter-spacing: -.02em;
    font-weight: 700 !important;
    margin: 0 0 .7rem !important;
    color: var(--sx-ink) !important;
    text-align: left !important;
    text-wrap: balance;
}
.sx-h1stamp {
    position: absolute; right: 0; top: -6px; width: 66px; height: auto;
    transform: rotate(9deg); filter: drop-shadow(1px 2px 0 rgba(22, 22, 22, .18));
}
/* Geschriebene Headline (sx-write.js); echte H1 bleibt für Screenreader/Sprachwechsel */
html body.sx #step1_h1.sx-sr {
    position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
    clip: rect(0 0 0 0) !important; margin: 0 !important; padding: 0 !important; white-space: nowrap !important;
}
.sx-write { position: relative; width: min(84%, 420px); margin: 0 0 .4rem; }
.sx-write-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sx-write-pen {
    position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; z-index: 3;
    transition: opacity .25s ease; filter: drop-shadow(1px 3px 1px rgba(0, 0, 0, .2)); will-change: transform;
}
.sx-h1wrap { padding-right: 0 !important; width: 100%; align-self: stretch; }
/* Briefmarke klebt rechts neben der kürzeren zweiten Zeile („’ne Karte.") */
.sx-h1stamp { left: calc(min(100%, 520px) * .66); right: auto !important; top: 46% !important; width: 64px !important; }
.sx-h1stamp.is-waiting { opacity: 0; }
.sx-h1stamp.is-stamped { animation: sxStampOn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes sxStampOn {
    from { opacity: 0; transform: rotate(-8deg) scale(1.9); }
    to   { opacity: 1; transform: rotate(9deg) scale(1); }
}
.sx-h1wrap.is-thud { animation: sxThud .35s ease; }
@keyframes sxThud { 30% { translate: 0 2px; } 60% { translate: 0 -1px; } }

/* Fakten wie auf einem Postschein: Feldname links, Wert rechts */
.sx-facts { margin: 1.3rem 0 0; padding: 0; width: 100%; max-width: 420px; border-top: 1px solid var(--sx-line); }
.sx-facts > div { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--sx-line); align-items: baseline; }
.sx-facts dt { flex: 0 0 4.8rem; font-size: .76rem; color: var(--sx-muted); }
.sx-facts dd { margin: 0; font-size: .9rem; color: var(--sx-ink); }
/* Handschriftliche Randnotiz (wird von sx-ink.js mit Füller geschrieben) */
.sx-note {
    font-family: 'Caveat', 'Segoe Print', cursive; font-size: 1.45rem; line-height: 1;
    color: #23314f; transform: rotate(-4deg); align-self: flex-start; margin: 0 0 0 8%;
}
html body.sx #step1_p {
    font-size: 1.08rem !important;
    line-height: 1.5 !important;
    color: var(--sx-ink-soft) !important;
    margin: 0 0 1rem !important;
    text-align: left !important;
}
html body.sx #startButton.sx-cta { width: 100% !important; max-width: 420px; min-height: 56px !important; font-size: 1.06rem !important; }
.sx-hero-visual { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 4px 18px; }
html body.sx #step1 .sx-hero-caption {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0 !important;
}
/* Hero-Karte: Größe & photo-box-Altregeln neutralisieren */
html body.sx #step1 .sx-pc-scene { max-width: 440px; }
html body.sx #step1 #photoBox.photo-box {
    width: auto !important; height: auto !important; min-height: 0 !important;
    border: 0 !important; background: var(--pc-paper) !important; padding: 0 !important; margin: 0 !important;
    transform: translateZ(1.5px) !important; border-radius: var(--pc-radius) !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06) !important;
    display: block !important; position: absolute !important; inset: 0 !important;
}
html body.sx #step1 #photoPlaceholder { font-size: 1.05rem; font-weight: 700; color: #161616 !important; background: none !important; border: 0 !important; padding: 0 !important; }

/* Mobil: Überschrift → Karte → CTA → Erklärsatz */
@media (max-width: 899px) {
    .sx-hero-copy { display: contents; }
    .sx-hero-grid { grid-template-columns: 1fr; gap: 0; }
    .sx-h1wrap { order: 1; }
    html body.sx #step1_p { order: 2; }
    .sx-hero-visual { order: 3; padding: 6px 6px 20px; }
    html body.sx #startButton.sx-cta { order: 4; max-width: none; }
    .sx-facts { order: 5; max-width: none; }
    .sx-h1stamp { width: 52px !important; }
}
@media (min-width: 900px) {
    .sx-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; }
    html body.sx #step1.card { padding: 52px 56px !important; }
    html body.sx #step1_h1 { font-size: clamp(2.5rem, 3.5vw, 3.1rem) !important; }
    .sx-h1wrap { padding-right: 0; }
    .sx-h1stamp { right: -26px; top: -30px; width: 70px; }
    .sx-hero-visual { padding: 24px 0 32px; }
}

/* ================================================================ STEP 2 – Bild */
html body.sx .crop-mode-buttons {
    display: inline-flex !important; gap: 4px; padding: 4px; border-radius: 8px;
    background: var(--sx-chip); margin: .2rem auto 1rem !important;
}
html body.sx .crop-mode-btn {
    background: transparent !important; color: var(--sx-muted) !important; border: 0 !important;
    border-radius: 6px !important; padding: .55rem 1rem !important; font-weight: 700 !important; font-size: .85rem !important;
    min-height: 0 !important; box-shadow: none !important; width: auto !important;
}
html body.sx .crop-mode-btn.active { background: var(--sx-card) !important; color: var(--sx-ink) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .1) !important; }
html body.sx #preview.crop-preview { border-radius: 6px !important; border: 0 !important; }
html body.sx #previewContainer {
    border: 0 !important; border-radius: 6px !important; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .08) !important;
}
html body.sx .crop-mode-btn { flex: 1 1 0; white-space: normal; }
html body.sx .crop-mode-buttons { width: 100%; max-width: 420px; }
html body.sx .photo-style-bar { gap: 6px !important; margin-top: 1rem !important; flex-wrap: wrap; justify-content: center; }
html body.sx .photo-style-btn {
    background: var(--sx-card) !important; color: var(--sx-ink) !important;
    border: 1.5px solid var(--sx-line-strong) !important; border-radius: 6px !important;
    padding: .45rem .95rem !important; font-weight: 700 !important; font-size: .82rem !important; box-shadow: none !important;
}
html body.sx .photo-style-btn.active { background: var(--sx-ink) !important; color: var(--sx-paper) !important; border-color: var(--sx-ink) !important; }

/* ================================================================ STEP 3/4 – Postkarte */
html body.sx .postcard-flip-container { perspective: 1600px !important; overflow: visible !important; }
html body.sx .postcard-flip-inner { transition: transform .95s cubic-bezier(.25, .8, .25, 1) !important; }
html body.sx .postcard-flip-container.sx-flipping { animation: sxFlipLift .95s var(--sx-ease); }
@keyframes sxFlipLift {
    0%, 100% { translate: 0 0; scale: 1; }
    45%      { translate: 0 -10px; scale: .965; }
}
html body.sx .postcard-side {
    border: 0 !important;
    border-radius: 5px !important;
    background: #fffdf8 !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 3px 10px -4px rgba(30, 24, 14, .3) !important;
}
html body.sx .postcard-back {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .022) 1px, transparent 1px) 0 0 / 18px 100%,
        #fffdf8 !important;
}
html body.sx .postcard-divider { background: rgba(0, 0, 0, .14) !important; width: 1px !important; }
html body.sx .message-area {
    border: 1px dashed rgba(35, 49, 79, .22) !important; border-radius: 10px !important; background: transparent !important;
}
html body.sx .message-area:focus-within { border-color: rgba(35, 49, 79, .5) !important; background: rgba(35, 49, 79, .025) !important; }
html body.sx .message-textarea { color: #23314f !important; }
@media (min-width: 769px) {
    html body.sx .postcard-flip-container { max-width: 100% !important; height: 344px !important; }
    html body.sx .postcard-container { max-width: 100% !important; }
}
html body.sx .address-line-input { color: #1d2433 !important; }
html body.sx .digital-stamp, html body.sx .stamp-design {
    background: url("../mstile-310x310.png") center / contain no-repeat !important;
    border: 0 !important; box-shadow: none !important;
}
html body.sx .digital-stamp { transform: rotate(6deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); }
html body.sx .stamp-text { opacity: 0 !important; }
html body.sx #flipPostcard {
    min-height: 44px !important; width: auto !important; padding: 0 1.1rem !important; font-size: .88rem !important;
    border-radius: 8px !important; margin: .6rem auto 0;
}

html body.sx .flip-button-above { display: flex; justify-content: center; }
html body.sx #multiAddressBanner {
    background: var(--sx-chip) !important; border: 0 !important; border-radius: 8px !important;
    color: var(--sx-ink-soft) !important; text-align: left; margin-top: 1rem !important;
}
html body.sx #addMoreAddresses {
    border-style: dashed !important; min-height: 46px !important; font-size: .9rem !important;
}

html body.sx #multiAddressBanner + .flex.flex-col { margin-top: .7rem; margin-bottom: .2rem !important; }

/* Zusammenfassung als Beleg */
html body.sx .order-summary {
    background: transparent !important; border: 1px solid var(--sx-line-strong) !important; border-radius: 4px !important;
    padding: 12px 16px !important; margin: 1.2rem 0 1rem !important; text-align: left;
}
html body.sx .summary-row { display: flex !important; justify-content: space-between !important; align-items: baseline; gap: 12px; padding: 6px 0 !important; margin: 0 !important; }
html body.sx .summary-row + .summary-row { border-top: 1px dashed var(--sx-line-strong); }
html body.sx .summary-label strong { font-weight: 400 !important; color: var(--sx-muted) !important; font-size: .9rem; }
html body.sx .summary-value { text-align: right; color: var(--sx-ink) !important; font-size: .92rem; }
html body.sx .summary-row:last-child .summary-label strong { color: var(--sx-ink) !important; font-weight: 700 !important; }
html body.sx #viewAllAddresses {
    min-height: 0 !important; width: auto !important; padding: .25rem .7rem !important; margin-top: .35rem;
    font-size: .74rem !important; border-radius: 6px !important; display: inline-flex !important;
    align-self: flex-end; flex: none !important;
}
html body.sx #priceValue { color: var(--sx-ink) !important; font-size: 1.35rem !important; font-weight: 700 !important; letter-spacing: -.02em; }
html body.sx #downloadPreview {
    background: transparent !important; border: 0 !important; min-height: 40px !important;
    color: var(--sx-muted) !important; font-size: .86rem !important; text-decoration: underline; text-underline-offset: 3px;
}
html body.sx #downloadPreview:hover { color: var(--sx-ink) !important; transform: none !important; }
html body.sx #confirmOrder { min-height: 60px !important; font-size: 1.08rem !important; }
.sx-paytrust { display: block; text-align: center; margin-top: .9rem; font-size: .78rem; line-height: 1.5; color: var(--sx-muted); }
.sx-paytrust .sx-lock { display: inline-block; vertical-align: -2px; margin-right: .3rem; }
.sx-paytrust .sx-lock svg { width: 14px; height: 14px; display: block; }
html body.sx #agbNotice { color: var(--sx-muted) !important; font-size: .74rem !important; line-height: 1.5; }
html body.sx #agbNotice a { color: var(--sx-ink) !important; }

/* Step 4: Vorschau-Karte reagiert auf die Maus (Tilt via --tx/--ty aus stamply-v2.js) */
@media (hover: hover) {
    html body.sx #finalPreviewFlipContainer {
        transform: perspective(1200px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
        transition: transform .25s ease-out;
    }
}

/* ---------------------------------------------------------------- Footer */
html body.sx .footer-links.page-footer {
    margin: 8px auto 36px !important; display: flex !important; flex-wrap: wrap; justify-content: center;
    gap: 2px 16px; line-height: 1.8 !important;
}
html body.sx .footer-links a { color: var(--sx-muted) !important; font-size: .78rem; margin: 0 !important; white-space: nowrap; }
html body.sx .footer-links a:hover { color: var(--sx-ink) !important; }

/* ---------------------------------------------------------------- Cookie-Hinweis als Bottom-Sheet */
html body.sx #consentModal {
    background: transparent !important;
    align-items: flex-end !important;
    justify-content: center !important;
    pointer-events: none !important;
    padding: 12px !important;
    box-sizing: border-box;
}
html body.sx #consentModal .modal-content {
    pointer-events: auto;
    width: 100% !important; max-width: 560px !important;
    background: var(--sx-card) !important; color: var(--sx-ink) !important;
    border: 1px solid var(--sx-line-strong) !important; border-radius: 10px !important;
    box-shadow: 4px 4px 0 rgba(22, 22, 22, .12) !important;
    padding: 18px 18px 16px !important; text-align: left !important;
    animation: sxSheet .5s var(--sx-ease) both;
}
@keyframes sxSheet { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
html body.sx #consentModal h2 { font-size: 1rem !important; margin: 0 0 .35rem !important; text-align: left !important; }
html body.sx #consentModal p { font-size: .76rem !important; line-height: 1.5 !important; color: var(--sx-ink-soft) !important; margin: 0 0 .8rem !important; text-align: left !important; }
html body.sx #consentModal .flex.flex-col { flex-direction: row !important; gap: 8px !important; }
html body.sx #consentModal button {
    flex: 1; margin: 0 !important; min-height: 46px; border-radius: 8px !important;
    font: 700 .88rem/1.1 'Poppins', sans-serif !important; padding: 0 .8rem !important; box-shadow: none !important;
}
html body.sx #consentModal #acceptConsent { background: var(--sx-ink) !important; color: var(--sx-paper) !important; }
html body.sx #consentModal #rejectConsent { background: transparent !important; color: var(--sx-ink) !important; border: 1.5px solid var(--sx-line-strong) !important; }

/* Rechts-Modals im neuen Look */
html body.sx #privacyModal .modal-content,
html body.sx #impressumModal .modal-content,
html body.sx #agbModal .modal-content,
html body.sx #addressModal .modal-content,
html body.sx #newAddressModal .modal-content {
    border-radius: 10px !important; border: 1px solid var(--sx-line-strong) !important;
    background: var(--sx-card) !important; color: var(--sx-ink) !important;
}

/* ================================================================ Versand-Animation */
.sx-send {
    position: fixed; inset: 0; z-index: 100000;
    display: grid; place-items: center; align-content: center; gap: 28px;
    background: rgba(242, 239, 232, .97);
    opacity: 0; transition: opacity .35s ease;
    font-family: 'Poppins', system-ui, sans-serif; color: #151515;
}
.sx-send.is-on { opacity: 1; }
.sx-send.is-out { opacity: 0; }
.sx-send .sx-pc-scene { width: min(78vw, 380px); }
.sx-send .sx-pc { --rx: 6deg; --ry: -12deg; --rz: -3deg; }
.sx-send.is-on .sx-send-fly { animation: sxSendFly 3.3s cubic-bezier(.55, 0, .2, 1) forwards; }
.sx-send.is-on .sx-pc { animation: sxSendFlip 3.3s cubic-bezier(.3, .7, .2, 1) forwards; }
.sx-send-fly { width: 100%; display: grid; place-items: center; }
@keyframes sxSendFly {
    0%   { transform: translateY(40px) scale(.82); opacity: 0; }
    10%  { transform: translateY(0) scale(1); opacity: 1; }
    76%  { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translate3d(46vw, -70vh, 0) rotate(24deg) scale(.32); opacity: 0; }
}
@keyframes sxSendFlip {
    0%, 14% { transform: rotateX(6deg) rotateY(-12deg) rotateZ(-3deg); }
    34%     { transform: rotateX(4deg) rotateY(168deg) rotateZ(2deg); }
    76%     { transform: rotateX(4deg) rotateY(180deg) rotateZ(2deg); }
    100%    { transform: rotateX(30deg) rotateY(200deg) rotateZ(10deg); }
}
.sx-send .sx-pc-stamp { opacity: 0; }
.sx-send.is-on .sx-pc-stamp { animation: sxStampDrop .5s cubic-bezier(.3, 1.6, .5, 1) 1.35s forwards; }
@keyframes sxStampDrop {
    0%   { opacity: 0; transform: rotate(-14deg) scale(2.1); }
    100% { opacity: 1; transform: rotate(7deg) scale(1); }
}
.sx-send .sx-pc-postmark path, .sx-send .sx-pc-postmark circle { stroke-dasharray: 260; stroke-dashoffset: 260; }
.sx-send.is-on .sx-pc-postmark path, .sx-send.is-on .sx-pc-postmark circle { animation: sxDraw .6s ease-out 1.75s forwards; }
@keyframes sxDraw { to { stroke-dashoffset: 0; } }
.sx-send-text { text-align: center; min-height: 64px; position: relative; width: min(86vw, 420px); }
.sx-send-text > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sx-send-text strong { font-size: 1.5rem; letter-spacing: -.03em; }
.sx-send-text span { font-size: .9rem; color: #6f695f; }
.sx-send-t2 { opacity: 0; }
.sx-send.is-on .sx-send-t1 { animation: sxFadeOut .4s ease 3s forwards; }
.sx-send.is-on .sx-send-t2 { animation: sxFadeIn .4s ease 3.2s forwards; }
@keyframes sxFadeOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes sxFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sx-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(21, 21, 21, .15); border-top-color: #151515; animation: sxSpin .8s linear infinite; margin-top: 6px; }
@keyframes sxSpin { to { transform: rotate(360deg); } }

/* ================================================================ Erfolg */
#successOverlay.sx-success > div {
    background: rgba(242, 239, 232, .97) !important;
    width: 100vw !important; height: 100vh !important; transform: none !important;
}
#successOverlay.sx-success > div > div {
    background: #fffdf9 !important; border: 1px solid rgba(21, 21, 21, .08) !important;
    border-radius: 12px !important; box-shadow: 4px 4px 0 rgba(22, 22, 22, .1) !important;
    padding: 30px 26px 26px !important; font-family: 'Poppins', system-ui, sans-serif !important;
    animation: sxEnter .7s var(--sx-ease, ease) both;
}
#successOverlay.sx-success h2 { font-family: 'Poppins', sans-serif !important; letter-spacing: -.03em; }
#successOverlay.sx-success p { color: #5f594f !important; }
#successOverlay.sx-success #successNewOrderBtn { border-radius: 8px !important; min-height: 54px; font-family: 'Poppins', sans-serif !important; background: #161616 !important; box-shadow: 3px 3px 0 #27406b !important; }
#successOverlay.sx-success #addToHomeScreenBtn {
    background: transparent !important; border: 1.5px solid rgba(22, 22, 22, .22) !important; border-radius: 8px !important;
    min-height: 50px; font-family: 'Poppins', sans-serif !important;
}
#successOverlay.sx-success #popupLangToggle { border-radius: 6px !important; background: #f2ede3 !important; color: #151515 !important; font-family: 'Poppins', sans-serif !important; }
.sx-success-card { width: min(72vw, 300px); margin: -6px auto 18px; }
.sx-success-card .sx-pc { --rx: 10deg; --ry: 180deg; --rz: 3deg; }
.sx-success-badge {
    position: absolute; right: -6%; bottom: -10%; transform: rotate(-12deg) translateZ(40px);
    color: #2f6b45; border: 2.5px solid currentColor; border-radius: 4px; background: rgba(255, 254, 250, .85);
    font: 700 .95rem/1 'Poppins', sans-serif; padding: 7px 12px 6px; white-space: nowrap;
    box-shadow: inset 0 0 0 2px rgba(255, 254, 250, .85), inset 0 0 0 3.5px currentColor;
    mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
    html body.sx .card.sx-enter,
    .sx-send.is-on .sx-send-fly, .sx-send.is-on .sx-pc,
    .sx-send.is-on .sx-pc-stamp { animation: none !important; }
    .sx-send .sx-pc-stamp { opacity: 1; }
    .sx-send-t1 { display: none; }
    .sx-send-t2 { opacity: 1; }
}
