/* wherebox App: mobil zuerst, Einhandbedienung. Farben wie die Landingpage (Kartonbraun, Neongrün nur für die EINE Hauptaktion je Ansicht). Kein Inline-Style, keine Fremdschriften. */
/* Raster 4 px; Schriftstärken 400 (Text), 500 (Beschriftungen), 600 (Überschriften); Linien 1 px; Radius 10-12 px */
:root { --karton: #b98a5b; --hell: #f6efe3; --tint: #ede0c9; --braun: #2a1b0f; --neon: #39ff14; --muted: #5e4a38; --rot: #a00000; --warn: #8a4b00; --line: #e1d3b8; --line-strong: #8a7355; --tabbar: 64px; --tile: #b98a5b; --tile-done: #d9c2a0; --radius: 12px; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: calc(var(--tabbar) + 120px); scroll-padding-top: 64px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.45; color: var(--braun); background: var(--hell); }
[hidden] { display: none !important; }
a { color: inherit; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 16px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.125rem; line-height: 1.3; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--braun); outline-offset: 2px; }

#app { max-width: 680px; margin: 0 auto; min-height: 100vh; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 16px; background: var(--braun); color: var(--hell); }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--neon); font-weight: 900; font-size: 1.25rem; text-decoration: none; }
.top__backup { min-width: 0; max-width: 100%; font-size: .875rem; text-align: right; overflow-wrap: anywhere; }
.top__backup .btn { max-width: 100%; white-space: normal; }
#view { padding: 20px 16px calc(var(--tabbar) + 100px + env(safe-area-inset-bottom)); outline: none; }
.fatal { max-width: 560px; margin: 0 auto; padding: 48px 20px; }

/* Buttons: 48 px, der primäre 52 px; sekundäre Aktionen sind Outline oder Textbuttons */
.btn { display: block; width: 100%; min-height: 48px; margin: 0 0 12px; padding: 12px 16px; font: inherit; font-weight: 500; text-align: center; text-decoration: none; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.btn--primary { min-height: 52px; font-weight: 600; background: var(--neon); border-color: var(--braun); }
.btn--ghost, .btn--text { background: transparent; border-color: transparent; text-decoration: underline; }
.btn--text { display: inline-block; width: auto; min-height: 40px; margin: 0; padding: 8px 4px; }
.btn--danger { color: #fff; background: var(--rot); border-color: var(--rot); }
.btn--danger-outline { color: var(--rot); border-color: var(--rot); background: #fff; }
.btn--small { display: inline-block; width: auto; min-height: 44px; margin: 4px 8px 4px 0; padding: 8px 16px; }
.btn:disabled { opacity: .6; cursor: progress; }
.linkbtn { min-height: 44px; padding: 8px 0; font: inherit; font-weight: 500; text-decoration: underline; color: var(--braun); background: none; border: 0; cursor: pointer; }

/* Hinweise */
.notice { margin: 0 0 16px; padding: 12px 16px; background: var(--tint); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.notice p { margin: 0 0 8px; }
.notice--error { background: #ffe0da; border-color: var(--rot); }
.purchase-status { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0 0 16px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--tint); }
.purchase-status h2 { margin: 1px 0 4px; font-size: 1.125rem; }
.purchase-status p { margin: 0 0 12px; }
.purchase-status__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--hell); background: var(--braun); font-size: 1.375rem; font-weight: 700; }
.purchase-status--success { border-color: var(--braun); background: #f2f8ee; }
.purchase-status--success .purchase-status__mark { background: var(--neon); color: var(--braun); }
.purchase-status--timeout { background: #fff8e5; }
.purchase-status .btn { margin: 0 8px 8px 0; }
.purchase-status__progress { width: min(220px, 100%); height: 5px; overflow: hidden; border-radius: 99px; background: #ddd2bd; }
.purchase-status__progress span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--braun); transform: scaleX(.08); transform-origin: left; animation: purchase-progress 60s cubic-bezier(.16, 1, .3, 1) forwards; }
.purchase-status__details { margin-top: 6px; color: var(--muted); font-size: .8125rem; }
.purchase-status__details summary { min-height: 32px; cursor: pointer; }
@keyframes purchase-progress { 0% { transform: scaleX(.08); } 35% { transform: scaleX(.55); } 100% { transform: scaleX(.94); } }
@media (prefers-reduced-motion: reduce) { .purchase-status__progress span { animation: none; transform: scaleX(.6); } }
.panel { margin: 0 0 20px; padding: 16px 16px 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hint, .empty { color: var(--muted); }
.error { color: var(--rot); font-weight: 500; min-height: 1.4em; margin: 4px 0; }
.status { min-height: 1.5em; margin: 8px 0; font-weight: 500; }
.status:empty { min-height: 0; margin: 0; }

/* Auswahlmenüs (Raum, Filter, Sortierung): native <select>, 48 px hoch, Pfeil rechts */
.select { position: relative; }
.select__input { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 8px 40px 8px 12px; font: inherit; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.select__arrow { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.field--room .select + input { margin-top: 8px; }

/* Start: dunkler Kopf mit Suchfeld, Fortschritt, Raum-Chips, Kartonkarten */
.passchip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: .8125rem; font-weight: 500; color: var(--hell); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; }
.passchip:empty { display: none; }
.top .passchip:focus-visible, .top .brand:focus-visible { outline-color: var(--neon); }
.hero { margin: -20px -16px 16px; padding: 4px 16px 20px; color: var(--hell); background: var(--braun); }
.hero__title { margin: 0 0 12px; font-size: 1.625rem; line-height: 1.15; }
.hero__search { position: relative; margin: 0; }
.hero__icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--muted); pointer-events: none; }
.hero .hero__input { min-height: 52px; padding: 8px 14px 8px 44px; font-size: 1rem; border: 0; border-radius: var(--radius); }
.hero .hero__input:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.progress-text { margin: 0 0 4px; font-size: .875rem; font-weight: 500; }
.progress { display: block; width: 100%; height: 8px; margin: 0 0 16px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: var(--tint); color: var(--braun); accent-color: var(--braun); }
.progress::-webkit-progress-bar { background: var(--tint); }
.progress::-webkit-progress-value { background: var(--braun); border-radius: 99px; }
.progress::-moz-progress-bar { background: var(--braun); border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { min-height: 44px; padding: 8px 16px; font: inherit; font-size: .875rem; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.chip--on { font-weight: 500; color: var(--hell); background: var(--braun); border-color: var(--braun); }
.chip__n { font-variant-numeric: tabular-nums; opacity: .85; }
.cards { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 12px; padding: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card--done { background: var(--tint); }
.card__link { display: flex; align-items: stretch; gap: 12px; min-height: 64px; padding: 10px; color: var(--braun); text-decoration: none; border-radius: var(--radius); }
.card__no, .tile { flex: none; display: grid; place-items: center; width: 64px; height: 64px; font-size: 1.625rem; font-weight: 700; color: var(--braun); background: var(--tile); border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(42, 27, 15, .25); }
.card--done .card__no { background: var(--tile-done); box-shadow: none; }
.card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.card__head .tags { margin: 0; }
.card__room { font-weight: 600; }
.card__items { color: var(--muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card--done .card__room { font-weight: 500; }
.badge { display: inline-block; justify-self: start; padding: 2px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; color: var(--neon); background: var(--braun); border-radius: 10px; }
.badge--big { font-size: 1.5rem; vertical-align: middle; }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; }
.tag { padding: 0 8px; font-size: .8125rem; font-weight: 500; color: var(--braun); background: var(--tint); border-radius: 999px; }
.card--done .tag { background: #fff; }
.tag--done { background: transparent !important; border: 1px solid var(--line-strong); }
.hit-title { overflow-wrap: anywhere; }
.fab-bar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 25; max-width: 680px; margin: 0 auto; padding: 8px 16px; background: var(--hell); border-top: 1px solid var(--line); }
.fab { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 22px; font-weight: 600; color: var(--braun); text-decoration: none; background: var(--neon); border: 1px solid var(--braun); border-radius: 999px; }

/* Suchergebnis */
.result-count { margin: 0 0 8px; font-size: .875rem; font-weight: 500; color: var(--muted); }
.top-hit { margin: 0 0 16px; padding: 16px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.top-hit__head { display: flex; gap: 14px; align-items: center; margin: 0 0 12px; }
.tile { box-shadow: inset 0 0 0 2px rgba(42, 27, 15, .25); }
.tile--big { width: 72px; height: 72px; font-size: 2rem; }
.top-hit__text { min-width: 0; overflow-wrap: anywhere; }
.top-hit__name { font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.top-hit__box, .top-hit__room { color: var(--muted); }
.top-hit__more { margin: 0 0 16px; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.top-hit .btn { margin: 0; }
.hits { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; }
.hit__link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; color: var(--braun); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.hit__link .tile { width: 40px; height: 40px; font-size: 1rem; }
.hit__text { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.hit__name { font-weight: 600; }
.hit__sub { color: var(--muted); font-size: .875rem; }
.hit__chev { display: inline-flex; color: var(--muted); }

/* Formular */
.bignumber { margin: 0; font-size: 4.5rem; line-height: 1; font-weight: 600; letter-spacing: -.03em; }
.write-on { margin: 0; color: var(--muted); }
.numberblock { margin: 0 0 24px; padding: 16px; text-align: center; background: var(--tint); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.field { margin: 0 0 24px; }
.form label { display: block; margin: 0 0 4px; font-weight: 500; }
input[type="text"], input[type="search"], textarea { width: 100%; min-height: 48px; padding: 8px 12px; font: inherit; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; }
textarea { min-height: 80px; resize: vertical; }
.switches { display: grid; gap: 8px; margin: 0 0 24px; }
.switch { display: flex !important; align-items: center; gap: 12px; min-height: 48px; margin: 0 !important; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.switch input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--braun); }

/* Inhaltsliste: kompakte Zeilen mit 1-px-Trennern (Name, Stepper, Entfernen) */
.items { list-style: none; margin: 0 0 16px; padding: 0; }
.item { padding: 4px 0; border-bottom: 1px solid var(--line); }
.item__main { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; min-height: 48px; }
.item .item-name { flex: 1 1 72px; min-width: 0; min-height: 44px; padding: 8px 0; resize: none; overflow: hidden; line-height: 1.3; font: inherit; color: var(--braun); font-weight: 400; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.item .item-name:focus { border-bottom-color: var(--braun); }
.item--off .item-name { color: var(--muted); }
.item__flag { flex-basis: 100%; margin: 0 0 4px; padding-left: 0; font-size: .8125rem; font-weight: 500; color: var(--warn); }
.item-use-label { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 !important; cursor: pointer; }
.item-use-label input { width: 22px; height: 22px; margin: 0; accent-color: var(--braun); }
.review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 8px; padding: 8px 12px; background: #fff7e0; border: 1px solid var(--line-strong); border-radius: 10px; }
.review__hint { flex: 1 1 200px; margin: 0; font-size: .9375rem; }
.qty { display: inline-flex; align-items: center; flex: none; }
.qty__btn, .item-del { flex: none; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; font: inherit; font-size: 1.25rem; font-weight: 300; line-height: 1; color: var(--muted); background: transparent; border: 0; border-radius: 10px; cursor: pointer; }
.qty__btn:hover, .qty__btn:focus-visible, .item-del:hover, .item-del:focus-visible, .item-del:active { color: var(--braun); background: var(--tint); }
.item-del:hover, .item-del:focus-visible { color: var(--rot); }
.qty .item-qty { width: 44px; min-height: 44px; padding: 0; text-align: center; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; }
.add-row { display: grid; gap: 8px; margin: 0 0 16px; }
.savebar .btn--primary { box-shadow: 0 1px 2px rgba(42, 27, 15, .25); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 680px; margin: 0 auto; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: var(--hell); border-top: 1px solid var(--line-strong); }
.savebar .btn { margin: 0; }

/* Untere Tab-Leiste (Daumenbereich): nur Kartons und Mehr */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr; max-width: 680px; margin: 0 auto; padding: 0 0 env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px; font-weight: 500; font-size: .8125rem; text-align: center; color: var(--muted); text-decoration: none; }
.tab[aria-current="page"] { font-weight: 600; color: var(--braun); }
.tab .icon { width: 22px; height: 22px; }

/* Karte "Sicherung": ruhig, fällig, dringend (Text bleibt in allen Stufen lesbar, die Stufe zeigt sich zusätzlich an Rahmen und Hintergrund) */
.backup-card { margin: 0 0 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.backup-card--due { background: #fff7e0; border-color: var(--line-strong); }
.backup-card--strong { background: #ffe9c2; border: 2px solid var(--warn); }
.backup-card__line { margin: 0 0 4px; font-weight: 500; }
.backup-card__why { margin: 0 0 4px; font-size: .9375rem; }
.backup-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.backup-card .btn { margin: 0; }

/* Automatische Sicherung: Code anzeigen (gut lesbar, druckbar) */
.code-box { margin: 0 0 8px; padding: 16px; text-align: center; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.code-box__label { margin: 0 0 4px; color: var(--muted); font-size: .875rem; }
.code-box__code { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; }
.code-actions, .backup-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 8px; }
.code-actions .btn, .backup-actions .btn { margin: 0; }
.backup-card--auto { font-weight: 500; }
@media print { body * { visibility: hidden; } #code-box, #code-box * { visibility: visible; } #code-box { position: absolute; left: 0; top: 0; width: 100%; border: 0; } }

/* Statuskarte, Hinweise zu den Stufen */
.status-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 12px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.status-card__line { flex: 1 1 200px; font-weight: 500; }
.status-card__soon { color: var(--muted); font-size: .875rem; }
.status-card .btn { margin: 0; }
.notice--limit { border-color: var(--braun); }
.notice .btn--small { margin-top: 4px; }

/* Informationen und Fußzeile */
.linklist { list-style: none; margin: 0 0 12px; padding: 0; }
.linklist li + li { border-top: 1px solid var(--line); }
.linklist__a { display: flex; align-items: center; min-height: 48px; text-decoration: none; }
.linklist__a:hover { text-decoration: underline; }
.legal { margin: 24px 0 0; text-align: center; font-size: .875rem; color: var(--muted); }
.legal a { display: inline-block; min-height: 44px; padding: 12px 8px; color: var(--muted); }

/* Dialog und Hinweis-Leiste */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(42, 27, 15, .65); }
.dialog { width: min(480px, 100%); max-height: 100%; overflow: auto; padding: 24px; background: #fff; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 8px 32px rgba(42, 27, 15, .3); }
.dialog .btn { margin-top: 8px; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 656px; margin: 8px 16px 0; padding: 8px 16px; font-weight: 500; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.toast .btn { margin: 0; color: var(--braun); background: var(--neon); }
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step__n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; font-weight: 600; color: var(--neon); background: var(--braun); border-radius: 50%; }
.step h2 { margin-bottom: .2em; }
.searchform { margin: 0 0 14px; }

/* Erfassen (Foto, Sprache) */
.capture { margin: 0 0 16px; }
.capture__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 8px; }
.seg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 80px; padding: 8px; font: inherit; font-weight: 500; color: var(--braun); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
.seg:hover { background: var(--tint); }
.seg--hi { font-weight: 600; background: var(--tint); border: 2px solid var(--braun); }
.seg .icon { width: 26px; height: 26px; }
.capture__row:empty { display: none; }
.thumbs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.thumbs li { display: grid; gap: 6px; justify-items: center; }
.thumbs img { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.bullets { margin: 0 0 14px; padding-left: 1.2em; }
.bullets li { margin: 0 0 6px; }

/* Stufenwahl: Karten je Stufe (Name und Preis, Kartons, Foto-Analysen); Standard+ hervorgehoben */
.tiers { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tier { position: relative; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.tier label, .tier--free, .tier--current { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label label" "name price" "boxes boxes" "sub sub" "ai ai" "pick pick"; gap: 2px 12px; padding: 14px 14px 14px 52px; min-height: 56px; cursor: pointer; }
.tier--free, .tier--current { grid-template-areas: "name price" "boxes boxes" "sub sub"; padding-left: 16px; background: var(--tint); cursor: default; }
.tier__label { grid-area: label; justify-self: start; margin: 0 0 4px; padding: 2px 10px; font-size: .8125rem; font-weight: 600; color: var(--neon); background: var(--braun); border-radius: 999px; }
.tier__name { grid-area: name; font-weight: 600; font-size: 1.125rem; }
.tier__boxes { grid-area: boxes; font-weight: 500; }
.tier__price { grid-area: price; justify-self: end; font-size: 1.25rem; font-weight: 600; }
.tier__sub { grid-area: sub; font-size: .875rem; color: var(--muted); }
.tier__sub + .tier__sub { grid-area: ai; }
.tier__pick { grid-area: pick; display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; font-weight: 500; border: 1px solid var(--line-strong); border-radius: 10px; }
.tier__radio { position: absolute; left: 14px; top: 16px; width: 26px; height: 26px; margin: 0; accent-color: var(--braun); }
.tier:has(.tier__radio:checked) { background: var(--tint); border-color: var(--braun); box-shadow: inset 0 0 0 1px var(--braun); }
.tier:has(.tier__radio:checked) .tier__pick { font-weight: 600; background: #fff; border: 2px solid var(--braun); }
.tier:has(.tier__radio:focus-visible) { outline: 3px solid var(--braun); outline-offset: 2px; }
.tier--best { border: 2px solid var(--braun); box-shadow: 0 2px 8px rgba(42, 27, 15, .18); }
.everytier { margin: 0 0 14px; padding: 12px 16px; background: var(--tint); border-radius: var(--radius); }
.everytier h3 { margin: 0 0 4px; font-size: 1rem; }
.everytier ul { margin: 0; padding-left: 1.2em; }

/* Fehlermeldungen (zentral, src/client/errors.ts) */
.errors { max-width: 680px; margin: 0 auto; padding: 8px 12px 0; }
.errors:empty, .error-host:empty { display: none; }
.error-host { margin: 8px 0; }
.errbox { margin: 8px 0; padding: 12px 16px; background: #ffe0da; border: 1px solid var(--rot); border-radius: var(--radius); }
.errbox--info { background: var(--tint); border-color: var(--line-strong); }
.errbox--warn { background: #fff3c4; border-color: var(--line-strong); }
.errbox p { margin: 6px 0; }
.errbox__title { font-size: 1rem; font-weight: 600; }
.errbox__detail { font-weight: 500; }
.errbox__code { font-size: .875rem; color: var(--muted); }
.errcode { padding: 1px 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; background: #fff; border-radius: 6px; user-select: all; }
.errbox__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.errbox:focus { outline: 3px solid var(--braun); outline-offset: 2px; }
.top__backup { order: 3; flex-basis: 100%; } .top__backup:empty { display: none; }

/* Start: Hinweise über der Liste bleiben kompakt (die Liste soll auf dem ersten Bildschirm mit mindestens drei Karten beginnen) */
.page--list .notice, .page--list .backup-card { margin: 0 0 12px; padding: 8px 12px; font-size: .9375rem; }
.page--list .notice p, .page--list .backup-card p { margin: 0 0 4px; }
.page--list .backup-card__why { display: none; }

/* Erfassen: Nummernblock mit Etikett-Kachel, Raum-Chips, Zurück-Link, Foto-Fehler */
.backlink { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -8px 0 8px; padding: 0 8px 0 0; font-weight: 500; text-decoration: none; }
.numberblock { padding: 12px 16px; text-align: left; }
.numberblock__row { display: flex; align-items: center; gap: 16px; }
.numberblock .write-on { flex: 1; min-width: 0; color: var(--braun); font-size: 1.0625rem; }
.numberblock .write-on strong { font-weight: 700; }
.numberblock .linkbtn { color: var(--muted); font-size: .9375rem; }
.chips--room { margin: 0 0 8px; }
.item__flag { display: inline-block; flex-basis: auto; padding: 0 8px; background: #fff3c4; border-radius: 999px; }
.errbox--photo .errbox__actions { margin: 8px 0; }
.errbox--photo { background: #ffe0da; border: 1px solid var(--rot); }

/* Mehr: Pass-Karte (dunkel), Kaufangebot, Sicherungs-Karte, Zeilenliste, Fußzeile */
.passcard { margin: 0 0 16px; padding: 16px; color: var(--hell); background: var(--braun); border-radius: 16px; }
.passcard__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.passcard__tier { font-size: 1.375rem; font-weight: 600; }
.passcard__sub { font-size: .875rem; color: #e1d3b8; }
.passcard__row { margin: 0 0 12px; }
.passcard__label { margin: 0 0 4px; font-size: .9375rem; font-weight: 500; }
.passcard__soon { margin: 0; font-size: .875rem; color: #e1d3b8; }
.meter { display: block; width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: #4a3523; color: var(--neon); }
.meter::-webkit-progress-bar { background: #4a3523; }
.meter::-webkit-progress-value { background: var(--hell); border-radius: 99px; }
.meter::-moz-progress-bar { background: var(--hell); border-radius: 99px; }
.btn--outline-light { margin: 4px 0 0; color: var(--hell); background: transparent; border-color: var(--hell); }
.offercard { margin: 0 0 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.offercard h2 { margin: 0 0 4px; }
.offercard__text { margin: 0 0 12px; color: var(--muted); }
.offercard__tiers { list-style: none; margin: 0 0 12px; padding: 0; }
.offercard__tiers li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.offercard__best { margin-left: 8px; padding: 0 8px; font-size: .8125rem; font-weight: 600; color: var(--neon); background: var(--braun); border-radius: 999px; }
.offercard .btn { margin: 0; }
.backupcard { margin: 0 0 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.backupcard h2 { margin: 0 0 4px; }
.backupcard__line { margin: 0 0 12px; color: var(--muted); }
.backupcard__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.backupcard__actions .btn { margin: 0; }
.rowlist { list-style: none; margin: 0 0 16px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rowlist li + li { border-top: 1px solid var(--line); }
.rowlist__a { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 8px 16px; font: inherit; color: var(--braun); text-align: left; text-decoration: none; background: none; border: 0; cursor: pointer; }
.rowlist__chev { display: inline-flex; color: var(--muted); }
.legal--more p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.legal--more a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); }

/* Leerer Start */
.empty-start__title { margin: 8px 0 20px; font-size: 1.625rem; }
.empty-start .steps { gap: 16px; margin-bottom: 24px; }
.empty-start .step__title { margin: 0; font-size: 1rem; font-weight: 600; }
.empty-start .step__text { margin: 0; color: var(--muted); }
.empty-start__note { margin: 16px 0 0; text-align: center; }

/* Meldung als Zeile unter dem ganzen dunklen Kopf: überdeckt nie eine Karte */
.toast { padding: 6px 12px; font-size: .9375rem; }
.hero + .toast { margin: 0 0 16px; }
/* Erfassen: Hinweise einklappbar, "Hinzufügen" als Outline mit kleinem Abstand */
.notes { margin: 0 0 12px; }
.notes summary { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .9375rem; cursor: pointer; }
.add-row { gap: 4px; margin: 0 0 16px; }
.add-row .btn { margin: 0; color: var(--braun); background: transparent; }
.offercard__best { display: block; width: fit-content; margin: 2px 0 0; font-size: .75rem; white-space: nowrap; }
.offercard__name { display: flex; flex-direction: column; align-items: flex-start; }
.offercard__tiers li > span:last-child { white-space: nowrap; }
/* Fußzeile in Kartonliste und leerem Start: ganz unten im Scrollbereich, über der Tab-Leiste und dem Knopf "Neuer Karton" frei */
.legal--list { margin: 16px 0 0; }
.legal--list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
/* Fällige Sicherung unter dem Limit-Hinweis: nur Zeile und ein Knopf, damit die Liste nicht verdrängt wird */
.page--list .backup-card--compact { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 12px; }
.page--list .backup-card--compact .backup-card__line { flex: 1 1 auto; }
.page--list .backup-card--compact .backup-card__actions { flex: none; }
.page--list .backup-card--compact .backup-card__line { margin: 0; }
.page--list .backup-card--compact #backup-offer-pass { display: none; }
.page--list .backup-card--compact .backup-card__actions { flex-direction: column; align-items: stretch; gap: 0; }
.page--list .backup-card--compact .btn--small { min-height: 36px; padding: 4px 14px; }
.page--list .backup-card--compact .btn--text { min-height: 32px; padding: 2px 4px; }
.page--list .notice--compact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; }
.page--list .notice--compact p { margin: 0; }
.page--list a.notice--compact.notice--limit { display: block; min-height: 44px; padding: 10px 12px; font-size: .875rem; line-height: 1.4; color: inherit; text-decoration: none; }
a.notice--compact > span + span { margin-left: 6px; }
.notice__more { font-weight: 600; white-space: nowrap; text-decoration: underline; }

/* Kartonliste: unten Platz für Neuer-Karton-Taste und Tab-Leiste, damit die letzte Karte nie verdeckt wird */
.page--list { padding-bottom: calc(56px + 16px + env(safe-area-inset-bottom)); }
/* Offline-Hinweis und andere globale Banner: im Seitenraster, kompakt */
#banners { padding: 0 16px; }
#banners:not(:empty) { padding-top: 8px; }
#banners .notice { margin: 0 0 8px; padding: 6px 12px; font-size: .875rem; }
#banners .notice p { margin: 0 0 4px; }
#banners .notice p:last-child { margin: 0; }
#banners .notice .btn--small { min-height: 40px; margin: 0 8px 4px 0; }
/* Hinweise zu Foto und Sprache: sichtbarer Aufklapp-Pfeil, dreht sich bei offen */
.notes summary { justify-content: space-between; list-style: none; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: ''; width: 8px; height: 8px; margin: 0 8px 4px 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.notes[open] summary::after { margin-bottom: 0; transform: rotate(-135deg); }
/* Deaktivierter Hauptknopf: dunkel mit weißer Schrift (Kontrast mindestens 4,5:1), nicht blass */
.btn--primary:disabled { opacity: 1; color: #fff; background: var(--muted); border-color: var(--muted); cursor: not-allowed; }

/* Kleine Symbole im Text (Warnung, Pfeil) */
.icon--inline { width: 16px; height: 16px; margin: 0 4px -3px 0; vertical-align: baseline; }
.notice__more .icon--inline { margin: 0 0 -3px 2px; }
.item__flag .icon--inline { margin-bottom: -3px; }

/* Aktionen: Karton nach Ablauf eines Gratispasses nur ansehen, auspacken, löschen */
.items-ro { margin: 12px 0; padding: 0; list-style: none; }
.items-ro li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#box-locked .btn { margin-top: 12px; }
#code-input { text-transform: uppercase; letter-spacing: .06em; }

/* Installations-Anleitung (gemeinsames Modul install.ts) */
.install[hidden] { display: none; }
.install-dialog::backdrop { background: rgba(42, 27, 15, .6); }
.install-dialog { padding: 0; }
.install__body { padding: 24px; }
.install__steps li { margin-bottom: 8px; }
.install__icon { vertical-align: -5px; }
.install__note { color: var(--muted); font-size: .9375rem; }
