/* ==========================================================================
   Bildmaschine (AI Visual Brand System, Sunseeker)
   Bild und Ernte CI: Gold #d7a40d, Schwarz, helle warme Off-White-Flaechen.
   Uebernommen aus der abgestimmten Sunseeker-Demo. Keine externen Ressourcen.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --gold: #d7a40d;
  --gold-soft: #f3e0a0;
  --gold-tint: #fbf3dd;
  --gold-tint-2: #f6e8c4;
  --ink: #000000;
  --bg: #ffffff;
  --paper: #f7f3ea;
  --paper-2: #f1ebdd;
  --line: #e8e0d0;
  --line-2: #ded3bf;

  --green: #2f8f57;
  --green-tint: #e6f3ec;
  --red: #c0473f;
  --red-tint: #fbeae8;
  --blue: #3a6ea5;
  --blue-tint: #e9f0f8;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;

  --radius: 16px;
  --radius-s: 11px;
  --radius-xs: 8px;
  --shadow: 0 18px 44px -34px rgba(40, 32, 18, 0.55);
  --shadow-soft: 0 10px 30px -26px rgba(40, 32, 18, 0.5);
  --sidebar-w: 252px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
/* hidden-Attribut muss display-Regeln von Klassen (grid/flex) schlagen */
[hidden] { display: none !important; }

/* --- Base ----------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-weight: 450; font-size: 15px;
  line-height: 1.55; color: var(--ink); background: var(--paper);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.015em; color: var(--ink); margin: 0; line-height: 1.2; }
p { margin: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 500; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* --- Login-Gate (BE-Gold, statt masdemas-Maske) --------------------------- */
#login.gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink); padding: 24px; font-family: var(--font-sans);
}
#login.gate[hidden] { display: none; }
.gate__inner {
  width: 100%; max-width: 430px; text-align: center; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px 36px;
}
.gate__logo { width: 148px; height: auto; margin: 0 auto 26px; display: block; }
.gate__eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em; color: var(--gold); margin: 0 0 12px; }
.gate__title { font-size: clamp(22px, 4vw, 28px); font-weight: 800; letter-spacing: -0.015em; margin: 0 0 14px; line-height: 1.15; }
.gate__lead { font-size: 15px; line-height: 1.55; font-weight: 450; margin: 0 0 26px; }
.gate__form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.gate__field { display: block; text-align: left; }
.gate__field-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px; }
.gate__field input {
  width: 100%; padding: 15px 18px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: var(--paper); color: var(--ink); font-family: var(--font-sans);
  font-size: 17px; font-weight: 500; letter-spacing: 0.04em; text-align: center;
}
.gate__field input:focus { outline: none; border-color: var(--gold); background: var(--bg); }
.gate__submit {
  margin-top: 6px; padding: 15px 24px; border-radius: 999px; border: 1px solid var(--gold);
  background: var(--gold); color: var(--ink); font-family: var(--font-sans);
  font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.2s ease, color 0.2s ease;
}
.gate__submit:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.gate__submit:disabled { opacity: 0.5; cursor: default; }
.gate__linkbtn { background: transparent; border: none; color: var(--ink); opacity: 0.6; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 4px; }
.gate__linkbtn:hover { opacity: 0.95; }
.gate__note { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: var(--green); line-height: 1.5; }
.gate__error { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--red); }

/* --- Gold-Statusleiste + App-Shell --------------------------------------- */
#app[hidden] { display: none; }
.topbar-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 30px; background: var(--gold); color: var(--ink);
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.topbar-strip strong { font-weight: 800; }
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; padding-top: 30px; }

/* --- Sidebar -------------------------------------------------------------- */
.sidebar {
  position: sticky; top: 30px; align-self: start; height: calc(100vh - 30px);
  background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 24px 16px;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.sidebar__brand img { width: 108px; }
.sidebar__product { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; padding: 0 8px 12px; opacity: 0.55; }
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav__label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.42; padding: 16px 8px 6px; }
.nav__item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 999px; font-size: 14px; font-weight: 650; color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__item:hover { background: var(--paper); }
.nav__item.is-active { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-soft); }
.nav__icon { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav__icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar__foot { margin-top: auto; padding: 16px 8px 4px; border-top: 1px solid var(--line); }
.sidebar__user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--ink); flex-shrink: 0; }
.sidebar__user-name { font-size: 13px; font-weight: 700; word-break: break-all; }
.sidebar__user-role { font-size: 11px; opacity: 0.55; }

/* --- Main / Topbar -------------------------------------------------------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 30px; z-index: 90; display: flex; align-items: center; gap: 16px;
  padding: 15px 34px; background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(150%) blur(12px); -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__title { font-size: 17px; font-weight: 800; }
.topbar__brand-pick { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding: 7px 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; font-weight: 700; }
.topbar__brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar__who { font-size: 13px; opacity: 0.6; }

.view { padding: 34px; max-width: 1180px; width: 100%; }
.view[hidden] { display: none; }
.view__head { margin-bottom: 26px; }
.view__eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 8px; }
.view__title { font-size: 30px; margin-bottom: 8px; letter-spacing: -0.02em; }
.view__lead { font-size: 16px; font-weight: 450; max-width: 720px; }

/* --- Cards / grid --------------------------------------------------------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); }
.card--pad-lg { padding: 30px; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.section-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.5; margin: 34px 0 14px; }
.section-label:first-child { margin-top: 0; }

/* --- Stat tiles ----------------------------------------------------------- */
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-soft); }
.stat__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; margin-bottom: 10px; }
.stat__value { font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat__sub { font-size: 13px; font-weight: 500; opacity: 0.6; margin-top: 9px; }
.stat--accent { background: linear-gradient(160deg, var(--gold-tint) 0%, var(--gold-tint-2) 100%); border-color: var(--gold-soft); }
.stat--accent .stat__value { color: #7a5c05; }
.stat--link { font-family: inherit; text-align: left; width: 100%; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat--link:hover { border-color: var(--gold-soft); box-shadow: var(--shadow); transform: translateY(-2px); }
.stat--link .stat__sub { color: #7a5c05; opacity: .9; }

/* --- Badges --------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; background: var(--paper-2); color: var(--ink); }
.badge--gold { background: var(--gold-tint-2); color: #7a5c05; }
.badge--green { background: var(--green-tint); color: var(--green); }
.badge--red { background: var(--red-tint); color: var(--red); }
.badge--blue { background: var(--blue-tint); color: var(--blue); }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* --- Buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 19px; border-radius: 999px; border: 1px solid var(--ink); background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; box-shadow: none; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--line-2); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--sm { padding: 8px 14px; font-size: 12px; }

/* --- Journey-Eyecatcher --------------------------------------------------- */
.journey { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; margin-bottom: 36px; }
.journey::before { content: ""; position: absolute; inset: 0; background: radial-gradient(130% 160% at 6% -25%, var(--gold-tint) 0%, transparent 52%); pointer-events: none; }
.journey__head { position: relative; margin-bottom: 24px; }
.journey__eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--gold); }
.journey__title { font-size: 21px; font-weight: 800; letter-spacing: -0.015em; margin-top: 4px; }
.jstrip { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.jstage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.jstage__canvas { position: relative; height: 84px; border-radius: var(--radius-s); background: var(--paper); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.jstage__canvas svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.jstage__num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-family: var(--font-mono); font-size: 11px; font-weight: 800; background: var(--gold); color: var(--ink); }
.jstage__t { font-size: 13.5px; font-weight: 700; }
.jstage__d { font-size: 12px; font-weight: 450; opacity: 0.6; line-height: 1.35; }

/* --- Bausteine (Produkt / Hintergrund / Element) -------------------------- */
.blocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.block { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; background: var(--bg); }
.block__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.block__title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.block__opt { font-size: 11px; font-weight: 600; opacity: 0.5; }
.pool { display: flex; gap: 10px; flex-wrap: wrap; }
.pool__item { width: 112px; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; cursor: pointer; background: var(--paper); display: flex; flex-direction: column; transition: box-shadow 0.15s var(--ease), transform 0.15s var(--ease); position: relative; }
.pool__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.pool__item img { width: 100%; height: 84px; object-fit: cover; display: block; background: var(--bg); }
.pool__item span { font-size: 11px; font-weight: 600; padding: 5px 7px; text-align: left; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pool__item.is-selected { box-shadow: 0 0 0 3px var(--gold); }
.pool__item.is-selected::after { content: "\2713"; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-soft); }
.pool__empty { font-size: 12px; opacity: 0.55; padding: 8px 0; }
.block__upload { margin-top: 12px; display: inline-flex; }
.block__upload input { display: none; }

/* --- Rezept-Ansicht: 1 Produkt + 2 Hintergrund + 3 Element = Motiv -------- */
.recipe { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.recipe__slot { flex: 1 1 180px; min-width: 150px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; display: flex; flex-direction: column; gap: 9px; position: relative; }
.recipe__slot.is-filled { border-color: var(--gold-soft); box-shadow: var(--shadow-soft); }
.recipe__num { position: absolute; top: 9px; left: 9px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--font-mono); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.recipe__slot.is-filled .recipe__num { background: var(--gold); border-color: var(--gold); }
.recipe__thumb { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-xs); overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.recipe__thumb img { width: 100%; height: 100%; object-fit: contain; }
.recipe__slot[data-slot="hintergrund"] .recipe__thumb img { object-fit: cover; }
.recipe__empty { font-size: 12px; opacity: 0.5; text-align: center; padding: 8px; }
.recipe__cap { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.recipe__cap small { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: 0; opacity: 0.8; text-transform: none; margin-top: 2px; }
.recipe__op { align-self: center; font-size: 24px; font-weight: 800; color: var(--gold); flex: 0 0 auto; }
.recipe__result { flex: 1 1 160px; min-width: 140px; border: 1px dashed var(--gold-soft); border-radius: var(--radius-s); background: var(--gold-tint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; color: #7a5c05; }
.recipe__result svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.recipe__result b { font-size: 13px; }
.recipe__result span { font-size: 11.5px; opacity: 0.85; }
.recipe__freedom { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.recipe__freedom-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.recipe__freedom select { width: 100%; padding: 8px 26px 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); font-family: var(--font-sans); font-size: 12px; background: var(--bg); color: #000; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7a5c05 50%), linear-gradient(135deg, #7a5c05 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.recipe__freedom select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.recipe__slot[data-slot="produkt"] .recipe__freedom select { cursor: not-allowed; opacity: .7; background-image: none; }
.recipe__size { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.recipe__size select { width: 100%; padding: 8px 26px 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); font-family: var(--font-sans); font-size: 12px; background: var(--bg); color: #000; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7a5c05 50%), linear-gradient(135deg, #7a5c05 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.recipe__size select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }

/* --- Hinweis-Box (Kosten / Testphase) ------------------------------------ */
.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--gold-tint); border: 1px solid var(--gold-soft); border-radius: var(--radius-s); padding: 16px 18px; margin-bottom: 26px; }
.notice__icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; }
.notice__icon svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notice__title { font-size: 13.5px; font-weight: 800; color: #7a5c05; margin-bottom: 3px; }
.notice__text { font-size: 13px; line-height: 1.55; color: var(--ink); }

/* --- Logo (optional) ------------------------------------------------------ */
.logo-row { display: flex; gap: 16px; align-items: flex-start; }
.logo-row__preview { flex: 0 0 auto; width: 118px; height: 118px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px; }
.logo-row__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-row__empty { font-size: 11.5px; opacity: .5; text-align: center; padding: 8px; }
.logo-row__body { flex: 1 1 auto; }

/* --- Galerie -------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.gallery__item { position: relative; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--bg); box-shadow: var(--shadow-soft); transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column; }
.gallery__item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.gallery__thumb { padding: 0; border: none; background: none; cursor: pointer; display: block; width: 100%; }
.gallery__thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--paper); }
.gallery__del { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 8px; border: none; background: rgba(28, 22, 12, 0.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background .15s; }
.gallery__item:hover .gallery__del, .gallery__del:focus-visible { opacity: 1; }
.gallery__del:hover { background: #b3261e; }
.gallery__del svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.gallery__meta { padding: 9px 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); opacity: .7; text-align: left; }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 32px; background: rgba(28, 22, 12, 0.82); }
.lightbox__fig { max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.lightbox__fig img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-s); box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); background: var(--paper); }
.lightbox__cap { color: #f7f3ea; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; text-align: center; max-width: 800px; }
.lightbox__close { position: fixed; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(247, 243, 234, 0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox__close:hover { background: rgba(247, 243, 234, 0.28); }

@media (max-width: 720px) {
  .recipe { flex-direction: column; }
  .recipe__op { align-self: flex-start; padding-left: 12px; }
}

/* --- Steuerung (Vorlage, Felder, Umschalter) ------------------------------ */
.gen__field { display: flex; flex-direction: column; gap: 6px; }
.gen__field-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.gen__field select, .gen__field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-xs);
  font-family: var(--font-sans); font-size: 13px; background: var(--bg); color: #000; cursor: pointer;
}
.gen__field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7a5c05 50%), linear-gradient(135deg, #7a5c05 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.gen__field select:focus, .gen__field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.gen__vars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { padding: 8px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.seg button.is-on { background: var(--ink); color: var(--bg); }
.hint { font-size: 12px; opacity: 0.6; line-height: 1.5; }

.prompt-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; color: var(--ink); }
.promptview { border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; }
.promptview__toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--paper-2); border: none; border-bottom: 1px solid var(--line); cursor: pointer; font-family: var(--font-sans); text-align: left; }
.promptview__title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.promptview__state { font-size: 11px; font-weight: 700; color: #7a5c05; white-space: nowrap; }
.promptview__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.promptview__label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.promptref { display: flex; flex-direction: column; gap: 8px; }
.promptref__row { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 10px 12px; }
.promptref__head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #7a5c05; margin-bottom: 4px; }
.promptref__txt { font-family: var(--font-mono); font-size: 12px; line-height: 1.55; color: var(--ink); }

/* --- Generator-Buehne (Ergebnis) ------------------------------------------ */
.gen__stage { position: relative; min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gen__idle { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px; opacity: .55; max-width: 320px; }
.gen__idle svg { width: 40px; height: 40px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.gen__idle span { font-size: 13px; line-height: 1.5; }
.gen__loading { display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: .8; font-size: 13px; font-weight: 600; text-align: center; padding: 20px; }
.gen__spinner { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(from 0deg, var(--gold-tint-2), var(--gold)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); animation: gen-spin .8s linear infinite; }
@keyframes gen-spin { to { transform: rotate(360deg); } }
.gen__result { margin: 0; width: 100%; height: 100%; display: flex; flex-direction: column; }
.gen__result img { width: 100%; flex: 1; object-fit: contain; display: block; background: var(--paper-2); max-height: 460px; }
.gen__result-cap { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--bg); border-top: 1px solid var(--line); flex-wrap: wrap; }
.gen__idle[hidden], .gen__loading[hidden], .gen__result[hidden] { display: none; }
.gen__variants { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--bg); border-top: 1px solid var(--line); }
.gen__variants[hidden] { display: none; }
.gen__variant { padding: 0; width: 86px; border: 1px solid var(--line); border-radius: var(--radius-xs); overflow: hidden; cursor: pointer; background: var(--paper); display: flex; flex-direction: column; transition: box-shadow .15s var(--ease); }
.gen__variant img { width: 100%; height: 50px; object-fit: cover; display: block; }
.gen__variant span { font-size: 10.5px; font-weight: 700; padding: 4px 5px; text-align: left; }
.gen__variant.is-active { box-shadow: 0 0 0 3px var(--gold); }

/* --- Schritt-Karten (Erzeugen-Ablauf) ------------------------------------- */
.step { margin-bottom: 20px; }
.step__label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: #7a5c05; margin-bottom: 12px; }
.step__n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-tint-2); color: #7a5c05; font-family: var(--font-mono); font-size: 12px; }

/* --- Referenz-Bibliothek -------------------------------------------------- */
.ref-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.ref-tab { padding: 10px 19px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); font-size: 13px; font-weight: 700; }
.ref-tab:hover { border-color: var(--gold); background: var(--gold-tint); }
.ref-tab.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ref-card { padding: 14px; }
.ref-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-s); margin-bottom: 12px; background: var(--paper-2); }
.ref-card__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.ref-card__note { font-size: 13px; font-weight: 450; opacity: 0.72; line-height: 1.45; }

/* --- Markenregeln --------------------------------------------------------- */
.rule-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rule-item:last-child { border-bottom: none; }
.rule-item__num { font-size: 24px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.rule-item__title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.rule-item__desc { font-size: 14px; font-weight: 450; opacity: 0.78; line-height: 1.5; }
.swatch-row { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; }
.swatch__chip { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line-2); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Bewertung ------------------------------------------------------------ */
.task-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.task-brief dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 14px 0 0; }
.task-brief dt { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.5; }
.task-brief dd { margin: 0; font-size: 14px; font-weight: 500; }
.rate { position: sticky; top: 96px; }
.rate__img { width: 100%; border-radius: var(--radius-s); margin-bottom: 16px; background: var(--paper-2); }
.rate__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.5; margin-bottom: 10px; }
.verdict-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.verdict-btn { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); background: var(--bg); font-size: 13px; font-weight: 700; transition: all 0.15s ease; }
.verdict-btn:hover { border-color: var(--ink); }
.verdict-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.verdict-btn.is-on--ok { background: var(--green); border-color: var(--green); color: #fff; }
.verdict-btn.is-on--no { background: var(--red); border-color: var(--red); color: #fff; }
.rate textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-xs); font-family: var(--font-sans); font-size: 13px; resize: vertical; min-height: 72px; background: var(--bg); }
.rate__foot { display: flex; gap: 8px; margin-top: 16px; }

/* --- Auswertung ----------------------------------------------------------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flow__step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; box-shadow: var(--shadow-soft); }
.flow__step::after { content: "\2192"; position: absolute; right: -16px; top: 24px; font-size: 18px; color: var(--gold); z-index: 2; }
.flow__step:last-child::after { display: none; }
.flow__n { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.flow__t { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.flow__d { font-size: 13px; font-weight: 450; opacity: 0.7; line-height: 1.5; }
.log-table { width: 100%; border-collapse: collapse; }
.log-table th, .log-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.log-table th { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.55; background: var(--paper); }
.empty-state { padding: 28px; text-align: center; font-size: 14px; opacity: 0.6; }

.callout { display: flex; gap: 14px; align-items: flex-start; background: var(--gold-tint); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 20px 22px; margin-top: 24px; }
.callout__title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.callout__text { font-size: 13.5px; font-weight: 450; opacity: 0.8; line-height: 1.5; }
.muted { opacity: 0.55; }

/* --- Toast ---------------------------------------------------------------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 14px 24px; border-radius: 999px; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 300; display: flex; align-items: center; gap: 9px; box-shadow: var(--shadow); }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[hidden] { display: none; }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1080px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .task-layout { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow__step::after { display: none; }
  .jstrip { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
}
@media (max-width: 900px) {
  .blocks { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .sidebar__foot { margin: 0; border: none; padding: 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav__label { display: none; }
  .grid--2, .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .jstrip { grid-template-columns: 1fr 1fr; }
  .view { padding: 20px; }
  .topbar { padding: 12px 20px; }
}
