/* Die Konsole im Stil Neon des Spiels (lib/ui/look.dart): dunkler Grund, Türkis als Akzent, Systemschrift.
   Die Farben der übrigen Stile kommen aus /marke.css, erzeugt aus marke.json. */

@font-face { font-family: "Press Start 2P"; src: url("/fonts/PressStart2P-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("/fonts/VT323-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bangers"; src: url("/fonts/Bangers-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("/fonts/ComicNeue-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("/fonts/ComicNeue-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("/fonts/Quicksand.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cabin Sketch"; src: url("/fonts/CabinSketch-Bold.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("/fonts/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/Cinzel.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("/fonts/CrimsonText-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("/fonts/CrimsonText-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --grund: #050d16;
  --flaeche: #0e2032;
  --flaeche-hoch: #12304a;
  --linie: #24405a;
  --text: #eaf6ff;
  --leise: #93aec4;
  --akzent: #3be3d2;
  --auf-akzent: #04201d;
  --fehler: #ff8552;
  --rund: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--grund); }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--akzent); }
code { font: 0.9em ui-monospace, Menlo, Consolas, monospace; color: var(--text); }
h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.9rem; }
h3, h4 { margin: 0; }
.muted { color: var(--leise); }
.note, .small { color: var(--leise); font-size: 0.85rem; margin: 0.6rem 0 0; }
.error { color: var(--fehler); font-weight: 600; }

/* Kopf */
.top {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--linie);
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand img { border-radius: 8px; }
.brand small { color: var(--leise); font-weight: 400; margin-left: 0.2rem; }
.nav { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--leise); text-decoration: none; padding: 0.4rem 0.75rem; border-radius: 999px; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--auf-akzent); background: var(--akzent); font-weight: 650; }
.logout { margin-left: auto; }

.page { max-width: 1080px; margin: 0 auto; padding: 1.8rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.page > section, .page > .columns { margin-top: 1.4rem; }

/* Karten, Zahlen, Fakten */
.card { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.3rem 1.4rem; }
.narrow { max-width: 440px; margin: 3rem auto 0; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.4rem; }
.columns .card { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 1rem; }
.tile { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 1.1rem 1.2rem; }
.tile .value { font-size: 2.3rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; margin: 0; font-variant-numeric: tabular-nums; }
.tile .label { margin: 0.25rem 0 0; color: var(--leise); }
.tile .note { margin-top: 0.4rem; }
.facts { margin: 0; display: grid; gap: 0.55rem; }
.facts div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.2rem 1rem; border-bottom: 1px solid var(--linie); padding-bottom: 0.45rem; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--leise); }
.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--linie); }
th:first-child { text-align: left; font-weight: 400; }
thead th { color: var(--leise); font-weight: 600; font-size: 0.85rem; }
details { margin-top: 0.8rem; }
summary { cursor: pointer; color: var(--akzent); }

/* Diagramm: eine Reihe im Akzent, Gitter und Achsen leise */
/* Auf schmalen Bildschirmen bleibt das Diagramm lesbar groß und lässt sich seitlich schieben. */
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 560px; height: auto; display: block; }
.chart .grid { stroke: var(--linie); stroke-width: 1; }
.chart .grid.base { stroke: var(--leise); }
.chart .axis { fill: var(--leise); font-size: 11px; }
.chart .value { fill: var(--text); font-size: 12px; font-weight: 650; }
.chart .bar { fill: var(--akzent); }
.chart .hit { fill: transparent; }
.chart g:hover .hit { fill: var(--flaeche-hoch); }

/* Formulare */
.stack { display: grid; gap: 0.6rem; margin-top: 1rem; }
label { color: var(--leise); font-size: 0.9rem; }
input {
  font: inherit; color: var(--text); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 10px; padding: 0.7rem 0.85rem;
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
button {
  font: inherit; font-weight: 650; cursor: pointer;
  color: var(--auf-akzent); background: var(--akzent);
  border: 0; border-radius: 999px; padding: 0.7rem 1.2rem;
}
button.link { background: none; color: var(--leise); padding: 0.4rem 0.6rem; font-weight: 400; }
button.link:hover { color: var(--text); }

/* Corporate Design */
.brand-row { display: flex; gap: 2rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.brand-row figure { margin: 0; }
.brand-row figcaption { color: var(--leise); font-size: 0.85rem; margin-top: 0.4rem; }
.logo { max-width: 100%; width: 520px; height: auto; display: block; }
.brand-row figure { max-width: 100%; }
.symbol { border-radius: 26px; display: block; }
.styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.2rem; margin-top: 1rem; }
.style-card { border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; background: var(--flaeche); }
.style-head { background: var(--sg); color: var(--st); padding: 1.2rem 1.3rem; }
.style-title { font-family: var(--sfa); font-weight: var(--sw); font-size: 1.6rem; color: var(--st); }
.style-text { font-family: var(--sft); font-size: 1.1rem; margin: 0.4rem 0; }
.style-meta { color: var(--sl); font-size: 0.85rem; margin: 0.4rem 0 0.8rem; }
.style-button {
  display: inline-block; font-family: var(--sfa); font-weight: var(--sw);
  background: var(--sa); color: var(--son); border: var(--sb) solid var(--st);
  border-radius: var(--sr); padding: 0.45rem 1rem;
}
.style-body { padding: 1rem 1.3rem 1.2rem; }
.style-body h4 { color: var(--leise); font-size: 0.85rem; font-weight: 600; margin: 0.4rem 0 0.6rem; }
.swatches { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.swatches li { display: flex; gap: 0.55rem; align-items: flex-start; font-size: 0.85rem; line-height: 1.35; }
.swatch { flex: none; width: 2rem; height: 2rem; border-radius: 8px; background: var(--c); border: 1px solid var(--linie); }
.rules { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }

/* Marketing */
.crumbs { color: var(--leise); font-size: 0.9rem; margin-bottom: 0.6rem; }
.crumbs a { color: var(--leise); }
.page > .card + .card, .page section + section { margin-top: 1.4rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.9rem 0 0; }
a.button {
  display: inline-block; text-decoration: none; font-weight: 650;
  color: var(--auf-akzent); background: var(--akzent); border-radius: 999px; padding: 0.6rem 1.1rem;
}
a.button.quiet, button.quiet { background: transparent; color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.budget { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.9rem; margin: 0.4rem 0 0; }
.budget meter { width: 9rem; height: 0.7rem; }
.notice { border-color: var(--akzent); }
.notice ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.card > p:first-child, .card > ul:first-child { margin-top: 0; }
.card > p:last-child { margin-bottom: 0; }
.regie button, .columns .stack button, .stack.wide > button { justify-self: start; }
.notice-line { color: var(--akzent); font-weight: 600; }
.error ul { margin: 0; padding-left: 1.2rem; }
table.list td, table.list th { vertical-align: top; }
table.list th a { font-weight: 650; }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.stack.wide { max-width: none; }
textarea, select {
  font: inherit; color: var(--text); background: var(--grund);
  border: 1px solid var(--linie); border-radius: 10px; padding: 0.65rem 0.85rem; width: 100%;
}
textarea { resize: vertical; line-height: 1.45; }
textarea:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0.8rem; }
.row > div { display: grid; gap: 0.4rem; align-content: start; }
.check { display: flex; gap: 0.5rem; align-items: center; color: var(--text); }
.direction { margin: 0.8rem 0 0; padding: 0.7rem 1rem; border-left: 3px solid var(--akzent); background: var(--flaeche); border-radius: 0 var(--rund) var(--rund) 0; white-space: pre-wrap; }

/* Bilder: Vorschau im Format des Bildes */
.thumb { display: block; border-radius: 8px; border: 1px solid var(--linie); background: var(--grund); object-fit: cover; }
.thumb.hoch { width: 72px; height: 128px; }
.thumb.quer { width: 128px; height: 72px; }
.thumb.quadratisch { width: 100px; height: 100px; }
.thumb.none { width: 72px; height: 128px; display: grid; place-items: center; text-align: center; font-size: 0.75rem; color: var(--leise); padding: 0.3rem; }
.thumb.big.hoch { width: 180px; height: 320px; }
.thumb.big.quer { width: 320px; height: 180px; }
.thumb.big.quadratisch { width: 240px; height: 240px; }

/* Ideen */
.ideas, .takes { display: grid; gap: 1.2rem; margin-top: 0.8rem; }
.idea-head { display: flex; gap: 1.1rem; align-items: flex-start; }
.idea h3, .take h3 { font-size: 1.1rem; }
.idea p { margin: 0.4rem 0 0; }
.idea h4 { color: var(--leise); font-size: 0.85rem; font-weight: 600; margin: 1rem 0 0.3rem; }
.change { color: var(--akzent); }
.beats { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; }
.time { color: var(--akzent); font-variant-numeric: tabular-nums; margin-right: 0.3rem; }
.post { white-space: pre-wrap; }
pre.prompt { white-space: pre-wrap; word-break: break-word; font: 0.88rem/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--grund); border: 1px solid var(--linie); border-radius: 10px; padding: 0.7rem 0.85rem; margin: 0.4rem 0 0; }

/* Takes */
.take-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.take-body { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: flex-start; }
.take-info { flex: 1 1 280px; min-width: 0; }
.clip { display: block; width: min(320px, 100%); max-height: 70vh; border-radius: 10px; background: #000; }
.clip-wait { opacity: 0.6; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 650; border-radius: 999px; padding: 0.2rem 0.65rem; white-space: nowrap; }
.badge.busy { background: var(--flaeche-hoch); color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.badge.ok { background: var(--akzent); color: var(--auf-akzent); }
.badge.bad { background: transparent; color: var(--fehler); box-shadow: inset 0 0 0 1px var(--fehler); }
.badge.off { background: transparent; color: var(--leise); box-shadow: inset 0 0 0 1px var(--linie); }
.regie { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.take h4 { color: var(--leise); font-size: 0.85rem; font-weight: 600; margin: 1rem 0 0.3rem; }

/* Drehbücher und Fassungen */
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.92rem; }
.shot { padding: 0.35rem 0.6rem; border-left: 3px solid var(--linie); }
.shot.spiel, .shot.geteilt { border-left-color: var(--akzent); }
.shot .kind { color: var(--leise); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.3rem; }
.shot .say { font-weight: 600; }
.scenes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.scenes form.inline, .scenes form.inline button { display: inline; }
details.older summary { cursor: pointer; font-weight: 650; }
details.older[open] summary { margin-bottom: 0.6rem; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }

/* Drehbuch */
.plan .card h2 { margin-bottom: 0.4rem; }
.plan .card { display: grid; gap: 0.5rem; }
.choices { display: grid; gap: 0.5rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--text); font-size: 0.95rem; padding: 0.55rem 0.7rem; border: 1px solid var(--linie); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--akzent); background: var(--flaeche-hoch); }
.choice input { margin-top: 0.3rem; accent-color: var(--akzent); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; }
.pick { display: grid; justify-items: start; gap: 0.35rem; color: var(--text); font-size: 0.85rem; line-height: 1.3; padding: 0.5rem; border: 1px solid var(--linie); border-radius: 10px; cursor: pointer; position: relative; }
.pick input { position: absolute; top: 0.5rem; right: 0.5rem; accent-color: var(--akzent); }
.pick:has(input:checked) { border-color: var(--akzent); background: var(--flaeche-hoch); }
.pick:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: 2px; }
.shoot { border-color: var(--akzent); }

/* Bildersammlung */
.library { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.lib { margin: 0; display: flex; gap: 0.8rem; align-items: flex-start; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 0.8rem; font-size: 0.9rem; line-height: 1.4; }
.lib figcaption { min-width: 0; }
.recordings { display: grid; gap: 1rem; margin-top: 0.8rem; }
.rec { margin: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 0.8rem; font-size: 0.9rem; }
.rec img { display: block; width: 100%; max-width: 720px; height: auto; border-radius: 8px; margin-bottom: 0.5rem; }

/* Benutzer */
.people { list-style: none; margin: 0; padding: 0; }
.person { padding: 0.9rem 0; border-top: 1px solid var(--linie); }
.person:first-child { border-top: 0; padding-top: 0; }
.person:last-child { padding-bottom: 0; }
.person-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.person-who { min-width: 0; overflow-wrap: anywhere; }
.person .small { margin-top: 0.3rem; }
.person-edit summary { font-size: 0.9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.8rem; }
.inline-form select { width: auto; }
.inline-form .small { margin: 0; flex-basis: 100%; }
.qr-wrap { margin: 0.7rem 0; }
.qr { display: block; width: 200px; height: 200px; border-radius: 10px; }
code.secret { overflow-wrap: anywhere; user-select: all; }
.audit { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.audit li { display: grid; gap: 0.15rem; padding: 0.6rem 0; border-top: 1px solid var(--linie); overflow-wrap: anywhere; }
.audit li:first-child { border-top: 0; }
.audit .small { margin: 0; }
.code-form input { max-width: 16rem; }
.check.multiline { align-items: flex-start; }
.check.multiline input { margin-top: 0.3rem; }
.check.multiline .small { margin: 0; }
.warn { color: var(--fehler); font-weight: 600; }
button.danger { background: transparent; color: var(--fehler); box-shadow: inset 0 0 0 1px var(--fehler); }
fieldset.choices { border: 0; margin: 0; padding: 0; }
fieldset.choices legend { color: var(--leise); font-size: 0.9rem; padding: 0; margin-bottom: 0.4rem; }

@media (max-width: 560px) {
  h1 { font-size: 1.55rem; }
  .tile .value { font-size: 1.9rem; }
  /* Die Navigation bekommt eine eigene Zeile unter der Marke. */
  .top { gap: 0.7rem; }
  .nav { flex-basis: 100%; }
}
