/* TrioMi Binder Art – Editor (iframe im Shop). Aufbau und Farben wie der Deck-Editor; hell/dunkel nach System. */
:root {
  --bg: #0e1013; --panel: #161a1f; --panel-2: #1d2229; --tief: #0f1216; --line: #2a3039;
  --text: #eef1f4; --muted: #8f99a6; --accent: #00c4a7; --green: #22C55E; --warn: #FBBF24; --err: #f87171;
  --ok-text: #99f6e4; --err-text: #fecaca; --warn-text: #fde68a;
  --blatt: #1b2027; --blatt-rand: #313844; --steg: rgba(255, 255, 255, .13); --schatten: rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f1ec; --panel: #ffffff; --panel-2: #f1efe9; --tief: #f6f4ef; --line: #dcd8cf;
    --text: #17191c; --muted: #5f6772; --accent: #00a08a; --green: #15803d; --warn: #a16207; --err: #dc2626;
    --ok-text: #0f766e; --err-text: #b91c1c; --warn-text: #854d0e;
    --blatt: #e9e6df; --blatt-rand: #cfcabf; --steg: rgba(0, 0, 0, .13); --schatten: rgba(40, 30, 10, .25);
    color-scheme: light;
  }
  .tc-row { color: #3a4048 !important; }
  .tc-row a { color: #0f766e !important; }
  .tc-consent.missing .tc-row.req { color: #b91c1c !important; }
  .te-leiste { --te-grund: rgba(0, 0, 0, .04); --te-rand: rgba(0, 0, 0, .12); --te-preis: #00a08a; --te-preis-text: #fff; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: transparent; }
body { color: var(--text); font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }

.bn-einstieg { max-width: 1100px; margin: 0 auto 12px; }
.bn-app {
  display: grid; grid-template-columns: 310px minmax(0, 1fr) 320px; gap: 20px;
  padding: 20px 0; background: transparent; max-width: 1540px; margin: 0 auto;   /* kein eigener Kasten – Seitenhintergrund läuft durch */
}
.bn-col { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; align-self: start; }
.bn-badge { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: rgba(0, 196, 167, .12); border: 1px solid rgba(0, 196, 167, .35); padding: 3px 10px; border-radius: 99px; }
.bn-h { margin: -4px 0 0; font-size: 19px; }
.bn-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.bn-muted { color: var(--muted); font-size: 12.5px; margin: 0; }
.bn-block { display: flex; flex-direction: column; gap: 8px; }

.bn-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px 12px; text-align: center; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: all .2s; }
.bn-drop:hover, .bn-drop.over { border-color: var(--accent); background: rgba(0, 196, 167, .06); }
.bn-drop.klein { padding: 12px; }
.bn-drop.klein .bn-drop-icon { display: none; }
.bn-drop-icon { font-size: 28px; }
.bn-drop-title { font-weight: 700; }
.bn-drop-sub { font-size: 12px; color: var(--muted); }
.bn-up { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.bn-up .bar { height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.bn-up .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.bn-hinweis { font-size: 12.5px; color: var(--muted); background: var(--tief); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.bn-hinweis.err { color: var(--err-text); border-color: rgba(248, 113, 113, .5); }

.bn-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bn-ra { border: 2px solid transparent; background: var(--panel-2); border-radius: 12px; padding: 9px 6px 7px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.bn-ra b { color: var(--text); font-size: 14px; }
.bn-ra.active { border-color: var(--accent); background: rgba(0, 196, 167, .1); }
.bn-ra i { display: grid; gap: 2px; height: 34px; }
.bn-ra i s { display: block; background: var(--muted); border-radius: 1.5px; aspect-ratio: 63.5 / 88; height: 100%; opacity: .75; }
.bn-ra.active i s { background: var(--accent); opacity: 1; }

.bn-wahl { display: flex; flex-direction: column; gap: 8px; }
.bn-opt { text-align: left; border: 2px solid transparent; background: var(--panel-2); border-radius: 12px; padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bn-opt span { font-size: 12.5px; color: var(--muted); }
.bn-opt.active { border-color: var(--accent); background: rgba(0, 196, 167, .1); }
.bn-fein { font-size: 13px; color: var(--muted); }
.bn-fein summary { cursor: pointer; padding: 2px 0; }
.bn-regler { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; color: var(--text); }
input[type=range] { accent-color: var(--accent); width: 100%; }

.bn-btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 700; text-align: center; transition: transform .15s, box-shadow .15s; }
.bn-btn:hover { transform: translateY(-1px); }
.bn-btn.small { padding: 7px 11px; font-size: 13px; }
.bn-btn.ghost { background: transparent; }
.bn-btn.cart { background: linear-gradient(135deg, #10B981, #059669); border: 0; color: #fff; font-size: 16px; font-weight: 800; padding: 15px; box-shadow: 0 4px 20px rgba(16, 185, 129, .4); }
.bn-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Bühne */
.bn-stage { display: flex; flex-direction: column; gap: 12px; align-items: center; min-width: 0; }
.bn-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bn-tab { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 7px 14px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.bn-tab.active { border-color: var(--accent); color: var(--text); background: rgba(0, 196, 167, .14); }
.bn-buehne { width: 100%; display: flex; justify-content: center; }
.bn-leer { width: min(100%, 440px); aspect-ratio: 3 / 4; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); border: 2px dashed var(--line); border-radius: 16px; }

/* Ordnerseite: Blatt mit Taschen; Karten liegen in mm-genauen Abständen (alles in Prozent → passt sich der Breite an) */
.bn-seite { position: relative; width: min(100%, var(--bn-breite, 560px)); background: var(--blatt); border: 1px solid var(--blatt-rand); border-radius: 10px; box-shadow: 0 22px 50px var(--schatten); overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.bn-seite.zieht { cursor: grabbing; }
.bn-seite .geist { position: absolute; opacity: .16; pointer-events: none; max-width: none; }
.bn-seite.zieht .geist { opacity: .4; }
.bn-tasche { position: absolute; border: 1px solid var(--steg); border-radius: 2px; pointer-events: none; }
.bn-k { position: absolute; overflow: hidden; border-radius: 4.7% / 3.4%; background: #0a0c10; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); pointer-events: none; }
.bn-k img { position: absolute; max-width: none; display: block; }
.bn-seite .glanz { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .06) 100%); }
.bn-seite.stoss .glanz, .bn-seite.stoss .bn-tasche { display: none; }
.bn-seite.stoss .bn-k { border-radius: 0; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .35); }
.bn-loch { position: absolute; left: 1.6%; width: 2.2%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); border: 1px solid var(--blatt-rand); pointer-events: none; }

/* Einzelkarten / Rückseiten */
.bn-karten { width: min(100%, var(--bn-breite, 560px)); display: grid; gap: 10px; }
.bn-ek { position: relative; aspect-ratio: 63.5 / 88; border-radius: 4.7% / 3.4%; overflow: hidden; background: #0a0c10; box-shadow: 0 6px 16px var(--schatten); }
.bn-ek img { position: absolute; max-width: none; display: block; }
.bn-ek img.voll { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-ek .nr { position: absolute; left: 6%; top: 4.5%; background: rgba(0, 0, 0, .62); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 99px; }
.bn-ek .rnr { position: absolute; left: 50%; bottom: 6.2%; transform: translateX(-50%); background: rgba(255, 255, 255, .86); color: #111; font-weight: 700; font-size: clamp(6px, 1.5cqw, 9px); line-height: 1.5; padding: 0 5px; border-radius: 99px; white-space: nowrap; }
.bn-karten { container-type: inline-size; }

.bn-zoom { display: flex; align-items: center; gap: 8px; width: min(100%, 440px); }
.bn-rund { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.bn-tipp { font-size: 13px; color: var(--muted); text-align: center; }
.bn-dpi { font-size: 13.5px; text-align: center; max-width: 520px; border-radius: 10px; padding: 8px 12px; border: 1px solid var(--line); background: var(--panel); }
.bn-dpi.gut { color: var(--ok-text); border-color: rgba(0, 196, 167, .4); }
.bn-dpi.warnung { color: var(--warn-text); border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .08); }
.bn-dpi.gesperrt { color: var(--err-text); border-color: rgba(248, 113, 113, .6); background: rgba(248, 113, 113, .1); }

/* Rechts */
.bn-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bn-pill { border: 1px solid var(--line); background: var(--panel-2); border-radius: 99px; padding: 7px 13px; cursor: pointer; font-size: 14px; }
.bn-pill.active { border-color: var(--accent); background: rgba(0, 196, 167, .14); }
.bn-pill small { color: var(--muted); font-size: 12px; }
.bn-backs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bn-back-opt { border: 2px solid transparent; background: var(--panel-2); border-radius: 10px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); text-align: center; }
.bn-back-opt img { width: 100%; aspect-ratio: 63.5 / 88; object-fit: cover; border-radius: 5px; display: block; }
.bn-back-opt.active { border-color: var(--accent); color: var(--text); }
.bn-check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.bn-check input { flex: none; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); }
.bn-check span { color: var(--muted); }
.bn-check b { color: var(--text); }
.bn-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.bn-field input { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.bn-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.bn-price { background: linear-gradient(135deg, rgba(34, 197, 94, .08), rgba(0, 196, 167, .06)); border: 1px solid rgba(34, 197, 94, .3); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.bn-price .lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bn-price .total { font-size: 30px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.bn-price .per { font-size: 13px; color: var(--accent); font-weight: 700; }
.bn-price .meta { font-size: 12.5px; color: var(--muted); }
.bn-price .next { font-size: 12.5px; color: var(--warn-text); margin-top: 4px; }
.bn-info { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; background: var(--tief); border-radius: 10px; padding: 10px 12px; }
.bn-msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--panel-2); }
.bn-msg.err { background: rgba(248, 113, 113, .12); color: var(--err-text); }
.bn-msg.ok { background: rgba(0, 196, 167, .12); color: var(--ok-text); }

@media (max-width: 1150px) {
  .bn-app { grid-template-columns: minmax(0, 1fr) 320px; }
  .bn-stage { grid-column: 1; grid-row: 1 / span 2; }
  .bn-left, .bn-right { grid-column: 2; }
}
@media (max-width: 700px) {
  .bn-stage, .bn-left, .bn-right { grid-column: auto; grid-row: auto; }
  .bn-app { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 14px; border-radius: 14px; }
  /* Handy: erst Bild wählen, dann Vorschau, dann Ausführung; neben der Seite bleibt Platz zum Scrollen */
  .bn-left { order: 1; } .bn-stage { order: 2; } .bn-right { order: 3; }
  .bn-seite, .bn-karten { width: 88%; }
}

/* Section-Einstellung „Hintergrund: transparent“ */
.bg-transparent, .bg-transparent body { background: transparent !important; }
.bg-transparent .bn-app { background: transparent !important; border-radius: 0; box-shadow: none; padding-left: 0; padding-right: 0; }

@media (min-width: 701px) { .bn-stage { align-self: start; } .bn-stage.tss-sticky { position: sticky; top: 16px; } }

/* Erster Schritt: Eigenes Bild / Fertige Szene */
.bn-modus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 760px; margin: 0 auto 12px; }
.bn-mo { text-align: left; border: 2px solid var(--line); background: var(--panel); border-radius: 14px; padding: 11px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bn-mo span { font-size: 12.5px; color: var(--muted); }
.bn-mo.active { border-color: var(--accent); background: rgba(0, 196, 167, .1); }
.bn-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; font: inherit; }

/* Fertige Szene */
.bn-szene { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; padding: 20px; background: var(--bg); border-radius: 20px; max-width: 1540px; margin: 0 auto; }
.bn-sz-suche { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 12px 18px; font-size: 16px; }
.bn-sz-suche:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.bn-sz-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.bn-sz-k { text-align: left; padding: 0; background: var(--panel-2); border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.bn-sz-k.active { border-color: var(--accent); }
/* Nur die Albumseite aus dem Shop-Bild (2000 × 2000) zeigen – gleicher Ausschnitt wie auf /pages/albumseiten */
.bn-sz-k .bild, .bn-sz-bild { position: relative; aspect-ratio: 1244 / 1640; overflow: hidden; background: #0e0f13; }
.bn-sz-k .bild img, .bn-sz-bild img { position: absolute; max-width: none; width: 160.77%; height: auto; left: -30.39%; top: -2.44%; display: block; }
.bn-sz-bild { border-radius: 12px; }
.bn-sz-k .t { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 1px; }
.bn-sz-k b { font-size: 15px; }
.bn-sz-k span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.bn-sz-k em { font-style: normal; font-weight: 800; color: var(--green); font-size: 14px; margin-top: 3px; }
.bn-sz-fuer { font-size: 14px; color: var(--muted); }
.bn-sz-fuer b { color: var(--text); }
.bn-sz-detail { position: sticky; top: 16px; }
.bn-sz-detail #szWahl { display: flex; flex-direction: column; gap: 12px; }
.bn-sz-punkte { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.bn-sz-recht { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.bn-sz-recht a { color: var(--accent); }
.bn-sz-leer { grid-column: 1 / -1; color: var(--muted); padding: 18px; text-align: center; }
.bn-sz-leer a { color: var(--accent); }
@media (max-width: 900px) {
  .bn-szene { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 14px; border-radius: 14px; }
  .bn-sz-detail { position: static; order: -1; }
  .bn-sz-detail .bn-leer { display: none; }
  .bn-sz-raster { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .bn-sz-bild { max-width: 300px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) { .bn-modus { grid-template-columns: 1fr; } }
.bg-transparent .bn-szene { background: transparent !important; border-radius: 0; padding-left: 0; padding-right: 0; }
