/* Retourenportal – Endkunden-Oberfläche
   Systemschriften (kein Nachladen externer Fonts → DSGVO-freundlich, schnell). */

:root {
  --brand: #ff5656;           /* Akzent (Fortschritt, Auswahl, Icons) – Mandantenfarbe oder logiful-Koralle */
  --brand-ink: #ffffff;       /* Schrift auf Akzentfläche (automatisch per Kontrast) */
  --btn: #131316;             /* Primärbutton */
  --btn-ink: #ffffff;
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #f3f3f6;
  --ink: #111114;
  --ink-2: #3b3b44;
  --muted: #6d6d79;
  --line: #e6e6ec;
  --line-strong: #d4d4dc;
  --ok: #16a34a;
  --ok-soft: #e9f8ef;
  --warn-soft: #fff6e5;
  --warn-ink: #8a5300;
  --err: #d92d20;
  --err-soft: #fdeceb;
  --brand-soft: color-mix(in oklab, var(--brand) 11%, var(--surface));
  --shadow-sm: 0 1px 2px rgb(16 16 24 / 0.05);
  --shadow: 0 1px 2px rgb(16 16 24 / 0.04), 0 8px 24px -6px rgb(16 16 24 / 0.08);
  --shadow-lg: 0 2px 4px rgb(16 16 24 / 0.04), 0 24px 48px -12px rgb(16 16 24 / 0.14);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 99px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --btn: #f4f4f6;
    --btn-ink: #0c0c0f;
    --bg: #0c0c0f;
    --surface: #16161b;
    --surface-2: #1d1d23;
    --ink: #f4f4f6;
    --ink-2: #d2d2d9;
    --muted: #9a9aa7;
    --line: #2a2a32;
    --line-strong: #393943;
    --ok-soft: #10281a;
    --warn-soft: #2b2110;
    --warn-ink: #f3c06b;
    --err-soft: #2e1513;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -6px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -12px rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
  /* Standardlogo (schwarze Wortmarke) im Dunkelmodus hell darstellen, Koralle bleibt erhalten */
  :root:not([data-theme='light']) .brand img.is-default { filter: invert(1) hue-rotate(180deg) saturate(1.3); }
}
/* Vom Mandanten erzwungen dunkel */
:root[data-theme='dark'] {
  --btn: #f4f4f6;
  --btn-ink: #0c0c0f;
  --bg: #0c0c0f;
  --surface: #16161b;
  --surface-2: #1d1d23;
  --ink: #f4f4f6;
  --ink-2: #d2d2d9;
  --muted: #9a9aa7;
  --line: #2a2a32;
  --line-strong: #393943;
  --ok-soft: #10281a;
  --warn-soft: #2b2110;
  --warn-ink: #f3c06b;
  --err-soft: #2e1513;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -6px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -12px rgb(0 0 0 / 0.55);
  color-scheme: dark;
}
:root[data-theme='dark'] .brand img.is-default { filter: invert(1) hue-rotate(180deg) saturate(1.3); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 480px at 12% -8%, color-mix(in oklab, var(--brand) 14%, transparent), transparent 70%),
    radial-gradient(700px 420px at 100% 0%, color-mix(in oklab, var(--brand) 7%, transparent), transparent 70%);
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------------------------------------------ Kopf */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 720px; width: 100%; margin: 0 auto; padding: 22px 20px 6px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; min-height: 36px; }
.brand img { height: 46px; width: auto; max-width: 200px; margin: -6px 0 -6px -4px; object-fit: contain; display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.help-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none;
  font-size: 0.9rem; font-weight: 550; padding: 8px 12px; border-radius: var(--r-pill); transition: background 0.2s, color 0.2s;
}
.help-link:hover { background: var(--surface); color: var(--ink); }
.help-link svg { width: 18px; height: 18px; }
.topbar-end { display: flex; align-items: center; gap: 6px; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.lang-switch[hidden] { display: none; }
.lang-switch button {
  border: 0; background: none; font: inherit; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.04em;
  color: var(--muted); padding: 5px 10px; border-radius: var(--r-pill); cursor: pointer; transition: background 0.2s, color 0.2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg, #fff); }

/* ------------------------------------------------------------------ Gerüst */

.shell { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 14px 20px 40px; }

.progress { margin: 6px 0 18px; }
.progress-meta { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 10px; color: var(--muted); font-size: 0.88rem; font-weight: 550; }
.back {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink); cursor: pointer; transition: transform 0.2s var(--ease), border-color 0.2s;
}
.back:hover { border-color: var(--line-strong); transform: translateX(-2px); }
.back[disabled] { visibility: hidden; }
.progress-track { display: flex; gap: 6px; }
.progress-track span { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; position: relative; }
.progress-track span::after {
  content: ''; position: absolute; inset: 0; background: var(--brand); border-radius: inherit;
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease);
}
.progress-track span.done::after, .progress-track span.current::after { transform: scaleX(1); }
.progress-track span.current::after { opacity: 0.5; }

.view { animation: enter 0.45s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

h1 { font-size: clamp(1.65rem, 4.5vw, 2.15rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 720; margin: 0 0 8px; }
h2 { font-size: 1.05rem; letter-spacing: -0.01em; font-weight: 650; margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 1.04rem; margin: 0 0 24px; max-width: 56ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 24px; }
.card + .card, .card + .items, .items + .card, .notice + .card, .card + .notice { margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------------------ Formulare */

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.field .opt { font-weight: 450; color: var(--muted); }
.input {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 14px 15px; min-height: 52px;
  transition: border-color 0.2s, box-shadow 0.2s; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px;
}
textarea.input { min-height: 92px; resize: vertical; }
.input:hover { border-color: color-mix(in oklab, var(--ink) 30%, var(--line-strong)); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent); }
.input.invalid { border-color: var(--err); box-shadow: 0 0 0 4px color-mix(in oklab, var(--err) 14%, transparent); }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; }

.btn {
  font: inherit; font-weight: 650; font-size: 1rem; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-primary[disabled] { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-block { width: 100%; }
.btn .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); cursor: pointer; }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ------------------------------------------------------------------ Startseite */

.hero { padding: 18px 0 6px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.badges li {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.86rem; font-weight: 550; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 12px 7px 9px;
}
.badges svg { width: 17px; height: 17px; color: var(--brand); }

/* ------------------------------------------------------------------ Artikel */

.items { display: flex; flex-direction: column; gap: 12px; }
.item {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); transition: border-color 0.2s, box-shadow 0.25s;
}
.item:not(.blocked):hover { border-color: var(--line-strong); }
.item.selected { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.item.blocked { opacity: 0.62; }
.item-head {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left;
  background: none; border: 0; font: inherit; color: inherit; cursor: pointer; border-radius: var(--r-md);
}
.item.blocked .item-head { cursor: default; }
.thumb {
  width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0; object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: var(--muted); border: 1px solid var(--line);
}
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-title { font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.item-sub { color: var(--muted); font-size: 0.88rem; }
.item-note { color: var(--warn-ink); background: var(--warn-soft); font-size: 0.82rem; border-radius: 8px; padding: 4px 8px; margin-top: 6px; align-self: flex-start; }
.check {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0;
  display: grid; place-items: center; transition: background 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}
.check svg { width: 15px; height: 15px; stroke-width: 3; color: var(--brand-ink); opacity: 0; transform: scale(0.6); transition: 0.2s var(--ease); }
.item.selected .check { background: var(--brand); border-color: var(--brand); transform: scale(1.05); }
.item.selected .check svg { opacity: 1; transform: none; }

.item-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 16px; border-top: 1px dashed var(--line); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.label-sm { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.req { color: var(--brand); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.stepper button { width: 42px; height: 40px; border: 0; background: none; color: var(--ink); font-size: 1.2rem; cursor: pointer; }
.stepper button:disabled { color: var(--line-strong); cursor: default; }
.stepper button:not(:disabled):hover { background: var(--surface-2); }
.stepper output { min-width: 28px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 0.9rem; font-weight: 550; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 9px 14px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.chip-accent[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ------------------------------------------------------------------ Optionskarten */

.options { display: grid; gap: 12px; }
.option {
  position: relative; display: flex; gap: 16px; align-items: flex-start; text-align: left; width: 100%;
  font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 18px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s var(--ease);
}
.option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.option[aria-checked='true'] { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.option-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.option-icon svg { width: 22px; height: 22px; }
.option-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.option-title { font-weight: 680; font-size: 1.04rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option-desc { color: var(--muted); font-size: 0.92rem; }
.option-amount { font-weight: 720; font-variant-numeric: tabular-nums; margin-top: 8px; font-size: 1.1rem; letter-spacing: -0.01em; }
.option-amount s { color: var(--muted); font-weight: 500; margin-left: 6px; font-size: 0.92rem; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; margin-top: 2px; transition: border 0.2s var(--ease); }
.option[aria-checked='true'] .radio { border-color: var(--brand); border-width: 7px; }
.pill { display: inline-flex; align-items: center; font-size: 0.74rem; font-weight: 750; letter-spacing: 0.02em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); }
.pill.soft { background: var(--ok-soft); color: var(--ok); }

.exchange-item { display: flex; flex-direction: column; gap: 14px; }
.exchange-item + .exchange-item { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 6px; }
.exchange-head { display: flex; gap: 12px; align-items: center; }
.exchange-head .thumb { width: 48px; height: 48px; font-size: 1rem; border-radius: 10px; }

/* ------------------------------------------------------------------ Hinweise */

.alert {
  display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-sm); padding: 13px 15px;
  margin-bottom: 14px; font-size: 0.94rem; background: var(--err-soft); color: var(--err); animation: enter 0.3s var(--ease);
}
.alert svg { margin-top: 1px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: var(--r-sm); padding: 14px 16px; font-size: 0.92rem; color: var(--ink-2); }
.notice svg { color: var(--brand); margin-top: 1px; }
.notice.warn { background: var(--warn-soft); color: var(--warn-ink); }
.notice.warn svg { color: currentColor; }

.open-return { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ Zusammenfassung */

.summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.summary-list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary-list li:last-child { border-bottom: 0; }
.summary-list .thumb { width: 44px; height: 44px; font-size: 0.95rem; border-radius: 10px; }
.tag { font-size: 0.78rem; font-weight: 650; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.exchange { background: color-mix(in oklab, #6366f1 14%, var(--surface)); color: color-mix(in oklab, #6366f1 75%, var(--ink)); }
.tag.store_credit { background: var(--brand-soft); color: color-mix(in oklab, var(--brand) 75%, var(--ink)); }
.tag.refund { background: var(--ok-soft); color: var(--ok); }
.totals { margin: 14px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 0.95rem; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 1.06rem; color: var(--ink); padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 0.95rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; }
.edit-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* ------------------------------------------------------------------ Fertig */

.done-hero { text-align: center; padding: 10px 0 8px; }
.done-hero .lead { margin: 0 auto 22px; }
.success { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--ok-soft); display: grid; place-items: center; animation: pop 0.6s var(--ease); }
.success svg { width: 44px; height: 44px; color: var(--ok); stroke-width: 2.6; }
.check-draw { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.55s 0.25s var(--ease) forwards; }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.label-card { text-align: center; }
.label-card .btn { margin-top: 14px; }
.tracking { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); text-decoration: none; padding: 7px 13px; background: var(--surface-2); border-radius: var(--r-pill); font-size: 0.92rem; }
.tracking:hover { background: var(--line); }
.tracking svg { width: 16px; height: 16px; }
.qr { display: grid; grid-template-columns: 124px 1fr; gap: 18px; align-items: center; text-align: left; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.qr img { width: 124px; height: 124px; border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.howto { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: s; }
.howto li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; font-size: 0.9rem; color: var(--muted); }
.howto li::before {
  counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 750; font-size: 0.85rem; margin-bottom: 10px;
}
.howto strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 0.95rem; }

/* ------------------------------------------------------------------ Aktionsleiste */

/* Liegt im Inhaltsbereich direkt unter dem aktuellen Schritt; bei langen Seiten klebt sie am unteren Bildschirmrand */
.actionbar {
  position: sticky; bottom: 0; z-index: 10; margin: 22px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.actionbar[hidden] { display: none; }
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.actionbar-info { font-size: 0.92rem; color: var(--muted); min-width: 0; }
.actionbar-info strong { color: var(--ink); font-weight: 650; }
.actionbar .btn { min-width: 210px; }

/* ------------------------------------------------------------------ Footer */

.footer { max-width: 720px; width: 100%; margin: 0 auto; padding: 10px 20px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 0.82rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-quick, .footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.footer-quick a { font-weight: 600; font-size: 0.88rem; color: var(--ink-2, var(--ink)); }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.footer-social a:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.footer-social svg { width: 18px; height: 18px; }
/* Original-Logos sind gefüllt; dezent in Textfarbe, beim Überfahren in Markenfarbe */
.footer-social svg.brand { fill: currentColor; stroke: none; }
.footer-social a { color: var(--ink-2); }
.footer-social a:hover { color: var(--brand-c, var(--ink)); }

/* Quicklinks in der Kopfzeile – auf schmalen Bildschirmen nur im Footer */
.quick-links { display: flex; gap: 2px; }
.quick-links[hidden] { display: none; }
.quick-links a {
  color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 550; padding: 8px 10px; border-radius: var(--r-pill);
  white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.quick-links a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 720px) { .quick-links { display: none; } }

/* ------------------------------------------------------------------ Mobil */

@media (max-width: 600px) {
  .topbar { padding: 16px 16px 4px; }
  .shell { padding: 8px 16px 28px; }
  .card { padding: 18px; border-radius: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .col-6, .col-4 { grid-column: span 2; } .col-3, .col-2 { grid-column: span 1; }
  .howto { grid-template-columns: 1fr; gap: 8px; }
  .howto li { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; padding: 14px; }
  .howto li::before { grid-row: span 2; margin: 0; }
  .actionbar { margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .actionbar-info { display: none; }
  .actionbar.blocked .actionbar-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .actionbar.blocked .actionbar-info { display: block; text-align: center; font-size: 0.85rem; }
  .actionbar .btn { width: 100%; min-width: 0; }
  .qr { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .option { padding: 16px; gap: 14px; }
  .option-icon { width: 40px; height: 40px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .check-draw { stroke-dashoffset: 0; }
}

/* Mengenanzeige: gelieferte Stückzahl am Bild, „1 von 3“ im Wähler, „Alle“-Abkürzung */
.thumb-wrap { position: relative; flex-shrink: 0; display: inline-flex; }
.qty-badge {
  position: absolute; right: -6px; bottom: -6px; min-width: 24px; height: 22px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--surface); font-size: 0.74rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--surface); font-variant-numeric: tabular-nums;
}
.qty-controls { display: flex; align-items: center; gap: 12px; }
.stepper output { min-width: 64px; white-space: nowrap; }
.stepper output .of { color: var(--muted); font-weight: 500; font-size: 0.85rem; }

/* ------------------------------------------------------------------ Eigener Schritt */
.custom-text { white-space: normal; }
.custom-action { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; text-decoration: none; }
.custom-action svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Regeln: Sperre / Behalten */
.notice-error { background: color-mix(in oklab, #d93025 9%, var(--surface)); border-color: color-mix(in oklab, #d93025 30%, transparent); color: var(--ink); }
.notice-error svg { color: #d93025; }
.notice-keep { background: color-mix(in oklab, var(--brand) 9%, var(--surface)); border-color: color-mix(in oklab, var(--brand) 30%, transparent); }
.notice-keep svg { color: var(--brand); }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag.keep { background: color-mix(in oklab, var(--brand) 14%, transparent); color: var(--ink); }
.kept-card h2 { display: flex; align-items: center; gap: 8px; }
.kept-card h2 svg { color: var(--brand); }
.kept-list { margin: 6px 0 10px; padding-left: 18px; }
.kept-card { margin-bottom: 14px; }

/* ------------------------------------------------------------------ Bezahlung (vorab bezahltes Label) */
.pay-card h2 { display: flex; align-items: center; gap: 8px; }
.pay-card h2 svg { color: var(--brand); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.spinner.big { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--brand); border-right-color: transparent; animation: spin 0.7s linear infinite; margin: 0 auto 14px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ------------------------------------------------------------------ Statusseite */
.status-steps { list-style: none; padding: 0; margin: 18px 0 20px; display: grid; gap: 0; }
.status-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; position: relative; padding-bottom: 18px; color: var(--muted); }
.status-steps li:last-child { padding-bottom: 0; }
.status-steps li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.status-steps li:last-child::before { display: none; }
.status-steps li.done::before { background: var(--brand); }
.status-steps .st-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; }
.status-steps .st-dot svg { width: 14px; height: 14px; stroke-width: 3; }
.status-steps li.done .st-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.status-steps li.current .st-dot { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent); }
.status-steps li.done, .status-steps li.current { color: var(--ink); }
.track-events { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.track-events li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 0.92rem; }
@media (max-width: 520px) { .track-events li { grid-template-columns: 1fr; gap: 2px; } }

/* ------------------------------------------------------------------ Abgabestellen */
.dropoff-card h2 { display: flex; align-items: center; gap: 8px; }
.dropoff-card h2 svg { color: var(--brand); }
.dropoffs { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.dropoffs a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: inherit; transition: border-color 0.2s, background 0.2s; }
.dropoffs a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.do-main, .do-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.do-side { text-align: right; flex: none; }
.qr-prominent { border: 2px dashed color-mix(in oklab, var(--brand) 45%, transparent); border-radius: 16px; padding: 14px; }

/* ------------------------------------------------------------------ Fotos */
.photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb, .photo-add { position: relative; width: 76px; height: 76px; border-radius: 12px; flex: none; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.photo-busy { display: grid; place-items: center; border: 1px dashed var(--line-strong); }
.photo-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink, #222); color: var(--surface, #fff); font-size: 15px; line-height: 1; display: grid; place-items: center; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  border: 1.5px dashed var(--line-strong); color: var(--muted); font-size: 11px; text-align: center; padding: 4px;
  transition: border-color 0.2s, color 0.2s; }
.photo-add:hover, .photo-add:focus-within { border-color: var(--brand); color: var(--brand); }
.photo-add svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.photo-busy .spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand); border-right-color: transparent; animation: spin 0.7s linear infinite; }

/* ------------------------------------------------------------------ Visuelle Artikelauswahl */
.item .thumb { width: 84px; height: 84px; border-radius: 14px; transition: transform 0.3s var(--ease); }
.item.selected .thumb { transform: scale(1.03); }
.reason-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.reason-tile {
  font: inherit; font-size: 0.86rem; font-weight: 550; line-height: 1.25; color: var(--ink-2); text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 78px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s var(--ease), box-shadow 0.2s;
}
.reason-tile svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: color 0.2s; }
.reason-tile:hover { border-color: var(--ink-2); }
.reason-tile:hover svg { color: var(--brand); }
.reason-tile:active { transform: scale(0.97); }
.reason-tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.reason-tile[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--surface); box-shadow: var(--shadow-sm); }
.reason-tile[aria-pressed='true'] svg { color: var(--brand); }
.sel-summary { display: inline-flex; align-items: center; gap: 12px; }
.sel-thumbs { display: inline-flex; }
.mini-thumb { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--muted); box-shadow: var(--shadow-sm); }
.mini-thumb + .mini-thumb { margin-left: -10px; }
@media (max-width: 600px) {
  .item .thumb { width: 68px; height: 68px; }
  .reason-tiles { grid-template-columns: 1fr 1fr; }
  .reason-tile { flex-direction: row; align-items: center; min-height: 0; padding: 11px 12px; gap: 10px; }
  .reason-tile svg { width: 20px; height: 20px; flex: none; }
}

/* ------------------------------------------------------------------ Darstellung je Mandant */
:root[data-theme='light'] { color-scheme: light; }
/* Schriften: nur Systemschriften (nichts wird nachgeladen) */
:root[data-font='rounded'] { --font: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Nunito, 'Varela Round', 'Segoe UI Variable Text', system-ui, sans-serif; }
:root[data-font='serif'] { --font: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif; }
:root[data-font='geometric'] { --font: 'Avenir Next', Avenir, Montserrat, 'Century Gothic', 'Segoe UI Variable Display', system-ui, sans-serif; }
/* Ecken */
:root[data-radius='sharp'] { --r-lg: 6px; --r-md: 6px; --r-sm: 4px; --r-pill: 6px; }
:root[data-radius='round'] { --r-lg: 30px; --r-md: 22px; --r-sm: 16px; }
.reason-tile, .photo-thumb, .photo-thumb img, .photo-add, .item .thumb, .dropoffs a { border-radius: var(--r-sm); }
/* Hintergrundbild oben, weich ausgeblendet */
.has-hero .backdrop::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 420px;
  background: var(--hero-img) center / cover no-repeat; opacity: var(--hero-opacity, 0.32);
  -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent);
}

/* ------------------------------------------------------------------ Testmodus */
.test-banner { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; font-size: 0.85rem; text-align: left; background: var(--warn-soft); color: var(--warn-ink);
  border-bottom: 1px solid color-mix(in oklab, var(--warn-ink) 25%, transparent); }
.test-banner svg { width: 18px; height: 18px; flex: none; }

/* Bildstärke; der Schleier in Hintergrundfarbe sichert den Kontrast unabhängig vom Motiv */
:root[data-hero='subtle'] { --hero-opacity: 0.18; }
:root[data-hero='medium'] { --hero-opacity: 0.32; }
:root[data-hero='strong'] { --hero-opacity: 0.55; }
.has-hero .backdrop::after {
  content: ''; position: absolute; inset: 0 0 auto; height: 420px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--bg) 35%, transparent), transparent 85%);
}
/* Texte direkt auf dem Bild: kräftigere Farbe und weicher Schein in Hintergrundfarbe (wirkt wie ein lokaler Kontrastrahmen) */
.has-hero .lead, .has-hero .eyebrow, .has-hero h1, .has-hero .quick-links a, .has-hero .badges, .has-hero .brand-name {
  text-shadow: 0 0 2px var(--bg), 0 0 8px var(--bg), 0 0 18px var(--bg);
}
.has-hero .lead { color: var(--ink-2); }
.has-hero .quick-links a { color: var(--ink-2); background: color-mix(in oklab, var(--surface) 70%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ------------------------------------------------------------------ Größenberatung */
.size-tip { align-items: center; flex-wrap: wrap; border: 1px solid color-mix(in oklab, var(--brand) 30%, transparent);
  background: color-mix(in oklab, var(--brand) 7%, var(--surface)); }
.size-tip > svg { color: var(--brand); }
.size-tip > span { flex: 1 1 220px; }
.size-tip .size-swap { min-height: 40px; padding: 0 16px; font-size: 0.88rem; flex: none; margin-left: auto; }
.size-tip.chosen { background: var(--ok-soft); border-color: color-mix(in oklab, var(--ok) 35%, transparent); }
.size-tip.chosen > svg { color: var(--ok); }

/* ------------------------------------------------------------------ Umtausch-Versand */
.exchange-timing { margin: -6px 0 16px; }
.exchange-timing.immediate { background: var(--ok-soft); }
.exchange-timing.immediate svg { color: var(--ok); }

/* ------------------------------------------------------------------ Dein Geld (Statusseite) */
.money-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.money-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.money-amount { text-align: right; font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.money-state { font-size: 0.72rem; font-weight: 650; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.money-row.done .money-state { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.money-row.processing .money-state { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }

/* ------------------------------------------------------------------ Hilfe-Dialog */
.help-link { cursor: pointer; }
.help-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 0; border-radius: var(--r-lg); padding: 22px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.help-dialog::backdrop { background: rgb(10 10 14 / 0.45); backdrop-filter: blur(3px); }
.help-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.help-head h2 { margin: 0; }
.icon-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 15px; }
.faq { display: grid; gap: 8px; margin-bottom: 18px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 12px; color: var(--ink-2); font-size: 0.93rem; }
.help-form { border-top: 1px dashed var(--line); padding-top: 14px; gap: 12px; }
.help-form h3 { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------------------------------------------ Verpackungshinweise */
.packing-card h2 { display: flex; align-items: center; gap: 8px; }
.packing-card h2 svg { color: var(--brand); }
.pack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pack-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; color: var(--ink-2); }
.pack-list li::before { content: ''; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.pack-list li:has(img)::before { display: none; }
.pack-list img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); flex: none; }
.pack-item { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.pack-item > strong { display: block; margin-bottom: 8px; }

/* ------------------------------------------------------------------ Teilerstattung (eigener Schritt) */
.partial-amount { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; }
.partial-amount strong { font-size: 1.05rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.partial-item.accepted .partial-amount strong { color: var(--ok); }
.partial-note { margin: -4px 0 0; }

/* ------------------------------------------------------------------ Fotos in eigenen Schritten und zum Paket */
.custom-photos { margin-top: 18px; }
.packed-photo h2 { display: flex; align-items: center; gap: 8px; }
.packed-photo h2 svg { width: 18px; height: 18px; color: var(--brand); }

/* ------------------------------------------------------------------ Mehrere Bestellungen */
.order-head { margin: 10px 2px 0; font-size: 0.95rem; color: var(--ink-2); }
.add-order { margin-top: 14px; }
.add-order-form { margin-top: 10px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface); }

/* ------------------------------------------------------------------ Versand-Berater */
.advice-card h2 { display: flex; align-items: center; gap: 8px; }
.advice-card h2 svg { color: var(--brand); }
.advice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.advice-list a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: inherit; }
.advice-list a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.advice-list a > span:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.advice-list svg { width: 16px; height: 16px; color: var(--muted); flex: none; }

/* ------------------------------------------------------------------ Umtausch gegen andere Artikel */
.catalog-panel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.catalog-search { position: relative; display: block; }
.catalog-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.catalog-search .input { padding-left: 38px; width: 100%; }
.catalog-results { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow: auto; }
.catalog-product { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--bg, transparent); }
.catalog-product .thumb { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.catalog-product .chip:disabled { opacity: 0.45; cursor: not-allowed; }
.catalog-empty { display: flex; justify-content: center; padding: 14px; }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -3px; }
.catalog-diff > svg { color: var(--ok); }
