:root {
  --bg: #ffffff; --text: #111111; --muted: #6b6b6b; --line: #e2e2e2; --soft: #f4f4f4;
  --btn: #111111; --btn-ink: #ffffff;
  --ok: #17803d; --warn: #b45309; --bad: #c02626;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --text: #ececec; --muted: #9a9a9a; --line: #2c2c2c; --soft: #1c1c1c;
    --btn: #ececec; --btn-ink: #121212;
    --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
a { color: inherit; }
h1 { font-size: 1.35rem; margin: 0 0 4px; line-height: 1.25; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 24px 0 6px; font-weight: 600; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }

header {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
}
header a { text-decoration: none; }
header .brand { font-weight: 700; }
header .user { font-size: .875rem; color: var(--muted); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }

/* (Die alte untere Tab-Leiste ist weg. Frueher klebte hier jedes <nav> unten am Bildschirm fest
   und lag dann ueber den Knoepfen, z. B. die Lager-Auswahl bei den Regalen.) */

.flash { padding: 10px 12px; margin-bottom: 14px; border-left: 3px solid var(--text); background: var(--soft); }
.flash.warn { border-color: var(--warn); }
.flash.bad { border-color: var(--bad); }
.flash.ok { border-color: var(--ok); }
.hinweis { padding: 10px 12px; margin-bottom: 14px; background: var(--soft); font-size: .95rem; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--text); border-radius: 6px; background: transparent; color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
button.primary, .btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
button.block, .btn.block { width: 100%; }
button.link { border: 0; min-height: 0; padding: 0; font-weight: 400; text-decoration: underline; color: var(--muted); }
button:disabled { opacity: .4; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 160px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: -1px; }
input[type=checkbox] { width: auto; min-height: 0; }
label { display: block; font-size: .875rem; font-weight: 600; margin: 14px 0 4px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.suche { display: flex; gap: 8px; }
.suche input { font-size: 1.05rem; }
.suchfeld { position: relative; flex: 1; min-width: 0; }
.vorschlaege {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.vorschlaege button {
  display: block; width: 100%; text-align: left; border: 0; border-radius: 0; font-weight: 400;
  min-height: 44px; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.vorschlaege button:last-child { border-bottom: 0; }
.vorschlaege button.on, .vorschlaege button:hover { background: var(--soft); }

/* Listen */
.liste { border-top: 1px solid var(--line); }
.eintrag { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.eintrag .haupt { flex: 1; min-width: 0; text-decoration: none; display: block; }
.eintrag .titel { font-weight: 600; }
.eintrag .zeile2 { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.eintrag .rechts { text-align: right; white-space: nowrap; font-size: .875rem; }
.bild { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

.platz { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.ort { display: block; margin: 12px 0; padding: 14px; background: var(--soft); border-radius: 6px; }
.ort .platz { font-size: 1.6rem; display: block; }

.foto { width: 100%; max-height: 340px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 14px; }
.bild.klein { flex: 0 0 44px; width: 44px; height: 44px; }

/* Fotos der Kiste: grosses Bild + Vorschaubilder */
.galerie { margin-bottom: 14px; }
.gross-bild {
  display: block; position: relative; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 6px;
  overflow: hidden; background: var(--soft); cursor: zoom-in;
}
.gross-bild img { width: 100%; height: 280px; object-fit: cover; display: block; }
.bildtext {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 10px; border-radius: 99px;
  background: rgba(0,0,0,.65); color: #fff; font-size: .875rem; font-weight: 600;
}
.daumen { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; }
.daumen button {
  flex: 0 0 60px; width: 60px; height: 60px; min-height: 0; padding: 0; border: 2px solid transparent;
  border-radius: 6px; overflow: hidden; opacity: .7;
}
.daumen button.on { border-color: var(--text); opacity: 1; }
.daumen img { width: 100%; height: 100%; object-fit: cover; display: block; }
img.mini { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
button.mini { min-height: 0; padding: 0; border: 0; vertical-align: middle; margin-left: 4px; }
button.mini img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; display: block; }

/* Foto bildschirmfuellend */
.bildansicht {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.bildansicht img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bildansicht button {
  position: absolute; width: 52px; height: 52px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 1.9rem; font-weight: 400; line-height: 1;
}
.bildansicht .zu { top: calc(12px + env(safe-area-inset-top)); right: 12px; font-size: 1.4rem; }
.bildansicht .vor { left: 10px; top: 50%; transform: translateY(-50%); }
.bildansicht .nach { right: 10px; top: 50%; transform: translateY(-50%); }
.bildansicht .leiste {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); color: #fff; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.bildansicht .leiste:empty { display: none; }

/* Formular: weitere Fotos */
.fotoraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 8px; }
.fotoraster:empty { display: none; }
.fotokachel img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; background: var(--soft); }
.fotokachel select { margin-top: 4px; min-height: 38px; padding: 4px 8px; font-size: .875rem; }
.fotokachel label.weg { font-weight: 400; margin: 4px 0 0; }
ul.inhalt { margin: 4px 0 0; padding-left: 20px; }
ul.inhalt li { padding: 2px 0; }

details { margin: 14px 0; }
summary { cursor: pointer; color: var(--muted); }
.teil { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.teil span { flex: 1; }
.teil input { width: 70px; min-height: 40px; }

/* Scanner */
.umschalter { display: flex; border: 1px solid var(--text); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.umschalter button, .umschalter .btn { flex: 1; border: 0; border-radius: 0; }
.umschalter button.on, .umschalter .btn.on { background: var(--btn); color: var(--btn-ink); }
.abhaken { align-items: center; }
.haken { width: 26px; height: 26px; flex: 0 0 26px; accent-color: var(--text); cursor: pointer; }
.teil input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--text); }
#reader { width: 100%; border-radius: 6px; overflow: hidden; background: var(--soft); }
.ergebnis { margin: 14px 0; padding: 14px; border-left: 4px solid var(--text); background: var(--soft); }
.ergebnis.ok { border-color: var(--ok); } .ergebnis.warn { border-color: var(--warn); }
.ergebnis.bad { border-color: var(--bad); } .ergebnis.info { border-color: var(--muted); }
.ergebnis .t { font-weight: 700; }
.ergebnis .gross { font: 800 2rem/1.2 ui-monospace, Consolas, monospace; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.scroll { overflow-x: auto; }

.login { max-width: 380px; margin: 10vh auto 0; }

/* Druck: Etiketten, Schilder, Packliste */
.etiketten, .schilder { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.etikett { display: flex; align-items: center; gap: 12px; border: 1px dashed #aaa; padding: 10px; background: #fff; color: #000; break-inside: avoid; min-height: 42mm; }
.etikett .qr { flex: 0 0 32mm; width: 32mm; }
.etikett svg, .schild svg { width: 100%; height: auto; display: block; }
.etiketten { grid-template-columns: 1fr; }  /* ein breites Etikett pro Zeile, damit der Name Platz hat */
.etikett { gap: 6mm; padding: 4mm 6mm; }
.etikett .name { font: 800 2.4rem/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0 0 8px; overflow-wrap: anywhere; }
.etikett .ort-etikett { font-size: 1rem; }
.etikett .ort-etikett .platz { display: block; font: 900 2.8rem/1.05 ui-monospace, Consolas, monospace; letter-spacing: -.02em; }
.schild { display: flex; align-items: center; gap: 14px; border: 2px solid #000; padding: 12px; background: #fff; color: #000; break-inside: avoid; }
.schild .qr { flex: 0 0 30mm; width: 30mm; }
.schild .nr { font: 900 2.4rem/1.1 ui-monospace, Consolas, monospace; }
.packliste td:first-child { width: 26px; }
.etikett > div:not(.qr) { flex: 1; min-width: 0; }
.etikett-bild { flex: 0 0 30mm; width: 30mm; height: 30mm; object-fit: cover; border-radius: 2mm; }
@media print { .etikett-bild { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Grosse Auswahl-Knoepfe (Packen / Reservieren, Ja / Nein) */
.wahl { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.wahl .btn, .wahl button { flex-direction: column; min-height: 64px; }
.wahl .btn span { font-weight: 400; font-size: .875rem; opacity: .75; }
.pack.nur-ansehen { cursor: default; }

/* Nur Teile: ankreuzen = alle, Zahl antippen = so viele */
.teil2 { padding: 10px 0; border-bottom: 1px solid var(--line); }
.teil2.aus { opacity: .5; }
.teil-kopf { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 400; font-size: 1rem; cursor: pointer; }
.teil-kopf span { flex: 1; }
.teil-kopf input[type=checkbox] { width: 26px; height: 26px; flex: 0 0 26px; accent-color: var(--text); }
.teil2.on .teil-kopf span { font-weight: 600; }
.mengen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 38px; align-items: center; }
.mengen .chip { min-width: 48px; min-height: 42px; }
.mengen input { width: 96px; min-height: 42px; padding: 6px 10px; }
[hidden] { display: none !important; }

/* Packliste: ganze Zeile antippen */
.pack {
  display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.pack .haupt { flex: 1; min-width: 0; }
.pack .titel { font-weight: 600; }
.pack .kasten { flex: 0 0 28px; height: 28px; border: 2px solid var(--text); border-radius: 6px; position: relative; }
.pack.on .kasten { background: var(--text); }
.pack.on .kasten::after {
  content: ""; position: absolute; left: 8px; top: 3px; width: 7px; height: 14px;
  border: solid var(--bg); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.pack.on .titel { text-decoration: line-through; color: var(--muted); }
.pack .weg { font-size: 1.1rem; padding: 6px 8px; text-decoration: none; }
.fortschritt { margin: 18px 0 4px; }

/* Vorschlaege / Auswahl */
.karte { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 10px 0; }
.karte .titel { font-weight: 600; }
.teil { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; margin: 0; }
.teil span { flex: 1; }

/* Zurueck */
.gruppe-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.zr { border-bottom: 1px solid var(--line); padding: 12px 0; }
.zr .zeile { display: flex; align-items: center; gap: 12px; }
.zr .haupt { flex: 1; min-width: 0; }
.zr .titel { font-weight: 600; }
.zr.fertig .titel { color: var(--muted); }
.danach { margin-top: 8px; }
.platz.gross { font-size: 1.5rem; }
button.gross { min-height: 56px; font-size: 1.1rem; }

/* Meldungen erledigen */
.meldung { padding: 14px 0; border-bottom: 1px solid var(--line); }
.meldung .titel { font-weight: 600; }
.erledigen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.erledigen .gekauft { display: flex; gap: 6px; }
.erledigen .gekauft input { width: 90px; }

/* Melde-Knoepfe */
.melden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.melden select { width: auto; min-height: 38px; padding: 4px 8px; }
.chip { min-height: 38px; padding: 4px 14px; border-radius: 99px; font-weight: 500; }
.chip.on { background: var(--btn); color: var(--btn-ink); }

/* Kurzmeldung unten */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 560px; margin: 0 auto; padding: 12px 14px; border-radius: 8px;
  background: var(--btn); color: var(--btn-ink); font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.toast.fehler { background: var(--bad); color: #fff; }
.toast.warn { background: var(--warn); color: #fff; }
#reader { margin: 10px 0; }
.eintrag.gross { padding: 16px 0; }

@media print {
  header, nav, .noprint, .flash { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  main { max-width: none; padding: 0; }
}

/* ===== Gross & einfach (fuer alle, auch ohne Brille) ===== */
:root { --muted: #555555; }
@media (prefers-color-scheme: dark) { :root { --muted: #b0b0b0; } }
body { font-size: 18px; line-height: 1.5; }
h1 { font-size: 1.75rem; margin: 6px 0 8px; }
h2 { font-size: .95rem; margin: 28px 0 8px; }
.small { font-size: .9rem; }
header { padding: 14px 16px; }
header .brand { font-size: 1.15rem; }
header .user { font-size: 1rem; padding: 6px 0; }

button, .btn { min-height: 54px; padding: 10px 18px; border-width: 2px; border-radius: 10px; font-size: 1.05rem; }
button.gross, .btn.gross { min-height: 66px; font-size: 1.2rem; }
button.link { font-size: inherit; }
input, select, textarea { min-height: 56px; font-size: 1.1rem; border: 2px solid var(--line); border-radius: 10px; }
label { font-size: 1.05rem; margin: 22px 0 6px; }

/* Zurueck-Knopf oben links: grosse Tippflaeche */
.zurueck-knopf {
  display: inline-flex; align-items: center; min-height: 48px; padding: 6px 14px 6px 8px; margin: -4px 0 4px -8px;
  font-size: 1.05rem; font-weight: 600; text-decoration: none; border-radius: 10px;
}
.zurueck-knopf:hover, .zurueck-knopf:active { background: var(--soft); }

/* Die eine Frage auf der Seite */
.frage { font-size: 1.3rem; font-weight: 700; margin: 26px 0 10px; }
.erklaer { color: var(--muted); margin: -4px 0 12px; }
.schritt { display: inline-block; min-width: 1.8em; height: 1.8em; line-height: 1.8em; text-align: center;
           border-radius: 50%; background: var(--btn); color: var(--btn-ink); font-size: .85em; margin-right: 8px; }

/* Grosse Auswahl-Knoepfe */
.wahl .btn, .wahl button { min-height: 84px; font-size: 1.3rem; padding: 12px 18px; }
.wahl .btn span, .wahl button span { font-size: 1rem; margin-top: 2px; }

/* Auswahl mit grossen Knoepfen statt Klappliste (input radio/checkbox + span) */
.knopfwahl { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.knopfwahl label { margin: 0; font-weight: 600; cursor: pointer; }
.knopfwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.knopfwahl span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 58px; padding: 8px 18px;
  border: 2px solid var(--text); border-radius: 10px; font-size: 1.15rem;
}
.knopfwahl input:checked + span { background: var(--btn); color: var(--btn-ink); }
.knopfwahl input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 2px; }
.knopfwahl.voll label { flex: 1 1 0; }
.knopfwahl.voll span { width: 100%; }

/* Menue aus grossen Knoepfen (Konto, Verwaltung) */
.menue { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.menue .btn { justify-content: space-between; min-height: 72px; font-size: 1.2rem; text-align: left; }
.menue .btn span { font-weight: 400; font-size: .95rem; color: inherit; opacity: .8; }
.menue .btn .zahl { font-weight: 700; opacity: 1; background: var(--bad); color: #fff; border-radius: 99px; padding: 2px 10px; }

/* Listen groesser */
.eintrag { padding: 14px 0; gap: 14px; }
.eintrag .titel { font-size: 1.15rem; }
.eintrag .zeile2 { font-size: .95rem; }
.eintrag .rechts { font-size: 1rem; }
.bild { flex-basis: 64px; width: 64px; height: 64px; border-radius: 8px; }
.bild.klein { flex-basis: 52px; width: 52px; height: 52px; }
.eintrag.gross { padding: 18px 4px; }
.eintrag.gross .titel { font-size: 1.3rem; }
.ort .platz { font-size: 2rem; }
.ort { border-radius: 10px; }
.flash { font-size: 1.05rem; padding: 14px 16px; border-left-width: 5px; border-radius: 6px; }

/* Packliste / Haken groesser */
.pack { padding: 16px 4px; }
.pack .titel { font-size: 1.15rem; }
.pack .kasten { flex: 0 0 36px; height: 36px; border-width: 3px; }
.pack.on .kasten::after { left: 11px; top: 4px; width: 9px; height: 18px; }
.pack .weg { font-size: 1.4rem; min-width: 48px; min-height: 48px; }
.fortschritt { font-size: 1.15rem; }

/* Nur Teile */
.teil2 { padding: 14px 0; }
.teil-kopf { font-size: 1.15rem; gap: 14px; }
.teil-kopf input[type=checkbox] { width: 34px; height: 34px; flex-basis: 34px; }
.mengen { margin-left: 48px; gap: 8px; }
.mengen .chip { min-width: 58px; min-height: 52px; font-size: 1.1rem; }
.mengen input { width: 120px; min-height: 52px; }
.chip { min-height: 48px; padding: 6px 16px; font-size: 1.05rem; }
.karte { border-width: 2px; border-radius: 10px; padding: 16px; }

/* Regal als Bild: Ebene antippen */
.regalbild { display: grid; gap: 6px; margin: 8px 0; padding: 8px; border: 3px solid var(--text); border-radius: 8px; }
.regalbild button small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.regalbild button.on { background: var(--btn); color: var(--btn-ink); }
.regalbild .kopf { text-align: center; font-weight: 700; color: var(--muted); }
/* Regal: eine Zeile pro Ebene */
.regalbild.reihen { display: flex; flex-direction: column; }
.regalbild .reihe { display: flex; align-items: stretch; gap: 6px; }
.regalbild .reihe .kopf { flex: 0 0 2.4em; display: flex; align-items: center; justify-content: center; }
/* Regal-Uebersicht mit Fotos */
.regal-uebersicht { margin: 16px 0; }
.regal-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.regal-kopf .knoepfe { display: flex; gap: 8px; }
.gewaehlt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
            background: var(--soft); border-radius: 10px; }
.gewaehlt .platz { font-size: 1.6rem; }
header .menue-knopf { color: var(--text); font-weight: 600; border: 2px solid var(--text); border-radius: 10px; padding: 8px 16px; }
.pack .aendern { min-height: 48px; padding: 6px 14px; font-size: 1rem; flex: 0 0 auto; }

/* ===== Lesbarkeit & klare Bereiche (weniger scrollen) ===== */
/* Zwischenueberschriften: dunkel, normal geschrieben, mit Trennlinie darueber */
h2 { font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 700;
     margin: 26px 0 8px; padding-top: 16px; border-top: 2px solid var(--line); }
h2:first-child { border-top: 0; padding-top: 0; }
/* Ein Bereich = ein grauer Kasten */
.abschnitt { background: var(--soft); border-radius: 14px; padding: 2px 14px 14px; margin: 12px 0 18px; }
.abschnitt > .frage:first-child { margin-top: 12px; }
.abschnitt input, .abschnitt select { background: var(--bg); }
.frage { margin: 18px 0 8px; }
.erklaer { margin: -2px 0 10px; }
.wahl .btn, .wahl button { min-height: 72px; }
.menue { gap: 10px; }
.menue .btn { min-height: 62px; }
/* Inhalt einer Kiste als Kaertchen nebeneinander statt langer Liste */
ul.inhalt { list-style: none; padding: 0; margin: 6px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
ul.inhalt li { padding: 5px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); line-height: 1.35; }
.abschnitt ul.inhalt li, .karte ul.inhalt li { background: var(--bg); }
/* Fotos etwas flacher */
.gross-bild img { height: 210px; }
/* Platz kompakt in einer Zeile */
.ort { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; margin: 10px 0; }
.ort .platz { display: inline; font-size: 1.7rem; }
.ort > .small { font-size: .95rem; }
/* Listen: zweite Zeile hoechstens 2 Zeilen hoch */
.eintrag .zeile2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
textarea { min-height: 150px; }
/* Datei-Auswahl: grosser Knopf */
input[type=file] { padding: 8px; min-height: 0; font-size: 1rem; }
input[type=file]::file-selector-button {
  min-height: 48px; padding: 8px 16px; margin-right: 12px; border: 2px solid var(--text); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
/* Packliste: Kasten | Text | Aendern – ohne Bild, damit der Text Platz hat */
.pack { gap: 12px; padding: 14px 2px; align-items: center; }
.pack .titel { font-size: 1.2rem; }
.pack .zeile2 { font-size: 1rem; color: var(--text); }
.pack .zeile3 { font-size: .95rem; color: var(--muted); }
.pack .zeile3 .platz { color: var(--text); }
.pack.on .zeile2 { color: var(--muted); }
.liste-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.liste-kopf h2 { flex: 1; }
/* Regal-Zeile kompakt */
.eintrag .knoepfe { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.eintrag .knoepfe .btn, .eintrag .knoepfe button { min-height: 48px; padding: 6px 12px; font-size: 1rem; }
details > summary { padding: 12px 0; font-size: 1.05rem; }
/* Kopf einer Kiste: Foto links, Name + Platz rechts (spart Hoehe) */
.kistenkopf { display: flex; gap: 14px; align-items: center; margin: 4px 0 12px; }
.kistenkopf .gross-bild { flex: 0 0 116px; width: 116px; height: 116px; border-radius: 12px; }
.kistenkopf .gross-bild img { width: 116px; height: 116px; }
.kistenkopf h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.kistenkopf .wo { font-size: .95rem; color: var(--muted); }
.kistenkopf .wo .platz { display: block; font-size: 1.45rem; color: var(--text); line-height: 1.2; }
.abschnitt .karte { background: var(--bg); }
/* Melden: Sachen als Kaertchen, antippen klappt "leer / kaputt / fehlt" auf */
.melde-teile { display: flex; flex-wrap: wrap; gap: 8px; }
.melde-teil { flex: 0 1 auto; max-width: 100%; }
.melde-teil.offen { flex-basis: 100%; }
.melde-name { min-height: 52px; border-radius: 99px; padding: 8px 18px; font-size: 1.1rem; text-align: left; }
.melde-teil.offen .melde-name { border-radius: 12px 12px 0 0; width: 100%; justify-content: flex-start; }
.melde-teil.gemeldet .melde-name { border-color: var(--bad); color: var(--bad); }
.melde-wahl { padding: 12px; border: 2px solid var(--text); border-top: 0; border-radius: 0 0 12px 12px; background: var(--soft); }
.melde-teil.gemeldet .melde-wahl { border-color: var(--bad); }
.melde-wahl .knopfwahl { margin: 0; }
/* Etikett: unten abgetrennter Streifen mit Hinweis + Webseite (nicht mit dem Platz verwechseln) */
.etikett { flex-wrap: wrap; }
.etikett > div.etikett-fuss {
  flex: 1 0 100%; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2mm 6mm;
  border-top: 0.5mm solid #000; padding-top: 2mm; margin-top: 1mm; font: 500 .95rem/1.3 system-ui, sans-serif;
}
.etikett-fuss b { font-weight: 800; font-size: 1.1rem; }
.schild-web { margin-top: 2mm; padding-top: 1.5mm; border-top: 0.4mm solid #000; font-size: .85rem; }

/* ===== Regal-Ebene als Leiste: Kisten so breit, wie sie Platz brauchen (60x40 = 40 cm, 40x30 = 30, 30x20 = 20) ===== */
.ebene-spalte { flex: 1; min-width: 0; }
.ebene-leiste {
  display: flex; gap: 0; min-height: 96px; padding: 3px; border-bottom: 4px solid var(--text);
  background: repeating-linear-gradient(135deg, transparent 0 8px, var(--soft) 8px 16px); border-radius: 4px 4px 0 0;
}
.ebene-leiste.zu-voll { outline: 3px solid var(--bad); outline-offset: -3px; }
.ebene-leiste .kiste-block {
  flex: 0 1 auto; min-width: 0; margin: 0 1px; padding: 3px; border: 2px solid var(--text); border-radius: 5px;
  background: var(--bg); color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 2px;
  overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ebene-leiste .kiste-block.ohne-groesse { border-style: dashed; }
.kiste-block .fach-name { font-size: .7rem; font-weight: 700; color: var(--muted); line-height: 1; }
.kiste-block img, .kiste-block .ohne-foto {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; background: var(--soft); pointer-events: none;
}
.kiste-block .ohne-foto { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .7rem; }
.kiste-block .k-name, .kiste-block .k-groesse { font-size: .72rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiste-block .k-groesse { color: var(--muted); font-size: .65rem; }
.ebene-frei { padding: 2px 4px 8px; }
.zieh-platz { opacity: .35; }
.zieh-gewaehlt { box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.regal-aendern { margin-top: 8px; }
.zeile-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.zeile-form label { flex: 1 1 120px; margin: 0; }
.zeile-form input { margin-top: 4px; }
/* kleine Leiste: Vorschau beim Anlegen und Ebenen-Wahl im Kisten-Formular */
.ebene-leiste.klein { min-height: 34px; width: 100%; padding: 2px; }
.ebene-leiste.klein .kiste-block {
  border-width: 2px; padding: 0 3px; font-size: .7rem; font-weight: 400; line-height: 26px; display: block;
  white-space: nowrap; text-overflow: ellipsis; text-align: center;
}
.ebene-leiste.klein .kiste-block.neu { border-style: dashed; color: var(--muted); font-weight: 700; font-size: 1rem; background: transparent; }
.passt-zeile { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.passt-name { flex: 0 0 7.5em; font-weight: 600; line-height: 1.1; }
.passt-name small { display: block; font-weight: 400; color: var(--muted); }
.regalbild .ebene-knopf { flex: 1; min-width: 0; min-height: 0; padding: 6px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; }
.regalbild .ebene-knopf.on .ebene-leiste { background: transparent; }
.regalbild .ebene-knopf.on .kiste-block { background: var(--btn); color: var(--btn-ink); border-color: var(--btn-ink); }
.regalbild .ebene-knopf.voll small { color: var(--bad); opacity: 1; }
.regalbild .ebene-knopf.on.voll small { color: inherit; }
/* Groessen-Wahl mit kleinem Kistensymbol */
.knopfwahl.groessen span { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.1; }
.knopfwahl.groessen small { font-weight: 400; font-size: .8rem; opacity: .8; }
.kiste-symbol { display: block; height: 18px; border: 2px solid currentColor; border-radius: 3px; }
.knopfwahl.regale span { flex-direction: column; line-height: 1.1; }
.knopfwahl.regale small { font-size: .75rem; font-weight: 400; opacity: .8; }
.knopfwahl.regale input:checked + span small.bad { color: inherit; }
#platzwahl [data-auto] small { font-weight: 400; opacity: .8; }
/* Ersatzbank unter dem Regal: keine Laengengrenze, Kisten brechen in neue Zeilen um */
.bank-reihe { margin-top: 10px; padding-top: 8px; border-top: 3px dashed var(--muted); }
.bank-reihe .kopf { font-size: .8rem; }
.ebene-leiste.bank { flex-wrap: wrap; row-gap: 4px; border-bottom: 2px dashed var(--muted); background: transparent; min-height: 70px; }
.ebene-leiste.bank .kiste-block { flex-shrink: 0; }
/* Am Laptop: Regal-Uebersicht breiter, zwei Regale nebeneinander */
@media (min-width: 1100px) {
  main.breit { max-width: 1400px; }
  main.breit .regal-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }
}

/* Regal-Uebersicht: zwischen den Lagern umschalten */
.lager-wahl { display: flex; gap: 8px; margin: 4px 0 18px; overflow-x: auto; padding-bottom: 4px; }
.lager-wahl a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px;
  border: 2px solid var(--text); border-radius: 10px; font-weight: 600; color: var(--text); text-decoration: none;
}
.lager-wahl a span { font-weight: 400; font-size: .85rem; opacity: .7; }
.lager-wahl a.aktiv { background: var(--btn); color: var(--btn-ink); }
.lager-wahl a.neu { border-style: dashed; color: var(--muted); border-color: var(--line); }
.lager-wahl a.ziel { outline: 3px dashed var(--text); outline-offset: 2px; }

/* KI-Suchwoerter */
.ki-balken { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; margin-top: 8px; }
.ki-balken div { height: 100%; width: 0; background: var(--btn); transition: width .4s; }
.ki-log { max-height: 50vh; overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; font-size: .8rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; }

/* ===== Regal-Karte "Wo gehoert das hin?" (Zurueckbringen, Kistenseite, Platz-Schild) ===== */
.wohin { margin: 10px 0 18px; }
.wohin-schritte { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 1.15rem; }
.wohin-schritte li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.regal-karte .ebene-leiste { min-height: 64px; }
.regal-karte .kiste-block { padding: 2px; }
.regal-karte.mit-ziel .reihe:not(.ziel) { opacity: .4; }
.regal-karte.mit-ziel .reihe.ziel .kiste-block:not(.ziel) { opacity: .55; }
.regal-karte .reihe.ziel .kopf { background: var(--btn); color: var(--btn-ink); border-radius: 4px; }
.regal-karte .reihe.ziel .ebene-leiste { outline: 3px solid var(--text); outline-offset: 1px; }
.regal-karte .kiste-block.ziel { background: var(--btn); color: var(--btn-ink); border-width: 4px; font-weight: 700; animation: ziel-blinken 1.4s ease-in-out 3; }
@keyframes ziel-blinken { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .regal-karte .kiste-block.ziel { animation: none; } }
details.wohin-auf { margin: -4px 0 14px; }
details.wohin-auf > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

.regal-karte { overflow: hidden; max-width: 100%; }
.regal-karte .reihe, .regal-karte .ebene-spalte, .regal-karte .ebene-leiste { min-width: 0; }
.regal-karte .ebene-leiste { overflow: hidden; }
.regal-karte .reihe .kopf { flex: 0 0 2em; }
.regal-karte .kiste-block img { aspect-ratio: 1; }

/* ===== Liste aus Excel uebernehmen ===== */
.import-zeile { margin: 10px 0; padding: 12px; }
.import-zeile.nicht-gefunden { border-style: dashed; }
.import-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 1.15rem; }
.import-menge { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; font-weight: 400; color: var(--muted); }
.import-menge input { width: 5.5em; margin: 0; }
.knopfwahl.spalte { flex-direction: column; gap: 6px; }
.knopfwahl.spalte span { display: block; text-align: left; min-height: 0; padding: 8px 12px; font-size: 1rem; }
.knopfwahl.spalte small { display: block; font-weight: 400; font-size: .85rem; margin-top: 2px; }
.knopfwahl.spalte input:checked + span .muted, .knopfwahl.spalte input:checked + span .bad { color: inherit; }
.knopfwahl.spalte label.aus span { border-style: dashed; }

/* ===== Platz in Worten (unter/neben dem Code) ===== */
.platz-worte { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); font-family: inherit; letter-spacing: 0; line-height: 1.25; }
.zeile2 .platz-worte, .zeile3 .platz-worte, .titel .platz-worte { display: inline; margin-left: 6px; }
.ort .platz-worte { flex-basis: 100%; font-size: 1rem; color: var(--text); }
.kistenkopf .wo .platz-worte { font-size: .95rem; }

/* ===== Packen: "Als Naechstes" + Ueberschriften je Regal ===== */
.karte.naechste { border: 3px solid var(--text); padding: 14px; margin: 8px 0 18px; }
.naechste-name { font-size: 1.6rem; font-weight: 800; line-height: 1.15; margin: 4px 0 2px; overflow-wrap: anywhere; }
.karte.naechste .wohin { margin-bottom: 10px; }
.liste-gruppe { margin: 18px 0 0; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.pack.ist-naechste { outline: 2px dashed var(--text); outline-offset: -2px; }

/* ===== Packen als Diashow ===== */
.dias { margin: 6px 0 14px; }
.dia-leiste { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.dia-pfeil { min-width: 64px; min-height: 52px; font-size: 1.8rem; line-height: 1; padding: 0 14px; }
.dia-zahl { font-weight: 700; font-size: 1.1rem; }
.dia.karte { border: 3px solid var(--text); padding: 14px; margin: 0; }
.dia.on { border-style: dashed; }
.dia.on .naechste-name { text-decoration: line-through; color: var(--muted); }
details.ganze-liste { margin-top: 6px; }
details.ganze-liste > summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.zusatz-knoepfe { display: flex; gap: 10px; }
.zusatz-knoepfe .block { flex: 1 1 0; min-height: 56px; }

/* Umschalter Diashow / Liste */
.ansicht-wahl { display: flex; gap: 8px; margin: 4px 0 10px; }
.ansicht-wahl button { flex: 1 1 0; min-height: 48px; font-size: 1rem; }
#liste.als-liste .dias { display: none; }
#liste.als-liste details.ganze-liste > summary { display: none; }

/* Suche: gesuchte Sache in der Kiste */
.gefunden { font-size: .95rem; margin-top: 2px; }
.gefunden b { font-weight: 800; }

/* "So geht's" auf der Startseite */
.so-gehts { padding: 14px; margin: 6px 0 20px; }
.so-gehts ol { margin: 6px 0 12px; padding-left: 1.3em; line-height: 1.45; }
.so-gehts li { margin: 4px 0; }

/* Plaetze ohne Regal */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
details.platz-aendern { flex: 0 0 auto; }
details.platz-aendern > summary { cursor: pointer; padding: 8px 4px; color: var(--muted); }
details.platz-aendern[open] { flex-basis: 100%; }


/* ===== Formular Schritt fuer Schritt (Lager.schritte): immer nur eine Frage ===== */
.schritte .schritt-seite:not(.aktiv) { display: none; }
.schritt-zahl { color: var(--muted); font-size: .9rem; margin: 0 0 2px; }
.schritt-zahl:empty { display: none; }
.schritte .schritt-seite > .frage:first-of-type, .schritte .schritt-seite > .schritt-zahl + .frage { margin-top: 0; }
form:not(.schritte) .schritt-seite + .schritt-seite { margin-top: 30px; padding-top: 6px; border-top: 1px solid var(--line); }
.schritt-knoepfe { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.schritt-knoepfe [hidden] { display: none; }

/* Erklaertext eingeklappt: "Wie geht das?" */
details.hilfe { margin: 0 0 16px; color: var(--muted); }
details.hilfe summary { cursor: pointer; font-weight: 600; color: var(--text); min-height: 44px; display: flex; align-items: center; }
details.hilfe p, details.hilfe ul { margin: 4px 0 8px; }
details.hilfe ul { padding-left: 20px; }
/* Im Kisten-Formular ist "Wo steht sie?" schon die Frage – die Unterfragen der Platzwahl kleiner */
#platzwahl .frage { font-size: 1.05rem; font-weight: 600; margin: 4px 0 8px; color: var(--muted); }
