/* enhancevision.de – Gratis-Werkzeuge
   Gestaltung übernommen von der bisherigen enhancevision.de (dunkles Slate, Blau→Violett-Verlauf, Inter). */

:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #8b5cf6;
  --accent-color: #06d6a0;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #334155;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --container-max-width: 1200px;
  --border-radius: 12px;
  --transition: all 0.3s ease;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --navbar-hoehe: 70px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--navbar-hoehe) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}
a { color: var(--primary-color); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--secondary-color); }
:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; border-radius: 6px; }
img, canvas { max-width: 100%; }
p { margin: 0 0 1rem; color: var(--text-secondary); }
h1, h2, h3 { margin: 0 0 0.6em; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }

.huelle { max-width: var(--container-max-width); margin: 0 auto; padding: 0 20px; }
.gradient-text { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.leise { color: var(--text-secondary); }
.klein { font-size: 0.9rem; }
.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}
.navbar .huelle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--navbar-hoehe); }
.marke { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.3rem; color: var(--text-primary); letter-spacing: -0.01em; }
.marke:hover { color: var(--text-primary); }
.marke svg { width: 34px; height: 34px; flex: none; }
.marke b { background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-link { color: var(--text-secondary); font-weight: 500; font-size: 0.97rem; }
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.nav-rechts { display: flex; align-items: center; gap: 1rem; }
@media (max-width: 860px) { .nav-links .nur-breit { display: none; } .nav-links { gap: 1rem; } }
@media (max-width: 520px) { .marke span.zusatz { display: none; } }

/* ---------- Knöpfe ---------- */
.knopf, .installieren {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--border-radius);
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 0; text-decoration: none; transition: var(--transition);
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
.knopf:hover, .installieren:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4); }
.knopf.zweit { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); box-shadow: none; }
.knopf.zweit:hover { border-color: var(--primary-color); color: var(--text-primary); }
.knopf.rahmen { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); box-shadow: none; }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.knopf[hidden], .installieren[hidden] { display: none; }
.installieren { padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
.knopfreihe:empty { display: none; }

/* ---------- Abschnitte ---------- */
.abschnitt { padding: 4rem 0; }
.abschnitt.hell { background: var(--bg-secondary); }
.abschnitt-kopf { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.abschnitt-kopf p { font-size: 1.1rem; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--navbar-hoehe) + 70px) 0 80px;
  background: var(--gradient-hero);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 30% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}
.hero .huelle { position: relative; }
.hero-raster { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero-raster { grid-template-columns: 1.05fr 1fr; } .hero-raster.einzeln { grid-template-columns: minmax(0, 780px); } }
.hero-text p { font-size: 1.2rem; }
.vorteile { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.7rem; }
.vorteile li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--text-secondary); }
.vorteile li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: #fff;
  background: var(--gradient-primary); margin-top: 1px;
}

/* Werkzeug-Hero (kleiner) */
.hero.klein { padding: calc(var(--navbar-hoehe) + 44px) 0 44px; }
.hero.klein h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 22ch; }
.hero.klein p { font-size: 1.1rem; max-width: 62ch; }
.brotkrume { font-size: 0.9rem; margin-bottom: 1rem; color: var(--text-muted); }
.brotkrume a { color: var(--text-secondary); }
.brotkrume a:hover { color: var(--primary-color); }

/* ---------- Ablagefläche ---------- */
.leuchtpult {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: 300px; padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(59, 130, 246, 0.06));
  border: 2px dashed rgba(59, 130, 246, 0.45);
  border-radius: 16px; cursor: pointer; transition: var(--transition);
  box-shadow: 0 20px 40px var(--shadow-color);
}
.leuchtpult:hover { border-color: var(--primary-color); box-shadow: 0 15px 40px rgba(59, 130, 246, 0.25); }
.leuchtpult.aktiv { border-style: solid; border-color: var(--accent-color); background: linear-gradient(135deg, var(--bg-secondary), rgba(6, 214, 160, 0.1)); box-shadow: 0 10px 30px rgba(6, 214, 160, 0.3); }
.leuchtpult .symbol {
  width: 72px; height: 72px; margin: 0 auto 1.2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--gradient-primary);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}
.leuchtpult .symbol svg { width: 34px; height: 34px; }
.leuchtpult strong { display: block; font-size: 1.35rem; font-weight: 700; }
.leuchtpult .leise { margin: 0.5rem auto 1.2rem; max-width: 38ch; }
.leuchtpult .knopf { pointer-events: none; }
.leuchtpult input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.leuchtpult .marken { display: none; }
.hat-bild .leuchtpult { min-height: 0; padding: 1rem; box-shadow: none; }
.hat-bild .leuchtpult .symbol, .hat-bild .leuchtpult .leise, .hat-bild .leuchtpult .knopf { display: none; }
.hat-bild .leuchtpult strong { font-size: 1rem; }
.hat-bild .leuchtpult strong::after { content: " – " attr(data-nachher); font-weight: 400; color: var(--text-secondary); }

.vorschlaege { margin-top: 1.5rem; padding: 1.25rem; border-radius: var(--border-radius); background: var(--bg-secondary); border: 1px solid var(--border-color); }
.vorschlaege[hidden] { display: none; }
.vorschlaege p { margin-bottom: 0.8rem; color: var(--text-primary); font-weight: 500; overflow-wrap: anywhere; }
.vorschlaege ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.vorschlaege a { display: inline-block; padding: 0.6rem 1.1rem; border-radius: 8px; background: var(--gradient-primary); color: #fff; font-weight: 600; font-size: 0.95rem; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
.vorschlaege a:hover { color: #fff; transform: translateY(-2px); }

/* ---------- Karten-Raster (Werkzeuge, Vorteile) ---------- */
.nische + .nische { margin-top: 3rem; }
.nische > h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin-bottom: 1rem; letter-spacing: 0.02em; }
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.5rem; }
.feature-card {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 2rem; border-radius: var(--border-radius);
  background: var(--bg-primary); border: 1px solid var(--border-color);
  color: var(--text-primary); transition: var(--transition);
}
.abschnitt:not(.hell) .feature-card { background: var(--bg-secondary); }
a.feature-card:hover { color: var(--text-primary); transform: translateY(-5px); border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2); }
.feature-icon {
  width: 60px; height: 60px; border-radius: 50%; margin-bottom: 0.9rem;
  display: grid; place-items: center; background: var(--gradient-primary);
}
.feature-icon svg { width: 28px; height: 28px; }
.feature-card h3 { margin: 0; }
.feature-card p { margin: 0; font-size: 0.95rem; }
.feature-card .oeffnen { margin-top: auto; padding-top: 0.9rem; color: var(--primary-color); font-weight: 600; font-size: 0.95rem; }
a.feature-card:hover .oeffnen { color: var(--secondary-color); }

/* ---------- Werkzeugseiten ---------- */
.arbeitsflaeche { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
@media (min-width: 960px) { .arbeitsflaeche.zweispaltig { grid-template-columns: 340px 1fr; } }
@media (max-width: 959px) { .arbeitsflaeche #vorschau { order: -1; } }

.tafel { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1.5rem; }
.tafel + .tafel { margin-top: 1.25rem; }
.tafel h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }

.feld { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.feld:last-child { margin-bottom: 0; }
.feld[hidden] { display: none; }
.feld label, .feld .label { font-size: 0.92rem; font-weight: 500; color: var(--text-primary); }
.feld .wert { font-weight: 400; color: var(--primary-color); font-variant-numeric: tabular-nums; }
.zeile { display: flex; gap: 0.8rem; align-items: end; margin-bottom: 1rem; }
.zeile > * { flex: 1; min-width: 0; }
.zeile > .feld { margin-bottom: 0; }

select, input[type=number], input[type=text], input[type=tel], input[type=email], input[type=url] {
  font: inherit; width: 100%; padding: 0.7rem 0.8rem;
  border: 1px solid var(--border-color); border-radius: 8px;
  background: var(--bg-primary); color: var(--text-primary); transition: var(--transition);
}
select:focus, input[type=number]:focus, input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, input[type=url]:focus, textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
input::placeholder { color: var(--text-muted); }
input[type=range] { width: 100%; accent-color: var(--primary-color); }
.haken { display: flex; gap: 0.6rem; align-items: center; font-size: 0.95rem; color: var(--text-secondary); cursor: pointer; }
.haken + .haken { margin-top: 0.6rem; }
.haken input { width: 18px; height: 18px; accent-color: var(--primary-color); flex: none; }

.vorschau { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.25rem; box-shadow: 0 20px 40px var(--shadow-color); }
.vorschau canvas, .vorschau img { display: block; margin: 0 auto; width: 100%; height: auto; max-height: 70vh; object-fit: contain; border-radius: 8px; }
.reiter { display: inline-flex; gap: 0.25rem; padding: 0.3rem; margin-bottom: 1rem; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 10px; }
.reiter button { font: inherit; font-size: 0.92rem; font-weight: 500; background: none; border: 0; border-radius: 8px; padding: 0.45rem 0.9rem; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.reiter button:hover { color: var(--text-primary); }
.reiter button[aria-selected=true] { background: var(--gradient-primary); color: #fff; }

.hinweis { padding: 0.9rem 1rem; border: 1px solid rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.08); border-radius: 8px; margin: 1rem 0; font-size: 0.95rem; color: var(--text-secondary); }
.hinweis.warn { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.1); color: #fde68a; }
.hinweis a { font-weight: 600; }

.dateiliste { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.dateiliste li { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.9rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--border-color); }
.dateiliste li:first-child { padding-top: 0; }
.dateiliste img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--bg-tertiary); }
.dateiliste .name { overflow-wrap: anywhere; font-size: 0.95rem; color: var(--text-primary); }
.dateiliste .info { display: block; font-size: 0.85rem; color: var(--text-secondary); }
.dateiliste .aktionen { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.dateiliste .aktionen button { font: inherit; font-size: 0.85rem; font-weight: 500; padding: 0.4rem 0.7rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-primary); color: var(--text-primary); cursor: pointer; transition: var(--transition); }
.dateiliste .aktionen button:hover:not(:disabled) { border-color: var(--primary-color); }
.dateiliste .aktionen button:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 520px) { .dateiliste li { grid-template-columns: 48px 1fr; } .dateiliste img { width: 48px; height: 48px; } .dateiliste .aktionen { grid-column: 1 / -1; justify-content: flex-start; } }

.ergebnis dl { display: grid; grid-template-columns: minmax(7rem, max-content) 1fr; gap: 0.5rem 1.2rem; margin: 0; }
.ergebnis dt { font-weight: 500; color: var(--text-muted); font-size: 0.92rem; }
.ergebnis dd { margin: 0; overflow-wrap: anywhere; color: var(--text-primary); }
.ergebnis h3 { margin-top: 1.25rem; margin-bottom: 0.5rem; font-size: 1rem; }
.ergebnis > h2 + h3 { margin-top: 0; }
.prompt { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.9rem 1rem; font-size: 0.95rem; color: var(--text-primary); margin: 0 0 0.6rem; }
.kopieren { font: inherit; font-size: 0.85rem; font-weight: 500; padding: 0.4rem 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-primary); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.kopieren:hover { border-color: var(--primary-color); color: var(--text-primary); }
.ergebnis details { margin-top: 1rem; color: var(--text-secondary); }
.ergebnis summary { cursor: pointer; color: var(--primary-color); font-weight: 500; }
.ergebnis details .prompt { margin-top: 0.6rem; }

.status { min-height: 1.5em; font-size: 0.95rem; color: var(--text-secondary); margin-top: 0.9rem; }
.status:empty { margin-top: 0; min-height: 0; }
.status.fehler { color: var(--warning-color); font-weight: 500; }

/* ---------- Erklärung + FAQ ---------- */
.erklaerung-raster { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 960px) { .erklaerung-raster { grid-template-columns: 1fr 1fr; } }
.erklaerung h2 { font-size: 1.6rem; }
.erklaerung ol, .erklaerung ul { padding-left: 1.3rem; color: var(--text-secondary); margin: 0 0 1rem; }
.erklaerung li { margin-bottom: 0.4rem; }
.erklaerung b { color: var(--text-primary); }
.faq details { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1rem 1.25rem; margin-bottom: 0.8rem; transition: var(--transition); }
.faq details[open] { border-color: rgba(59, 130, 246, 0.5); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary-color); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.7rem 0 0; }

/* ---------- Werbung: genau ein Platz pro Seite ---------- */
.werbe-bereich { padding: 2.5rem 0; background: var(--bg-primary); }
.werbung { max-width: 760px; min-height: 100px; margin: 0 auto; display: grid; place-items: center; border: 1px dashed var(--border-color); border-radius: var(--border-radius); color: var(--text-muted); font-size: 0.85rem; }
.werbung:empty::before { content: "Anzeige"; }

/* ---------- Fußzeile ---------- */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); padding: 3rem 0 1rem; }
.footer-raster { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 760px) { .footer-raster { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { margin: 0 0 0.9rem; font-size: 1rem; color: var(--text-primary); }
.footer p { font-size: 0.95rem; max-width: 40ch; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer ul a { color: var(--text-secondary); font-size: 0.95rem; }
.footer ul a:hover { color: var(--primary-color); }
.footer-unten { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.88rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .knopf:hover, a.feature-card:hover, .vorschlaege a:hover { transform: none; }
}

.abschnitt.arbeit { padding-top: 2.5rem; }
.karte-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tag { font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; color: var(--text-secondary); background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); white-space: nowrap; }
.feature-icon { flex: none; }

/* ---------- Fortschritt, KI ---------- */
.fortschritt { height: 8px; border-radius: 999px; background: var(--bg-primary); border: 1px solid var(--border-color); overflow: hidden; margin-top: 1rem; }
.fortschritt[hidden] { display: none; }
.fortschritt > div { height: 100%; width: 0; background: var(--gradient-primary); transition: width 0.2s ease; }
.ki-hinweis { margin: 0 0 1.25rem; }
.schachbrett canvas { background-color: #fff; background-image: linear-gradient(45deg, #d6dbe3 25%, transparent 25%), linear-gradient(-45deg, #d6dbe3 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d6dbe3 75%), linear-gradient(-45deg, transparent 75%, #d6dbe3 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.passbild-buehne canvas { touch-action: none; cursor: grab; max-height: 75vh; }
.passbild-buehne canvas:active { cursor: grabbing; }

/* ---------- Einbau ---------- */
.einbau { margin-top: 2rem; }
.einbau-knopf svg { width: 18px; height: 18px; stroke: currentColor; }
.einbau-dialog { margin-top: 1rem; }
.einbau-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; min-height: 3rem; }
.einbau-ansicht .abschnitt.arbeit { padding: 1rem 0; }
.einbau-ansicht .huelle { padding: 0 12px; }
.einbau-marke { margin: 1rem 0 0; font-size: 0.85rem; text-align: right; }
.einbau-marke a { color: var(--text-secondary); }

/* ---------- Aufgaben-Listen ---------- */
.aufgaben-liste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.aufgaben-liste.spalten { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.8rem 1.5rem; }
.aufgaben-liste a { display: block; padding: 0.85rem 1rem; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-primary); font-weight: 500; }
.abschnitt.hell .aufgaben-liste a { background: var(--bg-primary); }
.aufgaben-liste a:hover { border-color: rgba(59, 130, 246, 0.5); color: var(--text-primary); }
.aufgaben-liste a::after { content: " →"; color: var(--primary-color); }

/* ---------- Sprache ---------- */
.nav-link.sprache { font-weight: 700; font-size: 0.85rem; padding: 0.25rem 0.55rem; border: 1px solid var(--border-color); border-radius: 6px; }

/* ---------- Verpixeln: Galerie und markierbares Bild ---------- */
canvas.markieren { cursor: crosshair; touch-action: none; }
.galerie { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.galerie[hidden] { display: none; }
.galerie button { width: 100%; display: flex; flex-direction: column; gap: 0.3rem; padding: 0.5rem; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; }
.galerie li.aktiv button { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35); }
.galerie canvas { width: 100%; height: 90px; object-fit: contain; background: var(--bg-tertiary); border-radius: 6px; }
.galerie .name { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.galerie .info { font-size: 0.75rem; color: var(--text-secondary); }
.svg-box svg { display: block; width: 100%; height: auto; max-height: 70vh; }
textarea { width: 100%; font: inherit; color: var(--text-primary); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 8px; padding: 0.7rem 0.8rem; resize: vertical; }
.svg-box { background: #fff; border-radius: 8px; }
.datei-symbol { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-tertiary); font-size: 1.4rem; color: var(--text-secondary); }
.ocr-karte { margin-bottom: 1rem; }
.ocr-karte h3 { font-size: 1rem; margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.icon-raster { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.icon-raster figure { margin: 0; text-align: center; font-size: 0.8rem; color: var(--text-secondary); }
.icon-raster img { display: block; margin: 0 auto 0.3rem; image-rendering: pixelated; background: repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 12px 12px; border-radius: 4px; }
pre.code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.8rem; background: var(--bg-tertiary); padding: 0.8rem; border-radius: 8px; color: var(--text-primary); }
.comfy-liste { list-style: none; padding: 0; margin: 0 0 1rem; }
.comfy-liste li { padding: 0.6rem 0; border-bottom: 1px solid var(--border-color); overflow-wrap: anywhere; }
.comfy-liste .info { display: block; font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.vorschau img#bild { display: block; margin: 0 auto; max-width: 100%; max-height: 70vh; }
.farb-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.farb-raster .farbe { border: 1px solid var(--border-color); border-radius: 10px; padding: 1.4rem 0.7rem 0.6rem; text-align: left; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 0.2rem; }
.farb-raster .farbe span { font-size: 0.75rem; opacity: 0.85; }
.druck-tabelle { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.92rem; }
.druck-tabelle th, .druck-tabelle td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border-color); }
.druck-tabelle .stufe-gut td:last-child { color: #22c55e; }
.druck-tabelle .stufe-ok td:last-child { color: #84cc16; }
.druck-tabelle .stufe-mittel td:last-child { color: #f59e0b; }
.druck-tabelle .stufe-schlecht td:last-child { color: #ef4444; }
.farbpunkt { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border-color); }
.galerie img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.lora-zeile textarea { margin-top: 0.4rem; font-size: 0.85rem; }
.sammlung { margin-top: 2rem; }
.sammlung-kopf { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; justify-content: space-between; }
.sammlung-kopf input { max-width: 260px; }
.sammlung-liste { list-style: none; padding: 0; margin: 0.8rem 0 0; }
.sammlung-liste li { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.8rem; align-items: start; padding: 0.8rem 0; border-bottom: 1px solid var(--border-color); }
.sammlung-liste img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.sammlung-liste p { margin: 0.2rem 0; font-size: 0.88rem; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sammlung-liste .info { font-size: 0.75rem; color: var(--text-secondary); }
@media (max-width: 600px) { .sammlung-liste li { grid-template-columns: 48px 1fr; } .sammlung-liste .aktionen { grid-column: 1 / -1; } }
.ordner-knopf { margin-top: 0.8rem; background: none; border: 1px solid var(--border-color); color: var(--text-secondary); border-radius: 8px; padding: 0.4rem 0.9rem; font: inherit; font-size: 0.85rem; cursor: pointer; }
.ordner-knopf:hover { color: var(--text-primary); border-color: var(--primary-color); }
.hat-bild .leuchtpult .ordner-knopf { display: none; }
select.weiter { width: auto; min-width: 200px; }
.sprachwahl { position: relative; }
.sprachwahl summary { list-style: none; cursor: pointer; }
.sprachwahl summary::-webkit-details-marker { display: none; }
.sprachwahl ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 0.4rem; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; min-width: 140px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.sprachwahl li a { display: block; padding: 0.45rem 0.7rem; border-radius: 6px; color: var(--text-primary); }
.sprachwahl li a:hover { background: var(--bg-tertiary); }

/* Werkzeug-Menü oben */
.werkzeugwahl { position: static; }
.werkzeugwahl summary { list-style: none; cursor: pointer; }
.werkzeugwahl summary::-webkit-details-marker { display: none; }
.werkzeugwahl summary::after { content: "▾"; font-size: .75em; margin-left: .3rem; }
.werkzeugwahl[open] summary { color: var(--primary-color); }
.menue-tafel { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--navbar-hoehe) + 6px); z-index: 60;
  width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto;
  background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; padding: 1rem 1.2rem; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.menue-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .4rem 1.2rem; }
.menue-gruppe h4 { margin: .4rem 0 .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.menue-gruppe ul { list-style: none; margin: 0 0 .5rem; padding: 0; }
.menue-gruppe a { display: block; padding: .28rem .45rem; margin: 0 -.45rem; border-radius: 6px; color: var(--text-primary); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menue-gruppe a:hover { background: var(--bg-tertiary); color: var(--primary-color); }
@media (max-width: 860px) {
  .menue-tafel { left: 16px; right: 16px; width: auto; transform: none; }
  .menue-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menue-gruppe a { white-space: normal; font-size: .88rem; line-height: 1.25; }
}
