/* --- Theme Overrides for Header and Back Button --- */
        .web-title {
            color: #a855f7 !important;
            background: none !important;
            -webkit-background-clip: initial !important;
            -webkit-text-fill-color: initial !important;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
        }

        .circle-back-btn {
            background: rgba(124, 58, 237, 0.9) !important;
            border: 2px solid #a855f7 !important;
            color: #ffffff !important;
        }

        .circle-back-btn:hover {
            background: #7c3aed !important;
            border-color: #fbbf24 !important;
        }

        /* Top Right Prep Score Widget - Gold Theme, Larger Photo, Smaller Bar */
        .prep-score-widget {
            position: fixed;
            top: 25px;
            right: 25px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            width: 200px;
        }

        .prep-main-img {
            width: 100%;
            height: 110px;
            object-fit: cover;
            border-radius: 8px;
            border: 2px solid #f59e0b;
            display: block;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.4);
        }

        .prep-bar {
            position: relative;
            background: rgba(40, 30, 2, 0.95);
            border: 1px solid #f59e0b;
            border-radius: 10px;
            width: 100%;
            padding: 20px 8px 6px 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            box-sizing: border-box;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.2);
            backdrop-filter: blur(10px);
        }

        .prep-score-top-box {
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            background: #271c03;
            border: 1px solid #f59e0b;
            border-radius: 5px;
            padding: 1px 8px;
            text-align: center;
            box-shadow: 0 2px 6px rgba(0,0,0,0.5);
        }

        .prep-score-label {
            font-size: 0.6rem;
            color: #fde68a;
            text-transform: uppercase;
            font-weight: 700;
        }

        .prep-score-value {
            font-size: 0.95rem;
            font-weight: 800;
            color: #fef08a;
            line-height: 1.1;
            text-align: center;
            margin: 2px 0;
            text-shadow: 0 0 10px rgba(254, 240, 138, 0.5);
        }

        .valeria-box {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(60, 45, 5, 0.9);
            border: 1px solid rgba(245, 158, 11, 0.6);
            border-radius: 5px;
            padding: 3px 5px;
            width: 100%;
            box-sizing: border-box;
            gap: 4px;
        }

        .valeria-tiny-img {
            width: 24px;
            height: 24px;
            object-fit: cover;
            border-radius: 50%;
            border: 1px solid #f59e0b;
            flex-shrink: 0;
        }

        .valeria-text {
            font-size: 0.65rem;
            color: #fef3c7;
            font-weight: 600;
            white-space: nowrap;
        }

        .valeria-select-row select {
            background: rgba(40, 30, 2, 0.9);
            color: #fef08a;
            border: 1px solid #f59e0b;
            border-radius: 4px;
            padding: 1px 3px;
            font-size: 0.7rem;
            text-align: center;
            cursor: pointer;
        }

        .gear-hub-wrapper {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 100%;
            padding: 10px;
            gap: 15px;
        }

        /* --- My Current Stock Container --- */
        .stock-container {
            width: 960px;
            background: rgba(30, 27, 75, 0.9);
            border: 2px solid #a855f7;
            border-radius: 20px;
            padding: 12px 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            box-sizing: border-box;
            z-index: 20;
        }

        .stock-title {
            color: #fbbf24;
            font-weight: 700;
            font-size: 0.9rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
            text-align: center;
        }

        .stock-items-group {
            display: flex;
            justify-content: space-around;
            align-items: center;
            gap: 10px;
        }

        .stock-item {
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(45, 38, 77, 0.7);
            border: 1px solid #a855f7;
            border-radius: 10px;
            padding: 4px 10px;
        }

        .stock-controls {
            display: flex;
            align-items: center;
            gap: 3px;
        }

        .stock-adj-btn {
            background: rgba(124, 58, 237, 0.7);
            border: 1px solid #a855f7;
            color: #f8fafc;
            font-weight: 700;
            font-size: 0.8rem;
            width: 22px;
            height: 22px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            user-select: none;
        }

        .stock-adj-btn:hover {
            background: #7c3aed;
            border-color: #fbbf24;
            transform: scale(1.05);
        }

        .stock-item input {
            width: 70px;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid #7c3aed;
            border-radius: 6px;
            color: #f8fafc;
            font-weight: 700;
            font-size: 0.85rem;
            padding: 2px 6px;
            text-align: right;
            outline: none;
        }

        .stock-item input[type="number"]::-webkit-inner-spin-button,
        .stock-item input[type="number"]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .stock-item input[type="number"] {
            -moz-appearance: textfield;
        }

        .stock-item input:focus {
            border-color: #fbbf24;
        }

        .chief-container {
            position: relative;
            width: 960px; /* Increased from 920px */
            height: 630px; /* Increased from 600px */
            background: radial-gradient(circle, rgba(224, 212, 250, 0.85) 0%, rgba(165, 142, 214, 0.95) 100%);
            border: 3px solid rgba(255, 255, 255, 0.6);
            border-radius: 32px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 25px rgba(255, 255, 255, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .gear-slot-pair {
            position: absolute;
            display: flex;
            align-items: center;
            gap: 6px;
            z-index: 5;
        }

        .gear-adj-controls {
            display: flex;
            flex-direction: column;
            gap: 3px;
            justify-content: center;
            align-items: center;
            z-index: 10;
        }

        .gear-adj-btn {
            background: rgba(124, 58, 237, 0.8);
            border: 1px solid #a855f7;
            color: #f8fafc;
            font-size: 0.65rem;
            width: 20px;
            height: 20px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            user-select: none;
            padding: 0;
            line-height: 1;
        }

        .gear-adj-btn:hover {
            background: #7c3aed;
            border-color: #fbbf24;
            transform: scale(1.1);
        }

        .gear-arrow {
            position: relative;
            width: 44px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 6;
            user-select: none;
            margin: 0 4px;
        }

        .gear-box {
            width: 76px;
            height: 76px;
            background: rgba(45, 38, 77, 0.65);
            border: 2px solid #d8b4fe;
            border-radius: 14px;
            position: relative;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: visible;
        }

        .gear-box:hover {
            border-color: #f59e0b;
            background: rgba(70, 58, 115, 0.85);
            transform: scale(1.08);
            z-index: 30;
        }

        .gear-box img.base-gear {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: inherit;
        }

        .gear-tier-badge {
            position: absolute;
            top: 4px;
            left: 4px;
            font-size: 0.75rem;
            font-weight: 900;
            color: #fbbf24;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
            z-index: 3;
            letter-spacing: -0.5px;
        }

        .gear-stars-container {
            position: absolute;
            bottom: 4px;
            left: 4px;
            display: flex;
            flex-direction: column;
            gap: 2px;
            z-index: 3;
        }

        .gear-star-icon {
            width: 14px;
            height: 14px;
            object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
        }

        .gear-extra-bar {
            position: absolute;
            bottom: -16px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 2px;
            background: rgba(30, 27, 75, 0.9);
            border: 2px solid #fbbf24;
            border-radius: 4px;
            padding: 2px;
            z-index: 15;
            box-shadow: 0 2px 4px rgba(0,0,0,0.5);
        }

        .gear-bar-seg {
            width: 14px;
            height: 8px;
            background: #4b5563;
            border: 1px solid #fbbf24;
            border-radius: 1px;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .gear-bar-seg:hover {
            filter: brightness(1.2);
        }

        .gear-bar-seg.active {
            background: #22c55e;
        }

        .slot-top-left { top: 25px; left: 20px; }
        .slot-mid-left { top: 220px; left: 5px; }
        .slot-bot-left { top: 415px; left: 20px; }
        .slot-top-right { top: 25px; right: 20px; }
        .slot-mid-right { top: 220px; right: 5px; }
        .slot-bot-right { top: 415px; right: 20px; }

        .slot-subpanel {
            position: absolute;
            display: flex;
            flex-direction: column;
            gap: 3px;
            background: rgba(30, 27, 75, 0.92);
            border: 1.5px solid #a855f7;
            border-radius: 12px;
            padding: 6px 8px;
            z-index: 20;
            width: 226px;
            box-sizing: border-box;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        }

        .subpanel-0 { top: 120px; left: 35px; }
        .subpanel-1 { top: 120px; right: 35px; }
        .subpanel-2 { top: 315px; left: 10px; }
        .subpanel-3 { top: 315px; right: 10px; }
        .subpanel-4 { top: 510px; left: 35px; }
        .subpanel-5 { top: 510px; right: 35px; }

        /* --- Mass Action Panel Styling --- */
        .mass-action-panel {
            position: absolute;
            top: 95px; /* Moved upwards from 130px */
            left: 50%;
            transform: translateX(-50%);
            width: 140px; /* Made smaller from 140px */
            height: 140px; /* Made smaller from 140px */
            z-index: 22;
            transition: transform 0.3s ease; /* Removed opacity property to eliminate transparency */
        }

        .mass-action-panel:hover {
            transform: translateX(-50%) scale(1.15); /* Becomes larger when hovered */
        }

        .mass-panel-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(45deg);
            width: 98px; /* Adjusted to fit the smaller panel */
            height: 98px; /* Adjusted to fit the smaller panel */
            /* noinspection CssUnresolvedFile */
            background: linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.65)), url("/static/image/mass-select.png");
            background-size: cover;
            background-position: center;
            border: 1.5px solid #a855f7;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
            pointer-events: none;
        }

        .mass-panel-text {
            transform: rotate(-45deg);
            color: #fef08a; /* Brighter color for better visibility */
            font-weight: 900;
            font-size: 0.72rem; /* Increased from 0.65rem */
            text-align: center;
            text-shadow: 0 0 4px rgba(0, 0, 0, 1), 1px 1px 2px rgba(0, 0, 0, 0.9); /* Stronger shadow */
            line-height: 1.1;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .mass-btn {
            position: absolute;
            background: rgba(30, 27, 75, 0.95);
            border: 1px solid #a855f7;
            color: #f3e8ff;
            font-size: 0.62rem;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            box-sizing: border-box;
            transition: all 0.2s ease;
            z-index: 1;
            user-select: none;
            line-height: 1.1;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        .mass-btn:hover {
            background: #7c3aed;
            color: #fbbf24;
            border-color: #fbbf24;
        }

        .mass-btn-tl {
            top: 0;
            left: 0;
            width: 50%;
            height: 50%;
            clip-path: polygon(0 0, 100% 0, 0 100%);
            align-items: flex-start;
            justify-content: flex-start;
            padding: 8px 0 0 8px;
            text-align: left;
            border-top-left-radius: 12px;
        }

        .mass-btn-tr {
            top: 0;
            right: 0;
            width: 50%;
            height: 50%;
            clip-path: polygon(0 0, 100% 0, 100% 100%);
            align-items: flex-start;
            justify-content: flex-end;
            padding: 8px 8px 0 0;
            text-align: right;
            border-top-right-radius: 12px;
        }

        .mass-btn-bl {
            bottom: 0;
            left: 0;
            width: 50%;
            height: 50%;
            clip-path: polygon(0 0, 0 100%, 100% 100%);
            align-items: flex-end;
            justify-content: flex-start;
            padding: 0 0 8px 8px;
            text-align: left;
            border-bottom-left-radius: 12px;
        }

        .mass-btn-br {
            bottom: 0;
            right: 0;
            width: 50%;
            height: 50%;
            clip-path: polygon(100% 0, 0 100%, 100% 100%);
            align-items: flex-end;
            justify-content: flex-end;
            padding: 0 8px 8px 0;
            text-align: right;
            border-bottom-right-radius: 12px;
        }

        .subpanel-col-group {
            display: flex;
            gap: 6px;
            width: 100%;
            justify-content: space-between;
        }

        .subpanel-half {
            display: flex;
            flex-direction: column;
            gap: 2px;
            width: 48%;
        }

        .slot-change-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #fbbf24;
            font-weight: 700;
            font-size: 0.68rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        .slot-change-left {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .menu-icon-img {
            width: 13px;
            height: 13px;
            object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
        }

        .grand-totals-panel {
            position: absolute;
            top: 60%; /* Moved down from 50% to prevent overlapping */
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            gap: 6px;
            background: rgba(30, 27, 75, 0.92);
            border: 2px solid #a855f7;
            border-radius: 16px;
            padding: 10px 16px;
            z-index: 20;
            width: 200px;
            box-sizing: border-box;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        }

        .grand-totals-tabs {
            display: flex;
            gap: 4px;
            background: rgba(15, 23, 42, 0.6);
            border: 1px solid #7c3aed;
            border-radius: 8px;
            padding: 2px;
            margin-bottom: 2px;
        }

        .totals-tab-btn {
            flex: 1;
            background: transparent;
            border: none;
            color: #c084fc;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 3px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-align: center;
        }

        .totals-tab-btn:hover {
            color: #ffffff;
        }

        .totals-tab-btn.active {
            background: #7c3aed;
            color: #ffffff;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
        }

        .grand-total-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: #fbbf24;
            font-weight: 700;
            font-size: 0.8rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        .grand-total-left {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .res-icon-img {
            width: 30px;
            height: 30px;
            object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
        }

        .bottom-summary-container {
            width: 960px;
            background: rgba(30, 27, 75, 0.9);
            border: 2px solid #a855f7;
            border-radius: 20px;
            padding: 14px 24px;
            display: flex;
            justify-content: space-around;
            align-items: center;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            box-sizing: border-box;
            z-index: 20;
        }

        .bottom-summary-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .bottom-summary-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #f3e8ff;
            font-weight: 700;
            font-size: 0.85rem;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        }

        .bottom-summary-item span {
            color: #fbbf24;
        }

        .gear-tooltip {
            position: fixed;
            background: rgba(15, 23, 42, 0.95);
            border: 2px solid #f59e0b;
            border-radius: 12px;
            padding: 10px 14px;
            color: #f8fafc;
            font-size: 0.8rem;
            pointer-events: none;
            z-index: 10000;
            display: none;
            box-shadow: 0 10px 25px rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            min-width: 160px;
        }

        .gear-tooltip-title {
            font-weight: 900;
            color: #fbbf24;
            margin-bottom: 4px;
            border-bottom: 1px solid #334155;
            padding-bottom: 3px;
        }

        .gear-tooltip-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-top: 3px;
        }

        .gear-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.85);
            backdrop-filter: blur(6px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .gear-modal-overlay.active {
            display: flex;
        }

        .gear-modal-content {
            background: #1e1b4b;
            border: 2px solid #a855f7;
            border-radius: 20px;
            width: 650px;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
            overflow: hidden;
        }

        .gear-modal-header {
            padding: 16px 20px;
            background: #312e81;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #4338ca;
        }

        .gear-modal-title {
            color: #f3e8ff;
            font-size: 1.1rem;
            font-weight: 700;
            margin: 0;
        }

        .gear-modal-close {
            background: transparent;
            border: none;
            color: #c084fc;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }

        .gear-modal-close:hover {
            color: #ffffff;
        }

        .gear-modal-grid {
            padding: 20px;
            overflow-y: auto;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 12px;
            justify-items: center;
        }

        .gear-modal-item {
            width: 76px;
            height: 76px;
            background: rgba(45, 38, 77, 0.8);
            border: 2px solid #6d28d9;
            border-radius: 10px;
            position: relative;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .gear-modal-item:hover {
            border-color: #fbbf24;
            transform: scale(1.08);
            box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
        }

        .gear-modal-item img.base-gear {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        @keyframes quickBuildSweep {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(200%); }
        }

        .quick-build-btn {
            position: relative;
            background: linear-gradient(135deg, #7c3aed, #a855f7);
            border: 2px solid #fbbf24;
            border-radius: 12px;
            color: #ffffff;
            font-weight: 900;
            font-size: 0.85rem;
            padding: 6px 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 15px rgba(124, 58, 237, 0.5);
            transition: all 0.2s ease;
            user-select: none;
            overflow: hidden;
        }

        .quick-build-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 50%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transform: translateX(-100%);
            animation: quickBuildSweep 2s infinite ease-in-out;
        }

        .quick-build-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
        }


        /* ============================================================
           2026 Premium Chief Gear refresh — local/offline only
           ============================================================ */
        :root {
            --cg-ink: #070b1c;
            --cg-panel: rgba(15, 18, 47, 0.90);
            --cg-panel-2: rgba(27, 24, 66, 0.88);
            --cg-purple: #8b5cf6;
            --cg-purple-2: #a78bfa;
            --cg-gold: #f5c451;
            --cg-ice: #dbeafe;
            --cg-line: rgba(196, 181, 253, 0.35);
        }
        body { overflow-x: hidden; }
        .hub-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 18px 48px; box-sizing: border-box; }
        .gear-hub-wrapper { padding: 0; gap: 18px; }
        .chief-hero-shell {
            width: min(1040px, calc(100vw - 36px)); margin: 6px auto 20px; padding: 18px 22px 22px; box-sizing: border-box;
            border-radius: 26px; border: 1px solid rgba(196,181,253,.42);
            background: radial-gradient(circle at 85% 0%, rgba(139,92,246,.24), transparent 34%), linear-gradient(145deg, rgba(7,11,28,.92), rgba(28,24,67,.90));
            box-shadow: 0 28px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(16px); position: relative; overflow: hidden;
        }
        .chief-hero-shell::after { content:""; position:absolute; inset:auto -10% -70% 36%; height:190px; background:radial-gradient(circle, rgba(245,196,81,.16), transparent 66%); pointer-events:none; }
        .chief-hero-topline { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px; margin-bottom:20px; }
        .chief-back-pill, .chief-version-pill { border:1px solid var(--cg-line); background:rgba(15,23,42,.62); color:#f5f3ff; border-radius:999px; padding:8px 13px; font-size:.72rem; font-weight:800; letter-spacing:.02em; text-decoration:none; width:max-content; }
        .chief-back-pill:hover { border-color:var(--cg-gold); color:#fff; transform:translateY(-1px); }
        .chief-version-pill { justify-self:end; color:#fde68a; }
        .chief-kicker { color:#c4b5fd; font-size:.66rem; font-weight:900; letter-spacing:.18em; text-align:center; }
        .chief-hero-copy { display:grid; grid-template-columns:1.05fr .95fr; gap:24px; align-items:end; }
        .chief-mini-label { color:var(--cg-gold); font-size:.7rem; letter-spacing:.2em; font-weight:900; margin-bottom:6px; }
        .chief-premium-title { margin:0; text-align:left; color:#fff !important; font-size:clamp(2rem,4vw,3.25rem); letter-spacing:-.045em; line-height:.98; text-shadow:0 12px 30px rgba(0,0,0,.45); }
        .chief-hero-lead { color:#cbd5e1; max-width:590px; margin:13px 0 0; font-size:.92rem; line-height:1.55; }
        .chief-feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
        .chief-feature-card { min-height:72px; border:1px solid rgba(167,139,250,.22); background:rgba(8,12,32,.46); border-radius:14px; padding:10px 11px; display:grid; grid-template-columns:auto 1fr; column-gap:8px; align-content:center; }
        .chief-feature-card > span { grid-row:1/3; color:rgba(245,196,81,.72); font-size:.65rem; font-weight:900; padding-top:2px; }
        .chief-feature-card b { color:#f8fafc; font-size:.76rem; }
        .chief-feature-card small { color:#94a3b8; font-size:.62rem; margin-top:2px; }
        .prep-score-widget { top:18px; right:18px; width:174px; opacity:.94; }
        .prep-main-img { height:88px; border-radius:12px; }
        .prep-bar { border-radius:14px; padding-top:18px; }
        .stock-container, .bottom-summary-container { width:min(960px, calc(100vw - 36px)); border:1px solid rgba(196,181,253,.38); background:linear-gradient(145deg, rgba(15,18,47,.93), rgba(33,27,74,.90)); box-shadow:0 18px 48px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06); }
        .stock-container { padding:14px 18px 16px; gap:12px; }
        .stock-heading-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
        .stock-title { color:#fff; font-size:.92rem; text-align:left; }
        .stock-subtitle { color:#94a3b8; font-size:.64rem; margin-top:2px; }
        .stock-live-pill { color:#c4b5fd; border:1px solid rgba(167,139,250,.35); background:rgba(124,58,237,.14); padding:5px 8px; border-radius:999px; font-size:.58rem; font-weight:900; letter-spacing:.08em; }
        .stock-items-group { gap:8px; }
        .stock-item { flex:1; justify-content:center; border:1px solid rgba(167,139,250,.32); background:rgba(7,11,28,.48); border-radius:12px; padding:7px 8px; }
        .stock-item input { width:76px; border-color:rgba(167,139,250,.35); }
        .chief-container { width:960px; height:690px; max-width:calc(100vw - 36px); border-radius:30px; border:1px solid rgba(255,255,255,.58); background:radial-gradient(circle at 50% 34%, rgba(238,232,255,.93), rgba(174,153,221,.94) 56%, rgba(94,74,151,.94) 100%); box-shadow:0 28px 65px rgba(0,0,0,.42), inset 0 0 36px rgba(255,255,255,.34); overflow:visible; }
        .planner-command-deck { position:absolute; top:13px; left:50%; transform:translateX(-50%); width:520px; max-width:56%; min-height:69px; z-index:24; border:1px solid rgba(167,139,250,.5); background:linear-gradient(135deg, rgba(13,17,43,.96), rgba(42,29,86,.94)); border-radius:16px; padding:9px 10px; box-sizing:border-box; box-shadow:0 12px 28px rgba(20,13,48,.34), inset 0 1px 0 rgba(255,255,255,.07); display:flex; align-items:center; gap:12px; }
        .planner-command-copy { width:115px; flex:0 0 115px; padding-left:3px; }
        .command-eyebrow { display:block; color:#f5c451; font-size:.55rem; font-weight:900; letter-spacing:.12em; }
        .command-title { color:#f8fafc; font-size:.69rem; font-weight:800; line-height:1.1; margin-top:3px; }
        .quick-build-strategies { display:grid; grid-template-columns:repeat(3,1fr) 28px; gap:5px; flex:1; }
        .strategy-btn { min-height:45px; border:1px solid rgba(167,139,250,.28); background:rgba(15,23,42,.58); color:#e9d5ff; border-radius:10px; padding:5px 6px; cursor:pointer; display:grid; grid-template-columns:16px 1fr; text-align:left; align-content:center; column-gap:4px; transition:.18s ease; }
        .strategy-btn span { grid-row:1/3; align-self:center; color:#f5c451; text-align:center; }
        .strategy-btn b { font-size:.61rem; line-height:1.05; }
        .strategy-btn small { font-size:.5rem; color:#94a3b8; line-height:1.1; margin-top:2px; }
        .strategy-btn:hover { transform:translateY(-1px); border-color:#f5c451; background:rgba(124,58,237,.38); }
        .strategy-primary { border-color:rgba(245,196,81,.48); background:linear-gradient(135deg, rgba(124,58,237,.64), rgba(91,33,182,.5)); }
        .strategy-settings { border:1px solid rgba(167,139,250,.3); background:rgba(15,23,42,.72); color:#fff; border-radius:9px; cursor:pointer; }
        .mass-action-panel { position:absolute; top:92px; left:50%; transform:translateX(-50%); width:274px; height:auto; z-index:22; border:1px solid rgba(109,40,217,.5); background:linear-gradient(150deg, rgba(19,20,55,.95), rgba(51,38,93,.94)); border-radius:16px; padding:9px 10px 10px; box-sizing:border-box; box-shadow:0 12px 26px rgba(38,25,70,.28), inset 0 1px 0 rgba(255,255,255,.06); transition:.2s ease; }
        .mass-action-panel:hover { transform:translateX(-50%) translateY(-1px); }
        .mass-action-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
        .mass-action-head b { display:block; color:#f8fafc; font-size:.69rem; margin-top:2px; }
        .mass-mini-badge { color:#fde68a; font-size:.58rem; font-weight:900; border:1px solid rgba(245,196,81,.35); border-radius:999px; padding:3px 6px; }
        .mass-action-grid { display:grid; grid-template-columns:1fr 1px 1fr; gap:8px; }
        .mass-action-divider { background:linear-gradient(transparent, rgba(196,181,253,.45), transparent); }
        .mass-action-column { display:flex; flex-direction:column; gap:4px; }
        .mass-column-label { color:#a78bfa; font-size:.5rem; font-weight:900; letter-spacing:.12em; }
        .mass-btn { position:static; width:100%; min-height:26px; border:1px solid rgba(167,139,250,.35); border-radius:7px; background:rgba(124,58,237,.28); color:#f8fafc; font-size:.58rem; font-weight:800; padding:4px 6px; cursor:pointer; display:block; text-align:center; clip-path:none; }
        .mass-btn:hover { background:rgba(124,58,237,.55); border-color:#f5c451; color:#fff; }
        .mass-btn-ghost { background:rgba(15,23,42,.38); color:#cbd5e1; }
        .slot-top-left, .slot-top-right { top:36px; }
        .subpanel-0, .subpanel-1 { top:132px; }
        .slot-mid-left, .slot-mid-right { top:246px; }
        .subpanel-2, .subpanel-3 { top:341px; }
        .slot-bot-left, .slot-bot-right { top:456px; }
        .subpanel-4, .subpanel-5 { top:551px; }
        .grand-totals-panel { top:66%; border:1px solid rgba(167,139,250,.45); background:linear-gradient(145deg, rgba(15,18,47,.95), rgba(36,28,78,.93)); }
        .slot-subpanel { border:1px solid rgba(167,139,250,.4); background:linear-gradient(145deg, rgba(15,18,47,.94), rgba(36,28,78,.91)); }
        .gear-box { box-shadow:0 8px 18px rgba(43,28,79,.22); }
        .bottom-summary-container { padding:16px 22px; }
        .gear-modal-content { border:1px solid rgba(196,181,253,.48); background:linear-gradient(145deg, #121433, #241c50); }
        .gear-modal-header { background:linear-gradient(135deg, #25205d, #3b2879); }
        .missing-tier-art { display:none !important; }
        @media (max-width: 1080px) {
            .prep-score-widget { position:absolute; top:14px; right:14px; transform:scale(.86); transform-origin:top right; }
        }
        @media (max-width: 860px) {
            .chief-hero-topline { grid-template-columns:1fr 1fr; }
            .chief-kicker { display:none; }
            .chief-hero-copy { grid-template-columns:1fr; }
            .chief-feature-grid { grid-template-columns:1fr 1fr; }
            .stock-items-group { flex-wrap:wrap; }
            .stock-item { min-width:42%; }
            .chief-container { min-width:900px; }
            .gear-hub-wrapper { align-items:flex-start; overflow-x:auto; padding-bottom:8px; width:100%; }
            .stock-container, .bottom-summary-container, .chief-hero-shell { min-width:min(720px, calc(100vw - 36px)); }
        }


/* ============================================================
   V3 polish: conversion-aware presets, light-theme readability,
   bottom SVS Prep card, and premium current→target bridge.
   ============================================================ */
.page-side-rail { width:150px; }
.page-side-rail .theme-rail-toggle { width:150px; }
.bottom-summary-container {
    grid-template-columns:245px minmax(260px,1fr) minmax(260px,1fr) 230px;
    gap:22px; min-height:190px;
}
.bottom-prep-card {
    align-self:stretch; display:flex; align-items:center; justify-content:center;
    padding-left:18px; border-left:1px solid rgba(196,181,253,.22);
}
.bottom-prep-card .prep-score-widget { position:static !important; inset:auto !important; transform:none !important; width:210px; opacity:1; }
.bottom-prep-card .prep-main-img { height:102px; border-radius:15px; }
.bottom-prep-card .prep-bar { padding:22px 10px 9px; border-radius:15px; }
.bottom-prep-card .prep-score-top-box { top:-12px; }
.bottom-prep-card .prep-score-label { font-size:.6rem; white-space:nowrap; }
.bottom-prep-card .prep-score-value { font-size:1.2rem; }
.bottom-prep-card .valeria-box { padding:5px 7px; }
.bottom-prep-card .valeria-text { font-size:.66rem; }

.gear-arrow { width:78px !important; height:36px !important; margin:0 6px !important; overflow:visible; }
.upgrade-bridge {
    --bridge-start:#a855f7; --bridge-end:#fbbf24;
    width:76px; height:32px; display:flex; align-items:center; justify-content:center; position:relative;
    filter:drop-shadow(0 4px 8px rgba(52,29,94,.24));
}
.bridge-track {
    width:50px; height:7px; border-radius:99px; position:relative; overflow:hidden;
    background:linear-gradient(90deg,var(--bridge-start),color-mix(in srgb,var(--bridge-start) 35%,var(--bridge-end)),var(--bridge-end));
    box-shadow:inset 0 1px 1px rgba(255,255,255,.55),0 0 12px color-mix(in srgb,var(--bridge-end) 45%,transparent);
}
.bridge-flow {
    position:absolute; inset:1px auto 1px -22px; width:24px; border-radius:99px;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.95),transparent);
    animation:bridgeFlow 1.75s ease-in-out infinite;
}
.bridge-node {
    position:absolute; top:50%; width:11px; height:11px; border-radius:50%; transform:translateY(-50%);
    border:2px solid rgba(255,255,255,.88); box-shadow:0 0 0 3px rgba(70,45,118,.12),0 0 10px currentColor;
}
.bridge-node-start { left:1px; background:var(--bridge-start); color:var(--bridge-start); }
.bridge-node-end { right:1px; background:var(--bridge-end); color:var(--bridge-end); }
.bridge-chevron {
    position:absolute; right:10px; top:50%; width:10px; height:10px; transform:translateY(-50%) rotate(45deg);
    border-top:3px solid #fff; border-right:3px solid #fff; filter:drop-shadow(0 1px 3px rgba(0,0,0,.35));
}
.bridge-same { opacity:.58; filter:none; }
.bridge-same .bridge-flow { display:none; }
@keyframes bridgeFlow { 0%{left:-24px;opacity:0} 20%{opacity:1} 78%{opacity:1} 100%{left:52px;opacity:0} }

body.light-theme .chief-mini-label { color:#855400 !important; text-shadow:none; }
body.light-theme .stock-live-pill { background:#6d28d9 !important; color:#fff !important; border-color:#5b21b6 !important; box-shadow:0 4px 12px rgba(109,40,217,.22); }
body.light-theme .mass-mini-badge { color:#5b21b6 !important; background:#ede9fe; border-color:#c4b5fd; }
body.light-theme .mass-btn-ghost { background:#eee9f8 !important; color:#4c1d95 !important; border:1px solid #c4b5fd !important; font-weight:850; }
body.light-theme .mass-btn-ghost:hover { background:#ddd6fe !important; color:#3b0764 !important; border-color:#8b5cf6 !important; }
body.light-theme .totals-tab-btn { color:#5b21b6 !important; font-weight:850; }
body.light-theme .totals-tab-btn.active { background:#6d28d9 !important; color:#fff !important; box-shadow:0 3px 9px rgba(91,33,182,.28) !important; }
body.light-theme .command-eyebrow { color:#6d28d9; }
body.light-theme .bottom-prep-card { border-left-color:rgba(109,40,217,.15); }
body.light-theme .bottom-prep-card .prep-bar { background:rgba(255,250,235,.98); box-shadow:0 14px 30px rgba(120,82,10,.16); }
body.light-theme .bottom-prep-card .prep-score-top-box { background:#fff4c6; border-color:#d9a91d; }
body.light-theme .bottom-prep-card .prep-score-label { color:#704700; }
body.light-theme .bottom-prep-card .prep-score-value { color:#6b4300; text-shadow:none; }
body.light-theme .bottom-prep-card .valeria-box { background:rgba(255,245,205,.92); }
body.light-theme .bottom-prep-card .valeria-text { color:#6f4a00; }
body.light-theme .bottom-prep-card .valeria-select-row select { background:#fff; color:#5c3c00; border-color:#d8b349; }
body.light-theme .selection-board-heading b { color:#24163f; }
body.light-theme .selection-board-heading small { color:#5e5471; }

.strategy-btn.strategy-last-run {
    border-color:#f5c451 !important;
    box-shadow:0 0 0 2px rgba(245,196,81,.12),0 8px 20px rgba(0,0,0,.16);
}
body.light-theme .strategy-btn.strategy-last-run {
    background:linear-gradient(135deg,rgba(124,58,237,.16),rgba(245,196,81,.18)) !important;
    color:#352050 !important;
}
body.light-theme #qb-tooltip b { color:#6d28d9 !important; }

@media (max-width:1450px) {
    .bottom-summary-container { grid-template-columns:220px 1fr 1fr 205px; gap:16px; }
    .bottom-prep-card .prep-score-widget { width:190px; }
}
@media (max-width:1180px) {
    .bottom-summary-container { grid-template-columns:1fr 1fr; }
    .bottom-summary-heading { border-right:none; border-bottom:1px solid rgba(196,181,253,.22); padding:0 0 14px; grid-column:1/-1; }
    .bottom-prep-card { border-left:none; border-top:1px solid rgba(196,181,253,.22); padding:16px 0 0; grid-column:1/-1; }
}
