/* ================================================================
   Shop-Ergänzungen zu schukom.css (gleiche Variablen/Farben)
   ================================================================ */

:root {
  --input-bg: #1a1a22; --chip-bg: #2a2a35; --chip-hover: #35353f; --footer-bg: #09090b; --price-sale: #ff7fc0;
  --ok-bg: #12301a; --ok-fg: #8fe0a2; --ok-bd: #2c6b3b; --warn-bg: #3a2a0c; --warn-fg: #ffd27a;
  --err-bg: #3a1224; --err-fg: #ffd3e6; --err-bd: #8a2a52; --info-bg: #10283f; --info-fg: #8cc8ff;
  --sp: 14px;
}
[data-theme="light"] {
  --bg-dark: #f3f3ef; --bg-card: #ffffff; --bg-section: #e4eed9;
  --text-light: #18181c; --text-muted: #5a5a63; --border-color: #d9d9e0; --green: #3d7508; --green-mid: #b9d3a0;
  --input-bg: #f2f2f6; --chip-bg: #ebebf1; --chip-hover: #dedee8; --footer-bg: #e8e8ee; --price-sale: #b50066;
  --ok-bg: #e0f3e3; --ok-fg: #1d6a2d; --ok-bd: #9ccfa7; --warn-bg: #fff1d1; --warn-fg: #8a5a00;
  --err-bg: #fde3ee; --err-fg: #8f1b4e; --err-bd: #eba5c4; --info-bg: #dcecfb; --info-fg: #1b5a96;
  color-scheme: light;
}
:root:not([data-theme="light"]) { color-scheme: dark; }

/* Aktions-Banner (klein, ganz oben) */
.promo-banner {
  background: var(--magenta);
  color: var(--text-light);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  letter-spacing: .2px;
}

a { color: var(--green); }

/* Produktkarten-Raster (wächst mit der Produktzahl) */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}
.shop-grid .grid-column { flex: none; }

.card-kind {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  font-weight: bold;
  margin-bottom: 6px;
}
.card-desc { color: var(--text-muted); font-size: 14px; line-height: 1.7; flex: 1; margin-bottom: 18px; }
.card-desc p, .card-desc ul, .card-desc ol, .card-desc blockquote { margin: 0 0 .7em; }
.card-desc ul, .card-desc ol { padding-left: 1.3em; }
.card-desc h3, .card-desc h4 { color: var(--text-light); font-size: 15px; margin: .8em 0 .3em; }
.card-desc strong { color: var(--text-light); }
.card-desc blockquote { border-left: 3px solid var(--green); padding-left: 12px; font-style: italic; }

.card-image-box { position: relative; }
.cover-missing { color: #555; font-size: 14px; }

/* Banderole „Blick ins Heft“ (diagonal, oben links auf dem Cover) */
.ribbon-peek {
  position: absolute;
  top: 26px;
  left: -48px;
  width: 200px;
  transform: rotate(-45deg);
  background: var(--green);
  color: #0e0e10;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  padding: 7px 0;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
  z-index: 3;
  transition: background .15s, color .15s;
}
.ribbon-peek:hover, .ribbon-peek:focus-visible { background: #fff; color: var(--magenta-dark); }

/* Preise */
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.price { font-size: 22px; font-weight: 800; color: var(--text-light); }
.price-sale { color: var(--price-sale); }
.price-old { color: var(--text-muted); font-size: 14px; }
.sale-pill { background: var(--magenta); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.price-note { color: var(--text-muted); font-size: 12px; }

/* Buttons als <button> im Stil von .btn-action */
button.btn-action { border: 0; cursor: pointer; font-family: inherit; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.muted { color: var(--text-muted); }

/* Tabellen (Warenkorb, Admin) */
.shop-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.shop-table th, .shop-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: middle; font-size: 14px; }
.shop-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.shop-table .r { text-align: right; }
.shop-table tr.total td { font-weight: 800; font-size: 16px; border-bottom: 0; }
.shop-table small { color: var(--text-muted); }

/* Formulare */
input, select, textarea {
  font: inherit; color: var(--text-light); background: var(--input-bg);
  border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 9px 11px; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { accent-color: var(--magenta); width: 18px; height: 18px; vertical-align: -3px; padding: 0; }
input[type=number].qty { width: 70px; }
.form-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 22px; margin: 20px 0; }
.form-card h2 { font-size: 18px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-muted); }
.field input, .field select, .field textarea { width: 100%; }
.check { display: block; margin: 12px 0; font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.check input { margin-right: 8px; }

.pay-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.pay-option { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.pay-option h3 { font-size: 16px; }
.pay-option p { color: var(--text-muted); font-size: 13px; flex: 1; margin: 0; }

.flash { background: #12301a; border: 1px solid #2c6b3b; color: #cdeed3; padding: 10px 14px; border-radius: var(--radius); margin: 14px 0; }
.flash.err { background: #3a1224; border-color: #8a2a52; color: #ffd3e6; }
.notice { background: var(--input-bg); border-left: 4px solid var(--green); padding: 14px 18px; font-size: 14px; color: var(--text-muted); border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; }
.footer-note { color: var(--text-muted); font-size: 13px; }

/* Viewer-Seite: Kaufleiste */
.buy-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 0 0 18px; padding: 12px 16px; background: rgba(0,0,0,.25); border: 1px solid var(--green-mid); border-radius: var(--radius); }
.buy-bar .price { font-size: 20px; }
.viewer-wrapper .header-text h1 { font-size: 1.4rem; }

/* ---------------- Admin ---------------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-tabs a { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border-color); color: var(--text-muted); text-decoration: none; font-size: 14px; }
.admin-tabs a.active { background: var(--magenta); border-color: var(--magenta); color: #fff; font-weight: 700; }
.thumb { height: 56px; width: auto; border-radius: 4px; background: var(--chip-bg); }
.rt-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rt-toolbar button { background: var(--chip-bg); color: var(--text-light); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.rt-toolbar button:hover { background: var(--magenta-dark); }
.rt-editor { min-height: 140px; max-height: 360px; overflow: auto; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; line-height: 1.6; color: var(--text-light); }
.rt-editor:focus { outline: 2px solid var(--green); }
.rt-editor p, .rt-editor ul, .rt-editor ol { margin: 0 0 .7em; }
.rt-editor ul, .rt-editor ol { padding-left: 1.4em; }
.badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--chip-bg); color: var(--text-muted); }
.badge.ok { background: #12301a; color: #8fe0a2; }
.badge.warn { background: #3a2a0c; color: #ffd27a; }
.badge.off { background: #3a1224; color: #ffb3d4; }
button.small { padding: 5px 12px; font-size: 12px; }
form.inline { display: inline; }

@media (max-width: 480px) {
  .shop-grid { grid-template-columns: 1fr; }
  .ribbon-peek { font-size: 12px; }
}

@media print { .navbar, footer, .promo-banner { display: none; } }

.field .check { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; }
.field .check input { margin: 0; }
.btn-action.small { padding: 5px 12px; font-size: 12px; }
.shop-table td.r { white-space: nowrap; }

/* Produktseite, Kasse, Konto */
.card-desc p { margin: 0 0 8px; }
.card-content h3 a { color: inherit; text-decoration: none; }
.card-content h3 a:hover { text-decoration: underline; }
.more-link { display: inline-block; margin: 2px 0 10px; font-size: 14px; }
.card-image-box > a { display: block; }
.product-page { display: grid; grid-template-columns: minmax(220px, 380px) 1fr; gap: 32px; align-items: start; }
@media (max-width: 720px) { .product-page { grid-template-columns: 1fr; } }
.product-info h1 { margin: 4px 0 10px; }
.product-desc { margin: 16px 0; line-height: 1.6; }
.buy-box { margin: 18px 0; padding: 16px; border: 1px solid rgba(128,128,128,.4); border-radius: 8px; background: rgba(255,255,255,.04); }
.qty-label { margin-right: 10px; }
.invoice-hint { margin: 12px 0 0; font-size: 14px; }
.buy-notes { margin: 14px 0 0 18px; font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
form.inline { display: inline; }
.pay-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid rgba(128,128,128,.4); border-radius: 8px; margin: 10px 0; cursor: pointer; }
.pay-choice input { margin-top: 4px; }
.account-hint { font-size: 15px; }
.main-container.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.pw-meter { height: 6px; background: rgba(128,128,128,.3); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s; }
.order-box { border: 1px solid rgba(128,128,128,.4); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.order-items { margin: 8px 0 8px 18px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.step { padding: 3px 10px; border-radius: 12px; background: rgba(128,128,128,.25); color: var(--text-muted); font-size: 13px; }
.step.done { background: #12301a; color: #8fe0a2; }

.badge.stage-1 { background: #3a2a0c; color: #ffd27a; }
.badge.stage-2 { background: #12301a; color: #8fe0a2; }
.badge.stage-3 { background: #10283f; color: #8cc8ff; }
.badge.stage-4 { background: #12301a; color: #8fe0a2; }
.product-desc p { margin: 0 0 12px; }
.card-image-box > a .cover-missing { text-decoration: none; }

/* ================================================================
   Einheitliches, kompaktes Layout (Shop, Kasse, Konto, Admin)
   ================================================================ */
.main-container { margin: 26px auto; }
.section-title { font-size: 24px; margin-bottom: 18px; }
h2 { font-size: 17px; }
.btn-primary, .btn-primary:hover { color: #fff; }
.btn-secondary { background-color: var(--chip-bg); }
.btn-secondary:hover { background-color: var(--chip-hover); }
.promo-banner { color: #fff; }
footer { background-color: var(--footer-bg); margin-top: 48px; padding: 36px 20px 16px; }
.footer-bottom { border-top-color: var(--border-color); color: var(--text-muted); margin-top: 24px; }
.footer-social a { color: var(--text-muted); }
.card-image-box { background-color: var(--input-bg); }
.cover-missing { color: var(--text-muted); }
.flash { background: var(--ok-bg); border-color: var(--ok-bd); color: var(--ok-fg); padding: 9px 14px; margin: 12px 0; }
.flash.err { background: var(--err-bg); border-color: var(--err-bd); color: var(--err-fg); }
.badge { background: var(--chip-bg); color: var(--text-muted); }
.badge.ok, .badge.stage-2, .badge.stage-4 { background: var(--ok-bg); color: var(--ok-fg); }
.badge.warn, .badge.stage-1 { background: var(--warn-bg); color: var(--warn-fg); }
.badge.off { background: var(--err-bg); color: var(--err-fg); }
.badge.stage-3 { background: var(--info-bg); color: var(--info-fg); }
.step.done { background: var(--ok-bg); color: var(--ok-fg); }

/* Kopfzeile: Icons + Schalter */
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a { padding: 6px 10px; }
.nav-links a.btn-shop { padding: 7px 14px; color: #fff; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important; border-radius: 50%; color: var(--text-light); }
.nav-icon:hover { background: var(--chip-bg); }
.nav-icon svg { width: 20px; height: 20px; }
.theme-switch { position: relative; display: inline-block; margin-left: 4px; cursor: pointer; }
.theme-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.ts-track { display: flex; align-items: center; justify-content: space-between; width: 52px; height: 28px; padding: 0 6px; border-radius: 99px; background: var(--chip-bg); border: 1px solid var(--border-color); position: relative; color: var(--text-muted); }
.ts-track svg { width: 14px; height: 14px; position: relative; z-index: 1; }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-card); box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .2s; }
.theme-switch input:checked + .ts-track .ts-knob { transform: translateX(24px); }
.ts-moon { color: #c9d4ff; } .ts-sun { color: #e0a000; }
[data-theme="dark"] .ts-moon, [data-theme="light"] .ts-sun { color: #222; }
.theme-switch input:focus-visible + .ts-track { outline: 2px solid var(--green); outline-offset: 2px; }

/* Info-i */
.info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin: 0 0 0 4px; padding: 0; border-radius: 50%; border: 1px solid var(--text-muted); background: none; color: var(--text-muted); font: italic 700 11px/1 Georgia, serif; cursor: help; vertical-align: 1px; text-transform: none; letter-spacing: 0; }
.info:hover, .info:focus-visible { background: var(--green); border-color: var(--green); color: #fff; outline: none; }
.info-tip { position: absolute; z-index: 1000; padding: 9px 12px; background: var(--bg-card); color: var(--text-light); border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(0,0,0,.35); font-size: 13px; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; pointer-events: none; }
.info-tip[hidden] { display: none; }

/* Karten, Formulare, Tabellen: kompakt und gleichmäßig */
.form-card { padding: 16px 18px; margin: var(--sp) 0; }
.form-card h2 { font-size: 16px; margin: 0 0 12px; }
.form-card h3 { font-size: 14px; margin: 0 0 10px; }
.form-card > :last-child { margin-bottom: 0; }
.form-grid { gap: 10px 14px; align-items: end; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { gap: 4px; font-size: 12.5px; }
.field:has(> input[type=checkbox]), .field:has(> input[type=radio]) { flex-direction: row; align-items: center; gap: 8px; }
.field input[type=checkbox], .field input[type=radio] { width: 18px; flex: none; }
input, select, textarea { padding: 7px 10px; font-size: 14px; }
textarea { line-height: 1.45; }
.check { margin: 10px 0; font-size: 13.5px; }
.btn-group { gap: 8px; margin-top: 14px; align-items: center; }
.form-card .btn-group:first-child { margin-top: 0; }
.shop-table { margin: var(--sp) 0; }
.form-card .shop-table { margin: 0 0 10px; }
.shop-table th, .shop-table td { padding: 8px 12px; font-size: 13.5px; }
.shop-table th { font-size: 11.5px; }
.shop-table tr.total td { font-size: 15px; }
.btn-action { padding: 9px 15px; }
.btn-action.small, button.small { padding: 4px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14.5px; }
.admin-tabs { gap: 6px; margin-bottom: 18px; }
.admin-tabs a { padding: 6px 14px; font-size: 13.5px; }
body.admin .section-title { text-align: left; font-size: 21px; margin-bottom: 14px; }
body.admin .main-container { margin-top: 18px; }
body.admin .muted { font-size: 13px; }
.rt-toolbar button { padding: 4px 10px; font-size: 12.5px; }

/* Warenkorb / Kasse / Konto */
.pay-choice { display: flex; align-items: flex-start; gap: 12px; padding: 11px 14px; margin: 8px 0; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--input-bg); }
.pay-choice:has(input:checked) { border-color: var(--magenta); }
.pay-choice input { flex: none; margin: 2px 0 0; }
.pay-choice small { color: var(--text-muted); display: block; margin-top: 2px; font-size: 12.5px; }
.account-hint { padding: 12px 16px; font-size: 14px; }
.order-box { border-color: var(--border-color); background: var(--input-bg); padding: 11px 14px; margin: 10px 0; }
.order-head { margin-bottom: 4px; }
.order-items { margin: 4px 0 6px 18px; }

/* Produktseite */
.product-page { gap: 28px; }
.product-info h1 { font-size: 26px; margin: 2px 0 8px; }
.product-desc { margin: 12px 0 16px; line-height: 1.65; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; margin: 16px 0 12px; border: 1px solid var(--border-color); background: var(--bg-card); border-radius: var(--radius-lg); }
.buy-box .qty-label { margin: 0; font-size: 14px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 8px; }
.buy-box .invoice-hint { flex-basis: 100%; margin: 0; font-size: 13.5px; color: var(--text-muted); }
.linklike { color: var(--green); background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.buy-notes { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-muted); }
.buy-notes li { padding: 4px 0 4px 20px; position: relative; }
.buy-notes li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.card-content { padding: 20px; }
.card-content h3 { font-size: 18px; margin-bottom: 8px; }
.card-desc { margin-bottom: 12px; }
@media (max-width: 560px) { .nav-links { gap: 2px; } .ts-track { width: 48px; } .theme-switch input:checked + .ts-track .ts-knob { transform: translateX(20px); } }
.btn-shop { color: #fff !important; }

.field > .lbl { display: block; line-height: 1.35; }
.form-card > .check:only-child { margin: 0; }
.form-card > .check + .check { margin-top: 8px; }
details > summary { cursor: pointer; font-size: 15px; font-weight: 700; line-height: 1.4; }
details > summary strong { font-size: inherit; }
details[open] > summary { margin-bottom: 12px; }
details.form-card, form.form-card > details { margin: 0; }
body.admin .btn-group { justify-content: flex-start !important; }
body.admin h1.section-title + .btn-group { margin: 0 0 14px; }
.shop-table td small { font-size: 12px; }
body.admin p.muted[style*="text-align:center"] { text-align: left !important; }
.card-image-box > a { text-decoration: none; }

/* Banderole heller, Cover-Hintergrund wie Footer */
.ribbon-peek { background: #b4e04f; color: #14230a; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.ribbon-peek:hover, .ribbon-peek:focus-visible { background: #fff; color: var(--magenta-dark); }
.card-image-box { background-color: var(--footer-bg); }
.card-image-box > a:not(.ribbon-peek) { background-color: transparent; }
.cover-missing { color: var(--text-muted); }

/* Einheitliche Formularfelder: gleiche Höhe, 3 gleich breite Spalten */
.form-grid.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid.cols3 { grid-template-columns: 1fr; } }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select { height: 38px; box-sizing: border-box; }
.field textarea { box-sizing: border-box; min-height: 76px; resize: vertical; }
.form-grid .field { align-self: end; }
.card-image-box > a.ribbon-peek { background: #b4e04f; color: #14230a; }
.card-image-box > a.ribbon-peek:hover, .card-image-box > a.ribbon-peek:focus-visible { background: #fff; color: var(--magenta-dark); }

/* Buchhaltung: anklickbare Positionen, Unter-Reiter */
.pos-link { color: var(--text-light); text-decoration: none; border-bottom: 1px dotted var(--text-muted); }
.pos-link:hover { color: var(--green); border-bottom-color: var(--green); }
.pos-link.on { color: var(--green); font-weight: 700; }
.shop-table tr.sel td { background: var(--ok-bg); }
.cat-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cat-links .pos-link { border: 1px solid var(--border-color); border-radius: 99px; padding: 3px 12px; background: var(--input-bg); }
.cat-links .pos-link.on { border-color: var(--green); }
.filter-chip { margin: 0 0 10px; font-size: 13.5px; }
.sub-tabs { margin: 18px 0 4px; }
.shop-table small { white-space: normal; }

/* Belegerkennung */
.ocr-panel { grid-column: 1 / -1; margin: 6px 0 4px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--input-bg); font-size: 13.5px; }
.ocr-panel.ok { border-color: var(--ok-bd); }
.ocr-panel.warn { border-color: var(--warn-fg); }
.ocr-head { margin-bottom: 6px; }
.ocr-table { width: auto; border-collapse: collapse; margin: 4px 0 8px; }
.ocr-table th { text-align: left; font-weight: 500; color: var(--text-muted); padding: 2px 18px 2px 0; }
.ocr-table td { padding: 2px 0; font-weight: 600; }
.ocr-warn { margin: 4px 0; color: var(--warn-fg); font-size: 13px; }
.ocr-panel pre { white-space: pre-wrap; max-height: 220px; overflow: auto; font-size: 12px; background: var(--bg-card); padding: 8px; border-radius: 6px; }
.ocr-panel details { margin-top: 8px; }
.field.suggested input, .field.suggested select { border-color: var(--green); box-shadow: 0 0 0 2px var(--ok-bg); }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--border-color); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* Symbol-Buttons (Stift, ×) – Symbol mittig im Klickfeld, nebeneinander */
.btn-action.btn-icon, td form.inline > button.btn-action.small { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px; padding: 0 8px; line-height: 1; vertical-align: middle; }
td form.inline { display: inline-block; margin: 0; }

/* Admin-Layout (Boxen einklappen / anordnen) */
.lay-head { cursor: pointer; position: relative; padding-right: 26px; }
/* Einheitliche Ausklapp-Dreiecke VOR der Überschrift (Admin) */
body.admin .lay-head, body.admin details.collapse > summary, body.admin details.form-card > summary { list-style: none; display: flex; align-items: center; }
body.admin details > summary::-webkit-details-marker { display: none; }
body.admin .lay-head::before, body.admin details.collapse > summary::before, body.admin details.form-card > summary::before {
  content: ''; flex: none; width: 0; height: 0; margin-right: 10px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; transition: transform .15s; }
body.admin details[open] > summary::before, body.admin .lay-box:not(.lay-collapsed) > .lay-head::before { transform: rotate(90deg); }
body.admin .lay-head { padding-right: 0; }
.lay-collapsed > .lay-body { display: none; }
.lay-collapsed > .lay-head { margin-bottom: 0; }
.lay-hidden { display: none !important; }
.lay-edit .lay-hidden { display: block !important; opacity: .45; border-style: dashed; }
.lay-pen { margin-left: auto; align-self: center; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; line-height: 1; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text-muted); font-size: 15px; cursor: pointer; opacity: .55; }
.lay-pen:hover, .lay-edit .lay-pen { opacity: 1; border-color: var(--border-color); }
.lay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 16px; padding: 8px 12px; border: 1px dashed var(--border-color); border-radius: var(--radius); font-size: 13px; color: var(--text-muted); }
.lay-bar[hidden] { display: none; }
.lay-bar span { flex: 1 1 240px; }
.lay-edit .lay-box { position: relative; }
.lay-tools { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; padding: 4px 8px; border-radius: 6px; background: rgba(128,128,128,.12); font-size: 12.5px; }
.lay-tools .lay-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lay-tools button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; padding: 0; border: 1px solid var(--border-color); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; line-height: 1; }
.lay-tools button:disabled { opacity: .3; cursor: default; }
.lay-tools label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ================================================================
   Blick ins Heft – Viewer im Shop-Look (Kopierschutz unverändert)
   ================================================================ */
.viewer-page.info-section { background: var(--bg-dark); margin-top: 0; padding: 28px 16px 40px; }
.viewer-page .viewer-wrapper { max-width: 980px; padding: 0; }
.viewer-page .header { padding: 0 0 14px; }
.viewer-page .header-text h1 { color: var(--text-light); font-size: 1.6rem; margin: 0 0 4px; }
.viewer-page .header-text p { color: var(--text-muted); font-size: .95rem; margin: 0; }

.viewer-page .buy-bar { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 12px 16px; margin: 0 0 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.viewer-page .buy-bar .btn-group { display: flex; gap: 10px; margin: 0; }
.bb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; min-width: 42px; padding: 0 16px; box-sizing: border-box; border-radius: var(--radius); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.bb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bb-primary { background: var(--magenta); color: #fff; border: 1px solid var(--magenta); }
.bb-primary:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); }
.bb-secondary { background: var(--bg-card); color: var(--text-light); border: 1px solid var(--border-color); }
.bb-secondary:hover { background: var(--chip-hover); }
.bb-primary .bb-label { display: none; }
@media (max-width: 480px) { .bb-secondary .bb-label { display: none; } .bb-secondary { padding: 0; width: 42px; } }

/* Viewer-Karte */
.viewer-page .stage { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 6px 24px rgba(0,0,0,.12); overflow: hidden; }
.viewer-page .topbar { background: var(--bg-card); color: var(--text-light); border: 0; border-bottom: 1px solid var(--border-color); border-radius: 0; padding: 10px 16px; }
.viewer-page .topbar .title-label { font-weight: 700; font-size: .95rem; }
.viewer-page .topbar .pg { color: var(--text-muted); font-size: .82rem; }
.viewer-page .zoom-btn { background: var(--chip-bg); border: 1px solid var(--border-color); color: var(--text-light); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.viewer-page .zoom-btn:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.viewer-page .book-scene { background: var(--input-bg); border: 0; padding: 18px 14px; box-sizing: border-box; }
.viewer-page .pages-wrapper { box-shadow: 0 6px 22px rgba(0,0,0,.28); border-radius: 3px; overflow: hidden; }
.viewer-page .spine { top: 18px; bottom: 18px; }
.viewer-page .nav-bar { background: var(--bg-card); border: 0; border-top: 1px solid var(--border-color); border-radius: 0; padding: 12px 16px; }
.viewer-page .nav-btn { background: var(--magenta); border-radius: 999px; padding: 8px 20px; font-weight: 600; }
.viewer-page .nav-btn:disabled { background: var(--chip-bg); color: var(--text-muted); opacity: .6; }
.viewer-page .page-display { color: var(--text-muted); font-weight: 600; }
.viewer-page .hint { color: var(--text-muted); font-size: .8rem; }
.viewer-page .loading-screen { color: var(--text-muted); }

/* Lupen-Modal: Bedienelemente im Shop-Look */
.zoom-controls { background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.zoom-ctrl-btn { color: var(--text-light); border-color: var(--border-color); }
.zoom-ctrl-btn:hover { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.zoom-label { color: var(--text-muted); }
.zoom-divider { background: var(--border-color); }
.zoom-page-btn { background: var(--chip-bg); border-color: var(--border-color); color: var(--text-light); border-radius: 999px; }
.zoom-page-btn:hover, .zoom-page-btn.active { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.zoom-controls #zoomReset { border-radius: 999px !important; }
.range-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.range-row .field { flex: 0 0 auto; }
.range-row select, .range-row input[type=date] { width: auto; min-width: 0; padding: 6px 10px; font-size: 14px; }
.range-row input[type=date] { width: 150px; }

/* Rechtstexte (AGB, Datenschutz, Haftungsausschluss) */
.legal-hero { text-align: center; padding: 34px 16px 10px; }
.legal-hero h1 { font-size: 1.8rem; margin: 0 0 6px; color: var(--text-light); }
.legal-hero p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.legal-wrap { max-width: 820px; margin: 0 auto; padding: 22px 16px 56px; }
.legal-toc, .legal-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px 22px; margin-bottom: 28px; }
.legal-toc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--text-muted); margin: 0 0 8px; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 2rem; line-height: 2; font-size: 14px; }
.legal-toc a { color: var(--text-muted); text-decoration: none; }
.legal-toc a:hover { color: var(--magenta); }
.legal-sec { margin-bottom: 34px; scroll-margin-top: 20px; }
.legal-sec h2 { font-size: 1.1rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); color: var(--text-light); }
.legal-sec h2 .nr { color: var(--magenta); font-size: inherit; margin-right: 8px; }
.legal-sec h3 .n3 { color: var(--magenta); margin-right: 6px; }
.legal-sec h3 { font-size: .95rem; margin: 18px 0 6px; color: var(--text-light); }
.legal-sec p, .legal-sec li { font-size: 14px; line-height: 1.8; color: var(--text-muted); }
.legal-sec p { margin: 0 0 12px; }
.legal-sec ul { margin: 6px 0 14px 20px; padding: 0; }
.legal-sec a, .legal-box a { color: var(--link, var(--magenta)); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 18px; }
.legal-table th, .legal-table td { border: 1px solid var(--border-color); padding: 8px 12px; text-align: left; vertical-align: top; color: var(--text-muted); }
.legal-table th { background: var(--bg-card); color: var(--text-light); }
@media (max-width: 600px) { .legal-toc ol { columns: 1; } }
