:root {
  --bone: #F4F1EA;
  --paper: #FBFAF6;
  --ink: #111110;
  --muted: #6B6760;
  --line: #DDD8CC;
  --black: #000;
  --good: #1F6B3A;
  --bad: #A3261B;
  --warn: #8A5A00;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
header {
  display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 6px;
}
.logo { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 22px; letter-spacing: .5px; color: var(--ink); text-decoration: none; }
.hq { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); }
nav { display: flex; gap: 4px; padding: 0 12px 10px; overflow-x: auto; border-bottom: 1px solid var(--line); }
nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; white-space: nowrap; font-weight: 500; }
nav a.on { background: var(--black); color: #fff; }
main { max-width: 980px; margin: 0 auto; padding: 16px 16px 96px; }
h1 { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 26px; line-height: 1.15; margin: 8px 0 6px; letter-spacing: .2px; }
h2 { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 16px; margin: 0 0 10px; letter-spacing: .3px; text-transform: uppercase; }
h3 { margin: 6px 0 6px; font-size: 16px; }
section { margin: 18px 0; }
a { color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.prose { white-space: normal; }
.note { background: #FFF6DB; border: 1px solid #EBD9A2; padding: 10px 12px; border-radius: var(--radius); }
.err { color: var(--bad); font-weight: 500; }
.ok { color: var(--good); font-weight: 500; }
.status { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); margin-top: 0; }
input, select, textarea, button { font: inherit; }
input[type=email], input[type=date], input[name=code], input[name=headline], select, textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input[name=code] { font-family: "IBM Plex Mono", monospace; font-size: 22px; letter-spacing: 6px; text-align: center; }
textarea { resize: vertical; }
button { border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: 11px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; min-height: 44px; }
button.primary { background: var(--black); color: #fff; border-color: var(--black); }
button.big { width: 100%; padding: 15px; font-size: 16px; margin-top: 8px; }
button.link { border: 0; text-decoration: underline; padding: 0; min-height: 0; font-weight: 400; color: var(--muted); }
button:disabled { opacity: .35; cursor: not-allowed; }
form.inline { display: inline-block; margin: 6px 6px 0 0; }
.card.narrow button { width: 100%; margin-top: 12px; }
.card.narrow input { margin-top: 8px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.tile span { font-size: 12px; color: var(--muted); }
.tile b { font-family: "Archivo Black", "Arial Black", sans-serif; font-size: 22px; font-weight: 400; margin: 2px 0; }
.tile small { font-size: 12px; color: var(--muted); }
.tile.bad b { color: var(--bad); }
.tile.good b { color: var(--good); }
small.down { color: var(--bad); }
small.up { color: var(--good); }

.pill { display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.pill.small { font-size: 11px; }
.pill.pausieren, .rec.pausieren .pill { background: var(--bad); }
.pill.budget_senken, .rec.budget_senken .pill { background: var(--warn); }
.pill.budget_erhoehen, .rec.budget_erhoehen .pill { background: var(--good); }
.pill.beobachten, .pill.weiterlaufen { background: #5B5750; }
.tag { font-size: 12px; margin-left: 6px; color: var(--muted); }
.rec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.budget { font-family: "IBM Plex Mono", monospace; font-size: 14px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { font-size: 15px; }
.fab { position: fixed; right: 16px; bottom: 16px; background: var(--black); color: #fff; text-decoration: none; padding: 14px 18px; border-radius: 999px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.logout { margin-top: 30px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; min-height: 44px; line-height: 22px; }
.chip input:checked + span { background: var(--black); color: #fff; border-color: var(--black); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.hint { display: none; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.hint.show { display: block; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 10px; }
.two label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.product-preview { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.product-preview img { width: 76px; height: 95px; object-fit: cover; border-radius: 6px; background: var(--bone); }
.product-preview div { display: flex; flex-direction: column; }
.p-contrib { font-size: 13px; color: var(--muted); }
details.fixed summary { cursor: pointer; font-weight: 600; }
details.fixed ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.back { display: inline-block; margin-bottom: 4px; color: var(--muted); text-decoration: none; }
.summary { display: flex; gap: 12px; align-items: center; }
.summary img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; }
.summary p { margin: 2px 0; }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.slot h3 { font-size: 13px; margin: 0 0 6px; }
.slot input[type=file] { width: 100%; font-size: 13px; margin-top: 6px; }
.frame { position: relative; border-radius: 8px; overflow: hidden; background: #E9E5DB; }
.feed_4x5 .frame { aspect-ratio: 4 / 5; }
.story_9x16 .frame { aspect-ratio: 9 / 16; }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame .safe { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(163,38,27,.22) 0 var(--top), transparent var(--top) calc(100% - var(--bottom)), rgba(163,38,27,.22) calc(100% - var(--bottom))); }
.placeholder { display: grid; place-items: center; height: 100%; min-height: 120px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
ul.errs, ul.checks { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
ul.errs li, ul.checks li.f { color: var(--bad); }
ul.checks li.h { color: var(--warn); }

.variants { display: grid; gap: 8px; margin: 10px 0; }
.variant { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; cursor: pointer; }
.variant input { margin-top: 4px; accent-color: #000; width: 18px; height: 18px; }
.variant p { margin: 4px 0; }
.variant.bad { opacity: .75; }
.editor { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.editor label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.editor small { font-weight: 400; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.editor small.over { color: var(--bad); }

.phones { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; align-items: start; }
.phone { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 12px; }
.ph-head { display: flex; align-items: center; gap: 6px; padding: 8px; }
.ph-head i { width: 22px; height: 22px; border-radius: 50%; background: var(--black); display: inline-block; }
.ph-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-head small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.ph-text { padding: 0 8px 8px; margin: 0; max-height: 5.4em; overflow: hidden; }
.phone img { width: 100%; display: block; }
.feed img { aspect-ratio: 4 / 5; object-fit: cover; }
.ph-cta { display: flex; justify-content: space-between; align-items: center; padding: 8px; gap: 6px; border-top: 1px solid var(--line); }
.ph-cta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ph-cta em { font-style: normal; background: #EFEFEF; padding: 5px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.story { position: relative; aspect-ratio: 9 / 16; background: #222; }
.story img { height: 100%; object-fit: cover; }
.st-cta { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); background: #fff; padding: 6px 12px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.checklist { list-style: none; padding: 0; margin: 0 0 10px; }
.checklist li { padding-left: 26px; position: relative; margin: 6px 0; color: var(--muted); }
.checklist li::before { content: "○"; position: absolute; left: 4px; }
.checklist li.ok { color: var(--good); }
.checklist li.ok::before { content: "✓"; }
.card.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; text-decoration: none; }
.card.row b { flex: 1 1 100%; }

@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .grid { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr 1fr; }
  .card.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .phones { grid-template-columns: 1.3fr 1fr; max-width: 560px; }
  .card.row b { flex: 1 1 auto; }
}
