/* ── tool.css — Charakter „Emoji Picker“ ─────────────────────────────────────────────────────────────────────────────
   WAS:   Akzente (Gelb = Auswahl/Fokus · Fuchsia = Bauplan/Struktur · Himmelblau = Textfeld), Zweispalten-Raster (Finder links, Bühne rechts;
          am Handy: Bühne zuerst, dann Finder), das virtualisierte Emoji-Raster, die Bühne (Scheibe mit großem Emoji, Größenreihe auf
          hell/dunkel) und der Bauplan (ein Baustein je Codepunkt).
   WARUM: Das Tool soll nicht nur ein Emoji liefern, sondern zeigen, woraus es besteht. Darum ist die Bühne das Hauptbild; das Raster ist
          Werkzeug, kein Hingucker. Zeilenhöhen des Rasters stehen auch in js/main.js (R.zellH/R.kopfH) — beide Stellen zusammen ändern.
   KÄSTEN (Micha 26.10., Laien nicht erschlagen): Links nur die Auswahl; rechts Finder · Textfeld · Schreibweisen (zu) · Bauplan (zu). Bausteine im Abschnitt
          „Kästen mit (i)-Hilfe“ — Muster und Klassennamen wie ../colors/css/tool.css (.fb-kopf, .fb-auf, .fb-info, .fb-hilfe-fenster, .fb-inhalt, .fb-zu);
          die Logik steht in js/main.js. Das (i) (.fb-info) ist dort und hier identisch — Änderung immer in beiden Tools (oder nach _werk/werk.css).
   WIE ÄNDERN: Farben nur über --a1/--a2/--a3 unten; Grundbausteine in ../_werk/werk.css. Emoji-Schriftliste: --emoji. */
:root { --a1: #ffd43b; --a2: #e879f9; --a3: #38bdf8; --a1-tinte: #231a00;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI Symbol", sans-serif; }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) { --a1: #a16207; --a2: #a21caf; --a3: #0369a1; --a1-tinte: #ffffff; } }
:root[data-thema="hell"] { --a1: #a16207; --a2: #a21caf; --a3: #0369a1; --a1-tinte: #ffffff; }

/* Raster: zwei Spalten (links Auswahl, rechts Finder · Textfeld · Schreibweisen · Bauplan); unter 980 px eine Spalte, die Reihenfolge steuert order */
.eb-raster { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: start; }
.eb-spalte-a, .eb-spalte-b { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--a1) 20%, var(--flaeche)); border-color: var(--a1); }
.eb-satz { margin: 0 0 12px; color: var(--leise); font-size: 15.5px; line-height: 1.5; }
.eb-satz-klein { font-size: 14px; margin: 8px 0 0; min-height: 1.4em; }

/* ── Bühne ── */
.eb-buehne { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.eb-scheibe { width: clamp(116px, 30vw, 206px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--a1) 40%, var(--flaeche-2)), color-mix(in srgb, var(--a1) 9%, var(--flaeche)) 72%);
  box-shadow: inset 0 0 0 1px var(--linie-stark), 0 26px 60px -26px var(--a1); }
/* .eb-glyph { font: 400 clamp(60px, 15vw, 112px)/1 var(--emoji); max-width: 92%; text-align: center; overflow: hidden; white-space: nowrap; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28)); } */
/* Zeilenhöhe 1.25 und nur seitlich kappen: Emoji-Schriften der Geräte (Apple, Samsung, Noto) ragen über 1em hinaus —
   mit line-height 1 + overflow hidden war oben ein Stück abgeschnitten (Micha 26.10., am Handy). */
.eb-glyph { font: 400 clamp(60px, 15vw, 112px)/1.25 var(--emoji); max-width: 92%; text-align: center; overflow-x: clip; overflow-y: visible; white-space: nowrap; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28)); }
.eb-namen { min-width: 0; }
.eb-name { margin: 0; font: 700 clamp(22px, 2.5vw, 32px)/1.12 var(--titel); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.eb-name2 { margin: 4px 0 0; color: var(--leise); font-size: 17px; overflow-wrap: anywhere; }
.eb-name2.leise { color: var(--sehr-leise); font-size: 14.5px; }
.eb-name2:empty { display: none; }
.eb-meta { margin: 12px 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font: 500 13.5px var(--mono); color: var(--leise); }
.eb-gruppe { font: 700 13px var(--schrift); letter-spacing: 0.02em; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--a1) 16%, var(--flaeche-2)); border: 1px solid color-mix(in srgb, var(--a1) 45%, transparent); color: var(--text); }
.kopier.gross:not(.ok) { background: var(--a1); border-color: transparent; color: var(--a1-tinte); }
.kopier.gross:not(.ok):hover { filter: brightness(1.06); color: var(--a1-tinte); border-color: transparent; }
.kopier.gross { height: 50px; padding: 0 22px; font-size: 17px; border-radius: 14px; }
.kopier.gross svg { width: 21px; height: 21px; }
.eb-stich, .eb-groessen { margin-top: 18px; }
.eb-stich .feld-label, .eb-groessen .feld-label { margin-bottom: 7px; }
.eb-stich-chip { min-height: 36px; padding: 4px 12px; font-size: 14.5px; font-weight: 500; }
.eb-papier-paar { display: grid; grid-template-columns: 1fr; gap: 8px; }
.eb-papier { display: flex; align-items: flex-end; gap: 18px; padding: 10px 16px; border-radius: var(--r); overflow: hidden; font-family: var(--emoji); box-shadow: inset 0 0 0 1px var(--linie-stark); }
/* Größenreihe: je Größe Emoji + Beschriftung in px darunter (Farben der Beschriftung passend zum Papier) */
.eb-gr-e { display: grid; justify-items: center; gap: 6px; }
.eb-gr-e small { font: 500 12.5px/1 var(--mono); white-space: nowrap; }   /* nie „16“ und „px“ auf zwei Zeilen (Micha 26.10.) */
.eb-papier.hell small { color: #565a66; }
.eb-papier.dunkel small { color: #a3a9b6; }
.eb-papier.hell { background: #f7f5f0; color: #15171c; }
.eb-papier.dunkel { background: #0d0f13; color: #eef0f4; }
.eb-gr { line-height: 1.25; white-space: nowrap; }   /* vorher 1 — gleiche Kappgefahr wie .eb-glyph */

/* ── Bauplan ── */
.eb-teile { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.eb-teil { display: grid; justify-items: center; align-content: start; gap: 2px; width: 118px; padding: 10px 8px 9px; text-align: center; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--r); }
.eb-teil-bild { font: 400 36px/1 var(--emoji); height: 48px; display: grid; place-items: center; }
.eb-teil-u { font: 500 14px var(--mono); }
.eb-teil-rolle { font-size: 13.5px; font-weight: 700; color: var(--leise); line-height: 1.25; overflow-wrap: anywhere; }
.eb-teil-name { font: 400 10.5px/1.25 var(--mono); color: var(--sehr-leise); overflow-wrap: anywhere; margin-top: 2px; }
.eb-teil.typ-zwj, .eb-teil.typ-vs16, .eb-teil.typ-vs15, .eb-teil.typ-keycap, .eb-teil.typ-tagende, .eb-teil.typ-tag { border-style: dashed; border-color: color-mix(in srgb, var(--a2) 50%, transparent); background: color-mix(in srgb, var(--a2) 8%, var(--flaeche)); }
.eb-teil.typ-zwj .eb-teil-bild, .eb-teil.typ-vs16 .eb-teil-bild, .eb-teil.typ-vs15 .eb-teil-bild { font: 700 22px var(--mono); color: var(--a2); }
.eb-teil.typ-ri .eb-teil-bild, .eb-teil.typ-tag .eb-teil-bild { font: 700 24px var(--mono); }
.eb-teil.typ-ri .eb-teil-bild { width: 44px; height: 44px; margin: 2px auto; border-radius: 9px; border: 2px solid var(--a3); color: var(--a3); }
.eb-teil.typ-tag .eb-teil-bild, .eb-teil.typ-tagende .eb-teil-bild, .eb-teil.typ-keycap .eb-teil-bild { font: 700 22px var(--mono); color: var(--a2); }
.eb-swatch { display: inline-block; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18); }
.eb-swatch.ohne { background: linear-gradient(135deg, #ffd43b 0 49%, transparent 49% 51%, #ffd43b 51%); background-color: #ffd43b; }
.eb-w .wert-zahl { font-size: 17px; overflow-wrap: anywhere; word-break: break-all; line-height: 1.35; }
.eb-w .wert-zusatz { font-size: 13px; color: var(--sehr-leise); }

/* ── Finder ── */
.eb-finder .tafel-kopf { flex-wrap: wrap; row-gap: 8px; }
/* .eb-klick { display: flex; align-items: center; gap: 8px; }   — vorher im Kopf des Finders; jetzt eigene Zeile unter dem Kopf (Beschriftung + drei Knöpfe, bricht am Handy um) */
.eb-klick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.eb-klick-label { font-size: 14px; font-weight: 700; color: var(--leise); white-space: nowrap; }
.eb-klick .segment { max-width: 100%; }
.eb-klick .segment button { padding: 6px 12px; min-height: 40px; font-size: 14px; }
.eb-suchrahmen input { font: 500 20px var(--schrift); padding: 13px 4px 13px 8px; letter-spacing: 0; }
.eb-suchrahmen input::-webkit-search-cancel-button { display: none; }
.eb-lupe { width: 22px; height: 22px; margin-left: 14px; color: var(--sehr-leise); flex: none; }
.eb-weg { flex: none; width: 40px; height: 40px; margin-right: 4px; border: 0; background: transparent; color: var(--leise); border-radius: 10px; display: grid; place-items: center; }
.eb-weg:hover { background: var(--flaeche-3); color: var(--text); }
.eb-weg svg { width: 18px; height: 18px; }
.eb-gruppen { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
/* .eb-gruppe-chip { min-height: 38px; padding: 4px 12px; font-size: 14.5px; gap: 6px; } */
/* Kategorien kleiner (Micha 26.10.: „etwas zu groß“) — deutlich unter der Moduswahl, Desktop zwei Zeilen */
.eb-gruppe-chip { min-height: 32px; padding: 3px 8px; font-size: 13px; gap: 4px; border-radius: 10px; }
/* Trennstrich zwischen „Alle“/„Zuletzt“ und den Kategorien (main.js zeigeGruppen) */
.eb-trenner { flex: none; align-self: center; width: 1px; height: 22px; margin: 0 4px; background: var(--linie-stark); }
/* Größenreihe als <details>: Kopf mit Pfeil wie .fb-auf */
.eb-gr-kopf { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.eb-gr-kopf::-webkit-details-marker { display: none; }
.eb-gr-kopf::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s var(--kurve); }
.eb-groessen[open] > .eb-gr-kopf::after { transform: rotate(-135deg); margin-top: 3px; }
.eb-gr-kopf:hover { color: var(--text); }
.eb-gruppe-chip small { font: 500 12px var(--mono); }
.eb-ton { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.eb-toene { display: flex; gap: 6px; }
.eb-ton-knopf { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--linie); background: var(--flaeche-2); display: grid; place-items: center; padding: 0; transition: border-color 0.15s, transform 0.15s; }
.eb-ton-knopf:hover { border-color: var(--linie-stark); }
.eb-ton-knopf:active { transform: scale(0.94); }
.eb-ton-knopf[aria-pressed="true"] { border-color: var(--a1); box-shadow: 0 0 0 2px color-mix(in srgb, var(--a1) 35%, transparent); }
.eb-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 2px 6px; font-size: 14px; color: var(--leise); min-height: 22px; }
.eb-hover { flex: 1; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--emoji), var(--schrift); color: var(--text); }
.eb-hover:empty { display: none; }

/* Raster: Scrollfläche mit fester Höhe, Zeilen absolut (siehe main.js) */
.eb-feld { position: relative; }
.eb-raster-rahmen { height: clamp(340px, 62vh, 640px); overflow-x: hidden; overflow-y: auto; position: relative; border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche-2); outline: none; scrollbar-width: thin; scrollbar-gutter: stable; overscroll-behavior: contain; }
.eb-hoehe { position: relative; width: 100%; }
.eb-zeilen { position: absolute; left: 0; right: 0; top: 0; }
.eb-zeile, .eb-kopfzeile { position: absolute; left: 0; right: 0; }
.eb-kopfzeile > div { height: 100%; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 14px 6px; font: 700 12.5px var(--schrift); letter-spacing: 0.09em; text-transform: uppercase; color: var(--leise); }
.eb-kopf-n { font: 500 12.5px var(--mono); letter-spacing: 0; color: var(--sehr-leise); }
.eb-zelle { position: absolute; top: 0; height: 100%; padding: 0; border: 0; background: none; font: 400 29px/1 var(--emoji); display: grid; place-items: center; isolation: isolate; border-radius: 10px; }
.eb-zelle::before { content: ""; position: absolute; inset: 3px; border-radius: 11px; z-index: -1; transition: background 0.12s; }
.eb-zelle:hover::before { background: var(--flaeche-3); }
.eb-zelle.an::before { background: color-mix(in srgb, var(--a1) 26%, var(--flaeche-2)); box-shadow: inset 0 0 0 2px var(--a1); }
.eb-zelle:focus-visible { box-shadow: none; }
.eb-zelle:focus-visible::before { box-shadow: inset 0 0 0 3px var(--a1); background: var(--flaeche-3); }
.eb-leer { height: clamp(340px, 62vh, 640px); display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 20px; border: 1.5px dashed var(--linie-stark); border-radius: var(--r); color: var(--leise); }
.eb-leer p { margin: 0; }
.eb-leer-gross { font: 700 20px var(--titel); color: var(--text); }
.eb-leer.versteckt, .eb-raster-rahmen.versteckt, .chip.versteckt, .eb-weg.versteckt, .eb-stich.versteckt { display: none !important; }

/* Textfeld */
.eb-text { display: block; width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--linie-stark); background: var(--flaeche-2); color: var(--text); font: 400 26px/1.4 var(--emoji), var(--schrift); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.eb-text:focus { border-color: var(--a3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a3) 45%, transparent); background: var(--flaeche); }
.eb-text::placeholder { font: 400 16px var(--schrift); color: var(--sehr-leise); }
.eb-aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

/* ── Schmale Bildschirme: Bühne zuerst, Finder, Bauplan, Schreibweisen, Textfeld ── */
@media (max-width: 980px) {
  .eb-raster { display: flex; flex-direction: column; align-items: stretch; }
  .eb-spalte-a, .eb-spalte-b { display: contents; }
  /* .eb-auswahl { order: 1; } .eb-finder { order: 2; } .eb-bauplan { order: 3; } .eb-schreib { order: 4; } .eb-textfeld { order: 5; }   — alte Reihenfolge (vor 26.10.) */
  .eb-auswahl { order: 1; } .eb-finder { order: 2; } .eb-textfeld { order: 3; } .eb-schreib { order: 4; } .eb-bauplan { order: 5; }
}
@media (max-width: 640px) {
  .eb-buehne { gap: 14px; }
  .eb-scheibe { width: 112px; }
  .eb-glyph { font-size: 62px; }
  .eb-name { font-size: 21px; }
  .eb-name2 { font-size: 15px; }
  .eb-meta { margin: 8px 0 10px; font-size: 12.5px; }
  .kopier.gross { height: 46px; padding: 0 16px; font-size: 16px; }
  .eb-papier { gap: 10px; padding: 10px 12px; justify-content: space-between; }
  .eb-gr-e small { font-size: 11px; letter-spacing: -0.02em; }   /* schmale Handys (360 px): fünf Größen passen in eine Zeile */
  .eb-klick .segment button { padding: 6px 9px; font-size: 13.5px; }
  .eb-gruppen { flex-wrap: nowrap; overflow-x: auto; margin-left: -4px; margin-right: -4px; padding: 2px 4px 8px; scrollbar-width: thin; }
  .eb-gruppe-chip { flex: none; }
  .eb-raster-rahmen, .eb-leer { height: clamp(300px, 54vh, 520px); }
  .eb-teil { width: calc(50% - 4px); }
  .eb-w .wert-zahl { font-size: 14.5px; }
  .eb-suchrahmen input { font-size: 18px; }
  .eb-zelle { font-size: 27px; }
  .eb-toene { gap: 4px; }
  .eb-ton-knopf { width: 36px; height: 36px; }
  .eb-ton { gap: 8px; }
}

/* ── Kästen mit (i)-Hilfe (Muster ../colors/css/tool.css; Klassen gleich benannt) ── */
.fb-kopf { position: relative; justify-content: flex-start; }
.fb-kopf .tafel-titel { min-width: 0; }
.fb-zu > .fb-kopf { margin-bottom: 0; }
.fb-auf { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 2px; border: 0; background: none; color: inherit;
  font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
.fb-auf::after { content: ""; flex: none; width: 8px; height: 8px; margin: -3px 0 0 2px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s var(--kurve); }
.fb-auf[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.fb-auf:hover { color: var(--text); }
/* ALT bis 26.10. abends (gefüllter Kreis in --a1, von Micha verworfen):
/* (i): gefüllter Kreis in --a1 mit fettem, geradem „i“ in --a1-tinte (Micha 26.10.: das dünne kursive Serifen-i war am Handy schlecht erkennbar).
   Tippfläche 32 px (Handy 40 px), sichtbar 24 px (Handy 26 px). Offen = Ring um den Kreis. Identisch in ../colors/css/tool.css. * /
.fb-info { flex: none; width: 32px; height: 32px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--a1); }
.fb-info span { width: 24px; height: 24px; border-radius: 50%; background: var(--a1); color: var(--a1-tinte); display: grid; place-items: center;
  font: 700 15.5px/1 var(--schrift); font-style: normal; text-transform: none; letter-spacing: 0; transition: box-shadow 0.15s, filter 0.15s; }
.fb-info:hover span { filter: brightness(1.12); }
.fb-info[aria-expanded="true"] span { box-shadow: 0 0 0 2px var(--flaeche), 0 0 0 4px var(--a1); }
*/
/* (i)-Hilfe-Knopf, Variante C (Micha 26.10., aus sechs Vorschlägen gewählt; gilt künftig für alle Tools):
   blaues „?“ im Kreis-Umriss, offen = gefüllt. Blau bewusst unabhängig vom Tool-Akzent, damit Hilfe überall gleich aussieht.
   Identisch in ../colors/css/tool.css und ../emoji-picker/css/tool.css (bis es nach _werk/werk.css wandert). */
.fb-info { --ib: #60a5fa; --ib-tinte: #0d0f13; flex: none; width: 32px; height: 32px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--ib); }
@media (prefers-color-scheme: light) { :root:not([data-thema="dunkel"]) .fb-info { --ib: #2563eb; --ib-tinte: #ffffff; } }
:root[data-thema="hell"] .fb-info { --ib: #2563eb; --ib-tinte: #ffffff; }
.fb-info span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ib); background: transparent; color: var(--ib); display: grid; place-items: center;
  font: 700 14px/1 var(--schrift); font-style: normal; text-transform: none; letter-spacing: 0; transition: background 0.15s, color 0.15s; }
.fb-info:hover span { background: color-mix(in srgb, var(--ib) 14%, transparent); }
.fb-info[aria-expanded="true"] span { background: var(--ib); color: var(--ib-tinte); }
.fb-hilfe-fenster { position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); width: min(440px, 100%); padding: 14px 16px; border-radius: var(--r);
  background: var(--flaeche-2); border: 1.5px solid var(--a1); color: var(--text); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
  font: 400 15px/1.5 var(--schrift); letter-spacing: normal; text-transform: none; white-space: pre-line; overflow-wrap: anywhere; }
.fb-hilfe-fenster[hidden] { display: none; }
/* Autorenregel display: grid/flex schlägt das UA-hidden — darum hier ausdrücklich (Fallstrick: sonst bleibt „zugeklappt“ sichtbar) */
.fb-inhalt[hidden] { display: none; }
/* Handy: größere Tippfläche für das (i) — steht hinter der Grundregel, damit sie gewinnt */
@media (max-width: 640px) {
  .fb-info { width: 40px; height: 40px; }
  .fb-info span { width: 26px; height: 26px; font-size: 16px; }
  .fb-hilfe-fenster { width: 100%; font-size: 14.5px; padding: 12px 14px; }
}

/* Größenreihe auf sehr schmalen Handys (≤ 400 px, z. B. 360er): 64 px passt neben den vier kleineren nicht in die Zeile und
   würde abgeschnitten — dort entfällt die 64er-Größe (die Bühne oben zeigt das Emoji ohnehin groß). Gemessen 26.10. */
@media (max-width: 400px) {
  .eb-papier .eb-gr-e:last-child { display: none; }
}


/* Lauf 2: Original-Icon (quadratisch, transparent) im Kopf statt SVG-Glyphe, auf neutralem Grund — hell und dunkel erkennbar (Muster json-converter) */
.kopf-glyphe { background: var(--flaeche-3); box-shadow: inset 0 0 0 1px var(--linie), 0 10px 30px -14px var(--a1); }
.kopf-glyphe img { display: block; width: 40px; height: 40px; object-fit: contain; }
@media (max-width: 760px) { .kopf-glyphe img { width: 32px; height: 32px; } }
