    .kdc-wrapper {
        --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
        display: flex;
        justify-content: center;
        padding: clamp(0px, 5vw, 0px) 20px;
    }

    .kdc-panel {
        position: relative;                
        width: 100%;
        max-width: 1200px;
        border-radius: 28px;
        padding: clamp(28px, 5vw, 56px);
    }
    
    #bgCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.5; z-index: 0; }
    .kdc-content { position: relative; z-index: 1; }

    /* ---------- CONTROL BAR & MODE TABS ---------- */
    .kdc-control-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 18px;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
        flex-wrap: wrap;
        gap: 12px;
    }
    .kdc-cb-left { display: flex; align-items: center; gap: 10px; }
    .kdc-cb-right { display: flex; align-items: center; gap: 10px; }

    .mode-tabs {
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        padding: 4px;
        border-radius: 14px;
    }
    .mode-tab-btn {
        background: transparent;
        border: none;
        padding: 8px 16px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 700;
        color: var(--text-muted);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: 0.2s;
    }
    .mode-tab-btn:hover { color: var(--text-main); }
    .mode-tab-btn.active {
        background: var(--primary-light);
        color: var(--primary-color);
    }

    /* Custom Dropdown (GeoService) */
    .custom-dropdown { position: relative; }
    .cd-header {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 8px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--text-main);
        transition: 0.2s;
        user-select: none;
        gap: 8px;
    }
    .cd-header:hover { border-color: var(--primary-color); }
    .cd-current { display: flex; align-items: center; gap: 8px; }
    .cd-chevron { transition: transform 0.25s ease; color: var(--text-muted); }
    .custom-dropdown.active .cd-chevron { transform: rotate(180deg); }
    
    .cd-body {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        min-width: 200px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 100;
        overflow: hidden;
    }
    .custom-dropdown.active .cd-body {
        display: flex;
        flex-direction: column;
        animation: slideInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .cd-search { padding: 8px 10px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
    .cd-search input {
        width: 100%;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 6px 10px;
        font-size: 12px;
        color: var(--text-main);
        outline: none;
    }
    .cd-list { max-height: 200px; overflow-y: auto; padding: 6px; }
    .cd-group-label { font-size: 11px; font-weight: 800; color: var(--text-muted); padding: 4px 8px; text-transform: uppercase; letter-spacing: 0.5px; }
    .cd-divider { height: 1px; background: var(--border-color); margin: 4px 0; }
    .cd-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 7px 10px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-main);
        cursor: pointer;
        transition: 0.15s;
    }
    .cd-item:hover { background: var(--primary-light); color: var(--primary-color); }
    .cd-item.selected { background: var(--primary-light); color: var(--primary-color); font-weight: 800; }
    .cd-code { font-size: 10.5px; font-family: 'Space Mono', monospace; opacity: 0.6; font-weight: 700; }

    /* RTL / LTR Toggle Button */
    .btn-icon-toggle {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 8px 12px;
        font-size: 12.5px;
        font-weight: 800;
        color: var(--text-muted);
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: 0.2s;
    }
    .btn-icon-toggle:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* ---------- INPUT AREA ---------- */
    .kdc-input-panel {
        background: var(--bg-body);
        border: 1px solid var(--border-color);
        border-radius: 24px;
        padding: 24px;
        transition: all 0.3s var(--ease-out);
        margin-bottom: 24px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.03);
    }
    .kdc-input-panel:focus-within { border-color: var(--primary-color); box-shadow: 0 12px 40px var(--primary-shadow); }
    
    .ip-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
    .ip-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; color: var(--text-main); }
    .ip-meta { display: flex; gap: 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
    .ip-meta strong { color: var(--text-main); font-family: 'Space Mono', monospace; }
    .ip-actions { display: flex; gap: 8px; }
    .ip-btn { background: var(--card-bg); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
    .ip-btn:hover { background: var(--bg-body); color: var(--text-main); border-color: var(--primary-color); }
    .ip-btn.red:hover { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); }

    .ip-body { display: flex; gap: 16px; align-items: stretch; }
    @media (max-width: 768px) { .ip-body { flex-direction: column; } .ip-side { width: 100% !important; } }
    .ip-field { flex: 1; display: flex; flex-direction: column; }
    .ip-textarea { width: 100%; min-height: 160px; flex: 1; border: 1px solid var(--border-color); border-radius: 14px; background: var(--card-bg); padding: 16px; font-size: 15px; color: var(--text-main); resize: vertical; outline: none; font-family: inherit; line-height: 1.6; transition: 0.2s; }
    .ip-textarea::placeholder { color: var(--text-muted); opacity: 0.5; }
    .ip-textarea:focus { border-color: var(--primary-color); background: var(--bg-body); }
    
    .ip-side { width: 260px; display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
    .ip-kw-input { width: 100%; height: 50px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--card-bg); padding: 0 16px; font-size: 14.5px; color: var(--text-main); outline: none; font-family: 'Space Mono', monospace; font-weight: 500; transition: 0.2s; }
    .ip-kw-input:focus { border-color: var(--primary-color); background: var(--bg-body); }
    
    /* URL Mode Styling */
    .compare-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
    @media (max-width: 768px) { .compare-inputs { grid-template-columns: 1fr; } }
    .input-group { display: flex; flex-direction: column; gap: 8px; }
    .input-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--text-main); }
    .c-input { width: 100%; height: 52px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--card-bg); padding: 0 16px; font-size: 15px; color: var(--text-main); outline: none; transition: 0.2s; font-weight: 500; font-family: 'Space Mono', monospace; }
    .c-input:focus { border-color: var(--primary-color); background: var(--bg-body); }
    .input-wrap.required-border .c-input { border-color: rgba(239, 68, 68, 0.4); }
    .input-wrap.required-border .c-input:focus { border-color: var(--primary-color); }

    .analyze-btn {
        width: 100%; height: 52px; border-radius: 12px; border: none; color: #fff;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 800; cursor: pointer; transition: all 0.25s var(--ease-out);
    }
    .analyze-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 22px var(--primary-shadow); }
    .analyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    /* ---------- OPTIONS BAR ---------- */
    .options-bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; background: var(--bg-body); border: 1px solid var(--border-color); padding: 12px 24px; border-radius: 100px; margin: 0 auto 30px; max-width: fit-content; }
    .ob-label { font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .ob-sep { width: 1px; height: 20px; background: var(--border-color); }
    
    .filter-row { display: flex; gap: 4px; }
    .f-btn { background: transparent; border: none; padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
    .f-btn.active { background: var(--primary-light); color: var(--primary-color); }
    
    .sw { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
    .sw-track { width: 36px; height: 20px; background: var(--border-color); border-radius: 100px; position: relative; transition: 0.3s; }
    .sw-track.on { background: var(--primary-color); }
    .sw-thumb { width: 14px; height: 14px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
    .sw-track.on .sw-thumb { left: 19px; }
    .sw-lbl { font-size: 13px; font-weight: 700; color: var(--text-main); }

    /* ---------- HISTORY SECTION ---------- */
    .kdc-history-section { background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; margin-bottom: 30px; }
    .kdc-history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
    .kdc-history-title { font-size: 15px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin: 0; }
    .kdc-history-list { display: flex; flex-direction: column; gap: 10px; }
    .kdc-history-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; transition: 0.2s; gap: 12px; }
    .kdc-history-item:hover { border-color: var(--primary-color); transform: translateY(-1px); }
    .kdc-history-info { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; }
    .kdc-history-badge { font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; font-family: 'Space Mono', monospace; background: var(--primary-light); color: var(--primary-color); white-space: nowrap; }
    .kdc-history-url { font-size: 13.5px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .kdc-mode-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px; background: rgba(59, 130, 246, 0.1); color: #3b82f6; white-space: nowrap; }
    .kdc-history-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .kdc-history-score { font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 4px; font-family: 'Space Mono', monospace; background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .kdc-history-time { font-size: 12px; color: var(--text-muted); }
    .kdc-history-del { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; transition: 0.2s; display: flex; align-items: center; }
    .kdc-history-del:hover { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
    .kdc-btn-ghost { background: transparent; border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 16px; font-size: 13.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s; }
    .kdc-btn-ghost:hover { border-color: var(--primary-color); color: var(--primary-color); }

    /* ---------- LOADING STATE ---------- */
    .kdc-loading { text-align: center; padding: 40px 0; }
    .kdc-orb { width: 80px; height: 80px; border-radius: 50%; background: var(--bg-body); border: 2px solid var(--primary-light); margin: 0 auto 24px auto; display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-size: 32px; box-shadow: 0 0 0 16px var(--primary-light); transition: all 0.3s; animation: pulse 2s infinite ease-in-out; }
    
    .kdc-thinking-log { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin: 0 auto; }
    .kdc-thinking-log li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--text-muted); animation: slideInUp 0.4s ease forwards; }
    .kdc-thinking-log li.active { color: var(--text-main); font-weight: 700; }
    .kdc-thinking-log li.done { color: var(--text-muted); opacity: 0.6; }
    .kdc-log-dot { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
    .kdc-thinking-log li.active .kdc-log-dot { border-color: var(--primary-color); color: var(--primary-color); }
    .kdc-thinking-log li.done .kdc-log-dot { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

    /* ---------- RESULTS DASHBOARD ---------- */
    .kdc-result { animation: fadeIn 0.5s ease; }
    .kdc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
    
    /* Stats Row */
    .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
    .sc { background: var(--bg-body); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; }
    .sc-lbl { font-size: 13px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
    .sc-val { font-size: 26px; font-weight: 900; color: var(--text-main); font-family: 'Space Mono', monospace; line-height: 1.2; }
    
    /* Target Keyword Card & Goal Adjuster */
    .kw-result-card { background: var(--bg-body); border-radius: 20px; padding: 24px; border: 1px solid var(--border-color); margin-bottom: 24px; }
    .krc-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
    .krc-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light); color: var(--primary-color); display: flex; align-items: center; justify-content: center; }
    .krc-main { flex: 1; min-width: 200px; }
    .krc-kw { font-size: 22px; font-weight: 900; color: var(--text-main); line-height: 1.2; font-family: 'Space Mono', monospace; }
    .krc-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 4px; }
    .krc-metrics { display: flex; gap: 16px; background: var(--card-bg); padding: 12px 20px; border-radius: 12px; border: 1px solid var(--border-color); flex-wrap: wrap; }
    .krc-metric { display: flex; flex-direction: column; }
    .krc-m-val { font-size: 18px; font-weight: 800; color: var(--text-main); font-family: 'Space Mono', monospace; }
    .krc-m-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
    
    .density-meter-row { margin-top: 16px; }
    .dm-label-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
    .density-meter { height: 12px; background: var(--card-bg); border-radius: 100px; border: 1px solid var(--border-color); overflow: hidden; position: relative; margin-bottom: 8px; }
    .density-meter-fill { height: 100%; transition: 0.5s var(--ease-out); border-radius: 100px; }
    .dm-ticks { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; font-family: 'Space Mono', monospace; }
    .dm-status { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px; }
    .dm-status.good { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .dm-status.too-low { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .dm-status.high { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
    .dm-status.too-high { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

    /* Target Goal Adjuster */
    .target-adjuster-strip {
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px dashed var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 14px;
    }
    .tas-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .tas-label { font-size: 13px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
    .tas-pills { display: flex; gap: 6px; }
    .tas-pill {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        padding: 5px 12px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        color: var(--text-muted);
        cursor: pointer;
        transition: 0.2s;
    }
    .tas-pill:hover { color: var(--text-main); }
    .tas-pill.active { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
    .tas-advice {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13.5px;
        font-weight: 700;
        padding: 8px 14px;
        border-radius: 10px;
        max-width: 550px;
    }
    .tas-advice.add-more { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .tas-advice.remove-some { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
    .tas-advice.optimal { background: rgba(16, 185, 129, 0.1); color: #10b981; }

    /* Content Vitals Strip */
    .vitals-strip {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }
    .vital-item {
        background: var(--bg-body);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 14px;
    }
    .vi-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        flex-shrink: 0;
    }
    .vi-info { display: flex; flex-direction: column; gap: 2px; }
    .vi-val { font-size: 17px; font-weight: 800; color: var(--text-main); font-family: 'Space Mono', monospace; }
    .vi-lbl { font-size: 12px; font-weight: 700; color: var(--text-muted); }

    /* Insights Grid (Stuffing Risk & Semantic Clusters) */
    .insights-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }
    @media (max-width: 860px) { .insights-grid { grid-template-columns: 1fr; } }
    
    .insight-card {
        background: var(--bg-body);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    .ic-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
    .safety-tier-badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 100px; font-family: 'Space Mono', monospace; }
    .safety-tier-badge.safe { background: rgba(16, 185, 129, 0.1); color: #10b981; }
    .safety-tier-badge.mod { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
    .safety-tier-badge.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

    .safety-bar { width: 100%; height: 8px; background: var(--card-bg); border-radius: 100px; overflow: hidden; border: 1px solid var(--border-color); }
    .safety-bar-fill { height: 100%; transition: width 0.6s ease; border-radius: 100px; }
    
    .flagged-list { display: flex; flex-direction: column; gap: 6px; }
    .fl-title { font-size: 12px; font-weight: 700; color: #ef4444; display: flex; align-items: center; gap: 6px; }
    .fl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .fl-chip { font-size: 11.5px; font-weight: 700; background: rgba(239, 68, 68, 0.1); color: #ef4444; padding: 3px 8px; border-radius: 6px; font-family: 'Space Mono', monospace; }
    .safety-safe-msg { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; line-height: 1.5; }

    .cluster-sub-lbl { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
    .clusters-wrap { display: flex; flex-direction: column; gap: 10px; }
    .cluster-block { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
    .cb-main { font-size: 13px; font-weight: 800; color: var(--primary-color); font-family: 'Space Mono', monospace; }
    .cb-terms { display: flex; flex-wrap: wrap; gap: 6px; }
    .cb-term { font-size: 12px; font-weight: 600; background: var(--bg-body); color: var(--text-muted); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-color); }

    /* Visual ApexCharts Section */
    .b-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 24px; }
    .i-card { background: var(--bg-body); border-radius: 20px; padding: 24px; border: 1px solid var(--border-color); display: flex; flex-direction: column; }
    .ic-title { font-size: 13.5px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
    .chart-wrapper { position: relative; min-height: 250px; width: 100%; margin-top: auto; }
    
    /* ---------- KEYWORD DISTRIBUTION MAP (ORGANIZED & COMPACT) ---------- */
    .preview-section {
        background: var(--bg-body);
        border-radius: 20px;
        border: 1px solid var(--border-color);
        margin-bottom: 24px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    }
    .ps-header {
        padding: 16px 20px;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .ps-title-wrap { display: flex; align-items: center; gap: 10px; }
    .ps-icon { color: var(--primary-color); display: flex; align-items: center; }
    .ps-label { font-size: 14px; font-weight: 800; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.5px; }
    .ps-header-actions { display: flex; align-items: center; gap: 8px; }

    .kdm-legend-strip {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        overflow-x: auto;
        flex-wrap: wrap;
    }
    .kdm-legend-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        border: 1px solid transparent;
        white-space: nowrap;
    }
    .kdm-dot { width: 8px; height: 8px; border-radius: 50%; }
    .kdm-leg-word { font-family: 'Space Mono', monospace; font-weight: 800; }
    .kdm-leg-count { font-size: 11px; padding: 1px 6px; border-radius: 100px; font-family: 'Space Mono', monospace; font-weight: 800; }
    .kdm-leg-label { font-size: 11px; opacity: 0.7; }

    .kdm-legend-item.hl-focus { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: #ef4444; }
    .kdm-legend-item.hl-focus .kdm-dot { background: #ef4444; }
    .kdm-legend-item.hl-focus .kdm-leg-count { background: #ef4444; color: #fff; }

    .kdm-legend-item.hl-top1 { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); color: #3b82f6; }
    .kdm-legend-item.hl-top1 .kdm-dot { background: #3b82f6; }
    .kdm-legend-item.hl-top1 .kdm-leg-count { background: #3b82f6; color: #fff; }

    .kdm-legend-item.hl-top2 { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); color: #a855f7; }
    .kdm-legend-item.hl-top2 .kdm-dot { background: #a855f7; }
    .kdm-legend-item.hl-top2 .kdm-leg-count { background: #a855f7; color: #fff; }

    .kdm-legend-item.hl-top3 { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); color: #10b981; }
    .kdm-legend-item.hl-top3 .kdm-dot { background: #10b981; }
    .kdm-legend-item.hl-top3 .kdm-leg-count { background: #10b981; color: #fff; }

    .ps-body {
        padding: 20px 24px;
        font-size: 14.5px;
        line-height: 1.75;
        color: var(--text-main);
        max-height: 320px;
        overflow-y: auto;
        word-break: break-word;
        background: var(--bg-body);
    }
    .kdm-para {
        margin: 0 0 14px 0;
        text-align: justify;
        line-height: 1.75;
    }
    .kdm-para:last-child { margin-bottom: 0; }
    .kdm-truncated {
        margin-top: 14px;
        padding: 10px 14px;
        background: var(--card-bg);
        border: 1px dashed var(--border-color);
        border-radius: 10px;
        font-size: 12.5px;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* Live Sandbox Editor */
    .live-editor-wrap { display: flex; flex-direction: column; background: var(--bg-body); }
    .live-editor-textarea {
        width: 100%;
        min-height: 220px;
        padding: 20px 24px;
        background: transparent;
        border: none;
        outline: none;
        font-family: inherit;
        font-size: 14.5px;
        line-height: 1.7;
        color: var(--text-main);
        resize: vertical;
    }
    .live-editor-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        background: var(--card-bg);
        border-top: 1px solid var(--border-color);
    }
    .leb-info { font-size: 12px; font-weight: 700; color: var(--text-muted); font-family: 'Space Mono', monospace; }

    /* Highlight badges */
    :deep(.kw-hl) {
        border-radius: 4px;
        padding: 2px 6px;
        font-weight: 700;
        font-family: inherit;
        display: inline;
        transition: all 0.2s ease;
    }
    :deep(.kw-hl.hl-focus) { background: rgba(239, 68, 68, 0.18); color: #ef4444; font-weight: 800; border-bottom: 1.5px solid rgba(239, 68, 68, 0.5); }
    :deep(.kw-hl.hl-top1) { background: rgba(59, 130, 246, 0.18); color: #3b82f6; border-bottom: 1.5px solid rgba(59, 130, 246, 0.5); }
    :deep(.kw-hl.hl-top2) { background: rgba(168, 85, 247, 0.18); color: #a855f7; border-bottom: 1.5px solid rgba(168, 85, 247, 0.5); }
    :deep(.kw-hl.hl-top3) { background: rgba(16, 185, 129, 0.18); color: #10b981; border-bottom: 1.5px solid rgba(16, 185, 129, 0.5); }

    /* ---------- CUSTOM CHECKBOX COMPONENT (ZERO NATIVE DEFAULT) ---------- */
    .custom-checkbox-wrap {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        position: relative;
        user-select: none;
        vertical-align: middle;
    }
    .custom-checkbox-input {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
        margin: 0;
        pointer-events: none;
    }
    .custom-checkbox-box {
        width: 18px;
        height: 18px;
        border-radius: 5px;
        background: var(--card-bg);
        border: 1.5px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    .custom-checkbox-wrap:hover .custom-checkbox-box {
        border-color: var(--primary-color);
    }
    .custom-checkbox-input:checked + .custom-checkbox-box {
        background: var(--primary-color);
        border-color: var(--primary-color);
        box-shadow: 0 2px 8px var(--primary-shadow);
    }
    .check-svg {
        width: 12px;
        height: 12px;
        stroke: #ffffff;
        stroke-dasharray: 24;
        stroke-dashoffset: 24;
        transition: stroke-dashoffset 0.2s ease-in-out;
    }
    .custom-checkbox-input:checked + .custom-checkbox-box .check-svg {
        stroke-dashoffset: 0;
    }

    /* Bulk Selection Bar */
    .kdc-bulk-bar {
        background: var(--bg-body);
        border: 1px solid var(--primary-color);
        border-radius: 14px;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 16px;
        animation: fadeIn 0.2s ease;
        flex-wrap: wrap;
        gap: 12px;
    }
    .kbb-count { font-size: 14px; font-weight: 800; color: var(--primary-color); }
    .kbb-right { display: flex; align-items: center; gap: 8px; }

    /* Results Table Section */
    .results-section { background: var(--bg-body); border-radius: 20px; border: 1px solid var(--border-color); overflow: hidden; }
    .results-header { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); background: var(--card-bg); flex-wrap: wrap; gap: 12px; }
    .rh-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .results-title { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0; }
    
    .filter-pills { display: flex; align-items: center; gap: 6px; background: var(--bg-body); padding: 4px; border-radius: 10px; border: 1px solid var(--border-color); }
    .fp-btn { background: transparent; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
    .fp-btn:hover { color: var(--text-main); }
    .fp-btn.active { background: var(--primary-light); color: var(--primary-color); }
    
    .status-pills .pill-ideal.active { background: rgba(16, 185, 129, 0.15); color: #10b981; }
    .status-pills .pill-low.active { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
    .status-pills .pill-high.active { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

    .table-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
    .dir-search-wrap { display: flex; align-items: center; gap: 6px; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 12px; }
    .dir-search-wrap input { background: transparent; border: none; outline: none; font-size: 12.5px; color: var(--text-main); width: 160px; }
    
    .act-btn { background: var(--card-bg); border: 1px solid var(--border-color); padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-main); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
    .act-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .act-btn.active { background: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }
    .act-btn.primary { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
    .act-btn.primary:hover { opacity: 0.9; }
    .act-btn.ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
    .act-btn.ghost:hover { color: var(--text-main); }

    .results-wrap { overflow-x: auto; }
    .data-table { width: 100%; border-collapse: collapse; text-align: left; }
    .data-table th { padding: 16px; font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); background: var(--card-bg); user-select: none; }
    .data-table th:hover { color: var(--text-main); }
    .data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-color); font-size: 14px; font-weight: 600; vertical-align: middle; }
    .data-table tr:hover td { background: rgba(0,0,0,0.015); }
    .dark-mode .data-table tr:hover td { background: rgba(255,255,255,0.02); }
    .data-table tr.row-selected td { background: var(--primary-light); }
    .data-table tr:last-child td { border-bottom: none; }
    
    .kw-cell { display: flex; align-items: center; gap: 10px; }
    .kw-word { color: var(--text-main); font-weight: 700; font-family: 'Space Mono', monospace; }
    .kw-target-chip { font-size: 10px; font-weight: 800; background: rgba(239, 68, 68, 0.1); color: #ef4444; padding: 2px 6px; border-radius: 4px; }
    .kw-copy-btn { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: 0.2s; display: inline-flex; align-items: center; }
    .kw-copy-btn:hover { color: var(--primary-color); border-color: var(--primary-color); }
    
    .dens-wrap { display: flex; align-items: center; gap: 10px; }
    .dens-track { width: 60px; height: 6px; background: var(--card-bg); border-radius: 10px; overflow: hidden; flex: 1; }
    .dens-fill { height: 100%; border-radius: 10px; }
    
    .dens-badge { font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; display: inline-block; font-family: 'Space Mono', monospace; }
    .dens-badge.low { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .dens-badge.good { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .dens-badge.high { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
    .dens-badge.ovr { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

    /* Advanced Table Pagination Controls */
    .table-pagination {
        padding: 16px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid var(--border-color);
        background: var(--card-bg);
        flex-wrap: wrap;
        gap: 16px;
    }
    .tp-info { font-size: 13px; font-weight: 700; color: var(--text-muted); }
    .tp-controls { display: flex; align-items: center; gap: 16px; }
    .page-size-selector { display: flex; align-items: center; gap: 8px; }
    .pss-label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
    .page-size-dropdown .cd-header { padding: 4px 10px; font-size: 12px; min-width: 60px; }
    .page-size-dropdown .cd-body { min-width: 90px; right: 0; left: auto; }
    .tp-pages { display: flex; align-items: center; gap: 8px; }
    .tp-indicator { font-size: 12.5px; font-weight: 700; color: var(--text-main); font-family: 'Space Mono', monospace; }
    .tp-btn { background: var(--bg-body); border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-main); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
    .tp-btn:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
    .tp-btn:disabled { opacity: 0.4; cursor: not-allowed; }

    /* RTL Mode Adjustments */
    .rtl-mode { direction: rtl; text-align: right; }
    .rtl-mode .kdc-cb-left, .rtl-mode .kdc-cb-right { flex-direction: row-reverse; }
    .rtl-mode .cd-body { right: auto; left: 0; }
    .rtl-mode .data-table { text-align: right; }
    .rtl-mode .tp-controls { flex-direction: row-reverse; }
    .rtl-mode .page-size-dropdown .cd-body { right: auto; left: 0; }
    .rtl-mode .tas-left { flex-direction: row-reverse; }
    .rtl-mode .vital-item { flex-direction: row-reverse; }

    /* ---------- BENTO BOX FEATURES ---------- */
    .console-features { margin-top: 40px; width: 100%; }
    .bento-features-cluster { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(130px, auto); gap: 20px; width: 100%; position: relative; z-index: 2; }
    .bento-card { background: rgba(255, 255, 255, 0.015); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; position: relative; overflow: hidden; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
    
    .bento-card::before {
        content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 150px; height: 150px; background-size: contain; background-repeat: no-repeat; background-position: center;
        opacity: 0.03; transition: all 0.5s ease; pointer-events: none; z-index: 0;
    }
    .bento-card:hover::before { opacity: 0.08; transform: translate(-50%, -50%) scale(1.1); }
    .dark-mode .bento-card::before { filter: invert(1); opacity: 0.05; }
    
    .feat-icon-target::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/></svg>'); }
    .feat-icon-hl::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>'); }
    .feat-icon-layers::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>'); }
    .feat-icon-filter::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 2 7 12 12 22 7 12 2"/><polyline points="2 17 12 22 22 17"/><polyline points="2 12 12 17 22 12"/></svg>'); }
    .feat-icon-dir::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 20V10"/><path d="M12 20V4"/><path d="M6 20v-6"/></svg>'); }
    .feat-icon-export::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>'); }

    .bento-card::after { content: ''; position: absolute; inset: 0; border-radius: 24px; background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%); pointer-events: none; }
    .bento-card:hover { transform: translateY(-4px) scale(1.01); border-color: var(--primary-color); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
    .bento-card-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; gap: 12px; }
    
    .dashed-ring-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; width: 44px; height: 44px; }
    .dashed-ring-wrapper::after { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 1px dashed var(--border-color); border-radius: 16px; opacity: 0.5; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); z-index: 0; transform-origin: center center; }
    .bento-card:hover .dashed-ring-wrapper::after { opacity: 1; transform: scale(1.1) rotate(180deg); border-color: var(--primary-color); }
    .bc-icon-wrapper { width: 44px; height: 44px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all 0.4s ease; margin-bottom: 0; position: relative; z-index: 1; }
    .bento-card:hover .bc-icon-wrapper { background: linear-gradient(135deg, var(--primary-color), var(--border-color)); color: white; border-color: transparent; transform: scale(1.1) rotate(4deg); }
    .bc-title { font-size: 16px; font-weight: 800; color: var(--text-main); margin: 0; }
    .bc-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; margin: 0; font-weight: 500; }
    
    @keyframes slideInDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 900px) {
        .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 600px) {
        .bento-features-cluster { grid-template-columns: 1fr; }
    }

    /* Zero-Inline Enhancements */
    .custom-dropdown.lang-dd { min-width: 170px; }
    .cd-current i { color: var(--primary-color); }
    .ip-label i { color: var(--primary-color); }
    .input-label i.text-info { color: var(--info, #3b82f6); }
    .input-label i.text-primary { color: var(--primary-color); }
    .url-input-block .analyze-btn { margin-top: 10px; }
    .kdc-history-title i { color: var(--primary-color); }
    .kdc-btn-ghost.btn-xs { padding: 4px 10px; font-size: 12px; }
    .kdc-btn-ghost.btn-xs i { width: 12px; height: 12px; }
    .kdc-history-del i { width: 14px; height: 14px; }
    .kdc-log-dot i.spinner { animation: spin 2s linear infinite; }
    .api-err { text-align: center; }
    .api-err .ae-icon-wrap { width: 64px; height: 64px; border-radius: 16px; background: rgba(239, 68, 68, 0.1); color: #ef4444; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
    .api-err .ae-icon-wrap i { width: 30px; height: 30px; }
    .api-err h3 { font-size: 24px; font-weight: 900; text-align: center; color: var(--text-main); margin-bottom: 12px; }
    .api-err p { font-size: 15px; color: var(--text-muted); line-height: 1.6; max-width: 500px; margin: 0 auto 24px; text-align: center; }
    .sc-lbl i.text-blue { color: #3b82f6; }
    .sc-lbl i.text-success { color: var(--success, #10b981); }
    .sc-lbl i.text-amber { color: #f59e0b; }
    .sc-lbl i.text-primary { color: var(--primary-color); }
    .sc-val.val-sm { font-size: 20px; word-break: break-all; }
    .krc-m-val.text-primary { color: var(--primary-color); }
    .dm-status i { width: 16px; height: 16px; }
    .tas-label i { width: 13px; height: 13px; }
    .vi-icon.vi-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .vi-icon.vi-purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
    .vi-icon.vi-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
    .vi-icon.vi-amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
    .ic-title i.text-primary { color: var(--primary-color); }
    .ic-title i.text-purple { color: #8b5cf6; }
    .ic-title i.text-blue { color: #3b82f6; }
    .ic-title i.text-green { color: #10b981; }
    .fl-title i { width: 12px; height: 12px; color: #ef4444; }
    .safety-safe-msg i { color: #10b981; width: 16px; height: 16px; }
    .act-btn i { width: 13px; height: 13px; }
    .dir-search-wrap i { width: 13px; height: 13px; color: var(--text-muted); }
    .results-title i { color: var(--primary-color); }
    th.th-cb { width: 44px; text-align: center; }
    th.th-sort { cursor: pointer; }
    th.th-sort i { width: 12px; height: 12px; display: inline-block; vertical-align: middle; }
    th.th-act { width: 60px; text-align: center; }
    td.td-cb { text-align: center; }
    td.td-count { font-family: 'Space Mono', monospace; font-weight: 800; }
    .dens-val { font-family: 'Space Mono', monospace; min-width: 48px; font-weight: 700; }
    td.td-ngram { color: var(--text-muted); font-size: 12.5px; }
    td.td-act { text-align: center; }
    .kw-copy-btn i { width: 13px; height: 13px; }
    td.td-empty { text-align: center; padding: 36px; color: var(--text-muted); }
    .page-size-dropdown .cd-chevron { width: 12px; height: 12px; }
    .tp-btn i { width: 14px; height: 14px; }