/* ═══════════════════════════════════════════════════════════════════════════
   SANCTARUM — Handel
   Marktplatz, Scannen, Verkaufen, Kasse. Dieselbe Welt, andere Aufgabe:
   hier wird gearbeitet, nicht bewundert. Also dichter und ruhiger — aber
   aus denselben Materialien wie der Saal (sanctarum.css).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Ansichtswechsel ──────────────────────────────────────────────────── */
.view { display: none; }
.view.on { display: block; animation: viewin .45s var(--ease-out); }
@keyframes viewin { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
[data-motion="reduced"] .view.on { animation: none; }

/* ── Werkbank ─────────────────────────────────────────────────────────── */
.field { display: grid; gap: 7px; }
.field > label { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--stone); border: 1px solid var(--edge); color: var(--ink);
  font-family: var(--sans); font-size: 15px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.input:focus { outline: none; border-color: var(--gold); background: var(--stone-2); }
select.input { cursor: pointer; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .two { grid-template-columns: 1fr } }

/* ── Angebotskachel ───────────────────────────────────────────────────── */
.offer { position: relative; display: flex; flex-direction: column; gap: 12px; }
.offer__meta { display: flex; flex-direction: column; gap: 5px; }
.offer__name { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.15; }
.offer__sub { font-size: 11.5px; color: var(--ink-3); }
.offer__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.offer__price { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.offer__est { font-size: 10.5px; color: var(--ink-3); }
.watch {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(4,5,10,.62); border: 1px solid var(--edge); backdrop-filter: blur(8px);
  font-size: 14px; line-height: 1; cursor: pointer; transition: all .3s var(--ease);
}
[data-theme="light"] .watch { background: rgba(255,255,255,.72); }
.watch:hover { border-color: var(--gold); transform: scale(1.08); }
.watch[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }

/* ── Merkmalstafel ────────────────────────────────────────────────────── */
.facets { display: grid; gap: 1px; background: var(--edge); border-radius: 14px; overflow: hidden; }
.facet { display: grid; grid-template-columns: 40% 1fr; gap: 14px; padding: 12px 16px; background: var(--stone); align-items: center; }
.facet dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.facet dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.facet--low dd::after { content: ' ⚠'; color: var(--r4); }

/* ── Preisfeld ────────────────────────────────────────────────────────── */
.pricebox {
  border-radius: 18px; padding: 22px; border: 1px solid var(--edge-2);
  background: linear-gradient(160deg, var(--glass-2), transparent 55%), var(--stone);
}
.pricebox__val { font-family: var(--serif); font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.priceline { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 20px 0; }
.priceline b { font-family: var(--serif); font-size: 42px; font-weight: 600; letter-spacing: -.03em; }

/* ── Scanfeld ─────────────────────────────────────────────────────────── */
.dropzone {
  position: relative; display: grid; place-items: center; gap: 14px; text-align: center;
  min-height: 420px; padding: 40px; border-radius: var(--r-xl); cursor: pointer; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 38%, var(--lamp-soft), transparent 70%), var(--stone);
  border: 1.5px dashed var(--edge-2); transition: border-color .3s var(--ease), background .3s var(--ease);
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--gold);
  background: radial-gradient(70% 60% at 50% 38%, var(--lamp-soft), transparent 62%), var(--stone-2);
}
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .26; }
.dropzone__ring {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gilt); color: var(--void); font-size: 32px; box-shadow: 0 0 60px -14px var(--gold);
}
[data-theme="light"] .dropzone__ring { color: #FFF9EC; }
.scanline {
  position: absolute; left: 0; right: 0; height: 2px; background: var(--gilt); opacity: 0;
  box-shadow: 0 0 22px 5px color-mix(in srgb, var(--gold) 55%, transparent);
}
.dropzone.is-busy .scanline { opacity: 1; animation: sweep 1.5s var(--ease) infinite; }
@keyframes sweep { 0% { top: 3% } 50% { top: 97% } 100% { top: 3% } }

.conf { display: inline-flex; gap: 3px; vertical-align: 1px; }
.conf i { width: 14px; height: 4px; border-radius: 3px; background: var(--stone-3); }
.conf i.on { background: var(--gilt); }

/* ── Vertrauensblock ──────────────────────────────────────────────────── */
.trust { display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: var(--stone); border: 1px solid var(--edge); }
.trust > div { display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); align-items: flex-start; line-height: 1.55; }
.trust b { color: var(--ink); font-weight: 700; }

/* ── Verkäufer ────────────────────────────────────────────────────────── */
.seller { display: flex; gap: 15px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--edge); }
.seller__ava {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--gilt); color: var(--void); font-family: var(--serif); font-weight: 600; font-size: 18px;
}
[data-theme="light"] .seller__ava { color: #FFF9EC; }

/* ── Der Schlüssel ────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr } }
/* Drei Stufen: auto-fit statt drei fester Spalten, sonst entstehen bei rund
   900 px drei Spalten à 280 px, in denen jede Merkmalzeile umbricht. */
.plans--drei { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.plan {
  padding: 30px; border-radius: var(--r-l); border: 1px solid var(--edge);
  background: linear-gradient(155deg, var(--glass-2), transparent 50%), var(--stone);
  display: flex; flex-direction: column; gap: 18px;
}
.plan--key { border: 1.5px solid transparent;
  background: linear-gradient(var(--stone), var(--stone)) padding-box, var(--gilt) border-box; }
.plan__price { font-family: var(--serif); font-size: 46px; font-weight: 600; letter-spacing: -.03em; }
.plan__price small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; font-family: var(--sans); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.plan li { display: flex; gap: 11px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.plan li::before { content: '◆'; color: var(--gold); font-size: 10px; padding-top: 4px; }
.savings {
  padding: 18px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--r4) 40%, transparent);
  background: color-mix(in srgb, var(--r4) 9%, transparent);
}

/* ── Pflichtangaben am Bestellknopf ───────────────────────────────────────
   § 312j Abs. 2 BGB und § 356 BGB verlangen beides „unmittelbar" vor der
   Bestellung. Deshalb sitzt der Block zwischen Leistungsliste und Knopf und
   ist bewusst NICHT zusammenklappbar: Was man erst aufklappen muss, steht
   nicht unmittelbar da.

   Ruhige Darstellung, kein Warnton — es ist eine Angabe, keine Hürde. */
.pflicht {
  display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--edge); background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.pflicht__zu { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; }
.pflicht__zu input {
  /* 18px und ein eigener Rand: Das Standardkästchen ist auf dunklem Grund
     kaum zu sehen, und ein Haken, den niemand findet, sperrt den Knopf ohne
     erkennbaren Grund. */
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--gold); cursor: pointer;
}
.pflicht__zu a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Gesperrt heißt sichtbar gesperrt — sonst hält man den Knopf für kaputt. */
.plan .btn[disabled],
.kasse-abo .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── Handyansicht am Schreibtisch ─────────────────────────────────────────
   Ein eingebettetes Fenster in Telefongröße. Es hat sein eigenes
   Ansichtsfenster, also greifen darin dieselben Haltepunkte wie auf einem
   echten Gerät — ohne dass eine CSS-Regel verdoppelt werden muss.

   Der Rahmen ist bewusst schlicht: kein nachgezeichnetes Telefon mit Kerbe
   und Knöpfen. Die Attrappe würde vom Inhalt ablenken und wäre in einem Jahr
   das falsche Modell. */
.geraet{
  position:fixed;inset:0;z-index:850;
  display:grid;grid-template-rows:auto 1fr;gap:14px;
  place-items:center;padding:18px;
  background:color-mix(in srgb,var(--void) 88%,transparent);
  backdrop-filter:blur(18px);
  overflow:auto;
}
.geraet__leiste{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:center}
.geraet__rahmen{
  border:1px solid var(--edge-2);border-radius:34px;overflow:hidden;
  box-shadow:var(--shadow-deep);background:var(--void);
  /* Passt sich herunter, wenn das Fenster kleiner ist als das nachgestellte
     Gerät — sonst ragte der Rahmen aus dem Bild und man sähe genau das
     nicht, was man prüfen will. */
  max-width:100%;max-height:100%;
}
.geraet__rahmen iframe{width:100%;height:100%;border:0;display:block}

/* ── Betriebsübersicht ────────────────────────────────────────────────────
   Kacheln, die sich nach dem Platz richten statt nach einer festen Spaltenzahl:
   Auf dem Handy zwei, am Schreibtisch acht. Eine feste Zahl sähe auf einem der
   beiden Geräte immer falsch aus. */
.mod-kacheln {
  display: grid; gap: 12px; margin-bottom: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.mod-kacheln .case { margin: 0; }

/* ── Eigene Bezahlseite ───────────────────────────────────────────────────
   Eine Spalte, damit die Reihenfolge auch auf dem Handy die des Gesetzes
   bleibt: erst was bestellt wird, dann womit gezahlt wird, dann die
   Pflichtangaben, dann der Knopf. Nebeneinander ginge „unmittelbar davor"
   verloren. */
.kasse-abo { display: grid; gap: 18px; max-width: 44rem; }

/* Stripe zeichnet in diese Behälter iframes. Ein Mindestmaß verhindert, dass
   die Seite beim Laden springt — und dass jemand auf einen Knopf klickt, der
   gleich woanders sitzt. */
#kd-element, #ra-element, #pay-element { min-height: 1px; }
#pay-element:not(:empty) { margin-top: 14px; }
#ra-element:not(:empty) { margin-top: 14px; }

/* ── Kasse ────────────────────────────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 830; display: grid; place-items: center; padding: 26px;
  background: rgba(4,5,10,.82); backdrop-filter: blur(20px); animation: fade .3s var(--ease);
}
[data-theme="light"] .sheet { background: rgba(237,231,218,.9); }
.sheet__box {
  position: relative; width: min(540px, 100%); max-height: 90vh; overflow-y: auto; padding: 32px;
  border-radius: var(--r-l); background: var(--stone); border: 1px solid var(--edge-2);
  box-shadow: var(--shadow-deep); animation: sheetin .4s var(--ease-out);
}
@keyframes sheetin { from { transform: translateY(20px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet__x {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--edge); color: var(--ink-2); font-size: 15px;
}
.sheet__x:hover { border-color: var(--edge-2); color: var(--ink); }

.flow { display: grid; margin-top: 22px; }
.flow__step { position: relative; padding: 13px 0 13px 32px; }
.flow__step::before {
  content: ''; position: absolute; left: 5px; top: 19px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gilt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 16%, transparent);
}
.flow__step:not(:last-child)::after {
  content: ''; position: absolute; left: 10px; top: 32px; bottom: -6px; width: 1px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 45%, transparent), transparent);
}
.flow__step b { display: block; font-size: 14px; }
.flow__step span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

/* ── Meldungen ────────────────────────────────────────────────────────── */
.toaster { position: fixed; bottom: 26px; left: 50%; translate: -50% 0; z-index: 900; display: grid; gap: 8px; }
.toast {
  padding: 13px 22px; border-radius: 999px; background: var(--stone-3); border: 1px solid var(--edge-2);
  box-shadow: var(--shadow-deep); font-size: 13.5px; font-weight: 600; animation: sheetin .3s var(--ease) backwards;
}

/* ── Filter & Auswahl ─────────────────────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.filters--scroll::-webkit-scrollbar { display: none; }

/* flex-shrink steht ohne Angabe auf 1. In einem nowrap-Behälter, der zu schmal
   ist, schrumpfen die Knöpfe also — der Text bricht um, und ein Knopf mit
   border-radius:99px und drei Zeilen ist eine Ellipse. Genau das stand auf dem
   Handy: "Alle Kategorien" als goldenes Ei.
   Sie sollen nicht schrumpfen, sondern hinausragen; dafür ist das overflow-x
   darüber da. Ohne diese Zeile ist es wirkungslos, weil nie etwas herausragt. */
.filters--scroll .pill { flex: 0 0 auto; white-space: nowrap; }
.select {
  padding: 9px 15px; border-radius: 99px; background: var(--stone); border: 1px solid var(--edge);
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: var(--sans);
}

/* ── Verhandlung & Rückfrage ──────────────────────────────────────────────
   Beide sitzen im Angebotsdetail und sollen sich als Nebenweg lesen, nicht
   als Hauptweg: gedämpfter Grund, kein Gold, keine Betonung. Der Kaufknopf
   bleibt der lauteste Punkt der Seite. */
.verhandlung, .rueckfrage {
  margin-top: 20px; padding: 18px 20px; border-radius: 16px;
  background: var(--stone); border: 1px solid var(--edge);
}
.verhandlung--fest { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }

.verhandlung__lauf { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.verhandlung__lauf li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.verhandlung__lauf b { font-size: 16px; }

.chip--angenommen { color: var(--r1); border-color: color-mix(in srgb, var(--r1) 45%, transparent); }
.chip--abgelehnt, .chip--abgelaufen { color: var(--ink-3); }
.chip--gekontert { color: var(--ink-3); text-decoration: line-through; }

.rueckfrage__liste { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 14px; }
.rueckfrage__liste p { margin-top: 3px; font-size: 14.5px; line-height: 1.6; }
.rueckfrage textarea { width: 100%; resize: vertical; }

/* Fehlermeldungen der beiden Blöcke: leer heißt unsichtbar, nicht Lücke. */
#v-fehler:empty, #f-fehler:empty { display: none; }
#v-fehler, #f-fehler { color: var(--r4); }

/* ── Rechtstexte ──────────────────────────────────────────────────────── */
.legal { max-width: 760px; }
.legal h3 { font-size: 19px; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 20px; display: grid; gap: 8px; margin: 12px 0; }
.legal code { background: var(--stone-3); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* Verarbeitungsverzeichnis: auf schmalen Geräten scrollt die Tabelle,
   statt die Spalten unlesbar zu quetschen. */
.legal .tab { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; display: block; overflow-x: auto; }
.legal .tab th, .legal .tab td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--edge); vertical-align: top; }
.legal .tab th { color: var(--ink-3); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.legal .tab td { color: var(--ink-2); line-height: 1.55; }

/* ── Leerzustand & Kennzahlen ─────────────────────────────────────────── */
.empty { text-align: center; padding: 56px 24px; }
.empty__glyph { font-size: 46px; opacity: .45; }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.statcell { padding: 20px 22px; border-radius: 18px; background: var(--stone); border: 1px solid var(--edge); }
.statcell b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.statcell span { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }
.statcell--gold {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%), var(--stone);
}
.statcell--gold b { background: var(--gilt); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Fortschrittsreihe im Album ───────────────────────────────────────── */
.setrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px 0;
  border-bottom: 1px solid var(--edge); align-items: center; }
.setrow:last-child { border-bottom: 0; }
.setrow__bar { grid-column: 1 / -1; height: 7px; border-radius: 99px; background: var(--stone-3); overflow: hidden; }
.setrow__bar i { display: block; height: 100%; border-radius: 99px; background: var(--gilt); transition: width 1.2s var(--ease-out); }
.setrow__gap { font-size: 12.5px; color: var(--r4); font-weight: 700; }

/* ── Warenkorb ────────────────────────────────────────────────────────── */
.tool--korb { position: relative; text-decoration: none; }
.tool--korb b {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 99px; background: var(--gilt); color: var(--void);
  font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
[data-theme="light"] .tool--korb b { color: #FFF9EC; }

.korbgruppe { padding: 24px; border-radius: var(--r-l); border: 1px solid var(--edge);
  background: linear-gradient(155deg, var(--glass-2), transparent 50%), var(--stone); margin-bottom: 20px; }
.korbkopf { display: flex; align-items: center; gap: 14px; justify-content: space-between;
  flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--edge); margin-bottom: 4px; }
.korbzeile { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 14px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--edge); }
.korbzeile:last-of-type { border-bottom: 0; }
.korbzeile__bild { width: 44px; aspect-ratio: 63/88; border-radius: 5px; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--aura, var(--r0)) 50%, transparent);
  background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--aura, var(--r0)) 34%, transparent), var(--stone-3));
  font-family: var(--serif); font-size: 12px; font-weight: 600; }
.korbzeile__name { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.korbzeile__sub { font-size: 11.5px; color: var(--ink-3); }
.korbzeile__preis { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.korbzeile__weg { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--edge);
  color: var(--ink-3); font-size: 13px; }
.korbzeile__weg:hover { border-color: var(--r4); color: var(--r4); }
.korbsumme { display: grid; gap: 7px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--edge-2); }
.korbsumme div { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--ink-2); }
.korbsumme div.gesamt { font-size: 17px; color: var(--ink); font-weight: 700; padding-top: 6px; }
.sparhinweis { margin-top: 14px; padding: 12px 16px; border-radius: 12px; font-size: 12.5px; font-weight: 600;
  color: var(--r4); border: 1px solid color-mix(in srgb, var(--r4) 38%, transparent);
  background: color-mix(in srgb, var(--r4) 9%, transparent); }
