/* =====================================================================
   UNFALLSKIZZE — „Zeichentisch-Workstation"
   Vollbild-App. Dunkle Arbeitsfläche (Blaupause), schwebende helle Panels,
   weißes Skizzenblatt im Zentrum. Marke: Türkis + ein gelber Akzent.
   ===================================================================== */

:root {
    --c-brand:        #007E8D;
    --c-brand-dark:   #00454D;
    --c-brand-darker: #003138;
    --c-workspace:    #04252b;   /* tiefes Türkis-Schwarz */
    --c-workspace-2:  #06303700;
    --c-accent:       #FFDC00;
    --c-accent-dark:  #e6c700;
    --c-danger:       #e5484d;
    --c-danger-soft:  #fdecec;

    --panel:          #ffffff;
    --panel-2:        #f4f7f7;
    --panel-3:        #eaf0f0;
    --line:           #e2e8e8;
    --line-strong:    #cdd9d9;

    --ink:            #0d2a2e;
    --ink-2:          #4a6064;
    --ink-3:          #82979a;

    /* Text auf dunkler Chrome */
    --on-dark:        #eaf6f6;
    --on-dark-2:      #9ec3c5;
    --on-dark-3:      #6f9a9d;

    --ring:           #00b3c7;
    --shadow-panel:   0 10px 30px -8px rgba(0, 20, 24, .45), 0 2px 8px -2px rgba(0, 20, 24, .3);
    --radius:         16px;
    --radius-sm:      10px;
    --font-display:   Montserrat, ui-sans-serif, system-ui, sans-serif;
    --font-ui:        Inter, ui-sans-serif, system-ui, sans-serif;
}

[x-cloak] { display: none !important; }

/* ----- Vollbild-Grundgerüst ----- */
html, body.sketch-body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
}
body.sketch-body {
    background: #fff;
    color: var(--ink);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
}

.sketch-app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

/* =====================================================================
   TOPBAR
   ===================================================================== */
.sk-topbar {
    position: relative;
    z-index: 40;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 58px;
    padding: 0 14px;
    color: var(--on-dark);
    background: linear-gradient(180deg, #015761 0%, var(--c-brand-dark) 60%, var(--c-brand-darker) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, .35);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 6px 18px -10px rgba(0, 0, 0, .8);
}

.sk-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding-right: 4px;
}
.sk-brand-logo {
    height: 30px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: .96;
}
.sk-brand-text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.sk-brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .01em;
    white-space: nowrap;
}
.sk-brand-sub {
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--on-dark-2);
    font-weight: 600;
}

.sk-topbar-divider {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, .14);
    flex: 0 0 auto;
}
.sk-topbar-group { display: flex; align-items: center; gap: 6px; }
.sk-spacer { flex: 1 1 auto; }

/* Chrome-Buttons (auf Dunkel) */
.sk-tbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .06);
    color: var(--on-dark);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s, transform .08s, opacity .15s;
}
.sk-tbtn:hover { background: rgba(255, 255, 255, .14); }
.sk-tbtn:active { transform: translateY(1px); }
.sk-tbtn:disabled { opacity: .38; cursor: not-allowed; }
.sk-tbtn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.sk-tbtn.is-icon { padding: 0; width: 36px; justify-content: center; }
.sk-tbtn.is-active { background: rgba(0, 179, 199, .22); border-color: rgba(0, 179, 199, .5); color: #d6fbff; }

.sk-tbtn-ai {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 220, 0, .35);
}
.sk-tbtn-ai:hover { background: rgba(255, 220, 0, .16); }

.sk-tbtn-primary {
    background: var(--c-accent);
    color: #1a1500;
    border-color: var(--c-accent);
    box-shadow: 0 6px 16px -6px rgba(255, 220, 0, .6);
    padding: 0 16px;
}
.sk-tbtn-primary:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); }

.sk-tbtn-link {
    background: transparent;
    color: var(--on-dark-2);
    font-weight: 600;
    padding: 0 10px;
}
.sk-tbtn-link:hover { background: rgba(255, 255, 255, .08); color: var(--on-dark); }

/* Export-Dropdown */
.sk-menu-wrap { position: relative; }
.sk-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: var(--panel);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-panel);
    padding: 6px;
    z-index: 60;
}
.sk-menu-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    text-align: left;
    transition: background-color .12s;
}
.sk-menu-item:hover { background: var(--panel-2); }
.sk-menu-item svg { width: 18px; height: 18px; color: var(--c-brand); flex: 0 0 auto; }
.sk-menu-item small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-3); }

/* =====================================================================
   WORKSPACE (Zeichentisch)
   ===================================================================== */
.sk-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    touch-action: none;
}
.sk-stage.is-panning { cursor: grabbing; }
.sk-stage.can-pan { cursor: grab; }

/* Unendliches Raster (bewegt & skaliert mit der Ansicht via JS) */
.sk-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #fff;
    background-image:
        linear-gradient(rgba(0, 69, 77, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 69, 77, .05) 1px, transparent 1px);
    background-repeat: repeat;
}
.sk-grid.is-hidden { background-image: none; }

/* Fabric-Canvas füllt die gesamte Stage */
.sk-stage .canvas-container {
    position: absolute !important;
    top: 0; left: 0;
    z-index: 1;
}
#sketch { display: block; touch-action: none; }

/* Leerer-Zustand-Hinweis (zentriert auf der Stage) */
.sk-empty {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
    text-align: center;
    color: #9fb0b2;
    transition: opacity .25s;
}
.sk-empty svg { width: 46px; height: 46px; opacity: .5; }
.sk-empty-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: #6f8487; }
.sk-empty-sub { font-size: 13px; max-width: 260px; line-height: 1.45; }
.sk-empty.is-hidden { opacity: 0; }

/* =====================================================================
   SCHWEBENDE PANELS (allgemein)
   ===================================================================== */
.sk-panel {
    position: absolute;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    animation: sk-pop .3s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes sk-pop {
    from { opacity: 0; transform: translateY(6px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.sk-panel.is-hidden { display: none; }

.sk-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.sk-panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--ink);
    text-transform: uppercase;
}
.sk-panel-title-icon { color: var(--c-brand); width: 17px; height: 17px; }
.sk-panel-body { overflow-y: auto; padding: 12px; scrollbar-width: thin; }

.sk-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    transition: background-color .12s, color .12s;
}
.sk-icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.sk-icon-btn svg { width: 17px; height: 17px; }

/* ----- LEFT: Palette ----- */
.sk-palette {
    left: 16px;
    top: 16px;
    bottom: 16px;
    width: 276px;
}

.sk-search {
    position: relative;
    margin: 12px 12px 4px;
    flex: 0 0 auto;
}
.sk-search svg {
    position: absolute;
    left: 11px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--ink-3);
    pointer-events: none;
}
.sk-search input {
    width: 100%;
    height: 38px;
    padding: 0 12px 0 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
    font-family: var(--font-ui);
    font-size: 13.5px;
    color: var(--ink);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.sk-search input::placeholder { color: var(--ink-3); }
.sk-search input:focus {
    outline: none;
    border-color: var(--c-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 126, 141, .12);
}

.sk-cat { margin-bottom: 14px; }
.sk-cat-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin: 4px 2px 9px;
}
.sk-cat-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.sk-symbol-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.sk-symbol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 11px 6px 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    cursor: grab;
    user-select: none;
    transition: border-color .14s, box-shadow .14s, transform .1s, background-color .14s;
}
.sk-symbol:hover {
    border-color: var(--c-brand);
    background: #f6fcfc;
    box-shadow: 0 6px 16px -8px rgba(0, 126, 141, .5);
    transform: translateY(-2px);
}
.sk-symbol:active { cursor: grabbing; transform: translateY(0) scale(.97); }
.sk-symbol-thumb {
    width: 56px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sk-symbol-thumb img { max-width: 100%; max-height: 100%; pointer-events: none; }
.sk-symbol-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-2);
    text-align: center;
    line-height: 1.2;
}
.sk-symbol.is-hidden { display: none; }
.sk-cat.is-empty { display: none; }

.sk-no-results {
    display: none;
    padding: 24px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--ink-3);
}
.sk-no-results.is-visible { display: block; }

/* ----- RIGHT: Inspector ----- */
.sk-inspector {
    right: 16px;
    top: 16px;
    width: 286px;
    max-height: calc(100% - 32px);
    transition: right .28s cubic-bezier(.2, .9, .3, 1);
}
/* Inspector nach links versetzen, wenn das KI-Pane offen ist */
.sk-inspector.is-shifted { right: 392px; }

/* =====================================================================
   KI-CHAT-PANE (rechts angedockt)
   ===================================================================== */
.sk-ai-pane {
    right: 16px;
    top: 16px;
    bottom: 16px;
    width: 360px;
    padding: 0;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform .3s cubic-bezier(.2, .9, .3, 1), opacity .25s;
    animation: none;
}
.sk-ai-pane.is-open { transform: none; opacity: 1; pointer-events: auto; }

.sk-ai-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffe14d, var(--c-accent));
    color: #4a3d00;
    flex: 0 0 auto;
}
.sk-ai-head-icon svg { width: 16px; height: 16px; }

.sk-ai-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
}
.sk-ai-msg {
    max-width: 90%;
    font-size: 13.5px;
    line-height: 1.5;
    padding: 10px 13px;
    border-radius: 16px;
    animation: sk-pop .25s cubic-bezier(.2, .9, .3, 1) both;
}
.sk-ai-msg p { margin: 0; }
.sk-ai-msg.bot {
    align-self: flex-start;
    background: var(--panel-2);
    color: var(--ink);
    border-bottom-left-radius: 5px;
}
.sk-ai-msg.user {
    align-self: flex-end;
    background: var(--c-brand);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.sk-ai-msg.is-error { background: var(--c-danger-soft); color: #a8302f; }
.sk-ai-msg.is-loading { display: inline-flex; align-items: center; gap: 9px; color: var(--ink-2); }

.sk-ai-msg .sk-ai-examples { margin-top: 10px; }

.sk-ai-compose {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 11px;
    border-top: 1px solid var(--line);
}
.sk-ai-textarea {
    flex: 1 1 auto;
    resize: none;
    max-height: 150px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--panel-2);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    padding: 10px 13px;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.sk-ai-textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 126, 141, .12);
}
.sk-ai-send {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--c-accent);
    color: #1a1500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .14s, transform .08s, opacity .14s;
}
.sk-ai-send:hover { background: var(--c-accent-dark); }
.sk-ai-send:active { transform: scale(.94); }
.sk-ai-send:disabled { opacity: .5; cursor: not-allowed; }
.sk-ai-send svg { width: 19px; height: 19px; }

.sk-section { margin-bottom: 18px; }
.sk-section:last-child { margin-bottom: 4px; }
.sk-field-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 7px;
}
.sk-field-value { font-size: 12px; font-weight: 700; color: var(--c-brand-dark); font-variant-numeric: tabular-nums; }

.sk-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--panel-3);
    font-size: 12px;
    font-weight: 700;
    color: var(--c-brand-dark);
    margin-bottom: 14px;
}
.sk-selected-tag .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--c-brand); }

/* Range-Slider */
.sk-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--panel-3);
    outline: none;
    cursor: pointer;
}
.sk-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--c-brand);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: grab;
}
.sk-range::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--c-brand);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    cursor: grab;
}

/* Rotations-Schnellwahl */
.sk-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 9px; }
.sk-chip {
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .12s;
}
.sk-chip:hover { border-color: var(--c-brand); color: var(--c-brand); }
.sk-chip.is-active { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* Farbfelder */
.sk-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sk-swatch {
    width: 30px; height: 30px;
    border-radius: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--line-strong);
    cursor: pointer;
    transition: transform .1s, box-shadow .12s;
    position: relative;
}
.sk-swatch:hover { transform: scale(1.08); }
.sk-swatch.is-active { box-shadow: 0 0 0 2px var(--c-brand), 0 0 0 4px rgba(0, 126, 141, .25); }
.sk-swatch-custom {
    width: 30px; height: 30px;
    padding: 0;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    background: conic-gradient(from 0deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    cursor: pointer;
    overflow: hidden;
}
.sk-swatch-custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* Inspector-Buttons */
.sk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    font-family: var(--font-ui);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .14s, border-color .14s, color .14s, transform .08s;
}
.sk-btn svg { width: 16px; height: 16px; }
.sk-btn:hover { background: var(--panel-2); border-color: var(--line-strong); }
.sk-btn:active { transform: translateY(1px); }
.sk-btn-row { display: flex; gap: 8px; }
.sk-btn-ghost { color: var(--c-brand); }
.sk-btn-ghost:hover { border-color: var(--c-brand); background: #f3fbfb; }
.sk-btn-danger { color: var(--c-danger); }
.sk-btn-danger:hover { border-color: var(--c-danger); background: var(--c-danger-soft); }

/* Toggle-Reihe (Dokument-Panel) */
.sk-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.sk-toggle-row:last-child { border-bottom: 0; }
.sk-toggle-text { display: flex; flex-direction: column; }
.sk-toggle-text strong { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sk-toggle-text small { font-size: 11.5px; color: var(--ink-3); }
.sk-switch {
    position: relative;
    width: 42px; height: 24px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 0;
    background: var(--line-strong);
    cursor: pointer;
    transition: background-color .18s;
}
.sk-switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .18s;
}
.sk-switch.is-on { background: var(--c-brand); }
.sk-switch.is-on::after { transform: translateX(18px); }

.sk-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 12px;
    border-radius: 10px;
    background: var(--panel-2);
    margin-bottom: 14px;
}
.sk-stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--c-brand-dark); }
.sk-stat-label { font-size: 12px; color: var(--ink-2); font-weight: 600; }

.sk-hint-box {
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-2);
    background: var(--panel-2);
    border-radius: 10px;
    padding: 11px 12px;
}
.sk-hint-box kbd {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--ink);
    white-space: nowrap;
}

/* =====================================================================
   ZOOM-PILLE (unten, schwebend)
   ===================================================================== */
.sk-dock {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px;
    background: rgba(4, 37, 43, .82);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7);
}
.sk-dock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    color: var(--on-dark);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .12s;
}
.sk-dock-btn:hover { background: rgba(255, 255, 255, .12); }
.sk-dock-btn svg { width: 18px; height: 18px; }
.sk-dock-level {
    min-width: 54px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    cursor: pointer;
}
.sk-dock-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .14); margin: 0 4px; }
.sk-dock-scale { font-size: 11px; color: var(--on-dark-2); padding: 0 10px; letter-spacing: .03em; }

/* =====================================================================
   MOBILE: Panel-Umschalter (FAB-Leiste)
   ===================================================================== */
.sk-mobile-bar {
    display: none;
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 30;
    gap: 8px;
}
.sk-mobile-bar .sk-mbtn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 46px;
    border-radius: 12px;
    border: 0;
    background: rgba(4, 37, 43, .9);
    backdrop-filter: blur(10px);
    color: var(--on-dark);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6);
}
.sk-mbtn svg { width: 18px; height: 18px; }
.sk-mbtn.is-active { background: var(--c-brand); }

.sk-panel-close { display: none; }

/* =====================================================================
   MODALE (KI + Versand)
   ===================================================================== */
.sk-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(2, 20, 24, .72);
    backdrop-filter: blur(4px);
    animation: sk-fade .2s ease both;
}
@keyframes sk-fade { from { opacity: 0; } to { opacity: 1; } }
.sk-modal-card {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--panel);
    border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7);
    animation: sk-pop .28s cubic-bezier(.2, .9, .3, 1) both;
}
.sk-modal-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--line);
}
.sk-modal-icon {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-brand), var(--c-brand-dark));
    color: #fff;
}
.sk-modal-icon.is-accent { background: linear-gradient(135deg, #ffe14d, var(--c-accent)); color: #4a3d00; }
.sk-modal-icon svg { width: 22px; height: 22px; }
.sk-modal-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); }
.sk-modal-desc { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.45; }
.sk-modal-body { padding: 20px 24px; }
.sk-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 24px 22px;
}

.sk-textarea, .sk-input {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--panel-2);
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--ink);
    padding: 11px 13px;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.sk-textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.sk-input:focus, .sk-textarea:focus {
    outline: none;
    border-color: var(--c-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 126, 141, .12);
}
.sk-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.sk-form-field { display: block; margin-bottom: 13px; }
.sk-form-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.sk-req { color: var(--c-danger); }
.sk-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sk-check input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--c-brand); flex: 0 0 auto; }
.sk-check a { color: var(--c-brand); text-decoration: underline; }

.sk-ai-examples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.sk-ai-chip {
    border: 1px solid var(--line-strong);
    background: var(--panel-2);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .12s;
}
.sk-ai-chip:hover { border-color: var(--c-brand); color: var(--c-brand); background: #f3fbfb; }

/* Modal-Buttons */
.sk-mbtn-primary, .sk-mbtn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 11px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color .14s, border-color .14s, opacity .14s, transform .08s;
}
.sk-mbtn-primary:active, .sk-mbtn-secondary:active { transform: translateY(1px); }
.sk-mbtn-primary { background: var(--c-accent); color: #1a1500; border-color: var(--c-accent); }
.sk-mbtn-primary:hover { background: var(--c-accent-dark); }
.sk-mbtn-primary:disabled { opacity: .5; cursor: not-allowed; }
.sk-mbtn-primary svg { width: 17px; height: 17px; }
.sk-mbtn-secondary { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.sk-mbtn-secondary:hover { background: var(--panel-2); }

.sk-status { font-size: 13px; margin-top: 14px; min-height: 18px; line-height: 1.4; }
.sk-status.is-info { color: var(--ink-2); }
.sk-status.is-ok { color: #1a8a4a; }
.sk-status.is-err { color: var(--c-danger); }
.sk-spin {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: -2px;
    animation: sk-rot .7s linear infinite;
}
@keyframes sk-rot { to { transform: rotate(360deg); } }

/* =====================================================================
   TOASTS
   ===================================================================== */
.sk-toasts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.sk-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    max-width: 340px;
    padding: 12px 15px;
    border-radius: 12px;
    background: #07343b;
    color: var(--on-dark);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 255, 255, .08);
    animation: sk-toast-in .28s cubic-bezier(.2, .9, .3, 1) both;
}
.sk-toast.is-leaving { animation: sk-toast-out .25s ease forwards; }
.sk-toast svg { width: 18px; height: 18px; flex: 0 0 auto; }
.sk-toast.ok svg { color: #4ade80; }
.sk-toast.err svg { color: #ff8086; }
.sk-toast.info svg { color: var(--c-brand-light, #6BD1D1); }
@keyframes sk-toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes sk-toast-out { to { opacity: 0; transform: translateX(20px); } }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 920px) {
    .sk-brand-sub { display: none; }
    .sk-topbar-group.is-secondary { display: none; }   /* Undo/Redo/Clear -> bei Bedarf in Menü */
    .sk-tbtn-label { display: none; }
    .sk-tbtn { padding: 0 10px; }
    .sk-tbtn.has-label-mobile .sk-tbtn-label { display: inline; }
}

@media (max-width: 720px) {
    .sk-palette, .sk-inspector {
        left: 0; right: 0;
        top: auto;
        bottom: 0;
        width: auto;
        max-height: 62dvh;
        border-radius: var(--radius) var(--radius) 0 0;
        transform: translateY(105%);
        transition: transform .28s cubic-bezier(.2, .9, .3, 1);
        animation: none;
    }
    .sk-palette.is-open, .sk-inspector.is-open { transform: translateY(0); }
    .sk-inspector.is-shifted { right: 0; }   /* auf Mobil kein seitlicher Versatz */
    .sk-mobile-bar { display: flex; }
    .sk-dock { bottom: 74px; }
    .sk-panel-close { display: inline-flex; margin-left: auto; }
    .sk-symbol-grid { grid-template-columns: 1fr 1fr 1fr; }

    /* KI-Pane als Bottom-Sheet */
    .sk-ai-pane {
        left: 0; right: 0;
        top: auto; bottom: 0;
        width: auto;
        height: 78dvh;
        border-radius: var(--radius) var(--radius) 0 0;
        transform: translateY(105%);
        transition: transform .3s cubic-bezier(.2, .9, .3, 1);
    }
    .sk-ai-pane.is-open { transform: translateY(0); }
}

@media (max-width: 420px) {
    .sk-symbol-grid { grid-template-columns: 1fr 1fr; }
    .sk-form-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sk-panel, .sk-modal, .sk-modal-card, .sk-toast { animation: none !important; }
    .sk-symbol, .sk-tbtn, .sk-btn { transition: none !important; }
}
