/* ============================================================
   MOTIV STUDIO — App Stylesheet  v2
   ============================================================ */

/* ── Base ────────────────────────────────────────────────── */
body { margin: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* ── Header ──────────────────────────────────────────────── */
header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.3rem; height: 52px; flex-shrink: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--panel-bg); z-index: 10; position: relative; gap: 1.5rem;
}
.logo {
    font-size: 1.25rem; letter-spacing: 2px; text-transform: uppercase;
    font-family: 'Playfair Display', serif;
    display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
}
.header-controls { display: flex; align-items: center; gap: 0.85rem; margin-left: auto; }
.credits-group { display: flex; align-items: center; gap: 0.75rem; }
.credits {
    font-size: 1rem; font-weight: 600; color: var(--accent);
    display: flex; align-items: center; gap: 0.3rem; cursor: pointer;
}
.credit-icon { flex-shrink: 0; opacity: 0.85; }
.credits-unit { font-size: 0.65rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.5px; text-transform: uppercase; }
.btn-topup {
    background: transparent; border: 1px solid rgba(184,150,78,0.6); color: var(--accent);
    padding: 0.35rem 0.85rem; cursor: pointer; border-radius: 3px; transition: all 0.2s;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
    width: auto; margin: 0; font-family: 'Montserrat', sans-serif; line-height: 1.5;
}
.btn-topup:hover { background: var(--accent); border-color: var(--accent); color: var(--bg-dark); filter: none; }
.btn-logout {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 0.35rem; border-radius: 3px; display: flex; align-items: center;
    transition: color 0.2s, background 0.2s; width: auto; margin: 0;
}
.btn-logout:hover { color: var(--text-main); background: rgba(255,255,255,0.07); filter: none; }

.legal-icon-btn { display: none; }
#legalIconWrap { display: none; }

/* ── Layout ──────────────────────────────────────────────── */
main { display: flex; flex: 1; overflow: hidden; position: relative; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: 420px;
    min-width: 420px;
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    flex-shrink: 0; overflow-y: auto; overflow-x: hidden;
    scrollbar-gutter: stable; padding: 0;
}

@media (min-width: 901px) {
    /* Sidebar: feste Breite, kein Toggle auf Desktop */
    .sidebar-tab    { display: none !important; }
    .sidebar-hide-bar { display: none !important; }
    #sidebarBar       { display: none !important; }
}

/* ── Section Cards (flach, keine nested boxes) ───────────── */
.to-card {
    overflow: visible !important;
    background: transparent; border: none;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.to-card:last-child { border-bottom: none; }

.to-card-header {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem 1.25rem; cursor: pointer; user-select: none;
    transition: background 0.15s;
}
.to-card-header:hover { background: rgba(255,255,255,0.03); }
.to-card--open .to-card-header { background: rgba(184,150,78,0.08); border-bottom: 1px solid rgba(184,150,78,0.28); }
.to-card--open .to-card-title { color: rgba(255,240,210,0.98); }
.to-card--open .to-card-icon { background: rgba(184,150,78,0.25); }
.to-card--primary:not(.to-card--open) .to-card-title { color: var(--text-muted); }
.to-card--primary:not(.to-card--open) .to-card-icon { opacity: 0.55; }

.to-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 6px; background: rgba(184,150,78,0.12); color: var(--accent);
}
.to-card-title-wrap { flex: 1; min-width: 0; }
.to-card-title {
    display: block; font-size: 1rem; font-weight: 700;
    color: var(--text-main); text-transform: none; letter-spacing: 0; line-height: 1.3;
}
.to-card-sub {
    display: block; font-size: 0.76rem; color: var(--text-muted);
    margin-top: 0.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.to-chevron {
    font-size: 1rem; color: var(--text-muted); opacity: 0.5;
    transition: transform 0.2s ease; flex-shrink: 0; line-height: 1;
}
.to-card--open .to-chevron { transform: rotate(90deg); opacity: 0.8; }

.to-card-body {
    display: none; flex-direction: column; gap: 1.6rem;
    padding: 1rem 1.25rem 0;
}
.to-card--open .to-card-body { display: flex; }

.to-field-label {
    display: block; font-size: 0.78rem; color: var(--text-muted);
    margin-bottom: 0.25rem; text-transform: none; letter-spacing: 0;
}

/* ── Mode Chips ──────────────────────────────────────────── */
.create-chips { display: flex; gap: 0.5rem; }
.create-chip {
    flex: 1; min-width: 0; padding: 0.75rem 0.5rem;
    background: rgba(184,150,78,0.05); border: 1px solid rgba(184,150,78,0.38);
    border-radius: 8px; color: var(--text-muted); font-size: 0.72rem;
    font-weight: 600; cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-align: center; white-space: normal; line-height: 1.25;
    font-family: 'Montserrat', sans-serif; margin: 0; width: auto;
    display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.create-chip svg { width: 15px; height: 15px; display: block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.create-chip:hover { border-color: rgba(184,150,78,0.45); color: var(--text-main); filter: none; }
.create-chip.active { background: rgba(184,150,78,0.13); border-color: var(--accent); color: var(--accent); }
.create-chip--featured { border-color: rgba(184,150,78,0.3); color: rgba(212,175,55,0.55); }
.create-chip--featured.active { background: rgba(184,150,78,0.18); border-color: var(--accent); color: var(--accent); }
/* Toggle-Variante: Segmented Control */
.create-chips--toggle {
    background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px; padding: 2px; gap: 2px;
}
.create-chips--toggle .create-chip {
    border-radius: 3px;
    font-size: 0.78rem; padding: 0.38rem 0.6rem;
    flex-direction: row; gap: 0.35rem; min-height: 42px;
    align-items: center; justify-content: center;
}
.create-chips--toggle .create-chip:hover {
    border-color: rgba(255,255,255,0.12); color: var(--text-main);
}
.create-chips--toggle .create-chip.active {
    background: rgba(184,150,78,0.18); border-color: rgba(184,150,78,0.4); color: var(--accent);
}

/* ── Labels ──────────────────────────────────────────────── */
label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.55); }
.sidebar-main-label {
    display: block; font-size: 0.9rem; 
    color: var(--text-main); text-transform: none; letter-spacing: 0; margin-bottom: 0.35rem;
}
/* Innerhalb control-group kommt Abstand vom gap (0.35rem) – kein doppeltes Spacing */
.control-group .sidebar-main-label { margin-bottom: 0; }
.sidebar-step-label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-main); text-transform: none; letter-spacing: 0; margin-bottom: 0.2rem;
}
.sidebar-section-label {
    display: block; font-size: 0.73rem; text-transform: uppercase;
    letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 0.5rem;
}
.settings-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ── Controls ────────────────────────────────────────────── */
.control-group { display: flex; flex-direction: column; gap: 0.35rem; }

textarea, select, input[type="text"], input[type="email"], input[type="password"] {
    width: 100%; background: var(--bg-dark); border: 1px solid var(--border-color);
    color: var(--text-main); padding: 0.55rem 0.7rem;
    font-family: 'Montserrat', sans-serif; border-radius: 3px; outline: none;
    font-size: 0.85rem; box-sizing: border-box; transition: border-color 0.15s;
}
textarea:focus, select:focus, input:focus { border-color: rgba(184,150,78,0.65); }
select option { background: #1a1a1a; color: #f0f0f0; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.4); opacity: 1; }
textarea { resize: vertical; min-height: 88px; }
.input-primary {
    border-color: rgba(255,255,255,0.14) !important;
    background: rgba(255,255,255,0.03) !important;
}
.input-primary:focus { border-color: rgba(184,150,78,0.7) !important; }

/* ── Setting Rows ────────────────────────────────────────── */
.setting-row {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.45rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.setting-row:last-child { border-bottom: none; }
.setting-row-label {
    font-size: 0.8rem; color: var(--text-muted); white-space: nowrap;
    min-width: 80px; flex-shrink: 0; text-transform: none; letter-spacing: 0;
}

/* ── Radio Groups ────────────────────────────────────────── */
.radio-group { display: flex; gap: 0.25rem; }
.radio-group label {
    flex: 1; text-align: center;
    background: rgba(184,150,78,0.05); border: 1px solid rgba(184,150,78,0.38);
    padding: 0.42rem 0.25rem; cursor: pointer; transition: all 0.15s;
    color: var(--text-muted); font-size: 0.8rem;
    border-radius: 2px; text-transform: none; letter-spacing: 0;
}
.radio-group input[type="radio"] { display: none; }
.radio-group input[type="radio"]:checked + label {
    background: rgba(184,150,78,0.18); color: var(--accent); border-color: var(--accent);
}
.radio-group input[type="radio"]:disabled + label { opacity: 0.28; cursor: not-allowed; text-decoration: line-through; }

/* ── Buttons base ────────────────────────────────────────── */
button {
    background: var(--accent); color: var(--bg-dark); border: none;
    padding: 0.7rem; width: 100%; font-weight: 600; cursor: pointer;
    margin-bottom: 0.5rem; border-radius: 3px; transition: 0.2s;
    font-size: 0.88rem; font-family: 'Montserrat', sans-serif;
}
button:hover { filter: brightness(1.1); }
button:disabled { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.3); cursor: not-allowed; }

#btnSendOtp { opacity: 0.42; }
#btnSendOtp.has-email { opacity: 1; }
#btnSendOtp:disabled { background: rgba(255,255,255,0.09); color: var(--text-muted); cursor: not-allowed; opacity: 0.42; }
.modal input[type="email"], .modal input[type="text"], .modal input[type="password"] { font-size: 1rem; }
.modal button:not(.link-btn):not(.btn-google):not(.btn-generate):not(.adv-toggle-btn) { font-size: 1rem; }

/* ── Generate Button ─────────────────────────────────────── */
.btn-generate {
    background: var(--accent); color: #000;
    padding: 0.95rem 1rem; margin-top: 0.1rem; margin-bottom: 0;
    font-size: 0.92rem; text-transform: uppercase; letter-spacing: 1.5px;
    font-weight: 800; border-radius: 3px; border: none;
    width: 100%; cursor: pointer; transition: background 0.2s;
    font-family: 'Montserrat', sans-serif; line-height: 1.3;
    text-align: center;
}
.btn-generate:hover { background: #c9a227; filter: none; }
.btn-generate:disabled { background: var(--accent); color: #000; cursor: not-allowed; border: none; }

.step-generate { display: flex; flex-direction: column; gap: 0.35rem; }

/* ── Button cost sub-label ───────────────────────────────── */
.btn-cost {
    display: block; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.5px; text-transform: none; opacity: 0.82;
    margin-top: 0.1rem; line-height: 1;
}

/* ── Cost display above buttons ──────────────────────────── */
.cost-display-row {
    text-align: center; margin: 0.5rem 0 0; padding: 0;
    font-size: 0.88rem; line-height: 1.4;
}
.cost-display-row .cost-label { color: var(--text-muted); }
.cost-display-row .cost-value {
    color: var(--accent); font-size: 1.05rem; font-weight: 700;
}

/* ── Prompt copy button ──────────────────────────────────── */
.prompt-copy-btn {
    position: absolute; top: 0.4rem; right: 0.4rem;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; transition: background 0.15s, color 0.15s; margin: 0;
}
.prompt-copy-btn:hover { background: rgba(212,175,55,0.15); color: var(--accent); filter: none; }
/* ── Textarea Clear Button ───────────────────────────────── */
.ta-clear-btn {
    position: absolute; top: 0.35rem; right: 0.35rem;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.28); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; padding: 0; margin: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s; line-height: 1;
}
.ta-clear-btn:hover { background: rgba(180,50,50,0.2); border-color: rgba(200,70,70,0.5); color: rgba(255,110,110,0.9); filter: none; }

/* ── Gallery Wrapper — container-type CRITICAL ───────────── */
.gallery-wrapper {
    flex: 1; display: flex; flex-direction: column;
    overflow-y: scroll; overflow-x: hidden; min-width: 0;
    container-type: inline-size;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

/* Dimming overlay mobile – real div (klickbar) */
#mobileOverlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    z-index: 20;
}

/* ── Gallery Toolbar ─────────────────────────────────────── */
.gallery-toolbar {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 0.4rem; padding: 0.45rem 1.25rem;
    background: var(--panel-bg); border-bottom: 1px solid var(--border-color);
    flex-shrink: 0; position: sticky; top: 0; z-index: 15;
}
.gallery-toolbar #sidebarBar { margin-right: auto; }
.gallery-toolbar .tb-label {
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-right: 0.3rem;
}
.view-btn {
    background: transparent; border: 1px solid rgba(184,150,78,0.38);
    color: var(--text-muted); width: auto; padding: 0.22rem 0.6rem;
    font-size: 0.62rem; letter-spacing: 0.5px; text-transform: uppercase;
    cursor: pointer; border-radius: 2px;
    display: inline-flex; align-items: center; gap: 0.3rem;
    transition: all 0.15s; margin: 0; font-family: 'Montserrat', sans-serif;
}
.view-btn:hover { border-color: var(--accent); color: var(--text-main); filter: none; }
.view-btn.active { background: rgba(184,150,78,0.18); color: var(--accent); border-color: var(--accent); }
.view-btn svg { display: block; width: 12px; height: 12px; fill: currentColor; stroke: none; }
.view-btn .tb-stroke-icon { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.tb-btn-label { font-size: inherit; }
.tb-sep { width: 1px; height: 14px; background: var(--border-color); margin: 0 0.15rem; flex-shrink: 0; }
.tb-sep--lg { height: 18px; margin: 0 0.4rem; background: rgba(255,255,255,0.12); }

@media (max-width: 760px) {
    .tb-btn-label { display: none; }
    .tb-label { display: none; }
}
/* ── Toolbar Mobile/Tablet: nur Erstellen-Button, alle View-Controls weg ─── */
@media (max-width: 900px) {
    #vbCover, #vbNatural,
    #vbSizeXL, #vbSizeL, #vbSizeM, #vbSizeS,
    #vbDeleteMode,
    .tb-sep--lg { display: none !important; }
    /* Toolbar komplett ausblenden auf Mobile */
    .gallery-toolbar { display: none; }
}
/* ── Toolbar Desktop: komplett ausblenden ───────────────── */
@media (min-width: 901px) {
    .gallery-toolbar { display: none; }
    /* Alle 4 Seiten explizit: top mit Sidebar-Tabs, Seiten/Bottom symmetrisch */
    .gallery { padding: 2px; }
    /* Scrollbar-Gutter nur Desktop – verhindert rechten Leerraum auf Mobile */
    .gallery-wrapper { scrollbar-gutter: stable; }
}

/* ── Gallery Grid ────────────────────────────────────────── */
.gallery {
    padding: 2px; background: var(--bg-dark);
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 2px; align-content: start; flex: 1;
}
/* Mobile: < 500px → 2 Spalten */
@container (max-width: 499px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
/* Desktop: ≥ 1025px Viewport → 4 Spalten */
@media (min-width: 1025px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
/* 4K / große Screens ab ~1850px Galerie-Breite → 6 Spalten */
@container (min-width: 1850px) { .gallery { grid-template-columns: repeat(6, 1fr); } }

/* S – 4 / 6 */
.gallery[data-size="s"]                        { grid-template-columns: repeat(4, 1fr); }
@container (min-width: 750px)  { .gallery[data-size="s"]  { grid-template-columns: repeat(6, 1fr); } }

/* L – 2 */
.gallery[data-size="l"]                        { grid-template-columns: repeat(2, 1fr); }

/* XL – 1 */
.gallery[data-size="xl"]                       { grid-template-columns: repeat(1, 1fr); padding: 0; gap: 0; }

.ghost-card { display: none; }

@keyframes cardOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.88); }
}
.image-card.removing { animation: cardOut 0.18s ease forwards; }

/* ── Image Card ──────────────────────────────────────────── */
.image-card {
    background: #111; border: none; border-radius: 0; padding: 0;
    box-shadow: none;
    display: flex; flex-direction: column;
    overflow: visible; position: relative; width: 100%; min-width: 0;
    transition: opacity 0.2s ease;
    container-type: inline-size;
}
@container (max-width: 200px) { .card-date { display: none; } }
@container (max-width: 160px) { .card-type-badge { display: none; } }
@container (max-width: 149px) {
    .card-prompt-wrap { display: none; }
    .card-meta { display: none; }
}
@container (max-width: 100px) { .card-footer { display: none; } }

/* Touch-Area: Card-Buttons + View-Buttons auf Tablet/Mobile vergrößern */
@media (max-width: 900px) {
    .card-actions .card-btn { min-width: 32px; min-height: 32px; }
    .view-btn { min-height: 36px; min-width: 36px; }
}
.image-card:hover {
    opacity: 0.93;
    z-index: 10; position: relative;
}
.image-card img { image-rendering: high-quality; transform: translateZ(0); backface-visibility: hidden; }

.image-card .img-wrap {
    position: relative; width: 100%; overflow: hidden;
    background: #080808; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
}
.gallery:not(.view-natural) .image-card .img-wrap { aspect-ratio: 4/3; }
.gallery:not(.view-natural) .image-card img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gallery.view-natural .image-card img { width: 100%; height: auto; object-fit: contain; display: block; cursor: zoom-in; }

.card-type-badge {
    position: absolute; bottom: 0.3rem; left: 0.35rem;
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.4px;
    text-transform: uppercase; color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.58);
    padding: 0.2rem 0.45rem;
    border-radius: 2px;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif; line-height: 1; user-select: none;
}


.card-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.2rem 0.1rem 0;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: #888; font-family: 'Montserrat', sans-serif; transition: color 0.2s;
}
.card-meta .res-badge { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.6px; color: #bbb; transition: color 0.2s; }
.card-meta .res-badge.upscaled { color: rgba(212,175,55,0.85); }
.image-card:hover .card-meta .res-badge.upscaled { color: var(--accent); }
.card-meta .res-badge.model-badge { color: #888; }

/* ── Card Footer (date + buttons in one row) ─────────────── */
.card-footer { display: flex; align-items: center; justify-content: space-between; padding: 0.28rem 0.4rem 0.15rem; gap: 0.4rem; }
.card-date { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: #777; font-family: 'Montserrat', sans-serif; transition: color 0.2s; white-space: nowrap; flex-shrink: 0; }
.image-card:hover .card-date { color: #999; }
.card-footer-right { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; margin-left: auto; }
.card-footer-right .res-badge { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.6px; transition: color 0.2s; }
.card-footer-right .res-badge.upscaled { color: rgba(212,175,55,0.75); }
.image-card:hover .card-footer-right .res-badge.upscaled { color: var(--accent); }

/* ── Card Prompt ─────────────────────────────────────────── */
.card-prompt-wrap { position: relative; min-height: 1.8rem; }
.card-prompt {
    border-top: 1px solid #252525; padding: 0.3rem 1.8rem 0.28rem 0.4rem;
    font-size: 0.85rem; line-height: 1.45; color: #777;
    font-family: 'Montserrat', sans-serif; letter-spacing: 0.1px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    cursor: default; transition: color 0.2s, border-color 0.2s;
}
.image-card:hover .card-prompt {
    color: #bbb; border-top-color: #383838;
}
.card-prompt-copy {
    position: absolute; top: 0.25rem; right: 0;
    width: 20px; height: 20px; border-radius: 50%;
    background: transparent; border: none; color: #666;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 0; margin: 0; transition: color 0.15s; z-index: 21;
}
.card-prompt-copy:hover { color: var(--accent); filter: none; }

@keyframes cardFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.image-card:not(.ghost-card) { animation: cardFadeIn 0.32s ease forwards; }
.image-card.removing { animation: cardOut 0.18s ease forwards; }

/* ── Card Footer + Actions ───────────────────────────────── */
.card-actions { display: flex; align-items: center; }
.card-actions .default-bar,
.card-actions .confirm-bar { display: flex; align-items: center; gap: 0.3rem; }
.card-actions .confirm-bar { display: none; }
.card-actions.confirming .default-bar { display: none; }
.card-actions.confirming {
    position: absolute; inset: 0; background: rgba(0,0,0,0.78); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; z-index: 10; flex-direction: row;
}
.card-actions.confirming .confirm-bar { display: flex; align-items: center; gap: 0.5rem; }
.card-actions .confirm-bar span { font-size: 0.65rem; color: rgba(255,255,255,0.9); font-family: 'Montserrat', sans-serif; letter-spacing: 0.4px; white-space: nowrap; }
.card-actions .btn-label { display: none; }
.card-actions .card-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0;
    padding: 0.3rem 0.38rem; border-radius: 2px;
    background: transparent; border: 1px solid rgba(255,255,255,0.18); color: rgba(255,255,255,0.65);
    cursor: pointer; font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
    text-transform: uppercase; text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1; white-space: nowrap; width: auto; margin: 0;
}
.card-actions .card-btn:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.35); color: rgba(255,255,255,0.9); filter: none; transform: none; }
.card-actions .card-btn svg { display: block; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.card-actions .card-btn.delete-btn:hover { background: rgba(195,45,34,0.18); border-color: rgba(219,68,55,0.4); color: rgba(219,68,55,0.75); }
.card-actions .card-btn.confirm-yes { background: rgba(195,45,34,0.55); border-color: rgba(219,68,55,0.8); color: #fff; padding: 0.38rem 0.7rem; }
.card-actions .card-btn.confirm-yes:hover { background: rgba(219,68,55,0.88); border-color: rgba(219,68,55,1); color: #fff; }
.card-actions .card-btn.confirm-no { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.35); color: #fff; padding: 0.38rem 0.7rem; }
.card-actions .card-btn.confirm-no:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.55); color: #fff; }

.img-wrap .card-actions { position: relative; display: flex; justify-content: center; padding: 0.5rem 0.75rem; }
.img-wrap .card-actions .card-btn { background: rgba(8,8,8,0.82); backdrop-filter: blur(6px); border-color: rgba(255,255,255,0.22); color: #fff; padding: 0.38rem 0.75rem; }
.img-wrap .card-actions .card-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.42); color: #fff; }

/* ── Upscale overlay ─────────────────────────────────────── */
.upscale-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.6rem; z-index: 2;
}
.upscale-overlay-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.75); font-family: 'Montserrat', sans-serif; }

/* ── Zoom Overlay ────────────────────────────────────────── */
#paymentOverlay { z-index: 1200; }
#loginOverlay { z-index: 1300; }
#zoomOverlay { position: fixed; inset: 0; background: #000; z-index: 1100; overflow: hidden; }
#zoomOverlay.hidden { display: none; }

/* ── Zoom Meta Chips ─────────────────────────────────────── */
.zoom-meta-chip {
    display: inline-flex; align-items: center;
    padding: 0.18rem 0.55rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    line-height: 1; white-space: nowrap;
}
.zoom-meta-chip--accent {
    background: rgba(184,150,78,0.12);
    border-color: rgba(184,150,78,0.3);
    color: rgba(212,175,55,0.8);
}

#zoomInner {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    overflow: hidden; pointer-events: none; z-index: 1;
}

.zoom-img-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; flex-shrink: 0; }

#zoomOverlay img { width: auto; height: auto; max-width: 100dvw; max-height: 100dvh; display: block; border-radius: 0; touch-action: none; user-select: none; -webkit-user-select: none; pointer-events: auto; will-change: transform; cursor: zoom-in; }

.zoom-res-badge {
    position: absolute; top: 0.6rem; left: 0.6rem;
    font-family: 'Montserrat', sans-serif; font-size: 0.58rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); color: #aaa;
    padding: 0.22rem 0.5rem; border-radius: 2px; border: 1px solid rgba(255,255,255,0.12); pointer-events: none;
}

.zoom-bottom-stack {
    position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 0.25rem); left: 50%; transform: translateX(-50%); z-index: 201;
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    width: max-content; max-width: calc(100vw - 2rem);
}

#zoomPromptWrap {
    width: 100%; box-sizing: border-box; padding: 0.45rem 0.75rem;
    background: rgba(0,0,0,0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08); border-radius: 4px;
}

.zoom-action-bar {
    display: flex; gap: 0.35rem; align-items: center; justify-content: center;
    padding: 0; background: transparent; border: none;
    width: auto; box-sizing: border-box;
}
.zoom-ab-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.4rem 0.75rem; border-radius: 6px; cursor: pointer;
    font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.4px; text-transform: uppercase; text-decoration: none;
    border: 1px solid rgba(255,255,255,0.13); background: transparent; color: rgba(255,255,255,0.68);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap; width: auto; margin: 0; line-height: 1; min-height: 34px;
}
.zoom-ab-btn svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.zoom-ab-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.32); color: #fff; filter: none; }
.zoom-ab-btn:disabled { opacity: 0.30; cursor: default; pointer-events: none; }
.zoom-ab-btn.primary { background: var(--accent); color: var(--bg-dark); border-color: var(--accent); }
.zoom-ab-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--bg-dark); filter: none; }
.zoom-ab-btn.accent-ol { color: var(--accent); border-color: rgba(212,175,55,0.45); }
.zoom-ab-btn.accent-ol:hover { background: rgba(212,175,55,0.14); border-color: var(--accent); color: var(--accent); }
.zoom-ab-btn.accent-ol:disabled { color: rgba(212,175,55,0.35); border-color: rgba(212,175,55,0.2); pointer-events: none; }
.zoom-ab-btn.danger:hover { background: rgba(219,68,55,0.22); border-color: rgba(219,68,55,0.6); color: #ff7070; }
.zoom-ab-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.zoom-credit-badge { font-size: 0.72rem; color: var(--accent); font-weight: 700; letter-spacing: 0; margin-left: 0.2rem; line-height: 1; }
.zoom-legend { font-family: 'Montserrat', sans-serif; font-size: 0.58rem; color: rgba(255,255,255,0.22); letter-spacing: 0.2px; text-align: center; line-height: 1; padding: 0 0.25rem; white-space: nowrap; pointer-events: none; }

/* ── Zoom: Logo Hero Button (USP) ────────────────────────── */
.zoom-logo-hero-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.6rem; border-radius: 8px; cursor: pointer;
    background: var(--accent); color: var(--bg-dark); border: none;
    font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.6px; text-transform: uppercase; white-space: nowrap;
    width: auto; margin: 0; line-height: 1; min-height: 36px;
    transition: background 0.15s;
}
.zoom-logo-hero-btn svg {
    display: block; width: 15px; height: 15px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.zoom-logo-hero-btn:hover { background: var(--accent-hover); filter: none; }

/* ── Zoom: Primary bar (Name/Slogan · Logo · Artikel) ───── */
.zoom-primary-bar {
    display: flex; gap: 0.3rem; align-items: center; justify-content: center;
    flex-wrap: nowrap;
    padding: 0.4rem 0.5rem;
    background: rgba(8,8,8,0.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.07); border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.zoom-primary-bar .zoom-pb-btn:not(.zoom-pb-btn--hero) {
    width: 110px; justify-content: center;
}
.zoom-primary-bar .zoom-pb-btn--hero {
    flex: 0 0 auto;
}
.zoom-pb-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.52rem 1.05rem; border-radius: 8px; cursor: pointer;
    font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.55px; text-transform: uppercase; white-space: nowrap;
    margin: 0; line-height: 1; min-height: 36px; width: auto;
    background: transparent;
    border: 1px solid rgba(212,175,55,0.42);
    color: rgba(212,175,55,0.78);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.zoom-pb-btn svg {
    display: block; width: 14px; height: 14px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.zoom-pb-btn:hover {
    background: rgba(212,175,55,0.1);
    border-color: var(--accent);
    color: var(--accent);
    filter: none;
}
.zoom-pb-btn--hero {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
    padding: 0.52rem 1.7rem;
}
.zoom-pb-btn--hero:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--bg-dark);
    filter: none;
}

/* ── Zoom: Secondary bar ─────────────────────────────────── */
.zoom-secondary-bar {
    display: flex; gap: 0.3rem; align-items: center; justify-content: center;
    flex-wrap: nowrap;
    padding: 0.4rem 0.5rem;
    background: rgba(8,8,8,0.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.07); border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.zoom-ab-label { line-height: 1; }

.zoom-prompt-box { border: none; background: transparent; padding: 0; position: relative; padding-right: 1.6rem; }
.zoom-prompt-label { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 1px; color: #555; margin-bottom: 0.2rem; font-family: 'Montserrat', sans-serif; }

.zoom-copy-btn {
    position: absolute; top: 62px; right: 0; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: 1px solid #333; color: #666; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; transition: background 0.15s, color 0.15s; margin: 0;
}
.zoom-copy-btn:hover { background: rgba(212,175,55,0.15); color: var(--accent); filter: none; }

.zoom-back-btn {
    position: absolute; top: calc(env(safe-area-inset-top, 0px) + 0.75rem); left: 0.75rem; z-index: 202;
    display: none; align-items: center; gap: 0.45rem; width: fit-content; margin: 0;
    background: rgba(10,8,2,0.75); border: 1px solid rgba(212,175,55,0.85); color: rgba(212,175,55,0.95);
    cursor: pointer; border-radius: 2px; padding: 0.45rem 0.9rem; font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s, border-color 0.15s, color 0.15s; transform: translateZ(0);
}
.zoom-back-btn:hover { background: rgba(20,15,3,0.92); border-color: rgba(212,175,55,1); color: #d4af37; filter: none; }
.zoom-back-btn.visible { display: flex; }

.zoom-close-btn {
    position: absolute; top: calc(env(safe-area-inset-top, 0px) + 0.55rem); right: 0.55rem; z-index: 202;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(10,8,2,0.7); border: 1px solid rgba(212,175,55,0.9); color: rgba(212,175,55,0.9);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 0; margin: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    transition: background 0.15s, border-color 0.15s, color 0.15s; transform: translateZ(0);
}
.zoom-close-btn:hover { border-color: rgba(212,175,55,0.8); color: rgba(212,175,55,1); background: rgba(20,15,3,0.88); filter: none; }

#zoomDeleteConfirm { display: none; flex-direction: column; align-items: center; gap: 0.4rem; background:black; }
#zoomDeleteConfirm .zoom-del-label { font-family: 'Montserrat', sans-serif; font-size: 0.78rem; font-weight: 600; color: #fff; letter-spacing: 0.3px; white-space: nowrap; }
.zoom-del-confirm { background: rgba(219,68,55,0.82); border: 1px solid rgba(219,68,55,1); color: #fff; border-radius: 4px; padding: 0.35rem 1rem; font-size: 0.78rem; font-weight: 700; cursor: pointer; font-family: 'Montserrat', sans-serif; }
.zoom-del-confirm:hover { background: rgba(219,68,55,1); }
.zoom-del-cancel { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3); color: #fff; border-radius: 4px; padding: 0.35rem 1rem; font-size: 0.78rem; cursor: pointer; font-family: 'Montserrat', sans-serif; }
.zoom-del-cancel:hover { background: rgba(255,255,255,0.18); }

/* ── Toast ───────────────────────────────────────────────── */
#toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(140%);
    background: #1e1e1e; border: 1px solid rgba(255,255,255,0.12); border-left: 4px solid var(--error);
    color: var(--text-main); padding: 1rem 2.5rem 1rem 1.5rem; border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
    font-size: 0.875rem; line-height: 1.5;
    max-width: 420px; width: calc(100% - 2rem); z-index: 9100;
    transition: transform 0.3s ease, opacity 0.3s ease; opacity: 0;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast .toast-title { font-weight: 700; margin-bottom: 0.25rem; color: var(--error); }
#toast .toast-body  { color: rgba(255,255,255,0.7); }
#toast.toast-warn { border-left-color: var(--accent); }
#toast.toast-warn .toast-title { color: var(--accent); }

/* ── Misc Buttons ────────────────────────────────────────── */
.link-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-family: 'Montserrat'; font-size: 0.8rem; text-decoration: underline; padding: 0; width: auto; margin: 0; }
.link-btn:hover { color: var(--text-main); filter: none; }
.link-home { display: inline-block; color: rgba(255,255,255,0.55); font-size: 0.85rem; text-decoration: none; transition: color 0.2s, border-color 0.2s; border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; padding: 0.45rem 1.1rem; letter-spacing: 0.3px; }
.link-home:hover { color: var(--accent); border-color: var(--accent); }
.btn-sidebar-toggle { display: none; background: var(--accent); color: var(--bg-dark); border: none; padding: 0.6rem 1.2rem; font-weight: 600; cursor: pointer; border-radius: 2px; font-size: 0.85rem; width: auto; margin: 0; }
.btn-create { display: inline-flex; align-items: center; gap: 0.45rem; width: auto; margin: 0; }
.sidebar-tab { display: none; }

/* ── Paginator ───────────────────────────────────────────── */
#paginator { display: none; align-items: center; justify-content: center; gap: 1rem; padding: 1rem 1.5rem; background: var(--bg-dark); border-top: 1px solid var(--border-color); flex-shrink: 0; }
.page-info { font-size: 0.82rem; font-weight: 600; color: var(--text-main); font-family: 'Montserrat', sans-serif; letter-spacing: 0.3px; min-width: 70px; text-align: center; white-space: nowrap; }
.btn-paginator-jump { padding: 0.5rem 0.65rem; }
.btn-paginator { display: inline-flex; align-items: center; gap: 0.4rem; width: auto; padding: 0.5rem 1.1rem; margin: 0; background: transparent; border: 1px solid var(--accent); color: var(--accent); border-radius: 2px; font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.btn-paginator svg { display: block; flex-shrink: 0; }
.btn-paginator:not(:disabled):hover { background: rgba(212,175,55,0.12); filter: none; }
.btn-paginator:disabled { cursor: default; pointer-events: none; background: transparent; color: rgba(255,255,255,0.25); border-color: rgba(184,150,78,0.25); }
.btn-paginator-sm { padding: 0.4rem 0.6rem !important; min-width: 32px; justify-content: center; }
.btn-paginator-arrow { margin: 0 0.35rem; }
.btn-paginator.active { background: var(--accent) !important; color: #000 !important; border-color: var(--accent) !important; cursor: default; }
.paginator-inner { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; width: 100%; }
.paginator-pages { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; justify-content: center; }
.paginator-ellipsis { color: var(--text-muted); font-size: 0.82rem; padding: 0 0.15rem; font-family: 'Montserrat', sans-serif; line-height: 1; }
.paginator-jump { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-muted); font-family: 'Montserrat', sans-serif; }
.paginator-jump-input { width: 50px; background: transparent; border: 1px solid var(--border-color); color: var(--text-main); font-size: 0.78rem; font-family: 'Montserrat', sans-serif; text-align: center; padding: 0.35rem 0.3rem; border-radius: 2px; appearance: textfield; -moz-appearance: textfield; }
.paginator-jump-input::-webkit-outer-spin-button, .paginator-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.paginator-jump-input:focus { outline: none; border-color: var(--accent); }

/* ── Gallery Footer ──────────────────────────────────────── */
.gallery-footer { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.gallery-footer a { font-size: 0.62rem; color: var(--text-muted); text-decoration: none; text-transform: uppercase; letter-spacing: 0.5px; transition: color 0.2s; }
.gallery-footer a:hover { color: var(--accent); }
.gallery-footer span { color: var(--border-color); font-size: 0.6rem; }

/* ── Misc ────────────────────────────────────────────────── */
#genError { text-align: center; }
.hidden { display: none !important; }

/* ── Payment ─────────────────────────────────────────────── */
.pkg-btn { background: transparent; border: 1px solid var(--border-color); border-radius: 2px; padding: 1.1rem 1.2rem; cursor: pointer; text-align: left; color: var(--text-main); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; font-family: 'Montserrat', sans-serif; position: relative; }
.pkg-btn:hover { border-color: var(--accent); background: rgba(212,175,55,0.06); box-shadow: 0 0 12px rgba(212,175,55,0.15); }
.pkg-btn-popular { background: rgba(212,175,55,0.07); border-color: var(--accent); }
.pkg-btn-popular:hover { background: rgba(212,175,55,0.13); box-shadow: 0 0 16px rgba(212,175,55,0.22); }
.pkg-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #c9a227 0%, #d4af37 50%, #c9a227 100%); color: var(--bg-dark); font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 2px 10px; border-radius: 2px; white-space: nowrap; }
.pkg-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.65); margin-bottom: 0.45rem; }
.pkg-price { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; }
.pkg-credits { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.btn-verstanden { background: linear-gradient(135deg, #c9a227 0%, #d4af37 50%, #c9a227 100%); color: var(--bg-dark); border: none; padding: 0.6rem 1.5rem; border-radius: 2px; cursor: pointer; font-family: 'Montserrat', sans-serif; font-weight: 600; transition: background 0.2s; }
.btn-verstanden:hover { background: linear-gradient(135deg, #b8921e 0%, #c9a227 50%, #b8921e 100%); }
.payment-no-abo-badge { display: inline-flex; align-items: center; background: rgba(184,150,78,0.15); border: 1px solid rgba(184,150,78,0.4); border-radius: 20px; color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 0.3rem 0.9rem; }
.payment-trust-block { display: flex; flex-direction: column; gap: 0.35rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: 4px; padding: 0.8rem 1rem; margin-bottom: 1.5rem; font-size: 0.85rem; }
.payment-trust-block span { display: block; color: rgba(255,255,255,0.88); }

/* ── Lock icons ──────────────────────────────────────────── */
.lock-icon { display: inline-block; font-size: 0.7em; margin-left: 0.3em; opacity: 0.6; vertical-align: middle; cursor: pointer; pointer-events: auto; }
.zoom-ab-btn .lock-icon { font-size: 1em; opacity: 1; }
.zoom-ab-btn.locked-feature { opacity: 0.55; cursor: pointer; border-style: dashed; }
.zoom-ab-btn.locked-feature:hover { opacity: 0.85; background: rgba(212,175,55,0.10); border-color: var(--accent); color: var(--accent); filter: none; }

/* ── Reference Slots ─────────────────────────────────────── */
.ref-modal {
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.25rem 2.5rem;
    text-align: left;
    border-radius: 10px;
    border-color: rgba(184,150,78,0.25);
    box-shadow: 0 32px 64px rgba(0,0,0,0.6), 0 0 0 1px rgba(184,150,78,0.12);
}
.ref-slot-row { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.75rem; }
.ref-slot { width: 72px; height: 72px; flex-shrink: 0; border: 1px dashed var(--border-color); border-radius: 4px; cursor: pointer; position: relative; overflow: hidden; transition: border-color 0.15s; background: var(--bg-dark); display: flex; align-items: center; justify-content: center; border-color: rgba(184, 150, 78, 0.38) !important;background: rgba(184, 150, 78, 0.05) !important;}
.ref-slot:hover, .ref-slot.dd-hover { border-color: var(--accent); }
.ref-slot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; color: var(--text-muted); pointer-events: none; }
.ref-slot-empty svg { width: 26px; height: 26px; opacity: 0.55; transition: opacity 0.15s, color 0.15s; }
.ref-slot:hover .ref-slot-empty svg { opacity: 0.85; color: var(--accent); }
.ref-slot-empty span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px; }
.ref-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ref-slot-del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,0.75); border: none; color: #fff; font-size: 0.6rem; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; margin: 0; min-width: 0; line-height: 1; }
.ref-slot-del:hover { background: var(--error); filter: none; }
.ref-slot-label { display: flex; flex-direction: column; gap: 0.2rem; }
.ref-slot-label strong { font-size: 0.85rem; color: var(--text-main); font-weight: 600; }
.ref-slot-label span { font-size: 0.78rem; color: rgba(255,255,255,0.62); text-transform: none; letter-spacing: 0; }
.ref-upload-hint { font-size: 0.78rem; color: rgba(255,255,255,0.62); background: rgba(184,150,78,0.08); border: 1px solid rgba(184,150,78,0.2); border-radius: 2px; padding: 0.5rem 0.75rem; margin-bottom: 0.5rem; line-height: 1.5; }

/* ── Logo slot: full-width, native ratio ─────────────────── */
.ref-slot-row--logo { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.ref-slot--logo { width: 100%; height: auto; min-height: 56px; flex-shrink: unset; }
.ref-slot--logo .ref-slot-empty { padding: 0.75rem 0; gap: 0.35rem; }
.ref-slot--logo .ref-slot-empty svg { width: 22px; height: 22px; }
.ref-slot--logo .ref-slot-empty span { font-size: 0.72rem; text-transform: none; letter-spacing: 0; }
.ref-slot-row--logo { margin-top: 0.5rem; }
.ref-slot--logo .ref-preview-img { object-fit: contain; width: 100%; height: auto; max-height: 120px; display: block; }
.ref-slot-label--logo { flex-direction: row; align-items: center; gap: 0.4rem; }
/* Hover-Overlay „Ändern" */
.ref-slot-hover-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.52);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.15s; pointer-events: none;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: #fff; font-family: 'Montserrat', sans-serif;
}
.ref-slot--logo:hover .ref-slot-hover-overlay { opacity: 1; }

/* ── Studio ──────────────────────────────────────────────── */
.studio-tabs { display: flex; gap: 0.5rem; margin-bottom: 0; }
.studio-tab { flex: 1; min-width: 0; padding: 0.75rem 0.5rem; background: rgba(184,150,78,0.05); border: 1px solid rgba(184,150,78,0.38); border-radius: 8px; color: var(--text-muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2px; cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; text-align: center; font-family: 'Montserrat', sans-serif; margin: 0; width: auto; line-height: 1.25; white-space: normal; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.studio-tab-icon { display: block; flex-shrink: 0; opacity: 0.6; transition: opacity 0.15s; }
.studio-tab.active .studio-tab-icon { opacity: 1; }
.studio-tab-desc { font-size: 0.8rem; color: rgba(240,240,240,0.78); background: rgba(184,150,78,0.06); border: 1px solid rgba(184,150,78,0.15); border-radius: 3px; padding: 0.5rem 0.75rem; margin-bottom: 0; line-height: 1.5; }
.studio-tab:hover { background: rgba(255,255,255,0.03); border-color: rgba(184,150,78,0.45); color: var(--text-main); filter: none; }
.studio-tab.active { background: rgba(184,150,78,0.13); border-color: var(--accent); color: var(--accent); border-bottom: 1px solid var(--accent); }

.studio-slot-wrap { border: 1px dashed rgba(255,255,255,0.1); border-radius: 4px; padding: 0.75rem; margin-bottom: 0; transition: border-color 0.15s; }
.studio-slot-wrap:hover { border-color: rgba(184,150,78,0.35); }
.studio-slot-label { font-size: 0.82rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.25rem; display: block; text-transform: none; letter-spacing: 0; }
.studio-slot-hint { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 0.7rem; display: block; text-transform: none; letter-spacing: 0; }
.studio-source-btns { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.studio-source-btn { flex: 1; padding: 0.5rem 0.55rem; background: rgba(184,150,78,0.05); border: 1px solid rgba(184,150,78,0.38); border-radius: 2px; color: var(--text-muted); font-size: 0.76rem; font-weight: 600; cursor: pointer; transition: 0.15s; text-align: center; font-family: 'Montserrat', sans-serif; margin: 0; white-space: nowrap; }
.studio-source-btn:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.studio-source-btn svg { display: inline-block; vertical-align: middle; margin-right: 4px; }
.studio-slot-preview-wrap { display: flex; align-items: center; gap: 0.75rem; }
.studio-slot-img { width: 64px; height: 64px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border-color); flex-shrink: 0; }
.studio-slot-meta { flex: 1; min-width: 0; }
.studio-slot-meta strong { display: block; font-size: 0.8rem; color: var(--text-main); font-weight: 600; }
.studio-slot-meta span { font-size: 0.72rem; color: var(--text-muted); }
.studio-slot-change { font-size: 0.72rem; color: var(--accent); cursor: pointer; background: none; border: none; padding: 0; font-family: 'Montserrat', sans-serif; text-decoration: underline; display: block; margin-top: 0.2rem; text-align: left; width: auto; font-weight: 400; }
.studio-slot-change:hover { filter: brightness(1.2); }
.studio-submit-section { margin-top: 0.85rem; }

.studio-picker-overlay { position: fixed; inset: 0; z-index: 1050; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.studio-picker-modal { background: var(--panel-bg); border: 1px solid var(--border-color); border-radius: 6px; max-width: 1100px; width: 98%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.studio-picker-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.studio-picker-title { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.studio-picker-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; padding: 0.2rem 0.5rem; line-height: 1; margin: 0; width: auto; }
.studio-picker-close:hover { color: var(--text-main); filter: none; }
.studio-picker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.75rem; overflow-y: auto; flex: 1; min-height: 0; align-items: start; align-content: start; }
.studio-picker-thumb { border: 2px solid transparent; border-radius: 3px; cursor: pointer; transition: border-color 0.15s; position: relative; background: #080808; }
.studio-picker-thumb img { width: 100%; height: auto; display: block; pointer-events: none; border-radius: 2px; }
.studio-picker-thumb:hover { border-color: var(--accent); }
.studio-picker-thumb--selected { border-color: var(--accent) !important; }
.studio-picker-thumb--selected::after { content: '✓'; position: absolute; inset: 0; background: rgba(184,150,78,0.35); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent); font-weight: 700; }
.studio-picker-confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.studio-picker-thumb:hover::after { content: '✓'; position: absolute; inset: 0; background: rgba(184,150,78,0.35); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent); font-weight: 700; }
.studio-picker-empty { grid-column: 1/-1; text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 2rem; }
.studio-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.studio-picker-nav { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); padding: 0.35rem 0.85rem; font-size: 0.78rem; font-family: 'Montserrat', sans-serif; font-weight: 600; cursor: pointer; border-radius: 2px; width: auto; margin: 0; transition: border-color 0.15s, color 0.15s; }
.studio-picker-nav:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.studio-picker-nav:disabled { opacity: 0.28; cursor: default; pointer-events: none; }
.studio-picker-pageinfo { font-size: 0.78rem; color: var(--text-muted); font-family: 'Montserrat', sans-serif; }

.studio-picker-thumb.compose-picker-selected { border-color: var(--accent); }
.studio-picker-thumb.compose-picker-selected::before {
    content: '✓'; position: absolute; top: 0.3rem; right: 0.3rem;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent); color: #000;
    font-size: 0.75rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; justify-content: center; z-index: 5;
}

/* ── Model Grid (keep for JS compat) ────────────────────── */
.model-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.model-grid input[type="radio"] { display: none; }
.model-card { display: flex; flex-direction: column; align-items: center; padding: 0.5rem 0.25rem; cursor: pointer; transition: 0.18s; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; text-align: center; gap: 0.2rem; text-transform: none; letter-spacing: 0; color: var(--text-main); font-size: 0.75rem; }
.model-card:hover { border-color: var(--accent); }
.model-grid input[type="radio"]:checked + .model-card { background: var(--accent); color: #000; border-color: var(--accent); }
.model-grid input[type="radio"]:disabled + .model-card { opacity: 0.32; cursor: not-allowed; }
.model-name { font-weight: 700; font-size: 0.78rem; line-height: 1.2; }
.model-sub  { font-size: 0.76rem; color: rgba(255,255,255,0.58); line-height: 1.2; }
.model-grid input[type="radio"]:checked + .model-card .model-sub { color: rgba(0,0,0,0.6); }

/* ── Primary Card (Karte 1) ──────────────────────────────── */
.to-card--primary.to-card--open .to-card-header {
    border-left: 3px solid var(--accent);
    padding-left: calc(1.25rem - 3px);
}
.to-card--primary.to-card--open .to-card-icon {
    background: rgba(184,150,78,0.2);
}

/* ── Secondary Card (Karte 2) ────────────────────────────── */
.to-card--secondary:not(.to-card--open) .to-card-title {
    color: var(--text-muted);
}
.to-card--secondary:not(.to-card--open) .to-card-icon {
    opacity: 0.55;
}

/* ── Erweitert Toggle ────────────────────────────────────── */
.advanced-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0 0; cursor: pointer; user-select: none;margin-bottom: 1rem !important;
}
.toggle-chevron {
    color: var(--text-muted); font-size: 0.7rem;
    display: inline-block; transition: transform 0.2s; flex-shrink: 0;
}

/* ── Mobile ──────────────────────────────────────────────── */@media (max-width: 900px) {
    body { height: auto; overflow: auto; }
    body.sidebar-open { overflow: hidden; }
    header { flex-direction: row; padding: 0 0.75rem; height: 48px; gap: 0.5rem; }
    .logo { font-size: 0.85rem; width: auto; justify-content: flex-start; letter-spacing: 1.5px; }
    .logo img { height: 20px; }
    .header-controls { width: auto; justify-content: flex-end; gap: 0.5rem; }
    .header-controls .btn-topup,
    .header-controls .btn-logout { width: auto; margin: 0; }
    .btn-topup br { display: none; }
    .btn-topup span { display: none; }
    .btn-topup { white-space: nowrap; }
    .credits-unit { display: none; }
    .credits { font-size: 0.8rem; }
    main { flex-direction: column; overflow: visible; }
    .gallery-wrapper { overflow-y: auto; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); gap: 0; display: none; overflow: visible; position: relative; z-index: 5; padding: 0; }
    .sidebar.open { background: var(--bg-card, #1a1a1a);display: flex; position: absolute; top: 90px; left: 4px; width: calc(100% - 8px); margin: 0; padding-bottom: 1.5rem; z-index: 80; border: 1px solid rgba(212,175,55,0.3); border-top: 2px solid rgba(212,175,55,0.55); border-radius: 0 0 8px 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
    .btn-sidebar-toggle { display: block; }
    .sidebar-hide-bar { display: none !important; }
    .to-card-header { padding: 0.8rem 1rem; }
    .to-card-body { padding: 0.75rem 1rem 0; }
    #brandColorsSection { padding: 0 1rem; }
    .advanced-toggle-row { min-height: 44px; padding: 0.25rem 0; }
    #brandColorsSection > div:first-child { min-height: 44px; padding: 0.25rem 0; }
    .gallery { padding: 2px; gap: 2px; overflow: visible; }
    .gallery-toolbar { position: sticky; }
    .gallery-toolbar .tb-label { display: none; }
    .modal { padding: 1.5rem; margin: 1rem; width: calc(100% - 2rem); }
    #paginator { padding: 0.75rem 0.5rem; gap: 0.5rem; }
    .page-info-label { display: none; }
    .page-info { min-width: 50px; }
    .radio-group label { font-size: 0.75rem; padding: 0.38rem 0.2rem; }
    textarea { min-height: 120px; }
    .model-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar .btn-generate { font-size: 0.85rem; padding: 0.8rem 1rem; }
    #toast { bottom: 1rem; max-height: 10rem; overflow-y: auto; }
    #toast.show { transform: translateX(-50%) translateY(0); }
    .card-prompt-wrap { min-height: 1.1rem; }
}

/* ── Tablet (601–900px): nach Mobile damit Cascade stimmt ─── */
@media (min-width: 601px) and (max-width: 900px) {
    /* Tablet: Sidebar als echtes Modal mit eigenem Scroll – Hintergrund eingefroren */
    .sidebar.open { position: absolute; top: 90px; left: 50%; transform: translateX(-50%); width: 560px; max-width: calc(100% - 8px); max-height: calc(100vh - 100px); overflow-y: auto; margin: 0; padding-bottom: 1.5rem; z-index: 80; border: 1px solid rgba(212,175,55,0.3); border-top: 2px solid rgba(212,175,55,0.55); border-radius: 0 0 8px 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
    .modal { max-width: 480px; }
    /* Zoom-Overlay Buttons: kompakter auf Tablet */
    .zoom-ab-btn { padding: 0.42rem 0.6rem; font-size: 0; gap: 0; min-height: 32px; }
    .zoom-ab-btn svg { width: 15px; height: 15px; }
    .zoom-ab-label { display: none; }
    .zoom-ab-sep { height: 16px; }
    #zoomActionDefault { gap: 0.3rem; }
}

/* ── Zoom: Aktionskacheln ────────────────────────────────── */
.zoom-kacheln-row {
    display: flex;
    gap: 0.25rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.25rem;
    background: rgba(8,8,8,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.06); border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.zoom-kachel {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    min-width: 0;
    flex: 1;
    max-width: 160px;
    border-radius: 5px;
    background: rgba(12,12,12,0.72);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.11);
    color: rgba(255,255,255,0.82);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.zoom-kachel:hover {
    background: rgba(30,30,30,0.82);
    border-color: rgba(255,255,255,0.28);
    color: var(--text-main);
}
.zoom-kachel svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.zoom-kachel-label {
    font-size: 0.64rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
}
.zoom-kachel-sub {
    display: none;
}
.zoom-kachel-cost {
    font-size: 0.58rem;
    color: var(--accent);
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}
.zoom-kachel--gold {
    border-color: rgba(184,150,78,0.35);
    color: var(--accent);
}
.zoom-kachel--gold:hover {
    background: rgba(25,20,10,0.82);
    border-color: var(--accent);
}
.zoom-kachel--gold[style*="display:none"] { display: none !important; }

/* ── Zoom: Inline Edit Panel ─────────────────────────────── */
.zoom-edit-panel {
    width: 100%; box-sizing: border-box;
    padding: 0.65rem 0.75rem 0.55rem;
    background: rgba(10,8,2,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(184,150,78,0.35); border-radius: 8px;
    display: flex; flex-direction: column; gap: 0.45rem;
}
.zoom-edit-panel-header {
    display: flex; align-items: center; gap: 0.45rem;
    font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent);
}
.zoom-edit-panel-header svg { flex-shrink: 0; width: 13px; height: 13px; stroke: var(--accent); }
.zoom-edit-cost-badge {
    margin-left: auto; font-size: 0.65rem; color: rgba(212,175,55,0.7);
    background: rgba(184,150,78,0.1); border: 1px solid rgba(184,150,78,0.25);
    border-radius: 3px; padding: 0.1rem 0.4rem; font-weight: 600;
}
.zoom-edit-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 0.85rem; line-height: 1; padding: 0.1rem 0.3rem; margin-left: 0.2rem;
    transition: color 0.15s;
}
.zoom-edit-close:hover { color: var(--text-main); }
.zoom-edit-textarea {
    width: 100%; box-sizing: border-box; resize: none;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px; padding: 0.5rem 0.65rem;
    color: var(--text-main); font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem; line-height: 1.5;
    transition: border-color 0.15s;
    min-height: 60px;
}
.zoom-edit-textarea:focus { outline: none; border-color: rgba(184,150,78,0.5); }
.zoom-edit-textarea::placeholder { color: var(--text-muted); opacity: 0.7; }
.zoom-edit-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.zoom-edit-hint {
    font-size: 0.62rem; color: rgba(255,255,255,0.25);
    font-family: 'Montserrat', sans-serif; white-space: nowrap;
}
@media (max-width: 600px) {
    .zoom-edit-hint { display: none; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .zoom-back-btn { padding: 0.3rem 0.65rem; font-size: 0.68rem; }
    .zoom-secondary-bar { padding: 0.25rem 0.4rem; gap: 0.2rem; }
    #zoomActionDefault { gap: 0.25rem; }
    .zoom-logo-hero-btn { padding: 0.4rem 1rem; font-size: 0.7rem; min-height: 30px; }
    .zoom-ab-btn { padding: 0.38rem 0.55rem; font-size: 0; gap: 0; }
    .zoom-ab-btn svg { width: 16px; height: 16px; }
    .zoom-pb-btn { padding: 0.38rem 0.65rem; font-size: 0.68rem; min-height: 30px; }
    .zoom-pb-btn--hero { padding: 0.38rem 1.1rem; }
    .zoom-ab-sep { height: 16px; }
    .zoom-legend { display: none; }
    /* Kacheln in landscape: kompakte Icon-Zeile statt große Tiles */
    .zoom-kacheln-row { padding: 0.15rem; gap: 0.2rem; }
    .zoom-kachel { flex-direction: row; min-width: 0; max-width: none; flex: 0 0 auto; padding: 0.22rem 0.5rem; gap: 0.3rem; }
    .zoom-kachel-sub { display: none; }
    .zoom-kachel-label { font-size: 0.62rem; white-space: nowrap; }
    .zoom-kachel-cost { font-size: 0.58rem; }
    .zoom-kachel svg { width: 12px; height: 12px; }
}

@media (max-width: 600px) {
    .zoom-secondary-bar .zoom-ab-label { display: none; }
    .zoom-secondary-bar .zoom-ab-btn { padding: 0.45rem 0.55rem; gap: 0; }
    .zoom-secondary-bar .zoom-ab-sep { height: 18px; }
    /* Outer primary-bar buttons: icon only */
    .zoom-primary-bar .zoom-pb-btn:not(.zoom-pb-btn--hero) .zoom-ab-label { display: none; }
    .zoom-primary-bar .zoom-pb-btn:not(.zoom-pb-btn--hero) { padding: 0.52rem 0.65rem; gap: 0; width: auto; flex: 1; background: var(--accent); border-color: var(--accent); color: var(--bg-dark); }
    /* Kacheln: kompakte Icon-Zeile, kein flex-wrap */
    .zoom-kacheln-row { padding: 0.15rem; gap: 0.2rem; flex-wrap: nowrap; overflow-x: auto; }
    .zoom-kachel { flex-direction: row; min-width: 0; max-width: none; flex: 0 0 auto; padding: 0.22rem 0.5rem; gap: 0.25rem; }
    .zoom-kachel-sub { display: none; }
    .zoom-kachel-label { font-size: 0.62rem; white-space: nowrap; }
    .zoom-kachel-cost { font-size: 0.58rem; }
    .zoom-kachel svg { width: 12px; height: 12px; }
}

@media (max-width: 768px) { #zoomFitBtn { display: none; } }

@media (max-width: 600px) {
    /* Prompt auf Phone ausblenden – spart Platz, auf kleinen Kacheln kaum lesbar */
    .card-prompt-wrap { display: none !important; }

    /* Toolbar: nur M / L / XL / Löschen – S und Trenner weg */
    #vbCover, #vbNatural, #vbSizeS, .tb-sep, .tb-sep--lg, .tb-label { display: none; }

    /* View-Buttons: 44px Touch-Target */
    .view-btn { min-height: 44px; min-width: 44px; padding: 0 0.5rem; justify-content: center; font-size: 0; }
    .view-btn svg { width: 16px; height: 16px; }

    /* Card-Buttons: 44px Touch-Target */
    .card-actions .card-btn { min-height: 44px; min-width: 44px; padding: 0 0.55rem; font-size: 0; }
    .card-actions .card-btn svg { width: 15px; height: 15px; }

    /* Confirm-Buttons (Ja/Nein) auch groß */
    .card-actions .card-btn.confirm-yes,
    .card-actions .card-btn.confirm-no { min-height: 44px; padding: 0 1rem; font-size: 0.75rem; }

    .gallery .image-card .img-wrap { aspect-ratio: 4/3; }
    .gallery .image-card img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
}

@media (max-width: 700px)  { .studio-picker-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .studio-picker-grid { grid-template-columns: repeat(2, 1fr); } }


/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Generation progress bar ─────────────────────────────── */
.gen-progress-wrap {
    width: 80%; max-width: 200px;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.gen-progress-bar-bg {
    width: 100%; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden;
}
.gen-progress-bar {
    height: 100%; width: 0%; background: var(--accent);
    border-radius: 2px; transition: width 1s linear;
}
.gen-progress-label,
.ref-progress-label {
    font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.5px;
    text-transform: uppercase; text-align: center;
}

/* ── Overlay + Modal ─────────────────────────────────────── */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(8,8,8,0.78);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; z-index: 100;
}
.overlay.hidden { display: none; }

.modal {
    background: #000; padding: 3rem; border: 1px solid rgba(184,150,78,0.28);
    border-radius: 6px; width: 100%; max-width: 400px;
    text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(184,150,78,0.06);
}


.modal h2:not(.modal-logo-title) { margin-bottom: 2rem; }
.modal input { margin-bottom: 1rem; }
.modal-logo-title {
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 400; font-size: 1.4rem;
    letter-spacing: 3px; text-transform: uppercase; margin-bottom: 2rem;
}

/* ── Google Login Button ─────────────────────────────────── */
.btn-google {
    background: #fff; color: #333; border: none; padding: 0.8rem; width: 100%;
    font-size: 1rem; font-weight: 600; cursor: pointer; border-radius: 2px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none; margin-bottom: 1.5rem;
}
.btn-google:hover { background: #f0f0f0; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
    display: flex; align-items: center; text-align: center;
    margin: 1.5rem 0; color: var(--text-muted); font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1; border-bottom: 1px solid var(--border-color); margin: 0 10px;
}

/* ── Form Messages ───────────────────────────────────────── */
.error-msg   { color: var(--error);   font-size: 0.8rem; margin-top: 0.25rem; }
.success-msg { color: var(--success); font-size: 0.8rem; margin-top: 0.25rem; }


/* ── Mobile modal ────────────────────────────────────────── */
@media (max-width: 900px) {
    .modal { padding: 1.5rem; margin: 1rem; width: calc(100% - 2rem); }
    /* Overlay scrollbar – damit Cancel immer erreichbar */
    .overlay { align-items: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1rem 0; }
    /* Login-Modal: kurz genug zum Zentrieren */
    #loginOverlay { align-items: center; padding: 0; z-index: 4000; }
}

/* ── Payment Modal: Mobile kompakt ───────────────────────── */
@media (max-width: 600px) {
    #paymentOverlay .modal { padding: 1.1rem; }
    #paymentOverlay h2 { font-size: 1.1rem; margin-bottom: 0.3rem; }
    .payment-trust-block { font-size: 0.78rem; padding: 0.55rem 0.75rem; gap: 0.2rem; margin-bottom: 0.85rem; }
    .pkg-btn { padding: 0.7rem 0.75rem; }
    .pkg-label { font-size: 0.65rem; margin-bottom: 0.25rem; }
    .pkg-price { font-size: 1.1rem; margin-bottom: 0.12rem; }
    .pkg-credits { font-size: 0.73rem; }
    .pkg-badge { font-size: 0.62rem; padding: 2px 7px; top: -8px; }
}
#pageLoadOverlay { position: fixed; inset: 0; background: var(--panel-bg); z-index: 9999; }

/* Slot-Flash: kurzer goldener Glow-Pulse bei erfolgreichem Upload/Pick */
@keyframes slotFlash {
    0%   { box-shadow: 0 0 0 0 rgba(184,150,78,0);    background-color: transparent; }
    30%  { box-shadow: 0 0 0 8px rgba(184,150,78,0.45); background-color: rgba(184,150,78,0.07); }
    100% { box-shadow: 0 0 0 0 rgba(184,150,78,0);    background-color: transparent; }
}
.slot-flash { animation: slotFlash 1.3s ease-in-out; }/* ── Compose Mode ── */
.gallery.compose-selecting .image-card { cursor: pointer; position: relative; }
.gallery.compose-selecting .image-card:hover { outline: 2px solid var(--accent); outline-offset: 2px; }
.gallery.compose-selecting .image-card.compose-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.gallery.compose-selecting .image-card.compose-selected::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(184,150,78,0.22);
    pointer-events: none; z-index: 5; border-radius: 4px;
}
.gallery.compose-selecting .image-card.compose-selected::after {
    content: '✓';
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent); color: #000;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; pointer-events: none; z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
#composeSelectBar {
    position: fixed; top: 57px; left: 0; right: 0; z-index: 200;
    background: rgba(20,16,8,0.92);
    border-bottom: 2px solid var(--accent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px rgba(184,150,78,0.25);
    padding: 0.9rem 1.5rem; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.compose-mode-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0;
    animation: compose-blink 1.2s ease-in-out infinite;
}
@keyframes compose-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}
body.compose-active .gallery-wrapper { padding-top: 52px; }
/* ── Delete Mode ── */
.gallery.delete-selecting .image-card { cursor: pointer; position: relative; }
.gallery.delete-selecting .image-card:hover { outline: 2px solid #b06060; outline-offset: 2px; }
.gallery.delete-selecting .image-card.delete-selected { outline: 3px solid #a05050; outline-offset: 2px; }
.gallery.delete-selecting .image-card.delete-selected::before {
    content: '';
    position: absolute; inset: 0;
    background: rgba(160,80,80,0.14);
    pointer-events: none; z-index: 5; border-radius: 4px;
}
.gallery.delete-selecting .image-card.delete-selected::after {
    content: '✓';
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 26px; height: 26px; border-radius: 50%;
    background: #a05050; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; pointer-events: none; z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
#deleteSelectBar {
    position: fixed; top: 52px; left: 0; right: 0; z-index: 200;
    background: #1c0808;
    border-bottom: 2px solid rgba(160,80,80,0.8);
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
    padding: 0.75rem 1.5rem; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.delete-mode-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #b06060; flex-shrink: 0;
    animation: compose-blink 1.2s ease-in-out infinite;
}
/* Buttons im Delete-Bar */
#deleteSelectBar button {
    min-height: 44px; padding: 0 1.25rem !important;
    border-radius: 3px !important; cursor: pointer;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.82rem !important; font-weight: 700 !important;
    letter-spacing: 0.3px !important; transition: opacity 0.15s, background 0.15s;
}
#deleteSelectBar button:not(#deleteBulkBtn) {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: rgba(255,255,255,0.8) !important;
}
#deleteSelectBar button:not(#deleteBulkBtn):hover { border-color: rgba(255,255,255,0.6) !important; color: #fff !important; filter: none; }
#deleteBulkBtn { background: #a05050 !important; color: #fff !important; border: none !important; }
#deleteBulkBtn:disabled { opacity: 0.38 !important; }
#deleteBulkBtn:not(:disabled) { opacity: 1 !important; }
/* Mobile: Bar unter Header, Modebar ausblenden */
@media (max-width: 900px) {
    #deleteSelectBar { top: 48px; padding: 0.6rem 1rem; }
    body.delete-active #mobileModebar { display: none !important; }
    /* "AUSWAHL-MODUS" Label weg – Status-Text allein reicht */
    #deleteSelectBar > div:first-child > div > div:first-child { display: none; }
    #deleteSelectCount { white-space: nowrap; font-size: 0.85rem !important; }
}
body.delete-active .gallery-wrapper { padding-top: 52px; }
/* Compose overlay thumbs */
.compose-thumb-wrap {
    position: relative; display: inline-block;
}
.compose-thumb-wrap img {
    width: 110px; height: 110px; object-fit: cover;
    border-radius: 6px; border: 2px solid var(--accent);
    display: block;
}
.compose-thumb-del {
    position: absolute; top: -7px; right: -7px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #a05050; border: 2px solid #1a1a1a;
    color: #fff; font-size: 0.65rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; line-height: 1; padding: 0;
    z-index: 10; transition: background 0.15s;
}
.compose-thumb-del:hover { background: #e74c3c; }
/* ── Motiv Studio App Extras (aus app.html migriert) ────────────────────── */
/* ── Style Presets ─────────────────────────────────────────── */
.preset-row { margin: 0.1rem 0 0.5rem; }
.preset-row-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 0.45rem;
    display: block;
}
.preset-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.preset-chip {
    background: rgba(184,150,78,0.05);
    border: 1px solid rgba(184,150,78,0.38);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 0.28rem 0.9rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    letter-spacing: 0.2px;
    line-height: 1.4;
}
.preset-chip:hover { border-color: var(--accent); color: var(--accent); }
.preset-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212,175,55,0.09);
    font-weight: 600;
}
/* ── Brand Colors ──────────────────────────────────────────── */
.brand-colors-row { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.25rem; }
.brand-colors-row .setting-row-label { white-space: nowrap; }
#brandColorsInput {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.82rem;
    padding: 0.4rem 0.6rem;
}

/* ── Mobile Mode Bar ───────────────────────────────────────── */
#mobileModebar {
    display: none; /* Desktop: unsichtbar */
}
@media (max-width: 900px) {
    #mobileModebar {
        display: flex;
        gap: 0.5rem;
        padding: 0.6rem 0.6rem 0.1rem;
        background: var(--bg-card, #1a1a1a);
        border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
        position: sticky;
        top: 0;
        z-index: 85;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    #mobileModebar::-webkit-scrollbar { display: none; }
    #sidebarBar { display: none !important; }
    .mob-mode-chip {
        flex: 1;
        min-width: 0;
        background: rgba(184,150,78,0.05);
        border: 1px solid rgba(184,150,78,0.38);
        color: var(--text-muted, rgba(255,255,255,0.55));
        border-radius: 8px;
        padding: 0.55rem 0.5rem 0.45rem;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.77rem;
        font-weight: 500;
        cursor: pointer;
        transition: border-color 0.15s, color 0.15s, background 0.15s;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    .mob-mode-chip svg {
        flex-shrink: 0;
    }
    .mob-mode-chip:hover,
    .mob-mode-chip.active {
        border-color: var(--accent, #d4af37);
        color: var(--accent, #d4af37);
        background: rgba(212,175,55,0.08);
    }
    .mob-mode-chip--featured {
        font-weight: 600;
        border-color: rgba(212,175,55,0.32);
        color: rgba(212,175,55,0.55);
        background: transparent;
    }
    .mob-mode-chip--featured.active {
        border-color: var(--accent, #d4af37);
        color: var(--accent, #d4af37);
        background: rgba(212,175,55,0.14);
    }
}

/* ── Mobile: Duplikate in Sidebar ausblenden ─────────────────────────────── */
@media (max-width: 900px) {
    /* Logo/Szene/Text Chips in Sidebar = Duplikat der Modebar oben */
    #createCardBody > .create-chips { display: none; }
    /* Karten-Header-Toggle = unnötiger Schritt auf Mobile */
    #createCard .to-card-header { display: none; }
    /* createCardBody immer sichtbar – kein Toggle nötig da Header weg */
    #createCardBody { display: flex !important; flex-direction: column; gap: 0.75rem; }
}
/* ── Sidebar Main Tabs (Desktop: Erstellen / Bearbeiten) ──────────────────── */
.sidebar-main-tabs {
    display: flex;
    flex-shrink: 0;
    gap: 0.5rem;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: none;
}
.sidebar-main-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: rgba(184,150,78,0.05);
    border: 1px solid rgba(184,150,78,0.38);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    margin: 0;
    width: auto;
}
.sidebar-main-tab:hover { background: rgba(255,255,255,0.03); border-color: rgba(184,150,78,0.45); color: var(--text-main); filter: none; }
.sidebar-main-tab.active {
    color: var(--accent);
    background: rgba(184,150,78,0.13);
    border-color: var(--accent);
    box-shadow: none;
}

/* Desktop: Accordion-Header der Hauptkarten ausblenden – ersetzt durch Tab-Leiste */
@media (min-width: 901px) {
    #createCard .to-card-header,
    #studioCard .to-card-header { display: none; }
    /* Tab-Leiste selbst nur Desktop */
}

/* Mobile: Tab-Leiste verstecken – mobile hat eigene Modebar */
@media (max-width: 900px) {
    #sidebarMainTabs { display: none; }
}

/* ── Einstellungen-Button (in Sidebar) ───────────────────────────────────── */
.btn-settings-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    width: 100%;
    justify-content: center;
    margin: 0;
}
.btn-settings-toggle:hover {
    border-color: rgba(212,175,55,0.45);
    color: var(--accent);
    background: rgba(212,175,55,0.05);
    filter: none;
}

/* ── Sidebar-Sektionen: einheitliches Spacing ───────────────────────────── */
#createLogoSection,
#createBildSection,
#createTextSection,
#studioErstellenSection,
#studioCommonSection {
    gap: 0 !important;
}

/* Fix 1: etwas Luft zwischen Mode-Chips und erstem Label */
#createLogoSection,
#createBildSection,
#createTextSection {
    padding-top: 0.5rem;
}

/* Einzige Spacing-Quelle: margin-top auf jedes Element nach dem ersten */
#createLogoSection > * + *,
#createBildSection > * + *,
#createTextSection > * + *,
#studioErstellenSection > * + *,
#studioCommonSection > * + * {
    margin-top: 1.1rem;
}

/* Kein margin-bottom auf irgendwas in den sections */
#createLogoSection > *,
#createBildSection > *,
#createTextSection > *,
#studioErstellenSection > *,
#studioCommonSection > * {
    margin-bottom: 0;
}

/* Direkte Nachfolger eines standalone sidebar-main-label brauchen keinen eigenen margin-top –
   das Label selbst hat margin-bottom: 0.35rem, das reicht als Abstand zum Widget darunter */
#createLogoSection > .sidebar-main-label + *,
#createTextSection > .sidebar-main-label + * {
    margin-top: 0;
}

/* Separator vor Einstellungen: nur border, kein extra padding/margin */

/* Separator vor dem Action-Bereich (Einstellungen-Button) */
#createLogoSection .btn-settings-toggle,
#createBildSection .btn-settings-toggle,
#createTextSection .btn-settings-toggle {
    border-top: 1px solid rgba(255,255,255,0.07);
    border-left: none; border-right: none; border-bottom: none;
    border-radius: 0;
}
#createLogoSection .btn-settings-toggle:hover,
#createBildSection .btn-settings-toggle:hover,
#createTextSection .btn-settings-toggle:hover {
    border-color: rgba(255,255,255,0.07);
    border-top-color: rgba(212,175,55,0.2);
}

/* Fix 2: Einstellungen-Inline – weniger Abstand zum Toggle-Header darüber */
#logoSettingsInline,
#bildSettingsInline,
#textSettingsInline,
#studioSettingsInline {
    margin-top: 0.4rem !important;
    padding-top: 0 !important;
}

/* Fix 3: Markenfarben braucht Luft nach den Settings */
#brandColorsSection { padding: 0 1rem; margin-top: 0.75rem; }

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.settings-overlay.hidden { display: none; }

.settings-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(212,175,55,0.3);
    border-top: 2px solid rgba(212,175,55,0.55);
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.settings-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.2px;
}
.settings-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    margin: 0;
    width: auto;
    line-height: 1;
    transition: color 0.15s;
}
.settings-panel-close:hover { color: var(--text-main); filter: none; }

.settings-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-panel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Mobile: Overlay full-width bottom sheet */
@media (max-width: 600px) {
    .settings-overlay { align-items: flex-end; padding: 0; }
    .settings-panel {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }
}

/* ── Sidebar Generate Footer: sticky am unteren Rand ───── */
#sidebarGenerateFooter {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--panel-bg);
    border-top: 1px solid var(--border-color);
}

/* ── Desktop: Tab-gesteuerte Cards – Body immer sichtbar wenn Card sichtbar ── */
@media (min-width: 901px) {
    #createCard .to-card-body,
    #studioCard .to-card-body {
        display: flex;
        flex-direction: column;
    }
}
/* ── Schritt-Nummern in Sidebar ───────────────────────── */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: #1a1510;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 0.35rem;
    flex-shrink: 0;
    font-family: 'Montserrat', sans-serif;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* ── Prompt-Chips (Vorschläge unter Textarea) ─────────── */
.prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    transition: opacity 0.2s;
}
.prompt-chip-btn {
    background: transparent;
    border: 1px solid rgba(184,150,78,0.35);
    color: var(--accent);
    border-radius: 20px;
    padding: 0.22rem 0.65rem;
    font-size: 0.72rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.prompt-chip-btn:hover {
    background: rgba(184,150,78,0.1);
    border-color: var(--accent);
}

/* ── Mode-Chips: Featured mit Subtitle ──────────────────── */
.create-chips--main {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.create-chips--main .create-chip {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.75rem;
    height: auto;
    border-radius: var(--radius, 6px);
}
.create-chips--main .create-chip svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.create-chips--main .create-chip .chip-title {
    font-size: 0.8rem;
    font-weight: 600;
    display: block;
    color: var(--text-main);
}
.create-chips--main .create-chip .chip-sub {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.65;
    display: block;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.create-chips--main .create-chip--featured .chip-title {
    color: var(--accent);
}
.create-chips--main .create-chip--featured.active .chip-title {
    color: #1a1510;
}
.create-chips--main .create-chip > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Zoom: Aktionskacheln (base styles – moved before responsive overrides) ── */

/* ── Accordion: 3 Hauptmodi ──────────────────────────────── */
.create-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.accordion-item {
    border: 1px solid var(--border-color);
    border-left: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom:0.3rem;
    border-color: rgba(184, 150, 78, 0.25);
}
.accordion-item--featured {
    border-color: rgba(184,150,78,0.22);
}
.accordion-item.active {
    border-color: rgba(184,150,78,0.35);
    border-left-color: var(--accent);
}
.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: rgb(184 150 78 / 1%);
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    transition: background 0.12s;
    margin-bottom:0;
}
.accordion-header:hover {
    background: rgba(255,255,255,0.04);
}
.accordion-item.active .accordion-header {
    background: rgba(184,150,78,0.07);
}
.acc-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}
.accordion-item--featuredx .acc-icon,
.accordion-item.active .acc-icon {
    color: var(--accent);
}
.acc-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.acc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
}
.accordion-item--featured .acc-title {
    color: var(--text-main);
}
.accordion-item.active .acc-title {
    color: var(--text-main);
    font-size:1rem;
}
.acc-sub {
    font-size: 0.67rem;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.accordion-item.active .acc-sub {
    display: none;
}
.acc-chevron {
    font-size: 1rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.accordion-item.active .acc-chevron {
    transform: rotate(90deg);
    color: var(--text-muted);
}
.accordion-body {
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid rgba(184,150,78,0.14);
    background: rgba(184,150,78,0.02);
    margin-left:0.2rem;
}
/* Logo-Body: immer sichtbar wenn Item aktiv (kein display:none default) */
#createLogoSection.accordion-body {
    display: flex; /* Logo ist default-aktiv */
}

/* ── Sticky Generate Footer ─────────────────────────────── */
#sidebarGenerateFooter {
    position: sticky;
    bottom: 0;
    background: var(--sidebar-bg, var(--panel-bg));
    z-index: 10;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem !important;
}

/* ── Mobile: Accordion-Header ausblenden, nur aktiver Content sichtbar ── */
@media (max-width: 900px) {
    .create-accordion {
        gap: 0;
    }
    .accordion-item {
        border: none;
        border-radius: 0;
    }
    .accordion-item .accordion-header {
        display: none;
    }
    .accordion-item .accordion-body {
        display: none !important;
    }
    .accordion-item.active .accordion-body {
        display: flex !important;
        border-top: none;
        padding: 0;
    }
}

/* ── Prompt Chat Overlay (KI-Assistent) ──────────────────────────────────── */

/* ✨-Button neben Label */
.chat-assist-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    margin-left: 0.5rem; padding: 0.18rem 0.55rem;
    font-family: 'Montserrat', sans-serif; font-size: 0.68rem; font-weight: 600;
    text-transform: none; vertical-align: middle;
    background: rgba(184,150,78,0.08); border: 1px solid rgba(184,150,78,0.35);
    color: rgba(212,175,55,0.75); border-radius: 4px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap; width: auto; margin-top: 0;
}
.chat-assist-btn:hover,
.chat-assist-btn--active { background: rgba(184,150,78,0.18); border-color: var(--accent); color: var(--accent); filter: none; }
.chat-assist-btn--filled {
    background: var(--accent); color: var(--bg-dark);
    border-color: var(--accent); font-weight: 700;
}
.chat-assist-btn--filled:hover { background: #c9a84c; filter: none; }
.chat-assist-btn--block {
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
    width: 100%; margin: 0.25rem 0 0; padding: 0.45rem 1rem;
    font-size: 0.76rem; font-weight: 600; letter-spacing: 0.2px;
    background: rgba(184,150,78,0.12); border: 1px solid rgba(184,150,78,0.45);
    color: var(--accent); border-radius: 6px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chat-assist-btn--block:hover { background: rgba(184,150,78,0.22); border-color: var(--accent); color: var(--accent); filter: none; }

/* Backdrop */
.pco-backdrop {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0,0,0,0.72); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.pco-backdrop.hidden { display: none; }

/* Modal */
.pco-modal {
    background: #16120a; border: 1px solid rgba(184,150,78,0.35);
    border-radius: 10px; width: 100%; max-width: 600px;
    height: clamp(420px, 68vh, 640px); display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.8);
    overflow: hidden;
}

/* Header */
.pco-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; border-bottom: 1px solid rgba(184,150,78,0.2);
    background: rgba(184,150,78,0.06); flex-shrink: 0;
}
.pco-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.pco-restart {
    background: none; border: none; cursor: pointer; padding: 0.2rem 0.4rem;
    font-size: 0.72rem; color: rgba(255,240,210,0.4);
    font-family: 'Montserrat', sans-serif; font-weight: 600;
    transition: color 0.15s; white-space: nowrap;
}
.pco-restart:hover { color: rgba(255,240,210,0.8); }
.pco-title {
    font-family: 'Montserrat', sans-serif; font-size: 0.82rem; font-weight: 700;
    color: var(--accent); letter-spacing: 0.4px;
}
.pco-close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 0.2rem; display: flex; width: auto; margin: 0;
    transition: color 0.15s;
}
.pco-close:hover { color: var(--text-main); filter: none; }

/* Messages */
.pco-messages {
    flex: 1; min-height: 0; overflow-y: auto; padding: 0.85rem 1rem; display: flex;
    flex-direction: column; gap: 0.55rem;
    scrollbar-width: thin; scrollbar-color: rgba(184,150,78,0.2) transparent;
}
.pco-messages::-webkit-scrollbar { width: 3px; }
.pco-messages::-webkit-scrollbar-thumb { background: rgba(184,150,78,0.25); border-radius: 2px; }

.pco-bubble {
    font-family: 'Montserrat', sans-serif; font-size: 0.83rem; line-height: 1.5;
    padding: 0.55rem 0.75rem; border-radius: 8px; max-width: 88%; word-break: break-word;
}
.pco-bubble--ai {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main); align-self: flex-start; border-radius: 4px 12px 12px 12px;
}
.pco-bubble--user {
    background: rgba(184,150,78,0.13); border: 1px solid rgba(184,150,78,0.28);
    color: rgba(255,240,210,0.92); align-self: flex-end; border-radius: 12px 4px 12px 12px;
}

/* Typing dots */
.pco-loading { display: flex; align-items: center; gap: 5px; padding: 0.65rem 0.75rem !important; }
.pco-loading span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(184,150,78,0.65); display: inline-block;
    animation: pcoDot 1.3s infinite ease-in-out;
}
.pco-loading span:nth-child(2) { animation-delay: 0.22s; }
.pco-loading span:nth-child(3) { animation-delay: 0.44s; }
@keyframes pcoDot { 0%,80%,100%{transform:scale(0.65);opacity:0.35} 40%{transform:scale(1.1);opacity:1} }

/* Choice tiles */
.pco-tiles {
    display: grid; gap: 0.5rem;
    padding: 0 1rem 0.75rem; flex-shrink: 0;
    grid-template-columns: repeat(2, 1fr);
}
.pco-tiles--cols3 { grid-template-columns: repeat(3, 1fr); }
.pco-tile {
    padding: 0.6rem 0.75rem; border-radius: 8px; cursor: pointer;
    font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600;
    background: rgba(184,150,78,0.08); border: 1px solid rgba(184,150,78,0.3);
    color: rgba(255,240,210,0.85); text-align: center; line-height: 1.3;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pco-tile:hover { background: rgba(184,150,78,0.2); border-color: var(--accent); color: var(--accent); filter: none; }
.pco-tile:active { background: rgba(184,150,78,0.28); }
.pco-tile--action {
    grid-column: 1 / -1;
    background: rgba(184,150,78,0.04); border-style: dashed;
    color: rgba(255,240,210,0.6); font-weight: 600;
}
.pco-tile--action:hover { background: rgba(184,150,78,0.12); color: var(--accent); border-style: solid; }
.pco-tile--retry { grid-column: 1 / -1; color: rgba(255,200,100,0.8); border-color: rgba(255,200,100,0.3); }

/* ── Foto Text-Korrektur-Bar ─────────────────────────────────────────────── */
.foto-slots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.foto-slot-cell { aspect-ratio: 1; border: 1px dashed rgba(184,150,78,0.38); border-radius: 4px; cursor: pointer; position: relative; overflow: hidden; background: rgba(184,150,78,0.05); display: flex; align-items: center; justify-content: center; transition: border-color 0.15s; }
.foto-slot-cell:hover, .foto-slot-cell.dd-hover { border-color: var(--accent); }
.foto-slot-cell .ref-preview-img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.foto-slot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; color: var(--text-muted); pointer-events: none; padding: 0.5rem; }
.foto-slot-empty svg { width: 22px; height: 22px; opacity: 0.5; transition: opacity 0.15s, color 0.15s; }
.foto-slot-cell:hover .foto-slot-empty svg { opacity: 0.85; color: var(--accent); }
.foto-slot-empty span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; }
.foto-slot-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.55); pointer-events: none; }
.foto-slot-spin::after { content: ''; width: 20px; height: 20px; border: 2px solid rgba(184,150,78,0.3); border-top-color: var(--accent); border-radius: 50%; animation: fotoSpinAnim 0.7s linear infinite; }
@keyframes fotoSpinAnim { to { transform: rotate(360deg); } }
.foto-slot-cell.foto-slot-uploading { pointer-events: none; }
.foto-tcb {
    margin-top: 0.5rem; padding: 0.5rem 0.7rem;
    background: rgba(184,150,78,0.07); border: 1px solid rgba(184,150,78,0.25);
    border-radius: 6px;
}
.foto-tcb-display {
    display: flex; align-items: flex-start; gap: 0.4rem; flex-wrap: wrap;
}
.foto-tcb-label {
    font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 700;
    color: var(--accent); white-space: nowrap; flex-shrink: 0; padding-top: 0.05rem;
}
.foto-tcb-value {
    font-family: 'Montserrat', sans-serif; font-size: 0.75rem; color: var(--text-main);
    font-style: italic; flex: 1; word-break: break-word; line-height: 1.45;
}
.foto-tcb-btns { display: flex; gap: 0.3rem; flex-shrink: 0; }
.foto-tcb-btn {
    padding: 0.15rem 0.45rem; border-radius: 4px; cursor: pointer; font-size: 0.73rem;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.13);
    color: var(--text-muted); width: auto; margin: 0; transition: background 0.15s;
}
.foto-tcb-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); filter: none; }
.foto-tcb-btn--ok { border-color: rgba(184,150,78,0.4); color: var(--accent); }
.foto-tcb-btn--ok:hover { background: rgba(184,150,78,0.15); filter: none; }
.foto-tcb-edit { display: flex; gap: 0.4rem; align-items: center; }
.foto-tcb-input {
    flex: 1; min-width: 0; padding: 0.3rem 0.5rem;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(184,150,78,0.4);
    border-radius: 4px; color: var(--text-main); font-size: 0.77rem; outline: none;
    font-family: 'Montserrat', sans-serif; transition: border-color 0.15s;
}
.foto-tcb-input:focus { border-color: rgba(184,150,78,0.7); }

/* Floating-Modus wenn Bar in ausgeblendetem Bereich (Logo/Produkt) */
.foto-tcb--floating {
    position: fixed; bottom: 5rem; left: 50%; transform: translateX(-50%);
    width: min(420px, calc(100vw - 2rem)); z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    margin: 0;
}

/* Adopt bar */
.pco-adopt {
    margin: 0 1rem 0.75rem; padding: 0.7rem 0.85rem;
    background: rgba(184,150,78,0.07); border: 1px solid rgba(184,150,78,0.35);
    border-radius: 8px; display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0;
}
.pco-adopt.hidden { display: none; }
.pco-adopt-label {
    font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 700;
    color: var(--accent); letter-spacing: 0.5px; text-transform: uppercase;
}
.pco-adopt-input {
    font-family: 'Montserrat', sans-serif; font-size: 0.77rem; color: rgba(255,240,210,0.9);
    line-height: 1.45; width: 100%; box-sizing: border-box; resize: vertical;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(184,150,78,0.3);
    border-radius: 5px; padding: 0.5rem 0.6rem; min-height: 80px;
}
.pco-adopt-btn {
    align-self: stretch; padding: 0.55rem 1rem; width: auto; margin: 0;
    background: var(--accent); color: var(--bg-dark); border: none; border-radius: 6px;
    font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 700;
    cursor: pointer; letter-spacing: 0.3px; transition: background 0.15s;
}
.pco-adopt-btn:hover { background: #c9a84c; filter: none; }

/* Input row */
.pco-input-row {
    display: flex; gap: 0.5rem; padding: 0.65rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.pco-input {
    flex: 1; min-width: 0; padding: 0.5rem 0.7rem;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px; color: var(--text-main);
    font-family: 'Montserrat', sans-serif; font-size: 0.82rem; outline: none;
    transition: border-color 0.15s;
}
.pco-input:focus { border-color: rgba(184,150,78,0.55); }
.pco-input::placeholder { color: rgba(255,255,255,0.3); }
.pco-send {
    flex-shrink: 0; padding: 0.5rem 0.75rem; width: auto; margin: 0;
    background: var(--accent); color: var(--bg-dark); border: none; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; transition: background 0.15s;
}
.pco-send:hover { background: #c9a84c; filter: none; }

/* Mobile: voller Viewport */
@media (max-width: 520px) {
    .pco-backdrop { padding: 0; align-items: flex-end; }
    .pco-modal { max-width: 100%; border-radius: 12px 12px 0 0; height: 85dvh; }
}
/* ── Field Pulse Animation ───────────────────────────────── */
@keyframes fieldPulse {
    0%   { box-shadow: 0 0 0 0 rgba(184,150,78,0); border-color: rgba(184,150,78,0.38); }
    25%  { box-shadow: 0 0 0 6px rgba(184,150,78,0.45), 0 0 24px rgba(184,150,78,0.35); border-color: var(--accent); }
    55%  { box-shadow: 0 0 0 2px rgba(184,150,78,0.18), 0 0 8px rgba(184,150,78,0.15); border-color: rgba(184,150,78,0.55); }
    78%  { box-shadow: 0 0 0 5px rgba(184,150,78,0.38), 0 0 18px rgba(184,150,78,0.28); border-color: var(--accent); }
    100% { box-shadow: 0 0 0 0 rgba(184,150,78,0); border-color: rgba(184,150,78,0.38); }
}
.field-pulse {
    animation: fieldPulse 1.4s ease-out forwards;
}
/* ── Moodboard Upload Slots ───────────────────────────────────────────────── */
.mb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    border-radius: 5px;
    transition: outline 0.1s;
}
.mb-grid.dd-hover { outline: 2px dashed rgba(184,150,78,0.6); outline-offset: 3px; }
.mb-slot {
    position: relative;
    aspect-ratio: 1;
    border-radius: 5px;
    border: 1.5px dashed rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}
.mb-slot--filled { border-style: solid; border-color: rgba(184,150,78,0.4); }
.mb-slot--error  { border-color: rgba(219,68,55,0.5); background: rgba(219,68,55,0.05); }
.mb-slot--loading { opacity: 0.7; }
.mb-slot:not(.mb-slot--filled):not(.mb-slot--loading):hover,
.mb-slot.dd-hover { border-color: rgba(184,150,78,0.55); background: rgba(184,150,78,0.06); }
.mb-slot-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.mb-slot-del {
    position: absolute; top: 2px; right: 2px;
    background: rgba(0,0,0,0.65); border: none; border-radius: 50%;
    color: #fff; font-size: 0.65rem; width: 18px; height: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    line-height: 1; padding: 0;
    opacity: 0; transition: opacity 0.15s;
}
.mb-slot--filled:hover .mb-slot-del { opacity: 1; }
.mb-slot-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.3rem; height: 100%;
    color: rgba(255,255,255,0.3); font-size: 0.63rem; font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    user-select: none;
}
.mb-slot-empty svg { opacity: 0.4; }
.mb-slot-spinner {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.45);
}
.mb-slot-spinner::after {
    content: '';
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.mb-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.15); border-radius: 5px;
    color: var(--text-muted); cursor: pointer; padding: 0.45rem;
    font-family: 'Montserrat', sans-serif; font-size: 0.73rem; font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mb-add-btn:hover {
    background: rgba(184,150,78,0.08);
    border-color: rgba(184,150,78,0.4);
    color: var(--accent);
}
/* ── Sidebar Accordion Icon Animations (nur aktives Item) ─────────── */
/* Jede Animation läuft nur wenn das Accordion .active ist             */

@keyframes acc-anim-text {
    0%,100% { transform: scale(1); }
    50%     { transform: scaleX(1.18) scaleY(0.9); }
}
@keyframes acc-anim-logo {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes acc-anim-hintergrund {
    0%,100% { opacity: 1; }
    50%     { opacity: 0.45; }
}
@keyframes acc-anim-bildupload {
    0%,100% { transform: translateY(0); }
    35%,65% { transform: translateY(-3px); }
}
@keyframes acc-anim-verschmelzen {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.22); }
}
@keyframes acc-anim-moodboard {
    0%,100% { transform: scale(1) rotate(0deg); }
    33%     { transform: scale(1.12) rotate(-6deg); }
    66%     { transform: scale(1.12) rotate(6deg); }
}
@keyframes acc-anim-styletransfer {
    0%,100% { transform: translateX(0); }
    40%,60% { transform: translateX(4px); }
}
@keyframes acc-anim-einfuegen {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.28); }
}
@keyframes acc-anim-analyse {
    0%,100% { transform: rotate(0deg); }
    25%     { transform: rotate(-14deg); }
    75%     { transform: rotate(14deg); }
}

#accordionText.active       .acc-icon { animation: acc-anim-text        2.0s ease-in-out infinite; }
#accordionLogo.active        .acc-icon { animation: acc-anim-logo        7.0s linear      infinite; }
#accordionHintergrund.active .acc-icon { animation: acc-anim-hintergrund 2.4s ease-in-out infinite; }
#accordionBildUpload.active  .acc-icon { animation: acc-anim-bildupload  1.6s ease-in-out infinite; }
#accordionVerschmelzen.active .acc-icon { animation: acc-anim-verschmelzen 2.2s ease-in-out infinite; }
#accordionMoodboard.active   .acc-icon { animation: acc-anim-moodboard   3.0s ease-in-out infinite; }
#accordionStyleTransfer.active .acc-icon { animation: acc-anim-styletransfer 1.8s ease-in-out infinite; }
#accordionEinfuegen.active   .acc-icon { animation: acc-anim-einfuegen   2.0s ease-in-out infinite; }
#accordionAnalyse.active     .acc-icon { animation: acc-anim-analyse     2.6s ease-in-out infinite; }
/* ═══════════════════════════════════════════════════════════
   Zoom: Bottom Sheet  (ersetzt zoom-bottom-stack)
   ═══════════════════════════════════════════════════════════ */

#zoomSheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 201;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

/* ── Handle ──────────────────────────────────────────────── */
.zoom-sheet-handle {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 22px;
    cursor: pointer;
    background: rgba(6,6,6,0.72);
    border-top: 1px solid rgba(255,255,255,0.06);
    -webkit-tap-highlight-color: transparent;
}
.zoom-sheet-pill {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.22);
    border-radius: 2px;
    transition: background 0.15s, transform 0.15s;
}
.zoom-sheet-handle:hover .zoom-sheet-pill,
#zoomSheet.sheet-expanded .zoom-sheet-pill {
    background: rgba(255,255,255,0.5);
}

/* ── Aufklappbarer Body ──────────────────────────────────── */
.zoom-sheet-body {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem 0.4rem;
    background: rgba(6,6,6,0.96);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border-top: 1px solid rgba(255,255,255,0.07);
    max-height: 42vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#zoomSheet.sheet-expanded .zoom-sheet-body {
    display: flex;
}
/* Prompt-Box im Sheet: kein extra Hintergrund nötig */
.zoom-sheet-body .zoom-prompt-box {
    background: transparent;
    border: none;
    padding: 0;
}
.zoom-sheet-body #zoomPromptWrap {
    background: transparent;
    border: none;
    padding: 0;
}

/* ── Peek-Zeile: immer sichtbar ──────────────────────────── */
.zoom-sheet-peek {
    display: flex;
    align-items: stretch;
    padding: 0.45rem 0.55rem calc(env(safe-area-inset-bottom, 0px) + 0.45rem);
    background: rgba(6,6,6,0.96);
    backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
    border-top: 1px solid rgba(255,255,255,0.08);
    min-height: 62px;
    box-sizing: border-box;
}

/* ── Aktions-Tiles ───────────────────────────────────────── */
.zoom-stile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
    padding: 0.38rem 0.2rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.72);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    touch-action: manipulation;
    font-family: 'Montserrat', sans-serif;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    line-height: 1;
}
.zoom-stile:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
    filter: none;
}
.zoom-stile:active {
    background: rgba(255,255,255,0.15);
    filter: none;
}
.zoom-stile svg {
    width: 16px; height: 16px;
    flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    display: block;
}
.zoom-stile-lbl {
    font-size: 0.58rem; font-weight: 600;
    text-align: center;
    letter-spacing: 0.1px;
    white-space: normal;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.2;
}
.zoom-stile-cost {
    font-size: 0.52rem;
    color: var(--accent);
    font-weight: 700;
    line-height: 1;
}
.zoom-stile--gold {
    border-color: rgba(184,150,78,0.4);
    color: var(--accent);
}
.zoom-stile--gold:hover {
    background: rgba(25,20,10,0.85);
    border-color: var(--accent);
    filter: none;
}
.zoom-stile.active {
    background: rgba(184,150,78,0.12);
    border-color: rgba(184,150,78,0.55);
    color: var(--accent);
}
.zoom-stile:disabled {
    opacity: 0.32;
    pointer-events: none;
}

/* ── Trenner Tiles ↔ Utils ───────────────────────────────── */
.zoom-sheet-div {
    width: 1px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
    margin: 0.15rem 0.2rem;
    align-self: stretch;
}

/* ── Utility-Icons ───────────────────────────────────────── */
.zoom-sutil {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.42);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    padding: 0;
    touch-action: manipulation;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}
.zoom-sutil svg {
    width: 15px; height: 15px;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    display: block;
}
.zoom-sutil:hover {
    color: rgba(255,255,255,0.88);
    background: rgba(255,255,255,0.08);
    filter: none;
}
.zoom-sutil:active {
    background: rgba(255,255,255,0.14);
    filter: none;
}
.zoom-sutil.active { color: var(--accent); }
.zoom-sutil--danger:hover {
    color: #ff7070;
    background: rgba(219,68,55,0.15);
    filter: none;
}
.zoom-sutil:disabled {
    opacity: 0.28;
    pointer-events: none;
}

/* ── Desktop: Sheet zentriert & abgerundet ───────────────── */
@media (min-width: 769px) {
    #zoomSheet {
        max-width: 700px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        border-radius: 12px 12px 0 0;
        overflow: hidden;
    }
}

/* ── Mobile: Bild über Sheet zentrieren + kompaktere Utils ── */
@media (max-width: 768px) {
    /* Bild-Bereich endet über dem Sheet – verhindert schwarze Flächen */
    #zoomInner {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }
    /* Utility-Icons enger damit Tiles genug Platz haben */
    .zoom-sutil { width: 28px; }
    /* Tiles etwas weniger Innenabstand */
    .zoom-stile { padding: 0.35rem 0.15rem; }
}