/* Markenübersicht (lib/brands.js): Fenster je Bereich auf der Startseite (<dialog>, public/assets/js/brands.js), Abschnitt „Marken nach
   Bereichen“ im Ausstellerverzeichnis (Ziel der Links ohne JavaScript) und Portal → Firmenprofil → Marken.
   Geladen auf Startseite, Verzeichnis und Firmenprofil. Keine Inline-Stile (CSP).
   Logos seit 25.10.2026 in voller Farbe (Jacek: „warum ist LEDTEK grau?“): LEDTEK in Tinte, Marken aus dem Hallenplan (.bo-logo) in ihrer Fassung auf
   heller bzw. dunkler Kachel (.is-dark), keine Platzhalter mehr. Logos, die Aussteller im Portal hochladen (.bo-img), sind schon beim Hochladen grau
   (lib/brands.js greyLogo, Jacek 19.10.2026: „Marken automatisch umbauen auf grau“). */
.br-n { display: inline-block; padding: .15em .65em; border-radius: var(--r-pill); background: var(--stone-2); font-size: var(--fs-xs); font-weight: 600;
  line-height: 1.4; letter-spacing: var(--tr-body); text-transform: none; color: var(--ink-2); }

/* ---------- Liste der Marken (Fenster und Verzeichnis) ---------- */
.bo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bo-item { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line);
  border-radius: var(--r-m); background: var(--paper); }
.bo-tile { display: grid; place-items: center; min-height: 64px; padding: 10px; border: 1px solid var(--hairline); border-radius: var(--r-s); background: var(--paper);
  overflow: hidden; text-align: center; }
.bo-tile img { max-width: 100%; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.bo-tile .logo-ledtek { width: min(112px, 90%); height: auto; color: var(--ink); }
.bo-tile.is-dark { background: #1D1A24; border-color: #1D1A24; }   /* LOGO_TILE_DARK (lib/profile.js) */
.bo-tile.is-name span { font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; letter-spacing: .02em; color: var(--muted); overflow-wrap: anywhere; }
.bo-meta { display: grid; gap: 3px; min-width: 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
.bo-name { font-size: var(--fs-base); color: var(--ink); overflow-wrap: anywhere; }
.bo-ex a { font-weight: 600; }
.bo-web { font-size: var(--fs-s); overflow-wrap: anywhere; }
.bo-note, .bo-none { margin: 10px 0 0; font-size: var(--fs-s); line-height: 1.5; color: var(--ink-2); }
.bo-none { margin-top: 0; }
@media (max-width: 480px) {
  .bo-item { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 8px; }
  .bo-tile { min-height: 56px; padding: 8px; }
  .bo-tile img { max-height: 26px; }
}

/* ---------- Fenster auf der Startseite (wie die Erklärfenster .kpi-pop: Lila-Linie oben, weich, Schleier) ----------
   Am Handy als Blatt von unten. Inhalt scrollt im Fenster, die Seite dahinter nicht. */
.br-dlg { box-sizing: border-box; width: min(42rem, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0;
  border-top: 4px solid var(--lila); border-radius: var(--r-l); background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(22, 19, 29, .28); overflow: hidden; }
.br-dlg[open] { display: flex; flex-direction: column; animation: br-in .18s ease-out; }
.br-dlg::backdrop { background: rgba(22, 19, 29, .45); }
@keyframes br-in { from { opacity: 0; transform: translateY(10px); } }
.br-dlg-in { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(20px, 3vw, 30px); }
.br-dlg-head { position: relative; padding-right: 52px; margin-bottom: 16px; }
.br-dlg-k { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
.br-dlg-n { letter-spacing: var(--tr-body); text-transform: none; }
.br-dlg-t { margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.br-dlg .kpi-x { top: -4px; right: -4px; width: 44px; height: 44px; }
.br-dlg-foot { display: grid; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.br-dlg-foot .more { justify-self: start; }
html.br-lock { overflow: hidden; }
html:has(.br-dlg[open]) { overflow: hidden; }       /* getrennt: ohne :has fiele sonst auch die Regel darüber weg */
@media (max-width: 640px) {
  .br-dlg { width: 100%; max-height: 88%; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; }
  .br-dlg-in { padding: 18px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) { .br-dlg[open] { animation: none; } }

/* ---------- Ausstellerverzeichnis: Marken nach Bereichen (Anker #marken-led …) ---------- */
.bo-dir h2 { margin-bottom: .3em; }
/* Spaltensatz statt Raster (Jacek 25.10.2026: keine Leerflächen): ein langer Bereich links, die kürzeren rechts untereinander */
.bo-dir-groups { columns: 440px 2; column-gap: 16px; margin-top: clamp(16px, 2vw, 24px); }
.bo-dir-g { break-inside: avoid; margin-bottom: 16px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--stone); scroll-margin-top: calc(var(--hdr-h) + 16px); }
.bo-dir-g:target { box-shadow: 0 0 0 2px var(--lila); }
.bo-dir-g h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--fs-s); font-weight: 600; line-height: 1.3;
  letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-2); }
#marken { scroll-margin-top: calc(var(--hdr-h) + 16px); }

/* ---------- Portal → Firmenprofil → Marken ---------- */
.pt-brands { margin-top: clamp(16px, 2.4vw, 28px); }
.pt-brand-n { margin: 0 0 10px; }
.pt-brand-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.pt-brand { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px 20px; align-items: start; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--r-m); background: var(--paper); scroll-margin-top: calc(var(--hdr-h) + 16px); }
.pt-brand.is-rejected { background: var(--stone); }
.pt-brand-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 12px; }
.pt-brand-state .help { margin: 0; }
.pt-brand-reason { flex-basis: 100%; font-size: var(--fs-sm); color: var(--ink); }
.pt-brand-prev { display: grid; place-items: center; min-height: 92px; padding: 12px; border: 1px solid var(--hairline); border-radius: var(--r-s); background: var(--paper);
  overflow: hidden; }
.pt-brand-prev img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.pt-brand-prev.is-empty { border: 1.5px dashed var(--line-2); background: var(--stone); font-size: var(--fs-s); font-weight: 600; color: var(--ink-2); }
.pt-brand-ui { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pt-brand-logo .help { margin: 6px 0 0; }
.pt-brand-form .note, .pt-brand-add .note { margin-bottom: 12px; }
.pt-brand-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.pt-brand-actions { gap: 8px; }
.pt-brand-err ul { margin: 6px 0 0; padding-left: 1.2em; }
.pt-brand-add { padding: 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r-m); scroll-margin-top: calc(var(--hdr-h) + 16px); }
.pt-brand-add h3.pt-sub { margin-top: 0; }
.pt-brand-help { margin: 14px 0 10px; }
@media (max-width: 640px) { .pt-brand { grid-template-columns: minmax(0, 1fr); padding: 12px; } }
