/* Kästle Vereinsshop – Gestaltungsseite: nur Struktur und Zustände. Das Design folgt in Plan 5.
   Farben ausschließlich über Elementor-Kit-Variablen (mit Rückfallwerten). */

.ks-g, .ks-f { --ks-primaer: var(--e-global-color-primary, #89323c); --ks-text: var(--e-global-color-text, #252525); --ks-rand: #d9d6d0; --ks-warn: #b26a00; color: var(--ks-text); }
.ks-g [hidden], .ks-f [hidden] { display: none !important; }

.ks-g { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 799px) { .ks-g { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* Bühne */
.ks-g__buehne { position: relative; aspect-ratio: 1 / 1; background: #f4f2ee; border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; outline: none; }
.ks-g__buehne:focus-visible { box-shadow: 0 0 0 3px var(--ks-primaer); }
.ks-g__buehne.ist-ablage { box-shadow: inset 0 0 0 3px var(--ks-primaer); }
.ks-g__bild { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ks-g__ebene { position: absolute; inset: 0; }

.ks-g__el { position: absolute; transform: translate(-50%, -50%) rotate(var(--dreh, 0deg)); outline: 1.5px dashed transparent; outline-offset: 2px; cursor: move; touch-action: none; }
.ks-g__el.ist-auswahl { outline-color: var(--ks-primaer); z-index: 2; }
.ks-g__inhalt { width: 100%; height: 100%; display: block; pointer-events: none; }
.ks-g__inhalt img, .ks-g__inhalt svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.ks-g__ohne { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; line-height: 1.2; padding: 4px; box-sizing: border-box; border: 2px dashed var(--ks-primaer); background: rgba(255, 255, 255, .7); overflow: hidden; word-break: break-all; }
.ks-g.ist-stick .ks-g__inhalt { filter: url(#ks-g-stick); }

.ks-g__x, .ks-g__gross, .ks-g__dreh, .ks-g__mass { position: absolute; display: none; }
.ks-g__el.ist-auswahl .ks-g__x, .ks-g__el.ist-auswahl .ks-g__gross, .ks-g__el.ist-auswahl .ks-g__dreh, .ks-g__el.ist-auswahl .ks-g__mass { display: block; }
/* Griffe am ausgewählten Element (Symbole: Font Awesome Free, CC BY 4.0) */
.ks-g__symbol { display: block; width: 12px; height: 12px; fill: currentColor; pointer-events: none; }
.ks-g__symbol--diagonal { transform: rotate(90deg); } /* expand-alt als Diagonale passend zur Ecke unten rechts */
.ks-g .ks-g__el button.ks-g__x { left: -14px; top: -14px; width: 26px; height: 26px; padding: 0; margin: 0; border: 2px solid #fff; border-radius: 50%; background: var(--ks-primaer); color: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.ks-g .ks-g__el.ist-auswahl button.ks-g__x { display: flex; align-items: center; justify-content: center; }
.ks-g .ks-g__el button.ks-g__x .ks-g__symbol { width: 11px; height: 11px; }
.ks-g__gross { right: -13px; bottom: -13px; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 6px; background: var(--ks-primaer); color: #fff; cursor: nwse-resize; box-sizing: border-box; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.ks-g__gross .ks-g__symbol, .ks-g__dreh .ks-g__symbol { position: absolute; left: 50%; top: 50%; margin: -6px 0 0 -6px; }
.ks-g__dreh { left: 50%; top: -42px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #fff; border: 2px solid var(--ks-primaer); color: var(--ks-primaer); cursor: grab; box-sizing: border-box; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.ks-g__dreh::after { content: ""; position: absolute; left: 50%; top: 100%; height: 14px; border-left: 1.5px dashed var(--ks-primaer); }
.ks-g__mass { left: 50%; bottom: -26px; transform: translateX(-50%) rotate(calc(-1 * var(--dreh, 0deg))); white-space: nowrap; font-size: 11px; background: rgba(255, 255, 255, .92); padding: 1px 6px; border-radius: 4px; }

/* Michael 16.11.2026: Reiter über dem Bild (verdecken es nicht), Umschalter darunter; im Bild nur Zurück/Weiter oben rechts */
.ks-g__reiter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.ks-g__umschalter-leiste { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
/* Knöpfe: Das Theme (Hello Biz) setzt [type=button]:hover/:focus { background:#c36 } – unsere Regeln haben deshalb
   mindestens .ks-g + Element/Klasse (0,2,1) und legen Hintergrund, Farbe und Rahmen für alle Zustände selbst fest. */
.ks-g .ks-g__reiter button, .ks-g .ks-g__werkzeuge button, .ks-g .ks-g__umschalter-leiste button { font: inherit; font-size: 13px; line-height: 1.3; padding: 5px 10px; border-radius: 16px; border: 1px solid var(--ks-rand); background: #fff; color: var(--ks-text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ks-g .ks-g__reiter button:hover, .ks-g .ks-g__werkzeuge button:hover:not(:disabled), .ks-g .ks-g__umschalter-leiste button:hover:not(:disabled) { border-color: var(--ks-primaer); color: var(--ks-primaer); background: #fff; }
.ks-g .ks-g__reiter button[aria-selected="true"], .ks-g .ks-g__reiter button.ist-hover, .ks-g .ks-g__werkzeuge button[aria-pressed="true"] { background: var(--ks-primaer); border-color: var(--ks-primaer); color: #fff; }
.ks-g .ks-g__werkzeuge button.ks-g__rund { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ks-g .ks-g__werkzeuge button.ks-g__rund .ks-g__symbol { width: 13px; height: 13px; }
.ks-g__reiter b { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 4px; border-radius: 8px; background: var(--ks-primaer); color: #fff; font-size: 11px; text-align: center; }
.ks-g__reiter button[aria-selected="true"] b { background: #fff; color: var(--ks-primaer); }
.ks-g__werkzeuge { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 36%; z-index: 4; }
.ks-g .ks-g__werkzeuge button:disabled, .ks-g .ks-g__umschalter-leiste button:disabled { opacity: .4; cursor: default; background: #fff; color: var(--ks-text); border-color: var(--ks-rand); }
.ks-g button:focus-visible, .ks-f button:focus-visible { outline: 2px solid var(--ks-primaer); outline-offset: 2px; }

.ks-g__ziel { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px dashed var(--ks-primaer); background: rgba(137, 50, 60, .08); pointer-events: none; box-sizing: border-box; }
.ks-g__ziel.ist-treffer { background: var(--ks-primaer); border-style: solid; }
.ks-g__ziel span { position: absolute; left: 14px; top: -4px; font-size: 10px; font-weight: 600; white-space: nowrap; color: var(--ks-primaer); background: rgba(255, 255, 255, .9); padding: 0 4px; border-radius: 3px; }
.ks-g__mitte { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1.5px dashed var(--ks-primaer); pointer-events: none; }

.ks-g__meldung { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); max-width: 90%; display: none; gap: 10px; align-items: center; background: #222; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 13px; z-index: 5; }
.ks-g__meldung.ist-sichtbar { display: flex; }
.ks-g .ks-g__meldung button { font: inherit; background: none; border: 1px solid #fff; color: #fff; border-radius: 6px; padding: 2px 8px; cursor: pointer; }

.ks-g__pflicht { font-size: 12px; line-height: 1.45; margin: 10px 0 0; opacity: .85; }

/* Panel */
.ks-g__panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; } /* feste Spalte: lange Namen sprengen das Handy-Layout nicht */
.ks-g__titel { margin: 0; }
.ks-g__label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.ks-g__farben { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ks-g button.ks-g__farbe { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ccc; padding: 0; cursor: pointer; color: transparent; }
.ks-g button.ks-g__farbe[aria-pressed="true"] { outline: 3px solid var(--ks-primaer); outline-offset: 2px; }
.ks-g button.ks-g__farbe--wahl { background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.ks-g__farbname { font-size: 13px; }
.ks-g__klein { font-size: 12px; line-height: 1.45; margin: 8px 0 0; overflow-wrap: anywhere; }
.ks-g__klein.ist-warnung { color: var(--ks-warn); }
.ks-g select, .ks-g input[type="text"], .ks-f select, .ks-f textarea { font: inherit; width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid var(--ks-rand); border-radius: 8px; background: #fff; }
.ks-g__wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.ks-g .ks-g__wahl button, .ks-g .ks-g__knoepfe button { font: inherit; font-size: 13px; line-height: 1.3; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--ks-rand); background: #fff; color: var(--ks-text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ks-g .ks-g__wahl button:hover, .ks-g .ks-g__knoepfe button:hover { border-color: var(--ks-primaer); color: var(--ks-primaer); background: #fff; }
.ks-g .ks-g__wahl button[aria-pressed="true"] { background: var(--ks-primaer); border-color: var(--ks-primaer); color: #fff; }

.ks-g button.ks-g__ablage, .ks-f button.ks-f__ablage { display: block; width: 100%; border: 2px dashed #bbb; border-radius: 10px; padding: 14px; text-align: center; cursor: pointer; background: #fff; font: inherit; color: var(--ks-text); white-space: normal; text-decoration: none; }
.ks-g button.ks-g__ablage:hover, .ks-f button.ks-f__ablage:hover, .ks-g button.ks-g__ablage.ist-ueber, .ks-f button.ks-f__ablage.ist-ueber { border-color: var(--ks-primaer); background: rgba(137, 50, 60, .05); color: var(--ks-text); }
.ks-g__ablage small, .ks-f__ablage small { display: block; font-size: 11px; opacity: .8; margin-top: 4px; }
.ks-g__logos, .ks-f__logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-top: 10px; }
.ks-g__karte, .ks-f__karte { position: relative; border: 1px solid var(--ks-rand); border-radius: 10px; padding: 6px; font-size: 12px; background: #fff; touch-action: pan-y; }
.ks-g__karte { cursor: grab; }
.ks-g .ks-g__karte .ks-g__vorschau { touch-action: none; cursor: grab; } /* Griff: Finger zieht sofort, statt die Seite zu scrollen */
.ks-g__vorschau { width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; border-radius: 6px; overflow: hidden; font-weight: 700; font-size: 22px; }
.ks-g__vorschau img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.ks-g__name { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ks-g__punkte i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 2px; border: 1px solid rgba(0, 0, 0, .2); vertical-align: middle; }
.ks-g__warnung { color: var(--ks-warn); }
.ks-g__karte label { display: flex; gap: 4px; align-items: center; margin-top: 4px; }
.ks-g .ks-g__karte button.ks-g__plus { width: 100%; margin-top: 6px; font: inherit; font-size: 12px; line-height: 1.3; padding: 5px 4px; border: 0; border-radius: 6px; background: var(--ks-primaer); color: #fff; cursor: pointer; white-space: normal; text-decoration: none; }
.ks-g .ks-g__karte button.ks-g__plus:hover { filter: brightness(1.12); background: var(--ks-primaer); color: #fff; }
.ks-g .ks-g__karte button.ks-g__weg, .ks-f .ks-f__karte button.ks-g__weg { position: absolute; top: 4px; right: 4px; z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.ks-g .ks-g__karte button.ks-g__weg:hover, .ks-f .ks-f__karte button.ks-g__weg:hover { background: var(--ks-primaer); color: #fff; }
.ks-g__weg .ks-g__symbol { width: 10px; height: 10px; }

.ks-g__auswahl { border: 1px solid var(--ks-rand); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.ks-g__regler { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 8px; font-size: 13px; }
.ks-g__regler input { width: 100%; accent-color: var(--ks-primaer); }
.ks-g__knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ks-g__zusammenfassung p { margin: 0 0 4px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.ks-g__auswahl .ks-g__label, .ks-g__meldung span { overflow-wrap: anywhere; min-width: 0; }
.ks-g button.ks-g__anfrage, .ks-f button.ks-f__anfrage { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: 10px; background: var(--ks-primaer); color: #fff; cursor: pointer; width: 100%; white-space: normal; text-decoration: none; }
.ks-g button.ks-g__anfrage:hover, .ks-f button.ks-f__anfrage:hover { filter: brightness(1.12); background: var(--ks-primaer); color: #fff; }
.ks-g button.ks-g__anfrage:disabled { opacity: .6; cursor: wait; }

.ks-g__geist { position: fixed; width: 72px; height: 72px; pointer-events: none; z-index: 99999; opacity: .9; transform: translate(-50%, -50%) rotate(-4deg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; color: var(--ks-primaer); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.ks-g__geist img { max-width: 100%; max-height: 100%; }

/* Becher-Formular */
.ks-f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 799px) { .ks-f { grid-template-columns: minmax(0, 1fr); } }
.ks-f__bild { width: 100%; height: auto; background: #f4f2ee; border-radius: 12px; display: block; }
.ks-f__panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.ks-f__panel p { overflow-wrap: anywhere; }
.ks-f__panel label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.ks-f textarea { min-height: 120px; resize: vertical; }

/* Plan 4: Hinweis-Knopf im Becher-Formular und Plakette „Anfrageliste (n)“ (liegt an body, außerhalb .ks-g) */
.ks-f button.ks-f__link, .ks-f button.ks-f__link:hover, .ks-f button.ks-f__link:focus { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--ks-primaer); text-decoration: underline; cursor: pointer; }
a.ks-al-plakette, a.ks-al-plakette:hover, a.ks-al-plakette:focus, a.ks-al-plakette:visited { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: var(--e-global-color-primary, #89323c); color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
a.ks-al-plakette:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
a.ks-al-plakette[hidden] { display: none; }
@media (max-width: 799px) { a.ks-al-plakette, a.ks-al-plakette:hover, a.ks-al-plakette:focus { left: 12px; bottom: 12px; font-size: 14px; } }

/* Einblendung nach „Zur Anfrage hinzufügen“ (Michael 16.11.2026): fest unten mittig, am Handy über der Plakette (liegt an body) */
.ks-al-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(600px, calc(100vw - 32px)); box-sizing: border-box; padding: 12px 12px 12px 16px; border-radius: 12px; background: #1f1f1f; color: #fff; font-size: 15px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.ks-al-toast[hidden] { display: none; }
.ks-al-toast--fehler { background: #b32d2e; }
.ks-al-toast__symbol { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #2e7d32; color: #fff; font-weight: 700; font-size: 15px; }
.ks-al-toast--fehler .ks-al-toast__symbol { background: rgba(255, 255, 255, .22); }
.ks-al-toast__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
a.ks-al-toast__link, a.ks-al-toast__link:hover, a.ks-al-toast__link:focus, a.ks-al-toast__link:visited { flex: 0 0 auto; color: #fff; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.ks-al-toast button.ks-al-toast__zu, .ks-al-toast button.ks-al-toast__zu:hover, .ks-al-toast button.ks-al-toast__zu:focus { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.ks-al-toast button.ks-al-toast__zu:hover { background: rgba(255, 255, 255, .15); }
.ks-al-toast a:focus-visible, .ks-al-toast button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 799px) { .ks-al-toast { left: 12px; right: 12px; bottom: 64px; transform: none; width: auto; max-width: none; flex-wrap: wrap; font-size: 14px; } }

/* Umschalter „Einrasten“ / „Stick-Optik“ als Kästchen: an = gefülltes Kästchen mit Haken, aus = leeres Kästchen (Michael 13.11.2026) */
.ks-g .ks-g__umschalter-leiste button.ks-g__umschalter { display: inline-flex; align-items: center; gap: 6px; }
.ks-g .ks-g__umschalter-leiste button.ks-g__umschalter[aria-pressed="true"], .ks-g .ks-g__umschalter-leiste button.ks-g__umschalter[aria-pressed="true"]:hover { background: #fff; color: var(--ks-text); border-color: var(--ks-primaer); }
.ks-g .ks-g__haken { width: 14px; height: 14px; flex: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; border-radius: 3px; background: #fff; color: var(--ks-text); }
.ks-g .ks-g__haken .ks-g__symbol { width: 9px; height: 9px; }
.ks-g .ks-g__umschalter-leiste button[aria-pressed="true"] .ks-g__haken { background: var(--ks-primaer); border-color: var(--ks-primaer); color: #fff; }
.ks-g .ks-g__umschalter-leiste button[aria-pressed="false"] .ks-g__haken .ks-g__symbol { visibility: hidden; }

/* Becher: Fläche mit einem Reiter je Ansicht (Henkel links / Henkel rechts / Vorne, Michael 18.11.2026), Logos mittig im Körper */
.ks-f__buehne { position: relative; }
.ks-f__druck { position: absolute; inset: 0; pointer-events: none; }
.ks-f__druck img, .ks-f__druck .ks-f__ohne { position: absolute; object-fit: contain; box-sizing: border-box; }
.ks-f__ohne { display: flex; align-items: center; justify-content: center; border: 2px dashed var(--ks-primaer); border-radius: 6px; background: rgba(255, 255, 255, .6); color: var(--ks-primaer); font-weight: 700; font-size: 14px; }
.ks-f__reiter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; } /* über dem Bild wie bei der Gestaltungsseite (Michael 16.11.2026) */
.ks-f .ks-f__reiter button, .ks-f .ks-f__reiter button:hover, .ks-f .ks-f__reiter button:focus { font: inherit; font-size: 13px; line-height: 1.3; padding: 5px 12px; border-radius: 16px; border: 1px solid var(--ks-rand); background: #fff; color: var(--ks-text); cursor: pointer; text-decoration: none; }
.ks-f .ks-f__reiter button:hover { border-color: var(--ks-primaer); }
.ks-f .ks-f__reiter button[aria-selected="true"], .ks-f .ks-f__reiter button[aria-selected="true"]:hover, .ks-f .ks-f__reiter button[aria-selected="true"]:focus { background: var(--ks-primaer); border-color: var(--ks-primaer); color: #fff; }
.ks-f .ks-f__reiter button:focus-visible { outline: 2px solid var(--ks-primaer); outline-offset: 2px; }
.ks-f__platz-label { display: grid; gap: 2px; margin-top: 6px; font-size: 12px; font-weight: 600; }
.ks-f .ks-f__platz { font: inherit; font-size: 12px; font-weight: 400; padding: 4px 6px; border: 1px solid #b9b6b0; border-radius: 6px; background: #fff; color: var(--ks-text); width: 100%; max-width: 100%; }
.ks-f__logos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } /* Platz für „Kästle soll beraten“ in der Positionswahl */
.ks-f .ks-f__groesse { width: 100%; height: 28px; margin: 2px 0 0; accent-color: var(--ks-primaer); cursor: pointer; } /* Becher: Größe je Logo (Michael 13.11.2026) */
