@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter-Italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("/assets/fonts/roboto-mono-latin-400-normal.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("/assets/fonts/roboto-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("/assets/fonts/roboto-mono-latin-400-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --schrift: Inter;
  --schrift-mono: "Roboto Mono";
  --schrift-12: 12px;
  --schrift-14: 14px;
  --schrift-16: 16px;
  --schrift-20: 20px;
  --schrift-24: 24px;
  --raster: 4px;
  --radius-knopf: calc(2 * var(--raster));
  --radius-eingabe: calc(3 * var(--raster));
  --radius-karte: calc(4 * var(--raster));
  --radius-bild: 0;
  --radius-rund: 50%;
  --lupe-groesse: 152px;
  --weiss: #FFFFFF;
  --schwarz: #000000;
  --buehne: #0B0B0B;
  --maske-hellblau: #3DA5FF;
  --bild-auswahl: var(--maske-hellblau);
  --maske-deckkraft: .45;
  --hintergrund: #FFFFFF;
  --panel: #F7F7F6;
  --feld: #EFEFED;
  --aktiv: #E2E2DF;
  --rahmen: #CFCFCB;
  --platzhalter: var(--sekundaertext);
  --wartefortschritt: #55554F;
  --sekundaertext: var(--wartefortschritt);
  --haupttext: #1F1F1D;
  --hintergrund-dunkel: #121212;
  --panel-dunkel: #1C1C1B;
  --feld-dunkel: #262624;
  --aktiv-dunkel: #3A3A37;
  --haupttext-dunkel: #EDEDEA;
  --sekundaertext-dunkel: #A8A8A3;

  --guide-gruen-hell: #1F6B3B;
  --guide-gruen-flaeche-hell: #E8F5EC;
  --guide-gruen-rahmen-hell: #BFE3C9;
  --guide-gruen-dunkel: #9FD8B2;
  --guide-gruen-flaeche-dunkel: #13291C;
  --guide-gruen-rahmen-dunkel: #24533A;
  --guide-orange-hell: #8A4A0C;
  --guide-orange-flaeche-hell: #FDF1E3;
  --guide-orange-rahmen-hell: #F4D3AA;
  --guide-orange-dunkel: #F2C48D;
  --guide-orange-flaeche-dunkel: #2E2213;
  --guide-orange-rahmen-dunkel: #5E4320;
  --guide-rot-hell: #9A2A24;
  --guide-rot-flaeche-hell: #FCEAEA;
  --guide-rot-rahmen-hell: #F2C2C0;
  --guide-rot-dunkel: #F3AAA5;
  --guide-rot-flaeche-dunkel: #331718;
  --guide-rot-rahmen-dunkel: #6A2A2A;

  --guide-gruen: var(--guide-gruen-hell);
  --guide-gruen-text: var(--guide-gruen-hell);
  --guide-gruen-flaeche: var(--guide-gruen-flaeche-hell);
  --guide-gruen-rahmen: var(--guide-gruen-rahmen-hell);
  --guide-orange: var(--guide-orange-hell);
  --guide-orange-flaeche: var(--guide-orange-flaeche-hell);
  --guide-orange-rahmen: var(--guide-orange-rahmen-hell);
  --guide-rot: var(--guide-rot-hell);
  --guide-rot-flaeche: var(--guide-rot-flaeche-hell);
  --guide-rot-rahmen: var(--guide-rot-rahmen-hell);
  --primaer: var(--guide-gruen);
  --primaer-text: var(--weiss);
  --focus: var(--sekundaertext);
  --schatten: 0 12px 36px color-mix(in srgb, var(--schwarz) 14%, transparent);
}

:root.dark {
  color-scheme: dark;
  --hintergrund: var(--hintergrund-dunkel);
  --panel: var(--panel-dunkel);
  --feld: var(--feld-dunkel);
  --aktiv: var(--aktiv-dunkel);
  --rahmen: var(--aktiv-dunkel);
  --platzhalter: var(--sekundaertext-dunkel);
  --sekundaertext: var(--sekundaertext-dunkel);
  --haupttext: var(--haupttext-dunkel);
  --guide-gruen: var(--guide-gruen-rahmen-dunkel);
  --guide-gruen-text: var(--guide-gruen-dunkel);
  --guide-gruen-flaeche: var(--guide-gruen-flaeche-dunkel);
  --guide-gruen-rahmen: var(--guide-gruen-rahmen-dunkel);
  --guide-orange: var(--guide-orange-dunkel);
  --guide-orange-flaeche: var(--guide-orange-flaeche-dunkel);
  --guide-orange-rahmen: var(--guide-orange-rahmen-dunkel);
  --guide-rot: var(--guide-rot-dunkel);
  --guide-rot-flaeche: var(--guide-rot-flaeche-dunkel);
  --guide-rot-rahmen: var(--guide-rot-rahmen-dunkel);
}

/* LibreChat erwartet RGB-Kanäle, damit die Oberfläche Deckkraft ergänzen kann. */
html.ost-ui:root {
  --hintergrund-rgb: 255 255 255;
  --panel-rgb: 247 247 246;
  --feld-rgb: 239 239 237;
  --aktiv-rgb: 226 226 223;
  --haupttext-rgb: 31 31 29;
  --sekundaertext-rgb: 85 85 79;
  --platzhalter-rgb: 85 85 79;
  --rahmen-rgb: 207 207 203;
  --guide-rot-rgb: 154 42 36;
  --guide-rot-flaeche-rgb: 252 234 234;
  --guide-orange-rgb: 138 74 12;
  --surface-primary: var(--hintergrund-rgb);
  --surface-primary-alt: var(--hintergrund-rgb);
  --surface-primary-contrast: var(--hintergrund-rgb);
  --surface-chat: var(--hintergrund-rgb);
  --surface-dialog: var(--hintergrund-rgb);
  --surface-qr: var(--hintergrund-rgb);
  --surface-secondary: var(--panel-rgb);
  --surface-secondary-alt: var(--panel-rgb);
  --surface-fixed: var(--panel-rgb);
  --surface-overlay: var(--panel-rgb);
  --surface-code: var(--panel-rgb);
  --surface-tertiary: var(--feld-rgb);
  --surface-tertiary-alt: var(--feld-rgb);
  --surface-hover: var(--feld-rgb);
  --surface-hover-alt: var(--feld-rgb);
  --surface-fixed-hover: var(--feld-rgb);
  --surface-composer-hover: var(--feld-rgb);
  --surface-submit: var(--feld-rgb);
  --surface-submit-hover: var(--feld-rgb);
  --surface-active: var(--aktiv-rgb);
  --surface-active-alt: var(--aktiv-rgb);
  --surface-inverted: var(--haupttext-rgb);
  --surface-inverted-hover: var(--haupttext-rgb);
  --text-primary: var(--haupttext-rgb);
  --text-fixed: var(--haupttext-rgb);
  --text-inverted: var(--hintergrund-rgb);
  --text-on-status: var(--hintergrund-rgb);
  --text-secondary: var(--sekundaertext-rgb);
  --text-secondary-alt: var(--sekundaertext-rgb);
  --text-muted: var(--sekundaertext-rgb);
  --accent-primary: var(--sekundaertext-rgb);
  --accent-primary-hover: var(--sekundaertext-rgb);
  --text-tertiary: var(--platzhalter-rgb);
  --border-light: var(--rahmen-rgb);
  --border-medium: var(--rahmen-rgb);
  --border-medium-alt: var(--rahmen-rgb);
  --border-heavy: var(--rahmen-rgb);
  --border-xheavy: var(--rahmen-rgb);
  --text-destructive: var(--guide-rot-rgb);
  --border-destructive: var(--guide-rot-rgb);
  --surface-destructive: var(--guide-rot-flaeche-rgb);
  --surface-destructive-hover: var(--guide-rot-flaeche-rgb);
  --text-warning: var(--guide-orange-rgb);
  --status-warning: var(--guide-orange-rgb);
  --status-warning-border: var(--guide-orange-rgb);
  --status-warning-strong: var(--guide-orange-rgb);
  --status-warning-subtle: var(--guide-orange-flaeche-rgb);
  --status-neutral: var(--sekundaertext-rgb);
  --status-neutral-subtle: var(--feld-rgb);
  --status-neutral-border: var(--rahmen-rgb);
  --gray-800: var(--aktiv-rgb);
  --guide-orange-flaeche-rgb: 253 241 227;
}
html.ost-ui:root.dark {
  --hintergrund-rgb: 18 18 18;
  --panel-rgb: 28 28 27;
  --feld-rgb: 38 38 36;
  --aktiv-rgb: 58 58 55;
  --haupttext-rgb: 237 237 234;
  --sekundaertext-rgb: 168 168 163;
  --platzhalter-rgb: 168 168 163;
  --rahmen-rgb: 58 58 55;
  --guide-rot-rgb: 243 170 165;
  --guide-rot-flaeche-rgb: 51 23 24;
  --guide-orange-rgb: 242 196 141;
  --guide-orange-flaeche-rgb: 46 34 19;
}

/* C-186/C-188/C-194: Bestätigungen in den vorhandenen Studiofarben. */
@layer ost-dialogknopfe {
  html.ost-ui {
    --dialog-hauptfarbe: var(--schwarz);
    --dialog-haupttext: var(--weiss);
  }

  html.ost-ui.dark {
    --dialog-hauptfarbe: var(--weiss);
    --dialog-haupttext: var(--schwarz);
  }

  html.ost-ui :is(
    [role="dialog"] button.bg-surface-submit,
    [role="alertdialog"] button.bg-surface-submit,
    [data-testid="convo-item"] [role="form"] button:has(> svg.lucide-check)
  ):not(:disabled, [aria-disabled="true"]) {
    background-color: var(--dialog-hauptfarbe) !important;
    border-color: var(--dialog-hauptfarbe) !important;
    color: var(--dialog-haupttext) !important;
    opacity: 1 !important;
  }

  html.ost-ui :is(
    [role="dialog"] button.bg-surface-destructive,
    [role="alertdialog"] button.bg-surface-destructive,
    form:has(#prompt-textarea) button:is([aria-label="Datei entfernen"], [aria-label="Remove file"])
  ):not(:disabled, [aria-disabled="true"]):where(:not([data-ost-dialogflaeche="loeschen"] button, [data-ost-settings-dialog] button:is([aria-labelledby="delete-cache-label"], [aria-labelledby="clear-all-chats-label"], [aria-labelledby="delete-account-label"], [aria-labelledby="revoke-info-label"]))) {
    background-color: var(--guide-rot) !important;
    border-color: var(--guide-rot) !important;
    color: var(--hintergrund) !important;
    opacity: 1 !important;
  }
}

/* D-318 · Werkzeugfenster des eingebetteten Bildeditors */
html.emb #embdock {
  --haupttext: #1f1f1d;
  --sekundaertext: #55554f;
  --platzhalter: #55554f;
  --rahmen: #d6d5d2;
  --panel: #fff;
  --feld: #fff;
  background: #fff !important;
  color: var(--haupttext);
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .14) !important;
  font-family: var(--schrift);
}
html.emb #embdock :is(.controls, #embzoom) {
  border: 0;
  border-radius: 0;
  background: transparent !important;
}
html.emb #embdock :is(.ost-editor-modi, #mask-controls, #embact, #embzoom) button:not(.ost-mic) {
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--haupttext);
  text-decoration: none;
}
html.emb #embdock :is(.ost-editor-modi, #mask-controls, #embact, #embzoom) button:is(:hover, :focus-visible, [aria-pressed="true"]):not(.ost-mic) {
  text-decoration: underline;
  text-underline-offset: .2em;
}
html.emb #embdock :is(#generate, button[aria-pressed="true"]) {
  font-weight: 600;
}
html.emb #embdock #generate {
  text-align: right;
}
html.emb #embdock button#clear {
  color: #b3261e !important;
  font-weight: 600;
}
html.emb #embdock #prompt {
  background: #fff !important;
  border: 1px solid #d6d5d2 !important;
  color: var(--haupttext);
}
html.emb #embdock #embhd h1 {
  font-size: var(--schrift-16);
  font-weight: 600;
}

/* D-320 · Werkzeugdock des Bildeditors im Dunkelmodus */
html.emb.dark #embdock {
  --haupttext: var(--haupttext-dunkel);
  --sekundaertext: var(--sekundaertext-dunkel);
  --panel: var(--panel-dunkel);
  background: var(--panel) !important;
}
html.emb.dark #embdock button#clear {
  color: var(--guide-rot-dunkel) !important;
}
html.emb.dark #embdock #prompt {
  color: #1f1f1d;
}
