/* Puschen-Konfigurator – 3D-Oberfläche. Gestaltung aus dem Prototyp „Lederpuschen Werkstatt“ (Galerie-Katalog:
   helle Bühne, das Paar ist das einzige farbige Objekt, Haarlinien statt Schatten, Pillen für Aktionen).
   Alles unter .pk3d und mit pk3-Klassen, damit das Theme nicht hineinfunkt. Schriften kommen vom Theme;
   Farben = CI der Lederpuschenstube (Hausgrün dunkel #5E7F00 für Kaufknöpfe, Schrift #231F1F); über die
   Variablen unten anpassbar. */
.pk3d {
  --pk3-flaeche: #FFFFFF;
  --pk3-hintergrund: var(--wp--preset--color--base, #FFFFFF);
  --pk3-kulisse: #EBF0DE;
  --pk3-kulisse-tief: #DEE6CB;
  --pk3-tinte: #231F1F;
  --pk3-gruen: #5E7F00;
  --pk3-gruen-tief: #4A6500;
  --pk3-graphit: #4A4D51;
  --pk3-nebel: #6E7277;
  --pk3-haar: #DCE2CE;
  --pk3-faden: #5E7F00;
  --pk3-sperre: #A8323D;
  --pk3-sperre-weich: #F5E2E4;
  --pk3-warn: #835700;
  --pk3-warn-weich: #F6EDD6;
  --pk3-f-anzeige: inherit;
  --pk3-f-mono: ui-monospace, "JetBrains Mono", Consolas, monospace;
  --pk3-oben: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
  color: var(--pk3-tinte);
  font-size: 15.5px;
  line-height: 1.55;
  box-sizing: border-box;
}
.pk3d *, .pk3d *::before, .pk3d *::after { box-sizing: border-box; }
.pk3d [hidden] { display: none !important; }
.pk3d h2, .pk3d h3 { font-family: var(--pk3-f-anzeige); margin: 0; letter-spacing: -0.02em; text-wrap: balance; color: inherit; }
.pk3d h3 { font-size: 19px; line-height: 1.2; font-weight: 500; }
.pk3d p { margin: 0; }
.pk3d a { color: inherit; }
.pk3d button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; border-radius: 0; min-height: 0; width: auto; line-height: inherit; }
.pk3d input, .pk3d textarea, .pk3d select { font: inherit; color: var(--pk3-tinte); margin: 0; box-shadow: none; }
.pk3d :focus-visible { outline: 2px solid var(--pk3-tinte); outline-offset: 3px; }
.pk3d .pk3-etikett { font-family: var(--pk3-f-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--pk3-nebel); }
.pk3d .pk3-mono { font-family: var(--pk3-f-mono); font-variant-numeric: tabular-nums; }
.pk3d .pk3-leise { color: var(--pk3-nebel); }
.pk3d .pk3-klein { font-size: 13.5px; }
.pk3d .pk3-zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pk3d .pk3-svg-schild { font-family: var(--pk3-f-mono); font-size: 11px; fill: #868A8F; }

/* Pillen und Chips */
.pk3d .pk3-pille { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--pk3-gruen); color: #fff; border-radius: 999px; padding: 14px 24px; font-weight: 500; font-size: 15px; line-height: 1.2; white-space: nowrap; transition: transform .15s ease, opacity .15s; }
.pk3d .pk3-pille:hover { transform: translateY(-1px); background: var(--pk3-gruen-tief); }
.pk3d .pk3-pille[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.pk3d .pk3-pille.pk3-hell { background: transparent; color: var(--pk3-gruen-tief); box-shadow: inset 0 0 0 1px var(--pk3-gruen); }
.pk3d .pk3-pille.pk3-hell:hover { background: #E4EDC6; }
.pk3d .pk3-pille[disabled]:hover { background: var(--pk3-gruen); }
.pk3d .pk3-pille.pk3-klein { padding: 9px 16px; font-size: 14px; }
.pk3d .pk3-chip { border-radius: 999px; padding: 7px 14px; font-size: 14px; line-height: 1.3; box-shadow: inset 0 0 0 1px var(--pk3-haar); background: var(--pk3-flaeche); white-space: nowrap; }
.pk3d .pk3-chip small { font-family: var(--pk3-f-mono); font-size: 11.5px; color: var(--pk3-nebel); margin-left: 6px; }
.pk3d .pk3-chip[aria-pressed="true"] { background: var(--pk3-tinte); color: #fff; box-shadow: none; }
.pk3d .pk3-chip[aria-pressed="true"] small { color: #c9ccd0; }
.pk3d .pk3-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pk3d .pk3-gesperrt { opacity: .42; background-image: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(0,0,0,.07) 6px 7px) !important; }
.pk3d .pk3-textknopf { font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; color: var(--pk3-graphit); }

/* Produkt: links die Bühne, rechts die Schritte */
.pk3d .pk3-produkt { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3.5vw, 56px); align-items: start; padding-block: 8px 40px; }
.pk3d .pk3-produkt-buehne { position: sticky; top: var(--pk3-oben); }
.pk3d .pk3-buehne { position: relative; background: radial-gradient(120% 90% at 50% 30%, #F7F8F5 0%, var(--pk3-kulisse) 62%, var(--pk3-kulisse-tief) 100%); height: min(74vh, 720px); min-height: 380px; max-width: 100%; overflow: hidden; }
.pk3d .pk3-buehne canvas.studio-leinwand { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; z-index: 1; max-width: none; }
.pk3d .pk3-buehne canvas.studio-leinwand:active { cursor: grabbing; }
.pk3d .pk3-flach { position: absolute; inset: 0; display: grid; place-items: center; padding: 6%; }
.pk3d .pk3-flach svg { width: 100%; height: auto; }
.pk3d .pk3-flach.pk3-mit-foto { padding: 0; }
.pk3d .pk3-flach-paar { width: 100%; max-width: 640px; }
.pk3d .pk3-paar-ansicht { display: grid; gap: 10px; width: 100%; }
.pk3d .pk3-paar-ansicht svg { width: 100%; height: auto; display: block; }
.pk3d .pk3-paar-ansicht svg + svg { width: 58%; justify-self: center; }
.pk3d .pk3-buehne-oben, .pk3d .pk3-buehne-leiste { position: absolute; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; pointer-events: none; z-index: 2; }
.pk3d .pk3-buehne-oben { top: 14px; align-items: start; }
.pk3d .pk3-buehne-leiste { bottom: 14px; align-items: end; }
.pk3d .pk3-buehne-oben > *, .pk3d .pk3-buehne-leiste > * { pointer-events: auto; }
.pk3d .pk3-glas { background: rgba(255, 255, 255, .78); backdrop-filter: blur(8px); border-radius: 999px; padding: 4px; display: flex; gap: 2px; }
.pk3d .pk3-glas button { border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--pk3-graphit); }
.pk3d .pk3-glas button[aria-pressed="true"] { background: var(--pk3-tinte); color: #fff; }
.pk3d .pk3-hinweis-dreh { font-size: 12.5px; color: var(--pk3-graphit); background: rgba(255, 255, 255, .7); padding: 5px 10px; border-radius: 999px; }

/* Fotos */
.pk3d .pk3-galerie { position: absolute; inset: 0; background: #fff; }
.pk3d .pk3-galerie-bild { width: 100%; height: 100%; object-fit: contain; display: block; max-width: none; }
.pk3d .pk3-galerie-zahl { position: absolute; right: 14px; bottom: 14px; font-size: 12px; background: rgba(255,255,255,.85); padding: 3px 9px; border-radius: 999px; color: var(--pk3-graphit); }
.pk3d .pk3-galerie-3d { position: absolute; left: 14px; bottom: 14px; z-index: 2; font-size: 13px; background: var(--pk3-tinte); color: #fff; padding: 7px 14px; border-radius: 999px; }
.pk3d .pk3-galerie-3d:hover { background: var(--pk3-gruen-tief); }
.pk3d .pk3-galerie-pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.88); font-size: 26px; line-height: 1; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--pk3-haar); z-index: 2; text-align: center; }
.pk3d .pk3-galerie-pfeil.pk3-links { left: 14px; }
.pk3d .pk3-galerie-pfeil.pk3-rechts { right: 14px; }
.pk3d .pk3-foto-streifen { display: grid; gap: 8px; margin-top: 14px; }
.pk3d .pk3-foto-streifen:empty { display: none; }
.pk3d .pk3-foto-reihe { display: flex; gap: 4px; overflow-x: auto; }
.pk3d .pk3-foto-reihe button { flex: none; width: 76px; height: 76px; background: #fff; overflow: hidden; }
.pk3d .pk3-foto-reihe button img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pk3d .pk3-foto-reihe button[aria-pressed="true"] { outline: 2px solid var(--pk3-tinte); outline-offset: -2px; }

/* Rechte Spalte */
.pk3d .pk3-spalte { min-width: 0; }
.pk3d .pk3-produkt-info { display: grid; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--pk3-haar); }
.pk3d .pk3-titel { font-size: clamp(28px, 3vw, 40px); line-height: 1.05; font-weight: 400; }
.pk3d .pk3-preiszeile { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.pk3d .pk3-preiszeile .pk3-preis { font-family: var(--pk3-f-anzeige); font-size: 32px; font-weight: 400; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pk3d .pk3-posten { display: grid; gap: 3px; font-size: 13.5px; color: var(--pk3-graphit); margin-top: 8px; }
.pk3d .pk3-posten div { display: flex; justify-content: space-between; gap: 12px; }
.pk3d .pk3-posten div span:last-child { font-family: var(--pk3-f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk3d .pk3-schritt { border-bottom: 1px solid var(--pk3-haar); padding-block: 22px; display: grid; gap: 14px; }
.pk3d .pk3-schritt-kopf { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pk3d .pk3-schritt-kopf .pk3-nr { font-family: var(--pk3-f-mono); font-size: 12px; color: var(--pk3-faden); }
.pk3d .pk3-schritt-kopf .pk3-stand { margin-left: auto; font-size: 13.5px; color: var(--pk3-nebel); }
.pk3d .pk3-groessen { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.pk3d .pk3-gr { box-shadow: inset 0 0 0 1px var(--pk3-haar); background: var(--pk3-flaeche); padding: 8px 2px 7px; display: grid; gap: 0; text-align: center; }
.pk3d .pk3-gr b { font-family: var(--pk3-f-anzeige); font-weight: 400; font-size: 18px; line-height: 1.1; }
.pk3d .pk3-gr span { font-family: var(--pk3-f-mono); font-size: 10px; color: var(--pk3-nebel); }
.pk3d .pk3-gr[aria-pressed="true"] { background: var(--pk3-tinte); color: #fff; box-shadow: none; }
.pk3d .pk3-gr[aria-pressed="true"] span { color: #bfc2c6; }
.pk3d .pk3-fuss-zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--pk3-graphit); }
.pk3d .pk3-fuss-zeile input { width: 82px; border: 0; border-bottom: 1px solid var(--pk3-tinte); border-radius: 0; background: transparent; font-size: 16px; padding: 3px 0; text-align: center; outline: none; }
.pk3d .pk3-motiv-wahl { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.pk3d .pk3-motiv-wahl .pk3-bild { background: var(--pk3-kulisse); aspect-ratio: 1; display: grid; place-items: center; padding: 6px; position: relative; overflow: hidden; }
.pk3d .pk3-motiv-wahl .pk3-bild svg { width: 100%; height: auto; }
.pk3d .pk3-motiv-wahl strong { font-weight: 500; font-size: 16px; display: block; }
.pk3d .pk3-motiv-wahl .pk3-leise { display: block; }
.pk3d .pk3-bild.pk3-foto { padding: 0; background: #fff; }
.pk3d .pk3-bild.pk3-foto > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s ease, transform .6s ease; max-width: none; }
.pk3d .pk3-flicken-raster { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.pk3d .pk3-flicken-raster.pk3-garn { grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.pk3d .pk3-flicken { aspect-ratio: 1; background: var(--sw); background-size: cover; background-position: center; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.pk3d .pk3-flicken::after { content: ""; position: absolute; inset: 3px; border: 1px dashed rgba(255,255,255,.55); }
.pk3d .pk3-flicken.pk3-hell::after { border-color: rgba(40,30,25,.28); }
.pk3d .pk3-flicken[aria-pressed="true"] { outline: 2px solid var(--pk3-tinte); outline-offset: 2px; z-index: 1; }
.pk3d .pk3-flicken.pk3-gesperrt { background-image: repeating-linear-gradient(-45deg, transparent 0 3px, rgba(0,0,0,.4) 3px 4.5px) !important; opacity: .55; }
.pk3d .pk3-farb-kopf { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--pk3-graphit); margin-bottom: 8px; }
.pk3d .pk3-farb-kopf b { font-weight: 500; color: var(--pk3-tinte); }
.pk3d .pk3-feld { display: grid; gap: 4px; }
.pk3d .pk3-feld-text { width: 100%; border: 0; border-bottom: 1px solid var(--pk3-tinte); border-radius: 0; background: transparent; padding: 8px 0; font-size: 18px; outline: none; }
.pk3d .pk3-feld-text.pk3-gross { font-family: var(--pk3-f-anzeige); font-size: 30px; font-weight: 300; }
.pk3d textarea.pk3-feld-text { font-size: 15px; min-height: 64px; resize: vertical; border: 1px solid var(--pk3-haar); padding: 10px; }
.pk3d .pk3-name-details { display: grid; gap: 16px; }
.pk3d .pk3-name-gruppen { display: grid; gap: 8px; }
.pk3d .pk3-namen-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.pk3d .pk3-zaehler { font-family: var(--pk3-f-mono); font-size: 12.5px; color: var(--pk3-nebel); padding-bottom: 12px; }
.pk3d .pk3-zaehler.pk3-voll { color: var(--pk3-sperre); }
.pk3d .pk3-schriften { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pk3d .pk3-schrift { box-shadow: inset 0 0 0 1px var(--pk3-haar); background: var(--pk3-flaeche); padding: 10px 6px 8px; display: grid; gap: 2px; text-align: center; min-width: 0; }
.pk3d .pk3-schrift .pk3-probe { font-size: 21px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk3d .pk3-schrift span:last-child { font-size: 11px; color: var(--pk3-nebel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk3d .pk3-schrift[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pk3-tinte); }
.pk3d .pk3-gruppe-label { font-family: var(--pk3-f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--pk3-nebel); align-self: center; min-width: 96px; }
.pk3d .pk3-hinweis { background: var(--pk3-sperre-weich); color: var(--pk3-sperre); padding: 12px 14px; display: grid; gap: 10px; font-size: 14px; }
.pk3d .pk3-hinweis .pk3-chip { box-shadow: inset 0 0 0 1px currentColor; background: transparent; color: var(--pk3-sperre); white-space: normal; }
.pk3d .pk3-meldungen { display: grid; gap: 6px; }
.pk3d .pk3-meldung { padding: 9px 12px; font-size: 13.5px; }
.pk3d .pk3-meldung b { font-weight: 600; margin-right: 6px; }
.pk3d .pk3-meldung.pk3-sperre { background: var(--pk3-sperre-weich); color: var(--pk3-sperre); }
.pk3d .pk3-meldung.pk3-warnung { background: var(--pk3-warn-weich); color: var(--pk3-warn); }
.pk3d .pk3-meldung.pk3-offen { background: var(--pk3-kulisse); color: var(--pk3-graphit); }
.pk3d .pk3-kaufbox { position: sticky; bottom: 0; background: var(--pk3-hintergrund); padding-block: 16px; display: grid; gap: 12px; border-top: 1px solid var(--pk3-haar); z-index: 3; }
.pk3d .pk3-kauf-zeile { display: flex; gap: 12px; align-items: center; }
.pk3d .pk3-kauf-zeile .pk3-pille { flex: 1; }
.pk3d .pk3-menge { display: inline-flex; align-items: center; justify-content: space-between; min-width: 124px; box-shadow: inset 0 0 0 1px var(--pk3-haar); border-radius: 999px; background: var(--pk3-flaeche); flex: none; }
.pk3d .pk3-menge button { width: 40px; height: 44px; font-size: 18px; text-align: center; }
.pk3d .pk3-menge span { min-width: 22px; text-align: center; font-family: var(--pk3-f-mono); }
.pk3d .pk3-fakten { display: grid; gap: 6px; font-size: 14px; color: var(--pk3-graphit); padding-top: 18px; }
.pk3d .pk3-fakten div { display: flex; gap: 10px; }
.pk3d .pk3-fakten div::before { content: "—"; color: var(--pk3-nebel); }

/* Motivwahl (Overlay über die ganze Seite) */
.pk3d .pk3-overlay { position: fixed; inset: 0; top: var(--wp-admin--admin-bar--height, 0px); z-index: 99990; background: var(--pk3-hintergrund); overflow: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }
html.pk3-overlay-offen, html.pk3-overlay-offen body { overflow: hidden; }
.pk3d .pk3-overlay-kopf { position: sticky; top: 0; z-index: 2; background: var(--pk3-hintergrund); border-bottom: 1px solid var(--pk3-haar); }
.pk3d .pk3-overlay-rahmen { max-width: 1320px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.pk3d .pk3-overlay-kopf .pk3-overlay-rahmen { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 64px; }
.pk3d .pk3-overlay-inhalt { padding-top: 26px; }
.pk3d .pk3-liste { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 90px; }
.pk3d .pk3-filter { position: sticky; top: 88px; display: grid; gap: 22px; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.pk3d .pk3-filter-gruppe { display: grid; gap: 8px; }
.pk3d .pk3-filter-liste { display: grid; gap: 1px; }
.pk3d .pk3-filter-liste button { display: flex; align-items: baseline; padding: 5px 0; font-size: 14.5px; color: var(--pk3-graphit); }
.pk3d .pk3-filter-liste button small { font-family: var(--pk3-f-mono); font-size: 11.5px; color: var(--pk3-nebel); margin-left: auto; }
.pk3d .pk3-filter-liste button[aria-pressed="true"] { color: var(--pk3-tinte); font-weight: 600; }
.pk3d .pk3-filter-liste button[aria-pressed="true"]::before { content: "—"; margin-right: 6px; }
.pk3d .pk3-liste-kopf { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.pk3d .pk3-liste-kopf input[type="search"] { border: 0; border-bottom: 1px solid var(--pk3-haar); border-radius: 0; background: transparent; padding: 8px 0; min-width: 260px; font-size: 15px; outline: none; }
.pk3d .pk3-liste-kopf input[type="search"]:focus { border-bottom-color: var(--pk3-tinte); }
.pk3d select.pk3-sortierung { border: 0; background: transparent; font-size: 14px; color: var(--pk3-graphit); padding: 6px 2px; }
.pk3d .pk3-filter-knopf { display: none; }
.pk3d .pk3-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 2px; }
.pk3d .pk3-karte { display: grid; gap: 10px; text-align: left; align-content: start; }
.pk3d .pk3-karte .pk3-bild { background: var(--pk3-kulisse); aspect-ratio: 1; display: grid; place-items: center; padding: 6%; position: relative; overflow: hidden; }
.pk3d .pk3-karte .pk3-bild svg { width: 100%; height: auto; transition: transform .35s ease; }
.pk3d .pk3-karte:hover .pk3-bild svg { transform: scale(1.05); }
.pk3d .pk3-karte .pk3-bild.pk3-foto > img.pk3-zweit { opacity: 0; }
.pk3d .pk3-karte:hover .pk3-bild.pk3-foto > img.pk3-zweit { opacity: 1; }
.pk3d .pk3-karte:hover .pk3-bild.pk3-foto > img.pk3-erst { transform: scale(1.04); }
.pk3d .pk3-marken { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 1; }
.pk3d .pk3-marke { font-size: 11px; background: rgba(255,255,255,.85); border-radius: 999px; padding: 2px 8px; color: var(--pk3-graphit); }
.pk3d .pk3-karte .pk3-text { padding: 0 14px 0 2px; display: grid; gap: 1px; }
.pk3d .pk3-karte .pk3-name { font-size: 15px; line-height: 1.3; }
.pk3d .pk3-karte .pk3-meta { font-family: var(--pk3-f-mono); font-size: 11.5px; color: var(--pk3-nebel); }
.pk3d .pk3-karte .pk3-preis { font-size: 15px; margin-top: 3px; }
.pk3d .pk3-karte.pk3-gesperrt .pk3-bild { filter: grayscale(.8); }
.pk3d .pk3-mehr { display: flex; justify-content: center; padding-top: 40px; }
.pk3d .pk3-leer { padding: 60px 20px; text-align: center; color: var(--pk3-nebel); border: 1px dashed var(--pk3-haar); }

/* „Selbst gestalten“: Umschalter, Editor auf dem flachen Schnittteil, Bibliothek der Stickdateien */
.pk3d .pk3-modus { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.pk3d .pk3-modus button { box-shadow: inset 0 0 0 1px var(--pk3-haar); background: var(--pk3-flaeche); padding: 12px 14px; display: grid; gap: 2px; text-align: left; border-radius: 10px; }
.pk3d .pk3-modus button b { font-weight: 500; font-size: 15px; }
.pk3d .pk3-modus button span { font-size: 12.5px; color: var(--pk3-nebel); line-height: 1.35; }
.pk3d .pk3-modus button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pk3-gruen); }
.pk3d .pk3-frei { display: grid; gap: 12px; }
.pk3d .pk3-frei[hidden] { display: none; }
.pk3d .pk3-frei-kopf { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.pk3d .pk3-frei-buehne { background: var(--pk3-kulisse); padding: 16px 12px; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.pk3d .pk3-frei-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pk3d .pk3-frei-buehne .pk3-frei-svg { max-height: 360px; }
.pk3d .pk3-frei-svg.pk3-interaktiv .pk3-frei-el { cursor: grab; }
.pk3d .pk3-frei-svg.pk3-interaktiv .pk3-frei-el:active { cursor: grabbing; }
.pk3d .pk3-frei-rahmen { fill: transparent; stroke: transparent; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pk3d .pk3-frei-el:hover .pk3-frei-rahmen { stroke: rgba(18, 19, 21, .4); stroke-dasharray: 3 3; }
.pk3d .pk3-frei-rahmen.pk3-an { stroke: var(--pk3-tinte); stroke-width: 1.5; stroke-dasharray: 5 3; }
.pk3d .pk3-frei-rahmen.pk3-fehler { stroke: var(--pk3-sperre); stroke-width: 1.8; stroke-dasharray: none; }
.pk3d .pk3-frei-feld { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.pk3d .pk3-frei-erkl { margin: -4px 0 0; }
.pk3d .pk3-frei-werkzeug { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pk3d .pk3-frei-trenner { flex: 1; }
.pk3d .pk3-frei-kopie { display: inline-flex; gap: 4px 12px; align-items: baseline; flex-wrap: wrap; }
.pk3d .pk3-frei-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.pk3d .pk3-chip.pk3-fehler { box-shadow: inset 0 0 0 1.5px var(--pk3-sperre); color: var(--pk3-sperre); }
.pk3d .pk3-chip.pk3-weg { color: var(--pk3-sperre); }
.pk3d .pk3-frei-panel { background: var(--pk3-flaeche); box-shadow: inset 0 0 0 1px var(--pk3-haar); padding: 14px; display: grid; gap: 12px; border-radius: 10px; }
.pk3d .pk3-frei-panel:empty { display: none; }
.pk3d .pk3-frei-panel-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pk3d .pk3-frei-panel-kopf strong { font-weight: 500; font-size: 16px; }
.pk3d .pk3-frei-regler { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.pk3d .pk3-frei-regler input { width: 100%; accent-color: var(--pk3-gruen); }
.pk3d .pk3-frei-regler output { font-family: var(--pk3-f-mono); font-size: 12px; color: var(--pk3-graphit); text-align: right; white-space: nowrap; }
.pk3d .pk3-frei-aktionen { padding-top: 10px; border-top: 1px solid var(--pk3-haar); }
.pk3d .pk3-frei-ansicht { display: grid; gap: 14px; width: 100%; padding: 0 12px; }
.pk3d .pk3-frei-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.pk3d .pk3-frei-paar.pk3-ferse { width: 84%; justify-self: center; }
.pk3d .pk3-frei-teil { margin: 0; display: grid; gap: 4px; align-content: start; }
.pk3d .pk3-frei-teil figcaption { font-family: var(--pk3-f-mono); font-size: 10.5px; color: var(--pk3-nebel); text-align: center; letter-spacing: .06em; text-transform: uppercase; }
.pk3d .pk3-bib-kopf { display: grid; gap: 6px; margin-bottom: 14px; }
.pk3d .pk3-bib-kopf input { border: 0; border-bottom: 1px solid var(--pk3-tinte); background: transparent; padding: 8px 0; font-size: 20px; outline: none; max-width: 520px; }
.pk3d .pk3-bib-themen { margin-bottom: 18px; }
.pk3d .pk3-bib-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 8px; padding-bottom: 40px; }
.pk3d .pk3-bib-zelle { background: var(--pk3-flaeche); box-shadow: inset 0 0 0 1px var(--pk3-haar); padding: 10px; display: grid; gap: 3px; text-align: center; min-width: 0; transition: box-shadow .15s; border-radius: 8px; }
.pk3d .pk3-bib-zelle:hover { box-shadow: inset 0 0 0 1px var(--pk3-tinte); }
.pk3d .pk3-bib-bild { width: 100%; aspect-ratio: 1; background-repeat: no-repeat; background-color: var(--pk3-kulisse); border-radius: 4px; }
.pk3d .pk3-bib-name { font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk3d .pk3-bib-zelle .pk3-mono { font-size: 10.5px; line-height: 1.3; }

/* Handy-Leiste und Meldung */
.pk3d .pk3-handyleiste { display: none; }
.pk3d .pk3-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); background: var(--pk3-tinte); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; z-index: 99995; max-width: calc(100vw - 32px); }

@media (max-width: 920px) {
  .pk3d .pk3-produkt, .pk3d .pk3-liste { grid-template-columns: minmax(0, 1fr); }
  .pk3d .pk3-produkt-buehne { position: static; }
  .pk3d .pk3-buehne { height: auto; aspect-ratio: 4 / 3.2; min-height: 0; }
  .pk3d .pk3-filter { position: static; max-height: none; display: none; }
  .pk3d .pk3-filter.pk3-offen { display: grid; padding: 18px; background: var(--pk3-flaeche); }
  .pk3d .pk3-filter-knopf { display: inline-flex; }
  .pk3d .pk3-kaufbox .pk3-kauf-zeile .pk3-pille { white-space: normal; }
  .pk3d .pk3-handyleiste { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: var(--pk3-flaeche); border-top: 1px solid var(--pk3-haar);
    padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
    justify-content: space-between; align-items: center; gap: 14px; }
  .pk3d .pk3-handyleiste b { font-family: var(--pk3-f-anzeige); font-size: 24px; font-weight: 400; }
  .pk3d .pk3-kaufbox { position: static; }
  .pk3d { padding-bottom: 76px; }
}
@media (max-width: 560px) {
  .pk3d .pk3-buehne { aspect-ratio: 1 / 1.08; }
  .pk3d .pk3-buehne-leiste .pk3-hinweis-dreh { display: none; }
  .pk3d .pk3-glas button { padding: 6px 9px; font-size: 12.5px; }
  .pk3d .pk3-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 2px; }
  .pk3d .pk3-groessen { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pk3d .pk3-flicken-raster { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .pk3d .pk3-flicken-raster.pk3-garn { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .pk3d .pk3-schriften { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pk3d .pk3-modus { grid-template-columns: 1fr; }
  .pk3d .pk3-bib-raster { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .pk3d .pk3-frei-regler { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .pk3d .pk3-frei-paar.pk3-ferse { width: 100%; }
  .pk3d .pk3-liste-kopf input[type="search"] { min-width: 0; width: 100%; }
  .pk3d .pk3-gruppe-label { min-width: 0; width: 100%; }
  .pk3d .pk3-motiv-wahl { grid-template-columns: 64px minmax(0, 1fr); }
  .pk3d .pk3-motiv-wahl .pk3-pille { grid-column: 1 / -1; justify-self: start; }
  .pk3d .pk3-kauf-zeile { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .pk3d * { transition: none !important; scroll-behavior: auto !important; }
}
