body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0B0F19;
    color: #F9FAFB;
}
.code-font {
    font-family: 'JetBrains Mono', monospace;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #111827;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4F46E5;
}
.glass-panel {
    background: rgba(17, 24, 39, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.glow-badge {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
}
.tab-btn.active {
    background: #4F46E5;
    color: #FFFFFF;
    font-weight: 600;
}
/* Mobile / in-app (Untrap Android WebView) layout */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .kf-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px !important; }
    .kf-header-actions { width: 100%; justify-content: space-between; gap: 8px !important; }
    .kf-header-actions > div:last-child { margin-left: auto; }
    .kf-layout { flex-direction: column !important; overflow: visible !important; }
    .kf-sidebar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        flex-direction: row !important;
        padding: 8px 8px !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
        border-right: none !important;
        border-bottom: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
        background: rgba(11, 15, 25, 0.95) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
        z-index: 40 !important;
    }
    .kf-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        width: 100% !important;
        padding: 2px 4px !important;
        touch-action: pan-x !important;
    }
    .kf-nav::-webkit-scrollbar { display: none !important; }
    .kf-nav > * + * { margin-top: 0 !important; }
    .kf-nav .tab-btn {
        width: auto !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 8px 12px !important;
        gap: 6px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
        background: rgba(31, 41, 55, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        display: inline-flex !important;
        align-items: center !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    .kf-nav .tab-btn.active {
        background: #4F46E5 !important;
        color: #FFFFFF !important;
        font-weight: 600 !important;
        border-color: rgba(99, 102, 241, 0.6) !important;
        box-shadow: 0 0 12px rgba(79, 70, 229, 0.45) !important;
    }
    .kf-side-footer { display: none !important; }
    .kf-main {
        padding: 12px !important;
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 12px)) !important;
        overflow: visible !important;
        min-width: 0 !important;
    }
    .kf-main > * + * { margin-top: 14px !important; }
    #tab-dashboard .grid { gap: 10px !important; }
    #tab-models table thead { display: none; }
    #tab-models table, #tab-models tbody, #tab-models tr.kf-model-row, #tab-models tr.kf-model-row > td { display: block; width: 100%; }
    #tab-models tr.kf-model-row { padding: 10px 12px; }
    #tab-models tr.kf-model-row > td { padding: 3px 0 !important; text-align: left !important; }
    #tab-models tr.kf-model-row > td[data-label]::before {
        content: attr(data-label); display: inline-block; min-width: 96px; font-size: 10px;
        color: #6b7280; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle;
    }
    #tab-models tr.kf-model-row > td:first-child::before { display: none; }
    #tab-models .kf-row-actions > div { justify-content: flex-start !important; padding-top: 6px; }
    canvas { max-width: 100% !important; }
}
