    .chart-page {
        max-width: 1600px;
        margin: 0 auto;
        padding: 12px 16px 32px;
        overflow-x: hidden;
    }
    .chart-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }
    .chart-search {
        display: flex;
        align-items: center;
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
    }
    .chart-search input {
        background: transparent;
        border: none;
        color: var(--text-main);
        padding: 9px 14px;
        font-size: 15px;
        width: 120px;
        text-transform: uppercase;
        outline: none;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    .chart-search input::placeholder { color: var(--text-muted); font-weight: 400; }
    .chart-search button {
        background: var(--accent);
        color: #000;
        border: none;
        padding: 9px 16px;
        font-weight: 700;
        font-size: 13px;
        cursor: pointer;
        letter-spacing: 0.3px;
    }
    .chart-search button:hover { background: #16a34a; }
    .tf-bar {
        display: flex;
        gap: 2px;
        background: rgba(15,23,42,0.6);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 3px;
    }
    .tf-btn {
        background: transparent;
        border: none;
        color: var(--text-muted);
        padding: 7px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.12s;
        letter-spacing: 0.3px;
    }
    .tf-btn:hover { color: var(--text-main); background: rgba(148,163,184,0.08); }
    .tf-btn.active { background: var(--accent); color: #000; }
    .ext-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: 6px;
        padding: 3px 10px;
        background: rgba(15,23,42,0.6);
        border: 1px solid var(--border);
        border-radius: 8px;
        cursor: pointer;
        user-select: none;
    }
    .ext-toggle-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }
    .ext-toggle-switch {
        position: relative;
        width: 32px;
        height: 18px;
        background: rgba(100,116,139,0.3);
        border-radius: 9px;
        transition: background 0.2s;
    }
    .ext-toggle-switch.on {
        background: rgba(34,197,94,0.5);
    }
    .ext-toggle-switch::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 14px;
        height: 14px;
        background: #94a3b8;
        border-radius: 50%;
        transition: all 0.2s;
    }
    .ext-toggle-switch.on::after {
        left: 16px;
        background: #22c55e;
    }
    .trend-badge {
        font-size: 11px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .trend-badge.up { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
    .trend-badge.down { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
    .trend-badge.neutral { background: rgba(148,163,184,0.1); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
    .chart-layout {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }
    .chart-layout > .chart-frame { flex: 1; min-width: 0; }
    .chart-layout > .watchlist-panel {
        width: 320px;
        flex-shrink: 0;
        margin-top: 0;
        max-height: 700px;
        overflow-y: auto;
    }
    .chart-frame {
        background: #0b1120;
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        transition: all 0.25s ease;
    }
    .chart-frame.fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        border-radius: 0;
        border: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    /* chart canvas fills ALL remaining vertical space (height set explicitly by JS) */
    .chart-frame.fullscreen #chart-area {
        width: 100% !important;
        flex-shrink: 0 !important;
    }
    .chart-frame.fullscreen .chart-header {
        flex-shrink: 0;
        padding: 8px 16px;
    }
    /* keep layer-toggle bar but scrollable; hide draw row */
    .chart-frame.fullscreen .chart-bottom {
        flex-shrink: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .chart-frame.fullscreen .chart-bottom::-webkit-scrollbar { display: none; }
    .chart-frame.fullscreen .draw-tools-row {
        display: none !important;
    }
    /* don't wrap toggles in fullscreen — scroll them instead */
    .chart-frame.fullscreen .chart-toggles {
        flex-wrap: nowrap;
        white-space: nowrap;
        padding: 6px 12px;
    }
    .chart-frame.fullscreen .chart-bottom-bar {
        overflow: visible;
    }
    /* hide info panel in fullscreen — eats all the space on mobile */
    .chart-frame.fullscreen .chart-info-panel {
        display: none !important;
    }
    .fs-toolbar {
        display: none;
        padding: 6px 12px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        background: rgba(11,17,32,0.95);
    }
    .chart-frame.fullscreen .fs-toolbar {
        display: block;
    }
    .chart-frame.fullscreen .fs-toolbar .chart-toolbar {
        margin-bottom: 0;
    }
    .expand-btn {
        margin-left: auto;
        background: rgba(148,163,184,0.08);
        border: 1px solid rgba(148,163,184,0.15);
        color: var(--text-muted);
        width: 32px;
        height: 32px;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        flex-shrink: 0;
    }
    .expand-btn:hover { color: var(--text-main); background: rgba(148,163,184,0.15); border-color: rgba(148,163,184,0.3); }
    .expand-btn .icon-collapse { display: none; }
    .chart-frame.fullscreen .expand-btn .icon-expand { display: none; }
    .chart-frame.fullscreen .expand-btn .icon-collapse { display: block; }
    .chart-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 16px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
    }
    .chart-symbol {
        font-size: 18px;
        font-weight: 800;
        color: var(--text-main);
        letter-spacing: 0.5px;
    }
    .chart-tf-label {
        font-size: 12px;
        color: var(--text-muted);
        background: rgba(148,163,184,0.08);
        padding: 3px 8px;
        border-radius: 4px;
        font-weight: 600;
    }
    .chart-price-info {
        font-size: 15px;
        font-weight: 700;
    }
    #chart-area {
        width: 100%;
        height: 650px;
        touch-action: pan-y pinch-zoom;
        overflow: hidden;
    }
    #cvd-pane {
        width: 100%;
        height: 120px;
        background: #0b1120;
        border-top: 1px solid rgba(148,163,184,0.06);
        position: relative;
        flex-shrink: 0;
        overflow: hidden;
    }
    #cvd-pane-label {
        position: absolute;
        top: 5px;
        left: 10px;
        font-size: 9px;
        color: rgba(148,163,184,0.45);
        z-index: 3;
        pointer-events: none;
        letter-spacing: 0.04em;
    }
    #cvd-note {
        position: absolute;
        bottom: 4px;
        left: 10px;
        font-size: 8px;
        color: rgba(148,163,184,0.28);
        z-index: 3;
        pointer-events: none;
    }
    .toggle-chip.cvd-group { border-left: 1px solid rgba(148,163,184,0.12); margin-left: 2px; padding-left: 8px; }
    .chart-loading {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: var(--text-muted);
        font-size: 14px;
        z-index: 10;
        pointer-events: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .chart-loading .spinner {
        width: 18px;
        height: 18px;
        border: 2px solid rgba(148,163,184,0.2);
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    .chart-bottom {
        display: flex;
        align-items: stretch;
        border-top: 1px solid rgba(148,163,184,0.08);
        background: rgba(11,17,32,0.6);
    }
    .chart-toggles {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        padding: 8px 16px;
        align-items: center;
        flex: 1;
    }
    .toggle-chip {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
        cursor: pointer;
        user-select: none;
        padding: 4px 10px;
        border-radius: 6px;
        border: 1px solid transparent;
        transition: all 0.15s;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .toggle-chip:hover { border-color: var(--border); }
    .toggle-chip.active { color: var(--text-main); border-color: var(--border); background: rgba(148,163,184,0.06); }
    .toggle-chip .dot {
        width: 8px;
        height: 8px;
        border-radius: 2px;
        flex-shrink: 0;
    }
    .toggle-chip input { display: none; }
    .info-toggle {
        display: flex;
        align-items: center;
        padding: 8px 14px;
        border-left: 1px solid rgba(148,163,184,0.08);
        cursor: pointer;
        color: var(--text-muted);
        font-size: 13px;
        gap: 5px;
        transition: color 0.15s;
    }
    .info-toggle:hover { color: var(--text-main); }
    .chart-bottom { flex-direction: column; }
    .chart-bottom-bar { display: flex; align-items: stretch; }
    .draw-tools-row {
        display: none;
        align-items: center;
        gap: 5px;
        padding: 7px 14px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        background: rgba(6,11,24,0.95);
        flex-wrap: wrap;
    }
    .draw-tools-row.visible { display: flex; }
    .draw-tool-btn {
        display: flex; align-items: center; gap: 5px;
        font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
        color: var(--text-muted); cursor: pointer; user-select: none;
        padding: 4px 9px; border-radius: 6px;
        border: 1px solid transparent; background: transparent;
        transition: all 0.15s; text-transform: uppercase;
    }
    .draw-tool-btn:hover { border-color: rgba(148,163,184,0.2); color: var(--text-main); }
    .draw-tool-btn.active { color: var(--text-main); border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.07); }
    .draw-tool-btn .dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
    /* Draw-mode-only chips: hidden in AUTO, shown in DRAW */
    .chart-bottom-bar .draw-mode-chip { display: none; }
    .chart-bottom-bar.mode-draw .draw-mode-chip { display: inline-flex; }
    .draw-hint { font-size: 10px; color: var(--text-muted); opacity: 0.5; margin-left: 4px; }
    .draw-clear-btn { margin-left: auto; color: rgba(239,68,68,0.6); }
    .draw-clear-btn:hover { color: #ef4444; border-color: rgba(239,68,68,0.3) !important; background: rgba(239,68,68,0.06) !important; }
    .mode-toggle-wrap {
        display: flex; align-items: center; gap: 3px;
        padding: 5px 10px; border-left: 1px solid rgba(148,163,184,0.08);
    }
    .mode-btn {
        font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
        color: var(--text-muted); cursor: pointer; padding: 3px 10px;
        border-radius: 5px; border: 1px solid transparent;
        background: transparent; transition: all 0.15s; text-transform: uppercase;
    }
    .mode-btn:hover { color: var(--text-main); border-color: rgba(148,163,184,0.2); }
    .mode-btn.active { color: #22c55e; background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); }
    .mode-btn.active.draw-active { color: #f59e0b; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }
    .chart-area-wrap { position: relative; }
    .draw-cursor { cursor: crosshair !important; }
    .draw-toast {
        position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
        background: rgba(15,23,42,0.92); border: 1px solid rgba(245,158,11,0.3);
        color: #fbbf24; font-size: 11px; font-weight: 600;
        padding: 5px 14px; border-radius: 20px; pointer-events: none;
        z-index: 50; white-space: nowrap; opacity: 0; transition: opacity 0.2s;
    }
    .draw-toast.show { opacity: 1; }
    /* ─── Fibonacci Extension Panel ─── */
    .fib-panel {
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 5px 14px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        background: rgba(6,11,24,0.9);
    }
    .fib-panel-header {
        display: flex; align-items: center; gap: 6px;
        font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
        color: #f59e0b; text-transform: uppercase; padding: 3px 0;
    }
    .fib-item {
        display: flex; align-items: center; gap: 7px;
        padding: 4px 0; border-bottom: 1px solid rgba(148,163,184,0.05);
        font-size: 10px;
    }
    .fib-item:last-child { border-bottom: none; }
    .fib-dir { font-weight: 700; font-size: 9px; min-width: 38px; }
    .fib-label { flex: 1; color: var(--text-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fib-btn {
        background: none; border: 1px solid rgba(148,163,184,0.12); border-radius: 4px;
        color: var(--text-muted); cursor: pointer; padding: 2px 6px;
        font-size: 10px; transition: all 0.12s; line-height: 1.4;
    }
    .fib-btn:hover { color: var(--text-main); border-color: rgba(148,163,184,0.3); }
    .fib-del-btn:hover { color: #ef4444; border-color: rgba(239,68,68,0.4); }
    .fib-drawing-pulse { animation: fibpulse 1s infinite; }
    @keyframes fibpulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
    .chart-info-panel {
        display: none;
        padding: 16px 20px;
        background: rgba(15,23,42,0.8);
        border-top: 1px solid rgba(148,163,184,0.08);
    }
    .chart-info-panel.open { display: block; }
    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 12px;
    }
    .info-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }
    .info-item .info-dot {
        width: 10px;
        height: 10px;
        border-radius: 2px;
        margin-top: 4px;
        flex-shrink: 0;
    }
    .info-item .info-label {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-main);
        margin-bottom: 2px;
    }
    .info-item .info-desc {
        font-size: 11px;
        color: var(--text-muted);
        line-height: 1.4;
    }
    .trend-badge.range { background: rgba(250,204,21,0.15); color: #facc15; border-color: rgba(250,204,21,0.3); }


    .pos-calc {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 16px 20px;
        margin-top: 12px;
    }
    .pos-calc h3 {
        margin: 0 0 14px;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-main);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .pos-calc h3 svg { color: var(--accent); }
    .pos-fields {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        align-items: flex-end;
    }
    .pos-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 120px;
        flex: 1;
    }
    .pos-field label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
    }
    .pos-field input, .pos-field select {
        background: rgba(30,41,59,0.8);
        border: 1px solid var(--border);
        border-radius: 6px;
        color: var(--text-main);
        padding: 8px 10px;
        font-size: 13px;
        font-weight: 600;
        outline: none;
    }
    .pos-field input:focus, .pos-field select:focus { border-color: var(--accent); }
    .pos-results {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgba(148,163,184,0.1);
    }
    .pos-card {
        flex: 1;
        min-width: 140px;
        text-align: center;
        padding: 10px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    .pos-card.profit-card { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.2); }
    .pos-card.loss-card { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.2); }
    .pos-card.rr-card { background: rgba(250,204,21,0.06); border-color: rgba(250,204,21,0.2); }
    .pos-card .pc-label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
        margin-bottom: 4px;
    }
    .pos-card .pc-value {
        font-size: 18px;
        font-weight: 800;
    }
    .pos-card .pc-sub {
        font-size: 11px;
        font-weight: 600;
        margin-top: 2px;
    }
    .pc-profit { color: #22c55e; }
    .pc-loss { color: #ef4444; }
    .pc-rr { color: #facc15; }
    .pc-neutral { color: var(--text-muted); }

    /* ─── Level 2 Order Book — Pro DOM Redesign ─── */
    .l2-panel {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-top: 12px;
        overflow: hidden;
    }
    .l2-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        cursor: pointer;
        user-select: none;
    }
    .l2-header:hover { background: rgba(148,163,184,0.03); }
    .l2-header-left {
        display: flex;
        align-items: center;
        gap: 7px;
    }
    .l2-header-left svg { color: #a855f7; flex-shrink: 0; }
    .l2-header-left > span:first-of-type {
        font-size: 13px;
        font-weight: 700;
        color: var(--text-main);
    }
    .l2-live-badge {
        font-size: 8px;
        font-weight: 800;
        letter-spacing: 0.8px;
        padding: 2px 5px;
        border-radius: 3px;
        background: rgba(34,197,94,0.12);
        color: #22c55e;
        border: 1px solid rgba(34,197,94,0.22);
    }
    .l2-chevron { transition: transform 0.2s; color: var(--text-muted); }
    .l2-chevron.open { transform: rotate(180deg); }
    .l2-body { display: block; }
    .l2-body.collapsed { display: none; }

    /* ── Stats strip ── */
    .l2-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 14px 4px;
    }
    .l2-strip2 {
        justify-content: center;
        gap: 8px;
        padding: 2px 14px 10px;
        border-bottom: 1px solid rgba(148,163,184,0.07);
    }
    .l2-strip-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
    }
    .l2-strip-center { flex: 1.2; }
    .l2-strip-divider {
        width: 1px;
        height: 28px;
        background: rgba(148,163,184,0.1);
        flex-shrink: 0;
    }
    .l2-strip-label {
        font-size: 9px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        color: var(--text-muted);
        margin-bottom: 2px;
    }
    .l2-strip-bid {
        font-size: 16px;
        font-weight: 700;
        color: #22c55e;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }
    .l2-strip-ask {
        font-size: 16px;
        font-weight: 700;
        color: #ef4444;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }
    .l2-strip-spread {
        font-size: 12px;
        font-weight: 600;
        color: var(--text-muted);
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }
    .l2-strip-sep { color: rgba(148,163,184,0.3); font-size: 11px; }
    .l2-strip-mid {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-main);
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }
    .l2-strip-vwap { font-size: 10px; font-weight: 600; color: #f59e0b; }
    .l2-strip-vol {
        font-size: 10px;
        font-weight: 600;
        color: var(--text-muted);
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }

    /* ── Tab row ── */
    .l2-tab-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        padding: 0 14px;
    }
    .l2-tabs { display: flex; }
    .l2-tab {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
        padding: 7px 10px;
        cursor: pointer;
        border-bottom: 2px solid transparent;
        transition: all 0.15s;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    .l2-tab:hover { color: var(--text-main); }
    .l2-tab.active { color: #a855f7; border-bottom-color: #a855f7; }
    .l2-tab-actions { display: flex; align-items: center; gap: 6px; }
    .l2-depth-picker {
        display: flex;
        align-items: center;
        gap: 1px;
        background: rgba(15,23,42,0.6);
        border: 1px solid rgba(148,163,184,0.15);
        border-radius: 5px;
        padding: 1px;
    }
    .l2-depth-btn {
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.3px;
        padding: 2px 6px;
        border-radius: 4px;
        border: none;
        background: none;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.12s;
        line-height: 1.6;
    }
    .l2-depth-btn:hover { color: var(--text-main); background: rgba(148,163,184,0.08); }
    .l2-depth-btn.active { background: rgba(168,85,247,0.15); color: #a855f7; }
    .l2-cml-btn {
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.5px;
        padding: 2px 6px;
        border-radius: 4px;
        border: 1px solid rgba(148,163,184,0.2);
        background: none;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.15s;
    }
    .l2-cml-btn:hover { border-color: #a855f7; color: #a855f7; }
    .l2-cml-btn.active {
        background: rgba(168,85,247,0.12);
        border-color: rgba(168,85,247,0.4);
        color: #a855f7;
    }
    .l2-refresh-btn {
        background: none;
        border: 1px solid rgba(148,163,184,0.15);
        border-radius: 4px;
        color: var(--text-muted);
        cursor: pointer;
        padding: 3px 5px;
        display: flex;
        align-items: center;
        transition: all 0.15s;
    }
    .l2-refresh-btn:hover { border-color: #a855f7; color: #a855f7; }

    /* ── DOM ladder ── */
    .l2-content { padding: 0; }
    .l2-dom-header {
        display: grid;
        grid-template-columns: 1fr 72px 1fr;
        padding: 4px 14px;
        font-size: 9px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid rgba(148,163,184,0.05);
    }
    .l2-dom-header span:nth-child(2) { text-align: center; }
    .l2-dom-header span:last-child { text-align: right; }
    .l2-dom-rows {
        max-height: 300px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(148,163,184,0.1) transparent;
    }
    .l2-dom-row {
        display: grid;
        grid-template-columns: 1fr 72px 1fr;
        align-items: stretch;
        min-height: 22px;
        cursor: default;
        position: relative;
    }
    .l2-dom-row:hover { filter: brightness(1.08); }
    /* Ask rows */
    .l2-ask-row  { background: rgba(239,68,68,0.03); }
    .l2-best-ask { background: rgba(239,68,68,0.08); }
    /* Bid rows */
    .l2-bid-row  { background: rgba(34,197,94,0.03); }
    .l2-best-bid { background: rgba(34,197,94,0.08); }
    /* Spread separator */
    .l2-spread-row {
        background: rgba(148,163,184,0.04);
        border-top: 1px solid rgba(148,163,184,0.1);
        border-bottom: 1px solid rgba(148,163,184,0.1);
        min-height: 18px;
    }
    .l2-spread-row-price {
        grid-column: 2;
        text-align: center;
        font-size: 9px;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.1px;
        padding: 2px 0;
    }

    /* Left cell — bids: bar grows right-to-left from the right edge */
    .l2-bid-cell {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 2px 6px 2px 0;
        position: relative;
        overflow: hidden;
    }
    .l2-bid-bar {
        position: absolute;
        top: 0; bottom: 0; right: 0;
        background: linear-gradient(to left, rgba(34,197,94,0.22), rgba(34,197,94,0.04));
        transition: width 0.35s ease;
        pointer-events: none;
    }
    .l2-bid-size {
        font-size: 11px;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
        color: rgba(34,197,94,0.9);
        position: relative;
        z-index: 1;
        white-space: nowrap;
    }
    .l2-best-bid .l2-bid-size { color: #22c55e; font-weight: 700; }

    /* Center cell — price */
    .l2-price-cell {
        text-align: center;
        font-size: 11.5px;
        font-weight: 600;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0 2px;
    }
    .l2-ask-row .l2-price-cell, .l2-best-ask .l2-price-cell { color: #ef4444; }
    .l2-bid-row .l2-price-cell, .l2-best-bid .l2-price-cell { color: #22c55e; }
    .l2-best-bid .l2-price-cell, .l2-best-ask .l2-price-cell { font-weight: 800; font-size: 12px; }
    .l2-price-dot {
        width: 4px; height: 4px;
        border-radius: 50%;
        display: inline-block;
        flex-shrink: 0;
    }
    .l2-best-bid .l2-price-dot { background: #22c55e; }
    .l2-best-ask .l2-price-dot { background: #ef4444; }

    /* Right cell — asks: bar grows left-to-right from left edge */
    .l2-ask-cell {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 2px 0 2px 6px;
        position: relative;
        overflow: hidden;
    }
    .l2-ask-bar {
        position: absolute;
        top: 0; bottom: 0; left: 0;
        background: linear-gradient(to right, rgba(239,68,68,0.22), rgba(239,68,68,0.04));
        transition: width 0.35s ease;
        pointer-events: none;
    }
    .l2-ask-size {
        font-size: 11px;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
        color: rgba(239,68,68,0.9);
        position: relative;
        z-index: 1;
        white-space: nowrap;
    }
    .l2-best-ask .l2-ask-size { color: #ef4444; font-weight: 700; }

    /* Flash animations */
    @keyframes l2-flash-green {
        0%   { background: rgba(34,197,94,0.3); }
        100% { background: transparent; }
    }
    @keyframes l2-flash-red {
        0%   { background: rgba(239,68,68,0.3); }
        100% { background: transparent; }
    }
    .l2-flash-up   { animation: l2-flash-green 0.45s ease-out; }
    .l2-flash-down { animation: l2-flash-red   0.45s ease-out; }

    /* ── Imbalance bar ── */
    .l2-imbalance {
        padding: 6px 14px 8px;
        border-top: 1px solid rgba(148,163,184,0.06);
    }
    .l2-imb-bar {
        height: 5px;
        border-radius: 3px;
        overflow: hidden;
        display: flex;
        background: rgba(239,68,68,0.25);
    }
    .l2-imb-bid {
        background: linear-gradient(to right, #16a34a, #22c55e);
        transition: width 0.4s ease;
        border-radius: 3px 0 0 3px;
    }
    .l2-imb-label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 9px;
        margin-top: 3px;
    }
    .l2-imb-bid-pct { color: #22c55e; font-weight: 700; font-family: 'JetBrains Mono','SF Mono',monospace; }
    .l2-imb-label-center { color: var(--text-muted); font-size: 9px; }
    .l2-imb-ask-pct { color: #ef4444; font-weight: 700; font-family: 'JetBrains Mono','SF Mono',monospace; }

    /* ── Depth Curve ── */
    .l2-depth-curve {
        display: block;
        width: 100%;
        height: 80px;
        border-top: 1px solid rgba(148,163,184,0.06);
        background: rgba(11,17,32,0.4);
    }

    /* ── Time & Sales ── */
    .l2-ts-header {
        display: grid;
        grid-template-columns: 90px 1fr 52px;
        padding: 4px 14px;
        font-size: 9px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 1px solid rgba(148,163,184,0.05);
    }
    .l2-ts-header span:last-child { text-align: right; }
    .l2-ts-rows {
        max-height: 300px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(148,163,184,0.1) transparent;
    }
    @keyframes l2-slide-in {
        from { opacity: 0; transform: translateY(-5px); }
        to   { opacity: 1; transform: translateY(0);    }
    }
    .l2-trade-row {
        display: grid;
        grid-template-columns: 90px 1fr 52px;
        align-items: center;
        padding: 3px 14px;
        min-height: 22px;
        font-size: 11px;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
        border-left: 2px solid transparent;
        transition: background 0.15s;
    }
    .l2-trade-row:nth-child(even) { background: rgba(148,163,184,0.02); }
    .l2-trade-row:hover { background: rgba(148,163,184,0.05); }
    .l2-trade-row.l2-t-buy  { border-left-color: rgba(34,197,94,0.6);  }
    .l2-trade-row.l2-t-sell { border-left-color: rgba(239,68,68,0.6); }
    .l2-new-row { animation: l2-slide-in 0.2s ease-out; }
    .l2-t-time { color: var(--text-muted); font-size: 10px; }
    .l2-t-price-cell { text-align: center; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 3px; }
    .l2-t-buy  .l2-t-price-cell { color: #22c55e; }
    .l2-t-sell .l2-t-price-cell { color: #ef4444; }
    .l2-t-dir { font-size: 8px; }
    .l2-t-size { text-align: right; color: var(--text-muted); }

    /* ── Footer ── */
    .l2-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 14px 10px;
        border-top: 1px solid rgba(148,163,184,0.06);
        font-size: 10px;
    }
    .l2-footer-stats {
        display: flex;
        align-items: center;
        gap: 5px;
        color: var(--text-muted);
        font-size: 10px;
        font-family: 'JetBrains Mono','SF Mono','Fira Code',monospace;
    }
    .l2-footer-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; opacity: 0.55; }
    .l2-footer-sep { opacity: 0.25; }
    .l2-footer-right {
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--text-muted);
        font-size: 10px;
    }
    /* 5-second countdown arc */
    .l2-countdown-wrap { width: 16px; height: 16px; flex-shrink: 0; }
    .l2-countdown-wrap svg { display: block; }
    .l2-countdown-track {
        fill: none;
        stroke: rgba(148,163,184,0.12);
        stroke-width: 2;
    }
    .l2-countdown-arc {
        fill: none;
        stroke: #a855f7;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-dasharray: 37.7;
        stroke-dashoffset: 0;
        transform-origin: 8px 8px;
        transform: rotate(-90deg);
    }
    @keyframes l2-countdown {
        from { stroke-dashoffset: 0; }
        to   { stroke-dashoffset: 37.7; }
    }
    .l2-countdown-arc.running { animation: l2-countdown 5s linear forwards; }

    .l2-loading {
        text-align: center;
        padding: 20px 16px;
        color: var(--text-muted);
        font-size: 12px;
        line-height: 1.6;
    }
    .l2-loading a { color: #a855f7; text-decoration: none; }
    .l2-loading a:hover { text-decoration: underline; }
    .watchlist-panel {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-top: 12px;
        overflow: hidden;
    }
    .wl-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
        cursor: pointer;
        user-select: none;
    }
    .wl-header:hover { background: rgba(148,163,184,0.03); }
    .wl-header h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-main);
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .wl-header h3 svg { color: #3b82f6; }
    .wl-chevron {
        transition: transform 0.2s;
        color: var(--text-muted);
    }
    .wl-chevron.open { transform: rotate(180deg); }
    .wl-body { display: block; padding: 14px 16px; }
    .wl-body.collapsed { display: none; }
    .wl-login-cta {
        text-align: center;
        padding: 24px 16px;
        color: var(--text-muted);
        font-size: 13px;
    }
    .wl-login-cta a {
        color: #3b82f6;
        font-weight: 700;
        text-decoration: none;
    }
    .wl-login-cta a:hover { text-decoration: underline; }
    .wl-add-form {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        align-items: flex-end;
        margin-bottom: 14px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
    }
    .wl-field {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }
    .wl-field label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
    }
    .wl-field input, .wl-field select {
        background: rgba(30,41,59,0.8);
        border: 1px solid var(--border);
        border-radius: 6px;
        color: var(--text-main);
        padding: 7px 10px;
        font-size: 12px;
        font-weight: 600;
        outline: none;
    }
    .wl-field input:focus, .wl-field select:focus { border-color: #3b82f6; }
    .wl-field input[type="text"] { width: 80px; text-transform: uppercase; }
    .wl-field input[type="number"] { width: 60px; }
    .wl-field select { min-width: 150px; }
    .wl-add-btn {
        background: #3b82f6;
        color: #fff;
        border: none;
        padding: 7px 14px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: background 0.15s;
        white-space: nowrap;
    }
    .wl-add-btn:hover { background: #2563eb; }
    .wl-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .wl-list { display: flex; flex-direction: column; gap: 6px; }
    .wl-empty {
        text-align: center;
        color: var(--text-muted);
        font-size: 12px;
        padding: 16px 0;
    }
    .wl-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: rgba(15,23,42,0.4);
        transition: border-color 0.15s;
    }
    .wl-item.alert-active {
        border-color: rgba(250,204,21,0.4);
        background: rgba(250,204,21,0.04);
    }
    .wl-item-ticker {
        font-size: 13px;
        font-weight: 800;
        color: var(--text-main);
        min-width: 55px;
    }
    .wl-item-level {
        font-size: 10px;
        font-weight: 600;
        color: #3b82f6;
        background: rgba(59,130,246,0.1);
        padding: 2px 6px;
        border-radius: 4px;
        white-space: nowrap;
    }
    .wl-item-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }
    .wl-item-price {
        font-size: 11px;
        color: var(--text-muted);
    }
    .wl-item-distance {
        font-size: 11px;
        font-weight: 700;
    }
    .wl-dist-near { color: #facc15; }
    .wl-dist-far { color: var(--text-muted); }
    .wl-dist-alert { color: #22c55e; }
    .wl-item-remove {
        background: none;
        border: none;
        color: rgba(148,163,184,0.4);
        cursor: pointer;
        padding: 4px;
        border-radius: 4px;
        transition: all 0.15s;
        flex-shrink: 0;
    }
    .wl-item-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
    .wl-status-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    .wl-count {
        font-size: 10px;
        color: var(--text-muted);
        font-weight: 600;
    }
    .wl-refresh-btn {
        background: none;
        border: 1px solid var(--border);
        color: var(--text-muted);
        padding: 3px 8px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: all 0.15s;
    }
    .wl-refresh-btn:hover { color: var(--text-main); border-color: rgba(148,163,184,0.3); }
    .wl-refresh-btn.loading svg { animation: spin 0.8s linear infinite; }
    .wl-msg {
        font-size: 11px;
        padding: 6px 10px;
        border-radius: 6px;
        margin-bottom: 8px;
        display: none;
    }
    .wl-msg.success { display: block; background: rgba(34,197,94,0.1); color: #22c55e; border: 1px solid rgba(34,197,94,0.2); }
    .wl-msg.error { display: block; background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
    .wl-explainer {
        padding: 0 0 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid rgba(148,163,184,0.08);
    }
    .wl-explainer p {
        font-size: 11.5px;
        line-height: 1.5;
        color: var(--text-muted);
        margin: 0 0 8px;
    }
    .wl-explainer p:last-child { margin-bottom: 0; }
    .wl-explainer strong { color: var(--text-main); font-weight: 700; }
    .wl-how-title {
        font-size: 11px;
        font-weight: 800;
        color: #3b82f6;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0 0 6px;
    }
    .wl-steps {
        display: flex;
        flex-direction: column;
        gap: 5px;
        margin: 8px 0 0;
    }
    .wl-step {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 11px;
        color: var(--text-muted);
        line-height: 1.4;
    }
    .wl-step-num {
        background: rgba(59,130,246,0.15);
        color: #3b82f6;
        font-weight: 800;
        font-size: 9px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        margin-top: 1px;
    }
    @media (max-width: 768px) {
        .chart-page { padding: 6px 4px 24px; overflow-x: hidden; }
        .chart-layout {
            flex-direction: column;
        }
        .chart-layout > .watchlist-panel {
            width: 100%;
            max-height: none;
            order: 2;
        }
        .chart-layout > .chart-frame {
            width: 100%;
            order: 1;
        }
        #chart-area { height: 350px; }
        .chart-toolbar {
            gap: 4px;
            padding: 0 2px;
        }
        .chart-search input { width: 70px; padding: 7px 10px; font-size: 14px; }
        .chart-search button { padding: 7px 12px; font-size: 12px; }
        .tf-bar {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            max-width: calc(100vw - 180px);
            flex-shrink: 1;
        }
        .tf-bar::-webkit-scrollbar { display: none; }
        .tf-btn { padding: 6px 8px; font-size: 11px; white-space: nowrap; }
        .ext-toggle { padding: 3px 6px; margin-left: 2px; }
        .ext-toggle-label { font-size: 9px; }
        .ext-toggle-switch { width: 26px; height: 15px; }
        .ext-toggle-switch::after { width: 11px; height: 11px; }
        .ext-toggle-switch.on::after { left: 13px; }
        .chart-header { padding: 6px 10px; gap: 8px; }
        .chart-symbol { font-size: 15px; }
        .chart-price-info { font-size: 13px; }
        .chart-tf-label { font-size: 10px; padding: 2px 6px; }
        .chart-toggles { padding: 6px 8px; gap: 4px; }
        .toggle-chip { font-size: 9px; padding: 3px 6px; letter-spacing: 0; }
        .info-toggle { padding: 6px 8px; font-size: 11px; }
        .info-grid { grid-template-columns: 1fr; }
        .pos-calc { padding: 12px; margin-top: 8px; }
        .pos-fields { gap: 8px; }
        .pos-field { min-width: 100px; }
        .pos-results { gap: 8px; }
        .pos-card { min-width: 100px; }
        .seo-guide { padding: 20px 12px; }
        .seo-guide h1 { font-size: 1.4rem; }
        .seo-guide h2 { font-size: 1.1rem; }
        .seo-guide p { font-size: 14px; }
        .seo-guide ul { padding-left: 16px; }
        .wl-panel { border-radius: 10px; }
        .wl-header { padding: 10px 12px; }
        .wl-add-form { flex-direction: column; gap: 8px; padding: 10px; }
        .wl-add-form .wl-field { width: 100%; }
        .wl-add-form .wl-field select,
        .wl-add-form .wl-field input { width: 100%; min-width: 0; }
        .wl-add-btn { width: 100%; }
        .wl-explainer { padding: 10px; }
        .wl-explainer p { font-size: 12px; }
        .wl-step { font-size: 12px; }
    }
    @media (max-width: 400px) {
        #chart-area { height: 280px; }
        .chart-search input { width: 60px; font-size: 13px; }
        .tf-btn { padding: 5px 6px; font-size: 10px; }
        .chart-symbol { font-size: 14px; }
    }
    .seo-guide {
        max-width: 900px;
        margin: 0 auto 32px;
        padding: 40px 24px;
        line-height: 1.8;
        color: var(--text-muted);
    }
    .seo-guide h1 {
        font-size: 2.2rem;
        font-weight: 800;
        color: var(--text-main);
        margin-bottom: 20px;
        line-height: 1.3;
    }
    .seo-guide h2 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--text-main);
        margin: 28px 0 12px;
    }
    .seo-guide p {
        margin-bottom: 14px;
        font-size: 15px;
    }
    .seo-guide ul {
        margin: 10px 0 18px 20px;
        font-size: 15px;
    }
    .seo-guide li {
        margin-bottom: 6px;
    }
    .seo-guide strong {
        color: var(--text-main);
    }

/* ── Multi-Chart Section ── */
.multi-chart-section { max-width: 1400px; margin: 0 auto; padding: 36px 16px 52px; }
.multi-chart-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.multi-chart-top h2 { font-size: 1.2rem; font-weight: 700; color: var(--text-main); margin: 0 0 4px; display: flex; align-items: center; gap: 9px; }
.multi-chart-top p { font-size: 13px; color: var(--text-muted); margin: 0; }
.mini-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mini-chart-card { background: var(--card); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.2s; }
.mini-chart-card:hover { border-color: rgba(34,197,94,0.25); }
.mini-chart-header { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-ticker-form { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.mini-ticker-input { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 7px; color: var(--text-main); font-size: 13px; font-weight: 700; padding: 5px 9px; width: 76px; text-transform: uppercase; letter-spacing: 0.04em; }
.mini-ticker-input::placeholder { font-weight: 400; color: var(--text-muted); text-transform: none; }
.mini-ticker-input:focus { outline: none; border-color: var(--accent); background: rgba(34,197,94,0.05); }
.mini-go-btn { background: var(--accent); color: #000; border: none; border-radius: 7px; font-size: 11px; font-weight: 800; padding: 5px 10px; cursor: pointer; letter-spacing: 0.06em; transition: opacity 0.15s; }
.mini-go-btn:hover { opacity: 0.82; }
.mini-tf-bar { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.mini-tf-bar::-webkit-scrollbar { display: none; }
.mini-tf-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 5px; color: var(--text-muted); font-size: 11px; font-weight: 600; padding: 3px 7px; cursor: pointer; transition: all 0.15s; }
.mini-tf-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.mini-tf-btn.active { background: rgba(34,197,94,0.13); border-color: rgba(34,197,94,0.45); color: var(--accent); }
.mini-chart-area { height: 240px; width: 100%; position: relative; background: #0b1120; }
.mini-chart-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11,17,32,0.75); font-size: 12px; color: var(--text-muted); z-index: 5; letter-spacing: 0.06em; }
.mini-chart-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--text-muted); font-size: 13px; }
.mini-chart-placeholder svg { opacity: 0.25; }
.mini-chart-status { padding: 8px 12px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: space-between; min-height: 34px; }
.mini-price { font-size: 13px; font-weight: 700; color: var(--text-main); }
.mini-ticker-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.mini-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; letter-spacing: 0.04em; }
.mini-badge.bull { background: rgba(34,197,94,0.14); color: #22c55e; }
.mini-badge.bear { background: rgba(239,68,68,0.14); color: #ef4444; }
.mini-badge.neutral { background: rgba(255,255,255,0.07); color: var(--text-muted); }
/* Gate */
.multi-chart-gate { position: relative; border-radius: 14px; overflow: hidden; }
.multi-chart-gate .mini-charts-grid { filter: blur(4px); opacity: 0.28; pointer-events: none; user-select: none; }
.multi-chart-gate-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(6,11,24,0.55); backdrop-filter: blur(2px); gap: 14px; padding: 28px; text-align: center; z-index: 10; }
.gate-lock-ring { width: 56px; height: 56px; background: rgba(34,197,94,0.1); border: 1.5px solid rgba(34,197,94,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.multi-chart-gate-overlay h3 { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin: 0; }
.multi-chart-gate-overlay p { font-size: 14px; color: var(--text-muted); margin: 0; max-width: 460px; line-height: 1.7; }
.multi-chart-gate-overlay p strong { color: var(--text-main); }
.gate-price-badge { display: inline-flex; align-items: baseline; gap: 3px; font-size: 2rem; font-weight: 900; color: #22c55e; line-height: 1; letter-spacing: -0.02em; }
.gate-price-badge span { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.gate-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.gate-btn-primary { background: var(--accent); color: #000; border: none; border-radius: 9px; font-size: 14px; font-weight: 800; padding: 11px 24px; cursor: pointer; text-decoration: none; display: inline-block; transition: opacity 0.15s; letter-spacing: 0.03em; }
.gate-btn-primary:hover { opacity: 0.85; color: #000; }
.gate-btn-secondary { background: rgba(255,255,255,0.06); color: var(--text-main); border: 1px solid rgba(255,255,255,0.12); border-radius: 9px; font-size: 14px; font-weight: 600; padding: 11px 24px; cursor: pointer; text-decoration: none; display: inline-block; transition: background 0.15s; }
.gate-btn-secondary:hover { background: rgba(255,255,255,0.1); }
.mini-chips-row { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; flex-wrap: wrap; gap: 4px; background: rgba(0,0,0,0.15); }
.mini-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); cursor: pointer; font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.03em; transition: all 0.15s; user-select: none; white-space: nowrap; }
.mini-chip input { display: none; }
.mini-chip .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mini-chip:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
.mini-chip.active { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: var(--text-main); }
.mini-mode-wrap { display: flex; align-items: center; gap: 3px; padding: 0 4px; border-left: 1px solid rgba(148,163,184,0.1); margin-left: 4px; }
.mini-mode-btn { font-size: 9px; font-weight: 700; letter-spacing: 0.4px; color: var(--text-muted); cursor: pointer; padding: 2px 8px; border-radius: 5px; border: 1px solid transparent; background: transparent; transition: all 0.15s; text-transform: uppercase; }
.mini-mode-btn:hover { color: var(--text-main); border-color: rgba(148,163,184,0.2); }
.mini-mode-btn.active { color: #22c55e; background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); }
.mini-mode-btn.active.draw-active { color: #f59e0b; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }
.mini-draw-row { display: none; align-items: center; gap: 4px; padding: 5px 10px; border-bottom: 1px solid rgba(245,158,11,0.12); background: rgba(245,158,11,0.04); flex-wrap: wrap; }
.mini-draw-row.visible { display: flex; }
.mini-draw-tool { display: flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted); cursor: pointer; padding: 3px 7px; border-radius: 5px; border: 1px solid transparent; background: transparent; transition: all 0.15s; text-transform: uppercase; }
.mini-draw-tool .dot { width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; }
.mini-draw-tool:hover { border-color: rgba(148,163,184,0.2); color: var(--text-main); }
.mini-draw-tool.active { color: var(--text-main); border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.07); }
.mini-draw-clear { margin-left: auto; color: rgba(239,68,68,0.6); }
.mini-draw-clear:hover { color: #ef4444; border-color: rgba(239,68,68,0.3) !important; background: rgba(239,68,68,0.06) !important; }
.mini-draw-hint { font-size: 9px; color: #f59e0b; opacity: 0.7; margin-left: 2px; font-style: italic; }
@media (max-width: 640px) { .mini-charts-grid { grid-template-columns: 1fr; } .multi-chart-section { padding: 20px 8px 32px; } }
.dash-expand-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; padding: 8px 16px; border-radius: 9px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); transition: all 0.15s; letter-spacing: 0.03em; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.dash-expand-btn:hover { border-color: rgba(34,197,94,0.35); color: #22c55e; background: rgba(34,197,94,0.07); }
.dash-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #060b18; z-index: 9000; display: none; flex-direction: column; animation: dashIn 0.2s ease; }
.dash-overlay.open { display: flex; }
@keyframes dashIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
.dash-header-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); background: var(--card); flex-shrink: 0; gap: 12px; }
.dash-header-left { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: var(--text-main); }
.dash-close-btn { font-size: 12px; font-weight: 700; color: var(--text-muted); cursor: pointer; padding: 7px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04); transition: all 0.15s; letter-spacing: 0.03em; }
.dash-close-btn:hover { border-color: rgba(239,68,68,0.35); color: #ef4444; background: rgba(239,68,68,0.06); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; flex: 1; gap: 3px; background: rgba(0,0,0,0.4); overflow: hidden; }
.dash-cell { background: #0b1120; display: flex; flex-direction: column; overflow: hidden; }
.dash-cell-header { padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 8px; flex-shrink: 0; background: var(--card); }
.dash-cell-ticker { font-size: 15px; font-weight: 900; color: var(--text-main); letter-spacing: 0.06em; }
.dash-cell-price { font-size: 13px; font-weight: 700; color: var(--text-main); margin-left: auto; }
.dash-cell-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.dash-cell-badge.up { background: rgba(34,197,94,0.12); color: #22c55e; }
.dash-cell-badge.down { background: rgba(239,68,68,0.12); color: #ef4444; }
.dash-cell-badge.neutral { background: rgba(148,163,184,0.1); color: #94a3b8; }
.dash-tf-bar { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.dash-tf-bar::-webkit-scrollbar { display: none; }
.dash-tf-btn { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; transition: all 0.12s; }
.dash-tf-btn:hover { color: var(--text-main); }
.dash-tf-btn.active { color: var(--text-main); background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }
.dash-chip-bar { padding: 4px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; background: rgba(0,0,0,0.12); flex-shrink: 0; }
.dash-chip-bar::-webkit-scrollbar { display: none; }
.dash-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); cursor: pointer; font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.03em; transition: all 0.12s; user-select: none; white-space: nowrap; flex-shrink: 0; }
.dash-chip input { display: none; }
.dash-chip .dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.dash-chip:hover { background: rgba(255,255,255,0.07); color: var(--text-main); }
.dash-chip.active { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.18); color: var(--text-main); }
.dash-chart-area { flex: 1; position: relative; min-height: 0; }
.dash-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--text-muted); font-size: 13px; }
.dash-ticker-input { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: var(--text-main); font-size: 13px; font-weight: 700; padding: 4px 8px; width: 72px; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-ticker-input:focus { outline: none; border-color: var(--accent); }
.dash-go-btn { font-size: 11px; font-weight: 800; color: #000; background: var(--accent); border: none; border-radius: 6px; padding: 4px 10px; cursor: pointer; letter-spacing: 0.04em; }
.dash-go-btn:hover { opacity: 0.85; }

/* ── Trend Context — inline toolbar chips ── */
.tc-inline { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tc-item { display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); white-space: nowrap; }
.tc-item-sym { font-size: 11px; font-weight: 800; color: var(--text-main); letter-spacing: 0.05em; }
.tc-item-div { width: 1px; height: 9px; background: rgba(255,255,255,0.14); margin: 0 1px; }
.tc-item-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.tc-item-badge.up    { color: #22c55e; }
.tc-item-badge.down  { color: #ef4444; }
.tc-item-badge.range { color: #94a3b8; }
.tc-item.up-bg   { border-color: rgba(34,197,94,0.25); background: rgba(34,197,94,0.08); }
.tc-item.down-bg { border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.08); }
.tc-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.1); margin: 0 2px; flex-shrink: 0; }
@media (max-width: 860px) { .tc-inline { display: none; } }

/* ── Chart News Strip ─────────────────────────────────────────── */
.chart-news-strip {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}
.chart-news-strip.loaded { display: flex; }
.cns-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.cns-header-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}
.cns-header-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}
.cns-header-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: cns-pulse 2s ease-in-out infinite;
}
@keyframes cns-pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.35; }
}
.cns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.cns-card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
}
.cns-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34,197,94,0.35);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(34,197,94,0.12);
}
.cns-card-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
    background: #0d1829;
}
.cns-card-img-placeholder {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #0f1e35 0%, #0d1829 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cns-card-img-placeholder svg { opacity: 0.18; }
.cns-card-body {
    padding: 9px 11px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}
.cns-badge-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cns-badge-live {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #22c55e;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
}
.cns-source {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cns-headline {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.cns-age {
    font-size: 10px;
    color: #475569;
    margin-top: auto;
}
.cns-ext-icon {
    position: absolute;
    top: 8px; right: 8px;
    width: 20px; height: 20px;
    background: rgba(0,0,0,0.55);
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.cns-card:hover .cns-ext-icon { opacity: 1; }
@media (max-width: 900px) {
    .cns-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .cns-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .cns-card-img, .cns-card-img-placeholder { height: 60px; }
    .cns-headline { font-size: 11px; -webkit-line-clamp: 2; }
}

/* ═══════════════════════════════════════════════════════════
   TREND LINE + TRADE PLAN DRAW TOOLS
   ═══════════════════════════════════════════════════════════ */
.draw-tools-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.1);
    margin: 0 6px;
    vertical-align: middle;
}
.draw-tool-trendline {
    border-color: rgba(148,163,184,0.35) !important;
    color: #94a3b8 !important;
    gap: 4px;
    display: inline-flex;
    align-items: center;
}
.draw-tool-trendline.active,
.draw-tool-trendline:hover {
    background: rgba(148,163,184,0.18) !important;
    border-color: #94a3b8 !important;
    color: #e2e8f0 !important;
}
.draw-tool-trade {
    border-color: rgba(34,197,94,0.35) !important;
    color: #4ade80 !important;
    gap: 4px;
    display: inline-flex;
    align-items: center;
}
.draw-tool-trade.active,
.draw-tool-trade:hover {
    background: rgba(34,197,94,0.18) !important;
    border-color: #22c55e !important;
    color: #86efac !important;
}

/* ═══════════════════════════════════════════════════════════
   TRADE P&L FLOATING PANEL
   ═══════════════════════════════════════════════════════════ */
.trade-pnl-panel {
    position: absolute;
    top: 52px;
    left: 14px;
    background: rgba(10,18,34,0.94);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 14px 10px 14px;
    font-size: 12px;
    z-index: 25;
    min-width: 158px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.55);
    color: #e2e8f0;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}
.tpp-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tpp-title {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tpp-dir {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 4px;
}
.tpp-long  { background: rgba(34,197,94,0.2);  color: #4ade80; border: 1px solid rgba(34,197,94,0.4); }
.tpp-short { background: rgba(239,68,68,0.2);  color: #f87171; border: 1px solid rgba(239,68,68,0.4); }
.tpp-row, .tpp-rr-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}
.tpp-rr-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0;
}
.tpp-lbl { color: #64748b; font-size: 11px; }
.tpp-val  { font-weight: 600; font-size: 12px; color: #e2e8f0; }
.tpp-green { color: #4ade80; }
.tpp-red   { color: #f87171; }
.tpp-rr    { color: #fbbf24; font-size: 13px; }
.tpp-close {
    position: absolute;
    top: 6px; right: 8px;
    background: none;
    border: none;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 3px;
}
.tpp-close:hover { color: #94a3b8; background: rgba(255,255,255,0.06); }

/* chart-frame needs relative positioning for the overlay */
.chart-frame { position: relative; }

/* ═══════════════════════════════════════════════════════════
   COURSE SHORTCUT — toolbar pill & draw-row link
   ═══════════════════════════════════════════════════════════ */
.chart-course-pill {
    display: flex; align-items: center; gap: 7px;
    margin-left: auto;
    padding: 5px 12px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 20px;
    text-decoration: none;
    color: #4ade80;
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.chart-course-pill:hover {
    background: rgba(34,197,94,0.14);
    border-color: rgba(34,197,94,0.45);
    color: #86efac;
}
.chart-course-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 1px solid rgba(34,197,94,0.35);
    flex-shrink: 0;
}
/* In the draw-tools row */
.chart-course-draw-btn {
    text-decoration: none;
    color: #4ade80 !important;
    border-color: rgba(34,197,94,0.3) !important;
}
.chart-course-draw-btn:hover {
    color: #86efac !important;
    background: rgba(34,197,94,0.07) !important;
    border-color: rgba(34,197,94,0.5) !important;
}
.chart-course-draw-avatar {
    width: 14px; height: 14px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    flex-shrink: 0;
}
/* Collapse pill label on narrow screens */
@media (max-width: 640px) {
    .chart-course-pill span { display: none; }
    .chart-course-pill { padding: 5px 7px; }
}

/* ═══════════════════════════════════════════════════════════
   FLOATING COURSE BADGE (fixed bottom-right, chart page)
   ═══════════════════════════════════════════════════════════ */
#chart-course-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(6,11,24,0.97);
    border: 1px solid rgba(34,197,94,0.4);
    border-radius: 16px;
    padding: 10px 14px 10px 10px;
    text-decoration: none;
    box-shadow: 0 4px 28px rgba(0,0,0,0.55), 0 0 0 1px rgba(34,197,94,0.08);
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
#chart-course-float:hover {
    transform: translateY(-2px);
    border-color: rgba(34,197,94,0.7);
    box-shadow: 0 8px 36px rgba(0,0,0,0.6), 0 0 18px rgba(34,197,94,0.12);
}
#chart-course-float img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 2px solid rgba(34,197,94,0.45);
    flex-shrink: 0;
}
.ccf-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #4ade80;
    line-height: 1;
    margin-bottom: 3px;
}
.ccf-title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1;
}
.ccf-arrow {
    color: rgba(74,222,128,0.7);
    flex-shrink: 0;
    margin-left: 2px;
}
/* Shrink on mobile so it doesn't block the chart */
@media (max-width: 640px) {
    #chart-course-float { padding: 8px; gap: 0; border-radius: 50%; bottom: 18px; right: 18px; }
    #chart-course-float div, #chart-course-float .ccf-arrow { display: none; }
    #chart-course-float img { width: 46px; height: 46px; border-width: 2px; }
}
