*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;font-family:Inter,Tajawal,system-ui,sans-serif}
button,input{font:inherit}
button{cursor:pointer}

/* Standalone premium assistant workspace */
:root{--sibf-primary:#ef7b3b;--sibf-primary-dark:#d65f22;--sibf-background:#faf9f7;--sibf-border:#e9e9ed;--sibf-text:#202431;--sibf-muted:#747b89}
body{background:#f7f7fa;color:var(--sibf-text);overflow:hidden}
.ai-page{padding:0;width:100%;height:100dvh}
.assistant-workspace{max-width:none;gap:0;grid-template-columns:294px minmax(0,1fr);height:100dvh;background:#fff}
.assistant-workspace.history-collapsed{grid-template-columns:minmax(0,1fr)}
.history-panel{height:100dvh;min-height:0;border:0;border-inline-end:1px solid #e9e9ed;border-radius:0;background:#f8f9fc}
.history-heading{padding:30px 22px 12px}
.history-heading h2{font-size:1.05rem}
.history-description{padding:0 22px 20px}
.history-new{margin:0 18px 22px;border-radius:13px;background:#222b3d;padding:14px}
.history-new:hover{background:#36445d}
.history-search{background:#fff;border-radius:12px}
.history-item{padding:14px 12px}
.history-item[aria-current=true]{background:#fff1e7;border-color:#f9d6c1}
.history-footnote{background:#f4f5f8}
.assistant-workspace .chat-container{height:100dvh;min-height:0;border:0;border-radius:0;box-shadow:none}
.chat-header{padding:17px 30px;background:rgba(255,255,255,.98);min-height:88px}
.assistant-icon{border-radius:15px;width:48px;height:48px;min-width:48px;overflow:hidden;box-shadow:0 6px 16px rgba(239,123,59,.18)}
.assistant-icon img{width:34px;height:34px;object-fit:contain}
.assistant-icon i{display:none}
.header-title{font-size:1.12rem;letter-spacing:-.02em}
.header-subtitle{font-size:.79rem}
.status-wrapper{padding:7px 12px;border:1px solid #dcefe4;background:#f1fbf5;border-radius:30px}
.history-toggle{border:0;background:#f4f5f7;padding:10px;border-radius:12px}
.chat-context-title{background:#fff;border-color:#f0f0f2;padding:10px 32px}
.chat-box{padding:36px clamp(18px,5vw,75px);background:radial-gradient(ellipse at 50% 0%,#fff9f5 0%,#fbfaf9 43%,#fafafa 100%)}
.welcome-panel{margin:clamp(16px,6vh,70px) auto 28px}
.welcome-icon{width:76px;height:76px;border-radius:23px;background:linear-gradient(145deg,#ffac6b,#ed6f30);color:white;box-shadow:0 15px 35px rgba(239,123,59,.19)}
.welcome-title{font-size:clamp(1.4rem,2.5vw,2.1rem);letter-spacing:-.03em}
.welcome-text{font-size:.98rem}
.suggestions{max-width:820px}
.suggestion-grid{gap:12px}
.prompt-chip{border-radius:15px;min-height:62px;box-shadow:0 3px 12px rgba(25,30,45,.025)}
.prompt-chip:hover{background:#fffaf6;transform:translateY(-2px)}
.chat-message{max-width:930px;margin-inline:auto;margin-bottom:20px}
.chat-bubble{max-width:min(85%,770px);border-radius:18px;padding:15px 19px}
.chat-message.user .chat-bubble{background:linear-gradient(135deg,#f68a49,#e97131)}
.chat-message.ai .chat-bubble{box-shadow:0 3px 16px rgba(22,28,39,.035)}
.chat-footer{padding:17px clamp(18px,5vw,75px) 15px;border-top:1px solid #ededf0;box-shadow:0 -7px 28px rgba(30,30,40,.025)}
.chat-input{max-width:930px;margin:auto;gap:12px}
#promptInput{height:56px;border-radius:17px;padding:14px 20px;background:#fafafa;font-size:.95rem}
#sendBtn{height:54px;width:54px;min-width:54px;border-radius:16px;font-size:21px}
.input-hint{margin-top:10px}
[dir="rtl"] .chat-message.user{justify-content:flex-start}
[dir="rtl"] .chat-message.ai{justify-content:flex-end}
@media(max-width:1024px){
 body{overflow:auto}
 .assistant-workspace{display:block;position:relative;height:100dvh}
 .history-panel{position:absolute;z-index:20;inset-block:0;inset-inline-start:0;width:min(86vw,320px);height:100dvh;max-height:none;box-shadow:8px 0 35px rgba(0,0,0,.12)}
 .assistant-workspace.history-collapsed .history-panel{display:none}
 .assistant-workspace .chat-container{height:100dvh;min-height:0}
 .chat-header{padding:12px 16px;min-height:74px}
 .chat-box{padding:20px 14px}
 .chat-footer{padding:12px 14px}
 .welcome-panel{margin:22px auto}
 .suggestion-grid{grid-template-columns:1fr}
 .chat-bubble{max-width:90%}
 .status-wrapper{display:none}
}
@media(max-width:480px){.header-subtitle{font-size:.7rem}.header-title{font-size:.95rem}.assistant-icon{width:40px;height:40px;min-width:40px}.chat-context-title{padding:8px 17px}}
/* SIBF brand palette: consistent with the existing SIBF assistant orange identity. */
:root{--sibf-primary:#f67937;--sibf-primary-dark:#dd5f21;--sibf-background:#fffaf6;--sibf-border:#eedfd4;--sibf-text:#292522;--sibf-muted:#786c65;--sibf-ai-bg:#ffffff}
body{background:#fff9f4}
.history-panel{background:#fff7f0;border-inline-end:1px solid #f1ddcc}
.history-new{background:#f67937;color:#fff}
.history-new:hover{background:#dd5f21}
.history-item[aria-current=true]{background:#ffeadb;border-color:#f3bc98}
.history-footnote{background:#fff1e6}
.chat-header{border-bottom-color:#f0e2d8}
.history-toggle{background:#fff2e8;color:#a84f1b}
.chat-context-title{background:#fffaf6;border-color:#f4e2d4}
.chat-box{background:radial-gradient(ellipse at 50% 0%,#fff3e8 0%,#fffaf6 48%,#fff 100%)}
.welcome-icon{background:linear-gradient(145deg,#ff9c59,#f67937)}
.prompt-chip:hover{background:#fff4e9;border-color:#f67937}
.chat-message.user .chat-bubble{background:linear-gradient(135deg,#f78d4c,#e9682b)}
.chat-footer{border-top-color:#f0e2d8}
#promptInput{background:#fffcf9}
#sendBtn{background:#f67937}
#sendBtn:hover:not(:disabled){background:#dd5f21}

/* Standalone SIBF navigation */
.sibf-top-actions{display:flex;align-items:center;gap:10px;margin-inline-start:auto}
.sibf-nav-link,.sibf-settings-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;border:1px solid #f0ddce;border-radius:12px;background:#fffaf6;color:#8e421c;text-decoration:none;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer}
.sibf-nav-link:hover,.sibf-settings-toggle:hover{background:#fff0e2;color:#b14e1d}
.sibf-nav-link i,.sibf-settings-toggle i{font-size:20px}
.sibf-settings{position:relative}
.sibf-settings-menu{display:none;position:absolute;inset-block-start:calc(100% + 10px);inset-inline-end:0;z-index:60;width:205px;background:white;border:1px solid #f0ddce;border-radius:14px;padding:7px;box-shadow:0 14px 38px rgba(62,38,20,.15)}
.sibf-settings.is-open .sibf-settings-menu{display:block}
.sibf-menu-item{display:flex;align-items:center;gap:11px;width:100%;padding:12px;border:0;border-radius:9px;background:transparent;color:#46352b;text-decoration:none;text-align:start;font:inherit;font-size:.9rem;cursor:pointer}
.sibf-menu-item:hover{background:#fff2e8;color:#b14e1d}
.sibf-menu-item i{font-size:19px;color:#e36d30}
.sibf-menu-divider{height:1px;background:#f2e7df;margin:6px 4px}
@media(max-width:600px){.sibf-nav-label{display:none}.sibf-nav-link,.sibf-settings-toggle{width:42px;padding:8px}.sibf-top-actions{gap:6px}.sibf-settings-menu{width:185px}}

:root {
        --sibf-primary: #f67937;
        --sibf-primary-dark: #dd5f21;
        --sibf-background: #f6f7f9;
        --sibf-border: #e5e7eb;
        --sibf-text: #222;
        --sibf-muted: #6b7280;
        --sibf-ai-bg: #ffffff;
    }

    .ai-page {
        width: 100%;
        padding: 20px 12px;
    }

    .chat-container {
        width: 100%;
        max-width: 1050px;
        height: calc(100vh - 160px);
        min-height: 620px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid var(--sibf-border);
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    }

    /* Header */
    .chat-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 18px 22px;
        border-bottom: 1px solid var(--sibf-border);
        background: #fff;
    }

    .assistant-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--sibf-primary);
        color: #fff;
        font-size: 23px;
    }

    .header-content {
        flex: 1;
    }

    .header-title {
        margin: 0;
        color: var(--sibf-text);
        font-size: 1.1rem;
        font-weight: 700;
    }

    .header-subtitle {
        margin: 3px 0 0;
        color: var(--sibf-muted);
        font-size: .85rem;
    }

    .status-wrapper {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #16a34a;
        font-size: .8rem;
        white-space: nowrap;
    }

    .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #22c55e;
    }

    /* Chat body */
    .chat-box {
        flex: 1;
        overflow-y: auto;
        padding: 22px;
        background: var(--sibf-background);
        scroll-behavior: smooth;
    }

    .welcome-panel {
        max-width: 720px;
        margin: 15px auto 25px;
        text-align: center;
    }

    .welcome-icon {
        width: 68px;
        height: 68px;
        margin: 0 auto 12px;
        border-radius: 50%;
        background: rgba(246, 121, 55, .12);
        color: var(--sibf-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 31px;
    }

    .welcome-title {
        margin-bottom: 7px;
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--sibf-text);
    }

    .welcome-text {
        max-width: 610px;
        margin: auto;
        line-height: 1.6;
        color: var(--sibf-muted);
        font-size: .95rem;
    }

    /* Suggestions */
    .suggestions {
        max-width: 800px;
        margin: 20px auto;
    }

    .suggestions-title {
        text-align: center;
        margin-bottom: 12px;
        color: var(--sibf-muted);
        font-size: .85rem;
        font-weight: 600;
    }

    .suggestion-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .prompt-chip {
        width: 100%;
        padding: 13px 15px;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: start;
        background: #fff;
        border: 1px solid var(--sibf-border);
        border-radius: 12px;
        color: #374151;
        cursor: pointer;
        font-size: .9rem;
        transition: .2s ease;
    }

        .prompt-chip:hover {
            transform: translateY(-1px);
            border-color: var(--sibf-primary);
            box-shadow: 0 4px 12px rgba(246, 121, 55, .1);
            color: var(--sibf-primary);
        }

        .prompt-chip i {
            width: 22px;
            color: var(--sibf-primary);
            font-size: 18px;
        }

    /* Messages */
    .chat-message {
        display: flex;
        margin-bottom: 16px;
        animation: messageIn .2s ease;
    }

        .chat-message.user {
            justify-content: flex-end;
        }

        .chat-message.ai {
            justify-content: flex-start;
        }

    .chat-bubble {
        max-width: min(78%, 760px);
        padding: 12px 16px;
        border-radius: 16px;
        line-height: 1.55;
        font-size: .94rem;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }

    .chat-message.user .chat-bubble {
        color: #fff;
        background: var(--sibf-primary);
        border-bottom-right-radius: 5px;
    }

    [dir="rtl"] .chat-message.user .chat-bubble {
        border-bottom-right-radius: 16px;
        border-bottom-left-radius: 5px;
    }

    .chat-message.ai .chat-bubble {
        color: #374151;
        background: var(--sibf-ai-bg);
        border: 1px solid var(--sibf-border);
        border-bottom-left-radius: 5px;
    }

    [dir="rtl"] .chat-message.ai .chat-bubble {
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 5px;
    }

    .chat-bubble p:last-child {
        margin-bottom: 0;
    }

    .chat-bubble ul,
    .chat-bubble ol {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .chat-bubble table {
        width: 100%;
        margin: 10px 0;
        border-collapse: collapse;
        overflow-x: auto;
        display: block;
    }

    .chat-bubble th,
    .chat-bubble td {
        padding: 7px 9px;
        border: 1px solid #ddd;
        white-space: nowrap;
    }

    .chat-bubble a {
        color: var(--sibf-primary);
    }

    .chat-bubble code {
        padding: 2px 5px;
        border-radius: 4px;
        background: #f3f4f6;
    }

    /* Typing */
    .typing-row {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 10px 0 4px;
        color: var(--sibf-muted);
        font-size: .85rem;
    }

    .typing-dots {
        display: inline-flex;
        gap: 4px;
    }

        .typing-dots span {
            width: 6px;
            height: 6px;
            background: #9ca3af;
            border-radius: 50%;
            animation: typing 1.2s infinite ease-in-out;
        }

            .typing-dots span:nth-child(2) {
                animation-delay: .15s;
            }

            .typing-dots span:nth-child(3) {
                animation-delay: .3s;
            }

    /* Input */
    .chat-footer {
        padding: 13px 18px 15px;
        background: #fff;
        border-top: 1px solid var(--sibf-border);
    }

    .chat-input {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .prompt-wrapper {
        position: relative;
        flex: 1;
    }

    #promptInput {
        width: 100%;
        height: 48px;
        padding: 10px 15px;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        box-shadow: none;
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

        #promptInput:focus {
            border-color: var(--sibf-primary);
            box-shadow: 0 0 0 3px rgba(246, 121, 55, .12);
        }

        #promptInput:disabled {
            background: #f9fafb;
            cursor: not-allowed;
        }

    #sendBtn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: var(--sibf-primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: .2s ease;
    }

        #sendBtn:hover:not(:disabled) {
            background: var(--sibf-primary-dark);
        }

        #sendBtn:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

    .input-hint {
        margin-top: 7px;
        text-align: center;
        color: #9ca3af;
        font-size: .72rem;
    }

    .error-text {
        color: #dc2626;
    }

    .d-none {
        display: none !important;
    }

    @keyframes messageIn {
        from {
            opacity: 0;
            transform: translateY(5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes typing {
        0%, 60%, 100% {
            transform: translateY(0);
            opacity: .4;
        }

        30% {
            transform: translateY(-4px);
            opacity: 1;
        }
    }

    @media (max-width: 768px) {
        .ai-page {
            padding: 5px;
        }

        .chat-container {
            height: calc(100vh - 95px);
            min-height: 540px;
            border-radius: 12px;
        }

        .chat-header {
            padding: 13px 14px;
        }

        .assistant-icon {
            width: 42px;
            height: 42px;
            min-width: 42px;
        }

            .assistant-icon a {
                width: 100%;
                height: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                color: #fff;
                font-size: 23px;
                text-decoration: none; /* Removes any default underline */
            }
        .status-wrapper {
            display: none;
        }

        .chat-box {
            padding: 15px 12px;
        }

        .suggestion-grid {
            grid-template-columns: 1fr;
        }

        .chat-bubble {
            max-width: 88%;
        }

        .chat-footer {
            padding: 10px;
        }
    }

    /* Chat history: page-local conversations, ready for a future server history source. */
    .assistant-workspace { display:grid; grid-template-columns:270px minmax(0,1fr); gap:18px; max-width:1400px; margin:0 auto; align-items:stretch; }
    .assistant-workspace.history-collapsed { grid-template-columns:minmax(0,1fr); }
    .assistant-workspace.history-collapsed .history-panel { display:none; }
    .assistant-workspace .chat-container { max-width:none; min-width:0; margin:0; }
    .history-panel { display:flex; flex-direction:column; min-width:0; height:calc(100vh - 160px); min-height:620px; background:#fff; border:1px solid var(--sibf-border); border-radius:18px; overflow:hidden; }
    .history-heading { display:flex; align-items:center; gap:9px; padding:22px 18px 8px; }
    .history-heading i { color:var(--sibf-primary-dark); font-size:22px; }
    .history-heading h2 { font-size:1rem; font-weight:700; margin:0; flex:1; }
    .history-count { border-radius:20px; padding:2px 8px; background:#fff0e6; color:#9e490f; font-size:.78rem; }
    .history-description { margin:0; padding:0 18px 18px; font-size:.82rem; color:var(--sibf-muted); line-height:1.6; }
    .history-new { margin:0 16px 16px; padding:11px 14px; border:0; border-radius:10px; background:var(--sibf-primary); color:#fff; font:inherit; font-weight:600; display:flex; align-items:center; justify-content:center; gap:8px; cursor:pointer; }
    .history-search { display:flex; align-items:center; gap:8px; margin:0 16px 18px; padding:10px; border:1px solid #e1e5eb; border-radius:9px; color:var(--sibf-muted); }
    .history-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; font:inherit; font-size:.85rem; color:var(--sibf-text); }
    .history-search:focus-within { outline:2px solid var(--sibf-primary); outline-offset:2px; }
    .history-list { flex:1; min-height:0; overflow-y:auto; padding:0 10px 14px; }
    .history-group { padding:0 9px 10px; margin:0; color:var(--sibf-muted); font-size:.75rem; font-weight:600; }
    .history-item { display:block; width:100%; text-align:start; background:transparent; border:1px solid transparent; border-radius:11px; padding:12px 10px; margin-bottom:7px; cursor:pointer; color:var(--sibf-text); font:inherit; }
    .history-item:hover { background:#f7f8fa; }
    .history-item[aria-current=true] { background:#fff3e9; border-color:#f9d4b8; }
    .history-title { display:block; font-size:.86rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .history-preview { display:block; margin-top:5px; font-size:.77rem; color:var(--sibf-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .history-time { display:block; font-size:.71rem; color:#7a8290; margin-top:7px; }
    .history-empty { text-align:center; padding:28px 14px; color:var(--sibf-muted); font-size:.85rem; line-height:1.7; }
    .history-empty i { display:block; font-size:30px; margin-bottom:12px; color:#c8cfd8; }
    .history-footnote { border-top:1px solid var(--sibf-border); padding:14px 16px; font-size:.76rem; line-height:1.6; color:var(--sibf-muted); background:#fafbfc; }
    .history-toggle { background:#fff; border:1px solid var(--sibf-border); color:#596373; border-radius:9px; padding:9px 11px; cursor:pointer; font-size:20px; }
    .history-item:focus-visible,.history-new:focus-visible,.history-toggle:focus-visible { outline:2px solid #bc560f; outline-offset:2px; }
    .history-panel button:disabled { opacity:.55; cursor:wait; }
    .chat-context-title { display:flex; align-items:center; gap:8px; padding:9px 22px; background:#fffaf6; border-bottom:1px solid #f5e8dd; font-size:.79rem; color:#856046; }
    #activeChatTitle { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .history-live-status { font-size:.8rem; color:var(--sibf-muted); padding:0 18px; }
    .history-live-status:empty { display:none; }
    @media(max-width:1024px) {
        .assistant-workspace { grid-template-columns:minmax(0,1fr); gap:12px; }
        .history-panel { height:auto; min-height:0; max-height:380px; }
        .history-list { min-height:80px; max-height:180px; }
        .history-heading { padding-top:15px; }
        .history-description { padding-bottom:10px; }
        .assistant-workspace .chat-header { flex-wrap:wrap; }
        .assistant-workspace .header-content { min-width:120px; }
    }


/* Responsive overrides: intentionally last so they supersede legacy styles. */
*,*::before,*::after{box-sizing:border-box}
html,body{width:100%;min-width:0;margin:0;overflow-x:hidden}
.ai-page{width:100%;max-width:none;padding:0;margin:0}
.assistant-workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:0;max-width:none;width:100%;height:100vh;height:100dvh;min-height:0;margin:0;overflow:hidden}
.assistant-workspace.history-collapsed{grid-template-columns:minmax(0,1fr)}
.history-panel{height:100%;min-height:0;max-height:none;border-radius:0;border:0;border-inline-end:1px solid #f0e2d8;overflow:hidden}
.assistant-workspace .chat-container{width:100%;max-width:none;min-width:0;height:100%;min-height:0;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;overflow:hidden}
.chat-header{flex:0 0 auto;min-width:0;flex-wrap:nowrap;gap:10px;padding:12px 18px}
.header-content{min-width:0;flex:1 1 auto}
.header-title,.header-subtitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sibf-top-actions{flex:0 0 auto;margin-inline-start:0}
.chat-box{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.chat-footer{flex:0 0 auto;padding:12px clamp(12px,3vw,36px) max(12px,env(safe-area-inset-bottom));}
.chat-input,.prompt-wrapper{min-width:0}
#promptInput{min-width:0;font-size:16px}
.chat-bubble{max-width:min(84%,760px)}
.suggestion-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.prompt-chip{min-width:0;overflow-wrap:anywhere}
.mobile-history-backdrop{display:none}
@media(max-width:1024px){
 .assistant-workspace,.assistant-workspace.history-collapsed{display:block;position:relative;height:100vh;height:100dvh;overflow:hidden}
 .assistant-workspace .chat-container{height:100%;min-height:0}
 .history-panel{position:fixed;z-index:1001;inset-block:0;inset-inline-start:0;width:min(82vw,340px);height:100vh;height:100dvh;max-height:none;box-shadow:0 12px 48px rgba(32,20,12,.22);transition:transform .2s ease;}
 .assistant-workspace.history-collapsed .history-panel{display:none}
 .mobile-history-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(26,20,17,.48);border:0;cursor:pointer}
 .assistant-workspace:not(.history-collapsed) .mobile-history-backdrop{display:block}
 .history-list{max-height:none;min-height:0;flex:1}
 .chat-header{flex-wrap:nowrap}
 .status-wrapper{display:none}
}
@media(max-width:600px){
 .chat-header{padding:10px 12px;gap:8px}
 .assistant-icon{width:38px;height:38px;min-width:38px}
 .header-title{font-size:.92rem}
 .header-subtitle{font-size:.7rem}
 .history-toggle{padding:8px;min-width:38px;min-height:40px}
 .sibf-nav-label{display:none}
 .sibf-nav-link,.sibf-settings-toggle{min-height:40px;width:40px;padding:8px;gap:0}
 .sibf-settings-toggle .ti-chevron-down{display:none}
 .sibf-top-actions{gap:5px}
 .sibf-settings-menu{width:min(220px,calc(100vw - 24px));max-height:70dvh;overflow-y:auto}
 .chat-context-title{padding:7px 12px}
 .chat-box{padding:15px 12px}
 .welcome-panel{margin:12px auto 18px}
 .welcome-icon{width:54px;height:54px;font-size:25px}
 .welcome-title{font-size:1.2rem}
 .welcome-text{font-size:.87rem}
 .suggestions{margin:14px auto}
 .suggestion-grid{grid-template-columns:1fr;gap:8px}
 .prompt-chip{padding:11px 12px;font-size:.84rem}
 .chat-bubble{max-width:92%;font-size:.9rem;padding:11px 13px}
 .chat-footer{padding:10px 10px max(10px,env(safe-area-inset-bottom))}
 #promptInput{height:46px}
 #sendBtn{height:46px;width:46px;min-width:46px}
 .input-hint{font-size:.67rem}
}
@media(max-width:360px){
 .header-subtitle{display:none}
 .assistant-icon{width:32px;height:32px;min-width:32px}
 .chat-header{gap:5px;padding-inline:7px}
 .sibf-nav-link,.sibf-settings-toggle{width:36px;min-height:36px}
 .history-toggle{min-width:34px;padding:6px}
 .chat-box{padding-inline:8px}
}
@media(max-height:550px){.welcome-icon{width:44px;height:44px}.welcome-panel{margin:5px auto 12px}.suggestions{margin:10px auto}.chat-footer{padding-top:7px}.input-hint{display:none}}
@media(prefers-reduced-motion:reduce){.history-panel{transition:none}}
