@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-var-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
:root {
  --blue-950: #052d49;
  --blue-900: #073a5d;
  --blue-800: #0b527d;
  --blue-700: #0d72ad;
  --blue-600: #118acb;
  --blue-100: #eaf6fc;
  --blue-50: #f4faff;
  --ink: #082f4c;
  --copy: #49677a;
  --line: #d5e5ee;
  --yellow: #ffd323;
  --white: #fff;
  --rainbow: linear-gradient(90deg, #1289cc 0%, #00a874 35%, #c5d000 60%, #ffb30f 78%, #e84545 100%);
  --shadow: 0 18px 48px rgba(8, 47, 76, 0.12);
  --shadow-soft: 0 10px 30px rgba(8, 47, 76, 0.08);
  --radius: 20px;
  --composer-h: 180px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--copy);
  background: var(--blue-50);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
b, strong { color: var(--ink); font-weight: 700; }
::selection { color: #fff; background: var(--blue-700); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rainbow { color: transparent; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; padding-bottom: 0.08em; }
.kicker { margin: 0 0 10px; color: var(--blue-700); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }

/* ── Kopf ─────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--rainbow); opacity: 0.9; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-sep { width: 1px; height: 24px; background: var(--line); }
.brand-name { color: var(--ink); font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 20px; border: 1px solid var(--blue-700); border-radius: 7px;
  color: #fff; background: var(--blue-700); box-shadow: 0 8px 20px rgba(17, 138, 203, 0.2);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--blue-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary.small { min-height: 38px; padding: 8px 14px; font-size: 0.7rem; }
.btn-ghost { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.btn-link { border: 0; background: none; padding: 6px 4px; color: var(--blue-700); font-weight: 700; font-size: 0.85rem; cursor: pointer; }

/* ── Inhalt ───────────────────────────────────────────── */
main { width: min(780px, 100%); margin: 0 auto; padding: 24px 16px calc(var(--composer-h) + 40px); }
.intro { padding: 28px 0 8px; }
.intro h1 { margin: 0 0 14px; color: var(--ink); font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1.06; letter-spacing: -0.04em; font-weight: 800; text-wrap: balance; }
.intro .lead { margin: 0 0 22px; font-size: 1.06rem; max-width: 620px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-soft); font-size: 0.86rem; line-height: 1.35; }
.steps b { display: block; font-size: 0.95rem; }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue-900); font-weight: 800; font-size: 0.8rem; }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .brand-sep, .brand-name { display: none; }
}

/* ── Verlauf ──────────────────────────────────────────── */
.feed { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: flex-end; animation: rise 0.28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.row.user { justify-content: flex-end; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft); display: grid; place-items: center; overflow: hidden; }
.avatar span { font-weight: 900; font-size: 1rem; color: transparent; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; }
.bubble { max-width: min(560px, 86%); padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.row.user .bubble { color: #fff; background: var(--blue-900); border-bottom-right-radius: 6px; }
.row.bot .bubble { color: var(--ink); background: #fff; box-shadow: var(--shadow-soft); border-bottom-left-radius: 6px; }
.bubble p { margin: 0 0 0.6em; } .bubble p:last-child { margin: 0; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 16px; max-width: min(560px, 100%); }
.row.bot .card { flex: 1; }
.card-k { margin: 0 0 6px; color: var(--blue-600); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }

/* Material */
.media { display: flex; gap: 12px; align-items: center; }
.media-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-700); }
.media-ico svg { width: 22px; height: 22px; }
.media-name { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; line-height: 1.3; }
.media-meta { font-size: 0.84rem; }
.bar { margin-top: 10px; height: 6px; border-radius: 3px; background: var(--blue-100); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--rainbow); transition: width 0.3s; }
.card.err { border-left: 4px solid #e84545; }

/* Rückfrage */
.ask-q { margin: 12px 0 8px; color: var(--ink); font-weight: 700; }
.ask-q:first-of-type { margin-top: 4px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 42px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.opt:hover { border-color: var(--blue-600); }
.opt[aria-pressed="true"] { color: #fff; background: var(--blue-700); border-color: var(--blue-700); }
.opt:disabled { cursor: default; opacity: 0.55; }
.opt[aria-pressed="true"]:disabled { opacity: 1; }
.ask-send { margin-top: 14px; }

/* Bild / Video */
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--blue-100); }
.cap { margin: 8px 2px 0; font-size: 0.86rem; }
.reel { padding: 0; overflow: hidden; }
.reel-stage { background: var(--blue-950); display: flex; justify-content: center; }
.reel video { display: block; max-width: 100%; max-height: min(72dvh, 720px); background: #000; }
.reel-body { padding: 14px 16px 16px; }
.reel-title { margin: 0 0 4px; color: var(--ink); font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; color: var(--blue-900); background: var(--blue-100); }
.badge.y { background: var(--yellow); color: var(--ink); }

/* Aktivität im Verlauf */
.activity { display: flex; align-items: center; gap: 8px; padding-left: 42px; font-size: 0.85rem; color: var(--copy); }

/* ── Arbeitsstand ─────────────────────────────────────── */
.workbar { position: fixed; left: 0; right: 0; bottom: var(--composer-h); z-index: 15; padding: 0 16px 10px; pointer-events: none; }
.workbar-in { width: min(748px, 100%); margin: 0 auto; padding: 12px 14px; background: var(--blue-950); color: #cfe3f1; border-radius: 16px; box-shadow: var(--shadow); pointer-events: auto; }
.wb-head { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 0.92rem; }
.wb-head #wb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-head .btn-link { color: var(--yellow); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(255, 211, 35, 0.6); animation: pulse 1.4s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 211, 35, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 211, 35, 0); } }
.wb-steps { list-style: none; display: flex; gap: 4px; margin: 10px 0 8px; padding: 0; overflow-x: auto; scrollbar-width: none; }
.wb-steps li { flex: 1; min-width: 64px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(207, 227, 241, 0.5); white-space: nowrap; }
.wb-steps li::before { content: ""; display: block; height: 4px; border-radius: 2px; margin-bottom: 5px; background: rgba(255, 255, 255, 0.14); }
.wb-steps li.done { color: #cfe3f1; } .wb-steps li.done::before { background: var(--blue-600); }
.wb-steps li.now { color: #fff; } .wb-steps li.now::before { background: var(--yellow); }
.wb-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.wb-bar > div { height: 100%; width: 0; background: var(--rainbow); transition: width 0.5s; }

/* ── Eingabe ──────────────────────────────────────────── */
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(244, 250, 255, 0), var(--blue-50) 22%); }
.composer-in { width: min(748px, 100%); margin: 0 auto; }
.sources { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 0.86rem; cursor: pointer; box-shadow: var(--shadow-soft); }
.chip-btn:hover { border-color: var(--blue-600); }
.chip-btn svg { color: var(--blue-700); }
.yt-form { display: flex; gap: 8px; margin-bottom: 8px; }
.yt-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.yt-form input:focus, .msg-form textarea:focus, .login input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(17, 138, 203, 0.15); }
.examples { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; padding-bottom: 2px; }
.examples button { flex: none; padding: 6px 12px; border: 1px dashed #b7d3e3; border-radius: 999px; background: var(--blue-100); color: var(--blue-900); font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.msg-form { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.msg-form:focus-within { border-color: var(--blue-600); }
.msg-form textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; padding: 10px 0; max-height: 160px; background: transparent; color: var(--ink); font-size: 1rem; line-height: 1.45; }
.send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--blue-700); cursor: pointer; }
.send:disabled { background: #a9c6d8; cursor: default; }
.send svg { width: 22px; height: 22px; }
.fineprint { margin: 6px 4px 0; font-size: 0.7rem; color: #7c95a5; text-align: center; }
.fineprint b { color: var(--copy); }

/* ── Dialoge ──────────────────────────────────────────── */
.sheet { width: min(520px, calc(100% - 32px)); max-height: 80dvh; border: 0; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: var(--copy); }
.sheet::backdrop { background: rgba(5, 45, 73, 0.45); backdrop-filter: blur(3px); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet h2 { margin: 0; color: var(--ink); font-size: 1.3rem; letter-spacing: -0.03em; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-list a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.history-list small { color: var(--copy); white-space: nowrap; }
.login form { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; padding: 10px; }
.login-logo { width: 180px; margin: 4px auto 0; }
.login input { min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; text-align: center; font-size: 1.05rem; }
.login p { margin: 0; }
.login-err { color: #c0392b; font-weight: 600; }
