/* Shopserver – bewusst ohne externe Schriften oder Skripte (keine Datenuebertragung an Dritte) */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #00102e;
  --muted: #5f6775;
  --line: #d9dfe8;
  /* Links und Umrandungen: die Hauptfarbe, fuer gute Lesbarkeit auf Weiss etwas abgedunkelt */
  --accent: color-mix(in srgb, var(--brand, #478dbe) 72%, #00102e);
  --accent-ink: var(--brand-ink, #ffffff);
  --band: var(--brand-dark, #333945);
  --band-ink: var(--brand-dark-ink, #ffffff);
  --key: #ffd84a;
  --key-ink: #2a2200;
  --danger: #b42318;
  --ok: #17713f;
  --warn: #9a5b00;
  --radius: 10px;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #161c27;
    --surface: #1f2735;
    --ink: #e8ecf3;
    --muted: #9ba7ba;
    --line: #344054;
    --accent: color-mix(in srgb, var(--brand, #478dbe) 45%, white);
    --accent-ink: #0d1730;
    --danger: #ff9b8f;
    --ok: #6fd39b;
    --warn: #f0b860;
  }
}
/* Von Hand gewaehlte dunkle Darstellung – dieselben Werte wie oben */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #161c27;
  --surface: #1f2735;
  --ink: #e8ecf3;
  --muted: #9ba7ba;
  --line: #344054;
  --accent: color-mix(in srgb, var(--brand, #478dbe) 45%, white);
  --accent-ink: #0d1730;
  --danger: #ff9b8f;
  --ok: #6fd39b;
  --warn: #f0b860;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--sans);
}
main, .site-header, .site-footer {
  width: min(100% - 2.5rem, 44rem);
  margin-inline: auto;
}
body.wide main, body.wide .site-header { width: min(100% - 2.5rem, 86rem); }
main { padding-block: 1.5rem 4rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1 { font-size: clamp(1.9rem, 6vw, 2.75rem); line-height: 1.08; letter-spacing: -0.025em; font-weight: 750; margin: 0 0 1.5rem; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.25rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
small, .hint { font-size: 0.875rem; color: var(--muted); font-weight: 400; }

.site-header { padding-block: 1.5rem 1rem; }
.brand { font-weight: 750; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; font-size: 1.125rem; }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.25rem 2.5rem; font-size: 0.9375rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--muted); }

/* Lizenzschluessel in fuenf Segmenten */
.key { display: inline-flex; gap: 3px; font-family: var(--mono); font-weight: 600; font-size: clamp(0.72rem, 3.3vw, 1.05rem); letter-spacing: 0.05em; white-space: nowrap; }
.key-seg { background: var(--key); color: var(--key-ink); padding: 0.45em 0.5em; }
.key-seg:first-child { border-radius: 6px 0 0 6px; }
.key-seg:last-child { border-radius: 0 6px 6px 0; }
.key-sample { margin-top: 0.5rem; }
.key-sample .key-seg:not(:first-child) { background: var(--line); color: var(--muted); }

.hero { padding-block: 1.5rem 2.5rem; }

.products { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.product { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.product-text { flex: 1 1 18rem; }
.product-text p { color: var(--muted); margin: 0; }
.product-buy { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.price { margin: 0; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { display: block; font-size: 0.8125rem; }

.button {
  display: inline-block; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--brand, #478dbe); color: var(--brand-ink, #ffffff); /* Knoepfe behalten die Markenfarbe auch in dunkler Darstellung */
  font: inherit; font-weight: 650; text-decoration: none;
  padding: 0.7rem 1.2rem; min-height: 44px;
}
.button:hover { filter: brightness(1.1); }
.button-large { width: 100%; padding-block: 0.95rem; font-size: 1.125rem; }
.button-quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px currentColor; padding: 0.45rem 0.9rem; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.875rem; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Formular */
fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
legend { font-weight: 700; font-size: 1.125rem; padding: 0; margin-bottom: 0.75rem; }
.field { margin-bottom: 1rem; flex: 1 1 0; min-width: 0; }
.field-short { max-width: 10rem; }
.row { display: flex; gap: 0 1rem; flex-wrap: wrap; }
.row .field { flex-basis: 12rem; }
.row-zip .field:first-child { flex: 0 1 8rem; }
label { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.3rem; }
.optional { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="date"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--accent); }
.has-error input, .has-error select { border-color: var(--danger); }
.error { color: var(--danger); font-size: 0.875rem; margin: 0.3rem 0 0; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.75rem; margin-bottom: 1rem; }
.check input { width: 1.3rem; height: 1.3rem; margin: 0.15rem 0 0; accent-color: var(--accent); }
.check label { font-weight: 400; margin: 0; }
.check .error { grid-column: 2; }

.summary { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.summary p { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.summary-total { font-size: 1.2rem; font-weight: 700; border-top: 1px solid var(--line); padding-top: 0.9rem; font-variant-numeric: tabular-nums; }
.summary .hint { display: block; margin: 0.9rem 0 0; text-align: center; }

.notice { padding: 0.9rem 1.1rem; border-radius: var(--radius); background: var(--surface); border-left: 5px solid var(--accent); }
.notice-error { border-left-color: var(--danger); }

/* Bestellseite */
.keys { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.keys li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.facts { margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.6rem; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }

.tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 99px; border: 1.5px solid currentColor; color: var(--muted); white-space: nowrap; }
.tag-paid, .tag-aktiv { color: var(--ok); }
.tag-refunded, .tag-failed, .tag-gesperrt { color: var(--danger); }
.tag-abgelaufen { color: var(--warn); }

.legal h2 { margin-top: 2rem; }

/* Verwaltung */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
td code { font-family: var(--mono); font-size: 0.8125rem; white-space: nowrap; }
td code.revoked { text-decoration: line-through; color: var(--muted); }

/* Lizenzdatei auf der Bestellseite */
textarea { min-height: 0; resize: vertical; line-height: 1.4; }
textarea.mono, .mono { font-family: var(--mono); font-size: 0.8125rem; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; margin-top: 0.7rem; }
.keys li.lic-file { display: block; }

/* Felder einer Offline-Lizenz */
fieldset.multi { margin-bottom: 1rem; }
fieldset.multi legend { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.3rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.choices label { font-weight: 400; display: flex; gap: 0.4rem; align-items: center; margin: 0; }
.choices input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.field .hint { margin: 0.3rem 0 0; }

/* Verwaltung */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 2rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.9rem; }
.admin-header .brand small { display: block; font-weight: 400; }
.admin-header nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; align-items: baseline; }
.admin-header nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding-block: 0.2rem; border-bottom: 3px solid transparent; }
.admin-header nav a[aria-current="page"] { border-bottom-color: var(--key); }
.admin-header nav form { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toolbar h1 { margin: 0; }
form.inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1rem; }
form.inline select, form.inline input { width: auto; flex: 1 1 14rem; }
form.inline .button { flex: 0 0 auto; }
form.search input { max-width: 26rem; }
.tabs { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; margin-bottom: 1rem; }
.tabs a { padding: 0.3rem 0.8rem; border-radius: 99px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); font-size: 0.9375rem; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs a[aria-current="page"] small { color: inherit; }
.narrow { max-width: 46rem; }
.narrow h2 { margin: 2rem 0 0.8rem; }
.box { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.25rem; }
.box summary { cursor: pointer; font-weight: 600; }
.box form { margin-top: 0.9rem; }
.box h2 { margin: 0 0 0.2rem; }
ul.plain { list-style: none; padding: 0; margin: 0 0 1.5rem; }
form.danger { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
form.danger button.link, button.link[data-confirm] { color: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.button + .button { margin-left: 0.5rem; }
.actions .button + .button { margin-left: 0; }
.login { max-width: 22rem; margin: 12vh auto 0; }
.login h1 { margin-bottom: 0.2rem; }
.table-wrap + form.inline { margin-top: 1rem; }
td small { color: var(--muted); }
.facts dd { word-break: break-word; white-space: pre-wrap; }

/* Umschalter Darstellung */
.theme-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--surface); }
.theme-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.8125rem; padding: 0.3rem 0.7rem; cursor: pointer; min-height: 32px; }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.site-footer { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.login .theme-switch { margin-top: 2rem; }
[hidden] { display: none !important; }

/* Felder nebeneinander (Lizenzformular wie im Generator) */
.row .field-small { flex: 0 1 7.5rem; }
.row { align-items: flex-start; }

/* Mehrzeilige Lizenzfelder (ASCII-Signatur): feste Schrift, Leerzeichen und Umbrueche unveraendert */
textarea.ascii { white-space: pre; overflow-wrap: normal; word-break: normal; overflow-x: auto; }
.facts div.fact-block { display: block; }
.facts div.fact-block dd { text-align: left; margin-top: 0.4rem; white-space: normal; }
pre.ascii { margin: 0; padding: 0.7rem 0.9rem; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.25; white-space: pre; overflow-x: auto;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); }

/* Anfragen */
.badge { display: inline-block; min-width: 1.4em; padding: 0 0.4em; border-radius: 99px; background: var(--key); color: var(--key-ink); font-size: 0.75rem; font-weight: 700; text-align: center; }
.message { white-space: pre-wrap; margin: 0.5rem 0 0; padding: 0.5rem 0.7rem; border-left: 3px solid var(--line); font-size: 0.9375rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions > a { font-size: 0.9375rem; }
.box > p:last-child, .box > form:last-child { margin-bottom: 0; }

/* Zwei-Faktor-Anmeldung */
.code-input { font-family: var(--mono); font-size: 1.3rem; letter-spacing: 0.2em; }
.qr { width: 14rem; max-width: 100%; background: #fff; border-radius: var(--radius); border: 1.5px solid var(--line); padding: 0.4rem; margin: 0.9rem 0; }
.qr svg { display: block; width: 100%; height: auto; }
ol.steps { padding-left: 1.3rem; }
ol.steps > li { margin-bottom: 1.5rem; }
ol.steps form { margin-top: 0.8rem; }

/* Produkte mit Versionen */
.product { display: block; }
.product > h2 { font-size: 1.4rem; }
.product-description { color: var(--muted); margin: 0 0 0.6rem; }
.offers { list-style: none; margin: 0; padding: 0; }
.offer { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; justify-content: space-between; align-items: center; padding-block: 0.9rem; }
.offer + .offer { border-top: 1px dashed var(--line); }
.offer h3 { margin: 0 0 0.3rem; font-size: 1.125rem; }
.offer .product-text p { margin: 0; }
.includes { margin: 0 0 0.5rem; padding-left: 1.2rem; }
.includes li { margin-bottom: 0.15rem; }
.choice-card { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; font-weight: 400; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 0.6rem; cursor: pointer; }
.choice-card input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--accent); }
.choice-card:has(input:checked) { border-color: var(--accent); }
.choice-card .includes { margin-top: 0.4rem; }
.choice-price { float: right; font-weight: 700; }

.plain-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.plain-list li { margin-bottom: 0.2rem; }
.versions-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 0.8rem; align-items: center; }
td .includes { margin: 0; }
h2[id] { scroll-margin-top: 1rem; margin-top: 2.5rem; }

.field-medium { max-width: 24rem; }

/* ===== Verkaufsseite: Kopfband in der Markenfarbe ===== */
.band { background: var(--band); color: var(--band-ink); }
.band .site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.1rem; }
.band .brand { color: inherit; font-size: 1.25rem; }
.band .brand img { display: block; height: 3rem; width: auto; max-width: min(70vw, 20rem); object-fit: contain; }
.band .site-link { color: inherit; font-size: 0.9375rem; opacity: 0.85; }
.band .site-link:hover { opacity: 1; }
.band :focus-visible { outline-color: var(--band-ink); }
.band .hero { width: min(100% - 2.5rem, 44rem); margin-inline: auto; padding-block: 2rem 3.25rem; }
.band .hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); margin-bottom: 1rem; }
.band .hero .lead { color: inherit; opacity: 0.82; margin-bottom: 1.5rem; max-width: 42rem; }
.band .key-sample .key-seg:not(:first-child) { background: color-mix(in srgb, var(--band-ink) 14%, transparent); color: color-mix(in srgb, var(--band-ink) 70%, transparent); }

/* Startseite: breiter, Produkte als Tafeln, Versionen nebeneinander zum Vergleichen */
body.catalog main, body.catalog .site-header, body.catalog .site-footer, body.catalog .band .hero { width: min(100% - 2.5rem, 62rem); }
body.catalog main { padding-top: 2.25rem; }
.catalog .products { border-top: 0; }
.catalog .product { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 1.5rem 1.5rem 0.5rem; margin-bottom: 1.5rem; }
.catalog .product > h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin-bottom: 0.3rem; }
.catalog .product-description { max-width: 46rem; margin-bottom: 0; }
.catalog .offers { margin-top: 1.1rem; border-top: 1px solid var(--line); }
.catalog .offer { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; padding-block: 1.25rem; }
.catalog .offer + .offer { border-top: 1px solid var(--line); }
.catalog .offer h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.catalog .offer-text { flex: 1; }
.catalog .offer-text p { margin: 0; }
.catalog .offer-buy .price { font-size: 1.75rem; margin-bottom: 0.8rem; }
.catalog .offer-buy .button { display: block; text-align: center; }
@media (min-width: 44rem) {
  .catalog .offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .catalog .offer + .offer { border-top: 0; border-left: 1px solid var(--line); padding-left: 1.5rem; }
  .catalog .offer:not(:last-child) { padding-right: 1.5rem; }
  /* Ein einzelnes Angebot: Beschreibung links, Preis und Knopf rechts */
  .catalog .offers-single { display: block; }
  .catalog .offers-single .offer { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
  .catalog .offers-single .offer-buy { flex: 0 0 15rem; }
}

/* Einstellungen: Vorschau des Kopfbands und Farbwahl */
.preview { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 2rem; background: var(--bg); }
.preview .band .site-header { width: auto; padding-inline: 1.25rem; }
.preview-body { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; padding: 1rem 1.25rem; }
.color-row { display: flex; gap: 0.6rem; align-items: center; }
.color-row input[type="color"] { flex: 0 0 3.5rem; width: 3.5rem; height: 46px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.color-row input[type="text"] { max-width: 8rem; font-size: 1rem; word-break: normal; }
input[type="file"] { font: inherit; font-size: 0.9375rem; max-width: 100%; }
.narrow form + form { margin-top: 0.8rem; }

.product-download { margin: 0.4rem 0 0; font-size: 0.9375rem; }

/* Produktbilder auf der Verkaufsseite */
.catalog .product-head { display: grid; gap: 1rem 2rem; }
.product-cover { order: -1; }
.product-cover img { display: block; width: 100%; height: auto; max-height: 18rem; object-fit: contain; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); }
@media (min-width: 44rem) {
  .catalog .product-head.has-cover { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); align-items: start; }
  .product-cover { order: 0; }
}
.product-gallery { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 0; margin: 1.25rem 0 0; }
/* Weitere Bilder: vollstaendig und im eigenen Seitenverhaeltnis, nicht beschnitten */
.product-gallery img { display: block; height: 11rem; width: auto; max-width: 100%; object-fit: contain; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); }
.catalog div.product .product-gallery img { height: 15rem; } /* auf der eigenen Produktseite groesser */
@media (max-width: 40rem) { .product-gallery img, .catalog div.product .product-gallery img { height: 8.5rem; } }
.image-list img { display: block; width: 8.5rem; height: 6.5rem; object-fit: contain; border-radius: 8px; border: 1.5px solid var(--line); background: var(--bg); }
.product-gallery a:hover img, .product-cover:hover img { border-color: var(--accent); }

/* Bilder in der Verwaltung */
.image-list { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; margin: 0 0 1.25rem; }
.image-list li { width: 8.5rem; font-size: 0.875rem; }
.image-list form { margin: 0.2rem 0 0; }
.image-list .tag { margin-top: 0.3rem; }

/* Sprachwahl im Kopfband */
.band-links { display: flex; align-items: center; gap: 0.6rem 1.25rem; flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 1.5px solid color-mix(in srgb, var(--band-ink) 35%, transparent); border-radius: 99px; overflow: hidden; font-size: 0.8125rem; font-weight: 600; }
.lang-switch a, .lang-switch span { padding: 0.25rem 0.65rem; color: inherit; text-decoration: none; }
.lang-switch a { opacity: 0.75; }
.lang-switch a:hover { opacity: 1; }
.lang-switch span { background: var(--band-ink); color: var(--band); }

/* Laengere Texte (E-Mail-Vorlagen) */
.field textarea:not(.mono) { line-height: 1.45; }
details.box > .field:first-of-type, details.box > p:first-of-type { margin-top: 0.9rem; }

/* Produktbild im Fenster auf der Seite */
.product-cover, .product-gallery a { cursor: zoom-in; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 72rem); max-height: 94vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(0, 16, 46, 0.78); }
.lightbox-frame { position: relative; display: grid; justify-items: center; }
.lightbox-frame img { display: block; max-width: min(94vw, 72rem); max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #fff; box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45); }
.lightbox-frame button { position: absolute; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.94); color: #00102e; font: 600 1.6rem/1 var(--sans); box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.3); }
.lightbox-frame button:hover { background: #fff; }
.lightbox-close { top: -0.9rem; right: -0.9rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 0.6rem; }
.lightbox-next { right: 0.6rem; }
.lightbox-count { margin: 0.7rem 0 0; color: #fff; font-size: 0.9375rem; }
@media (max-width: 40rem) { .lightbox-close { top: 0.4rem; right: 0.4rem; } }

/* ===== Ausdruck (Bestellseite mit Lizenz) ===== */
.print-only, .facts .print-row { display: none; }
@media print {
  /* Immer hell und ohne Flaechen drucken, auch wenn am Bildschirm die dunkle Darstellung gewaehlt ist */
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    color-scheme: light; --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #999; --accent: #000; --band: #fff; --band-ink: #000;
  }
  @page { margin: 18mm; }
  body { background: #fff; font-size: 11pt; }
  main, .site-header, .band .hero { width: auto !important; }
  main { padding-block: 6mm 0; }
  .band { background: none; color: #000; border-bottom: 1.5pt solid #000; }
  .band .site-header { padding-block: 0 4mm; }
  .band .brand img, .band-links, .site-footer, .no-print, .button, button, textarea { display: none !important; }
  .print-only { display: block; }
  span.print-only { display: inline; }
  .band .brand { font-size: 14pt; text-decoration: none; }
  h1 { font-size: 20pt; }
  .lead { color: #000; font-size: 12pt; max-width: none; }
  a { color: #000; text-decoration: none; }
  .key { font-size: 15pt; letter-spacing: 0.08em; }
  .key-seg { background: none !important; color: #000 !important; border: 1pt solid #000; border-radius: 0 !important; }
  .keys li { margin-bottom: 4mm; break-inside: avoid; }
  .license-print { font-family: var(--mono); font-size: 8.5pt; line-height: 1.35; white-space: pre-wrap; word-break: break-all; border: 1pt solid #000; padding: 3mm; margin: 0; }
  .facts { margin-top: 8mm; }
  .facts .print-row { display: flex; }
  .facts div { break-inside: avoid; }
  .facts dd { word-break: break-all; }
}

/* Software-Download */
.downloads { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--line); }
.downloads li { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; justify-content: space-between; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.downloads strong { word-break: break-word; }
form.upload progress { display: block; width: 100%; height: 0.6rem; margin-top: 0.9rem; accent-color: var(--brand, #478dbe); }
.upload-status { min-height: 1.3em; margin-top: 0.4rem; }

/* Allgemeiner Shop */
.button-off { background: var(--line); color: var(--muted); cursor: default; }
.button-off:hover { filter: none; }
.choices-stack { flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
address { font-style: normal; margin: 0 0 1rem; padding: 0.7rem 1rem; border-left: 3px solid var(--line); }
.back { margin: 0 0 1rem; font-size: 0.9375rem; }
.catalog div.product { margin-bottom: 0; }
.catalog .product h1 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); margin-bottom: 0.5rem; }
.catalog .product h2 a { color: inherit; text-decoration: none; }
.catalog .product h2 a:hover { text-decoration: underline; }
.product-long { margin-top: 0.9rem; max-width: 46rem; }
.product-long p { margin: 0 0 0.8rem; }

.field-wrap { flex: 1 1 12rem; min-width: 0; }
.field-wrap .field { flex-basis: auto; }

/* ===== Warenkorb und Kategorien ===== */
.cart-link { color: inherit; font-size: 0.9375rem; font-weight: 600; text-decoration: none; padding: 0.3rem 0.8rem; border: 1.5px solid color-mix(in srgb, var(--band-ink) 35%, transparent); border-radius: 99px; }
.cart-link:hover { background: color-mix(in srgb, var(--band-ink) 12%, transparent); }
.add-to-cart { margin: 0.5rem 0 0; }
.add-to-cart .button { display: block; width: 100%; text-align: center; }
.categories { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; margin: 0 0 1.5rem; }
.categories a { padding: 0.35rem 0.95rem; border-radius: 99px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); font-size: 0.9375rem; font-weight: 600; }
.categories a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cart { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem 1.25rem; align-items: center; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.cart-line form { margin: 0; }
.cart-qty { display: flex; gap: 0.5rem; align-items: center; }
.cart-qty select { width: auto; min-height: 40px; }
.cart-price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.cart-line > form:last-child { grid-column: 1 / -1; }
.order-lines { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.order-lines li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.45rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.order-item { margin-bottom: 1.5rem; }
.order-item h2 { margin-bottom: 0.6rem; }
.category-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.category-list li { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin-bottom: 0.4rem; }
.category-list form.inline { margin: 0; flex: 1 1 30rem; }
.narrow-input { max-width: 5rem; flex: 0 0 5rem !important; }
.summary a.button-large { display: block; text-align: center; }
.summary + p { margin-top: 1.25rem; }

.facts-tight { margin-top: 0.6rem; }
.notice > p:last-child, .notice > dl:last-child { margin-bottom: 0; }
.lost-link { color: var(--muted); font-size: 0.9375rem; }

form.checkout > .notice { margin-bottom: 2rem; }

.withdraw-link { font-weight: 700; color: var(--ink) !important; }

/* Uebersicht der Verwaltung */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 0.6rem; }
.tile { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.tile p { margin: 0; }
.tile-label { color: var(--muted); font-size: 0.9375rem; }
.tile-value { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0 3rem; margin-top: 1rem; }
.columns h2 { margin-top: 1.5rem; }
.tasks { list-style: none; padding: 0; margin: 0 0 1rem; }
.tasks li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.tasks-warn li { padding-left: 0.9rem; border-left: 3px solid var(--warn); border-bottom: 0; margin-bottom: 0.5rem; }

/* ===== Bearbeitungsseiten mit Abschnitten (Produkt, Einstellungen) ===== */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: start; }
.edit-nav { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; }
.edit-nav a { padding: 0.35rem 0.8rem; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-size: 0.9375rem; white-space: nowrap; }
.edit-nav a:hover { border-color: var(--accent); }
.edit-main { max-width: 52rem; min-width: 0; }
@media (min-width: 62rem) {
  .edit-layout { grid-template-columns: 13.5rem minmax(0, 1fr); }
  .edit-nav { position: sticky; top: 1rem; flex-direction: column; flex-wrap: nowrap; gap: 0.15rem; }
  .edit-nav a { border-radius: 8px; border-color: transparent; background: none; white-space: normal; }
  .edit-nav a:hover { background: var(--surface); border-color: var(--line); }
}
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; scroll-margin-top: 1rem; }
.card > h2 { margin: 0 0 1rem; font-size: 1.25rem; }
.card h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.card > :last-child { margin-bottom: 0; }
.card input[type="text"], .card input[type="email"], .card input[type="date"], .card select, .card textarea { background: var(--bg); }
.card .table-wrap { background: var(--bg); }
.save-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: center; padding: 0.8rem 1rem; margin: 0 0 1.75rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; box-shadow: 0 -0.3rem 1.2rem rgba(0, 16, 46, 0.08); }
.save-bar .hint { margin: 0; }
.toolbar > div > h1 { margin-bottom: 0.3rem; }

.narrow-input-wide { max-width: 10rem; }
.card .table-wrap select { width: auto; min-width: 14rem; }
.card .table-wrap input[type="text"] { min-height: 40px; }
