/* T-Shirt Designer MC v20 */

#tsd-designer-wrapper {
    margin: 30px 0 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --acc: #111;
    --border: #ddd;
    color: #222;
}

/* LAYOUT */
.tsd-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
@media (max-width: 768px) { .tsd-layout { flex-direction: column; } }

/* CANVAS – groß */
.tsd-canvas-wrap {
    position: relative;
    flex: 2 1 auto;
    max-width: 680px;
    min-width: 0;
}
.tsd-canvas-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: transparent;
    touch-action: none;
}
#tsd-cm-label {
    display: none;
    position: absolute;
    transform: translate(4px, -100%);
    background: rgba(0,0,0,0.82);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 600;
}
#tsd-pa-outline {
    display: none;
    position: absolute;
    background: rgba(26,115,232,0.08);
    border: 2px dashed #1a73e8;
    pointer-events: none;
    z-index: 50;
}
#tsd-snap-line-v,
#tsd-snap-line-h {
    display: none;
    position: absolute;
    pointer-events: none;
    z-index: 610;
}
#tsd-snap-line-v {
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px dashed #ff1e6c;
}
#tsd-snap-line-h {
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px dashed #ff1e6c;
}
.tsd-canvas-container > div:not(.tsd-side-thumb) {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
}
.tsd-canvas-container canvas {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
}

/* SIDEBAR */
.tsd-sidebar {
    width: 420px;
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@media (max-width: 768px) { .tsd-sidebar { width: 100%; flex: none; } }

/* Diese 4 Controls sind auch direkt im Canvas erreichbar (Kamera-Button, T-Button,
   Floating-Toolbar mit Farbe/Schriftart) - in der Sidebar wären sie nur Dopplung.
   Bleiben im DOM (wichtig, weil der JS-Code sie als Datenspeicher nutzt), werden
   nur optisch versteckt. Preis/Warenkorb/Aufpreis-Hinweis in der Sidebar bleiben sichtbar. */
.tsd-upload-zone,
#tsd-upload-progress,
#tsd-text-input,
#tsd-font-family,
#tsd-color-label,
.tsd-color-presets,
.tsd-effect-row,
#tsd-curve-options,
#tsd-size-label,
#tsd-font-size,
#tsd-spacing-label,
#tsd-letter-spacing,
#tsd-lineheight-label,
#tsd-line-height,
#tsd-color-tabs,
#tsd-stroke-controls,
#tsd-color-hint {
    display: none !important;
}

/* UPLOAD */
.tsd-upload-zone {
    min-height: 64px;
    border: 2px dashed var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .2s, background .2s;
    box-sizing: border-box;
}
.tsd-upload-zone:hover, .tsd-upload-zone.drag-over {
    border-color: var(--acc); background: #fff5f7;
}
.tsd-upload-zone svg { width: 22px; height: 22px; fill: #555; }
.tsd-upload-zone span { font-size: 13px; color: #444; font-weight: 500; }

.tsd-progress-bar { height: 4px; background: #eee; border-radius: 2px; overflow: hidden; }
.tsd-progress-fill { height: 100%; background: var(--acc); animation: tsd-prog 1s linear infinite; }
@keyframes tsd-prog { 0%{width:0%} 50%{width:70%} 100%{width:90%} }

/* TEXT INPUT */
#tsd-text-input {
    height: 46px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}
#tsd-text-input:focus { outline: none; border-color: var(--acc); }
#tsd-text-input::placeholder { color: #555; opacity: 1; }

/* SELECT */
#tsd-font-family {
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

/* SLIDER LABELS */
.tsd-row-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    margin-bottom: -2px;
    margin-top: 2px;
}
input[type="range"] {
    width: 100%;
    height: 16px;
    margin: 0;
    accent-color: var(--acc);
}

/* FARBFELDER – viereckig */
.tsd-color-presets {
    display: flex;
    gap: 0;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 6px 0;
    width: 100%;
}
.tsd-color-dot {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    border: 2px solid transparent !important;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.18) !important;
    transition: transform .15s, box-shadow .15s;
    display: block !important;
    margin: 0 2px !important;
}
#tsd-designer-wrapper span.tsd-color-dot,
#tsd-designer-wrapper .tsd-color-dot {
    border-radius: 5px !important;
    -webkit-border-radius: 5px !important;
}
.tsd-color-dot:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 0 0 2px var(--acc) !important;
}
.tsd-color-dot.active {
    transform: scale(1.1) !important;
    box-shadow: 0 0 0 2px var(--acc), 0 0 0 4px rgba(17,17,17,0.2) !important;
    border-color: #fff !important;
}

/* EFFEKT-BUTTONS */
.tsd-effect-row { display: flex; gap: 4px; padding-top: 2px; }
.tsd-effect-btn {
    flex: 1;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 11px; font-weight: 600;
    color: #555; transition: all .15s;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 32px !important;
    vertical-align: middle;
    white-space: nowrap;
    box-sizing: border-box;
}
.tsd-effect-btn:hover { border-color: var(--acc); color: var(--acc); }
.tsd-effect-btn.active { background: var(--acc); border-color: var(--acc); color: #fff; }

/* UNDO */
.tsd-btn-undo {
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 12px; font-weight: 600;
    color: #555; width: 100%;
    transition: all .15s;
    margin-top: 4px;
}
.tsd-btn-undo:hover { border-color: var(--acc); color: var(--acc); }

/* WOOCOMMERCE IN SIDEBAR */
#tsd-wc-slot {
    margin-top: 12px;
    border-top: none;
    padding-top: 12px;
    width: 100%;
    box-sizing: border-box;
}
#tsd-wc-slot .cart,
#tsd-wc-slot form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
}
#tsd-wc-slot .single_add_to_cart_button {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}
#tsd-wc-slot .quantity { flex: 0 0 auto !important; }

/* FLATSOME-FIX */
body.tsd-active .woocommerce-product-gallery { display: none !important; }
body.tsd-active .woocommerce-breadcrumb { border-bottom: none !important; box-shadow: none !important; }
body.tsd-active .entry-summary > *:first-child { border-top: none !important; }
body.tsd-active .product .summary::before,
body.tsd-active .product .summary::after { display: none !important; }
body.tsd-active .product .col-left,
body.tsd-active .product .product-images { display: none !important; }
body.tsd-active .product .col-right,
body.tsd-active .product .entry-summary,
body.tsd-active .product div.summary {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    padding-left: 0 !important;
}

/* Variations-Preis über dem Counter ausblenden: rechnet den Designer-Aufpreis (beidseitiger
   Druck) nicht mit, zeigt also immer nur den Basispreis - verwirrt mehr als er hilft, weil
   oben schon der "ab"-Preis steht und weiter unten der Aufpreis-Hinweis. */
body.tsd-active .woocommerce-variation-price {
    display: none !important;
}

/* MOBILE */
@media (max-width: 600px) {
    .tsd-canvas-container { width: 100% !important; padding-bottom: 100% !important; }
    .tsd-canvas-wrap { width: 100% !important; max-width: 100% !important; }
}

/* SPINNER */
.tsd-loading {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.55);
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
.tsd-spinner {
    width: 28px; height: 28px;
    border: 3px solid #eee; border-top-color: var(--acc);
    border-radius: 50%; animation: tsd-spin .7s linear infinite;
}
@keyframes tsd-spin { to { transform: rotate(360deg); } }

/* Pulsierender Farb-Badge über färbbarer Grafik */
.tsd-color-badge {
    position: absolute;
    z-index: 999;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: tsd-pulse-badge 1.4s ease-in-out infinite;
}
.tsd-color-badge::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #111;
    border-bottom: none;
}
@keyframes tsd-pulse-badge {
    0%, 100% { transform: scale(1);   box-shadow: 0 2px 8px rgba(17,17,17,0.4); }
    50%       { transform: scale(1.08); box-shadow: 0 4px 16px rgba(17,17,17,0.7); }
}

/* ================================================================
   SEITEN-THUMBNAIL (Vorne/Hinten umschalten) – v2.16
================================================================ */
.tsd-side-thumb {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    width: 68px !important;
    aspect-ratio: 1 !important;
    z-index: 20 !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4) !important;
    background: #ccc !important;
    transition: transform .15s !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
.tsd-side-thumb:hover {
    transform: scale(1.07) !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.5) !important;
}
.tsd-side-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.tsd-side-thumb-placeholder {
    width: 100% !important;
    aspect-ratio: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #888 !important;
    font-size: 20px !important;
    background: #e8e8e8 !important;
}
.tsd-side-thumb span {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: block !important;
    text-align: center !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: rgba(0,0,0,0.6) !important;
    padding: 2px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* ================================================================
   ANSICHTEN-MODAL (Vorne/Hinten/Rechts/Links umschalten) – Lumise-Style
================================================================ */
.tsd-view-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    background: transparent !important;
}
.tsd-view-modal-panel {
    position: absolute !important;
    bottom: 10px !important;
    right: 10px !important;
    width: 68px !important;
    z-index: 9999 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}
.tsd-view-modal-row {
    padding: 0 !important;
    margin-bottom: 8px !important;
    cursor: pointer !important;
}
.tsd-view-modal-row:last-child { margin-bottom: 0 !important; }

/* Mobile: schmaler, wie ursprünglich (Desktop bleibt bei 68px) */
@media (max-width: 768px) {
    .tsd-side-thumb { width: 52px !important; }
    .tsd-view-modal-panel { width: 52px !important; }
}

.tsd-view-modal-thumb {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 1 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #ccc !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}
.tsd-view-modal-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.tsd-view-modal-name {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: block !important;
    text-align: center !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .5px !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: rgba(0,0,0,0.6) !important;
    padding: 2px 0 !important;
}

/* ================================================================
   ON-CANVAS FLOATING UI  (v3.4.9)
================================================================ */

/* ---- Kamera-Badge: oben rechts ---- */
#tsd-upload-badge {
    position: absolute;
    z-index: 190;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
    /* Kein Überlappen mit Canvas-Handles durch klaren z-index-Bereich */
}
#tsd-upload-badge:hover,
#tsd-upload-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

/* ---- Filter-Badge: direkt unter dem Kamera-Badge ---- */
#tsd-filter-badge {
    position: absolute;
    z-index: 190;
    top: 62px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-filter-badge:hover,
#tsd-filter-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

/* ---- T-Badge: direkt unter dem Filter-Badge ---- */
#tsd-t-badge {
    position: absolute;
    z-index: 190;
    top: 116px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #111;
    font-size: 20px;
    font-weight: 900;
    font-family: Georgia, serif;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-t-badge:hover,
#tsd-t-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
/* Pulsierendes Glühen wenn noch kein Text vorhanden */
#tsd-t-badge.tsd-t-pulse {
    animation: tsd-t-pulse 2.2s ease-in-out infinite;
}
@keyframes tsd-t-pulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
    50%       { box-shadow: 0 3px 18px rgba(17,17,17,0.6), 0 0 0 5px rgba(17,17,17,0.15); }
}

/* ---- Floating Toolbar (bei Text-Selektion) ---- */
#tsd-float-bar {
    position: absolute;
    z-index: 200;
    display: none;
    align-items: center;
    gap: 6px;
    background: rgba(30,30,30,0.92);
    border-radius: 22px;
    padding: 5px 8px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.45);
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity .15s, transform .15s;
    opacity: 0;
    transform: translateY(4px);
    touch-action: manipulation;
}
#tsd-float-bar.tsd-flt-visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}
#tsd-float-bar::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom: none;
    border-top-color: rgba(30,30,30,0.92);
}

.tsd-flt-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s, background .12s;
    flex-shrink: 0;
}
.tsd-flt-btn:active { transform: scale(0.88); }
.tsd-flt-btn * { pointer-events: none; } /* Icon/Text innen darf nie selbst Klick-Ziel sein - nur der ganze Kreis */

#tsd-float-color {
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
}
#tsd-float-color:hover { background: rgba(255,255,255,0.22); }
#tsd-float-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
    display: block;
}

#tsd-float-font {
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    font-family: Georgia, serif;
    letter-spacing: -1px;
    line-height: 1;
}
#tsd-float-font:hover { background: rgba(255,255,255,0.22); }

/* ---- Compact Color Picker ---- */
#tsd-float-cpk {
    position: absolute;
    z-index: 100000;
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.20);
    max-width: 272px;
    pointer-events: auto;
    animation: tsd-flt-fadein .12s ease;
}
#tsd-float-cpk.tsd-flt-open { display: flex; }
#tsd-float-cpk input[type="range"] { accent-color: #111; }
.tsd-flt-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
    padding-right: 34px;
}
.tsd-flt-tab {
    font-size: 21px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: color .12s, border-color .12s;
    user-select: none;
}
.tsd-flt-tab.tsd-flt-tab-active {
    color: #111;
    border-bottom-color: #111;
    font-weight: 700;
}
.tsd-flt-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    position: relative;
}

.tsd-color-tooltip {
    position: absolute;
    display: none;
    top: 0;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}
.tsd-color-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #222;
}

.tsd-flt-swatch {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    flex-shrink: 0;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
    transition: box-shadow .12s;
}
.tsd-flt-swatch:hover,
.tsd-flt-swatch:active {
    box-shadow: inset 0 0 0 3px #111;
}
.tsd-motiv-color-dot:hover,
.tsd-motiv-color-dot:active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #111;
}
.tsd-fixedgfx-color-dot:hover,
.tsd-fixedgfx-color-dot:active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #111;
}
@media (max-width: 768px) {
    .tsd-flt-swatch { width: 38px; height: 38px; }
    #tsd-float-cpk {
        /* 6 Swatches à 38px + 5×4px gap + 2×8px padding = 272px */
        max-width: 272px;
    }
}

/* ================================================================
   FARBE / KONTUR / RUNDTEXT / AA PANEL – ein gemeinsames Footer-Panel
   mit 4 Tabs. Positionierung 1:1 nach dem v70-Font-Modal-Vorbild: Mobile =
   festes Bottom-Sheet, Shirt bleibt sichtbar. Desktop = Popup neben dem
   Objekt. WICHTIG: kein touch-action:none hier (im Gegensatz zum alten
   Font-Modal) – das blockiert laut Spec sämtliche Touch-Gesten der Kinder,
   inkl. Slider-Ziehen und Textfeld-Tap. #tsd-fk-body regelt Scroll-Kapselung
   selbst über touch-action:pan-y.
================================================================ */
#tsd-fk-ov {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.08);
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: tsd-flt-fadein .15s ease;
    overscroll-behavior: contain;
}
#tsd-fk-ov.tsd-fk-open { display: flex; }
/* 16.08. (Micha: nach Unterdrueckung der Panel-Slide-Animation flackert jetzt
   das Overlay selbst) - #tsd-fk-ov hat oben eine eigene Fade-In-Animation, die
   beim selben Schliessen+Neuoeffnen-Workaround (tsdSvgDotSwitching) genauso neu
   anspringt. Gleiche Klasse, gleicher Effekt, auch hier greifen lassen. */
#tsd-fk-ov.tsd-fk-noanim {
    animation: none !important;
}

/* Desktop: transparentes Overlay */
#tsd-fk-ov.tsd-fk-desktop {
    background: transparent;
    pointer-events: none;
    align-items: flex-start;
    justify-content: flex-start;
    touch-action: auto;
}
#tsd-fk-ov.tsd-fk-desktop #tsd-fk-panel {
    pointer-events: auto;
    box-shadow: 0 6px 30px rgba(0,0,0,0.3);
    border: 1px solid #e8e8e8;
}

/* v2.7.209: Text-Modus (Farbe/Kontur/Text/Aa fuer i-text/Bogentext) - Overlay-
   Hintergrund laesst Klicks/Taps zum Canvas durch, damit man bei offenem Panel
   direkt einen ANDEREN Text antippen kann (Zoom folgt dann automatisch, siehe
   designer.js onSel()/openFkPanel()). Bewusst NICHT fuer den Bild/Motiv-Modus
   (fkImageMode) mitgesetzt - dort bleibt das bisherige, bestaetigt funktionierende
   Verhalten (Overlay blockiert) unangetastet. Gilt auch am Desktop (deckt sich
   mit .tsd-fk-desktop oben, kein Widerspruch da beide pointer-events:none wollen).
   #tsd-fk-panel selbst bleibt in beiden Modi klickbar. */
#tsd-fk-ov.tsd-fk-textmode {
    pointer-events: none;
}
#tsd-fk-ov.tsd-fk-textmode #tsd-fk-panel {
    pointer-events: auto;
}

#tsd-fk-panel {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 520px;
    /* Zurückgesetzt auf den bestätigten Stand v2.7.80 (45vh) - die 58vh-Änderung
       aus v2.7.82 wurde nie von Micha getestet/bestätigt, deshalb raus. */
    max-height: 45vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
    animation: tsd-fnt-slide .2s ease;
    position: relative;
    padding: 14px 14px 18px;
    box-sizing: border-box;
}
@media (min-width: 769px) {
    #tsd-fk-panel {
        /* 4 Tabs (Farbe/Kontur/Rundtext/Aa) + Platz fürs X brauchen mehr als
           die alten 260px des Einzel-Font-Modals */
        max-width: 320px;
        border-radius: 12px;
        max-height: 460px;
        animation: tsd-flt-fadein .15s ease;
    }
}
@keyframes tsd-fnt-slide {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
/* 16.08. (Micha: Panel "zuckt" beim Wechseln zwischen Farbkreisen) - der
   Schliessen+Neuoeffnen-Workaround beim Farbkreis-Wechsel (siehe designer.js
   tsdSvgDotSwitching) toggelt #tsd-fk-panel kurz auf display:none und wieder
   zurueck - CSS-Animationen starten dabei jedesmal neu, sichtbar als Zucken.
   Diese Klasse unterdrueckt die Animation gezielt fuer genau diesen Fall. */
#tsd-fk-panel.tsd-fk-noanim {
    animation: none !important;
}

/* Schließen-Button schwebend oben rechts im Panel */
#tsd-fk-x {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(240,240,240,0.9);
    color: #555;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}
#tsd-fk-x:hover { background: #e0e0e0; }

/* Platz für den X-Button reservieren, damit der letzte Tab ("Aa") nicht
   verdeckt wird */
#tsd-fk-tabs { padding: 0 44px 0 4px; }

#tsd-fk-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

/* Genesteter Farbe/Kontur-Inhalt + Rundtext-Inhalt + Schriftliste: volle
   Breite, keine eigene Box – die äußere #tsd-fk-panel-Karte übernimmt
   Hintergrund/Schatten. Kein eigenes overflow/flex mehr (das übernimmt
   #tsd-fk-body), sonst gäbe es verschachteltes Scrollen. */
#tsd-fk-panel #tsd-float-cpk,
#tsd-fk-panel #tsd-float-arch-modal,
#tsd-fk-panel #tsd-font-modal-list {
    position: static;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-width: none;
    min-width: 0;
    width: 100%;
    animation: none;
    overflow-y: visible;
    flex: none;
}

#tsd-font-modal-list {
    padding: 4px 0 16px;
}

.tsd-fnt-item {
    display: flex;
    align-items: center;
    padding: 10px 40px 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    gap: 10px;
    min-height: 52px;
    transition: background .1s;
    touch-action: manipulation;
}
.tsd-fnt-item:hover,
.tsd-fnt-item:active { background: #fef6f7; }
.tsd-fnt-item.tsd-fnt-active { background: #fdeef1; }
.tsd-fnt-item.tsd-fnt-active .tsd-fnt-name { color: #111; font-weight: 700; }

.tsd-fnt-preview {
    font-size: 24px;
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #222;
}
.tsd-fnt-name {
    font-size: 10px;
    color: #aaa;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}
@media (min-width: 769px) {
    .tsd-fnt-item    { padding: 7px 36px 7px 12px; min-height: 44px; }
    .tsd-fnt-preview { font-size: 20px; }
    .tsd-fnt-name    { font-size: 10px; min-width: 44px; }
}
@media (max-width: 480px) {
    .tsd-fnt-item    { padding: 8px 44px 8px 14px; min-height: 48px; }
    .tsd-fnt-preview { font-size: 26px; }
}

@keyframes tsd-flt-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ================================================================
   BOGEN-MODAL (v3.4.11)
================================================================ */
/* Rundtext-Tab-Inhalt lebt jetzt im gemeinsamen #tsd-fk-panel – kein eigenes
   schwebendes Popup mehr, volle Breite, keine eigene Box/Schatten. */
#tsd-float-arch-modal {
    display: none;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
    touch-action: manipulation;
}

.tsd-arch-text-row {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.tsd-arch-text-row input,
.tsd-arch-text-row textarea {
    flex: 1;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 16px !important;
    outline: none;
}
.tsd-arch-text-row textarea {
    resize: none;
    line-height: 1.25;
    font-family: inherit;
    min-height: 68px;
}
.tsd-arch-text-row input:focus,
.tsd-arch-text-row textarea:focus { border-color: #111; }
#tsd-am-text-ok {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    padding: 0 12px;
    cursor: pointer;
    line-height: 1;
    touch-action: manipulation;
}
.tsd-arch-row {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}
.tsd-arch-btn {
    flex: 1;
    height: 34px;
    margin: 0;
    padding: 0 2px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    cursor: pointer;
    transition: all .12s;
    touch-action: manipulation;
}
.tsd-arch-btn:hover  { border-color: #111; color: #111; }
.tsd-arch-btn.active { background: #111; border-color: #111; color: #fff; }

/* Nachbesserung 25.07. (Micha): Abstand innerhalb jedes Regler-Blocks leicht
   verringert (war padding-top:8px / margin-bottom:4px), nicht eng, nur kompakter,
   damit mehr Regler auf einen Blick passen. Bei Bedarf einfach zurückstellen. */
.tsd-arch-slider-wrap { padding-top: 5px; }
.tsd-arch-slider-wrap.tsd-arch-hidden { display: none; }
.tsd-arch-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
    margin-bottom: 3px;
}
.tsd-arch-label span:last-child { font-weight: 600; color: #444; }
.tsd-arch-slider-wrap input[type="range"] {
    width: 100%;
    accent-color: #111;
}

/* Bogen-Icon in Floating Bar */
#tsd-float-arch {
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
}
#tsd-float-arch:hover { background: rgba(255,255,255,0.22); }
#tsd-float-arch svg { pointer-events: none; }

/* ---- Produkt-wechseln-Badge: oben links, als Pille mit Text statt reinem Icon ---- */
#tsd-switch-badge {
    position: absolute;
    z-index: 190;
    top: 10px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-switch-badge:hover,
#tsd-switch-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

/* ---- Produkt-wechseln-Modal ---- */
#tsd-switch-modal-ov {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: tsd-flt-fadein .15s ease;
    touch-action: none;
    overscroll-behavior: contain;
}
#tsd-switch-modal-ov.tsd-sw-open { display: flex; }

#tsd-switch-modal {
    background: rgba(255,255,255,0.98);
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
    animation: tsd-fnt-slide .2s ease;
}
@media (min-width: 769px) {
    #tsd-switch-modal-ov { background: rgba(0,0,0,0.4); align-items: center; }
    #tsd-switch-modal { border-radius: 14px; max-height: 70vh; animation: tsd-flt-fadein .15s ease; }
}

#tsd-switch-modal .tsd-switch-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    box-sizing: border-box;
}
#tsd-switch-modal .tsd-switch-modal-header strong {
    font-size: 14px;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: block;
}
#tsd-switch-modal-x {
    background: none !important;
    border: none !important;
    font-size: 22px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    width: 28px;
    height: 28px;
    min-height: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none !important;
}

#tsd-switch-modal-list {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tsd-switch-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: background .1s, border-color .1s;
}
.tsd-switch-item:hover,
.tsd-switch-item:active { background: #fef6f7; border-color: #f3d4d9; }
.tsd-switch-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fafafa;
}
.tsd-switch-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tsd-switch-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.6em;
}
.tsd-switch-item-price {
    font-size: 12px;
    color: #888;
}


/* ---- Lupe-Badge: oben links unter dem Produkt-Badge (getauscht mit KI) ---- */
#tsd-ki-badge {
    position: absolute;
    z-index: 190;
    top: 220px;
    right: 10px;
    left: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-ki-badge svg path { stroke: #111; }
#tsd-ki-badge.tsd-ki-badge-up { top: 168px; } /* Motive deaktiviert -> Lücke schließen, eine Position hoch */
#tsd-ki-badge:hover,
#tsd-ki-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.30);
    background: #f0f0f0;
}
#tsd-share-badge {
    position: absolute;
    z-index: 190;
    top: 116px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-share-badge:hover,
#tsd-share-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.30);
    background: #f0f0f0;
}
#tsd-motive-badge {
    position: absolute;
    z-index: 190;
    top: 168px;
    right: 10px;
    left: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-motive-badge:hover,
#tsd-motive-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.30);
    background: #f0f0f0;
}

/* ---- KI-Badge (Sparkle): unter dem Produkt-Badge links (getauscht mit Lupe) ---- */
#tsd-lupe-badge {
    position: absolute;
    z-index: 190;
    top: 62px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-lupe-badge:hover,
#tsd-lupe-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.30);
    background: #f0f0f0;
}
#tsd-shapes-badge {
    position: absolute;
    z-index: 190;
    top: 168px;
    left: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}

/* Nachtrag 25.07.: Positionierung fehlte komplett (nur Form/Farbe inline gesetzt,
   kein position:absolute mit Koordinaten) - Button war dadurch faktisch unauffindbar/
   falsch im Layout. Naechster freier Slot in der rechten Spalte nach 220px (KI-Badge). */
#tsd-dtpl-save-badge {
    position: absolute;
    z-index: 190;
    top: 272px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    pointer-events: auto;
}
#tsd-dtpl-save-badge:hover,
#tsd-dtpl-save-badge:active {
    transform: scale(1.12);
}
#tsd-shapes-badge:hover,
#tsd-shapes-badge:active {
    transform: scale(1.12);
    box-shadow: 0 3px 14px rgba(0,0,0,0.30);
    background: #f0f0f0;
}

/* ---- Formen v2: Anwenden/Abbrechen-Leiste unter der frei platzierten Maske ----
   Reine runde Icon-Badges (Haken/Kreuz), kein Text - fest unten zentriert am
   Canvas. Bewusst kompakt statt Text-Pillen, damit es auf Mobile nicht breiter
   wird als der Bildschirm. ---- */
#tsd-mask-apply-bar {
    position: absolute;
    z-index: 300;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
#tsd-mask-apply-bar.tsd-mab-visible { display: flex; }
.tsd-mask-bar-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: transform .15s, box-shadow .15s;
}
.tsd-mask-bar-badge:hover,
.tsd-mask-bar-badge:active {
    transform: scale(1.08);
    box-shadow: 0 3px 12px rgba(0,0,0,.24);
}
.tsd-mask-bar-badge svg { pointer-events: none; }

/* ---- Vollbild-Vorschau-Overlay ---- */
#tsd-fullscreen-preview-ov {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.88);
    align-items: center;
    justify-content: center;
    padding: 64px 24px 24px;
    box-sizing: border-box;
    touch-action: none;
}
#tsd-fullscreen-preview-ov.tsd-fsp-open {
    display: flex;
}
#tsd-fullscreen-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
    touch-action: none;
    transform-origin: center center;
    will-change: transform;
}
#tsd-fsp-pinch-hint {
    display: none;
    position: absolute;
    z-index: 100001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    animation: tsd-fsp-hint-fade 3s ease forwards;
}
#tsd-fsp-pinch-hint.tsd-fsp-hint-show { display: flex; }
#tsd-fsp-pinch-hint span {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
@keyframes tsd-fsp-hint-fade {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}
#tsd-fullscreen-preview-x {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 100000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
/* v2.7.246: Admin-only Upload-Icon in der Lupe-Vorschau - gleicher Stil wie das
   Schliessen-X, links davon positioniert. */
#tsd-lupe-upload-icon {
    position: absolute;
    top: 14px;
    right: 64px;
    z-index: 100000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.2s;
}
#tsd-lupe-upload-icon.tsd-lupe-uploading {
    animation: tsd-lupe-upload-spin 0.8s linear infinite;
}
#tsd-lupe-upload-icon.tsd-lupe-upload-ok {
    background: rgba(40,170,90,0.85) !important;
    animation: none;
}
@keyframes tsd-lupe-upload-spin {
    to { transform: rotate(360deg); }
}
/* Upload-Spinner */
#tsd-upload-spinner {
    display: none;
    position: absolute;
    z-index: 500;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tsd-spin-centered .7s linear infinite;
    pointer-events: none;
}
@keyframes tsd-spin-centered { to { transform: translate(-50%, -50%) rotate(360deg); } }

#tsd-png-fal-badge.tsd-badge-loading,
#tsd-png-color-badge.tsd-badge-loading,
#tsd-share-badge.tsd-badge-loading {
    pointer-events: none;
    position: relative;
}
#tsd-png-fal-badge.tsd-badge-loading::after,
#tsd-png-color-badge.tsd-badge-loading::after,
#tsd-share-badge.tsd-badge-loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #e0e0e0;
    border-top-color: #111;
    border-radius: 50%;
    animation: tsd-badge-spin .7s linear infinite;
    pointer-events: none;
}
@keyframes tsd-badge-spin { to { transform: rotate(360deg); } }

/* ---- KI-Bildgenerator-Modal ---- */
#tsd-ki-modal-ov {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
#tsd-ki-modal-ov.tsd-ki-open { display: flex; }
#tsd-ki-modal {
    background: #fff;
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
}
@media (min-width: 769px) {
    #tsd-ki-modal-ov { align-items: center; }
    #tsd-ki-modal { border-radius: 14px; max-width: 440px; }
}
#tsd-ki-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    box-sizing: border-box;
}
#tsd-ki-modal-header strong {
    font-size: 14px;
    margin: 0; padding: 0;
}
#tsd-ki-modal-x {
    background: none !important;
    border: none !important;
    font-size: 22px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    width: 28px;
    height: 28px;
    min-height: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none !important;
}
#tsd-ki-modal-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#tsd-ki-hint {
    font-size: 13px;
    color: #666;
    margin: 0;
}
#tsd-ki-prompt-wrap {
    position: relative;
}
#tsd-ki-prompt {
    width: 100%;
    height: 100px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px 46px 10px 10px;
    font-size: 16px;
    resize: none;
    box-sizing: border-box;
    font-family: inherit;
}
#tsd-ki-prompt:focus { outline: none; border-color: #111; }
#tsd-ki-mic {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
    padding: 0 !important;
    box-shadow: none !important;
    min-height: unset !important;
    transition: background .15s, color .15s;
}
#tsd-ki-mic:hover { background: #e0e0e0 !important; }
#tsd-ki-mic.tsd-ki-mic-active {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff;
    animation: tsd-ki-mic-pulse 1s ease-in-out infinite;
}
@keyframes tsd-ki-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(17,17,17,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(17,17,17,0); }
}
#tsd-ki-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
#tsd-ki-counter {
    font-size: 12px;
    color: #888;
}
#tsd-ki-generate {
    background: #111 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 9px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    min-height: unset !important;
    box-shadow: none !important;
    transition: background .15s;
}
#tsd-ki-generate:hover:not(:disabled) { background: #333 !important; }
#tsd-ki-generate:disabled { background: #cc0000 !important; cursor: not-allowed; }
.tsd-ki-spin { animation: tsd-ki-spin-rotate .9s linear infinite; transform-origin: 50% 50%; }
@keyframes tsd-ki-spin-rotate {
    0%   { transform: rotate(0deg)   scale(0.9); }
    50%  { transform: rotate(180deg) scale(1.15); }
    100% { transform: rotate(360deg) scale(0.9); }
}

#tsd-ki-example {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 10px;
    border: 1px solid #eee;
}
#tsd-ki-example-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #fff;
}
#tsd-ki-example-caption {
    font-size: 12px;
    color: #777;
    line-height: 1.35;
}
#tsd-ki-status {
    display: none;
    font-size: 13px;
    padding: 8px 10px;
    background: #f8f8f8;
    border-radius: 6px;
}

/* Stil-Auswahl Chips */
#tsd-ki-styles {
    display: flex;
    gap: 8px;
    padding: 2px 0 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#tsd-ki-styles::-webkit-scrollbar { display: none; }
.tsd-ki-style-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    width: 72px;
}
.tsd-ki-style-chip svg {
    width: 72px;
    height: 56px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #f5f5f5;
    transition: border-color .15s;
    display: block;
}
.tsd-ki-style-chip span {
    font-size: 11px;
    color: #555;
    text-align: center;
    transition: color .15s;
}
.tsd-ki-style-chip.tsd-ki-style-active svg {
    border-color: #111;
    box-shadow: 0 0 0 1px #111;
}
.tsd-ki-style-chip.tsd-ki-style-active span {
    color: #111;
    font-weight: 700;
}

/* Ladebalken */
#tsd-ki-loadbar-wrap {
    display: none;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}
#tsd-ki-loadbar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #111 0%, #555 100%);
    border-radius: 2px;
}

/* Bildergalerie */
#tsd-ki-gallery {
    display: none;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
#tsd-ki-gallery::before {
    content: 'Meine generierten Bilder';
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tsd-ki-thumb {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    width: 80px;
    margin: 0 6px 8px 0;
    vertical-align: top;
}
.tsd-ki-thumb img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    transition: border-color .15s;
}
.tsd-ki-thumb:hover img { border-color: #111; }
.tsd-ki-thumb-label {
    font-size: 10px;
    color: #888;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.canvas-container textarea {
    font-size: 16px !important;
    opacity: 0 !important;
}

/* ── Mobile Text-Edit Modal ── */
#tsd-mobile-text-ov {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
#tsd-mobile-text-modal {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 600px;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#tsd-mobile-text-input {
    font-size: 22px !important;
    font-weight: 600;
    -webkit-text-size-adjust: 100%;
    padding: 8px 14px;
    border: 2px solid #111;
    border-radius: 12px;
    outline: none;
    width: 100%;
    /* v2.7.454: 3 Zeilen sichtbar; Flatsome-min-height/margin am Textarea neutralisiert */
    height: calc(3 * 1.2em + 20px) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.2 !important;
    resize: none;
    display: block;
    overflow-y: auto;
}
#tsd-mobile-text-btns button { margin: 0 !important; }
#tsd-mobile-text-btns {
    display: flex;
    gap: 10px;
}
#tsd-mobile-text-btns button {
    flex: 1;
    height: 46px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
#tsd-mobile-text-cancel {
    background: #f0f0f0;
    color: #555;
}
#tsd-mobile-text-ok {
    background: #111;
    color: #fff;
}

/* Rundtext-Tab-Inhalt lebt jetzt im gemeinsamen #tsd-fk-panel (siehe FARBE/
   KONTUR/RUNDTEXT/AA PANEL weiter unten) – eigene Fixed-Positionierung entfällt. */


/* fal.ai Flux Tab */
#tsd-ki-tabs { display:flex; gap:6px; margin-bottom:12px; }
.tsd-ki-tab { background:#f0f0f0; border:1px solid #ddd; border-radius:6px; padding:4px 10px; font-size:12px; font-weight:600; cursor:pointer; color:#555; white-space:nowrap; }
.tsd-ki-tab-active { background:#2d2d2d; color:#fff; border-color:#2d2d2d; }

/* ---- Feste Bedien-Leiste beim Skalieren ausblenden ----
   Verhindert, dass HINTEN-Thumbnail/Farbe/Freistellen/Anwenden-Badges in die
   Quere kommen, wenn Anfasser bei großen Bildern/Masken unten landen. Opacity
   statt display:none, damit kein Layout-Sprung entsteht. */
.tsd-hide-while-scaling { opacity: 0 !important; pointer-events: none !important; }

/* ---- Mobile Textbearbeitung: OK- und Bogen/Gerade-Buttons schwarz statt rot ----
   Nur auf Mobile - Desktop behält weiterhin die Akzentfarbe. */
@media (max-width: 768px) {
    #tsd-mobile-text-ok { background: #111 !important; }
    #tsd-mobile-text-cancel { background: #f0f0f0 !important; color: #555 !important; }
    .tsd-effect-btn { border-color: #ddd !important; color: #555 !important; background: #fff !important; }
    .tsd-effect-btn.active { background: #111 !important; border-color: #111 !important; color: #fff !important; }
    .tsd-effect-btn:hover { border-color: #111 !important; color: #111 !important; }
}

/* v2.7.263 (Micha: 7 Farben pro Reihe statt nur 4, Desktop hat mehr Platz -
   Mobil (max-width des Popups per Inline-Style auf 220px) muss bei 4 bleiben,
   wegen Platz). Ueberschreibt die feste Inline-max-width nur ab Desktop-
   Breite (769px, gleicher Breakpoint wie im Rest des Plugins), Mobil bleibt
   unangetastet. #tsd-svgcolor-popup selbst wird per JS mit Inline-Style
   erzeugt (siehe #tsd-svgcolor-badge-Klick-Handler in designer.js) - !important
   noetig, um die Inline-max-width zu ueberstimmen. */
@media (min-width: 769px) {
    #tsd-svgcolor-popup { max-width: 320px !important; }
}

/* v2.7.270 (Micha: leerer weisser "Punkt" trotz mehrerer JS-Fixes - #tsd-svgcolor-popup
   blieb in seltenen Faellen leer, aber auf display:flex stehen. Statt weiter am JS-
   Timing zu suchen: reine CSS-Absicherung, die IMMER greift, unabhaengig von der
   eigentlichen Ursache. :empty matcht das Element nur, wenn es WIRKLICH keine Kind-
   Elemente hat (siehe tsdUpdateSvgColorBadge() - das Popup enthaelt ausschliesslich
   .tsd-svgcolor-dot-Farbkreise, keine feste Struktur/Header/Close-Button) - sobald
   echte Farbkreise drin sind (normale SVG-Umfaerben-Funktion), hat es Kind-Elemente,
   :empty greift dann automatisch nicht mehr, die Funktion bleibt unangetastet. */
#tsd-svgcolor-popup:empty {
    display: none !important;
}

/* v2.7.380-cm / v2.7.381-cm: Text-Effekte im Text-Fenster, alle Knöpfe gleiche Schrift */
#tsd-float-arch-modal .tsd-arch-btn { text-transform: none !important; font-size: 13px !important; letter-spacing: 0 !important; }
/* v2.7.391-cm: alle Text-Formen als 3x3-Raster, jeder Knopf zeigt "TEXT" in seiner Form */
.tsd-fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
#tsd-float-arch-modal .tsd-fx-btn { width: 100%; height: 42px; margin: 0; padding: 6px 10px; display: flex; align-items: center; justify-content: center; color: #111; }
#tsd-float-arch-modal .tsd-fx-btn.active { color: #fff; }
.tsd-fx-prev { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; pointer-events: none; }
.tsd-fx-prev svg { width: 100%; height: 100%; display: block; }
.tsd-fx-prev.tsd-fx-txt { font-size: 13px; font-weight: 600; }
.tsd-fx-tools { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
#tsd-float-arch-modal .tsd-fx-tool { flex: 0 0 44px; width: 44px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; color: #111; font-size: 15px !important; font-weight: 700; }
#tsd-float-arch-modal .tsd-fx-tool.active { color: #fff; }
#tsd-float-arch-modal .tsd-fx-tool svg { width: 26px; height: 18px; display: block; pointer-events: none; }
.tsd-fx-k { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding-left: 6px; }
.tsd-fx-k.tsd-fx-off { visibility: hidden; }
.tsd-fx-k input[type="range"] { flex: 1; min-width: 0; width: 100%; accent-color: #111; }
#tsd-am-warp-val { width: 32px; text-align: right; font-size: 14px; font-weight: 700; color: #111; }
#tsd-warp-note { font-size: 13px; line-height: 1.35; color: #b42318; margin-top: 6px; }

/* v2.7.387-cm / v2.7.388-cm: Rückgängig / Wiederholen als Mini-Pille oben mittig (PC), fast durchsichtig, mit unsichtbar größerer Tippfläche */
#tsd-undo-pill { position: absolute; z-index: 190; top: 8px; left: 50%; transform: translateX(-50%); width: 46px; height: 18px; border-radius: 9px; background: rgba(255,255,255,0.35); display: flex; pointer-events: auto; }
#tsd-undo-pill button { position: relative; flex: 1; min-height: 0 !important; height: 100% !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation; }
#tsd-undo-pill button::before { content: ''; position: absolute; top: -13px; bottom: -13px; left: -10px; right: -10px; }
#tsd-undo-pill button:first-child::before { right: 0; }
#tsd-undo-pill button:last-child::before { left: 0; }
#tsd-undo-pill button + button { border-left: 1px solid rgba(0,0,0,0.08) !important; }
#tsd-undo-pill svg { width: 12px; height: 12px; fill: none; stroke: rgba(17,17,17,0.7); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#tsd-undo-pill button.tsd-undo-off { cursor: default; }
#tsd-undo-pill button.tsd-undo-off svg { stroke: rgba(17,17,17,0.22); }
/* v2.7.388-cm: am Handy 25 % größer, oben links über der Knopf-Spalte (Lage setzt designer.js) */
#tsd-undo-pill.tsd-undo-mobile { transform: none; width: 58px; height: 23px; border-radius: 12px; }
#tsd-undo-pill.tsd-undo-mobile svg { width: 15px; height: 15px; }
/* v2.7.389-cm: im Admin getrennt für PC und Handy abschaltbar */
@media (min-width: 769px) { #tsd-undo-pill.tsd-undo-no-desktop { display: none !important; } }
@media (max-width: 768px) { #tsd-undo-pill.tsd-undo-no-mobile { display: none !important; } }

/* v2.7.396-cm: Freistellen sitzt jetzt in der Werkzeug-Reihe unter dem Bild (neben Zuschneiden
   und Zauberstab) - die alten Knöpfe unten am Shirt bleiben unsichtbar als Auslöser drin */
#tsd-fal-badge, #tsd-png-fal-badge { display: none !important; }
#tsd-png-color-badge { left: 50% !important; transform: translateX(-50%); }

/* v2.7.396-cm / v2.7.397-cm: Zauberstab-Leiste (Außen | Innen | Radierer | Zurück | Fertig), flach */
#tsd-wand-ov { display: none; position: absolute; inset: 0; z-index: 480; cursor: crosshair; touch-action: none; overflow: hidden; }
#tsd-wand-ov.tsd-wand-open { display: block; }
#tsd-wand-brush { display: none; position: absolute; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #111; pointer-events: none; box-sizing: border-box; }
#tsd-wand-bar {
    display: none; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 490;
    flex-direction: column; gap: 5px; max-width: calc(100% - 12px); box-sizing: border-box;
    background: #fff; border-radius: 20px; padding: 5px 6px; box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
#tsd-wand-bar.tsd-wand-open { display: flex; }
#tsd-wand-bar .tsd-wand-row { display: flex; align-items: center; gap: 4px; }
#tsd-wand-bar .tsd-wand-radrow { display: none; gap: 8px; padding: 2px 2px 1px 6px; }
#tsd-wand-bar.tsd-wand-rad .tsd-wand-radrow { display: flex; }
#tsd-wand-bar button {
    margin: 0 !important; min-height: 0 !important; height: 30px; padding: 0 10px !important;
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    border: 0 !important; border-radius: 999px !important; box-shadow: none !important;
    font-size: 13px !important; font-weight: 700; line-height: 1; letter-spacing: 0 !important; text-transform: none !important;
    background: #efefef !important; color: #111 !important; cursor: pointer; touch-action: manipulation;
}
#tsd-wand-bar button svg { display: block; flex-shrink: 0; }
#tsd-wand-bar button.tsd-wand-on, #tsd-wand-bar #tsd-wand-ok { background: #111 !important; color: #fff !important; }
#tsd-wand-bar .tsd-wand-sq { width: 30px; padding: 0 !important; justify-content: center; }
#tsd-wand-bar #tsd-wand-undo:disabled { opacity: .35; cursor: default; }
#tsd-wand-bar .tsd-wand-sep { width: 1px; height: 22px; background: #ddd; margin: 0 2px; }
#tsd-wand-bar #tsd-wand-size { width: 110px; accent-color: #111; margin: 0; }
#tsd-wand-sizev { width: 40px; font-size: 13px; font-weight: 700; color: #111; }
/* v2.7.399-cm: Zurückholen raus, Lasso ohne zweite Zeile, Radierer/Lasso nur Icon, alles rund */
#tsd-wand-lasso { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
#tsd-wand-lasso polyline, #tsd-wand-lasso line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
#tsd-wand-lasso .tsd-wl-w, #tsd-wand-lasso .tsd-wl-pw { stroke: #fff; stroke-width: 3; }
#tsd-wand-lasso .tsd-wl-b, #tsd-wand-lasso .tsd-wl-pb { stroke: #111; stroke-width: 1.5; stroke-dasharray: 5 4; }
#tsd-wand-lasso .tsd-wl-start { fill: #fff; stroke: #111; stroke-width: 2; }
#tsd-wand-lasso .tsd-wl-start.tsd-wl-near { fill: #111; stroke: #fff; stroke-width: 3; }
/* v2.7.398-cm: zu schmal (Handy) -> Knöpfe nur mit Icon */
#tsd-wand-bar.tsd-wand-compact .tsd-wand-t { display: none; }
#tsd-wand-bar.tsd-wand-compact .tsd-wand-mode { width: 36px; padding: 0 !important; justify-content: center; }
#tsd-wand-bar.tsd-wand-compact .tsd-wand-mode svg { width: 18px; height: 18px; }
#tsd-wand-bar .tsd-wand-row > button { flex-shrink: 0; }
#tsd-wand-bar.tsd-wand-compact .tsd-wand-mode.tsd-wand-sq { width: 30px; }
/* v2.7.401-cm: Farbe - Farbfelder in der zweiten Zeile */
#tsd-wand-bar .tsd-wand-colrow { display: none; flex-wrap: wrap; gap: 6px; padding: 3px 4px; max-width: 290px; }
#tsd-wand-bar.tsd-wand-farbe .tsd-wand-colrow { display: flex; }
#tsd-wand-bar .tsd-wand-col { width: 26px; height: 26px; padding: 0 !important; border-radius: 6px !important; flex-shrink: 0; }
#tsd-wand-bar .tsd-wand-col[data-color="#ffffff"], #tsd-wand-bar .tsd-wand-col[data-color="#fff"], #tsd-wand-bar .tsd-wand-col[data-color="#FFFFFF"] { box-shadow: inset 0 0 0 1px #111 !important; }
#tsd-wand-bar .tsd-wand-col.tsd-wand-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111 !important; }

/* v2.7.403-cm: Zauberstab offen -> alles außer Leiste und Bild ausblenden */
.tsd-wand-wrap > :not(canvas):not(#tsd-wand-ov):not(#tsd-wand-bar):not(#tsd-wand-tip),
body.tsd-wand-aktiv #tsd-upload-badge, body.tsd-wand-aktiv #tsd-filter-badge, body.tsd-wand-aktiv #tsd-t-badge,
body.tsd-wand-aktiv #tsd-motive-badge, body.tsd-wand-aktiv #tsd-shapes-badge, body.tsd-wand-aktiv #tsd-lupe-badge,
body.tsd-wand-aktiv #tsd-share-badge, body.tsd-wand-aktiv #tsd-switch-badge, body.tsd-wand-aktiv #tsd-ki-badge,
body.tsd-wand-aktiv #tsd-dtpl-save-badge, body.tsd-wand-aktiv #gi-info-badge, body.tsd-wand-aktiv #tsd-side-thumb,
body.tsd-wand-aktiv #tcm-badge, body.tsd-wand-aktiv #tcm-size-badge, body.tsd-wand-aktiv #tsd-undo-pill,
body.tsd-wand-aktiv #tsd-png-color-badge, body.tsd-wand-aktiv #tsd-motiv-color-badge {
    visibility: hidden !important; pointer-events: none !important;
}
/* v2.7.404-cm: aufs Bild getippt ohne Werkzeug -> Werkzeuge wackeln kurz */
@keyframes tsdWandWackel { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-3px) rotate(-4deg); } 40% { transform: translateX(3px) rotate(4deg); } 60% { transform: translateX(-2px) rotate(-2deg); } 80% { transform: translateX(2px) rotate(2deg); } }
#tsd-wand-bar .tsd-wand-mode.tsd-wand-wackel { animation: tsdWandWackel .5s ease; }
/* v2.7.405-cm: Sticker - Farben + Rand-Regler in der zweiten Zeile */
#tsd-wand-bar .tsd-wand-stkrow { display: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 3px 4px; max-width: 290px; }
#tsd-wand-bar.tsd-wand-sticker .tsd-wand-stkrow { display: flex; }
#tsd-wand-bar .tsd-wand-stkcols { display: flex; flex-wrap: wrap; gap: 6px; }
#tsd-wand-bar .tsd-wand-stkmm { display: flex; align-items: center; gap: 8px; color: #111; }
#tsd-wand-bar #tsd-wand-stkmm { flex: 1; min-width: 0; accent-color: #111; margin: 0; }
#tsd-wand-stkmmv { width: 46px; font-size: 13px; font-weight: 700; color: #111; text-align: right; }

/* v2.7.410-cm: große Zauberstab-Leiste - 42-px-Kreise, Icons 25 px, AU/IN als Ring-Icons
   über die volle Knopfgröße, am Handy über die ganze Breite verteilt */
#tsd-wand-bar { border-radius: 26px; padding: 7px 8px; gap: 8px; }
#tsd-wand-bar .tsd-wand-row { gap: 6px; }
#tsd-wand-bar button { height: 42px; }
#tsd-wand-bar .tsd-wand-sq, #tsd-wand-bar #tsd-wand-undo, #tsd-wand-bar #tsd-wand-ok {
    width: 42px; padding: 0 !important; justify-content: center; border-radius: 50% !important;
}
#tsd-wand-bar button svg { width: 25px; height: 25px; }
#tsd-wand-bar .tsd-wand-ring { background: transparent !important; }
#tsd-wand-bar .tsd-wand-ring svg.tsd-wand-ringic { width: 42px; height: 42px; overflow: visible; }
#tsd-wand-bar .tsd-wand-ring.tsd-wand-on { background: transparent !important; box-shadow: 0 0 0 3px #111 !important; }
#tsd-wand-bar .tsd-wand-sep { height: 28px; }
#tsd-wand-bar .tsd-wand-col { width: 34px; height: 34px; border-radius: 7px !important; }
#tsd-wand-bar .tsd-wand-colrow, #tsd-wand-bar .tsd-wand-stkrow { max-width: none; }
#tsd-wand-bar .tsd-wand-radrow { padding: 4px 8px 6px; gap: 10px; }
#tsd-wand-bar #tsd-wand-size { flex: 1; width: auto; min-width: 120px; height: 28px; }
#tsd-wand-sizev { width: 48px; font-size: 15px; text-align: right; }
@media (max-width: 600px) {
    #tsd-wand-bar { left: 8px; right: 8px; transform: none; max-width: none; }
    #tsd-wand-bar .tsd-wand-row { justify-content: space-between; gap: 0; }
    #tsd-wand-bar.tsd-wand-farbe .tsd-wand-colrow, #tsd-wand-bar .tsd-wand-stkcols {
        display: grid; grid-template-columns: repeat(8, 34px); justify-content: space-between; row-gap: 8px; padding: 0 4px 2px;
    }
}

/* v2.7.411-cm: Rand-Anzeige (z. B. "7,5 mm") nie umbrechen - sonst springt die Zeilenhöhe beim Schieben */
#tsd-wand-stkmmv, #tsd-wand-sizev { white-space: nowrap !important; flex: 0 0 auto; width: 64px !important; font-size: 15px !important; line-height: 1.2 !important; text-align: right; }
#tsd-wand-bar .tsd-wand-stkmm { min-height: 32px; }

/* v2.7.413-cm: Filter offen -> nur Shirt + Filter-Leiste, wie beim Zauberstab */
.tsd-filter-wrap > :not(canvas),
body.tsd-filter-aktiv #tsd-upload-badge, body.tsd-filter-aktiv #tsd-filter-badge, body.tsd-filter-aktiv #tsd-t-badge,
body.tsd-filter-aktiv #tsd-motive-badge, body.tsd-filter-aktiv #tsd-shapes-badge, body.tsd-filter-aktiv #tsd-lupe-badge,
body.tsd-filter-aktiv #tsd-share-badge, body.tsd-filter-aktiv #tsd-switch-badge, body.tsd-filter-aktiv #tsd-ki-badge,
body.tsd-filter-aktiv #tsd-dtpl-save-badge, body.tsd-filter-aktiv #gi-info-badge, body.tsd-filter-aktiv #tsd-side-thumb,
body.tsd-filter-aktiv #tcm-badge, body.tsd-filter-aktiv #tcm-size-badge, body.tsd-filter-aktiv #tsd-undo-pill,
body.tsd-filter-aktiv #tsd-png-color-badge, body.tsd-filter-aktiv #tsd-motiv-color-badge,
body.tsd-filter-aktiv #tsd-png-fal-badge, body.tsd-filter-aktiv #tsd-fixedgfx-color-badge, body.tsd-filter-aktiv #tsd-svgcolor-badge,
body.tsd-filter-aktiv #tsd-fal-badge, body.tsd-filter-aktiv #tsd-mask-apply-bar {
    visibility: hidden !important; pointer-events: none !important;
}

/* v2.7.452-cm: mit dem Buchstaben-Knopf passt der Stärke-Regler nicht mehr in die Werkzeug-Reihe
   (Desktop: abgeschnitten, nicht bedienbar) -> eigene Zeile über volle Breite */
#tsd-float-arch-modal .tsd-fx-tools { flex-wrap: wrap; row-gap: 8px; }
#tsd-float-arch-modal .tsd-fx-k { flex: 1 1 100%; padding-left: 0; }
#tsd-float-arch-modal .tsd-fx-k.tsd-fx-off { display: none; }

/* v2.7.453-cm: Desktop-Scrollbalken lag über dem Inhalt (Ziffern abgeschnitten, Effekt-Kacheln
   ohne Luft) -> Platz für den Balken reservieren, nichts darf breiter werden als die Box */
#tsd-fk-body { overflow-x: hidden; scrollbar-gutter: stable; scrollbar-width: thin; padding-right: 10px; box-sizing: border-box; }
#tsd-fk-body #tsd-float-arch-modal, #tsd-fk-body #tsd-float-arch-modal * { box-sizing: border-box; }
#tsd-fk-body #tsd-float-arch-modal .tsd-arch-label { padding-right: 2px; }
@media (hover: none) { #tsd-fk-body { padding-right: 0; scrollbar-gutter: auto; } }

/* v2.7.463-cm: Zeichnen – Icon rechts, eine Leiste oben links (Werkzeuge | Farben | Dicke) */
#tsd-draw-badge {
    position: absolute; z-index: 190; top: 220px; right: 10px; left: auto;
    width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #111;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25); border: none;
    transition: transform .15s, box-shadow .15s;
    user-select: none; -webkit-user-select: none; touch-action: manipulation; pointer-events: auto;
}
#tsd-draw-badge:hover, #tsd-draw-badge:active { transform: scale(1.12); }
#tsd-draw-badge span { display: flex; }
#tsd-draw-badge .tsd-draw-aus { display: none; }
#tsd-draw-badge.tsd-draw-ist-an { background: #111; color: #fff; }
#tsd-draw-badge.tsd-draw-ist-an .tsd-draw-an { display: none; }
#tsd-draw-badge.tsd-draw-ist-an .tsd-draw-aus { display: flex; }

#tsd-draw-bar {
    display: none; position: absolute; top: 8px; left: 8px; z-index: 490;
    max-width: calc(100% - 70px); box-sizing: border-box;
    background: #fff; border-radius: 26px; padding: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
#tsd-draw-bar.tsd-draw-open { display: flex; }
#tsd-draw-bar .tdg { display: none; align-items: center; gap: 6px; flex-wrap: nowrap; min-width: 0; }
#tsd-draw-bar button {
    margin: 0 !important; min-height: 0 !important; width: 40px; height: 40px; padding: 0 !important; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0 !important; border-radius: 50% !important; box-shadow: none !important;
    background: #efefef !important; color: #111 !important; cursor: pointer; touch-action: manipulation;
}
#tsd-draw-bar button svg { display: block; width: 22px; height: 22px; }
#tsd-draw-bar button.tsd-draw-on { background: #111 !important; color: #fff !important; }
#tsd-draw-bar .tsd-draw-sep { width: 1px; height: 26px; background: #ddd; margin: 0 2px; flex: none; }
#tsd-draw-dot { display: block; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
#tsd-draw-fq { display: block; width: 20px; height: 20px; border-radius: 5px; border: 2px solid #111; box-sizing: border-box; }
#tsd-draw-fq.tsd-draw-leer { background: linear-gradient(45deg, transparent 44%, #111 44%, #111 56%, transparent 56%) !important; }
#tsd-draw-bar .tsd-draw-strich { display: block; width: 22px; border-radius: 4px; }
#tsd-draw-bar .tsd-draw-pv { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; }
#tsd-draw-bar .tsd-draw-sw { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; }
#tsd-draw-bar .tsd-draw-sw::-webkit-scrollbar { display: none; }
#tsd-draw-bar .tsd-draw-col { width: 32px !important; height: 32px !important; }
#tsd-draw-bar .tsd-draw-col[data-color="#ffffff"], #tsd-draw-bar .tsd-draw-col[data-color="#FFFFFF"], #tsd-draw-bar .tsd-draw-col[data-color="#fff"] { box-shadow: inset 0 0 0 1px #111 !important; }
#tsd-draw-bar .tsd-draw-col.tsd-draw-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111 !important; }
#tsd-draw-bar .tsd-draw-ohne { display: none; background: #fff linear-gradient(45deg, transparent 44%, #111 44%, #111 56%, transparent 56%) !important; box-shadow: inset 0 0 0 1px #111 !important; }
#tsd-draw-dicke { width: 170px; max-width: 45vw; accent-color: #111; margin: 0 4px; }
#tsd-draw-fertig {
    display: none; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 490;
    align-items: center; gap: 6px; height: 40px; padding: 0 16px !important; margin: 0 !important;
    border: 0 !important; border-radius: 20px !important; background: #111 !important; color: #fff !important;
    font-size: 14px !important; font-weight: 700; text-transform: none !important; letter-spacing: 0 !important;
    white-space: nowrap; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.3) !important;
}
#tsd-draw-fertig.tsd-draw-open { display: inline-flex; }
/* Zeichnen an -> nur Shirt, Leiste und Haken-Icon */
body.tsd-draw-aktiv #tsd-upload-badge, body.tsd-draw-aktiv #tsd-filter-badge, body.tsd-draw-aktiv #tsd-t-badge,
body.tsd-draw-aktiv #tsd-motive-badge, body.tsd-draw-aktiv #tsd-shapes-badge, body.tsd-draw-aktiv #tsd-lupe-badge,
body.tsd-draw-aktiv #tsd-share-badge, body.tsd-draw-aktiv #tsd-switch-badge, body.tsd-draw-aktiv #tsd-ki-badge,
body.tsd-draw-aktiv #tsd-dtpl-save-badge, body.tsd-draw-aktiv #gi-info-badge, body.tsd-draw-aktiv #tsd-side-thumb,
body.tsd-draw-aktiv #tcm-badge, body.tsd-draw-aktiv #tcm-size-badge, body.tsd-draw-aktiv #tsd-undo-pill,
body.tsd-draw-aktiv #tsd-png-color-badge, body.tsd-draw-aktiv #tsd-motiv-color-badge, body.tsd-draw-aktiv #tsd-float-bar,
body.tsd-draw-aktiv #tsd-png-fal-badge, body.tsd-draw-aktiv #tsd-fixedgfx-color-badge, body.tsd-draw-aktiv #tsd-svgcolor-badge,
body.tsd-draw-aktiv #tsd-fal-badge, body.tsd-draw-aktiv #tsd-mask-apply-bar, body.tsd-draw-aktiv #tsd-drawcol-popup {
    visibility: hidden !important; pointer-events: none !important;
}

/* v2.7.464-cm: Zeichnen-Leiste so breit wie die Zauberstab-Leiste, Haken in der Leiste,
   Bleistift-Icon rechts ist während des Zeichnens weg */
body.tsd-draw-aktiv #tsd-draw-badge { visibility: hidden !important; pointer-events: none !important; }
#tsd-draw-bar { left: 50%; transform: translateX(-50%); max-width: calc(100% - 12px); padding: 7px 8px; }
#tsd-draw-bar button { width: 42px; height: 42px; }
#tsd-draw-bar button svg { width: 25px; height: 25px; }
#tsd-draw-bar #tsd-draw-ok { background: #111 !important; color: #fff !important; }
#tsd-draw-bar .tsd-draw-pv { width: 42px; height: 42px; }
#tsd-draw-bar .tsd-draw-col { width: 34px !important; height: 34px !important; border-radius: 7px !important; }
@media (max-width: 600px) {
    #tsd-draw-bar { left: 8px; right: 8px; transform: none; max-width: none; }
    #tsd-draw-bar .tdg { width: 100%; justify-content: space-between; gap: 0; }
    #tsd-draw-bar .tdg-farbe, #tsd-draw-bar .tdg-dicke { justify-content: flex-start; gap: 8px; }
    #tsd-draw-dicke { flex: 1; width: auto; max-width: none; }
}

/* v2.7.465-cm: Zeichnen-Leiste unter dem Bild (im Seitenfluss), runde Swatches mit Ring innen,
   "Pfad fertig" oben mittig auf dem Bild */
#tsd-draw-bar.tsd-draw-unten {
    position: relative; top: auto; left: auto; right: auto; transform: none;
    margin: 10px auto 0; width: max-content; max-width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
#tsd-draw-bar .tsd-draw-sw { justify-content: flex-start; gap: 5px; }
#tsd-draw-bar .tsd-draw-col { width: 30px !important; height: 30px !important; border-radius: 50% !important; }
#tsd-draw-bar .tsd-draw-col[data-color="#ffffff"], #tsd-draw-bar .tsd-draw-col[data-color="#FFFFFF"], #tsd-draw-bar .tsd-draw-col[data-color="#fff"] { box-shadow: inset 0 0 0 1px #111 !important; }
#tsd-draw-bar .tsd-draw-col.tsd-draw-on { box-shadow: inset 0 0 0 2px #111, inset 0 0 0 5px #fff !important; }
#tsd-draw-bar .tsd-draw-ohne { border-radius: 50% !important; }
#tsd-draw-fertig { bottom: auto; top: 10px; }
@media (max-width: 600px) {
    #tsd-draw-bar.tsd-draw-unten { width: auto; margin: 10px 8px 0; }
    #tsd-draw-bar .tdg-farbe .tsd-draw-sw { flex: 1; }
}

/* v2.7.466-cm: Zauberstab-Leiste ebenfalls unter dem Bild, Zeichnen-Leiste mit Luft unten,
   Preis/Größe-Leiste (Schlankes Layout) beim Basteln ausblenden */
#tsd-wand-bar.tsd-wand-unten {
    position: relative; top: auto; left: auto; right: auto; transform: none;
    margin: 10px auto; width: max-content; max-width: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
#tsd-draw-bar.tsd-draw-unten { margin: 10px auto; }
@media (max-width: 600px) {
    #tsd-wand-bar.tsd-wand-unten { width: auto; margin: 10px 8px; }
    #tsd-draw-bar.tsd-draw-unten { margin: 10px 8px; }
}
body.tsd-draw-aktiv #tsd-slim-buybar, body.tsd-wand-aktiv #tsd-slim-buybar { display: none !important; }

/* v2.7.467-cm: Dicke-Regler wie die anderen Designer-Regler - dunkler Anfasser, gefüllte Spur */
#tsd-draw-bar #tsd-draw-dicke { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; outline: none;
    background: linear-gradient(to right, #111 var(--p, 50%), #d9d9d9 var(--p, 50%)) !important; }
#tsd-draw-bar #tsd-draw-dicke::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
    background: #111; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
#tsd-draw-bar #tsd-draw-dicke::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%;
    background: #111; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
/* v2.7.469-cm: ohne Werkzeug aufs Shirt getippt -> Zeichen-Werkzeuge wackeln (wie Zauberstab) */
#tsd-draw-bar .tsd-draw-tool.tsd-wand-wackel { animation: tsdWandWackel .5s ease; }

/* v2.7.470-cm: Zeichnen – Pfeil als Werkzeug, Eimer-Knopf links unten im Bild (nur bei geschlossener Form) */
#tsd-draw-bar button svg { width: 27px; height: 27px; }
#tsd-draw-fuell {
    display: none; position: absolute; left: 10px; bottom: 10px; z-index: 490;
    width: 46px; height: 46px; padding: 0 !important; margin: 0 !important; align-items: center; justify-content: center;
    border: 0 !important; border-radius: 50% !important; background: #fff !important; color: #111 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.25) !important; cursor: pointer; touch-action: manipulation;
}
#tsd-draw-fuell.tsd-draw-open { display: flex; }
#tsd-draw-fuell.tsd-draw-on { background: #111 !important; color: #fff !important; }
#tsd-draw-fuell svg { display: block; }

/* v2.7.471-cm: Zoom-Regler beim Zeichnen - senkrecht rechts unten im Bild, halbtransparent */
#tsd-draw-zoom {
    display: none; position: absolute; right: 8px; bottom: 14px; z-index: 489;
    width: 40px; height: 170px; border-radius: 20px; background: rgba(255,255,255,.55);
    box-shadow: 0 2px 8px rgba(0,0,0,.15); opacity: .75; transition: opacity .15s;
    align-items: center; justify-content: center; touch-action: none;
}
#tsd-draw-zoom.tsd-draw-open { display: flex; }
#tsd-draw-zoom:active, #tsd-draw-zoom:hover { opacity: 1; }
#tsd-draw-zoomr {
    -webkit-appearance: none; appearance: none; width: 140px; height: 6px; margin: 0; border-radius: 3px; outline: none;
    transform: rotate(-90deg); flex: none;
    background: linear-gradient(to right, #111 var(--p, 0%), rgba(0,0,0,.2) var(--p, 0%)) !important;
}
#tsd-draw-zoomr::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
    background: #111; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
#tsd-draw-zoomr::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #111; border: 3px solid #fff; cursor: pointer; }
/* v2.7.472-cm: Zoom-Regler schlank (Micha: viel zu breit und zu hoch) */
#tsd-draw-zoom { width: 28px; height: 118px; border-radius: 14px; right: 10px; bottom: 12px; background: rgba(255,255,255,.4); }
#tsd-draw-zoomr { width: 96px; height: 4px; }
#tsd-draw-zoomr::-webkit-slider-thumb { width: 18px; height: 18px; border-width: 2px; }
#tsd-draw-zoomr::-moz-range-thumb { width: 14px; height: 14px; border-width: 2px; }

/* v2.7.476-cm: Formen-Klappmenü über dem Linien-Symbol (2 Spalten, Linie unten rechts) */
#tsd-draw-klapp {
    display: none; position: absolute; bottom: calc(100% + 10px); z-index: 5;
    background: #fff; border-radius: 22px; padding: 4px; gap: 3px;
    grid-template-columns: 38px 38px; box-shadow: 0 6px 22px rgba(0,0,0,.3);
}
#tsd-draw-klapp.tsd-draw-auf { display: grid; animation: tsd_klapp .16s ease-out; }
@keyframes tsd_klapp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#tsd-draw-klapp:after {
    content: ""; position: absolute; z-index: -1; bottom: -6px; left: var(--pf, 64px); margin-left: -7px;
    width: 14px; height: 14px; background: #fff; transform: rotate(45deg); border-radius: 2px;
}
#tsd-draw-bar #tsd-draw-klapp button { width: 38px; height: 38px; }
#tsd-draw-bar #tsd-draw-klapp button svg { width: 30px; height: 30px; }
/* v2.7.496-cm: PNG speichern in der Lupe - gleicher Stil wie Mediathek-Icon; transparent mit Karomuster */
#tsd-fullscreen-preview-ov .tsd-lupe-dl {
    position: absolute;
    top: 14px;
    z-index: 100000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
#tsd-fullscreen-preview-ov .tsd-lupe-dl svg { display: block; pointer-events: none; }
#tsd-fullscreen-preview-ov #tsd-lupe-dlt-icon {
    background: repeating-conic-gradient(#fff 0 25%, #c4c7ca 0 50%) 0 0 / 10px 10px;
    box-shadow: 0 0 0 2px #111;
}
/* v2.7.498-cm: Radierer - Größe und Härte je mit Icon */
#tsd-wand-bar .tsd-wand-radrow .tsd-wand-radic { flex: 0 0 auto; display: block; }
/* v2.7.500-cm: Größe und Härte nebeneinander, Wert als Blase beim Ziehen */
#tsd-wand-bar .tsd-wand-radrow { padding: 2px 8px 4px; gap: 8px; justify-content: flex-start; }
#tsd-wand-bar .tsd-wand-rsw { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
#tsd-wand-bar .tsd-wand-rsw input[type="range"] { flex: 1; width: auto; min-width: 0 !important; height: 28px; accent-color: #111; margin: 0; }
#tsd-wand-bar .tsd-wand-rtr { width: 1px; height: 24px; background: #ddd; margin: 0 4px; flex: 0 0 auto; }
#tsd-wand-bar .tsd-wand-blase { position: absolute; bottom: 32px; transform: translateX(-50%); z-index: 5; background: #111; color: #fff; font-size: 15px; font-weight: 800; line-height: 1.2; padding: 6px 10px; border-radius: 10px; white-space: nowrap; display: none; pointer-events: none; }
#tsd-wand-bar .tsd-wand-blase:after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #111; }
#tsd-wand-bar .tsd-wand-blase.tsd-wand-blase-an { display: block; }

/* v2.7.502-cm: Distress - Kacheln mit Vorschau, Stärke-Regler (Text-Menü und Zeichnen-Leiste) */
.tsd-di-reihe { display: flex; gap: 8px; align-items: stretch; }
.tsd-di-k { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
    color: #111 !important; cursor: pointer; touch-action: manipulation; }
.tsd-di-k canvas, .tsd-di-k .tsd-di-b { display: block; width: 100%; aspect-ratio: 2 / 1; border-radius: 10px; box-sizing: border-box;
    border: 3px solid transparent; background: #2a2c2f; }
.tsd-di-k .tsd-di-b { display: flex; align-items: center; justify-content: center; background: #efefef; }
.tsd-di-k.tsd-di-aus { flex: 0 0 46px; }
.tsd-di-k.tsd-di-aus .tsd-di-b { aspect-ratio: auto; flex: 1; }
.tsd-di-k.on canvas, .tsd-di-k.on .tsd-di-b { border-color: #111; }
.tsd-di-k i { font-style: normal; font-size: 12px; font-weight: 700; color: #111; white-space: nowrap; }
.tsd-di-reg { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: #111; }
.tsd-di-reg svg { flex: none; }
.tsd-di-reg input[type="range"] { flex: 1; min-width: 0; margin: 0; }
.tsd-di-reg .tsd-di-v { width: 34px; text-align: right; font-size: 15px; color: #111; }
#tsd-float-arch-modal .tsd-fx-tool svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; }
#tsd-draw-bar .tdg-di { flex-wrap: wrap; row-gap: 8px; max-width: 340px; }
#tsd-draw-bar .tdg-di .tsd-di-reihe { flex: 1; gap: 6px; align-items: center; }
#tsd-draw-bar .tsd-di-k { width: auto; height: auto; flex: 1; border-radius: 0 !important; background: none !important; }
#tsd-draw-bar .tsd-di-k.tsd-di-aus { flex: 0 0 40px; }
#tsd-draw-bar .tsd-di-k.tsd-di-aus .tsd-di-b { flex: none; height: 40px; border-radius: 50%; }
#tsd-draw-bar .tsd-di-k canvas { border-radius: 8px; height: 40px; aspect-ratio: auto; }
#tsd-draw-bar #tsd-draw-dis { flex: 1 0 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; outline: none; margin: 8px 4px 6px;
    background: linear-gradient(to right, #111 var(--p, 45%), #d9d9d9 var(--p, 45%)) !important; }
#tsd-draw-bar #tsd-draw-dis::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
    background: #111; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
#tsd-draw-bar #tsd-draw-dis::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%;
    background: #111; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
@media (max-width: 600px) {
    /* v2.7.505-cm: Distress-Knopf hat festen Platz - Leiste am Handy immer gleich, Kreise 36px, Icons 24px */
    #tsd-draw-bar .tdg-grund button { width: 36px; height: 36px; }
    #tsd-draw-bar .tdg-grund button svg { width: 24px; height: 24px; }
    #tsd-draw-bar .tdg-di { max-width: none; }
}
/* v2.7.505-cm: ohne Auswahl ist der Distress-Knopf grau */
#tsd-draw-bar #tsd-draw-di.tsd-draw-grau { opacity: .35; }


/* v2.7.503-cm: Text-Fenster aufgeräumt - Kacheln flacher, mehr Luft zu den runden Knöpfen und zum ersten Regler, Regler enger */
#tsd-float-arch-modal .tsd-fx-grid { margin-bottom: 22px; }
#tsd-float-arch-modal .tsd-fx-btn { height: 39px; }
#tsd-float-arch-modal .tsd-fx-tools { row-gap: 16px; }
#tsd-float-arch-modal .tsd-arch-slider-wrap { padding-top: 2px; }
#tsd-float-arch-modal .tsd-arch-label { margin-bottom: 0; }
#tsd-float-arch-modal .tsd-arch-slider-wrap input[type="range"] { margin-top: 4px; margin-bottom: 4px; }

/* v2.7.506-cm: Distress - 6 Effekte, Reihe seitlich wischbar; Aus bleibt links fest, die 4. Kachel guckt an */
.tsd-di-scroll { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: stretch; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.tsd-di-scroll::-webkit-scrollbar { display: none; }
.tsd-di-scroll .tsd-di-k { flex: 0 0 calc((100% - 16px) / 3.35); scroll-snap-align: start; }
#tsd-draw-bar .tdg-di .tsd-di-scroll { gap: 6px; align-items: center; }
#tsd-draw-bar .tdg-di .tsd-di-scroll .tsd-di-k { flex: 0 0 calc((100% - 12px) / 3.35); }

/* v2.7.507-cm: Zoom-Regler auch bei "Bild anpassen" - genau wie beim Zeichnen */
#tsd-fl-zoom {
    display: none; position: absolute; right: 10px; bottom: 12px; z-index: 489;
    width: 28px; height: 118px; border-radius: 14px; background: rgba(255,255,255,.4);
    box-shadow: 0 2px 8px rgba(0,0,0,.15); opacity: .75; transition: opacity .15s;
    align-items: center; justify-content: center; touch-action: none;
}
#tsd-fl-zoom.tsd-fl-zoom-open { display: flex; }
.tsd-filter-wrap > #tsd-fl-zoom { visibility: visible !important; pointer-events: auto !important; }
#tsd-fl-zoom:active, #tsd-fl-zoom:hover { opacity: 1; }
#tsd-fl-zoomr {
    -webkit-appearance: none; appearance: none; width: 96px; height: 4px; margin: 0; border-radius: 3px; outline: none;
    transform: rotate(-90deg); flex: none;
    background: linear-gradient(to right, #111 var(--p, 0%), rgba(0,0,0,.2) var(--p, 0%)) !important;
}
#tsd-fl-zoomr::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
    background: #111; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
#tsd-fl-zoomr::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #111; border: 2px solid #fff; cursor: pointer; }

/* v2.7.509-cm: Desktop - Distress-Reihe mit der Maus ziehbar */
@media (hover: hover) and (pointer: fine) {
    .tsd-di-scroll { cursor: grab; }
    .tsd-di-scroll.tsd-di-zieht, .tsd-di-scroll.tsd-di-zieht .tsd-di-k { cursor: grabbing; }
}
/* v2.7.509-cm: Desktop - die 6 runden Knöpfe im Text-Fenster in eine Reihe, Stärke-Regler darunter */
@media (min-width: 769px) {
    #tsd-float-arch-modal .tsd-fx-tools { column-gap: 6px; }
    #tsd-float-arch-modal .tsd-fx-tools > .tsd-fx-tool { flex: 1 1 0 !important; min-width: 0 !important; max-width: 44px; margin: 0 !important; }
}

/* v2.7.510-cm: Desktop - Zeichnen-Leiste liegt unten über dem Shirt, wenn sie unter dem Bild nicht mehr ins Fenster passt */
#tsd-draw-bar.tsd-draw-unten.tsd-draw-drauf {
    position: fixed !important; margin: 0 !important; right: auto !important; bottom: auto !important;
    transform: translateX(-50%) !important; width: max-content; z-index: 9990; box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
/* v2.7.510-cm: Desktop - Distress in der Zeichnen-Leiste flacher */
@media (min-width: 769px) {
    #tsd-draw-bar .tdg-di { row-gap: 2px; }
    #tsd-draw-bar .tsd-di-k canvas { height: 34px; }
    #tsd-draw-bar .tsd-di-k.tsd-di-aus { flex: 0 0 36px; }
    #tsd-draw-bar .tsd-di-k.tsd-di-aus .tsd-di-b { height: 36px; }
    #tsd-draw-bar #tsd-draw-dis { margin: 6px 4px 4px; }
}

/* v2.7.514-cm: "Pfad fertig"-Knopf entfällt - neuer Pfad: Werkzeug nochmal antippen, Esc/Enter, oder 3 s Ruhe */
#tsd-draw-fertig, #tsd-draw-fertig.tsd-draw-open { display: none !important; }

/* v2.7.516-cm: Fläche/Kontur-Umschalter über dem Eimer - zwei überlappende Quadrate wie in Illustrator, vorne = aktiv */
#tsd-draw-fk {
    display: none; position: absolute; left: 10px; bottom: 66px; z-index: 490;
    width: 46px; height: 46px; padding: 0 !important; margin: 0 !important; min-height: 0 !important;
    border: 0 !important; border-radius: 50% !important; background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.25) !important; cursor: pointer; touch-action: manipulation;
}
#tsd-draw-fk.tsd-draw-open { display: block; }
#tsd-draw-fk i { position: absolute; width: 20px; height: 20px; border-radius: 3px; box-sizing: border-box; pointer-events: none; }
#tsd-draw-fk .tsd-fk-fl { left: 9px; top: 9px; background: var(--fl, transparent); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
#tsd-draw-fk .tsd-fk-ko { left: 17px; top: 17px; background: #fff; border: 5px solid var(--ko, transparent); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
#tsd-draw-fk.tsd-fk-f .tsd-fk-fl { z-index: 2; }
#tsd-draw-fk.tsd-fk-f .tsd-fk-ko { z-index: 1; }
#tsd-draw-fk.tsd-fk-k .tsd-fk-ko { z-index: 2; }
#tsd-draw-fk.tsd-fk-k .tsd-fk-fl { z-index: 1; }

/* v2.7.518-cm: Pathfinder - Knopf unten links (wie Füllen), Hinweis-Pille, Funktionen in der Zeichnen-Leiste */
#tsd-draw-pf {
    display: none; position: absolute; left: 10px; bottom: 122px; z-index: 490;
    width: 46px; height: 46px; padding: 0 !important; margin: 0 !important; min-height: 0 !important; align-items: center; justify-content: center;
    border: 0 !important; border-radius: 50% !important; background: #fff !important; color: #111 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.25) !important; cursor: pointer; touch-action: manipulation;
}
#tsd-draw-pf.tsd-draw-open { display: flex; }
#tsd-draw-pf.tsd-draw-on { background: #111 !important; color: #fff !important; }
#tsd-draw-pf svg { display: block; }
#tsd-pf-tipp {
    display: none; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 490; pointer-events: none;
    background: #fff; color: #111; border: 1.5px solid #111; border-radius: 16px; height: 32px; line-height: 29px; padding: 0 14px;
    font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
#tsd-pf-tipp.tsd-draw-open { display: block; }
#tsd-draw-bar .tsd-pf-op svg { width: 28px; height: 28px; }
#tsd-draw-bar .tsd-pf-op:disabled { opacity: .35; cursor: default; }

/* v2.7.521-cm: Lupe - Motiv-PNG/SVG nur Admin oder per PIN; PIN-Fenster (Download-Pfeil 2 s halten) */
#tsd-fullscreen-preview-ov .tsd-dl-frei { display: none; }
#tsd-fullscreen-preview-ov .tsd-dl-frei.tsd-dl-auf { display: flex; }
#tsd-fullscreen-preview-ov #tsd-lupe-svg-icon { background: #fff; color: #111; font-size: 11px; font-weight: 800; letter-spacing: .3px; box-shadow: 0 0 0 2px #111; }
#tsd-fullscreen-preview-ov #tsd-lupe-dl-icon { -webkit-touch-callout: none; touch-action: manipulation; }
#tsd-dl-pin { display: none; position: absolute; inset: 0; z-index: 100001; background: rgba(0,0,0,.55); align-items: center; justify-content: center; }
#tsd-dl-pin.tsd-dl-pin-open { display: flex; }
#tsd-dl-pin .tsd-dl-pin-box { width: 260px; max-width: calc(100% - 40px); background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
#tsd-dl-pin .tsd-dl-pin-t { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 12px; }
#tsd-dl-pin #tsd-dl-pin-in { width: 100%; box-sizing: border-box; height: 44px; font-size: 20px; letter-spacing: 4px; text-align: center; border: 1.5px solid #111; border-radius: 10px; margin: 0; color: #111; background: #fff; }
#tsd-dl-pin .tsd-dl-pin-msg { min-height: 18px; font-size: 13px; color: #c62828; margin: 6px 0 8px; }
#tsd-dl-pin .tsd-dl-pin-btns { display: flex; gap: 8px; }
#tsd-dl-pin .tsd-dl-pin-btns button { flex: 1; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0; min-height: 0; }
#tsd-dl-pin #tsd-dl-pin-x { background: #efefef; color: #111; }
#tsd-dl-pin #tsd-dl-pin-ok { background: #2b2d30; color: #fff; }

/* v2.7.525-cm: Text-Panel näher am Text - Spitze 6 px; sitzt das Panel unter dem Text, zeigt die Spitze nach oben */
#tsd-float-bar::after { bottom: -6px; border-width: 6px; border-bottom: none; }
#tsd-float-bar.tsd-flt-unten::after { bottom: auto; top: -6px; border: 6px solid transparent; border-top: none; border-bottom-color: rgba(30,30,30,0.92); }
