/* ===========================================================================
   projekt.css – nur das, was es allein im Uebersetzer-Dienst gibt.
   Wird zuletzt geladen. Karten, Knoepfe, Felder, Meldungen, Tabellen kommen
   aus dem Design-Baukasten (basis.css, elemente.css, menues.css).

   Regel: keine festen Farbwerte, nur Variablen der Farbwelt. So stimmt die
   Seite auch im Dunkel-Modus und mit einer im Admin gewaehlten Akzentfarbe.
   ========================================================================= */

/* --- Schrift: Manrope, selbst gehostet (OFL, siehe DRITTANBIETER.md) ------ */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../fonts/manrope-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+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
:root, html.dark { --schrift: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; --schrift-titel: var(--schrift); }

/* --- Kleine Helfer -------------------------------------------------------- */
.klein  { font-size: .85rem; }
.rechts { text-align: right; }
.zwei   { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--luft); }
.sprung { position: absolute; left: -999rem; }
.sprung:focus { left: 8px; top: 8px; z-index: 200; background: var(--flaeche); color: var(--text); padding: 10px 14px; border-radius: var(--radius); }
[hidden] { display: none !important; }

/* --- Kopfzeile: Marke, Navigation, Werkzeuge ------------------------------ */
.gespraech__kopf { gap: 4px; background: var(--hg); }
.gespraech__marke { gap: 9px; }
.gespraech__marke img { max-height: 32px; width: auto; display: block; }
.kopf__zeichen { width: 30px; height: 30px; border-radius: 9px; background: var(--akzent); color: var(--akzent-text); display: grid; place-items: center; flex: none; }
.kopf__zeichen svg { width: 17px; height: 17px; }
.gespraech__kopf nav form { margin: 0; display: contents; }
.gespraech__kopf nav button {
  font: inherit; font-size: .9rem; color: var(--schwach); background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius);
}
.gespraech__kopf nav button:hover { background: var(--flaeche2); color: var(--text); }
.kopf__guthaben { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 10px; border-radius: var(--radius); color: var(--schwach); text-decoration: none; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kopf__guthaben b { color: var(--text); }
.kopf__guthaben:hover { background: var(--flaeche2); }
.kopf__knopf { width: 44px; height: 44px; display: grid; place-items: center; flex: none; background: none; border: 0; border-radius: var(--radius); color: var(--schwach); cursor: pointer; }
.kopf__knopf:hover { color: var(--text); background: var(--flaeche2); }
.kopf__knopf svg { width: 19px; height: 19px; }
.sym-sonne { display: none; }
html.dark .sym-sonne { display: block; }
html.dark .sym-mond  { display: none; }
.kopf__sprachen { display: inline-flex; border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; flex: none; }
.kopf__sprachen a { color: var(--schwach); text-decoration: none; font-size: .76rem; font-weight: 700; min-width: 38px; min-height: 40px; display: grid; place-items: center; padding: 0 7px; }
.kopf__sprachen a[aria-current="true"] { background: var(--flaeche2); color: var(--text); }

/* --- Spalte: gewoehnliche Seiten ohne Eingabefeld ------------------------- */
.spalte--seite { gap: 0; }
.spalte--breit { max-width: 1040px; }
.seite { flex: 1; min-width: 0; }
.seite__kopf { margin: 4px 0 22px; }
.seite__kopf h1 { font-size: 1.7rem; font-weight: 650; letter-spacing: -.02em; margin: 0 0 6px; }
.seite__kopf p { color: var(--schwach); margin: 0; }
.seite__aktion { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.seite__kopf--gross { margin: 34px 0 44px; max-width: 760px; }
.seite__kopf--gross h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin-bottom: 14px; }
.seite__kopf--gross p { font-size: 1.1rem; line-height: 1.55; }
.seite h2 { text-transform: none; letter-spacing: -.01em; font-size: 1.15rem; color: var(--text); font-weight: 700; }
.schmal { max-width: 460px; margin: 0 auto; }
.form-fuss { text-align: center; margin: var(--luft) 0 0; font-size: .92rem; }
.lesespalte { max-width: 760px; margin: 0 auto; line-height: 1.7; overflow-wrap: anywhere; }
.lesespalte h2 { margin-top: 1.6em; }
.lesespalte img { border-radius: var(--radius); }

/* --- Fuss ----------------------------------------------------------------- */
.fuss { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; align-items: center;
  margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rand-fein); color: var(--schwach); font-size: .85rem; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.fuss a { color: var(--schwach); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.fuss a:hover { color: var(--text); text-decoration: underline; }
.fussnote__links a { color: inherit; display: inline-block; padding: 13px 6px; margin: -13px 0 -13px 4px; }  /* grosse Trefferflaeche, ohne die Zeile hoeher zu machen */

/* --- Leiste unten (Telefon) ----------------------------------------------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Uebersetzer und Chat: Verlauf ---------------------------------------- */
.gespraech { overflow: hidden; }            /* nur der Verlauf scrollt, nie das Dokument */
.gespraech__verlauf { position: relative; }  /* Bezug fuer offsetTop beim Scrollen zur Antwort */
.eingabe__status { max-width: var(--gespraech-breite); margin: 0 auto 6px; padding: 0 6px; font-size: .88rem; }
.eingabe__status:empty { display: none; }
.gespraech__start .start-schritte { max-width: 34rem; margin: 0 auto 22px; color: var(--schwach); }
.start-zusatz { margin: 18px 0 0 !important; }

/* --- Uebersetzer und Chat: Eingabe mit Werkzeugzeile ----------------------- */
.eingabe--werkzeug { flex-direction: column; align-items: stretch; padding: 8px 8px 8px 12px; gap: 2px; }
.eingabe__werkzeug { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 2px 0 6px; border-bottom: 1px solid var(--rand-fein); margin-bottom: 2px; }
.eingabe__werkzeug .chip { min-height: 38px; font-size: .86rem; }
.eingabe__werkzeug select { width: auto; max-width: 100%; min-height: 38px; padding: 0 30px 0 12px; border-radius: 999px; background-color: var(--flaeche2); }
.eingabe__werkzeug .schub { flex: 1; }
.eingabe__werkzeug .pfeil { color: var(--schwach); }
.eingabe__gruppe { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eingabe__zeile { display: flex; align-items: flex-end; gap: 6px; }
.eingabe__zaehler { font-size: .76rem; color: var(--schwach); font-variant-numeric: tabular-nums; padding-bottom: 12px; white-space: nowrap; }
.beitrag--frage small { display: block; font-size: .7rem; opacity: .85; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.beitrag--frage, .beitrag--antwort .beitrag__text { white-space: pre-wrap; }
.beitrag--frage.ist-lang .beitrag__text { display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.beitrag__mehr { font: inherit; font-size: .82rem; color: inherit; background: none; border: 0; padding: 8px 0 0; min-height: 36px; cursor: pointer; text-decoration: underline; }
.beitrag__meta { font-size: .78rem; color: var(--schwach); margin: 8px 0 0; }
.beitrag--fehler { color: var(--fehler); font-weight: 600; }
.gespraech__hinweise { display: flex; flex-direction: column; gap: 8px; }
.gespraech__hinweise .hinweis { margin: 0; }
.gratis-zeile { color: var(--erfolg); font-size: .88rem; margin: 0; }
.start-schritte { margin: 0 0 8px; padding-left: 1.3rem; line-height: 1.7; text-align: left; }
.status { color: var(--schwach); font-size: .92rem; }
.status.err { color: var(--fehler); font-weight: 600; }
.chat-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chat-kopfzeile form { margin: 0; }

/* --- Konto ---------------------------------------------------------------- */
.konto-schmal { max-width: 560px; }
.konto-gefahr { border-color: var(--fehler); }
.konto-zahlen { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.konto-blaettern { align-items: center; margin: 12px 0; }
.konto .liste { margin-bottom: 12px; }
.liste .plus  { color: var(--erfolg); font-weight: 650; }
.liste .minus { color: var(--schwach); }
.waehrung-wahl { display: inline-flex; border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.waehrung { font: inherit; font-size: .88rem; cursor: pointer; padding: 9px 16px; min-height: 44px; background: var(--flaeche); color: var(--text); border: 0; border-right: 1px solid var(--rand); }
.waehrung:last-child { border-right: 0; }
.waehrung.aktiv { background: var(--akzent); color: var(--akzent-text); font-weight: 650; }
.pakete { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.paket { font: inherit; cursor: pointer; text-align: left; padding: 14px; min-height: 76px; background: var(--flaeche); color: var(--text); border: 1.5px solid var(--rand); border-radius: var(--radius); display: flex; flex-direction: column; gap: 3px; }
.paket:hover { border-color: var(--akzent); }
.p-credits { font-weight: 700; }
.p-preis { color: var(--schwach); font-size: .88rem; font-variant-numeric: tabular-nums; }

/* --- Verlauf -------------------------------------------------------------- */
.hist-leiste { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: var(--luft) 0; }
.hist-suche { display: flex; gap: 8px; flex: 1 1 280px; max-width: 520px; }
.hist-suche input { flex: 1; min-width: 0; }
.hist-aktionen { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hist-aktionen form { margin: 0; }
.hist-kopf { margin-bottom: 10px; }
.hist-paar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--luft); }
.hist-spalte { min-width: 0; }
.hist-marke { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--schwach); }
.hist-text { margin: 3px 0 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.hist-eintrag .knopfreihe form { margin: 0; }

/* --- Glossar -------------------------------------------------------------- */
.glossar { max-width: 860px; margin: 0 auto; }
.glossar .liste { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.glossar .knopfreihe form { margin: 0; }

/* --- Startseite ----------------------------------------------------------- */
.start-uz { margin-bottom: 18px; }
.start-abschnitt { margin: 0 0 44px; }
.start-abschnitt > h2 { font-size: 1.5rem; margin-bottom: 18px; }
.start-abschnitt--schmal { max-width: 760px; }
.start-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--luft); }
.start-raster .karte { margin: 0; }
.start-bild { display: block; width: 100%; border-radius: var(--radius); margin-bottom: 12px; }
.start-schritte-gross { list-style: none; margin: 0; padding: 0; counter-reset: schritt; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--luft); }
.start-schritte-gross li { counter-increment: schritt; padding-top: 12px; border-top: 3px solid var(--akzent); }
.start-schritte-gross li::before { content: counter(schritt); display: block; font-size: 2rem; font-weight: 800; color: var(--akzent); line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.start-schluss { text-align: center; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-gross); padding: 38px var(--luft); }

/* --- Telefon -------------------------------------------------------------- */
@media (max-width: 640px) {
  .gespraech { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .gespraech__marke { margin-right: auto; }
  .kopf__name { max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hist-paar, .zwei { grid-template-columns: 1fr; }
  .seite__kopf h1 { font-size: 1.45rem; }
  .seite__kopf--gross { margin: 14px 0 30px; }
  /* Werkzeugzeile: Arbeitsweisen in einer Zeile zum Wischen, Sprachen nebeneinander. */
  .eingabe__werkzeug #modi { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .eingabe__werkzeug #modi .chip { flex: none; }
  .eingabe__werkzeug .schub { display: none; }
  .eingabe__werkzeug .opt-uebersetzen { flex-wrap: nowrap; width: 100%; }
  .eingabe__werkzeug .opt-uebersetzen select { flex: 1 1 0; }
  .eingabe__werkzeug select { flex: 1 1 40%; min-width: 0; padding-left: 11px; padding-right: 24px; background-position: right 7px center; text-overflow: ellipsis; }
  .eingabe__zaehler { display: none; }
}

/* --- Textlinks in Hinweisen und unter Formularen: grosse Trefferflaeche ---- */
.hinweis a, .form-fuss a { display: inline-block; padding: 11px 3px; margin: -11px 0; }
.hist-zustand { margin: 8px 0 0; }
