@font-face {
  font-family: "Roboto Condensed"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("fonts/roboto-condensed-var.woff") format("woff");
}
@font-face {
  font-family: "Bricolage Grotesque"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/bricolage-grotesque-700.woff") format("woff");
}
@font-face {
  font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff") format("woff");
}
/* Layout: Eingabe + Gestaltung links, fixierte Vorschau mit Export rechts; auf dem Handy Eingabe → Vorschau → Gestaltung. */
:root {
  --bg: #eef0f5;
  --surface: #ffffff;
  --ink: #141722;
  --muted: #5a6072;
  --line: #d6dae5;
  --accent: #2946d6;
  --accent-ink: #ffffff;
  --accent-soft: #e3e8fd;
  --warn: #9a4a00;
  --warn-soft: #fff1e0;
  --check-a: #e6e9f0;
  --check-b: #f6f7fa;
  --font-display: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Roboto Condensed", "Arial Narrow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016; --surface: #171a23; --ink: #e9ebf3; --muted: #9ba1b5; --line: #2a2f3e;
    --accent: #8197ff; --accent-ink: #0e1016; --accent-soft: #232a4a;
    --warn: #ffb766; --warn-soft: #34261a; --check-a: #20242f; --check-b: #191c25;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1016; --surface: #171a23; --ink: #e9ebf3; --muted: #9ba1b5; --line: #2a2f3e;
  --accent: #8197ff; --accent-ink: #0e1016; --accent-soft: #232a4a;
  --warn: #ffb766; --warn-soft: #34261a; --check-a: #20242f; --check-b: #191c25;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 110px; } /* Platz für den Ko-fi-Button unten links */
header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 22px; }
h1 {
  font: 700 clamp(26px, 4vw, 34px)/1.1 var(--font-display);
  letter-spacing: -0.01em; margin: 0; text-wrap: balance;
}
header p { margin: 0; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  grid-template-areas: "input preview" "style preview";
  gap: 18px 24px;
  align-items: start;
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
#inputCard { grid-area: input; }
#styleCard { grid-area: style; }
#previewCard { grid-area: preview; position: sticky; top: 16px; display: grid; gap: 14px; }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "input" "preview" "style"; }
  #previewCard { position: static; }
}

h2 {
  font: 600 13px/1.2 var(--font-body); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 0 0 12px;
}
.section + .section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Segmentierte Auswahl */
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; font-weight: 500; font-size: 14px; background: var(--surface);
  transition: background .12s, border-color .12s, color .12s;
}
.seg label small { font: 400 12px var(--font-mono); color: var(--muted); }
.seg label:hover { border-color: var(--accent); }
.seg input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg input:checked + label small { color: inherit; opacity: .8; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.fields { display: grid; gap: 12px; margin-top: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="tel"], input[type="password"], textarea, select {
  width: 100%; font: 15px/1.4 var(--font-body); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
}
textarea { resize: vertical; min-height: 92px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }

.colors { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.swatch {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--bg);
}
.swatch input[type="color"] {
  width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; padding: 0;
  background: none; cursor: pointer; flex: none;
}
.swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.swatch span { display: grid; line-height: 1.25; font-size: 13px; color: var(--muted); }
.swatch b { font: 400 13px var(--font-mono); color: var(--ink); text-transform: uppercase; }

.range { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.range > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.range output { font: 400 13px var(--font-mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.range input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); margin: 0; }

.logo-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.logo-thumb {
  width: 44px; height: 44px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg) center / contain no-repeat; flex: none;
}

button, .btn {
  font: 600 14px/1 var(--font-body); border-radius: 10px; padding: 11px 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: .45; cursor: not-allowed; }
.btn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Vorschau */
.stage {
  border-radius: 12px; border: 1px solid var(--line); padding: 22px;
  background-color: var(--check-b);
  background-image: conic-gradient(var(--check-a) 25%, transparent 0 50%, var(--check-a) 0 75%, transparent 0);
  background-size: 18px 18px;
  display: grid; place-items: center; aspect-ratio: 1 / 1;
}
.stage svg { width: 100%; height: 100%; display: block; }
.stage .empty { color: var(--muted); text-align: center; max-width: 24ch; font-size: 14px; }
.meta { font: 400 12.5px/1.5 var(--font-mono); color: var(--muted); display: grid; gap: 6px; }
.meta .line { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.meta b { color: var(--ink); font-weight: 400; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.bar.full i { background: var(--warn); }

.notes { display: grid; gap: 8px; }
.note {
  font-size: 13.5px; line-height: 1.4; padding: 9px 11px; border-radius: 9px;
  background: var(--warn-soft); color: var(--warn); border-left: 3px solid var(--warn);
}
.note.info { background: var(--accent-soft); color: var(--ink); border-left-color: var(--accent); }

.export { display: grid; gap: 10px; }
.export .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.export .sizes { display: flex; align-items: center; gap: 10px; }
.export .sizes label { font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.export .sizes select { flex: 1; min-width: 0; }
#status { min-height: 1.4em; font-size: 13px; color: var(--muted); margin: 0; }

[hidden], .notes:empty { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

footer { margin-top: 28px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: inherit; }

/* ---------- Ko-fi als einfacher Link (lädt nichts von Ko-fi, bis jemand klickt) ---------- */
.kofi { position: fixed; left: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px 10px; border-radius: 99px; background: #fff; color: #323842; text-decoration: none;
  font: 600 14px/1 var(--font-body); box-shadow: 0 4px 16px rgba(10, 16, 40, .18); transition: transform .15s ease; }
.kofi:hover { transform: translateY(-2px); }
.kofi:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media print { .kofi { display: none; } }
footer .legal { display: flex; gap: 14px; }
footer { padding-bottom: 56px; }
