/* ── tool.css — Charakter „Einheitenumrechner“ ─────────────────────────────────────────────────────────
   WAS:   Akzentfarben (Rose = Eingabe-Seite · Himmelblau = Ziel-Seite · Gelb = Hinweise), Raster der Tafeln,
          Kategorie-Chips, Auswahlfelder, das Hauptbild in drei Formen: Maßstab (zwei Skalen gegeneinander),
          Thermometer (zwei Skalen links/rechts) und Kurve (nichtlineare Zusammenhänge).
   WARUM: Das Tool lebt vom Bild „dieselbe Größe auf zwei Maßstäben“. Die Farben tragen Bedeutung:
          --a1 = Ausgangseinheit (oben bzw. links), --a2 = Zieleinheit (unten bzw. rechts).
   WIE ÄNDERN: Farben nur über --a1/--a2/--a3 unten; Grundbausteine stehen in ../_werk/werk.css (gemeinsam für alle Tools).
   VORSCHLAG FÜR _werk: ein gestyltes <select> (hier .uc-select) und Kategorie-Chips in Gruppen wären auch für andere Tools nützlich. */
:root { --a1: #ff6b8a; --a2: #4cc2ff; --a3: #ffd84d; --a1-tinte: #2a0c14; }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) { --a1: #d6335c; --a2: #0b84c7; --a3: #b78a00; } }
:root[data-thema="hell"] { --a1: #d6335c; --a2: #0b84c7; --a3: #b78a00; }

/* Raster (Lauf 2): Kategorie oben; links Eingabe + große Ergebnis-Kachel, rechts das Bild in GLEICHER Höhe (stretch, Bühne füllt die Spalte);
   darunter die eingeklappten Kästen in voller Breite. */
.uc-raster { display: grid; gap: 14px; grid-template-columns: minmax(360px, 450px) minmax(0, 1fr); align-items: stretch;
  grid-template-areas: "kat kat" "eingabe bild" "kaesten kaesten"; }
/* Lauf 2 alt: align-items: start; grid-template-areas: "kat kat" "eingabe bild" "alle alle"; */
.uc-kat { grid-area: kat; } .uc-eingabe { grid-area: eingabe; } .uc-bild { grid-area: bild; } .uc-kaesten { grid-area: kaesten; display: grid; gap: 14px; align-content: start; min-width: 0; }
.uc-bild { display: flex; flex-direction: column; }
.uc-bild .fb-kopf { flex: none; }
.uc-bild .uc-buehne { flex: 1 1 auto; }
.uc-leise { color: var(--sehr-leise); font-size: 14px; }

/* Kategorie-Chips in drei Gruppen */
/* Lauf 2: EINE umbrechende Chip-Zeile (Alltag) + Chip „Weitere / Technik“; die technischen Kategorien klappen darunter auf */
.uc-kat-gruppen { display: flex; flex-wrap: wrap; gap: 8px; }
.uc-kat .chip { min-height: 40px; padding: 5px 12px; }
.uc-weiter { border-style: dashed; color: var(--leise); }
.uc-weiter::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 1px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.uc-weiter.offen::after { transform: rotate(-135deg); margin-top: 3px; }
.uc-technik { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linie); }
.uc-technik .tafel-kopf { margin-bottom: 10px; }
.uc-technik .tafel-titel { font-size: 13px; }
/* Lauf 2 alt (drei Gruppen mit Titeln, am Handy waagrecht scrollend):
.uc-kat-gruppen { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.uc-kg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.uc-kg-titel { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sehr-leise); margin-right: 2px; }
.uc-schnell { margin-top: 14px; max-width: 640px; }
.uc-schnell input { font-size: 17px; padding: 10px 14px; } */
#inh-schnell .feld { max-width: 640px; }
#inh-schnell input { font-size: 17px; padding: 10px 14px; }
.uc-klein { margin: 10px 0 0; color: var(--leise); font-size: 14.5px; line-height: 1.5; }
.uc-klein:empty { display: none; }

/* Eingabe */
.uc-paar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 8px; margin-top: 14px; }
.uc-tausch { height: 50px; }
.uc-tausch svg { width: 22px; height: 22px; }
.uc-select-rahmen { position: relative; display: block; }
.uc-select-rahmen::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--leise); border-bottom: 2px solid var(--leise); transform: rotate(45deg); pointer-events: none; }
.uc-select { -webkit-appearance: none; appearance: none; width: 100%; height: 50px; padding: 0 34px 0 12px; border-radius: var(--r); border: 1.5px solid var(--linie-stark);
  background: var(--flaeche-2); color: var(--text); font: 700 16px var(--schrift); text-overflow: ellipsis; transition: border-color .15s, box-shadow .15s; }
.uc-select:focus { outline: none; border-color: var(--a1); box-shadow: var(--fokus); background: var(--flaeche); }
.uc-select option, .uc-select optgroup { background: var(--flaeche); color: var(--text); font-weight: 400; }
.uc-erg-kopf { margin: 20px 0 8px; }
.uc-ergebnis { margin-top: 0; grid-template-columns: 1fr; }
.uc-ergebnis .wert { --a1: var(--a2); }
/* Hauptergebnis (Lauf 2): die EINE große Zahl der Seite, Rahmen in der Zielfarbe */
.uc-ergebnis .wert.haupt { padding: 18px 14px 18px 20px; border: 2px solid color-mix(in srgb, var(--a2) 55%, transparent); border-radius: 18px; }
.uc-ergebnis .wert.haupt .wert-label { font-size: 15px; }
.uc-ergebnis .wert.haupt .wert-zahl { font-size: clamp(34px, 3.6vw, 44px); line-height: 1.15; }
.uc-ergebnis .wert.haupt .wert-zahl.lang { font-size: 26px; }
.uc-ergebnis .wert.haupt .wert-zusatz { font-size: 15px; margin-top: 4px; }
/* Lauf 2 alt: .uc-ergebnis { margin-top: 16px; } .uc-ergebnis .wert.haupt .wert-zahl { font-size: clamp(26px, 3vw, 34px); } */
.uc-stellen { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.uc-stellen .feld-label { margin: 0; }
.uc-stellen .segment button { padding: 6px 12px; min-height: 34px; font: 700 14px var(--mono); }

/* Alle Einheiten */
.uc-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.uc-grid .wert-zusatz { display: none; }
.uc-grp-titel { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sehr-leise); }
.uc-grp-titel:first-child { margin-top: 0; }
.uc-grid .wert { --a1: var(--a2); }
/* Lauf 2: nur das Ziel ist dezent markiert (Rand in der Zielfarbe); Quelle-Markierung entfällt
.uc-grid .wert.uc-quelle { --a1: #ff6b8a; border-style: dashed; border-color: color-mix(in srgb, var(--a1) 60%, transparent); background: color-mix(in srgb, var(--a1) 7%, var(--flaeche-2)); }
:root[data-thema="hell"] .uc-grid .wert.uc-quelle { --a1: #d6335c; }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) .uc-grid .wert.uc-quelle { --a1: #d6335c; } } */
.uc-grid .wert.uc-ziel { border-color: color-mix(in srgb, var(--a2) 70%, transparent); box-shadow: inset 3px 0 0 var(--a2); }
.uc-wahl { border: 0; background: none; padding: 0; text-align: left; display: flex; gap: 7px; align-items: baseline; min-width: 0; max-width: 100%; overflow: hidden;
  font: 700 14px var(--schrift); color: var(--leise); }
.uc-wahl:hover .uc-sym, .uc-wahl:focus-visible .uc-sym { text-decoration: underline; text-underline-offset: 3px; }
.uc-wahl:focus-visible { box-shadow: var(--fokus); border-radius: 4px; }
.uc-sym { color: var(--text); font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.uc-name { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.uc-marke { font: 700 11.5px var(--schrift); letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; margin-left: auto; flex: none; }
.uc-marke.q { background: color-mix(in srgb, var(--a1) 18%, transparent); color: var(--a1); }
.uc-marke.z { background: color-mix(in srgb, var(--a2) 18%, transparent); color: var(--a2); }
.wert-zusatz.exakt { color: var(--ok); }

/* ── Hauptbild ── */
/* Lauf 2: Bühne füllt die Spalte und zentriert ihren Inhalt senkrecht; overflow sichtbar statt hidden (Ziffern/Blasen wurden abgeschnitten) */
.uc-buehne { position: relative; border-radius: 16px; background: var(--flaeche-2); border: 1px solid var(--linie); padding: 18px 14px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; /* overflow: hidden; */
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text) 10%, transparent) 1px, transparent 1.3px); background-size: 22px 22px; background-position: 11px 11px; }
.uc-hinweis { margin: 0; padding: 40px 16px; text-align: center; color: var(--leise); font-size: 16px; }
.uc-unter { margin: 14px 4px 0; font-size: 14.5px; color: var(--leise); line-height: 1.45; }

/* Maßstab: oben Skala der Ausgangseinheit, unten Skala der Zieleinheit, dazwischen der gemeinsame Balken */
.sk { position: relative; }
.sk-zeile { position: relative; height: 70px; margin: 0 44px; }
.sk-balken { position: relative; margin: 0 44px; height: 46px; border-radius: 10px; display: grid; place-items: center; padding: 0 12px; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--a1) 82%, transparent), color-mix(in srgb, var(--a2) 82%, transparent));
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.sk-balken span { font: 700 clamp(15px, 1.7vw, 20px) var(--mono); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sk-strich { position: absolute; width: 0; border-left: 2px solid var(--c); }
.sk-oben { --c: var(--a1); } .sk-unten { --c: var(--a2); }
.sk-oben .sk-strich { bottom: 0; height: 30px; } .sk-unten .sk-strich { top: 0; height: 30px; }
.sk-strich.klein { height: 10px !important; border-left-width: 1.5px; opacity: .7; }
.sk-strich.ende { border-left-width: 3px; height: 44px !important; }
.sk-ziffer { position: absolute; transform: translateX(-50%); font: 500 13.5px var(--mono); color: var(--leise); white-space: nowrap; }
.sk-oben .sk-ziffer { top: 0; } .sk-unten .sk-ziffer { bottom: 0; }
.sk-ziffer.ende { font: 700 16px var(--mono); color: var(--c); transform: translateX(-100%); text-align: right; }
.sk-ziffer.null { transform: translateX(-30%); }
.sk-oben .sk-ziffer.ende { top: 0; } .sk-unten .sk-ziffer.ende { bottom: 0; }
.sk-oben .sk-ziffer:not(.ende), .sk-oben .sk-ziffer.ende { padding-bottom: 0; }
.sk-ziffer.schmal { opacity: 0; }

/* Thermometer: Röhre in der Mitte, Skalen links (Ausgangseinheit) und rechts (Zieleinheit), Blasen zeigen den Wert */
.th { position: relative; margin: 6px auto 0; max-width: 680px; }   /* Lauf 2: 560 → 680, Platz für die Blasen außerhalb der Skalen */
.th-feld { position: relative; height: 300px; }
.th-rohr { position: absolute; left: 50%; width: 34px; margin-left: -17px; top: 0; bottom: -10px; border-radius: 17px 17px 0 0; border: 2px solid var(--linie-stark); background: var(--flaeche); overflow: visible; }
.th-fuell { position: absolute; left: 6px; right: 6px; bottom: -4px; border-radius: 8px 8px 0 0; background: linear-gradient(0deg, var(--a2), var(--a1)); transition: height var(--dauer) var(--kurve), top var(--dauer) var(--kurve); }
.th-kolben { position: absolute; left: 50%; bottom: -46px; width: 62px; height: 62px; margin-left: -31px; border-radius: 50%; border: 2px solid var(--linie-stark); background: var(--a2); box-shadow: inset 0 0 0 5px var(--flaeche), inset 0 0 0 40px color-mix(in srgb, var(--a2) 90%, var(--a1)); }
.th-skala { position: absolute; top: 0; bottom: 0; width: 70px; }
.th-skala.l { right: calc(50% + 24px); } .th-skala.r { left: calc(50% + 24px); }
.th-strich { position: absolute; height: 0; border-top: 2px solid var(--c); width: 12px; }
.th-skala.l { --c: var(--a1); } .th-skala.r { --c: var(--a2); }
.th-skala.l .th-strich { right: 0; } .th-skala.r .th-strich { left: 0; }
.th-strich.klein { width: 7px; border-top-width: 1.5px; opacity: .7; }
.th-ziffer { position: absolute; transform: translateY(-50%); font: 500 13px var(--mono); color: var(--leise); white-space: nowrap; background: var(--flaeche-2); padding: 0 3px; z-index: 1; }
.th-skala.l .th-ziffer { right: 15px; } .th-skala.r .th-ziffer { left: 15px; }
.th-linie { position: absolute; height: 0; border-top: 2px dashed; transition: top var(--dauer) var(--kurve); }
.th-linie.l { left: 0; right: calc(50% + 17px); border-color: var(--a1); } .th-linie.r { right: 0; left: calc(50% + 17px); border-color: var(--a2); }
.th-blase { position: absolute; transform: translateY(-50%); padding: 6px 12px; border-radius: 12px; font: 700 clamp(15px, 2.2vw, 20px) var(--mono); white-space: nowrap; z-index: 2;
  background: var(--flaeche); border: 2px solid var(--c); color: var(--text); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55); transition: top var(--dauer) var(--kurve); }
.th-blase.l { right: calc(50% + 24px + 70px + 8px); --c: var(--a1); } .th-blase.r { left: calc(50% + 24px + 70px + 8px); --c: var(--a2); }
/* Lauf 2 alt: .th-blase.l { left: 0; } .th-blase.r { right: 0; } — Blasen deckten die Skalenziffern ab */
.th-kopf { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.th-kopf .th-blase { position: static; transform: none; }
.th-fuss { height: 56px; }
.uc-fix { margin-top: 12px; }
.uc-fix .chip { min-height: 38px; padding: 4px 11px; font-size: 14px; }

/* Kurve (SVG, Breite = Bühne) */
.ku { display: block; width: 100%; height: auto; overflow: visible; }
.ku text { font: 500 12px var(--mono); fill: var(--leise); }
.ku .ku-titel { font: 700 13px var(--mono); fill: var(--text); }
.ku .ku-achsen { font: 700 13px var(--mono); fill: var(--leise); }
.ku .ku-gitter { stroke: var(--linie); stroke-width: 1; }
.ku .ku-achse { stroke: var(--linie-stark); stroke-width: 1.5; }
.ku .ku-kurve { fill: none; stroke: var(--a2); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ku .ku-fadenkreuz { stroke: var(--a1); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ku .ku-punkt { fill: var(--a1); stroke: var(--flaeche-2); stroke-width: 3; }
.ku .ku-wert-x { fill: var(--a1); font-weight: 700; } .ku .ku-wert-y { fill: var(--a2); font-weight: 700; }
.ku .ku-ziffer-x { fill: var(--a1); } .ku .ku-ziffer-y { fill: var(--a2); }

/* Tablet/Handy: eine Spalte — Kategorie, Eingabe+Ergebnis, Bild, Kästen */
@media (max-width: 900px) {
  .uc-raster { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kat" "eingabe" "bild" "kaesten"; }
}
@media (max-width: 640px) {
  .uc-raster { gap: 10px; }
  /* Kategorien: kompakt, umbrechend (Lauf 2: kein waagrechtes Scrollen, nichts wird abgeschnitten) */
  .uc-kat .chip { min-height: 36px; padding: 3px 10px; font-size: 14.5px; }
  .uc-kat-gruppen { gap: 6px; }
  .uc-kat .tafel-kopf { margin-bottom: 10px; }
  .uc-select { font-size: 15px; padding: 0 28px 0 10px; }
  .uc-paar { gap: 6px; }
  .uc-grid { grid-template-columns: 1fr 1fr; }
  /* Lauf 2: Einheitenname bleibt lesbar (vorher display: none → nur Kürzel wie „ftUS“): Kürzel oben, Name darunter */
  .uc-wahl { font-size: 15px; flex-direction: column; gap: 0; align-items: flex-start; }
  .uc-name { font-size: 13px; white-space: normal; line-height: 1.25; }
  .uc-buehne { padding: 14px 6px; min-height: 200px; }
  .sk-zeile, .sk-balken { margin: 0 34px; }
  .sk-zeile { height: 64px; }
  .sk-ziffer { font-size: 12.5px; } .sk-ziffer.ende { font-size: 14px; }
  .th-feld { height: 260px; }
  .th-skala { width: 54px; }
  .th-ziffer { font-size: 12px; }
  .th-blase { padding: 5px 8px; font-size: 14px; }
  .uc-ergebnis .wert.haupt { padding: 14px 10px 14px 16px; }
  .uc-ergebnis .wert.haupt .wert-zahl { font-size: 34px; }
  .uc-ergebnis .wert.haupt .wert-zahl.lang { font-size: 22px; }
  .uc-erg-kopf { margin-top: 16px; }
}
/* Lauf 2 alt (Handy): Kategorie-Zeilen waagrecht scrollend mit negativem Rand, Schnelleingabe vor dem Wertfeld, Name ausgeblendet
@media (max-width: 640px) {
  .uc-kat-gruppen { flex-direction: column; gap: 6px; }
  .uc-kg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .uc-schnell .feld-label { display: none; }
  .uc-grid { grid-template-columns: 1fr 1fr; } .uc-name { display: none; }
} */

/* Kopf-Icon (Original-Icon, rund-bunt) auf neutralem Grund — in hell und dunkel erkennbar */
.kopf-glyphe { background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie), 0 10px 30px -14px var(--a2); }
.kopf-glyphe img { display: block; width: 44px; height: 44px; object-fit: contain; }
@media (max-width: 640px) { .kopf-glyphe img { width: 36px; height: 36px; } }

/* ── Über dieses Tool (Tool-Profil, SEO/GEO) und Hilfe & Infos — Muster pw-strength ── */
.tool-profil { margin-top: 18px; padding: 20px; border-radius: var(--r-gross); background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten); min-width: 0; }
.tool-profil-titel { margin: 0 0 10px; font: 700 15px/1.2 var(--schrift); letter-spacing: 0.08em; text-transform: uppercase; color: var(--leise); display: flex; align-items: center; gap: 9px; }
.tool-profil-titel::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--a1); }
.tool-profil h3 { margin: 18px 0 8px; font: 700 16px/1.3 var(--schrift); color: var(--text); }
.tool-profil p { margin: 0 0 10px; color: var(--leise); line-height: 1.6; }
.tool-profil-einl { color: var(--text); }
.tool-profil-liste { margin: 0; padding: 0 0 0 20px; color: var(--leise); line-height: 1.55; display: grid; gap: 4px; }
.tool-profil-faq { display: grid; gap: 8px; margin-top: 8px; }
.tool-profil-faq details { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--r); padding: 0 16px; }
.tool-profil-faq summary { list-style: none; cursor: pointer; padding: 13px 0; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tool-profil-faq summary::-webkit-details-marker { display: none; }
.tool-profil-faq summary::after { content: "+"; margin-left: auto; font: 500 22px/1 var(--mono); color: var(--sehr-leise); transition: transform 0.25s var(--kurve); }
.tool-profil-faq details[open] summary::after { transform: rotate(45deg); }
.tool-profil-faq details p { margin: 0 0 14px; }
@media (max-width: 760px) { .tool-profil { padding: 16px; border-radius: 18px; } }
.fb-faltbar .fb-inhalt { margin-top: 14px; }

/* lange Zahlen (z. B. 1.609.344.000.000) kleiner, damit sie nicht umbrechen */
.wert-zahl.lang { font-size: 17px; }
.wert.haupt .wert-zahl.lang { font-size: 21px; }
@media (max-width: 640px) { .wert-zahl.lang { font-size: 13.5px; } .wert.haupt .wert-zahl.lang { font-size: 16px; } }
