/* =====================================================================
   Visitenkarten-Scanner (vs-) und Kontaktfelder (cf-) — docs/visitenkarten-mappe.md
   Partials partials/_card_scanner.php und partials/_contact_fields.php.
   Mobil zuerst (Messe!), große Tippflächen. Läuft im Dashboard-Layout (app.css)
   und im Landing-Layout (app.css + landing.css): Farben über die app.css-Variablen
   mit Rückfallwerten, Dunkelmodus über :root[data-theme="dark"] wie app.css.
   Spalten richten sich nach der Breite des Scanners bzw. Formulars (Container-
   Abfragen) — im Dashboard nimmt die Seitenleiste Platz weg. Ohne Unterstützung
   bleibt es bei der einspaltigen Handy-Ansicht.
   ===================================================================== */

.vs,
.cf {
  --vs-primary: var(--primary, #1d4ed8);
  --vs-on-primary: var(--on-primary, #fff);
  --vs-text: var(--text, #18181b);
  --vs-muted: var(--muted, #6b7280);
  --vs-border: var(--border, #e5e7eb);
  --vs-surface: var(--surface, #fff);
  --vs-bg: var(--bg, #f7f7f9);
  --vs-danger: var(--danger, #dc2626);
  --vs-radius: var(--radius, 14px);
  --vs-shadow: var(--shadow, 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05));
  --vs-soft: #eff6ff;          /* Hintergrund der Symbol-Kacheln */
  --vs-ok-bg: #ecfdf5;
  --vs-ok-text: #065f46;
  --vs-ok-border: #a7f3d0;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .vs,
  .cf { --vs-soft: color-mix(in srgb, var(--vs-primary) 10%, var(--vs-surface)); }
}
:root[data-theme="dark"] .vs,
:root[data-theme="dark"] .cf {
  --vs-soft: #0e1f38;
  --vs-ok-bg: #0e2a1f;
  --vs-ok-text: #6ee7b7;
  --vs-ok-border: #14532d;
}

/* Gesteuert über das hidden-Attribut — Klassen mit display dürfen es nicht aushebeln */
.vs [hidden],
.cf [hidden] { display: none !important; }

/* Nur für Bildschirmleser */
.cf-sr {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Scanner */

.vs {
  max-width: 1120px;
  margin: 0 auto;
  color: var(--vs-text);
  text-align: left;
  container: vs / inline-size;
}
.vs *,
.vs *::before,
.vs *::after { box-sizing: border-box; }

.vs-boot { margin: 0 0 1rem; }
/* Ohne JavaScript steht der <noscript>-Hinweis da — „Der Scanner startet …" wäre dann falsch */
@media (scripting: none) {
  .vs-boot { display: none; }
}
.vs-noscript { margin-bottom: 1rem; }
.vs-noscript a { font-weight: 600; margin-left: .25rem; }

.vs-panel {
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  box-shadow: var(--vs-shadow);
  padding: 1rem;
  margin: 0 0 1rem;
  min-width: 0;
}
@container vs (width >= 600px) {
  .vs-panel { padding: 1.25rem 1.4rem; }
}

.vs-h {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .9rem;
  font-size: 1.12rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--vs-text);
}
.vs-h > i { color: var(--vs-primary); }
.vs-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--vs-primary);
  color: var(--vs-on-primary);
  font-size: .85rem;
  font-weight: 800;
}

.vs-hint {
  margin: .4rem 0 0;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--vs-muted);
}

.vs-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .8rem;
}
.vs-row .btn { min-height: 44px; }

/* Meldung oben (Fehler) mit optionalem Knopf „Erneut versuchen" */
.vs-msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}
.vs-msg .vs-msg-text { flex: 1 1 16rem; }

/* Schritt 1: große Aufnahme-Knöpfe */
.vs-picks {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
}
@container vs (width >= 640px) {
  .vs-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.vs-pick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: .85rem;
  align-items: center;
  width: 100%;
  min-height: 78px;
  margin: 0;
  padding: .9rem 1rem;
  border: 1px solid var(--vs-border);
  border-radius: 14px;
  background: var(--vs-surface);
  color: var(--vs-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.vs-pick:hover { border-color: var(--vs-primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.vs-pick:active { transform: translateY(1px); }
.vs-pick:focus-visible { outline: 3px solid var(--vs-primary); outline-offset: 2px; }
.vs-pick > i {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 12px;
  background: var(--vs-soft);
  color: var(--vs-primary);
  font-size: 1.35rem;
}
.vs-pick-t { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.vs-pick-s { color: var(--vs-muted); font-size: .84rem; line-height: 1.3; }
.vs-pick--main {
  background: var(--vs-primary);
  border-color: var(--vs-primary);
  color: var(--vs-on-primary);
}
.vs-pick--main:hover { border-color: var(--vs-primary); box-shadow: 0 10px 22px -12px rgba(29, 78, 216, .7); }
.vs-pick--main > i { background: rgba(255, 255, 255, .18); color: inherit; }
.vs-pick--main .vs-pick-s { color: inherit; opacity: .85; }
:root[data-theme="dark"] .vs-pick--main > i { background: rgba(0, 0, 0, .14); }

/* Unsichtbare Dateifelder (die Knöpfe öffnen sie) */
.vs-capture { position: relative; }
.vs-file {
  position: absolute !important;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

/* Ziehen & Ablegen nur am Computer anbieten */
.vs-drop-hint { display: none; margin: .7rem 0 0; }
@media (hover: hover) and (pointer: fine) {
  .vs-drop-hint { display: block; }
}
.vs-capture.is-drop {
  outline: 2px dashed var(--vs-primary);
  outline-offset: 4px;
  background: var(--vs-soft);
}

.vs-opts {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
}
@container vs (width >= 720px) {
  .vs-opts { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: start; }
}
.vs-lang label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin: 0 0 .35rem;
}
.vs-lang select { min-height: 44px; font-size: 1rem; }
.vs-tips {
  background: var(--vs-bg);
  border-radius: 12px;
  padding: .75rem .9rem;
  font-size: .9rem;
}
.vs-tips-h { margin: 0; font-weight: 700; }
.vs-tips-h > i { color: #d97706; margin-right: .25rem; }
.vs-tips ul { margin: .35rem 0 0; padding-left: 1.15rem; }
.vs-tips li { margin: .15rem 0; }

.vs-privacy {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1rem 0 0;
  padding: .75rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--vs-ok-border);
  background: var(--vs-ok-bg);
  color: var(--vs-ok-text);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
}
.vs-privacy > i { margin-top: .15rem; flex: none; }
/* Mappe: Hinweis zur eigenen Verantwortung (Text in einem <span>, sonst zerfiele er in Flex-Teile) */
.vs-duty {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: .7rem 0 0;
}
.vs-duty > i { flex: none; margin-top: .2rem; }
.vs-duty a { font-weight: 600; }

/* Live-Kamera */
.vs-cam {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: 68vh;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .vs-cam { aspect-ratio: 4 / 3; max-width: 720px; }
}
.vs-cam video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vs-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, 280px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 18px;
  outline: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  pointer-events: none;
}
.vs-live-hint {
  margin: .7rem 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--vs-text);
  min-height: 1.4em;
}

/* Schritt 2 und 3 */
.vs-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.vs-work > .vs-panel { margin: 0; }
@container vs (width >= 900px) {
  .vs-work {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
  }
  /* Vorschau bleibt beim Scrollen durch das Formular sichtbar (Kopfleiste ≈ 76 px) */
  .vs-recog { position: sticky; top: 92px; }
}

.vs-sides {
  display: flex;
  gap: .35rem;
  margin: 0 0 .6rem;
}
.vs-side {
  flex: 1;
  min-height: 42px;
  padding: .4rem .6rem;
  border: 1px solid var(--vs-border);
  border-radius: 10px;
  background: var(--vs-surface);
  color: var(--vs-muted);
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.vs-side[aria-pressed="true"] {
  background: var(--vs-primary);
  border-color: var(--vs-primary);
  color: var(--vs-on-primary);
}
.vs-side:focus-visible { outline: 2px solid var(--vs-primary); outline-offset: 2px; }

.vs-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--vs-bg);
  border: 1px solid var(--vs-border);
}
.vs-shot {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 38vh;
}
@container vs (width >= 900px) {
  .vs-shot { max-height: 52vh; }
}

.vs-progress { margin-top: .75rem; }
.vs-progress progress {
  display: block;
  width: 100%;
  height: 8px;
  accent-color: var(--vs-primary);
}
.vs:not(.is-busy) .vs-progress progress { display: none; }
.vs-status {
  margin: .45rem 0 0;
  min-height: 1.35em;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--vs-muted);
}
.vs.is-busy .vs-status { color: var(--vs-text); }
.vs.is-busy .vs-status::before {
  content: "";
  display: inline-block;
  width: .9em;
  height: .9em;
  margin-right: .45rem;
  vertical-align: -.12em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vs-spin .8s linear infinite;
}
@keyframes vs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vs.is-busy .vs-status::before { animation: none; border-right-color: currentColor; opacity: .5; }
}
.vs .btn[disabled] { opacity: .5; cursor: not-allowed; }

.vs-result { scroll-margin-top: 92px; }
.vs-source {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}
.vs-source p { margin: 0; }
.vs-form { margin: 0; }

.vs-keep {
  margin: .4rem 0 0;
  padding: .8rem .9rem;
  border: 1px dashed var(--vs-border);
  border-radius: 12px;
}

/* Erkannter Text */
.vs-raw {
  margin-top: 1rem;
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  padding: 0 .9rem;
  background: var(--vs-surface);
}
.vs-raw > summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 46px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.vs-raw > summary::-webkit-details-marker { display: none; }
.vs-raw > summary::after {
  content: "";
  width: .45rem;
  height: .45rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .6;
}
.vs-raw[open] > summary::after { transform: rotate(-135deg); }
.vs-raw > summary > i { color: var(--vs-muted); }
.vs-raw[open] > summary { border-bottom: 1px solid var(--vs-border); margin-bottom: .7rem; }
.vs-raw-body { padding-bottom: .8rem; }
.vs-raw-h {
  margin: .4rem 0 .3rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--vs-muted);
}
.vs-raw-none { margin: 0 0 .6rem; font-size: .88rem; color: var(--vs-muted); }
.vs-lines {
  margin: 0 0 .8rem;
  padding-left: 1.6rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.vs-lines li::marker { color: var(--vs-muted); }
.vs-rest-h { margin: 0 0 .4rem; font-size: .85rem; font-weight: 600; }
.vs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 .6rem;
}
.vs-chip {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--vs-border);
  border-radius: 999px;
  background: var(--vs-bg);
}
.vs-chip button {
  margin: 0;
  border: 0;
  background: none;
  color: var(--vs-text);
  font: inherit;
  font-size: .86rem;
  cursor: pointer;
  min-height: 38px;
}
.vs-chip-add {
  padding: .35rem .75rem;
  text-align: left;
  overflow-wrap: anywhere;
}
.vs-chip .vs-chip-copy {
  flex: none;
  padding: .35rem .65rem;
  border-left: 1px solid var(--vs-border);
  color: var(--vs-muted);
}
.vs-chip button:hover { background: var(--vs-soft); }
.vs-chip button:focus-visible { outline: 2px solid var(--vs-primary); outline-offset: -2px; }
.vs-chip.is-used { opacity: .6; }
.vs-chip.is-used .vs-chip-add::before { content: "✓ "; font-weight: 700; color: var(--success, #16a34a); }

.vs-errors { margin: 1rem 0 0; }
.vs-errors p, .vs-errors ul { margin: 0; }
.vs-errors ul { padding-left: 1.1rem; }
/* Knopf „neuer Tab" (Sitzung abgelaufen bzw. Sperre) — die Angaben bleiben hier stehen */
.vs-errors .vs-err-link { margin: .6rem 0 0; }
.vs .vs-tablink { min-height: 40px; }

/* Aktionen. Mappe: unter 900 px am unteren Rand angeheftet, damit „Speichern" immer
   greifbar ist — drei Knöpfe, höchstens zwei Zeilen (Raster unten). Öffentlich: vier
   Knöpfe am Formularende. */
.vs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}
.vs-actions .btn {
  flex: 1 1 auto;
  min-height: 48px;
}
.vs-actions .vs-main { flex-basis: 100%; font-size: 1rem; }
.vs[data-mode="mappe"] .vs-actions .vs-main { flex: 2 1 12rem; }
.vs[data-mode="mappe"] .vs-actions .btn:not(.vs-main) { flex: 1 1 8rem; }
.vs-save-status {
  flex-basis: 100%;
  margin: 0;
  min-height: 1.3em;
  font-size: .88rem;
  line-height: 1.4;
  color: var(--vs-muted);
}
.vs-save-status:empty { display: none; }
.vs-save-status.is-warn { color: #92400e; font-weight: 600; }
:root[data-theme="dark"] .vs-save-status.is-warn { color: #fcd34d; }
@container vs (width < 900px) {
  /* Angeheftet als Raster statt Umbruch — mit drei Knöpfen und Support-Blase brach die Leiste
     am Handy in drei Zeilen um (rund 190 px über dem Formular). Unter 600 px zwei Zeilen: oben
     „In der Mappe speichern", darunter „Speichern & nächste Karte" und „Nächste Karte" nur als
     Symbol (der Name bleibt für Screenreader, .vs-act-t); ab 600 px eine Zeile. Die Statuszeile
     bekommt erst gefüllt eine eigene Zeile (leer: display none, keine Rasterzeile). */
  .vs[data-mode="mappe"] .vs-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main main" "savenext next";
    gap: .8rem .6rem;
    margin: 1rem -1rem -1rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
    background: var(--vs-surface);
    border-top: 1px solid var(--vs-border);
    border-radius: 0 0 var(--vs-radius) var(--vs-radius);
    box-shadow: 0 -8px 18px -14px rgba(0, 0, 0, .35);
  }
  .vs[data-mode="mappe"] .vs-actions .vs-main { grid-area: main; }
  .vs[data-mode="mappe"] .vs-actions [data-vs-act="savenext"] { grid-area: savenext; text-align: center; }
  .vs[data-mode="mappe"] .vs-actions [data-vs-act="next"] {
    grid-area: next;
    min-width: 48px;
    padding-left: .85rem;
    padding-right: .85rem;
    border-color: var(--vs-border); /* als Symbol sonst kaum als Knopf erkennbar */
  }
  .vs[data-mode="mappe"] .vs-actions .vs-save-status { grid-column: 1 / -1; }
  .vs[data-mode="mappe"] .vs-actions .vs-act-t {
    position: absolute;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}
@container vs (600px <= width < 900px) {
  .vs[data-mode="mappe"] .vs-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas: "main savenext next";
    margin: 1rem -1.4rem -1.25rem;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
}
/* Feste Knöpfe des Layouts nicht überdecken: Support-Blase unten rechts (_support.php) — Abstand
   hält nur die unterste Zeile („Nächste Karte" bzw. die Statuszeile), „Speichern" darüber bleibt
   breit (der Zeilenabstand hebt es über die Blase); „Cookie-Einstellungen" unten links
   (_consent.php, nur wenn die Seite keinen eigenen hat) */
@container vs (width < 900px) {
  body:has(#vc-support) .vs[data-mode="mappe"] .vs-actions [data-vs-act="next"] { margin-right: 4rem; }
  body:has(#vc-support) .vs[data-mode="mappe"] .vs-actions .vs-save-status { padding-right: 4rem; }
  body:has(> a[data-cc="show-preferencesModal"]) .vs[data-mode="mappe"] .vs-actions {
    padding-bottom: calc(2.1rem + env(safe-area-inset-bottom, 0px));
  }
}
@container vs (width >= 900px) {
  .vs-actions .btn,
  .vs-actions .vs-main,
  .vs[data-mode="mappe"] .vs-actions .vs-main,
  .vs[data-mode="mappe"] .vs-actions .btn:not(.vs-main) { flex: 0 1 auto; }
}

/* QR-Code fürs Handy (immer dunkel auf weiß, auch im Dunkelmodus) */
.vs-qrbox {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  text-align: center;
}
.vs-qrcode { display: flex; justify-content: center; }
.vs-qr-svg {
  display: block;
  width: min(100%, 320px);
  height: auto;
  background: #fff;
  border-radius: 8px;
}
.vs-qrmsg {
  max-width: 34rem;
  margin: .75rem auto 0;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--vs-muted);
}

/* ---------------------------------------------------------- Kontaktfelder */

.cf {
  color: var(--vs-text);
  container: cf / inline-size;
}
.cf-group {
  min-width: 0;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
}
.cf-legend {
  margin: 0 0 .55rem;
  padding: 0;
  font-size: .95rem;
  font-weight: 700;
  color: var(--vs-text);
}
.cf-legend > i { width: 1.15rem; margin-right: .3rem; text-align: center; color: var(--vs-primary); }

.cf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .7rem;
}
.cf-grid--2,
.cf-grid--person,
.cf-grid--meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cf-grid--company .cf-f--wide { grid-column: 1 / -1; }
@container cf (width >= 440px) {
  .cf-grid--company { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cf-grid--meta .cf-f--check { grid-column: 1 / -1; }
@container cf (width >= 600px) {
  .cf-grid--person { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(0, .8fr); }
  .cf-grid--meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; align-items: end; }
  .cf-grid--meta .cf-f--check { grid-column: auto; }
}
@container cf (width < 330px) {
  .cf-grid--2,
  .cf-grid--person,
  .cf-grid--meta { grid-template-columns: minmax(0, 1fr); }
}

.cf-f { min-width: 0; margin: 0; }
.cf-f > label {
  display: block;
  margin: 0 0 .3rem;
  font-size: .85rem;
  font-weight: 600;
}
/* 16 px: iOS vergrößert sonst beim Antippen jedes Feld */
.cf input,
.cf select,
.cf textarea {
  font-size: 1rem;
  min-height: 44px;
  margin: 0;
}
.cf textarea { min-height: 84px; line-height: 1.45; }
.cf input[type="checkbox"] { min-height: 0; }
.cf-hint {
  margin: .3rem 0 0;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--vs-muted);
}

/* Wiederholbare Zeilen */
.cf-rows {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.cf-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr) auto;
  gap: .45rem;
  align-items: center;
}
.cf-type,
.cf-val,
.cf-mini {
  display: block;
  min-width: 0;
  margin: 0;
  font-weight: 400;
}
.cf-type select { padding-right: .4rem; }
.cf-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vs-border);
  border-radius: 10px;
  background: var(--vs-surface);
  color: var(--vs-muted);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.cf-del:hover { color: var(--vs-danger); border-color: var(--vs-danger); }
.cf-del:focus-visible,
.cf-add:focus-visible { outline: 2px solid var(--vs-primary); outline-offset: 2px; }
.cf-add {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  margin: .5rem 0 0;
  padding: .5rem .85rem;
  border: 1px dashed var(--vs-border);
  border-radius: 10px;
  background: none;
  color: var(--vs-primary);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.cf-add:hover { border-color: var(--vs-primary); background: var(--vs-soft); }

/* Anschrift: eigene Kachel je Anschrift */
.cf-row--addr {
  display: block;
  padding: .7rem;
  border: 1px solid var(--vs-border);
  border-radius: 12px;
  background: var(--vs-bg);
}
.cf-addr-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .55rem;
}
.cf-addr-top .cf-type { flex: 1 1 auto; max-width: 15rem; }
.cf-addr-top .cf-del { margin-left: auto; }
.cf-addr {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
  gap: .55rem;
}
.cf-addr-street,
.cf-addr-country { grid-column: 1 / -1; }
@container cf (width >= 640px) {
  .cf-addr { grid-template-columns: minmax(0, 2fr) minmax(5.5rem, 7rem) minmax(0, 1.5fr) minmax(0, 1.1fr); }
  .cf-addr-street,
  .cf-addr-country { grid-column: auto; }
}
.cf-mini > span {
  display: block;
  margin-bottom: .2rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--vs-muted);
}

/* Häkchen (Favorit, Foto aufbewahren) */
.cf-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
}
.cf-check input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--vs-primary);
}
.cf-check .fa-star { color: #f59e0b; }
