/* =========================================================================
   VibeSketch – Gestaltung
   Leitidee: Skizzenpapier (Punktraster) + fünf geometrische Phasenformen,
   die überall wiederkehren (Logo, Fortschritt, Karten, Randleiste).
   ========================================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f6f4ee;
  --dot: #d6d1c3;
  --sheet: #fffefb;
  --ink: #17161c;
  --ink-2: #3a3843;
  --muted: #6f6b63;
  --faint: #a19c90;
  --line: #e5e0d4;
  --line-2: #d4cebf;

  /* Phasenfarben: Idee, Konkretisieren, Version 1, Review, Prompt */
  --p0: #f0b132;
  --p1: #3f62de;
  --p2: #ec6640;
  --p3: #2a9a6b;
  --p4: #7a5ae3;

  --focus: #3f62de;
  --danger: #c23a2b;
  --ok: #2a9a6b;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(23, 22, 28, .04), 0 14px 34px -22px rgba(23, 22, 28, .28);

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: -11px -11px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .45em;
}
h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0 0 .9em; }
a { color: inherit; }
[hidden] { display: none !important; }
strong { font-weight: 650; }

:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.mono { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .02em; }
.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: .75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  margin-bottom: 14px;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.mt { margin-top: 22px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }

/* ---------- Phasenformen (wiederkehrendes Element) ---------- */

.shape {
  --s: 12px;
  display: inline-block; flex: none;
  width: var(--s); height: var(--s);
  background: var(--c, var(--ink));
}
.shape.xs { --s: 9px; }
.shape.md { --s: 18px; }
.shape.lg { --s: 28px; }
.shape.hollow { background: color-mix(in srgb, var(--c) 24%, transparent); }

.shape.p0 { --c: var(--p0); border-radius: 50%; }
.shape.p1 { --c: var(--p1); border-radius: 2px; }
.shape.p2 { --c: var(--p2); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.shape.p3 { --c: var(--p3); border-radius: 100% 0 0 0; }
.shape.p4 { --c: var(--p4); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.fingerprint { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Kopfzeile ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 0 auto; padding: 22px 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; }
.brand-mark .shape { --s: 11px; }
.topnav { display: flex; align-items: center; gap: 6px; }

.container { max-width: 1180px; margin: 0 auto; padding: 8px 28px 96px; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.loading { color: var(--muted); text-align: center; padding: 80px 0; }

/* ---------- Flächen ---------- */

.sheet {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.sheet + .sheet { margin-top: 18px; }
.panel {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 1.5px solid var(--ink);
  background: var(--sheet); color: var(--ink);
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--paper); }
.btn .icon { transition: transform .2s; }
.btn:hover .icon-next { transform: translateX(3px); }
.btn:hover .icon-prev { transform: translateX(-3px); }
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.big { min-height: 54px; padding: 12px 26px; font-size: 1.05rem; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .88rem; border-width: 1.2px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 6px 8px; margin: -6px -8px;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink-2);
  border-radius: 8px; cursor: pointer; text-decoration: none;
}
.ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions.spread { justify-content: space-between; }

/* ---------- Formulare ---------- */

.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.help { color: var(--muted); margin-bottom: 20px; }
.optional { font-weight: 400; color: var(--faint); }

input[type="text"], textarea {
  width: 100%;
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:hover, textarea:hover { border-color: var(--faint); }
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 16%, transparent);
}
textarea { resize: vertical; min-height: 170px; line-height: 1.55; }
textarea.short { min-height: 96px; }
::placeholder { color: var(--faint); }

.field + .field, .tiles + .field { margin-top: 26px; }
.error-msg { color: var(--danger); font-size: .9rem; margin: 8px 0 0; }
.inline-form { display: flex; gap: 10px; }
.inline-form input { flex: 1; min-width: 0; }
.code-input { font-family: var(--f-mono) !important; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Personen ---------- */

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--f-mono); font-size: .68rem; font-weight: 600;
  background: var(--av-bg); color: var(--av-fg);
}
.avatar.sm { width: 24px; height: 24px; font-size: .6rem; }
.av-0 { --av-bg: #fbe8bd; --av-fg: #7a5200; --av: #e0a526; }
.av-1 { --av-bg: #dbe3fb; --av-fg: #2440a8; --av: #3f62de; }
.av-2 { --av-bg: #fbdcd1; --av-fg: #9b3515; --av: #ec6640; }
.av-3 { --av-bg: #d5eee3; --av-fg: #196345; --av: #2a9a6b; }
.av-4 { --av-bg: #e6defb; --av-fg: #4a2fae; --av: #7a5ae3; }
.av-5 { --av-bg: #ebe7de; --av-fg: #4c4840; --av: #8f897b; }

.who { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; }
.who strong { color: var(--ink); }

/* ---------- Seitenkopf mit Phasenleiste ---------- */

.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.save-status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.save-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.save-status.ok .dot { background: var(--ok); }
.save-status.err { color: var(--danger); font-weight: 600; }
.save-status.err .dot { background: var(--danger); }

.track { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 0; }
.track li {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--faint);
}
.track li + li::before {
  content: ""; width: 26px; height: 1.5px; margin: 0 10px;
  background: var(--line-2);
}
.track li.done, .track li.current { color: var(--ink-2); }
.track li.current { color: var(--ink); }
.track li.current .shape { transform: scale(1.35); }
.track li.current span:last-child { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* ---------- Wizard ---------- */

.wizard { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }

.rail { position: sticky; top: 20px; }
.rail-group + .rail-group { margin-top: 22px; }
.rail-phase { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; font-weight: 700; font-size: .9rem; }
.rail ol { list-style: none; margin: 0; padding: 0 0 0 5px; border-left: 1.5px solid var(--line-2); margin-left: 5px; }
.rail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 16px; margin-left: -1.5px;
  border-left: 1.5px solid transparent;
  text-decoration: none; color: var(--muted); font-size: .92rem;
  border-radius: 0 8px 8px 0;
}
.rail-item:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.rail-item .mono { color: var(--faint); font-size: .72rem; }
.rail-item .state { margin-left: auto; color: var(--ok); display: inline-flex; }
.rail-item .state .icon { width: 15px; height: 15px; opacity: 0; }
.rail-item.filled .state .icon { opacity: 1; }
.rail-item.current { color: var(--ink); font-weight: 650; border-left-color: var(--ink); background: var(--sheet); }
.rail-back { margin-bottom: 26px; }

.mini-track { display: none; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mini-track .fingerprint .shape.here { outline: 2px solid var(--ink); outline-offset: 2px; }

.step h1 { font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.15rem); max-width: 22ch; }
.step.accent { border-top: 4px solid var(--p2); }
.step .label .shape { margin-right: 2px; }

.thoughts {
  margin: -4px 0 24px; padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line-2);
}
.thoughts p { margin: 0 0 4px; }
.thoughts ul { list-style: none; margin: 0; padding: 0; color: var(--ink-2); font-size: .95rem; }
.thoughts li { margin: 2px 0; }

.step-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px;
}
.kbd-hint { font-size: .8rem; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; }
kbd {
  font-family: var(--f-mono); font-size: .72rem;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; background: var(--sheet); color: var(--ink-2);
}

/* Auswahlkacheln */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2); background: var(--sheet);
  cursor: pointer; font-weight: 600;
  transition: border-color .15s, background .15s;
}
.tile:hover { border-color: var(--faint); }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile-icon .icon { width: 26px; height: 26px; color: var(--p1); }
.tile-check {
  position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--line-2); display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
}
.tile-check .icon { width: 15px; height: 15px; }
.tile:has(input:checked) { border-color: var(--p1); background: color-mix(in srgb, var(--p1) 7%, var(--sheet)); }
.tile:has(input:checked) .tile-check { background: var(--p1); border-color: var(--p1); color: #fff; }
.tile:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: 3px; }

/* Version 1 */
.must-list { display: grid; gap: 12px; }
.must-row { display: flex; align-items: center; gap: 12px; }
.must-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-weight: 600; font-size: .85rem;
  background: color-mix(in srgb, var(--p2) 16%, var(--sheet)); color: #9b3515;
}
.must-row.extra .must-num { background: var(--paper); color: var(--muted); border: 1.5px dashed var(--line-2); }
.icon-btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.2px solid var(--line-2); background: var(--sheet); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }
.add-row { margin-top: 16px; }

.callout {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 18px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: .95rem;
}
.callout > .icon { margin-top: 3px; color: var(--muted); }
.callout p { margin: 0; }
.callout strong { display: block; }
.callout.warm { background: color-mix(in srgb, var(--p0) 14%, var(--sheet)); border-color: color-mix(in srgb, var(--p0) 45%, var(--sheet)); }
.callout.warm > .icon { color: #9a6a00; }

/* Später vielleicht */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px 5px 14px; border-radius: 999px;
  background: var(--sheet); border: 1.5px dashed var(--line-2);
  font-size: .93rem; font-weight: 500;
}
.chip.plain { padding: 4px 12px; border-style: solid; border-width: 1px; background: var(--paper); }
.chip button {
  display: inline-flex; border: 0; background: none; color: var(--muted); cursor: pointer;
  padding: 3px; border-radius: 50%;
}
.chip button:hover { color: var(--danger); background: var(--paper); }
.chip button .icon { width: 14px; height: 14px; }
.chip-form { margin-top: 18px; }

/* ---------- Ideenblatt (Übersicht, Review, Galerie) ---------- */

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.sidebar { position: sticky; top: 20px; display: grid; gap: 16px; }

.doc-head { margin-bottom: 28px; }
.doc-head h1 { margin-bottom: 14px; }
.doc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .9rem; }

.doc { display: grid; gap: 14px; }
.doc-section {
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; box-shadow: var(--shadow);
}
.doc-section.accent { border-top: 3px solid var(--p2); }
.doc-section.compact { padding-top: 14px; padding-bottom: 14px; box-shadow: none; background: color-mix(in srgb, var(--sheet) 70%, transparent); }
.doc-section.compact .doc-section-head { margin-bottom: 0; }
.doc-section.compact .notes:not(:empty), .doc-section.compact .add-note { margin-bottom: 4px; }
.doc-section-head .empty { font-size: .88rem; margin-left: 6px; }
.doc-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.doc-section-head h2 { font-size: 1.12rem; margin: 0; letter-spacing: -.01em; }
.doc-section-head .ghost { margin-left: auto; }
.doc-section-head .mono { color: var(--faint); }

.badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 15%, var(--sheet)); color: var(--c-ink, var(--c));
}
.badge .icon { width: 18px; height: 18px; }
.badge.p0 { --c: var(--p0); --c-ink: #8a5d00; }
.badge.p1 { --c: var(--p1); }
.badge.p2 { --c: var(--p2); --c-ink: #b4431c; }
.badge.p3 { --c: var(--p3); }
.badge.p4 { --c: var(--p4); }

.doc-body { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 46px; }
.doc-body ol { margin: 0; padding-left: 1.3em; white-space: normal; }
.doc-body ol li::marker { font-family: var(--f-mono); font-size: .85em; color: var(--muted); }
.doc-body .title-line { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.empty { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); margin: 0; }

/* ---------- Notizen (Kommentare) ---------- */

.notes { display: grid; gap: 10px; margin-top: 16px; padding-left: 46px; }
.notes:empty { display: none; }
.note {
  position: relative;
  background: color-mix(in srgb, var(--av) 9%, var(--sheet));
  border: 1px solid color-mix(in srgb, var(--av) 26%, var(--sheet));
  border-radius: 4px 12px 12px 12px;
  padding: 12px 16px 14px;
}
.note::before {
  content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px;
  background: var(--av); border-radius: 4px 0 0 12px;
}
.note-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: .88rem; }
.note-head .spacer { flex: 1; }
.note-text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 600; color: var(--ink-2);
  background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px;
}
.tag .icon { width: 13px; height: 13px; }
.new {
  font-family: var(--f-mono); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sheet); background: var(--ink); border-radius: 4px; padding: 1px 6px;
}
.read-toggle { font-size: .82rem; }
.read-toggle.is-read { color: var(--ok); }
.note.is-read { background: var(--sheet); border-color: var(--line); }
.note.is-read::before { background: var(--line-2); }

.add-note { margin-top: 14px; padding-left: 46px; }
.note-form {
  margin-top: 14px; margin-left: 46px; padding: 18px;
  border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line);
}
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.2px solid var(--line-2); background: var(--sheet); color: var(--ink-2);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer;
}
.cat-btn:hover { border-color: var(--faint); }
.cat-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--sheet); }
.cat-btn .icon { width: 15px; height: 15px; }
.note-form .actions { margin-top: 12px; justify-content: flex-end; }

.banner {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px;
  background: var(--ink); color: var(--sheet);
}
.banner .shape { margin-top: 8px; }
.banner h2 { font-size: 1.3rem; margin-bottom: 6px; }
.banner p { color: color-mix(in srgb, var(--sheet) 78%, var(--ink)); margin-bottom: 6px; }
.banner p strong { color: var(--sheet); }
.banner .actions { margin-top: 8px; }
.banner .ghost { color: var(--sheet); }
.banner .ghost:hover { background: rgba(255, 255, 255, .1); }
.banner .mono { color: color-mix(in srgb, var(--sheet) 70%, var(--ink)); }

/* Nächste Schritte */
.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.next li { display: grid; grid-template-columns: 20px 1fr; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.next li:first-child { border-top: 0; padding-top: 4px; }
.next .shape { margin-top: 6px; justify-self: center; }
.next strong { display: block; }
.next .sub { display: block; color: var(--muted); font-size: .88rem; }
.next .btn { grid-column: 2; justify-self: start; margin-top: 8px; }

.secret code {
  display: block; word-break: break-all;
  background: var(--paper); border: 1px dashed var(--line-2); border-radius: 8px;
  padding: 9px 11px; margin: 10px 0 12px;
  font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2);
}
.secret h3 { display: flex; align-items: center; gap: 8px; }

/* Review */
.lenses { display: grid; gap: 10px; }
.lens { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; font-size: .9rem; }
.lens .icon { margin-top: 3px; color: var(--p3); }
.lens strong { display: block; }
.lens span { color: var(--muted); }

/* ---------- Teilen ---------- */

.ticket {
  display: grid; grid-template-columns: 1fr auto;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; margin: 8px 0 22px;
}
.ticket-main { padding: 20px 24px; }
.ticket-main .label { margin-bottom: 6px; }
.ticket-code {
  font-family: var(--f-mono); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  letter-spacing: .06em; user-select: all; line-height: 1.2;
}
.ticket-stub {
  display: flex; align-items: center; padding: 20px;
  border-left: 1.5px dashed var(--ink);
  background: color-mix(in srgb, var(--p3) 10%, var(--sheet));
}
.share-link { font-family: var(--f-mono) !important; font-size: .85rem !important; }
.facts { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.facts .icon { color: var(--p3); }

/* ---------- Prompt ---------- */

.terminal { border-radius: var(--radius); overflow: hidden; background: #1b1a21; box-shadow: var(--shadow); }
.terminal-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #2d2b35;
  color: #a9a5b8;
}
.terminal-bar .spacer { flex: 1; }
.terminal-bar .btn { border-color: #4a4757; background: transparent; color: #f2f0f7; }
.terminal-bar .btn:hover { background: #2d2b35; }
.terminal pre {
  margin: 0; padding: 22px 24px;
  font-family: var(--f-mono); font-size: .8rem; line-height: 1.65; color: #eceaf3;
  white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 560px; overflow: auto;
}
.howto { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 16px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.howto li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--f-mono); font-size: .75rem; font-weight: 600; color: var(--muted);
  padding-top: 3px;
}
.howto strong { display: block; }
.howto span { color: var(--muted); font-size: .92rem; }
.panel.success { border-color: var(--p3); background: color-mix(in srgb, var(--p3) 8%, var(--sheet)); }
.panel.success h3 { color: #196345; }

/* ---------- Startseite ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 40px 0 56px;
}
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem); line-height: .98; letter-spacing: -.035em; margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }

.hero-art { position: relative; aspect-ratio: 1; max-width: 420px; width: 100%; justify-self: center; }
.hero-art .shape { position: absolute; mix-blend-mode: multiply; }
.hero-art .a { width: 48%; height: 48%; left: 6%; top: 8%; }
.hero-art .b { width: 38%; height: 38%; left: 42%; top: 30%; }
.hero-art .c { width: 40%; height: 36%; left: 18%; top: 52%; }
.hero-art .d { width: 30%; height: 30%; left: 64%; top: 4%; }
.hero-art .e { width: 22%; height: 22%; left: 66%; top: 70%; }
.hero-art .line {
  position: absolute; left: 4%; right: 4%; top: 50%; height: 1.5px; background: var(--ink);
  transform: rotate(-24deg); transform-origin: center;
}
.hero-art .line::after {
  content: ""; position: absolute; right: -2px; top: -4px;
  border: 5px solid transparent; border-left: 8px solid var(--ink);
}

.process {
  list-style: none; margin: 0 0 56px; padding: 24px 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px;
  border-top: 1.5px solid var(--ink);
}
.process li { display: grid; gap: 6px; align-content: start; }
.process .top { display: flex; align-items: center; gap: 10px; }
.process strong { font-family: var(--f-display); font-size: 1.05rem; }
.process span.desc { color: var(--muted); font-size: .9rem; line-height: 1.45; }

.entry { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 56px; }
.entry .sheet { margin: 0; padding: 26px; }
.entry h2 { font-size: 1.25rem; }

.my-list { list-style: none; margin: 0; padding: 0; }
.my-list a {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line); text-decoration: none;
}
.my-list li:first-child a { border-top: 0; }
.my-list a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.my-list .icon { margin-left: auto; color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 1.7rem; margin: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.idea-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .2s, border-color .2s;
}
.idea-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.idea-card h3 { font-size: 1.2rem; margin: 0; }
.idea-card .summary {
  color: var(--muted); font-size: .93rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.idea-card .foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .86rem; color: var(--muted);
}
.idea-card .count { display: inline-flex; align-items: center; gap: 5px; }
.empty-state {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted);
}

.privacy { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.privacy li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); font-size: .93rem; }
.privacy .icon { margin-top: 3px; color: var(--muted); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: .88rem; color: var(--muted); margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line-2);
}
.notice .icon { margin-top: 3px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--sheet); padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); z-index: 10;
}
.toast .icon { color: #7fdcb2; }

.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1180px; margin: 0 auto; padding: 0 28px 32px;
  font-size: .85rem; color: var(--muted);
}
.site-footer a { color: var(--ink-2); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .sidebar.first { order: -1; }
  .wizard { grid-template-columns: 1fr; gap: 0; }
  .rail { display: none; }
  .mini-track { display: flex; }
  .process { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { padding: 16px 18px; }
  .container { padding: 4px 16px 72px; }
  .site-footer { padding: 0 16px 24px; }
  .sheet { padding: 22px 20px; }
  .hero { grid-template-columns: 1fr; padding: 16px 0 36px; gap: 8px; }
  .hero-art { max-width: 220px; order: -1; justify-self: start; margin-left: -10px; }
  .process { grid-template-columns: 1fr 1fr; }
  .entry { grid-template-columns: 1fr; }
  .track li { font-size: 0; gap: 0; }
  .track li + li::before { width: 16px; margin: 0 6px; }
  .doc-section { padding: 18px; }
  .doc-body, .notes, .add-note { padding-left: 0; }
  .note-form { margin-left: 0; }
  .inline-form { flex-direction: column; }
  .ticket { grid-template-columns: 1fr; }
  .ticket-stub { border-left: 0; border-top: 1.5px dashed var(--ink); }
  .kbd-hint { display: none; }
  .step-nav .btn { flex: 1; }
}
