:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --text: #1d1c1a;
  --muted: #6b675f;
  --line: #e4e0d6;
  --accent: #2f6b4f;
  --accent-text: #ffffff;
  --accent-soft: #e3efe8;
  --offer: #9a5b13;
  --offer-soft: #f6ead9;
  --danger: #b3261e;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151513;
    --surface: #1f1f1c;
    --text: #efede7;
    --muted: #a19d93;
    --line: #34332e;
    --accent: #5fb38a;
    --accent-text: #0f1a14;
    --accent-soft: #1f3329;
    --offer: #e0a456;
    --offer-soft: #3a2c19;
    --danger: #f2827a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 140px; }
header.top h1 { margin: 0 0 4px; font-size: 1.75rem; letter-spacing: -0.01em; }
header.top p { margin: 0; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card.sel-buy { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.card.sel-offer { border-color: var(--offer); box-shadow: 0 0 0 2px var(--offer) inset; }
.photo { aspect-ratio: 4 / 3; background: var(--line); object-fit: cover; width: 100%; cursor: zoom-in; }
.photo.empty { display: grid; place-items: center; color: var(--muted); cursor: default; }
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card .desc { margin: 0; color: var(--muted); font-size: 0.925rem; white-space: pre-line; }
.price { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }

.seg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: auto; }
.seg button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  padding: 9px 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.seg button[aria-pressed="true"][data-choice="none"] { background: var(--line); }
.seg button[aria-pressed="true"][data-choice="buy"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.seg button[aria-pressed="true"][data-choice="offer"] { background: var(--offer); color: var(--surface); border-color: var(--offer); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.actions .btn { flex: 1; }
.offer-form { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.total-line { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 0 0 20px; }
.row-end { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.summary li.mine-item { flex-wrap: wrap; align-items: center; }
.summary li.mine-item .row-end { flex-wrap: wrap; white-space: normal; }
.icon-btn { border: 1px solid var(--line); background: transparent; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); }
#paypal-buttons { margin-top: 12px; max-width: 420px; }
.btn.paypal { display: block; text-align: center; text-decoration: none; background: #ffc439; color: #111; font-size: 1.05rem; padding: 14px 18px; }
.steps { margin: 0 0 16px; padding-left: 20px; }
.steps li { margin: 4px 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="file"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
textarea { min-height: 80px; resize: vertical; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 0.875rem; border-radius: 9px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }

.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.bar .inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}
.panel h2 { margin: 0 0 12px; font-size: 1.25rem; }
.summary { list-style: none; padding: 0; margin: 0 0 16px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.summary li:last-child { border-bottom: 0; }
.tag { font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tag.buy { background: var(--accent-soft); color: var(--accent); }
.tag.offer { background: var(--offer-soft); color: var(--offer); }
.tag.sold { background: var(--line); color: var(--muted); }

.sig-box { position: relative; border: 1px dashed var(--muted); border-radius: 10px; background: #fff; touch-action: none; }
.sig-box canvas { display: block; width: 100%; height: 180px; }
.sig-box .hint { position: absolute; left: 12px; bottom: 8px; color: #8a867c; font-size: 0.8rem; pointer-events: none; }
.sig-box .clear { position: absolute; right: 8px; top: 8px; background: #fff; color: #1d1c1a; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.check input { margin-top: 4px; width: 20px; height: 20px; flex: none; }

.msg { padding: 10px 12px; border-radius: 10px; margin: 12px 0; }
.msg.err { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.msg.ok { background: var(--accent-soft); color: var(--accent); }

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > img { flex: 0 0 100%; scroll-snap-align: center; }
.gallery-wrap { position: relative; }
.dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 2px rgba(0,0,0,.5); }
.dots span.on { background: #fff; }
.gallery-wrap .count { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; pointer-events: none; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: flex; align-items: center; z-index: 50; }
.lightbox .gallery { width: 100%; height: 100%; }
.lightbox .gallery > img { height: 100%; object-fit: contain; padding: 16px; }
.lightbox .close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 1.1rem; cursor: pointer; }

.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Infotext des Verkäufers (Abholung usw.) */
.info-box { background: var(--accent-soft); color: var(--text); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; white-space: pre-line; font-size: 0.95rem; }

/* Kompakte Kacheln: am Handy 2 nebeneinander */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; } }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile.sel-buy { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.tile.sel-offer { border-color: var(--offer); }
.tile-open { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.tile-img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--line); }
.tile-img.empty { display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; }
.tile .count { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 0.7rem; padding: 1px 7px; border-radius: 99px; }
.tile-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; }
.tile-title { font-weight: 600; font-size: 0.92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 30px; }
.tile-price { font-weight: 700; font-variant-numeric: tabular-nums; padding-right: 36px; }
.tile-note { font-size: 0.75rem; color: var(--offer); font-weight: 600; }
.tile-cart { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text); font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.tiles-divider { grid-column: 1 / -1; margin: 18px 0 0; font-size: 1rem; color: var(--muted); font-weight: 600; }
.tile.gone .tile-img { filter: grayscale(1); opacity: .45; }
.tile.gone .tile-body { opacity: .6; }
.tile.gone .tile-price { text-decoration: line-through; }
.gone-badge { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.72); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 4px 10px; border-radius: 99px; white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }
.gone-badge.mine { top: 8px; left: 8px; transform: none; background: var(--offer); color: #fff; }
.tile-cart.on { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }

/* Detailansicht als Blatt von unten */
body.no-scroll { overflow: hidden; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-inner { position: relative; background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-inner { border-radius: 18px; } }
.sheet-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1rem; cursor: pointer; }
.sheet .gallery-wrap .count { right: auto; left: 10px; top: 14px; }
.sheet-text { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sheet-text h2 { margin: 0; font-size: 1.25rem; }
.sheet-text .desc { margin: 0; color: var(--muted); white-space: pre-line; }
[hidden] { display: none !important; }
.old-price { margin-left: 6px; font-weight: 400; font-size: 0.8rem; color: var(--muted); }

/* ---------- Umzugs Manager ---------- */
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand .logo { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.hero { padding: 32px 0 8px; }
.hero h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.features { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.feature strong { display: block; margin-bottom: 4px; }

.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.date-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.date-card .label { font-size: 0.8rem; color: var(--muted); }
.date-card .value { font-weight: 700; font-variant-numeric: tabular-nums; }
.date-card.warn { border-color: var(--offer); }
.date-card.warn .value { color: var(--offer); }

.phases { display: grid; gap: 10px; margin-top: 20px; }
.phase-card { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: pointer; color: inherit; font: inherit; }
.phase-card .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--line); }
.phase-card.done .num { background: var(--accent); color: var(--accent-text); }
.phase-card .title { font-weight: 600; }
.phase-card .next { font-size: 0.85rem; color: var(--muted); }
.phase-card .next.overdue { color: var(--danger); }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.count-pill { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

.tasks { list-style: none; padding: 0; margin: 0; }
.task { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); }
.task.done .text { text-decoration: line-through; color: var(--muted); }
.task .due { font-size: 0.8rem; color: var(--muted); }
.task .due.overdue { color: var(--danger); font-weight: 600; }
.task .due.soon { color: var(--offer); font-weight: 600; }

.template pre { white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 10px 0; max-height: 420px; overflow: auto; }
.back { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; margin-bottom: 8px; }
.disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 32px; }
.calc { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.calc label { flex: 1; min-width: 160px; }
input[type="date"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

/* Einstiegs-Fragebogen */
.q { padding: 14px 0; border-bottom: 1px solid var(--line); }
.q:first-child { padding-top: 0; }
.q h3 { margin: 0 0 10px; font-size: 1rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: inherit; font: inherit; cursor: pointer; min-height: 48px; }
.choice span { font-size: 0.8rem; color: var(--muted); }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.panel > .msg + .btn, .q + .btn { margin-top: 16px; }

/* Aufgaben: überspringen, nachholen, eigene */
.task.skipped .text { color: var(--muted); }
.task.skipped { opacity: 0.7; }
.task-actions { margin-top: 2px; }
.task-action { font-size: 0.8rem; color: var(--muted); padding: 4px 0; }
.catchup { border-color: var(--offer); }
.catchup h2 { color: var(--offer); }
.custom-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.custom-row { display: flex; gap: 8px; }
.custom-row input { flex: 1; }
.checklist { margin: 0 0 12px; padding-left: 20px; }
.checklist li { margin: 8px 0; }

@media print {
  body * { visibility: hidden; }
  .print-me, .print-me * { visibility: visible; }
  .print-me { position: absolute; inset: 0; }
  .print-me pre { border: 0; max-height: none; font: 11pt/1.5 Georgia, serif; color: #000; background: #fff; }
}

/* Übergabeprotokoll */
.handover-card { border-color: var(--accent); }
.handover-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); margin-top: 8px; }
.rooms { display: grid; gap: 12px; }
.room { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); }
.room.has-defect { border-color: var(--offer); }
.room-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.room textarea { margin-top: 8px; min-height: 64px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.seg-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 6px; cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
.seg-btn.ok[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.seg-btn.mangel[aria-pressed="true"] { background: var(--offer); color: #fff; border-color: var(--offer); }
.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 0.7rem; cursor: pointer; }
.photo-add { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--muted); background: transparent; color: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font-size: 1.3rem; }
.photo-add span { font-size: 0.75rem; color: var(--muted); }
.grid-list { display: grid; gap: 10px; margin-bottom: 10px; }
.grid-row { border-bottom: 1px solid var(--line); padding-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.grid-row .grid-name, .grid-row .photo-strip { grid-column: 1 / -1; }
.grid-row .grid-name { margin-bottom: 6px; }
.grid-row label.field { margin-bottom: 0; }
input[type="time"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sigs { display: grid; gap: 16px; }
@media (min-width: 640px) { .sigs { grid-template-columns: 1fr 1fr; } }
.sig .btn { margin-top: 8px; }
.sig-img { background: #fff; border-radius: 10px; border: 1px solid var(--line); width: 100%; max-width: 360px; display: block; margin: 6px 0; }
.print-doc { display: none; }
@media print {
  .print-doc { display: block; color: #000; background: #fff; font: 10.5pt/1.4 Helvetica, Arial, sans-serif; }
  .print-doc h1 { font-size: 16pt; margin: 0 0 8px; }
  .print-doc h2 { font-size: 12pt; margin: 14px 0 6px; }
  .print-doc p { margin: 3px 0; }
  .p-table { width: 100%; border-collapse: collapse; }
  .p-table th, .p-table td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; white-space: pre-wrap; }
  .p-table th { background: #eee; }
  .p-small { font-size: 9pt; margin-top: 12px !important; }
  .p-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; page-break-inside: avoid; }
  .p-sigs img { height: 60px; }
  .p-line { height: 60px; border-bottom: 1px solid #000; }
  .p-break { page-break-before: always; }
  .p-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .p-photos figure { margin: 0; page-break-inside: avoid; }
  .p-photos img { width: 100%; max-height: 300px; object-fit: contain; border: 1px solid #ccc; }
  .p-photos figcaption { font-size: 9pt; }
}

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.custom-row input[type="email"] { flex: 1; width: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

/* Navigationsleiste unten */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; text-decoration: none; color: var(--muted); font-size: 0.72rem; padding: 4px 0; border-radius: 10px; }
.tabbar a[aria-current] { color: var(--accent); font-weight: 700; }
.tabbar .tab-icon { font-size: 1.25rem; line-height: 1.2; filter: grayscale(1); opacity: .75; }
.tabbar a[aria-current] .tab-icon { filter: none; opacity: 1; }
@media (min-width: 900px) { .tabbar { left: 50%; right: auto; transform: translateX(-50%); width: 480px; bottom: 16px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.12); } }
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Kisten */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.chip { border: 1px solid var(--line); background: var(--bg); color: inherit; border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 0.875rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.box-tools { display: flex; gap: 8px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.box-tools input { flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.box-list { display: grid; gap: 10px; margin-top: 14px; }
.box { display: grid; grid-template-columns: 56px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.box.fragile { border-color: var(--offer); }
.box-num { font-size: 1.8rem; font-weight: 800; text-align: center; line-height: 56px; height: 56px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.box-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.box-contents { margin-top: 6px; min-height: 0; padding: 8px 10px; font-size: 0.9rem; }
.box-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.box-status { border: 1px solid var(--line); background: var(--bg); color: inherit; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.box-status.angekommen { border-color: var(--offer); color: var(--offer); }
.box-status.ausgepackt { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
@media print {
  .labels { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0; }
  .label { height: 92mm; border: 1px dashed #999; padding: 8mm; display: flex; flex-direction: column; page-break-inside: avoid; color: #000; }
  .label-num { font-size: 72pt; font-weight: 800; line-height: 1; }
  .label-room { font-size: 22pt; font-weight: 700; margin-top: 4mm; }
  .label-fragile { font-size: 14pt; font-weight: 800; margin-top: 2mm; }
  .label-contents { font-size: 10pt; margin-top: 3mm; overflow: hidden; flex: 1; }
  .label-foot { font-size: 8pt; color: #555; }
  .tabbar { display: none !important; }
}

/* Kosten, Begrüßung, Umzugstag */
.cost-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cost-total strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.cost-bars { display: grid; gap: 6px; margin-top: 14px; }
.cost-bar { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; align-items: center; }
.cost-bar .bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.cost-bar .bar span { display: block; height: 100%; background: var(--accent); }
.link-card { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; }
.welcome { border-color: var(--accent); background: var(--accent-soft); }
.moveday { border: 2px solid var(--accent); }
.moveday h2 { font-size: 1.4rem; }
.done-day { background: var(--accent-soft); }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 48px 0; justify-content: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Flohmarkt auf der Startseite */
.tabbar { grid-template-columns: repeat(5, 1fr); }
@media (min-width: 900px) { .tabbar { width: 560px; } }
.market-hero { border: 2px solid var(--offer); background: linear-gradient(160deg, var(--offer-soft), var(--surface) 70%); }
.market-hero h2 { font-size: 1.35rem; line-height: 1.25; margin: 8px 0 10px; }
.market-badge { display: inline-block; font-weight: 700; font-size: 0.85rem; color: var(--offer); }
.market-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.market-head a { color: var(--accent); }
.market-steps { margin: 0 0 16px; padding-left: 20px; }
.market-steps li { margin: 6px 0; }
.market-photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; }
.market-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--line); }
@media (max-width: 480px) { .market-photos { grid-template-columns: repeat(3, 1fr); } .market-photos img:nth-child(n+4) { display: none; } }
.market-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin: 10px 0; }
.market-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; display: flex; flex-direction: column; }
.market-stats strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.market-stats span { font-size: 0.72rem; color: var(--muted); }
.market-alerts { display: grid; gap: 6px; margin: 8px 0; }
.market-alerts a { background: var(--offer-soft); color: var(--offer); font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: 10px; text-decoration: none; }
.market-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.market-actions .btn { flex: 1; min-width: 160px; text-align: center; text-decoration: none; }
.btn.big { display: block; text-align: center; text-decoration: none; padding: 14px 18px; font-size: 1.05rem; }
.market-pitch { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 640px) { .market-pitch { grid-template-columns: repeat(4, 1fr); } }
.market-pitch div { background: var(--offer-soft); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.market-pitch span { font-size: 0.875rem; color: var(--muted); }
.section-title { font-size: 1.2rem; margin: 32px 0 0; }

/* =====================================================================
   App-Optik: weiche Karten, klare Hierarchie, native Anmutung
   ===================================================================== */
:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #74706a;
  --line: #e8e4db;
  --accent: #2f6b4f;
  --accent-2: #3f8f69;
  --accent-soft: #e4f0e9;
  --offer: #b5651d;
  --offer-soft: #fbeedd;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(27, 26, 23, .04), 0 6px 20px rgba(27, 26, 23, .06);
  --shadow-lg: 0 10px 30px rgba(27, 26, 23, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --surface: #1c1c1a;
    --text: #f1efe9;
    --muted: #a39f96;
    --line: #2e2d29;
    --accent: #5fbf8f;
    --accent-2: #4aa67a;
    --accent-text: #0d1a13;
    --accent-soft: #1b2e24;
    --offer: #f0ad5c;
    --offer-soft: #33261a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
  }
}

body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 720px; padding: 0 16px 120px; }

/* Kopfzeile wie eine App-Leiste */
.brand { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); }
.brand .logo { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }
.brand .logo img { border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Karten */
.panel { border: 0; box-shadow: var(--shadow); padding: 18px; margin-top: 16px; }
.panel h2 { font-size: 1.15rem; letter-spacing: -0.01em; }
.section-head, .list-title { font-size: 0.78rem !important; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.list-title { margin: 28px 4px 10px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 0.95rem; font-weight: 600; }

/* Überschriften der Unterseiten */
.hero { padding: 18px 0 4px; }
.hero h1 { font-size: 1.85rem; letter-spacing: -0.025em; }
.back { font-weight: 600; }

/* Startseite: Begrüßung mit Fortschrittsring */
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; margin-top: 8px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #2f6b4f 0%, #3f8f69 55%, #6fb38b 100%); box-shadow: var(--shadow-lg); }
.home-hero h1 { font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 6px; }
.home-hero .eyebrow { color: rgba(255,255,255,.8); }
.home-sub { margin: 0; color: rgba(255,255,255,.9); font-size: 0.98rem; }
.home-sub strong { color: #fff; }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .ring-bg { stroke: rgba(255,255,255,.22); }
.ring .ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.ring-text strong { font-size: 1.15rem; }
.ring-text span { font-size: 0.68rem; opacity: .85; }

/* Termine: waagerecht wischbar */
.dates { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 16px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date-card { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; border: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 12px 14px; }
.date-card .value { font-size: 1.05rem; margin: 2px 0; }
.date-card .rel { font-size: 0.8rem; color: var(--accent); font-weight: 600; }
.date-card.warn { box-shadow: inset 0 0 0 2px var(--offer), var(--shadow); }
.date-card.warn .rel { color: var(--offer); }

/* Phasen-Liste */
.phases { gap: 8px; margin-top: 0; }
.phase-card { border: 0; box-shadow: var(--shadow); padding: 12px 14px; grid-template-columns: 44px 1fr auto; transition: transform .12s ease; }
.phase-card:active { transform: scale(.985); }
.phase-card .num { width: 44px; height: 44px; border-radius: 14px; font-size: 1.3rem; background: var(--bg); }
.phase-card.done .num { font-size: 1.1rem; }
.count-pill { background: var(--bg); padding: 3px 9px; border-radius: 99px; font-weight: 600; }

/* Aufgaben */
.task { grid-template-columns: 30px 1fr; padding: 12px 0; }
.task input { width: 24px; height: 24px; border-radius: 8px; }
.task .text a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Buttons */
.btn { border-radius: 14px; padding: 13px 18px; transition: transform .1s ease, filter .15s ease; }
.btn:active { transform: scale(.97); }
.btn:not(.ghost):not(.danger) { background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.btn.small { border-radius: 11px; }
.btn.ghost { background: var(--surface); border-color: var(--line); }

/* Eingaben */
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], input[type="time"], input[type="search"], textarea { border-radius: 12px; padding: 12px 14px; background: var(--bg); border-color: transparent; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; background: var(--surface); }

/* Auswahl-Kacheln */
.choice { border-radius: 14px; background: var(--bg); border-color: transparent; }
.choice[aria-pressed="true"] { background: var(--accent-soft); }

/* Navigationsleiste mit Symbolen */
.tabbar { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-top: 1px solid var(--line); padding-top: 8px; }
.tabbar a { gap: 3px; font-size: 0.7rem; font-weight: 600; }
.tabbar .tab-icon { filter: none; opacity: 1; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 99px; transition: background .15s ease; }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current] .tab-icon { background: var(--accent-soft); }
.tabbar a[aria-current] svg { stroke-width: 2.3; }

/* Flohmarkt-Karte */
.market-hero { border: 0; background: linear-gradient(160deg, var(--offer-soft) 0%, var(--surface) 75%); box-shadow: var(--shadow-lg); }
.market-stats div { border: 0; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); border-radius: 14px; }

/* Kisten & Räume */
.box, .room { border: 0; box-shadow: var(--shadow); }
.room { background: var(--surface); }
.box-num { border-radius: 16px; }

/* Vorlagen */
.template pre { border: 0; border-radius: 14px; }

.disclaimer { text-align: center; }

/* Einführung */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; animation: intro-in .25s ease; padding-top: env(safe-area-inset-top); }
.intro.closing { animation: intro-out .22s ease forwards; }
@keyframes intro-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes intro-out { to { opacity: 0; transform: translateY(12px); } }
.intro-skip { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 2; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 8px; }
.intro-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.intro-track::-webkit-scrollbar { display: none; }
.intro-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 56px 28px 16px; max-width: 520px; margin: 0 auto; box-sizing: border-box; }
.intro-slide h2 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.02em; margin: 28px 0 12px; }
.intro-slide p { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin: 0; }
.intro-art { width: 168px; height: 168px; border-radius: 48px; display: grid; place-items: center; font-size: 80px; box-shadow: var(--shadow-lg); transform: rotate(-4deg); }
.tone-green { background: linear-gradient(135deg, #d9efe2, #9fd3b5); }
.tone-orange { background: linear-gradient(135deg, #fde7c8, #f6b46b); }
.tone-blue { background: linear-gradient(135deg, #dde9fb, #9cbcf0); }
.tone-purple { background: linear-gradient(135deg, #ebe3fb, #b9a3ee); }
.intro-bullets { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; text-align: left; }
.intro-bullets li { background: var(--surface); box-shadow: var(--shadow); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 0.95rem; }
.intro-bullets li::before { content: '✓  '; color: var(--accent); font-weight: 800; }
.intro-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px calc(20px + env(safe-area-inset-bottom)); max-width: 520px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.intro-dots { display: flex; gap: 6px; }
.intro-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .2s ease, background .2s ease; }
.intro-dots span.on { width: 24px; background: var(--accent); }
.intro-next { min-width: 140px; }
.intro-link { margin: 0 0 10px !important; }
.intro-link .link-btn { font-weight: 700; text-decoration: none; font-size: 1rem; }

/* Empfehlung an Aufgaben (Anzeige) */
.offer { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 8px 0 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); color: inherit; text-decoration: none; border: 1px dashed var(--line); }
.offer:active { transform: scale(.99); }
.offer-text { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }
.offer-text strong { color: var(--accent); }
.offer-text span { font-size: 0.8rem; color: var(--muted); }
.offer-ad { flex: none; font-size: 0.65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.offer { border: 0; background: var(--accent-soft); }
.offer-tip { font-size: 0.72rem !important; font-weight: 700; color: var(--accent) !important; text-transform: uppercase; letter-spacing: .05em; }
.offer-text strong { color: var(--text); font-weight: 650; }
.offer-ad { border: 0; padding: 0; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 0.68rem; opacity: .8; }
