/* ThumbForge Studio – ein Leuchttisch für Thumbnails.
   Die Bilder sind das Bunte; alles drumherum bleibt neutral. Die einzige Farbe der Oberfläche ist der Fettstift:
   er umkreist das gewählte Bild (wie auf einem Kontaktbogen) und markiert die eine Hauptaktion je Seite.
   Schrift: Anton (die Schrift, in der Thumbnails selbst oft gesetzt sind) für Marke, Seitentitel und Bildnummern; Figtree für alles Übrige. */
@font-face { font-family: Anton; font-weight: 400; font-display: swap; src: url(fonts/anton-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2026, U+20AC; }
@font-face { font-family: Anton; font-weight: 400; font-display: swap; src: url(fonts/anton-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: Figtree; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2013-2014, U+2018-201E, U+2026, U+20AC, U+2190-2193, U+2605; }
@font-face { font-family: Figtree; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --tisch: #E6E9ED; --blatt: #FFFFFF; --mulde: #D8DDE3; --rand: #C3CAD2;
  --tinte: #14181D; --tinte2: #4E5964; --tinte3: #7A8591;
  --stift: #E8401C; --stift-tinte: #FFFFFF; --stift-zart: #FBE3DB; --stift-text: #B92F10;
  --gut: #1B7F4B; --gut-zart: #DDF1E5; --warn: #8A5200; --warn-zart: #F8EBD2; --schlecht: #B3261E; --schlecht-zart: #FBE4E1;
  --r1: 6px; --r2: 10px;
  --titel: Anton, "Arial Narrow", Impact, sans-serif;
  --text: Figtree, ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --tisch: #17191C; --blatt: #212428; --mulde: #2A2E33; --rand: #3A4048;
    --tinte: #F0F2F4; --tinte2: #B2BAC3; --tinte3: #88929D;
    --stift: #FF6238; --stift-tinte: #1A0A05; --stift-zart: #3B1D14; --stift-text: #FF8A68;
    --gut: #5CCB90; --gut-zart: #173322; --warn: #EDB45A; --warn-zart: #3A2C12; --schlecht: #FF8A80; --schlecht-zart: #3D1B18;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tisch); color: var(--tinte); font: 16px/1.5 var(--text); }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--stift); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; padding: 10px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--tisch) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rand); }
.marke { font: 400 26px/1 var(--titel); letter-spacing: .02em; text-decoration: none; color: var(--tinte); }
.marke span { color: var(--stift); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; color: var(--tinte2); }
.nav a:hover { color: var(--tinte); }
.nav a.an { color: var(--tinte); background: var(--mulde); }
.stand { margin-left: auto; font-size: 14px; color: var(--tinte3); display: flex; align-items: center; gap: 8px; }
.stand i { width: 9px; height: 9px; border-radius: 50%; background: var(--stift); animation: puls 1.5s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .3; } }

main:focus, main:focus-visible { outline: none; }
main { max-width: 1320px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 80px; outline: none; }
h1 { font: 400 clamp(32px, 4.2vw, 46px)/1.05 var(--titel); letter-spacing: .012em; margin: 0; }
h2 { font: 700 19px/1.3 var(--text); margin: 0 0 12px; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px; }
.seitenkopf p { margin: 8px 0 0; color: var(--tinte2); max-width: 64ch; }
.zurueck { display: inline-block; margin-bottom: 10px; color: var(--tinte2); text-decoration: none; font-weight: 600; font-size: 15px; }
.zurueck:hover { color: var(--tinte); }
.leise { color: var(--tinte2); }
.klein { font-size: 14px; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--rand); border-radius: 8px; background: var(--blatt); color: var(--tinte); font-weight: 650; text-decoration: none; cursor: pointer; }
.knopf:hover { border-color: var(--tinte3); }
.knopf.haupt { background: var(--stift); border-color: var(--stift); color: var(--stift-tinte); }
.knopf.haupt:hover { filter: brightness(1.06); }
.knopf.still { border-color: transparent; background: none; color: var(--tinte2); padding-inline: 10px; }
.knopf.still:hover { color: var(--tinte); background: var(--mulde); }
.knopf.gefahr { color: var(--schlecht); }
.knopf[disabled] { opacity: .55; cursor: default; }
.knopf.schmal { min-height: 34px; padding: 5px 11px; font-size: 14px; }

/* Bilder auf dem Tisch */
.tisch { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 30px 24px; }
.karte { display: block; text-decoration: none; color: inherit; }
.bild { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r1); background: var(--mulde); }
.bild img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.bild.passend img { object-fit: contain; }
.karte:hover .bild { outline: 2px solid var(--tinte3); outline-offset: 3px; }
.karte b { display: block; margin-top: 10px; font-weight: 650; line-height: 1.3; }
.karte small { display: block; color: var(--tinte2); font-size: 14px; margin-top: 2px; }
.bild .leer { position: absolute; inset: 0; display: grid; place-items: center; color: var(--tinte3); font-size: 14px; text-align: center; padding: 10px; }
/* Der Fettstift-Kreis um das gewählte Bild */
.favorit > .bild::after, .bild.favorit::after { content: ""; position: absolute; inset: -9px -11px; pointer-events: none;
  background: no-repeat center / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 190' preserveAspectRatio='none'%3E%3Cpath d='M22 104C10 52 74 10 168 9c88-1 142 30 141 84-1 58-70 90-158 88C74 179 12 150 16 96c3-40 46-70 118-80' fill='none' stroke='%23E8401C' stroke-width='4.5' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E"); }
/* Bild entsteht gerade */
.bild.laeuft { background: linear-gradient(110deg, var(--mulde) 30%, color-mix(in srgb, var(--mulde) 55%, var(--blatt)) 50%, var(--mulde) 70%) 0 0 / 220% 100%; animation: belichten 1.6s linear infinite; }
@keyframes belichten { to { background-position: -220% 0; } }
.bild.fehler { background: var(--schlecht-zart); }
.bild.fehler .leer { color: var(--schlecht); }
@media (prefers-reduced-motion: reduce) { .bild.laeuft, .stand i { animation: none; } }
.nr { font: 400 17px/1 var(--titel); letter-spacing: .04em; color: var(--tinte2); }

/* Leerer Tisch */
.leerseite { padding: 44px 0; max-width: 56ch; }
.leerseite h2 { font: 400 28px/1.15 var(--titel); letter-spacing: .012em; }
.leerseite p { color: var(--tinte2); margin: 0 0 18px; }

/* Formulare */
.blatt { background: var(--blatt); border: 1px solid var(--rand); border-radius: var(--r2); padding: clamp(16px, 2.4vw, 26px); }
.feld { display: block; margin-bottom: 16px; }
.feld > span:not(.wahl), .feldtitel { display: block; font-weight: 650; margin-bottom: 6px; }
.feld > .wahl { display: flex; width: fit-content; max-width: 100%; }
.feld small { display: block; color: var(--tinte2); font-size: 14px; margin-top: 5px; line-height: 1.4; }
input[type=text], input[type=url], input[type=password], input[type=number], textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--rand); border-radius: 8px; background: var(--blatt); min-height: 42px; }
textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
input:hover, textarea:hover, select:hover { border-color: var(--tinte3); }
.wahl { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; background: var(--blatt); }
.wahl label { position: relative; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.wahl span { display: block; min-width: 44px; padding: 9px 14px; text-align: center; font-weight: 600; color: var(--tinte2); border-left: 1px solid var(--rand); }
.wahl label:first-child span { border-left: 0; }
.wahl input:checked + span { background: var(--tinte); color: var(--tisch); }
.wahl input:focus-visible + span { outline: 3px solid var(--stift); outline-offset: -3px; }
.zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 20px; }
details.mehr { border-top: 1px solid var(--rand); padding-top: 14px; margin-top: 4px; }
details.mehr > summary { cursor: pointer; font-weight: 650; margin-bottom: 14px; }
.neu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 28px; align-items: start; }
.neu aside h2 { font-size: 16px; }
.neu aside .refs-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.neu aside .refs-mini .bild { border-radius: 4px; }
@media (max-width: 900px) { .neu { grid-template-columns: minmax(0, 1fr); } }

/* Entwurf: großes Bild, Streifen, Pult */
.pult { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 30px; align-items: start; }
@media (max-width: 980px) { .pult { grid-template-columns: minmax(0, 1fr); } }
.gross { padding: 14px; }
.gross .bild { border-radius: 8px; }
.groessen { margin-top: 14px; border-radius: 8px; overflow: hidden; border: 1px solid var(--rand); }
.streifen { display: flex; gap: 16px; overflow-x: auto; padding: 18px 12px 12px; margin: 6px -12px 0; scroll-snap-type: x proximity; }
.streifen button { flex: 0 0 168px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; scroll-snap-align: start; }
.streifen .bild { border-radius: 4px; }
.streifen button[aria-pressed=true] .bild { outline: 3px solid var(--tinte); outline-offset: 3px; }
.streifen .unter { display: flex; align-items: baseline; gap: 8px; margin-top: 9px; }
.streifen .unter small { color: var(--tinte3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runde-trenner { flex: 0 0 1px; background: var(--rand); margin: 0 2px; }
.pultseite h2 { display: flex; align-items: baseline; gap: 10px; }
.pultseite h2 .nr { font-size: 30px; color: var(--tinte); }
.angaben { margin: 0 0 18px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; }
.angaben dt { color: var(--tinte2); }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.abschnitt { border-top: 1px solid var(--rand); padding-top: 18px; margin-top: 18px; }
.haken { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; color: var(--tinte2); margin: 10px 0 0; cursor: pointer; }
.haken input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--stift); flex: none; }
pre.auftrag { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--mulde); border-radius: 8px; padding: 12px; max-height: 320px; overflow: auto; margin: 10px 0 0; }
.meldung { padding: 11px 14px; border-radius: 8px; background: var(--warn-zart); color: var(--warn); font-size: 15px; margin-bottom: 16px; }
.meldung.schlecht { background: var(--schlecht-zart); color: var(--schlecht); }
.meldung.gut { background: var(--gut-zart); color: var(--gut); }

/* Stil: Referenzen */
.ablage { display: grid; place-items: center; gap: 6px; padding: 30px 16px; border: 2px dashed var(--rand); border-radius: var(--r2); text-align: center; color: var(--tinte2); cursor: pointer; background: color-mix(in srgb, var(--blatt) 55%, transparent); }
.ablage.drueber { border-color: var(--stift); background: var(--stift-zart); color: var(--stift-text); }
.ablage b { color: var(--tinte); font-size: 17px; }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 22px 18px; margin-top: 22px; }
.ref .bild { border-radius: 5px; }
.ref.aus .bild img { opacity: .35; filter: grayscale(1); }
.ref .zeile { display: flex; gap: 6px; margin-top: 8px; }
.ref select, .ref input[type=text] { min-height: 36px; padding: 6px 9px; font-size: 14px; }
.ref .knopf { min-height: 36px; padding: 5px 9px; font-size: 14px; }

/* Verbindungen */
.adresse { display: flex; gap: 8px; }
.adresse input { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.verbindung { margin-bottom: 14px; }
.verbindung > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verbindung > summary::-webkit-details-marker { display: none; }
.verbindung > summary b { font-size: 17px; }
.verbindung[open] > summary { margin-bottom: 18px; }
.zustand { font-size: 13.5px; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: var(--mulde); color: var(--tinte2); }
.zustand.gut { background: var(--gut-zart); color: var(--gut); }
.zustand.schlecht { background: var(--schlecht-zart); color: var(--schlecht); }
.zustand.warn { background: var(--warn-zart); color: var(--warn); }
.testzeile { font-size: 14.5px; color: var(--tinte2); margin: 12px 0 0; overflow-wrap: anywhere; }
.schritte { margin: 0; padding-left: 20px; color: var(--tinte2); }
.schritte li { margin-bottom: 6px; }
.zahlen { display: flex; gap: 34px; flex-wrap: wrap; margin: 0; }
.zahlen div dt { color: var(--tinte2); font-size: 14px; }
.zahlen div dd { margin: 0; font: 400 34px/1.1 var(--titel); letter-spacing: .02em; }

/* Anmeldung */
.tor { max-width: 380px; margin: 12vh auto 0; }
.tor .marke { font-size: 54px; display: block; margin-bottom: 26px; }

.hinweis { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(92vw, 560px); padding: 12px 18px; border-radius: 10px; background: var(--tinte); color: var(--tisch); font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
.hinweis.schlecht { background: var(--schlecht); color: #fff; }

@media (max-width: 620px) {
  .kopf { gap: 12px; flex-wrap: wrap; }
  .marke { font-size: 22px; }
  .nav { order: 3; width: 100%; margin: 0 -6px; }
  .nav a { flex: 1; text-align: center; padding: 9px 6px; }
  .tisch { gap: 26px 16px; }
}
.feld > span em { font-style: normal; font-weight: 400; margin-left: 6px; }
