/* Inserat – geradlinig: weiße Fläche, Haarlinien, kleine Ecken, Schwarz als Hauptfarbe, Grün nur als Akzent */
:root {
  --bg: #FFFFFF; --card: #FFFFFF; --soft: #F4F4F2; --ink: #0F0F0F; --muted: #73736F; --line: #E6E6E3;
  --accent: #0B7A5F; --btn: #0F0F0F; --btn-ink: #FFFFFF; --warn: #8A5300; --warn-soft: #FFF6E5;
  --r: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E0E; --card: #0E0E0E; --soft: #1A1A19; --ink: #F2F2F0; --muted: #9A9A95; --line: #2A2A28;
    --accent: #3CC39A; --btn: #F2F2F0; --btn-ink: #0E0E0E; --warn: #F0B860; --warn-soft: #261E10;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: calc(env(safe-area-inset-top) + 16px) 20px calc(env(safe-area-inset-bottom) + 32px);
  max-width: 560px; margin: 0 auto;
}
h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 12px 0 6px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 36px 0 0; font-weight: 600;
  padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
p { margin: 0 0 10px; }
.sub { color: var(--muted); margin-bottom: 24px; font-size: 15px; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.top { display: flex; align-items: flex-end; justify-content: space-between; }
.link { color: var(--ink); font-size: 14px; font-weight: 600; padding: 8px 0 10px; border-bottom: 1px solid var(--ink); }

/* Plattform: zwei Reiter mit Unterstrich */
.seg { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.seg button { padding: 12px 0; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.seg button.on { color: var(--ink); border-bottom-color: var(--ink); }

/* Fotos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 20px; }
.ph { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--soft); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 4px; background: rgba(0,0,0,.65); color: #fff; font-size: 15px; line-height: 26px; }
.add { aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line); background: var(--soft); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; }
.add svg { width: 24px; height: 24px; }
.bigadd { width: 100%; aspect-ratio: auto; padding: 48px 16px; margin-top: 20px; font-size: 17px; gap: 10px; border-style: solid; }
.bigadd small { color: var(--muted); font-weight: 400; font-size: 14px; }
.bigadd svg { width: 34px; height: 34px; color: var(--ink); }

textarea, input[type=text] {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px; resize: vertical; outline: none;
}
textarea:focus, input:focus { border-color: var(--ink); }
.note { margin-top: 12px; min-height: 52px; font-size: 15px; }

.primary { display: block; width: 100%; margin-top: 16px; padding: 17px; border-radius: var(--r); background: var(--btn); color: var(--btn-ink);
  font-size: 16px; font-weight: 700; letter-spacing: .01em; }
.primary:disabled { opacity: .25; }
.primary:active, .ghost:active { transform: scale(.99); }
.ghost { display: block; width: 100%; margin-top: 8px; padding: 16px; border-radius: var(--r); border: 1px solid var(--ink); font-weight: 600; }

/* Ergebnis: Abschnitte mit Haarlinien statt Karten */
.card { border-top: 1px solid var(--line); padding: 18px 0; }
.card:first-of-type { margin-top: 8px; }
.field label, .lbl { display: flex; justify-content: space-between; align-items: center; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.field textarea { border: 0; padding: 0; background: transparent; resize: none; overflow: hidden; border-radius: 0; }
.field textarea[data-edit=title] { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.copy { font-size: 13px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; padding: 4px 0 4px 12px; text-decoration: underline; text-underline-offset: 3px; }
.copy.done { color: var(--accent); text-decoration: none; }
.price { display: flex; align-items: baseline; gap: 12px; }
.price b { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.price span { color: var(--muted); font-size: 15px; }
.reason { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.facts { display: grid; grid-template-columns: auto 1fr auto; gap: 0 14px; margin: 0; }
.facts dt, .facts dd { padding: 11px 0; border-top: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { font-weight: 500; }
.facts .copy { border-top: 1px solid var(--line); padding: 11px 0 11px 8px; }
.facts > :nth-child(-n+3) { border-top: 0; padding-top: 0; }
.empty { color: var(--muted); font-weight: 400; }
.hint { border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--warn); padding: 12px 14px; margin-top: 16px; font-size: 14px; border-radius: 0 var(--r) var(--r) 0; }
.flaws { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
b.small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.cmp { font-size: 14px; }
.cmp .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.cmp a { color: var(--ink); text-decoration: none; }
.cmp a:after { content: " ↗"; color: var(--muted); }
.cmp .where { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cmp .p { font-weight: 700; white-space: nowrap; }
.cmp .sum { margin: 8px 0 10px; }
.loading { color: var(--muted); display: flex; align-items: center; gap: 10px; }

.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: s .8s linear infinite; flex: none; }
@keyframes s { to { transform: rotate(360deg); } }
.working { padding: 18vh 0 20px; }
.working .spin { width: 36px; height: 36px; border-width: 3px; margin: 0 0 24px; }
.working p { color: var(--muted); }

/* Verlauf */
.hist { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 0; border-top: 1px solid var(--line); }
.hist:first-of-type { border-top: 0; }
.hist img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--soft); flex: none; }
.hist div { flex: 1; min-width: 0; }
.hist b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist small { color: var(--muted); }
.hist .pr { font-weight: 700; }
.card.list { padding: 0; border-top: 0; }

.err { color: #C0261B; margin-top: 12px; font-size: 15px; }
@media (prefers-color-scheme: dark) { .err { color: #FF8A80; } }

#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translate(-50%, 16px); opacity: 0;
  background: var(--btn); color: var(--btn-ink); padding: 11px 18px; border-radius: 6px; font-weight: 600; font-size: 14px;
  transition: .18s; pointer-events: none; white-space: nowrap; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

.login { padding-top: 14vh; }
.login input { font-size: 24px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; text-align: center; margin-top: 8px; padding: 16px; }
.logo { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 18px; }
.h-md { font-size: 26px; }
.h-lg { font-size: 30px; }
.sub.tight { margin-bottom: 4px; }
