:root {
    --bg-base: #0b0f19;
    --bg-surface: rgba(20, 26, 42, 0.78);
    --bg-card: #131b2e;
    --card-border: rgba(255, 255, 255, 0.09);
    --input-bg: #0c1222;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-primary: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --icon-primary: #d1d5db;
    --icon-secondary: #6b7280;
    --glow-color: rgba(99, 102, 241, 0.16);
}

.light-mode {
    --bg-base: #f3f4f6;
    --bg-surface: rgba(255, 255, 255, 0.85);
    --bg-card: #ffffff;
    --card-border: rgba(0, 0, 0, 0.09);
    --input-bg: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-primary: #4f46e5;
    --accent-cyan: #0891b2;
    --accent-emerald: #059669;
    --accent-rose: #e11d48;
    --icon-primary: #374151;
    --icon-secondary: #9ca3af;
    --glow-color: rgba(79, 70, 229, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    background-image:
        radial-gradient(at 10% 15%, var(--glow-color) 0px, transparent 50%),
        radial-gradient(at 90% 85%, rgba(6, 182, 212, 0.10) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1, h2, h3 { font-family: 'Outfit', sans-serif; line-height: 1.25; }
h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
a { color: var(--accent-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--text-secondary); }
.small { font-size: 0.85rem; }
.mt-1 { margin-top: 1rem; }
.pre-line { white-space: pre-line; }

.container { max-width: min(1480px, 95vw); margin: 0 auto; padding: 0 1.5rem; }

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.9rem 0;
    margin-bottom: 1.75rem;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: var(--text-primary); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    box-shadow: 0 0 12px var(--accent-primary);
}
.brand-text { display: flex; flex-direction: column; width: max-content; }
.brand-name { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.1; white-space: nowrap; }
.brand-tag {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.2rem;
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
}
@media (max-width: 600px) {
    .brand-name { font-size: 1.18rem; }
    .brand-tag { font-size: 0.74rem; }
}
.topbar-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Cards & Badges */
.card {
    background: var(--bg-card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.badge {
    display: inline-block; font-size: 0.74rem; font-weight: 600;
    padding: 0.18rem 0.55rem; border-radius: 999px;
    background: rgba(255, 255, 255, 0.08); color: var(--text-primary);
}
.badge-indigo { background: rgba(99, 102, 241, 0.18); color: var(--accent-primary); }
.badge-cyan { background: rgba(6, 182, 212, 0.18); color: var(--accent-cyan); }
.badge-emerald { background: rgba(16, 185, 129, 0.18); color: var(--accent-emerald); }
.badge-muted { background: rgba(156, 163, 175, 0.15); color: var(--text-secondary); }

.status-pill {
    font-size: 0.74rem; font-weight: 600; padding: 0.18rem 0.6rem;
    border-radius: 999px; background: rgba(99, 102, 241, 0.2); color: #c7d2fe;
}
.status-generiert { background: rgba(6, 182, 212, 0.22); color: #67e8f9; }
.status-freigegeben { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; }
.status-archiviert { background: rgba(244, 63, 94, 0.2); color: #fda4af; }

/* Buttons (dezente Pastell-Töne) */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.56rem 1rem; border-radius: 10px; border: 1px solid transparent;
    font-family: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.92; text-decoration: none; }
.btn-sm { padding: 0.36rem 0.7rem; font-size: 0.82rem; border-radius: 8px; }
.btn-primary {
    background: rgba(165, 180, 252, 0.20);
    border-color: rgba(165, 180, 252, 0.42);
    color: #e0e7ff;
}
.btn-cyan {
    background: rgba(165, 243, 252, 0.16);
    border-color: rgba(165, 243, 252, 0.38);
    color: #cffafe;
}
.btn-emerald {
    background: rgba(167, 243, 208, 0.18);
    border-color: rgba(167, 243, 208, 0.40);
    color: #d1fae5;
}
.btn-ghost { background: transparent; border-color: var(--card-border); color: var(--text-primary); }
.btn-danger-ghost {
    background: rgba(254, 205, 211, 0.12);
    border-color: rgba(253, 164, 175, 0.34);
    color: #fecdd3;
}
.light-mode .btn-primary {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #3730a3;
}
.light-mode .btn-cyan {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}
.light-mode .btn-emerald {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}
.light-mode .btn-danger-ghost {
    background: #ffe4e6;
    border-color: #fecdd3;
    color: #9f1239;
}
.btn.is-recording { background: rgba(251, 113, 133, 0.28); border-color: #fb7185; color: #fff; }
.icon-btn { width: 42px; height: 42px; padding: 0; border-radius: 10px; }
.icon-btn .md-icon { flex-shrink: 0; }
.icon-btn .sun-icon { display: block; }
.icon-btn .moon-icon { display: none; }
.light-mode .icon-btn .sun-icon { display: none; }
.light-mode .icon-btn .moon-icon { display: block; }

/* Forms */
label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--text-secondary); }
input, select, textarea {
    width: 100%; padding: 0.6rem 0.75rem; border-radius: 9px;
    border: 1px solid var(--card-border); background: var(--input-bg);
    color: var(--text-primary); font-family: inherit; font-size: 0.92rem;
}
textarea { resize: vertical; }
.form-row { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.form-row > label { flex: 1; min-width: 150px; }
.form-row > label.grow { flex: 2; }
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
@media (max-width: 760px) { .span-2, .span-3 { grid-column: span 1; } }

.subhead { margin: 1.5rem 0 0.85rem; color: var(--accent-cyan); font-size: 1.05rem; }
.form-footer { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.archive-form { margin-top: 1rem; display: flex; justify-content: flex-end; }

/* Dashboard */
.hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1.5rem; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; }
.view-switch { display: inline-flex; gap: 0.35rem; }
.view-switch .icon-btn.is-active {
    background: rgba(165, 180, 252, 0.20);
    border-color: rgba(165, 180, 252, 0.45);
    color: var(--text-primary);
}
[hidden] { display: none !important; }

.expose-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.15rem; }
.expose-card {
    border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden;
    background: rgba(255, 255, 255, 0.02); display: flex; flex-direction: column;
}
.expose-thumb { position: relative; display: block; height: 175px; background: var(--input-bg); }
.expose-thumb img { width: 100%; height: 100%; object-fit: cover; }
.expose-thumb .status-pill { position: absolute; top: 10px; right: 10px; }
.thumb-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); font-size: 0.85rem;
}
.expose-card-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.meta-line { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-secondary); }
.facts-mini { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-primary); font-weight: 500; }
.card-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }
.empty-state { padding: 2rem; text-align: center; color: var(--text-secondary); }

/* Editor */
.editor-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.editor-top-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.breadcrumb { margin-bottom: 0.35rem; font-size: 0.88rem; }
.toast-banner {
    background: rgba(16, 185, 129, 0.16); border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--text-primary); padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1.25rem;
}
.editor-tabs {
    position: sticky;
    top: var(--topbar-h, 102px);
    z-index: 40;
    background: var(--bg-base);
    padding-top: 0.5rem;
    display: flex;
    gap: 0.35rem;
    align-items: flex-end;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.35rem;
    padding-left: 0.25rem;
}
.tab-btn {
    position: relative;
    bottom: -1px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.72rem 1.35rem;
    border-radius: 12px 12px 0 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.96rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.tab-btn.is-active {
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    border-color: var(--card-border);
    border-bottom-color: var(--bg-card);
    box-shadow: inset 0 2px 0 var(--accent-primary);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 920px) { .editor-split { grid-template-columns: 1fr; } }

.voice-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.85rem 0; }
.voice-status { font-size: 0.84rem; color: var(--accent-cyan); min-height: 1.2rem; margin-bottom: 0.4rem; }
.audio-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.audio-item { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.gen-bar { margin-top: 0.85rem; }

.upload-zone {
    border: 2px dashed var(--card-border); border-radius: 12px; padding: 1.25rem;
    text-align: center; margin: 0.85rem 0 1rem; transition: border-color 0.2s ease;
}
.upload-zone.drag-over { border-color: var(--accent-cyan); background: rgba(6, 182, 212, 0.06); }
.upload-btns { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 0.75rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.85rem; }
.media-card { border: 1px solid var(--card-border); border-radius: 10px; overflow: hidden; background: var(--input-bg); }
.media-card.is-cover { border-color: var(--accent-emerald); }
.media-thumb { position: relative; height: 130px; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cover-badge, .type-badge {
    position: absolute; top: 6px; left: 6px; font-size: 0.7rem; font-weight: 600;
    padding: 0.15rem 0.45rem; border-radius: 6px; background: var(--accent-emerald); color: #042419;
}
.type-badge { left: auto; right: 6px; background: var(--accent-cyan); color: #06202a; }
.media-meta { padding: 0.6rem; display: flex; flex-direction: column; gap: 0.4rem; }
.media-meta input { padding: 0.38rem 0.5rem; font-size: 0.8rem; }
.media-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* Exposé View & Print */
.view-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar-right { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.expose-sheet {
    background: var(--bg-card); border: 1px solid var(--card-border);
    border-radius: 18px; padding: 2.25rem; margin-bottom: 2rem;
}
.sheet-hero { margin-bottom: 1.5rem; }
.sheet-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.sheet-subtitle { font-size: 1.1rem; color: var(--text-secondary); }
.sheet-cover { margin-bottom: 1.75rem; }
.sheet-cover img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; }
.sheet-cover figcaption { margin-top: 0.45rem; font-size: 0.85rem; color: var(--text-secondary); }

.facts-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem; margin-bottom: 2rem;
}
.fact-box {
    border: 1px solid var(--card-border); border-radius: 12px; padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.02);
}
.fact-label { display: block; font-size: 0.78rem; color: var(--text-secondary); }
.fact-value { font-family: 'Outfit', sans-serif; font-size: 1.2rem; color: var(--text-primary); }

.facts-table-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: 12px; }
.facts-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.facts-table th, .facts-table td {
    padding: 0.72rem 0.95rem;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
    vertical-align: middle;
}
.facts-table th {
    color: var(--text-secondary);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
}
.facts-table td { color: var(--text-primary); }
.facts-kv th { width: 19%; }
.facts-kv td { width: 31%; }
.extras-table th, .extras-table td { width: auto; }
.facts-table tr:last-child th, .facts-table tr:last-child td { border-bottom: none; }
@media (max-width: 720px) {
    .facts-kv th, .facts-kv td { display: block; width: 100%; padding: 0.45rem 0.85rem; }
    .facts-kv th { border-bottom: none; padding-top: 0.7rem; font-size: 0.8rem; }
}

.sheet-section { margin-bottom: 1.75rem; }
.sheet-section h2 { border-bottom: 1px solid var(--card-border); padding-bottom: 0.4rem; margin-bottom: 0.75rem; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin: 0; padding: 0; }
.feature-list li {
    position: relative;
    padding-left: 1.45rem;
    line-height: 1.5;
    color: var(--text-primary);
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.48rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}
.sheet-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 760px) { .sheet-two-col { grid-template-columns: 1fr; } }

.sheet-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.gallery-item { break-inside: avoid; }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; }
.gallery-item figcaption { font-size: 0.84rem; color: var(--text-secondary); margin-top: 0.35rem; }

.floorplan-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.floorplan-item {
    break-inside: avoid; border: 1px solid var(--card-border); border-radius: 12px;
    padding: 0.85rem; background: rgba(255, 255, 255, 0.03);
}
.floorplan-item img {
    width: 100%; max-height: 460px; object-fit: contain;
    background: #ffffff; border-radius: 8px;
}
.floorplan-item figcaption { font-size: 0.86rem; color: var(--text-secondary); margin-top: 0.5rem; }

.sheet-footer {
    border-top: 1px solid var(--card-border); padding-top: 1.25rem; margin-top: 2rem;
    font-size: 0.9rem;
}
.legal-note { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.4rem; }

.footer { text-align: center; padding: 2rem 0; color: var(--text-secondary); font-size: 0.85rem; }

.scroll-top-btn {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 70;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.scroll-top-btn:hover { transform: translateY(-2px); border-color: rgba(165, 180, 252, 0.45); }
@media (max-width: 760px) {
    .scroll-top-btn { bottom: 5.2rem; right: 1rem; }
}

@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #ffffff !important; color: #111827 !important; }
    .no-print { display: none !important; }
    .container { max-width: 100%; padding: 0; }
    .expose-sheet {
        background: #ffffff !important; color: #111827 !important;
        border: none !important; box-shadow: none !important; padding: 0 !important;
    }
    .fact-box { border: 1px solid #d1d5db !important; background: #f9fafb !important; }
    .fact-value, h1, h2 { color: #111827 !important; }
    .sheet-subtitle, .fact-label, .legal-note, .gallery-item figcaption { color: #4b5563 !important; }
    .page-break-before { break-before: page; }
}

.mobile-action-bar { display: none; }

/* Lightbox / Großbild-Vorschau */
.sheet-cover img,
.gallery-item img,
.floorplan-item img,
.media-thumb img {
    cursor: zoom-in;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.sheet-cover img:hover,
.gallery-item img:hover,
.floorplan-item img:hover,
.media-thumb img:hover {
    transform: scale(1.015);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 10, 19, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: lbFadeIn 0.2s ease;
}
.lightbox[hidden] { display: none !important; }
.lightbox-inner {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: lbZoomIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-inner img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.lightbox-caption {
    color: #e5e7eb;
    font-size: 0.95rem;
    text-align: center;
}
.lightbox-close, .lightbox-nav {
    position: fixed;
    background: rgba(19, 27, 46, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f3f4f6;
    cursor: pointer;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover {
    background: rgba(99, 102, 241, 0.45);
    transform: scale(1.06);
}
.lightbox-close { top: 1.25rem; right: 1.25rem; width: 44px; height: 44px; font-size: 1.6rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; font-size: 1.9rem; }
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbZoomIn { from { opacity: 0; transform: scale(0.93); } to { opacity: 1; transform: scale(1); } }
@keyframes kiSpin { to { transform: rotate(360deg); } }

.ki-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 210;
    background: rgba(6, 10, 19, 0.78);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: lbFadeIn 0.2s ease;
}
.ki-modal-backdrop[hidden] { display: none !important; }
.ki-modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: lbZoomIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.ki-modal-card h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.ki-modal-card p { margin: 0; }
.ki-spinner {
    width: 46px;
    height: 46px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    border: 3.5px solid rgba(99, 102, 241, 0.22);
    border-top-color: var(--accent-primary);
    border-right-color: var(--accent-cyan);
    animation: kiSpin 0.85s linear infinite;
}
.ki-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.16);
    color: var(--accent-emerald);
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 700;
}
.ki-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

@media (max-width: 760px) {
    .btn { min-height: 44px; }
    input, select, textarea { font-size: 16px; min-height: 44px; }
    body { padding-bottom: 76px; }
    .mobile-action-bar {
        display: flex; gap: 0.5rem; position: fixed; left: 0; right: 0; bottom: 0;
        padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
        background: var(--bg-surface); backdrop-filter: blur(12px);
        border-top: 1px solid var(--card-border); z-index: 60;
    }
    .mobile-action-bar .btn { flex: 1; padding: 0.55rem 0.5rem; font-size: 0.86rem; }
}

