﻿    .spg-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;
    }

    .spg-panel {
        position: relative;                
        width: 100%;
        max-width: 1140px;
        border-radius: 28px;
        padding: clamp(24px, 5vw, 48px);
        overflow: hidden;
    }

    /* ---------- HERO ---------- */
    .spg-hero { text-align: center; position: relative; z-index: 2; margin-bottom: 36px; padding: 10px 0; }
    .hero-ambient-glow {
        position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
        width: 600px; height: 300px; background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 20%, transparent) 0%, var(--primary-glow) 40%, transparent 70%);
        filter: blur(50px); pointer-events: none; z-index: -1; border-radius: 50%;
    }
    .spg-hero-badge {
        display: inline-flex; align-items: center; gap: 8px;
        font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase;
        color: var(--primary-color); background: var(--primary-light);
        padding: 7px 18px; border-radius: 100px; margin-bottom: 20px;
        border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
        box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-color) 12%, transparent);
        backdrop-filter: blur(8px);
    }
    .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary-color); box-shadow: 0 0 10px var(--primary-color); animation: pulseDot 2s infinite; }
    @keyframes pulseDot { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.6; } }

    .spg-hero-title { font-size: clamp(34px, 5vw, 56px); font-weight: 900; line-height: 1.1; letter-spacing: -0.035em; color: var(--text-main); margin-bottom: 16px; }
    .spg-hero-title em { font-style: normal; background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .spg-hero-desc { font-size: 16px; color: var(--text-muted); font-weight: 500; max-width: 620px; margin: 0 auto 20px auto; line-height: 1.6; }

    .hero-features-belt { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
    .hfb-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-main); background: var(--bg-body); padding: 6px 16px; border-radius: 100px; border: 1px solid var(--border-color); box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
    .hfb-icon { width: 14px; height: 14px; color: var(--primary-color); }

    /* ---------- OPTIONS BAR (TOOLBAR) ---------- */
    .spg-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
    .spg-toolbar-left { display: flex; align-items: center; gap: 10px; background: var(--card-bg); padding: 8px 14px; border-radius: 16px; border: 1px solid var(--border-color); flex-wrap: wrap; box-shadow: 0 4px 16px rgba(0,0,0,0.02); }
    .spg-sep { width: 1px; height: 22px; background: var(--border-color); }

    /* Custom Dropdowns */
    .custom-dropdown-wrapper, .custom-dropdown { position: relative; }
    .cd-trigger, .cd-header {
        display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; border: 1px solid transparent; background: transparent;
        color: var(--text-main); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all 0.2s; white-space: nowrap;
    }
    .cd-trigger:hover, .cd-header:hover { background: var(--bg-body); }
    .cd-trigger.open, .custom-dropdown.active .cd-header { background: var(--card-bg); border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); color: var(--primary-color); }
    .cd-chevron { width: 13px; height: 13px; color: var(--text-muted); transition: transform 0.2s; }
    .cd-trigger.open .cd-chevron, .custom-dropdown.active .cd-header i { transform: rotate(180deg); }

    .cd-menu, .cd-body {
        position: absolute; top: calc(100% + 8px); left: 0; width: 260px; background: var(--card-bg); border: 1px solid var(--border-color);
        border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,0.1); z-index: 200; overflow: hidden; animation: fadeIn 0.18s ease;
    }
    .cd-search-box { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
    .cd-search-box input { flex: 1; border: none; background: transparent; color: var(--text-main); font-size: 12.5px; font-weight: 600; outline: none; }
    .cd-list { max-height: 240px; overflow-y: auto; padding: 6px; }
    .cd-list::-webkit-scrollbar { width: 4px; }
    .cd-list::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
    .cd-group-lbl { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); padding: 6px 10px 4px; letter-spacing: 0.5px; }
    .cd-divider { height: 1px; background: var(--border-color); margin: 6px 4px; }
    .cd-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; font-size: 12.5px; color: var(--text-main); }
    .cd-item:hover { background: var(--bg-body); }
    .cd-item.selected, .cd-item.active { background: var(--primary-light); color: var(--primary-color); font-weight: 700; }
    .cd-item-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .cd-lang-code { font-family: monospace; font-size: 10px; font-weight: 800; color: var(--text-muted); background: var(--bg-body); padding: 2px 5px; border-radius: 4px; border: 1px solid var(--border-color); flex-shrink: 0; }
    .cd-item.selected .cd-lang-code, .cd-item.active .cd-lang-code { color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 40%, transparent); background: var(--card-bg); }
    .cd-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .cd-item-main { display: flex; flex-direction: column; gap: 2px; }
    .cd-desc { font-size: 11px; color: var(--text-muted); font-weight: 500; }
    .cd-check { width: 14px; height: 14px; color: var(--primary-color); margin-left: auto; flex-shrink: 0; }
    .cd-no-results { padding: 14px; text-align: center; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }

    /* Word Count Custom Dropdown Components */
    .wc-menu { display: flex; flex-direction: column; gap: 10px; }
    .wc-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
    .wc-menu-title { font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
    .wc-badge { font-size: 11px; font-weight: 800; color: var(--primary-color); background: var(--primary-light); padding: 3px 8px; border-radius: 6px; font-family: monospace; }
    
    .wc-slider-wrap { display: flex; flex-direction: column; gap: 6px; }
    .wc-custom-range {
        -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px;
        background: var(--border-color); outline: none; transition: background 0.2s; cursor: pointer;
    }
    .wc-custom-range::-webkit-slider-thumb {
        -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); border: 2px solid white; transition: transform 0.15s;
    }
    .wc-custom-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
    .wc-custom-range::-moz-range-thumb {
        width: 18px; height: 18px; border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2); border: 2px solid white; transition: transform 0.15s;
    }
    .wc-range-labels { display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: var(--text-muted); }

    .wc-stepper-row { display: flex; gap: 6px; }
    .wc-step-btn {
        flex: 1; padding: 5px 0; background: var(--bg-body); border: 1px solid var(--border-color);
        border-radius: 6px; font-size: 11px; font-weight: 800; color: var(--text-muted); cursor: pointer; transition: all 0.2s; text-align: center;
    }
    .wc-step-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }

    .wc-presets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .wc-preset-btn {
        display: flex; flex-direction: column; align-items: flex-start; padding: 6px 8px; border-radius: 8px;
        border: 1px solid var(--border-color); background: var(--bg-body); cursor: pointer; transition: all 0.2s; text-align: left;
    }
    .wc-preset-btn:hover { border-color: var(--primary-color); background: var(--card-bg); }
    .wc-preset-btn.active { border-color: var(--primary-color); background: var(--primary-light); }
    .wcp-label { font-size: 11.5px; font-weight: 800; color: var(--text-main); }
    .wc-preset-btn.active .wcp-label { color: var(--primary-color); }
    .wcp-desc { font-size: 9.5px; color: var(--text-muted); font-weight: 600; }

    .dir-btn {
        display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
        border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
    }
    .dir-btn:hover { background: var(--bg-body); color: var(--text-main); }
    .dir-btn.rtl { color: var(--primary-color); background: var(--primary-light); border-color: var(--primary-color); }

    /* Platform Segmented Control */
    .segmented-control { display: flex; gap: 3px; background: var(--bg-body); padding: 3px; border-radius: 10px; border: 1px solid var(--border-color); }
    .sc-btn {
        display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 7px; border: none; background: transparent;
        color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s;
    }
    .sc-btn:hover { color: var(--text-main); }
    .sc-btn.active { background: var(--card-bg); color: var(--primary-color); box-shadow: 0 2px 6px rgba(0,0,0,0.04); font-weight: 800; }

    /* Usage Pill */
    .spg-usage-pill { display: flex; align-items: center; gap: 8px; background: var(--card-bg); padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border-color); font-size: 12px; font-weight: 700; color: var(--text-main); box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
    .sup-dots { display: flex; gap: 4px; }
    .sup-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-color); }
    .sup-dot.used { background: var(--primary-color); }
    .sup-warn { color: #ef4444; font-weight: 800; }

    /* Advanced Options Panel */
    .adv-options-panel {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 14px 18px;
        margin-bottom: 22px; display: flex; gap: 14px; flex-wrap: wrap; box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    }
    .adv-opt-col { flex: 1; min-width: 200px; }

    /* ── UNIFIED EDITOR WORKSPACE ── */
    .unified-editor {
        display: flex; background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 24px;
        min-height: 540px; position: relative; box-shadow: inset 0 2px 10px rgba(0,0,0,0.01); overflow: hidden; margin-bottom: 24px;
    }
    .ue-pane { flex: 1; display: flex; flex-direction: column; width: 50%; }
    .ue-input { background: var(--card-bg); }
    .ue-output { background: color-mix(in srgb, var(--card-bg) 60%, var(--bg-body)); position: relative; }

    .ue-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; gap: 8px; }
    .ue-title { font-size: 12.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
    .title-gradient { background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .platform-indicator-badge { font-size: 10px; font-weight: 800; background: var(--primary-light); color: var(--primary-color); padding: 2px 6px; border-radius: 6px; text-transform: uppercase; }

    .ue-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .ue-btn {
        display: inline-flex; align-items: center; gap: 5px; background: var(--bg-body); border: 1px solid var(--border-color);
        font-size: 11.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s;
    }
    .ue-btn i, .ue-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
    .ue-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
    .ue-btn.danger:hover { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.08); }

    /* Variations Switcher */
    .var-pills-wrap { display: flex; background: var(--bg-body); padding: 2px; border-radius: 6px; border: 1px solid var(--border-color); gap: 2px; }
    .var-pill-btn {
        background: transparent; border: none; font-size: 10.5px; font-weight: 700; color: var(--text-muted);
        padding: 3px 6px; border-radius: 4px; cursor: pointer; transition: all 0.2s;
    }
    .var-pill-btn.active { background: var(--card-bg); color: var(--primary-color); font-weight: 800; }

    .form-inputs { display: flex; flex-direction: column; padding: 18px 20px; gap: 14px; flex: 1; overflow-y: auto; }
    .ig-label { font-size: 11.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; display: block; }
    
    .ue-textarea {
        flex: 1; width: 100%; min-height: 140px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 12px;
        background: var(--bg-body); color: var(--text-main); font-size: 14px; line-height: 1.6; resize: none; outline: none; transition: all 0.2s; font-family: inherit;
    }
    .ue-textarea:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light); }

    /* Tag and CTA Chips */
    .tag-chips-bar { display: flex; flex-wrap: wrap; gap: 6px; }
    .tag-chip {
        background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 6px;
        padding: 4px 8px; font-size: 11px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
    }
    .tag-chip:hover { border-color: var(--primary-color); color: var(--primary-color); background: var(--primary-light); }
    .tag-chip.cta-chip { font-size: 10.5px; }

    /* Divider & Magic Button */
    .ue-divider { width: 1px; background: var(--border-color); position: relative; z-index: 10; display: flex; align-items: center; justify-content: center; }
    .magic-btn {
        position: absolute; width: 120px; height: 46px; background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end));
        border: none; border-radius: 100px; display: flex; align-items: center; justify-content: center; gap: 8px; color: white;
        font-size: 13.5px; font-weight: 800; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        box-shadow: 0 8px 24px var(--primary-shadow, rgba(99,102,241,0.3)), 0 0 0 6px var(--card-bg);
    }
    .magic-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 12px 32px var(--primary-shadow, rgba(99,102,241,0.4)), 0 0 0 6px var(--card-bg); }
    .magic-btn:active:not(:disabled) { transform: scale(0.95); }
    .magic-btn:disabled { background: var(--border-color); color: var(--text-muted); box-shadow: 0 0 0 6px var(--card-bg); cursor: not-allowed; }
    .spin-icon { animation: spin 2s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    .magic-glow { position: absolute; inset: -2px; border-radius: 100px; background: linear-gradient(135deg, var(--primary-color), var(--primary-gradient-end), var(--primary-color)); background-size: 200% auto; filter: blur(10px); opacity: 0; transition: opacity 0.3s; z-index: -1; }
    .magic-btn:hover:not(:disabled) .magic-glow { opacity: 0.7; animation: shine 2s linear infinite; }
    @keyframes shine { to { background-position: 200% center; } }
    
    .mb-icon { width: 16px; height: 16px; }

    /* Output Content & Social Simulator Card */
    .ue-content-wrapper { flex: 1; padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; }
    
    .social-feed-card {
        background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px;
        padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.02); animation: fadeIn 0.3s ease;
    }
    .social-feed-card.linkedin { border-left: 3px solid #0a66c2; }
    .social-feed-card.twitter { border-left: 3px solid #1da1f2; }
    .social-feed-card.facebook { border-left: 3px solid #1877f2; }
    .social-feed-card.instagram { border-left: 3px solid #e1306c; }

    .sfc-author-row { display: flex; align-items: center; gap: 10px; }
    .sfc-avatar {
        width: 36px; height: 36px; border-radius: 50%; background: var(--bg-body); border: 1px solid var(--border-color);
        display: flex; align-items: center; justify-content: center; color: var(--primary-color);
    }
    .sfc-meta { display: flex; flex-direction: column; }
    .sfc-name { font-size: 13px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 4px; }
    .sfc-verified { color: #3b82f6; display: inline-flex; align-items: center; }
    .sfc-sub { font-size: 11px; color: var(--text-muted); }

    .sfc-body-text { font-size: 14px; line-height: 1.7; color: var(--text-main); white-space: pre-wrap; word-wrap: break-word; }

    .ue-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; opacity: 0.6; text-align: center; margin: auto; }
    .uee-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--bg-body); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--primary-color); margin-bottom: 12px; }
    .uee-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
    .uee-desc { font-size: 13px; color: var(--text-muted); max-width: 260px; line-height: 1.5; }

    /* Live Quality & Character Metrics Footer */
    .ue-footer-metrics {
        display: flex; align-items: center; justify-content: space-between; padding: 10px 18px;
        background: var(--bg-body); border-top: 1px solid var(--border-color); flex-wrap: wrap; gap: 10px; font-size: 11.5px;
    }
    .ufm-item { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
    .ufm-lbl { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; }
    .ufm-val { font-weight: 800; color: var(--text-main); font-family: 'Space Mono', monospace; }
    .ufm-val.over-limit { color: #ef4444; }
    .ufm-progress-wrap { width: 90px; height: 5px; background: var(--border-color); border-radius: 100px; overflow: hidden; margin-left: auto; }
    .ufm-progress-fill { height: 100%; background: var(--primary-color); border-radius: 100px; transition: width 0.3s; }
    .ufm-progress-fill.over-fill { background: #ef4444; }

    .shortcut-hint kbd { background: var(--card-bg); border: 1px solid var(--border-color); padding: 2px 6px; border-radius: 6px; font-family: monospace; font-size: 11px; font-weight: 700; }
    .streaming-cursor { display: inline-block; width: 2px; height: 16px; background-color: var(--primary-color); vertical-align: text-bottom; margin-left: 2px; animation: blink 1s step-end infinite; }
    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

    /* ---------- STATS STRIP ---------- */
    .stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 50px; }
    .stats-sc { background: var(--card-bg); border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; box-shadow: 0 4px 16px rgba(0,0,0,0.02); }
    .stats-sc:hover { transform: translateY(-2px); }
    .stats-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
    .stats-ico.cr { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
    .stats-ico.cb { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
    .stats-ico.cg { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
    .stats-ico.cp { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
    .stats-val { font-size: 28px; font-weight: 900; color: var(--text-main); line-height: 1; margin-bottom: 4px; transition: transform 0.3s; font-family: 'Space Mono', monospace; }
    .stats-val.popped { transform: scale(1.2); color: var(--primary-color); }
    .stats-lbl { font-size: 13px; font-weight: 700; color: var(--text-muted); }

    /* ---------- HISTORY SECTION ---------- */
    .spg-history-section { margin-top: 40px; animation: fadeIn 0.4s ease; }
    .spg-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .spg-history-title { font-size: 14px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 8px; margin: 0; }
    .spg-clear-btn { background: transparent; border: none; font-size: 12.5px; font-weight: 700; color: #ef4444; cursor: pointer; padding: 4px 10px; border-radius: 6px; transition: background 0.2s; }
    .spg-clear-btn:hover { background: rgba(239,68,68,0.1); }
    .spg-history-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; padding-right: 4px; }
    .spg-history-item { display: flex; align-items: center; justify-content: space-between; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 16px; transition: all 0.2s; cursor: pointer; user-select: none; }
    .spg-history-item:hover { border-color: var(--primary-color); transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,0.02); }
    .spg-history-info { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
    .spg-history-domain { font-size: 14px; font-weight: 700; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .spg-history-meta { display: flex; align-items: center; gap: 10px; }
    .spg-history-badge { background: var(--primary-light); color: var(--primary-color); padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .spg-history-badge.vibe-badge { background: var(--bg-body); color: var(--text-muted); border: 1px solid var(--border-color); }
    .spg-history-date { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
    .spg-history-del-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s; display: flex; align-items: center; }
    .spg-history-del-btn:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

    /* Limit Warning */
    .limit-warning { display: none; margin: 24px 0; padding: 16px 20px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); border-radius: 16px; align-items: flex-start; gap: 12px; }
    .limit-warning.show { display: flex; }
    .lw-ico { color: #ef4444; flex-shrink: 0; }
    .lw-text { font-size: 14px; color: #ef4444; line-height: 1.5; font-weight: 500; }
    .lw-link { display: inline-flex; align-items: center; gap: 4px; color: #ef4444; text-decoration: underline; font-weight: 700; margin-top: 4px; }

    /* ---------- BENTO BOX FEATURES CLUSTER ---------- */
    .console-features { margin-top: 50px; width: 100%; }
    .bento-features-cluster { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; 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::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::before { 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::before { 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(--bg-body); 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-icon-wrapper i, .bc-icon-wrapper svg { width: 18px; height: 18px; }

    .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; }
    
    .bc-wide-top { grid-column: span 2; }
    .bc-tall { grid-row: span 2; }
    .bc-wide-mid { grid-column: span 2; }
    .bc-wide-top .bento-card-content, .bc-wide-mid .bento-card-content { justify-content: center; }
    .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 85%; }

    @media (max-width: 900px) {
        .unified-editor { flex-direction: column; height: auto; min-height: 600px; }
        .ue-pane { width: 100%; min-height: 300px; }
        .ue-divider { width: 100%; height: 1px; }
        .magic-btn { box-shadow: 0 4px 16px var(--primary-shadow), 0 0 0 6px var(--card-bg); }
        .magic-btn:hover:not(:disabled) { transform: scale(1.05); box-shadow: 0 6px 24px var(--primary-shadow), 0 0 0 6px var(--card-bg); }
        .bento-features-cluster { grid-template-columns: repeat(2, 1fr); }
        .bc-wide-top, .bc-wide-mid { grid-column: span 2; }
        .bc-tall { grid-row: span 1; grid-column: span 1; }
    }
    @media (max-width: 600px) {
        .spg-toolbar { flex-direction: column; align-items: stretch; }
        .spg-toolbar-left { flex-wrap: wrap; justify-content: space-between; }
        .shortcut-hint { display: none; }
        .ue-pane { min-height: 260px; }
        .bento-features-cluster { grid-template-columns: 1fr; }
        .bc-wide-top, .bc-wide-mid, .bc-tall { grid-column: span 1; }
        .bc-wide-top .bc-desc, .bc-wide-mid .bc-desc { max-width: 100%; }
    }

    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }