/* Panel · Dashboard (hell, ruhig). Gestaltung: docs/DESIGN.md. Schriften selbst gehostet (Inter, Newsreader). */
@font-face { font-family: "Inter"; src: url("/static/schriften/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/static/schriften/Newsreader-Anzeige-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --papier: #f6f4ef;
  --flaeche: #ffffff;
  --flaeche-2: #fbfaf7;
  --linie: #e7e2d8;
  --linie-stark: #d6cfc2;
  --tinte: #1d1f24;
  --tinte-2: #3b3d44;
  --gedaempft: #6e6c72;
  --leise: #9a978f;
  --akzent: #9a7034;          /* Bronze */
  --akzent-hell: #f4ead9;
  --knopf: #1f2430;           /* Tinte als Hauptknopf */
  --knopf-hover: #2c3342;
  --gut: #2f7a58;   --gut-hell: #e4f2ea;
  --warn: #a8701c;  --warn-hell: #fbefd9;
  --fehler: #b03f37; --fehler-hell: #fae5e2;
  --info: #3d5f8f;  --info-hell: #e6edf7;
  --aus: #8d8b93;   --aus-hell: #efeeec;
  --radius: 14px;
  --radius-klein: 9px;
  --schatten: 0 1px 2px rgba(29, 31, 36, .04), 0 6px 24px -12px rgba(29, 31, 36, .14);
  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --anzeige: "Newsreader", Georgia, serif;
}

/* Ausgeblendet bleibt ausgeblendet, auch wenn eine Klasse eine Anzeige setzt (etwa .feld-reihe als Raster) */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--tinte); font: 14.5px/1.55 var(--schrift); font-feature-settings: "cv11", "ss01"; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-family: var(--anzeige); font-weight: 500; font-size: 30px; letter-spacing: -.015em; }
h2 { font-size: 15.5px; }
h3 { font-size: 14px; }
p { margin: 0 0 .6em; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic.gross { width: 22px; height: 22px; }
.gedaempft { color: var(--gedaempft); }
.leise { color: var(--leise); }
.klein { font-size: 12.5px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.zahl { font-variant-numeric: tabular-nums; }
.versteckt { display: none !important; }

/* Rahmen: Leiste links, Inhalt rechts */
.rahmen { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--flaeche-2) 0 235px, var(--linie) 235px 236px, transparent 236px); }
.leiste { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px; }
.marke-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 2px 8px; }
.marke-logo img { width: 30px; height: 30px; }
.marke-logo span { font-family: var(--anzeige); font-size: 23px; font-weight: 500; letter-spacing: -.01em; }
.leiste nav { display: flex; flex-direction: column; gap: 2px; }
.leiste nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--tinte-2); font-weight: 500; }
.leiste nav a:hover { background: #f0ece4; }
.leiste nav a.ist-aktiv { background: var(--flaeche); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie); }
.leiste nav a.ist-aktiv .ic { color: var(--akzent); }
.leiste-fuss { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px 0; border-top: 1px solid var(--linie); font-size: 13px; }
.leiste-fuss a { text-decoration: none; color: var(--tinte-2); display: flex; gap: 8px; align-items: center; }
.leiste-fuss form { margin: 0; }
.version { color: var(--leise); font-size: 12px; }

.inhalt { padding: 34px 44px 70px; max-width: 1180px; width: 100%; }
.seite-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.seite-kopf p { margin: 6px 0 0; color: var(--gedaempft); max-width: 640px; }
.seite-kopf .aktionen { display: flex; gap: 10px; flex-wrap: wrap; }

/* Karten und Raster */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px 22px; }
.karte + .karte { margin-top: 18px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.karte-kopf h2 { display: flex; align-items: center; gap: 9px; }
.karte-kopf h2 .ic { color: var(--akzent); }
.karte.ruhig { box-shadow: none; background: var(--flaeche-2); }
.raster-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.raster-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.raster-2 > .karte + .karte, .raster-3 > .karte + .karte { margin-top: 0; }
.spalte-breit { grid-column: span 2; }
.abstand { margin-top: 18px; }

/* Kennzahlen */
.kennzahl { display: flex; flex-direction: column; gap: 4px; }
.kennzahl b { font-family: var(--anzeige); font-weight: 500; font-size: 32px; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kennzahl span { color: var(--gedaempft); font-size: 13px; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--knopf); background: var(--knopf); color: #fff; font: 500 14px var(--schrift); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.knopf:hover { background: var(--knopf-hover); }
.knopf:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .schalter input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf.zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie-stark); }
.knopf.zweit:hover { background: #f5f2ec; }
.knopf.gefahr { background: var(--flaeche); color: var(--fehler); border-color: #e7c2bd; }
.knopf.gefahr:hover { background: var(--fehler-hell); }
.knopf.klein { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
.knopf-text { background: none; border: 0; padding: 0; font: inherit; color: var(--tinte-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Formulare */
.formular { display: flex; flex-direction: column; gap: 16px; }
.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > label, .feld-titel { font-weight: 550; font-size: 13.5px; color: var(--tinte-2); }
.feld-hilfe { color: var(--gedaempft); font-size: 12.5px; }
.feld-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=tel], input[type=datetime-local], input[type=date], input[type=time], select, textarea {
  width: 100%; height: 39px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 9px; background: var(--flaeche); color: var(--tinte); font: 14px var(--schrift); }
textarea { height: auto; min-height: 92px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6c72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
input::placeholder, textarea::placeholder { color: var(--leise); }
.schalter { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; color: var(--tinte-2); }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter > input + span { position: relative; width: 38px; height: 22px; border-radius: 22px; background: #d9d4ca; transition: background .2s; flex: none; }
.schalter > input + span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.schalter input:checked + span { background: var(--gut); }
.schalter input:checked + span::after { transform: translateX(16px); }
.formular-fuss { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-weight: 550; font-size: 12.5px; color: var(--gedaempft); padding: 0 12px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 12px; border-bottom: 1px solid #f0ece4; vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td:first-child, .tabelle th:first-child { padding-left: 0; }
.tabelle td:last-child, .tabelle th:last-child { padding-right: 0; }
.tabelle a { text-decoration: none; font-weight: 550; }
.tabelle a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tabelle .rechts { text-align: right; }
.tabelle tr.ist-aus td { color: var(--leise); }

/* Marken und Hinweise */
.marke { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 20px; font-size: 12.5px; font-weight: 550; background: var(--aus-hell); color: var(--aus); white-space: nowrap; }
.marke::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.marke.ohne-punkt::before { display: none; }
.marke.gut { background: var(--gut-hell); color: var(--gut); }
.marke.warn { background: var(--warn-hell); color: var(--warn); }
.marke.fehler { background: var(--fehler-hell); color: var(--fehler); }
.marke.info { background: var(--info-hell); color: var(--info); }
.marke.aus { background: var(--aus-hell); color: var(--aus); }
.hinweis { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 11px; background: var(--info-hell); color: #2d4466; font-size: 13.5px; }
.hinweis .ic { margin-top: 1px; }
.hinweis.warn { background: var(--warn-hell); color: #6e4a12; }
.hinweis.ruhig { background: var(--flaeche-2); color: var(--tinte-2); border: 1px dashed var(--linie-stark); }
.leer { padding: 26px 10px; text-align: center; color: var(--gedaempft); }
.leer .ic { width: 26px; height: 26px; color: var(--leise); display: block; margin: 0 auto 8px; }

.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 11px; margin-bottom: 20px; font-weight: 500; animation: rein .3s ease-out; }
.toast.gut { background: var(--gut-hell); color: #1e5a40; }
.toast.fehler { background: var(--fehler-hell); color: #7c2a24; }
@keyframes rein { from { opacity: 0; transform: translateY(-4px); } }

/* Liste mit Symbol (Übersicht) */
.zeilen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zeilen li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f1ede6; }
.zeilen li:last-child { border-bottom: 0; }
.zeilen .zeit { min-width: 50px; font-variant-numeric: tabular-nums; color: var(--gedaempft); font-weight: 550; }
.zeilen .rest { min-width: 0; flex: 1; }
.zeilen .titel { font-weight: 550; }

/* Persona */
.persona-kopf { display: flex; gap: 22px; align-items: center; }
.portrait { width: 112px; height: 112px; border-radius: 26px; object-fit: cover; background: #ece7de; flex: none; box-shadow: 0 8px 26px -14px rgba(29,31,36,.5); }
.portrait.klein { width: 64px; height: 64px; border-radius: 16px; }
.portrait-leer { display: grid; place-items: center; color: var(--leise); }
.persona-name { font-family: var(--anzeige); font-size: 34px; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; }
.gesichter { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.gesicht-wahl { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 8px; border: 1px solid var(--linie); border-radius: 14px; cursor: pointer; background: var(--flaeche); text-align: center; font-weight: 550; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.gesicht-wahl input { position: absolute; opacity: 0; }
.gesicht-wahl img, .gesicht-wahl .ohne { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: #efebe3; display: grid; place-items: center; color: var(--leise); }
.gesicht-wahl:has(input:checked) { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell); }
.stimm-reihe { display: flex; gap: 10px; align-items: center; }
.stimm-reihe select { flex: 1; }
.vorschau-text { white-space: pre-wrap; font-size: 13px; line-height: 1.55; color: var(--tinte-2); background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 11px; padding: 14px 16px; max-height: 360px; overflow: auto; }
details > summary { cursor: pointer; font-weight: 550; color: var(--tinte-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; color: var(--leise); }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > summary { margin-bottom: 12px; }

/* Plugins */
.plugin-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.plugin-karte { display: flex; flex-direction: column; gap: 12px; }
.plugin-karte .kopf { display: flex; gap: 12px; align-items: flex-start; }
.plugin-symbol { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--akzent-hell); color: var(--akzent); flex: none; }
.plugin-karte .fuss { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid #f1ede6; }

/* Gespräch */
.mitschrift { display: flex; flex-direction: column; gap: 12px; }
.beitrag { display: grid; grid-template-columns: 54px 1fr; gap: 12px; }
.beitrag .wer { font-size: 12px; color: var(--leise); font-variant-numeric: tabular-nums; padding-top: 10px; }
.beitrag .blase { padding: 10px 14px; border-radius: 14px; background: var(--flaeche-2); border: 1px solid var(--linie); max-width: 720px; }
.beitrag.ist-persona .blase { background: #f7f1e6; border-color: #eadcc2; }
.beitrag .name { display: block; font-size: 12px; font-weight: 600; color: var(--gedaempft); margin-bottom: 2px; }
.werkzeug-zeile { font-size: 13px; color: var(--gedaempft); display: flex; gap: 8px; align-items: center; padding: 4px 0 4px 66px; }

/* Geräte */
.code-anzeige { display: flex; flex-direction: column; gap: 14px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 28px; letter-spacing: .12em; font-weight: 600; }
.befehl { display: flex; gap: 10px; align-items: stretch; }
.befehl code { flex: 1; display: block; padding: 12px 14px; border-radius: 10px; background: #1b1e25; color: #f1e9da; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.schritte { margin: 0; padding-left: 20px; color: var(--tinte-2); }
.schritte li { margin: 4px 0; }

/* Anmeldung */
.anmelde-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, #efe5d3 0, transparent 60%), var(--papier); }
.anmelde-karte { width: 100%; max-width: 380px; }
.anmelde-karte .marke-logo { justify-content: center; margin-bottom: 22px; }
.anmelde-karte .marke-logo img { width: 40px; height: 40px; }
.anmelde-karte .marke-logo span { font-size: 30px; }

@media (max-width: 1100px) { .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; background: none; }
  .leiste { background: var(--flaeche-2); border-bottom: 1px solid var(--linie); }
  .leiste { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .leiste nav { flex-direction: row; flex-wrap: wrap; }
  .leiste-fuss { display: none; }
  .inhalt { padding: 24px 18px 60px; }
  .raster-2, .raster-3 { grid-template-columns: 1fr; }
  .spalte-breit { grid-column: auto; }
}

/* Gedächtnis */
.gd-raster { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.gd-haupt, .gd-seite { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.gd-haupt > .karte + .karte, .gd-seite > .karte + .karte { margin-top: 0; }
.gd-filter { display: flex; flex-direction: column; gap: 14px; }
.gd-filter-reihe { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.gd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gd-chips a { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 20px; text-decoration: none;
  font-size: 13px; font-weight: 550; color: var(--gedaempft); border: 1px solid var(--linie-stark); background: var(--flaeche); }
.gd-chips a i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--art); }
.gd-chips a.ist-an { color: var(--tinte); border-color: var(--art, var(--knopf)); box-shadow: inset 0 0 0 1px var(--art, var(--knopf)); }
.gd-chips a.ist-an i { background: var(--art); }
.art-person { --art: var(--info); }
.art-vorliebe { --art: var(--gut); }
.art-projekt { --art: var(--warn); }
.art-verweis { --art: var(--aus); }
.art-rueckmeldung { --art: var(--akzent); }
.marke.art-person { background: var(--info-hell); color: var(--info); }
.marke.art-vorliebe { background: var(--gut-hell); color: var(--gut); }
.marke.art-projekt { background: var(--warn-hell); color: var(--warn); }
.marke.art-verweis { background: var(--aus-hell); color: var(--aus); }
.marke.art-rueckmeldung { background: var(--akzent-hell); color: var(--akzent); }
.gd-notiz { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-bottom: 1px solid #f1ede6; }
.gd-notiz:last-child { border-bottom: 0; padding-bottom: 2px; }
.gd-notiz.ist-gewaehlt { box-shadow: inset 3px 0 0 var(--akzent); padding-left: 12px; margin-left: -12px; }
.karte-kopf + .gd-notiz, .gd-abschnitt + .gd-notiz { padding-top: 4px; }
.gd-notiz-kopf { display: flex; align-items: center; gap: 10px; }
.gd-notiz-kopf h3 { flex: 1; min-width: 0; font-size: 15px; }
.gd-nadel { color: var(--akzent); }
.gd-beschreibung { margin: 0; color: var(--tinte-2); }
.gd-inhalt > summary { font-size: 13px; color: var(--gedaempft); }
.gd-inhalt[open] > summary { margin-bottom: 6px; }
.gd-inhalt p { margin: 0; white-space: pre-wrap; font-size: 13.5px; color: var(--tinte-2); background: var(--flaeche-2);
  border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; }
.gd-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--gedaempft); }
.gd-meta span, .gd-meta a { display: inline-flex; align-items: center; gap: 5px; }
.gd-meta a { color: var(--tinte-2); text-underline-offset: 3px; }
.gd-meta .ic { width: 14px; height: 14px; vertical-align: 0; }
.gd-abschnitt { font-size: 12.5px; font-weight: 600; color: var(--gedaempft); margin: 10px 0 2px; }
.gd-abschnitt:first-of-type { margin-top: 0; }
.gd-zeichen { color: var(--leise); margin-top: 2px; }
.gd-ausschnitt { color: var(--tinte-2); font-size: 13.5px; margin-top: 2px; }
.gd-text { margin-top: -4px; }
.gd-vorschau { max-height: 300px; }
.gd-einstellungen { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f1ede6; gap: 12px; }
.gd-stand { display: flex; gap: 32px; margin: 18px 0 12px; padding-top: 16px; border-top: 1px solid #f1ede6; }
.gd-stand .kennzahl b { font-size: 26px; }
.gd-auswerten { margin-top: 12px; }
.beitrag.ist-entfernt .blase { background: none; border-style: dashed; color: var(--leise); font-style: italic; }
.gd-gemerkt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gd-gemerkt li { display: flex; gap: 10px; align-items: flex-start; }
.gd-gemerkt a { font-weight: 550; text-decoration: none; }
.gd-gemerkt a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1100px) { .gd-raster { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .gd-filter-reihe { grid-template-columns: 1fr; } }
