/* Hell ist der Standard; Dunkel folgt dem System (auto) oder wird per Schalter erzwungen. */
:root {
  --bg: #f4f5f7; --card: #fff; --text: #1a1d21; --muted: #626b78; --line: #dde1e6; --hover: #eef1f5;
  --accent: #1f6feb; --accent-text: #fff; --ok: #1a7f37; --off: #8a5a00; --danger: #c62828;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171a; --card: #1d2125; --text: #e8eaed; --muted: #9aa3ad; --line: #2e343a; --hover: #262b31;
    --accent: #4c8dff; --ok: #4cc26b; --off: #e0a43a; --danger: #ef6b6b;
  }
}
:root[data-theme="dark"] {
  --bg: #14171a; --card: #1d2125; --text: #e8eaed; --muted: #9aa3ad; --line: #2e343a; --hover: #262b31;
  --accent: #4c8dff; --ok: #4cc26b; --off: #e0a43a; --danger: #ef6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, sans-serif; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 6px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: center; }
nav a, button.link { color: var(--accent); background: none; border: 0; padding: 10px 0; min-height: 44px; font: inherit; cursor: pointer; text-decoration: none; }
.tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.langs { display: flex; }
.langs a { color: var(--muted); text-decoration: none; padding: 10px 8px; font-size: .85rem; font-weight: 600; }
.langs a[aria-current] { color: var(--text); text-decoration: underline; }
#theme { padding: 10px 8px; font-size: 1.1rem; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 20px 0 8px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); font-size: .85rem; }
.error { color: var(--danger); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, button, .btn, .btn-sec { font: inherit; min-height: 44px; border-radius: 8px; }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); width: 100%; }
textarea { font: inherit; border-radius: 8px; }
input[type=checkbox] { width: 24px; min-height: 24px; }
button, .btn { background: var(--accent); color: var(--accent-text); border: 0; padding: 8px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-sec { border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 16px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
button.danger { background: var(--danger); color: #fff; }
button:disabled { opacity: .4; cursor: not-allowed; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.filters input[type=search] { grid-column: 1 / -1; }

/* Listen und kompakte Zeilen */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.row .main { grid-column: 2; }
.row .thumb + .main { grid-column: 2; }
.row:not(:has(.thumb)) .main { grid-column: 1 / 3; }
.row.off .main { opacity: .6; }
.main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.main strong { font-size: .95rem; overflow-wrap: anywhere; }
.row .price { font-weight: 700; text-align: right; }
.thumb { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); flex: none; }
.preview { max-width: 180px; max-height: 180px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.chip { background: transparent; border: 1px solid currentColor; padding: 2px 12px; min-height: 36px; border-radius: 999px; }
.chip.on { color: var(--ok); }
.chip.off { color: var(--off); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.card > summary { margin: -6px 0; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline input { width: auto; flex: 1 1 140px; }
.pre { white-space: pre-wrap; margin: 4px 0; }
.big { font-size: 1.3rem; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain li.off { text-decoration: line-through; opacity: .6; }
.total { text-align: right; margin: 8px 0 0; }
details { margin: 12px 0; }
summary { cursor: pointer; padding: 10px 0; font-weight: 600; }

/* Bestellformular: aufklappbare Warengruppen, schmale Artikelzeilen */
.orderform { padding-bottom: 80px; display: flex; flex-direction: column; gap: 8px; }
.toolbar { display: flex; gap: 8px; }
.toolbar button { min-height: 36px; padding: 4px 12px; font-size: .85rem; }
details.group { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
details.group > summary { display: flex; align-items: center; gap: 10px; padding: 12px; list-style: none; position: sticky; top: 0; background: var(--card); }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary::after { content: ''; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex: none; }
details.group[open] > summary::after { transform: rotate(-135deg); }
.gname { font-weight: 700; }
.count { font-size: .8rem; font-weight: 600; color: var(--accent); }
details.group .list { gap: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 56px; border-top: 1px solid var(--line); }
.item .main { flex: 1; }
.item.off { opacity: .55; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button { width: 40px; min-height: 40px; padding: 0; font-size: 1.25rem; border-radius: 10px; }
.stepper input { width: 52px; min-height: 40px; padding: 4px; text-align: center; }
.sticky { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-top: 1px solid var(--line); z-index: 5; }
.card p { margin: 0; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.crow .main { flex: 1 1 150px; }
input.sel { width: 24px; min-height: 24px; flex: none; }
fieldset.pick { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 0; }
fieldset.pick legend { font-weight: 700; padding: 0 6px; }
fieldset.pick label.check { padding: 6px 0; font-weight: 400; }

/* Bestellübersicht: Spalten für Menge × Name, Gebinde und Preis stehen untereinander */
.plain.lines li { display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem auto; gap: 2px 12px; align-items: baseline; }
.plain.lines .pack { white-space: nowrap; }
.plain.lines .price { text-align: right; white-space: nowrap; }
@media (max-width: 520px) {
  .plain.lines li { grid-template-columns: minmax(0, 1fr) auto; }
  .plain.lines .pack { grid-column: 1; grid-row: 2; }
}

/* Link zum Ändern: Festbreitenschrift (Fixedsys-ähnlich) mit Kopierbutton */
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow .btn-sec { flex: none; }
input.mono { font-family: Fixedsys, "Cascadia Mono", "Lucida Console", Consolas, "Courier New", monospace; font-size: .9rem; letter-spacing: 0; }
