/* ============================================================================
   AI Utility Classes
   ============================================================================ */

.ai-hidden {
    display: none !important;
}

/* Hide studio initially when AI landing is active (prevents FOUC) */
.studio-header,
#app {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.studio-header.ai-visible,
#app.ai-visible {
    opacity: 1;
}

/* ============================================================================
   Landing Page — Clean, product-forward, 2026 Scandi-tech
   No decorative fonts. Product is the hero. Precision spacing.
   ============================================================================ */

#ai-landing {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #fff;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#ai-landing.exit {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.lp {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAV ── */
.lp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 56px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    pointer-events: none;
}

.lp-nav > * { pointer-events: auto; }

.lp-brand {
    font-family: 'Outfit', 'DM Sans', sans-serif;
    font-size: 19px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}
.lp-brand-icon {
    flex-shrink: 0;
    transition: transform 0.7s cubic-bezier(0.25, 0, 0.25, 1);
}
.lp-brand:hover .lp-brand-icon {
    transform: rotate(90deg);
}

.lp-nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-link {
    background: none;
    border: none;
    padding: 7px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: color 0.15s;
}
.lp-link:hover { color: #1a1a1a; }

.lp-cta {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.lp-cta:hover { background: #333; }

/* ── HERO ── */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding-top: 56px;
}

.lp-hero-visual {
    position: relative;
    overflow: hidden;
    background: #f4f3f0;
}

.lp-hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 56px;
    max-width: 520px;
}

.lp-hero-text h1 {
    font-family: 'DM Sans', sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 20px 0;
}

.lp-hero-text p {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: #888;
    line-height: 1.65;
    margin: 0 0 36px 0;
}

.lp-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lp-btn-primary {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.lp-btn-primary:hover { background: #333; }

.lp-btn-ghost {
    background: none;
    border: none;
    padding: 12px 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
}
.lp-btn-ghost:hover { color: #1a1a1a; }

/* ── TEMPLATES ── */
.lp-templates-section {
    padding: 64px 32px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.lp-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #bbb;
    margin-bottom: 20px;
}

.lp-templates {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.lp-templates::-webkit-scrollbar { display: none; }
.lp-templates:active { cursor: grabbing; }

.lp-tpl {
    flex: 0 0 220px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

.lp-tpl:hover {
    border-color: #ccc;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.lp-tpl-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f6f5f3;
}

.lp-tpl-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    pointer-events: none;
}

.lp-tpl:hover .lp-tpl-img img {
    transform: scale(1.03);
}

.lp-tpl-color {
    width: 100%;
    height: 100%;
}

.lp-tpl-meta {
    padding: 12px 14px 14px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.lp-tpl-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.lp-tpl-dims {
    font-family: 'DM Mono', monospace;
    font-size: 9.5px;
    color: #ccc;
}

/* ── THREE WAYS ── */
.lp-ways-section {
    padding: 48px 32px 64px;
}

.lp-ways-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    max-width: 840px;
}

.lp-way {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 24px;
    background: #fafaf9;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.lp-way:hover { background: #fff; }

.lp-way:hover .lp-way-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.lp-way-num {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #ccc;
}

.lp-way-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: -0.01em;
}

.lp-way-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    color: #999;
    line-height: 1.5;
}

.lp-way-arrow {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    color: #ccc;
    opacity: 0;
    transition: all 0.2s;
    margin-top: 4px;
}

/* ── FOOTER ── */
.lp-footer {
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.lp-footer span {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: #ccc;
}

.lp-footer-id {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: #999 !important;
}

.lp-footer-sep { color: #ddd !important; }

/* ── PROMPT SECTION ── */
.lp-prompt-section {
    max-width: 560px;
}

.lp-back-btn {
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #ccc;
    cursor: pointer;
    padding: 16px 0 0;
    transition: color 0.15s;
}
.lp-back-btn:hover { color: #1a1a1a; }

/* AI prompt mode */
.lp-prompt-wrap, .land-prompt-wrap {
    width: 100%;
    max-width: 600px;
    animation: ai-fadeUp 0.3s ease-out;
}

.land-back-btn {
    background: none;
    border: none;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #c8c6c1;
    cursor: pointer;
    padding: 14px 0 0;
    transition: color 0.2s;
    text-transform: none;
    letter-spacing: normal;
}

.land-back-btn:hover { color: #8b7355; }

/* ============================================
   Prompt box — the hero element
   ============================================ */

.ai-prompt-box {
    width: 100%;
    background: #fff;
    border: 1px solid #e8e8e5;
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 4px 16px rgba(0, 0, 0, 0.04);
    animation: ai-fadeUp 0.7s ease-out 0.3s both;
}

.ai-prompt-box:focus-within {
    border-color: #d06040;
    box-shadow:
        0 0 0 3px rgba(208, 96, 64, 0.07),
        0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Suppress focus ring from auto-focus on initial load */
.ai-prompt-box.no-ring,
.ai-prompt-box.no-ring:focus-within {
    border-color: #e8e8e5;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 4px 16px rgba(0, 0, 0, 0.04);
}

.ai-prompt-inner {
    display: flex;
    align-items: flex-end;
    padding: 18px 16px 14px 22px;
    gap: 12px;
}

.ai-prompt-inner textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    background: transparent;
    min-height: 24px;
    max-height: 120px;
}

.ai-prompt-inner textarea::placeholder {
    color: #c8c6c3;
}

/* Send button */
.ai-send-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-send-btn:disabled {
    background: #e8e8e5;
    cursor: default;
    transform: scale(0.92);
}

.ai-send-btn:not(:disabled) {
    transform: scale(1);
}

.ai-send-btn:not(:disabled):hover {
    background: #d06040;
    box-shadow: 0 2px 8px rgba(208, 96, 64, 0.3);
}

.ai-send-btn:not(:disabled):active {
    transform: scale(0.92);
}

.ai-send-btn svg {
    width: 18px;
    height: 18px;
}

.ai-prompt-footer {
    padding: 0 22px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-prompt-hint {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #d0cfcc;
    letter-spacing: 0.04em;
}

.ai-landing-mode {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #d0cfcc;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   Example chips
   ============================================ */

.ai-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
    animation: ai-fadeUp 0.7s ease-out 0.45s both;
}

.ai-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid #eae9e7;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: #78756f;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ai-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: all 0.2s;
}

.ai-chip:hover {
    border-color: #d06040;
    color: #c05535;
    background: #fff;
    box-shadow: 0 2px 8px rgba(208, 96, 64, 0.08);
    transform: translateY(-1px);
}

.ai-chip:hover svg {
    opacity: 0.7;
    stroke: #d06040;
}

.ai-chip:active {
    transform: translateY(0);
}

/* Bottom */
.ai-landing-bottom {
    padding: 28px 0;
    animation: ai-fadeUp 0.7s ease-out 0.55s both;
}

.ai-skip-link {
    background: none;
    border: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: #c8c6c3;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    padding: 8px 0;
    text-transform: none;
}

.ai-skip-link:hover {
    color: #78756f;
}

/* ============================================
   Loading dots
   ============================================ */

.ai-landing-loading {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 30px);
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 10;
}

.ai-landing-loading.visible {
    opacity: 1;
}

/* Prompt box loading state */
#ai-landing.sending .ai-prompt-box {
    border-color: rgba(208, 96, 64, 0.25);
    box-shadow:
        0 0 0 3px rgba(208, 96, 64, 0.06),
        0 4px 24px rgba(0, 0, 0, 0.05);
    animation: ai-prompt-breathe 2s ease-in-out infinite;
}

@keyframes ai-prompt-breathe {
    0%, 100% { box-shadow: 0 0 0 3px rgba(208, 96, 64, 0.06), 0 4px 24px rgba(0, 0, 0, 0.05); }
    50% { box-shadow: 0 0 0 5px rgba(208, 96, 64, 0.10), 0 4px 32px rgba(0, 0, 0, 0.07); }
}

.ai-loading-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d06040;
    animation: ai-dot-pulse 1.4s ease-in-out infinite;
}

.ai-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-dot-pulse {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   Entrance animations
   ============================================ */

@keyframes ai-fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ai-fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================================
   Sidebar Tab Toggle
   ============================================================================ */

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0ee;
    background: #fff;
    flex-shrink: 0;
}

.sidebar-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #ccc;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    margin: 0;
    border-radius: 0;
}

.sidebar-tab svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sidebar-tab:hover {
    color: #888;
    background: #fafafa;
}

.sidebar-tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    background: transparent;
    font-weight: 600;
}

/* Notification dot for unread chat messages */
.sidebar-tab .tab-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d06040;
    display: none;
    flex-shrink: 0;
}

.sidebar-tab .tab-dot.visible {
    display: block;
    animation: ai-dot-pulse 2s ease-in-out infinite;
}

/* Sidebar panels */
.sidebar-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-panel.active {
    display: flex;
}

/* Config panel keeps original scroll behavior */
#sidebar-config {
    overflow-y: auto;
    flex: 1;
}

/* Make sidebar a flex column so tabs + panel fill height */
#sidebar {
    display: flex;
    flex-direction: column;
    overflow-y: hidden; /* override main.css — panels handle their own scroll */
}

/* ============================================================================
   AI Chat Panel (full sidebar tab)
   ============================================================================ */

#sidebar-chat {
    flex: 1;
    display: none;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

#sidebar-chat.active {
    display: flex;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Empty state */
.ai-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 8px;
    color: #c8c6c3;
    padding: 40px 20px;
    text-align: center;
}

.ai-chat-empty svg {
    width: 28px;
    height: 28px;
    opacity: 0.35;
    margin-bottom: 4px;
}

.ai-chat-empty p {
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
}

.ai-chat-empty .ai-chat-empty-hint {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #d8d6d3;
    margin-top: 2px;
}

/* Chat bubbles */
.ai-bubble {
    padding: 9px 13px;
    border-radius: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
    max-width: 88%;
    word-wrap: break-word;
    animation: ai-fadeUp 0.2s ease-out;
}

.ai-bubble-user {
    background: #1a1a1a;
    color: #f0efed;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-bubble-assistant {
    background: #f0efed;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.ai-bubble-tool {
    font-family: 'DM Mono', monospace;
    font-size: 10.5px;
    color: #a09e9a;
    align-self: flex-start;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-bubble-tool .tool-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d06040;
    flex-shrink: 0;
}

/* Typing indicator */
.ai-typing {
    display: flex;
    gap: 5px;
    padding: 10px 14px;
    align-self: flex-start;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0cfcc;
    animation: ai-dot-pulse 1.4s ease-in-out infinite;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* Input row */
.ai-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #ededed;
    background: #fafaf9;
    flex-shrink: 0;
}

.ai-chat-input-row input {
    flex: 1;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid #e8e8e6;
    border-radius: 12px;
    color: #1a1a1a;
    font-family: 'DM Sans', sans-serif;
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-chat-input-row input:focus {
    border-color: #d06040;
    box-shadow: 0 0 0 2px rgba(208, 96, 64, 0.08);
}

.ai-chat-input-row input::placeholder {
    color: #c8c6c3;
}

.ai-chat-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
    margin: 0;
}

.ai-chat-send-btn:hover {
    background: #d06040;
}

.ai-chat-send-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================================================
   Chat Header — Mode indicator + Settings
   ============================================================================ */

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid #ededed;
    background: #fafaf9;
    flex-shrink: 0;
    position: relative;
}

/* Mode indicator */
.ai-mode-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ai-mode-dot.mock {
    background: #d0cfcc;
}

.ai-mode-dot.api {
    background: #4caf50;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
}

.ai-mode-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #a09e9a;
    letter-spacing: 0.03em;
}

/* Settings button */
.ai-settings-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #b3b3b3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: all 0.15s;
}

.ai-settings-btn:hover {
    background: #f0efed;
    color: #666;
}

/* Settings dropdown */
.ai-settings-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #ededed;
    padding: 12px 14px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ai-settings-dropdown.open {
    display: block;
}

.ai-settings-row {
    margin-bottom: 8px;
}

.ai-settings-row label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #8c8c8c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
}

.ai-key-input-wrap {
    display: flex;
    gap: 4px;
}

.ai-key-input {
    flex: 1;
    padding: 7px 10px;
    background: #f7f7f5;
    border: 1px solid #e8e8e6;
    border-radius: 8px;
    color: #1a1a1a;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    outline: none;
    transition: border-color 0.15s;
    -webkit-text-security: disc;
}

.ai-key-input:focus {
    border-color: #d06040;
}

.ai-key-input::placeholder {
    color: #ccc;
}

.ai-key-toggle {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #e8e8e6;
    background: #f7f7f5;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.ai-key-toggle:hover {
    background: #f0efed;
    color: #666;
}

.ai-settings-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.ai-settings-actions button {
    flex: 1;
    padding: 6px 0;
    border-radius: 6px;
    border: 1px solid #e8e8e6;
    background: #f7f7f5;
    color: #666;
    cursor: pointer;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.15s;
    margin: 0;
}

.ai-settings-actions .ai-key-save {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.ai-settings-actions .ai-key-save:hover {
    background: #d06040;
    border-color: #d06040;
}

.ai-settings-actions .ai-key-clear:hover {
    background: #f0efed;
}

.ai-settings-hint {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px;
    color: #c8c6c3;
    line-height: 1.4;
    margin: 0;
}

/* System bubble */
.ai-bubble-system {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: #b3b3b3;
    text-align: center;
    padding: 4px 0;
    align-self: center;
}
