/* Schichtgedöns 3D – Kundenportal
   Mobile first: Basis = Handy, Erweiterungen für Tablet (ab 600 px / 768 px) und Desktop (ab 1024 px). */

:root {
    /* Farben wie die Hauptseite schichtgedoens.de (Moorgrün/Messing), Werte aus marke.css */
    --kopf: #121c17;
    --text: #ebe7da;
    --text-leise: #a5b3a9;
    --akzent: #c9a45c;
    --akzent-dunkel: #e3c78a;      /* Hover/Hervorhebung: auf dunklem Grund heller statt dunkler */
    --akzent-text: #121c17;
    --akzent-zart: rgb(201 164 92 / 14%);
    --hg: #121c17;
    --karte: rgb(27 42 34 / 78%);
    --rand: #34493d;
    --erfolg: #86b29b;
    --erfolg-zart: rgb(134 178 155 / 14%);
    --fehler: #ff8a80;
    --fehler-zart: rgb(255 138 128 / 12%);
    --schatten: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 25%);
    --radius: 10px;
    --abstand: 16px;
    --fokus: 0 0 0 2px #121c17, 0 0 0 4px #e3c78a;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--hg);
    color: var(--text);
    font-family: var(--sg-schrift);
    font-size: 1rem;
    line-height: 1.55;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 2px; }

:focus { outline: none; }
:focus-visible { box-shadow: var(--fokus); border-radius: 6px; }

.nur-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Kopf ---------- */
.kopf {
    background: var(--kopf);
    color: #fff;
    padding-top: env(safe-area-inset-top);
    border-bottom: 4px solid var(--akzent);
}

.kopf-innen {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px max(var(--abstand), env(safe-area-inset-right)) 12px max(var(--abstand), env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
}

.marke {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: .01em;
    min-height: 44px;
}

.marke svg { width: 32px; height: 32px; flex: none; }

/* ---------- Inhalt ---------- */
.inhalt {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px max(var(--abstand), env(safe-area-inset-right)) 32px max(var(--abstand), env(safe-area-inset-left));
}

.karte {
    background: var(--karte);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 20px;
    min-width: 0;
}

.karte > h2, .karte-titel {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }

/* ---------- Buttons ---------- */
.knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 10px;
    background: var(--akzent);
    color: var(--akzent-text);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf--breit { width: 100%; }
.knopf--leise {
    background: transparent;
    color: inherit;
    border: 2px solid currentColor;
    min-height: 44px;
    padding: 8px 16px;
}
.knopf--leise:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: 18px; }

.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label, .feld .label { font-weight: 600; }
.feld .hilfe { font-size: .88rem; color: var(--text-leise); }

.feld input[type="text"],
.feld input[type="email"],
.feld input[type="tel"],
.feld input[type="password"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    font: inherit;
    font-size: 1.0625rem; /* mind. 16 px: kein Auto-Zoom auf iPhones */
    color: var(--text);
    background: var(--karte);
    border: 2px solid var(--rand);
    border-radius: 10px;
    appearance: none;
}
.feld input:focus-visible { border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 35%, transparent); }
.feld input.gross { font-size: 1.5rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.feld--fehler input { border-color: var(--fehler); }
.feld .fehler { color: var(--fehler); font-size: .92rem; font-weight: 600; }

.feld-reihe { display: grid; grid-template-columns: 1fr; gap: 18px; }

.haken {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 44px;
    cursor: pointer;
}
.haken input {
    width: 24px; height: 24px;
    margin: 2px 0 0;
    flex: none;
    accent-color: var(--akzent-dunkel);
}

/* Ja/Nein-Auswahl als große Tipp-Flächen */
.auswahl { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.auswahl legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.auswahl .hilfe { margin: 0; font-size: .9rem; color: var(--text-leise); }
.auswahl .pflicht { display: inline-block; margin-left: 6px; font-size: .75rem; font-weight: 700; color: var(--akzent-dunkel); text-transform: uppercase; letter-spacing: .04em; }
.auswahl-optionen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auswahl-option {
    display: flex; align-items: center; gap: 10px;
    min-height: 52px; padding: 10px 14px;
    border: 2px solid var(--rand); border-radius: 10px;
    background: var(--karte); cursor: pointer; font-weight: 600;
}
.auswahl-option input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--akzent-dunkel); }
.auswahl-option:has(input:checked) { border-color: var(--akzent); background: var(--akzent-zart); }
.auswahl-option:has(input:focus-visible) { box-shadow: var(--fokus); }
.feld--fehler .auswahl-option { border-color: var(--fehler); }
.auswahl .fehler { color: var(--fehler); font-size: .92rem; font-weight: 600; }

/* Fotofreigabe im Auftrag */
.freigabe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rand); font-size: .92rem; }
.freigabe p { margin: 0; }
.freigabe .knopf { min-height: 44px; padding: 8px 16px; color: var(--text); }

.meldung {
    border-radius: 10px;
    padding: 12px 14px;
    margin: 0 0 16px;
    font-weight: 600;
}
.meldung--fehler { background: var(--fehler-zart); color: var(--fehler); }
.meldung--ok { background: var(--erfolg-zart); color: var(--erfolg); }
.meldung--info { background: var(--akzent-zart); color: var(--text); font-weight: 500; }

/* ---------- Login ---------- */
.login {
    max-width: 460px;
    margin: 4vh auto 0;
}
.login h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 6px; }
.login .einleitung { margin: 0 0 22px; color: var(--text-leise); }
.login-schichten {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    margin: 0 auto 22px;
}
.login-schichten span { display: block; height: 9px; border-radius: 5px; background: var(--akzent); }
.login-schichten span:nth-child(1) { width: 38%; opacity: .55; }
.login-schichten span:nth-child(2) { width: 50%; opacity: .75; }
.login-schichten span:nth-child(3) { width: 62%; background: var(--akzent-dunkel); }

.login .hinweis-unten { margin: 20px 0 0; }
.login .hinweis-unten a { font-weight: 700; white-space: nowrap; }

/* ---------- Startseite mit Anleitung ---------- */
.startseite { display: flex; flex-direction: column; gap: var(--abstand); }
.anleitung { display: flex; flex-direction: column; gap: var(--abstand); max-width: 760px; margin: 0 auto; width: 100%; }
.anleitung h2 { font-size: 1.2rem; margin: 0 0 12px; }
.anleitung h3 { font-size: 1rem; margin: 0 0 4px; }
.anleitung p { margin: 0 0 10px; }
.anleitung p:last-child { margin-bottom: 0; }

.schritte { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.schritte li { display: flex; gap: 14px; align-items: flex-start; }
.schritt-nr {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--akzent);
    color: var(--akzent-text);
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

.erklaerung { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.erklaerung dt { font-weight: 700; margin-bottom: 2px; }
.erklaerung dd { margin: 0; color: var(--text); }
.erklaerung--kompakt { gap: 8px; }
.erklaerung--kompakt > div { display: grid; grid-template-columns: 1fr; gap: 0; padding-bottom: 8px; border-bottom: 1px solid var(--rand); }
.erklaerung--kompakt > div:last-child { border-bottom: 0; padding-bottom: 0; }

.mini-schichten { display: flex; flex-direction: column-reverse; gap: 3px; max-width: 220px; margin: 8px 0; }
.mini { display: block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 5px; border: 2px solid transparent; }
.mini--erledigt { background: var(--akzent); color: var(--akzent-text); }
.mini--aktuell { background: var(--akzent-zart); border-color: var(--akzent); }
.mini--offen { border: 2px dashed var(--rand); color: var(--text-leise); }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border: 1px solid var(--rand); border-radius: 10px; background: var(--karte); }
.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 40px 12px 14px;
    min-height: 44px;
    font-weight: 600;
    position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--akzent-dunkel); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 14px 14px; margin: 0; }
.faq-kontakt { margin-top: 14px !important; }

/* ---------- Auftragskopf ---------- */
.auftragskopf { margin-bottom: 18px; }
.auftragskopf .nummer {
    margin: 0;
    font-size: .88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-leise);
}
.auftragskopf h1 { margin: 4px 0 12px; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }

.status-gross {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--karte);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 16px 18px;
    border-left: 6px solid var(--akzent);
}
.status-gross .label { font-size: .85rem; color: var(--text-leise); margin: 0; }
.status-gross .wert { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.25; }
.status-gross--fertig { border-left-color: var(--erfolg); }

.vorschau-banner {
    background: #7C3AED;
    color: #fff;
    text-align: center;
    font-weight: 600;
    padding: 8px 16px;
    font-size: .92rem;
}

/* ---------- Raster Auftragsseite ---------- */
.raster { display: flex; flex-direction: column; gap: var(--abstand); }
.spalte { display: contents; }
.bereich-schichten { order: 1; }
.bereich-nachricht { order: 2; }
.bereich-versand { order: 3; }
.bereich-chat { order: 4; }
.bereich-bewertung { order: 5; }
.bereich-modelle { order: 5; }
.bereich-fotos { order: 5; }
.bereich-kosten { order: 6; }

/* ---------- Druckschichten ---------- */
.druck { display: flex; flex-direction: column; align-items: stretch; }

.schichten {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column-reverse; /* erste Schicht unten, wächst nach oben */
    gap: 6px;
}

.schicht {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    padding: 10px 16px;
    border-radius: 9px;
    border: 2px solid transparent;
    overflow: hidden;
    font-weight: 600;
}
.schicht > * { position: relative; z-index: 1; }
.schicht .zeit { font-size: .85rem; font-weight: 500; white-space: nowrap; }
.schicht .name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.schicht .symbol { width: 20px; height: 20px; flex: none; }

/* leicht zulaufende Form wie ein gedrucktes Objekt */
.stufe-1 { margin-inline: 0; }
.stufe-2 { margin-inline: 3px; }
.stufe-3 { margin-inline: 6px; }
.stufe-4 { margin-inline: 9px; }
.stufe-5 { margin-inline: 12px; }
.stufe-6 { margin-inline: 15px; }
.stufe-7 { margin-inline: 18px; }

.schicht--erledigt {
    background: var(--akzent);
    color: var(--akzent-text);
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 10px, rgba(255, 255, 255, .12) 10px 12px);
}

.schicht--aktuell {
    background: var(--akzent-zart);
    border-color: var(--akzent);
    color: var(--text);
}
.schicht--aktuell::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: color-mix(in srgb, var(--akzent) 42%, transparent);
    animation: schicht-drucken 3.4s ease-in-out infinite;
}
.schicht--aktuell::after {
    /* Düse */
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 14px;
    height: 6px;
    border-radius: 0 0 4px 4px;
    background: var(--kopf);
    animation: duese 3.4s ease-in-out infinite;
}

.schicht--offen {
    border: 2px dashed var(--rand);
    color: var(--text-leise);
    font-weight: 500;
    background: transparent;
}

.schicht--fertig { background: var(--erfolg); color: #fff; background-image: none; }

@keyframes schicht-drucken {
    0% { width: 0; opacity: 1; }
    80% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}
@keyframes duese {
    0% { left: 0; }
    80% { left: calc(100% - 14px); }
    100% { left: calc(100% - 14px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .schicht--aktuell::before { animation: none; width: 55%; }
    .schicht--aktuell::after { animation: none; left: calc(55% - 7px); }
    .knopf { transition: none; }
}

.druckbett {
    height: 12px;
    margin-top: 8px;
    border-radius: 4px;
    background: var(--kopf);
    background-image: repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 255, 255, .08) 18px 20px);
}
.druckbett { background-color: var(--sg-tanne-hoch); }

/* ---------- Nachricht ---------- */
.nachricht {
    border-left: 5px solid var(--akzent);
    background: var(--akzent-zart);
}
.nachricht p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.nachricht .von { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

/* ---------- Versand ---------- */
.sendung { display: flex; flex-direction: column; gap: 14px; }
.sendungsnummer {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    margin: 2px 0 0;
}

/* ---------- Nachrichten (Chat) ---------- */
.chat {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 26rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.chat-nachricht {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.45;
}
.chat-nachricht--kunde {
    align-self: flex-end;
    background: var(--akzent-zart);
    border: 1px solid color-mix(in srgb, var(--akzent) 45%, transparent);
    border-bottom-right-radius: 4px;
}
.chat-nachricht--werkstatt {
    align-self: flex-start;
    background: var(--hg);
    border: 1px solid var(--rand);
    border-bottom-left-radius: 4px;
}
.chat-kopf { font-size: .78rem; font-weight: 600; color: var(--text-leise); margin-bottom: 3px; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-formular { display: flex; flex-direction: column; gap: 10px; }
.chat-formular textarea {
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    font: inherit;
    font-size: 1.0625rem; /* mind. 16 px: kein Auto-Zoom auf iPhones */
    color: var(--text);
    background: var(--karte);
    border: 2px solid var(--rand);
    border-radius: 10px;
    resize: vertical;
}
.chat-formular textarea:focus-visible { border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 35%, transparent); }
.chat-formular .knopf { align-self: flex-end; }

/* ---------- Kosten ---------- */
.kosten-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kosten { width: 100%; border-collapse: collapse; }
.kosten thead { display: none; }
.kosten tbody tr {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas: "bez bez bez" "menge preis gesamt";
    column-gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rand);
}
.kosten td { padding: 0; }
.kosten .bez { grid-area: bez; font-weight: 600; overflow-wrap: anywhere; }
.kosten .menge { grid-area: menge; color: var(--text-leise); }
.kosten .menge::after { content: " ×"; }
.kosten .preis { grid-area: preis; color: var(--text-leise); white-space: nowrap; }
.kosten .gesamt { grid-area: gesamt; text-align: right; font-weight: 600; white-space: nowrap; }
.kosten tfoot tr { display: flex; justify-content: space-between; padding-top: 12px; }
.kosten tfoot th, .kosten tfoot td { padding: 0; font-size: 1.1rem; font-weight: 800; }
.kosten tfoot .platz { display: none; }
.zahl { font-variant-numeric: tabular-nums; }

.plakette {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 9px;
    border-radius: 999px;
    vertical-align: middle;
}
.plakette--vorlaeufig { background: var(--akzent-zart); color: var(--text); border: 1px solid var(--akzent); }
.plakette--endgueltig { background: var(--erfolg-zart); color: var(--erfolg); border: 1px solid var(--erfolg); }

.kosten-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.kosten-kopf h2 { margin: 0; }
.steuerhinweis { margin: 14px 0 0; font-size: .85rem; color: var(--text-leise); }

/* ---------- Fotos ---------- */
.galerie {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.galerie a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: var(--rand);
    aspect-ratio: 4 / 3;
}
.galerie img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.galerie a:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .galerie img { transition: none; } }

/* ---------- Lightbox ---------- */
.lb-offen { overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8, 12, 16, .94);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(56px + env(safe-area-inset-top)) env(safe-area-inset-right) calc(56px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
    touch-action: pan-y pinch-zoom;
}
.lightbox[hidden] { display: none; }
.lb-figur { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lb-bild { max-width: 100vw; max-height: calc(100dvh - 150px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-bild.laedt { opacity: .35; }
.lb-text { text-align: center; padding: 0 16px; font-size: .95rem; }
.lb-knopf {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}
.lb-knopf:hover { background: rgba(255, 255, 255, .26); }
.lb-schliessen { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); }
.lb-zurueck { left: calc(8px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
.lb-weiter { right: calc(8px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
.lb-zaehler {
    position: absolute;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 0; right: 0;
    text-align: center;
    font-size: .9rem;
    opacity: .85;
}
@media (pointer: coarse) and (max-width: 599px) {
    /* Am Handy wird gewischt, Pfeile unten statt über dem Bild */
    .lb-zurueck, .lb-weiter { top: auto; bottom: calc(4px + env(safe-area-inset-bottom)); transform: none; }
}

/* ---------- Datenformular ---------- */
.daten { max-width: 640px; margin: 0 auto; }
.daten h1 { font-size: 1.45rem; margin: 0 0 8px; line-height: 1.25; }

/* ---------- Rechtstexte ---------- */
.rechtstext-rahmen { max-width: 820px; margin: 0 auto; }
.zurueck { margin: 0 0 12px; }
.zurueck a { display: inline-block; padding: 10px 0; font-weight: 600; }
.rechtstext { line-height: 1.65; overflow-wrap: anywhere; }
.rechtstext h1 { font-size: 1.6rem; margin: 0 0 16px; line-height: 1.25; }
.rechtstext h2 { font-size: 1.1rem; margin: 26px 0 8px; }
.rechtstext p, .rechtstext ul { margin: 0 0 12px; }
.rechtstext ul { padding-left: 1.3em; }
.rechtstext li { margin-bottom: 6px; }

/* ---------- Fuß ---------- */
.fuss {
    text-align: center;
    font-size: .85rem;
    color: var(--text-leise);
    padding: 20px max(var(--abstand), env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(var(--abstand), env(safe-area-inset-left));
}
.fuss a { display: inline-block; padding: 10px 6px; }

/* =========================================================
   Tablet ab 600 px
   ========================================================= */
@media (min-width: 600px) {
    :root { --abstand: 20px; }
    .inhalt { padding-top: 28px; }
    .karte { padding: 24px; }
    .galerie { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .feld-reihe { grid-template-columns: 1fr 2fr; }
    .auftragskopf h1 { font-size: 1.8rem; }
    .sendung { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

/* =========================================================
   Tablet quer / großes Tablet ab 768 px: zweispaltig
   ========================================================= */
@media (min-width: 768px) {
    .raster {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        align-items: start;
    }
    .spalte { display: flex; flex-direction: column; gap: var(--abstand); min-width: 0; }
    .spalte-links { position: sticky; top: 16px; }
    .bereich-fotos, .bereich-modelle, .bereich-bewertung { grid-column: 1 / -1; }
    .galerie { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =========================================================
   Desktop ab 1024 px
   ========================================================= */
@media (min-width: 1024px) {
    .startseite { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; gap: 32px; }
    .startseite .login { margin: 0; position: sticky; top: 24px; max-width: none; }
    .anleitung { margin: 0; max-width: none; }
    .erklaerung--kompakt > div { grid-template-columns: 200px 1fr; gap: 12px; }
    :root { --abstand: 28px; }
    .inhalt { padding-top: 36px; padding-bottom: 48px; }
    .raster { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }
    .karte { padding: 28px; }
    .galerie { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .auftragskopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
    .auftragskopf h1 { margin-bottom: 0; }
    .status-gross { min-width: 320px; }

    /* Kosten als normale Tabelle */
    .kosten thead { display: table-header-group; }
    .kosten tbody tr { display: table-row; padding: 0; }
    .kosten th, .kosten td { padding: 10px 8px; text-align: left; }
    .kosten thead th { font-size: .85rem; color: var(--text-leise); font-weight: 600; border-bottom: 2px solid var(--rand); }
    .kosten tbody td { border-bottom: 1px solid var(--rand); }
    .kosten .menge::after { content: ""; }
    .kosten .menge, .kosten .preis { color: inherit; }
    .kosten .rechts, .kosten .gesamt, .kosten .preis, .kosten .menge { text-align: right; }
    .kosten tfoot tr { display: table-row; }
    .kosten tfoot .platz { display: table-cell; }
    .kosten tfoot th, .kosten tfoot td { padding: 12px 8px 0; text-align: right; }
    .kosten tfoot th { text-align: left; }
}

@media (hover: none) {
    .galerie a:hover img { transform: none; }
}

@media print {
    .kopf, .fuss, .knopf, .lightbox { display: none !important; }
    body { background: #fff; color: #000; }
    .karte { box-shadow: none; border: 1px solid #ccc; }
}

/* =========================================================
   Stil der Hauptseite (Moorgrün/Messing, Gitter, Video, Effekte)
   ========================================================= */
body { background: var(--hg); }
h1, h2, h3, .karte-titel, .status-gross .wert, .sendungsnummer {
    font-family: var(--sg-schrift-schmal);
    font-stretch: 87.5%;
    font-variation-settings: "wdth" 87.5;
    letter-spacing: -.005em;
}
.karte > h2, .karte-titel { font-size: 1.3rem; font-weight: 600; }

.kopf {
    position: sticky; top: 0; z-index: 20;
    background: rgb(18 28 23 / 72%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rand);
    color: var(--text);
}
.kopf-innen { min-height: 72px; }
.marke { color: var(--text); gap: 12px; }
.marke svg { width: 34px; height: 34px; }
.marke-text { display: flex; flex-direction: column; line-height: 1.1; }
.marke-name { font-size: 17px; font-weight: 700; white-space: nowrap; }
.marke-ort { color: var(--text-leise); font-size: 12px; font-weight: 500; }

.karte {
    border: 1px solid var(--rand);
    background: var(--karte);
    box-shadow: none;
    border-radius: var(--radius);
    transition: border-color .2s ease;
}
.karte:hover { border-color: #46604f; }

.knopf { border-radius: 6px; transition: background-color .18s ease, transform .18s ease; }
.knopf:hover { background: var(--akzent-dunkel); }
.knopf--leise { border: 1px solid var(--akzent); color: var(--text); background: transparent; }
.knopf--leise:hover { background: transparent; color: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }

.feld input[type="text"], .feld input[type="email"], .feld input[type="tel"], .chat-formular textarea {
    background: rgb(18 28 23 / 80%); border-width: 1px; border-radius: 6px;
}
.auswahl-option, .faq details { border-width: 1px; border-radius: 8px; background: var(--karte); }

.status-gross { border: 1px solid var(--rand); border-left: 4px solid var(--akzent); box-shadow: none; }
.status-gross--fertig { border-left-color: var(--erfolg); }
.schicht--fertig { background: var(--erfolg); color: var(--sg-moor); }
.schicht--erledigt { background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgb(255 255 255 / 10%) 10px 12px); }
.schritt-nr { background: transparent; border: 1px solid var(--akzent); color: var(--akzent-dunkel); font-weight: 700; }
.nachricht { border-left-width: 4px; }
.chat-nachricht--werkstatt { background: rgb(18 28 23 / 70%); }
.meldung { border: 1px solid currentColor; border-radius: 8px; }
.meldung--info { border-color: var(--akzent); }
.login-schichten span:nth-child(1), .login-schichten span:nth-child(2) { background: var(--erfolg); }
.login-schichten span:nth-child(3) { background: var(--akzent); }

.fuss { border-top: 1px solid var(--rand); background: rgb(18 28 23 / 80%); }
.fuss a { color: var(--text-leise); }
.fuss a:hover { color: var(--akzent-dunkel); }

/* Ankommen beim Laden wie die Startseite */
.login, .auftragskopf, .daten > h1 { animation: sg-ankommen .8s both cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: reduce) { .login, .auftragskopf, .daten > h1 { animation: none; } }

@media print {
    body { background: #fff; color: #000; }
    .karte { background: #fff; }
}

/* 3D-Modelle */
.modell + .modell { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rand); }
.modell h3 { margin: 0 0 10px; }
.modell-viewer [hidden], .modell-antwort [hidden] { display: none; }
.modell-buehne { position: relative; height: min(62vh, 480px); display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a3d32, #121c17); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; touch-action: none; }
.modell-buehne:fullscreen { height: 100%; border: 0; border-radius: 0; }
.modell-buehne canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.modell-status { margin: 0; padding: 12px; text-align: center; color: var(--text-leise); }
.modell-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.modell-masse { font-size: .92rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.modell-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.modell-antwort { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.modell-antwort .feld { width: 100%; }
.modell-antwort textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--karte); border: 2px solid var(--rand); border-radius: 10px; }
