        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: #f5f0e8;
            min-height: 100vh;
            display: flex;
        }

        /* Sidebar */
        .sidebar {
            width: 300px;
            background: #faf8f3;
            border-right: 1px solid #e0dcd5;
            display: flex;
            flex-direction: column;
            height: 100vh;
            position: sticky;
            top: 0;
            overflow-y: auto;
        }

        .sidebar-header {
            padding: 24px 20px;
            border-bottom: 1px solid #e0dcd5;
        }

        .sidebar-header h2 {
            font-size: 20px;
            color: #1a1a1a;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .sidebar-header p {
            font-size: 12px;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .sidebar-devices {
            flex: 1;
            padding: 12px;
        }

        .sidebar-nav {
            padding: 12px;
            border-bottom: 1px solid #e0dcd5;
        }

        .sidebar-app-nav {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .sidebar-nav-link {
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 42px;
            padding: 9px 10px;
            border-radius: 8px;
            color: #555;
            text-decoration: none;
            font-size: 13px;
            font-weight: 650;
            transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .sidebar-nav-link:hover {
            background: #f0f8fb;
            color: #1a1a1a;
        }

        .sidebar-nav-link.active {
            background: #e7f5fa;
            color: #16799b;
            box-shadow: inset 3px 0 0 #2596be;
        }

        .sidebar-nav-icon {
            width: 22px;
            text-align: center;
            font-size: 16px;
            line-height: 1;
            flex-shrink: 0;
        }

        .sidebar-nav-label {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .sidebar-admin-section {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid #e8e4dc;
        }

        .sidebar-admin-link {
            background: #fff;
            border: 1px solid #e0dcd5;
            color: #2596be;
        }

        .sidebar-tab-badge {
            margin-left: auto;
        }

        .sidebar-device-drawer {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 10px;
            overflow: hidden;
        }

        .sidebar-device-drawer summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            list-style: none;
            cursor: pointer;
            padding: 12px 14px;
            color: #1a1a1a;
            user-select: none;
        }

        .sidebar-device-drawer summary::-webkit-details-marker {
            display: none;
        }

        .sidebar-device-drawer summary strong,
        .sidebar-device-drawer summary em {
            display: block;
        }

        .sidebar-device-drawer summary strong {
            font-size: 13px;
            font-weight: 750;
        }

        .sidebar-device-drawer summary em {
            margin-top: 2px;
            color: #777;
            font-size: 11px;
            font-style: normal;
            font-weight: 500;
        }

        .sidebar-device-drawer summary i {
            color: #2596be;
            font-size: 11px;
            font-style: normal;
            font-weight: 750;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .sidebar-device-list {
            padding: 0 10px 10px;
        }

        .device-card {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 10px;
            padding: 14px;
            margin-bottom: 10px;
            transition: box-shadow 0.2s, border-color 0.2s, opacity 0.25s ease, transform 0.25s ease;
            opacity: 1;
            transform: translateY(0);
        }
        .device-card.entering {
            opacity: 0;
            transform: translateY(6px);
        }

        .device-card:hover {
            border-color: #2596be;
            box-shadow: 0 2px 8px rgba(37,150,190,0.12);
        }

        .device-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }

        .device-id {
            font-weight: 700;
            font-size: 15px;
            color: #1a1a1a;
        }

        .device-nickname {
            font-size: 12px;
            color: #666;
            margin-bottom: 8px;
        }

        .device-status {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .device-status.online { background: #e0f2f8; color: #2596be; }
        .device-status.busy { background: #fef5e0; color: #c78a00; }
        .device-status.offline { background: #f0f0f0; color: #888; }

        .device-last-seen {
            font-size: 11px;
            color: #999;
            margin-bottom: 8px;
        }

        .device-next-mission {
            font-size: 12px;
            color: #1a1a1a;
            background: #f0f8fb;
            border: 1px solid #d0e8f2;
            border-radius: 6px;
            padding: 8px 10px;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .device-next-mission.overdue {
            background: #fff8e1;
            border-color: #ffe082;
            color: #e65100;
        }

        .device-next-mission.no-mission {
            background: #f5f5f0;
            border-color: #e0dcd5;
            color: #999;
        }

        .device-next-mission .mission-icon {
            font-size: 14px;
            flex-shrink: 0;
        }

        .device-next-mission .mission-text {
            flex: 1;
            line-height: 1.4;
        }

        .device-next-mission .mission-time {
            font-weight: 600;
            color: #2596be;
        }

        .device-next-mission.overdue .mission-time {
            color: #e65100;
        }

        .device-progress {}

        .device-progress-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }

        .device-progress-row:last-child { margin-bottom: 0; }

        .device-progress-label {
            font-size: 11px;
            color: #888;
            width: 42px;
            flex-shrink: 0;
            font-weight: 600;
        }

        .device-progress-bar {
            flex: 1;
            height: 6px;
            background: #e8e4dc;
            border-radius: 3px;
            overflow: hidden;
        }

        .device-progress-fill {
            height: 100%;
            background: #2596be;
            border-radius: 3px;
            transition: width 0.4s ease;
        }

        .device-progress-value {
            font-size: 11px;
            color: #666;
            width: 44px;
            text-align: right;
            flex-shrink: 0;
            font-variant-numeric: tabular-nums;
        }

        .empty-sidebar-message,
        .sidebar-error-message {
            padding: 20px;
            color: #888;
            font-size: 13px;
        }

        .sidebar-error-message {
            color: #c0392b;
        }

        .sidebar-action-button {
            margin-top: 6px;
            width: 100%;
            padding: 6px;
            font-size: 12px;
            background: #f0f0f0;
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            color: #555;
        }

        .sidebar-action-button:first-of-type {
            margin-top: 10px;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            background: #fff;
            min-height: 100vh;
            padding: 30px 40px;
            overflow-y: auto;
        }

        .main-content h1 {
            color: #1a1a1a;
            margin-bottom: 8px;
            font-size: 28px;
            font-weight: 700;
        }

        .subtitle {
            color: #888;
            margin-bottom: 24px;
            font-size: 14px;
        }

        .tabs {
            display: flex;
            gap: 6px;
            margin-bottom: 28px;
            border-bottom: 2px solid #e8e4dc;
            position: sticky;
            top: 0;
            background: #fff;
            z-index: 50;
            padding-top: 8px;
            padding-bottom: 4px;
            margin-top: -8px;
        }

        .tab {
            padding: 10px 20px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            color: #888;
            transition: all 0.2s;
        }

        .tab:hover { color: #2596be; }

        .tab.active {
            color: #2596be;
            border-bottom-color: #2596be;
        }

        .tab-content { display: none; }
        .tab-content.active { display: block; }

        #mainNav[hidden] {
            display: none !important;
        }

        .form-group { margin-bottom: 22px; }

        label {
            display: block;
            margin-bottom: 6px;
            color: #1a1a1a;
            font-weight: 600;
            font-size: 13px;
        }

        input[type="text"],
        input[type="number"],
        textarea,
        select,
        input[type="datetime-local"],
        input[type="email"],
        input[type="password"],
        input[type="date"],
        input[type="url"] {
            width: 100%;
            padding: 10px 12px;
            border: 1.5px solid #e0dcd5;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s;
            background: #fff;
            color: #1a1a1a;
        }

        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: #2596be;
        }

        textarea {
            resize: vertical;
            min-height: 100px;
            font-family: inherit;
        }

        .image-upload {
            border: 2px dashed #d5d0c8;
            border-radius: 10px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: #faf8f3;
        }

        .image-upload:hover {
            border-color: #2596be;
            background: #f0f8fb;
        }

        #imageInput { display: none; }

        .upload-icon { font-size: 40px; margin-bottom: 8px; }

        .image-preview {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 16px;
        }

        .preview-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 8px;
            background: #faf8f3;
            border-radius: 6px;
            border: 1px solid #e0dcd5;
        }

        .preview-item .order-number {
            font-size: 16px;
            font-weight: 700;
            color: #2596be;
            min-width: 26px;
            text-align: center;
        }

        .preview-item img,
        .preview-item video {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 4px;
            cursor: pointer;
            transition: transform 0.15s ease;
        }
        .preview-item img:hover,
        .preview-item video:hover {
            transform: scale(1.05);
        }
        .preview-item .media-wrap {
            position: relative;
            width: 60px;
            height: 60px;
            flex-shrink: 0;
        }
        .preview-item .play-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 18px;
            pointer-events: none;
            text-shadow: 0 1px 3px rgba(0,0,0,0.5);
        }

        .preview-item .image-name {
            flex: 1;
            font-size: 13px;
            color: #1a1a1a;
        }

        .preview-item .controls { display: flex; gap: 4px; }

        .preview-item .arrow-btn {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-size: 14px;
            color: #666;
        }

        .preview-item .arrow-btn:hover:not(:disabled) {
            background: #2596be;
            color: white;
            border-color: #2596be;
        }

        .preview-item .arrow-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        .preview-item .remove-btn {
            background: #c0392b;
            color: white;
            border: none;
            border-radius: 4px;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-size: 16px;
        }

        button[type="submit"], .btn-primary {
            width: 100%;
            padding: 14px;
            background: #1a1a1a;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }

        button[type="submit"]:hover, .btn-primary:hover {
            background: #2596be;
        }

        .task-manual-action {
            margin-top: 18px;
            padding: 16px;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            background: #faf8f3;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
        }

        .task-manual-action h3 {
            margin: 0 0 4px;
            font-size: 16px;
            color: #1a1a1a;
        }

        .task-manual-action p {
            margin: 0;
            font-size: 13px;
            color: #666;
            line-height: 1.4;
        }

        .task-manual-action .btn-secondary {
            width: auto;
            flex-shrink: 0;
            padding: 10px 14px;
        }

        .slot-suggestion-btn {
            padding: 8px 14px;
            background: #f5f5f0;
            color: #1a1a1a;
            border: 2px solid #d5d0c8;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .slot-suggestion-btn:hover {
            border-color: #2596be;
            background: #f0f8fb;
        }

        .slot-suggestion-btn.active {
            background: #1a1a1a;
            color: white;
            border-color: #1a1a1a;
        }

        .slot-suggestion-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .helper-text {
            font-size: 12px;
            color: #888;
            margin-top: 4px;
        }

        .status-message {
            margin-top: 16px;
            padding: 10px 14px;
            border-radius: 6px;
            font-size: 14px;
            display: none;
        }

        .status-message.success {
            background: #e8f5e9;
            color: #2e7d32;
            border: 1px solid #c8e6c9;
        }

        .status-message.error {
            background: #ffebee;
            color: #c62828;
            border: 1px solid #ffcdd2;
        }

        #postActionBtn:hover {
            opacity: 0.9;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 16px;
            font-size: 14px;
        }

        th, td {
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid #e8e4dc;
        }

        th {
            background: #faf8f3;
            font-weight: 600;
            color: #666;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        td { color: #1a1a1a; }

        .status-pending { color: #d4a017; font-weight: 600; }
        .status-uploading { color: #8b5cf6; font-weight: 600; }
        .status-downloading { color: #2596be; font-weight: 600; }
        .status-downloaded { color: #2596be; font-weight: 600; }
        .status-drafted { color: #7b68ee; font-weight: 600; }
        .status-published { color: #2e7d32; font-weight: 600; }
        .status-failed { color: #c0392b; font-weight: 600; }
        .status-running { color: #2596be; font-weight: 600; }
        .status-completed { color: #2e7d32; font-weight: 600; }

        .btn-delete {
            background: transparent;
            color: #c0392b;
            border: 1px solid #c0392b;
            border-radius: 4px;
            padding: 5px 12px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s;
        }

        .btn-delete:hover {
            background: #c0392b;
            color: white;
        }

        .btn-delete:disabled {
            background: #e0e0e0;
            border-color: #ccc;
            color: #999;
            cursor: not-allowed;
        }

        .btn-delete-confirm {
            background: #c0392b;
            color: white;
            border: none;
            border-radius: 4px;
            padding: 5px 12px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
        }

        .btn-delete-confirm:hover { background: #a93226; }

        .btn-edit {
            background: transparent;
            color: #2596be;
            border: 1px solid #2596be;
            border-radius: 4px;
            padding: 5px 12px;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            margin-right: 6px;
            transition: all 0.2s;
        }

        .btn-edit:hover {
            background: #2596be;
            color: white;
        }

        .progress-bar {
            background: #e8e4dc;
            border-radius: 8px;
            height: 18px;
            overflow: hidden;
            position: relative;
        }

        .progress-fill {
            background: #2596be;
            height: 100%;
            transition: width 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 10px;
            font-weight: 600;
        }

        .status-badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 700;
            cursor: help;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-online { background: #e0f2f8; color: #2596be; }
        .status-offline { background: #f0f0f0; color: #888; }
        .status-busy { background: #fef5e0; color: #c78a00; }

        /* ============================================================
           DEVICE SCREEN WALL
           ============================================================ */
        .device-page-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            border-bottom: 1px solid #e0dcd5;
        }

        .device-page-tab {
            appearance: none;
            background: transparent;
            border: 0;
            border-bottom: 2px solid transparent;
            color: #666;
            cursor: pointer;
            font-family: inherit;
            font-size: 14px;
            font-weight: 700;
            padding: 10px 14px 12px;
        }

        .device-page-tab:hover {
            color: #2596be;
        }

        .device-page-tab.active {
            border-bottom-color: #2596be;
            color: #2596be;
        }

        .device-subpanel {
            display: none;
        }

        .device-subpanel.active {
            display: block;
        }

        .device-screen-header {
            align-items: center;
            display: flex;
            gap: 16px;
            justify-content: space-between;
            margin-bottom: 18px;
        }

        .device-screen-header h3 {
            color: #1a1a1a;
            font-size: 18px;
            margin: 0 0 4px;
        }

        .device-screen-header p {
            color: #777;
            font-size: 13px;
            margin: 0;
        }

        .device-screen-actions,
        .device-stream-card-actions,
        .device-stream-form-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .device-stream-form {
            background: #faf8f3;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            display: grid;
            gap: 14px;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            margin-bottom: 16px;
            padding: 18px;
        }

        .device-stream-form .form-group {
            margin-bottom: 0;
        }

        .device-stream-local-field,
        .device-stream-global-field {
            display: none;
        }

        .device-stream-form-actions {
            align-items: flex-end;
            grid-column: 1 / -1;
        }

        .device-screen-notice {
            background: #fff7e6;
            border: 1px solid #f0d8a8;
            border-radius: 8px;
            color: #7a5514;
            display: none;
            font-size: 13px;
            line-height: 1.45;
            margin-bottom: 16px;
            padding: 10px 12px;
        }

        .device-screen-grid {
            display: grid;
            gap: 16px;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        }

        .device-stream-card {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            overflow: hidden;
        }

        .device-stream-card-header {
            align-items: flex-start;
            display: flex;
            gap: 10px;
            justify-content: space-between;
            padding: 12px 12px 10px;
        }

        .device-stream-card-header h4 {
            color: #1a1a1a;
            font-size: 14px;
            margin: 0 0 3px;
        }

        .device-stream-card-header p {
            color: #777;
            font-size: 12px;
            margin: 0;
        }

        .device-stream-state {
            background: #f0f0f0;
            border-radius: 999px;
            color: #777;
            flex-shrink: 0;
            font-size: 11px;
            font-weight: 700;
            padding: 4px 8px;
        }

        .device-stream-state.active {
            background: #e0f8f0;
            color: #0f8a5f;
        }

        .device-stream-viewport {
            aspect-ratio: 9 / 16;
            background: #111;
            max-height: 560px;
            min-height: 320px;
            overflow: hidden;
            position: relative;
        }

        .device-stream-frame,
        .device-stream-media {
            border: 0;
            display: block;
            height: 100%;
            object-fit: contain;
            width: 100%;
        }

        .device-stream-placeholder {
            align-items: center;
            color: #ddd;
            display: flex;
            flex-direction: column;
            font-size: 13px;
            gap: 8px;
            height: 100%;
            justify-content: center;
            line-height: 1.4;
            padding: 18px;
            text-align: center;
        }

        .device-stream-placeholder a,
        .device-stream-launch {
            color: #7fd3f1;
            font-weight: 700;
            text-decoration: none;
        }

        .device-stream-fallback-link {
            background: rgba(0, 0, 0, 0.72);
            border-radius: 999px;
            bottom: 10px;
            color: #fff;
            font-size: 11px;
            font-weight: 700;
            padding: 5px 9px;
            position: absolute;
            right: 10px;
            text-decoration: none;
        }

        .device-stream-placeholder.blocked {
            background: #1e1711;
            color: #f6d7ae;
        }

        .device-stream-placeholder.global {
            background: #151b22;
            color: #d8e5ed;
        }

        .device-stream-meta {
            color: #777;
            font-size: 12px;
            overflow: hidden;
            padding: 10px 12px 0;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .device-stream-card-actions {
            padding: 10px 12px 12px;
        }

        .device-stream-empty {
            background: #faf8f3;
            border: 1px dashed #d5d0c8;
            border-radius: 8px;
            color: #777;
            grid-column: 1 / -1;
            padding: 24px;
            text-align: center;
        }

        .device-stream-empty h4 {
            color: #1a1a1a;
            margin: 0 0 6px;
        }

        .device-stream-empty p {
            margin: 0;
        }

        /* ============================================================
           COMMAND CENTER NETWORK DASHBOARD
           ============================================================ */
        .command-center-page {
            --cc-bg: #f8fbfd;
            --cc-surface: #ffffff;
            --cc-surface-soft: #f3f8fb;
            --cc-border: #dbe7ef;
            --cc-border-strong: #bed2df;
            --cc-text: #142033;
            --cc-muted: #607087;
            --cc-blue: #2f80ed;
            --cc-teal: #12a594;
            --cc-green: #20b26b;
            --cc-amber: #f2a51a;
            --cc-red: #e45656;
            --cc-purple: #7d5bed;
            color: var(--cc-text);
            font-size: 13px;
        }

        .cc-topbar {
            align-items: stretch;
            display: grid;
            gap: 12px;
            grid-template-columns: 1.15fr 1fr 1fr 0.78fr auto;
            margin-bottom: 12px;
        }

        .cc-command-card,
        .cc-top-metric,
        .cc-top-actions,
        .cc-panel {
            background: var(--cc-surface);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            box-shadow: 0 12px 28px rgba(22, 45, 70, 0.05);
        }

        .cc-command-card {
            align-items: center;
            display: flex;
            gap: 12px;
            min-height: 56px;
            padding: 10px 14px;
        }

        .cc-command-icon {
            align-items: center;
            background: #eaf4fb;
            border-radius: 8px;
            color: var(--cc-blue);
            display: flex;
            font-size: 22px;
            font-weight: 900;
            height: 38px;
            justify-content: center;
            width: 38px;
        }

        .cc-command-card strong,
        .cc-top-metric strong {
            color: var(--cc-text);
            display: block;
            font-size: 15px;
            line-height: 1.2;
        }

        .cc-command-card span,
        .cc-top-metric span,
        .cc-panel-header p {
            color: var(--cc-muted);
            display: block;
            font-size: 12px;
            line-height: 1.35;
        }

        .cc-top-metric em {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-style: normal;
            font-weight: 700;
            line-height: 1.35;
            margin-top: 4px;
        }

        .cc-command-card span i,
        .cc-live-label,
        .cc-live-dot {
            background: var(--cc-green);
            border-radius: 999px;
            display: inline-block;
            height: 7px;
            margin-right: 6px;
            width: 7px;
        }

        .cc-top-metric {
            min-height: 56px;
            overflow: hidden;
            padding: 9px 14px;
            position: relative;
        }

        .cc-top-actions {
            align-items: center;
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            padding: 10px;
        }

        .cc-period-btn,
        .cc-refresh-btn,
        .cc-icon-btn,
        .cc-log-tools button,
        .cc-mode-control button {
            appearance: none;
            border: 1px solid var(--cc-border);
            border-radius: 7px;
            cursor: pointer;
            font-family: inherit;
            font-size: 12px;
            font-weight: 700;
            min-height: 32px;
            padding: 7px 10px;
        }

        .cc-period-btn {
            background: #f8fbfd;
            color: var(--cc-muted);
            cursor: default;
        }

        .cc-refresh-btn,
        .cc-log-tools button {
            background: var(--cc-surface);
            color: var(--cc-text);
        }

        .cc-refresh-btn:hover,
        .cc-log-tools button:hover {
            border-color: var(--cc-blue);
            color: var(--cc-blue);
        }

        .cc-live-dot {
            height: 9px;
            margin: 0 4px;
            width: 9px;
        }

        .cc-live-dot.loading {
            animation: cc-pulse 0.9s ease-in-out infinite;
        }

        .cc-situation-band {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            margin-bottom: 12px;
        }

        .cc-situation-card {
            background: var(--cc-surface);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            box-shadow: 0 12px 28px rgba(22, 45, 70, 0.05);
            min-height: 86px;
            padding: 13px 14px;
        }

        .cc-situation-card span {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .cc-situation-card strong {
            color: var(--cc-text);
            display: block;
            font-size: 22px;
            line-height: 1.05;
            margin: 9px 0 5px;
            overflow-wrap: anywhere;
        }

        .cc-situation-card em {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-style: normal;
            font-weight: 700;
            line-height: 1.25;
        }

        .cc-situation-card.healthy {
            border-color: #bce8d8;
        }

        .cc-situation-card.attention {
            border-color: #ffd5d5;
            background: #fffafa;
        }

        .cc-dashboard-grid {
            align-items: start;
            display: grid;
            gap: 12px;
            grid-template-areas:
                "graph"
                "right"
                "log";
            grid-template-columns: minmax(0, 1fr);
            margin-bottom: 12px;
        }

        .cc-panel {
            min-width: 0;
            overflow: hidden;
        }

        .cc-panel-header {
            align-items: flex-start;
            border-bottom: 1px solid var(--cc-border);
            display: flex;
            gap: 12px;
            justify-content: space-between;
            padding: 12px 14px;
        }

        .cc-panel-header h2 {
            color: var(--cc-text);
            font-size: 15px;
            line-height: 1.2;
            margin: 0 0 4px;
        }

        .cc-panel-header a {
            color: var(--cc-blue);
            font-size: 12px;
            font-weight: 800;
            text-decoration: none;
        }

        .cc-icon-btn {
            align-items: center;
            background: var(--cc-surface);
            color: var(--cc-muted);
            display: flex;
            font-size: 15px;
            height: 32px;
            justify-content: center;
            padding: 0;
            width: 32px;
        }

        .cc-queue-list {
            display: grid;
            gap: 0;
            max-height: 748px;
            overflow: auto;
        }

        .cc-queue-panel {
            display: none;
            grid-area: queue;
        }

        .cc-queue-item {
            align-items: center;
            background: transparent;
            border: 0;
            cursor: pointer;
            display: grid;
            gap: 10px;
            grid-template-columns: 64px minmax(0, 1fr);
            padding: 10px 14px;
            text-align: left;
            width: 100%;
        }

        .cc-queue-item:hover,
        .cc-queue-item:focus-visible {
            background: #f7fbfd;
            outline: none;
        }

        .cc-queue-item:focus-visible {
            box-shadow: inset 0 0 0 2px rgba(47, 128, 237, 0.28);
        }

        .cc-queue-item + .cc-queue-item {
            border-top: 1px solid var(--cc-border);
        }

        .cc-thumb-wrap {
            aspect-ratio: 1 / 1;
            background: linear-gradient(135deg, #eaf4fb, #f8fbfd 48%, #ecfdf5);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            min-width: 0;
            overflow: hidden;
            position: relative;
        }

        .cc-thumb-media,
        .cc-output-thumb,
        .cc-phone-fallback-media {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .cc-thumb-fallback {
            align-items: center;
            color: var(--cc-blue);
            display: flex;
            flex-direction: column;
            font-size: 12px;
            font-weight: 900;
            gap: 3px;
            justify-content: center;
            line-height: 1.15;
            padding: 6px;
            text-align: center;
        }

        .cc-thumb-fallback span {
            color: var(--cc-muted);
            font-size: 10px;
            font-weight: 800;
        }

        .cc-thumb-wrap.is-missing img {
            display: none;
        }

        .cc-thumb-wrap.is-missing::after {
            align-items: center;
            color: var(--cc-muted);
            content: "Media";
            display: flex;
            font-size: 11px;
            font-weight: 800;
            inset: 0;
            justify-content: center;
            position: absolute;
        }

        .cc-play-chip {
            align-items: center;
            background: rgba(20, 32, 51, 0.72);
            border-radius: 999px;
            bottom: 5px;
            color: #fff;
            display: flex;
            font-size: 10px;
            height: 18px;
            justify-content: center;
            position: absolute;
            right: 5px;
            width: 18px;
        }

        .cc-queue-copy {
            min-width: 0;
        }

        .cc-queue-copy strong {
            color: var(--cc-text);
            display: block;
            font-size: 12px;
            line-height: 1.25;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-queue-copy span {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            margin: 4px 0 6px;
        }

        .cc-status-pill {
            background: #eef8f5;
            border-radius: 999px;
            color: var(--cc-teal);
            display: inline-flex;
            font-size: 10px;
            font-style: normal;
            font-weight: 800;
            padding: 4px 8px;
            text-transform: capitalize;
        }

        .cc-source-pill {
            background: #f7fbfd;
            border: 1px solid var(--cc-border);
            border-radius: 999px;
            color: var(--cc-muted);
            display: inline-flex;
            font-size: 10px;
            font-weight: 900;
            line-height: 1;
            padding: 4px 7px;
            white-space: nowrap;
        }

        .cc-status-pill.uploading,
        .cc-status-pill.downloading {
            background: #eef5ff;
            color: var(--cc-blue);
        }

        .cc-status-pill.drafted {
            background: #fff7e7;
            color: #b97709;
        }

        .cc-queue-meta-row {
            align-items: center;
            display: flex;
            gap: 8px;
            justify-content: space-between;
        }

        .cc-queue-action {
            appearance: none;
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 6px;
            color: var(--cc-blue);
            cursor: pointer;
            font-family: inherit;
            font-size: 10px;
            font-weight: 900;
            min-height: 24px;
            padding: 3px 8px;
        }

        .cc-queue-action:hover {
            border-color: var(--cc-blue);
        }

        .cc-queue-footer {
            align-items: center;
            border-top: 1px solid var(--cc-border);
            display: flex;
            gap: 8px;
            justify-content: space-between;
            padding: 11px 14px;
        }

        .cc-queue-footer span,
        .cc-queue-footer a {
            color: var(--cc-muted);
            font-size: 11px;
            text-decoration: none;
        }

        .cc-queue-footer a {
            color: var(--cc-blue);
            font-weight: 800;
        }

        .cc-graph-panel {
            display: flex;
            flex-direction: column;
            grid-area: graph;
            min-height: 0;
        }

        .cc-graph-header {
            align-items: center;
        }

        .cc-graph-toolbar {
            align-items: flex-end;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        .cc-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .cc-legend span {
            align-items: center;
            color: var(--cc-muted);
            display: inline-flex;
            font-size: 11px;
            gap: 6px;
        }

        .cc-legend i {
            border-radius: 999px;
            display: inline-block;
            height: 8px;
            width: 8px;
        }

        .cc-legend .source { background: var(--cc-teal); }
        .cc-legend .manufacturer { background: var(--cc-amber); }
        .cc-legend .phone { background: var(--cc-blue); }
        .cc-legend .content { background: var(--cc-purple); }
        .cc-legend .posting { background: #e1b72e; }

        .cc-mode-control {
            align-items: center;
            background: #f7fbfd;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            display: flex;
            gap: 4px;
            padding: 4px;
        }

        .cc-mode-control span {
            color: var(--cc-muted);
            font-size: 12px;
            font-weight: 800;
            margin: 0 8px;
            white-space: nowrap;
        }

        .cc-mode-control button {
            background: transparent;
            border-color: transparent;
            color: var(--cc-muted);
            min-height: 28px;
            padding: 5px 9px;
        }

        .cc-mode-control button.active {
            background: #fff;
            border-color: var(--cc-border);
            box-shadow: 0 3px 8px rgba(22, 45, 70, 0.07);
            color: var(--cc-text);
        }

        .cc-zoom-control {
            align-items: center;
            background: #f7fbfd;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            display: flex;
            gap: 4px;
            padding: 4px;
        }

        .cc-zoom-control button {
            appearance: none;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 7px;
            color: var(--cc-muted);
            cursor: pointer;
            font-family: inherit;
            font-size: 12px;
            font-weight: 900;
            height: 28px;
            min-width: 30px;
            padding: 0 8px;
        }

        .cc-zoom-control button:hover {
            background: #fff;
            border-color: var(--cc-border);
            color: var(--cc-text);
        }

        .cc-zoom-control button:disabled {
            cursor: default;
            opacity: 0.42;
        }

        .cc-zoom-control span {
            color: var(--cc-text);
            display: inline-block;
            font-size: 12px;
            font-weight: 900;
            min-width: 44px;
            text-align: center;
        }

        .cc-graph-canvas {
            background:
                linear-gradient(rgba(47, 128, 237, 0.04) 1px, transparent 1px),
                linear-gradient(90deg, rgba(47, 128, 237, 0.04) 1px, transparent 1px),
                radial-gradient(circle at 47% 45%, rgba(47, 128, 237, 0.07), transparent 32%),
                var(--cc-bg);
            background-size: 36px 36px, 36px 36px, 100% 100%, 100% 100%;
            flex: none;
            height: 920px;
            min-height: 0;
            overflow: auto;
            position: relative;
        }

        .cc-graph-scene {
            min-height: 1px;
            min-width: 1px;
            position: relative;
        }

        .cc-graph-zoom-layer {
            left: 0;
            position: absolute;
            top: 0;
            transform-origin: 0 0;
        }

        .cc-graph-svg,
        .cc-graph-nodes {
            inset: 0;
            position: absolute;
        }

        .cc-link {
            fill: none;
            opacity: 0.68;
            stroke: #a9c5d9;
            stroke-dasharray: 9 10;
            stroke-linecap: round;
            stroke-width: 1.7;
        }

        .cc-link.source { stroke: #8ccfbc; }
        .cc-link.manufacturer { stroke: #dfb35f; }
        .cc-link.content { stroke: #a9b4f5; }
        .cc-link.gateway { stroke: #e5b949; }
        .cc-link.timeline { stroke: #d9e7ef; stroke-dasharray: 0; stroke-width: 1.2; opacity: 0.92; }
        .cc-link.queued { stroke: #dfb35f; stroke-dasharray: 0; }
        .cc-link.posted { stroke: #a9b4f5; stroke-dasharray: 0; }
        .cc-link.heat-high { stroke-width: 2.4; opacity: 0.92; }
        .cc-link.heat-mid { stroke-width: 1.9; opacity: 0.78; }
        .cc-link.heat-low { opacity: 0.42; }
        .cc-graph-canvas[data-heatmap="risk"] .cc-link.heat-high { stroke: var(--cc-red); }
        .cc-graph-canvas[data-heatmap="health"] .cc-link.heat-high { stroke: var(--cc-green); }
        .cc-graph-canvas[data-heatmap="activity"] .cc-link.heat-high { stroke: var(--cc-blue); }

        .cc-packet-dot {
            display: none;
            fill: var(--cc-blue);
            opacity: 0.78;
        }

        .cc-packet-dot.source { fill: var(--cc-teal); }
        .cc-packet-dot.manufacturer { fill: var(--cc-amber); }
        .cc-packet-dot.content { fill: var(--cc-purple); }
        .cc-packet-dot.gateway { fill: var(--cc-amber); }

        .cc-account-node,
        .cc-source-node,
        .cc-manufacturer-node,
        .cc-content-node,
        .cc-gateway-node,
        .cc-phone-node {
            position: absolute;
            transform: translate(-50%, -50%);
            z-index: 2;
        }

        .cc-account-node,
        .cc-source-node,
        .cc-manufacturer-node,
        .cc-content-node,
        .cc-gateway-node {
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            box-shadow: 0 12px 24px rgba(28, 59, 89, 0.08);
        }

        .cc-account-node,
        .cc-source-node {
            min-width: 132px;
            padding: 10px 11px 10px 36px;
        }

        .cc-account-node strong,
        .cc-source-node strong,
        .cc-manufacturer-node strong,
        .cc-content-node strong,
        .cc-gateway-node strong {
            color: var(--cc-text);
            display: block;
            font-size: 11px;
            line-height: 1.2;
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-account-node span,
        .cc-source-node span,
        .cc-manufacturer-node span,
        .cc-content-node span,
        .cc-gateway-node span {
            color: var(--cc-muted);
            display: block;
            font-size: 10px;
            margin-top: 4px;
        }

        .cc-account-node i,
        .cc-source-node i {
            align-items: center;
            background: #e5fbf5;
            border-radius: 999px;
            color: var(--cc-teal);
            display: flex;
            font-size: 10px;
            font-style: normal;
            font-weight: 900;
            height: 24px;
            justify-content: center;
            left: 8px;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 24px;
        }

        .cc-source-node.real-estate i {
            background: #eef5ff;
            color: var(--cc-blue);
            font-size: 8px;
        }

        .cc-manufacturer-node {
            align-items: center;
            display: flex;
            gap: 10px;
            min-width: 174px;
            padding: 10px;
        }

        .cc-source-node,
        .cc-manufacturer-node {
            align-items: center;
            cursor: help;
            display: flex;
            justify-content: center;
            min-width: 0;
            overflow: visible;
            padding: 6px;
            width: 76px;
        }

        .cc-source-node {
            height: 64px;
        }

        .cc-manufacturer-node {
            gap: 0;
            height: 82px;
            width: 82px;
        }

        .cc-source-node > div,
        .cc-manufacturer-node > div {
            display: none;
        }

        .cc-source-node::after,
        .cc-manufacturer-node::after {
            background: #142033;
            border: 1px solid rgba(255, 255, 255, 0.14);
            border-radius: 8px;
            bottom: calc(100% + 10px);
            box-shadow: 0 12px 24px rgba(20, 32, 51, 0.18);
            color: #fff;
            content: attr(data-tooltip);
            font-size: 11px;
            font-weight: 800;
            left: 50%;
            line-height: 1.25;
            max-width: 220px;
            opacity: 0;
            padding: 8px 10px;
            pointer-events: none;
            position: absolute;
            text-align: center;
            transform: translate(-50%, 6px);
            transition: opacity 0.16s ease, transform 0.16s ease;
            white-space: normal;
            width: max-content;
            z-index: 8;
        }

        .cc-source-node::before,
        .cc-manufacturer-node::before {
            border: 6px solid transparent;
            border-top-color: #142033;
            bottom: calc(100% - 2px);
            content: "";
            left: 50%;
            opacity: 0;
            pointer-events: none;
            position: absolute;
            transform: translate(-50%, 6px);
            transition: opacity 0.16s ease, transform 0.16s ease;
            z-index: 9;
        }

        .cc-source-node::after {
            left: 0;
            text-align: left;
            transform: translateY(6px);
        }

        .cc-source-node::before {
            left: 28px;
        }

        .cc-source-node:hover::after,
        .cc-source-node:focus-visible::after,
        .cc-manufacturer-node:hover::after,
        .cc-manufacturer-node:focus-visible::after,
        .cc-source-node:hover::before,
        .cc-source-node:focus-visible::before,
        .cc-manufacturer-node:hover::before,
        .cc-manufacturer-node:focus-visible::before {
            opacity: 1;
            transform: translate(-50%, 0);
        }

        .cc-source-node:hover::after,
        .cc-source-node:focus-visible::after {
            transform: translateY(0);
        }

        .cc-source-node i {
            font-size: 13px;
            height: 48px;
            left: auto;
            position: static;
            top: auto;
            transform: none;
            width: 48px;
        }

        .cc-source-node.real-estate i {
            font-size: 10px;
        }

        .cc-manufacturer-node img,
        .cc-manufacturer-node > i {
            border: 1px solid rgba(47, 128, 237, 0.14);
            border-radius: 14px;
            flex-shrink: 0;
            height: 68px;
            object-fit: cover;
            width: 68px;
        }

        .cc-manufacturer-node > i {
            align-items: center;
            background: #fff7e5;
            color: var(--cc-amber);
            display: flex;
            font-style: normal;
            font-weight: 900;
            justify-content: center;
        }

        .cc-manufacturer-node em {
            color: var(--cc-blue);
            display: block;
            font-size: 9px;
            font-style: normal;
            font-weight: 900;
            margin-top: 4px;
        }

        .cc-content-node {
            align-items: center;
            display: flex;
            gap: 9px;
            min-width: 126px;
            padding: 10px;
        }

        .cc-content-node i,
        .cc-gateway-node i {
            align-items: center;
            background: #f0edff;
            border-radius: 999px;
            color: var(--cc-purple);
            display: flex;
            flex-shrink: 0;
            font-style: normal;
            font-weight: 900;
            height: 30px;
            justify-content: center;
            width: 30px;
        }

        .cc-gateway-node {
            align-items: center;
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 12px 9px;
            text-align: center;
            width: 78px;
        }

        .cc-gateway-node i {
            background: #eef5ff;
            color: var(--cc-blue);
        }

        .cc-graph-axis-label {
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid var(--cc-border);
            border-radius: 999px;
            color: var(--cc-muted);
            font-size: 11px;
            font-weight: 900;
            padding: 5px 9px;
            position: absolute;
            text-transform: uppercase;
            transform: translate(-50%, -50%);
            z-index: 3;
        }

        .cc-draft-pool-node {
            background: rgba(255, 255, 255, 0.96);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            box-shadow: 0 16px 34px rgba(28, 59, 89, 0.1);
            display: flex;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
            position: absolute;
            z-index: 4;
        }

        .cc-draft-pool-node > header {
            align-items: center;
            border-bottom: 1px solid var(--cc-border);
            display: flex;
            justify-content: space-between;
            padding: 12px;
        }

        .cc-draft-pool-node > header span {
            color: var(--cc-muted);
            display: block;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .cc-draft-pool-node > header strong {
            color: var(--cc-text);
            display: block;
            font-size: 15px;
            line-height: 1.15;
            margin-top: 2px;
        }

        .cc-draft-pool-node > header em {
            align-items: center;
            background: #eef5ff;
            border-radius: 999px;
            color: var(--cc-blue);
            display: flex;
            font-size: 12px;
            font-style: normal;
            font-weight: 900;
            height: 30px;
            justify-content: center;
            width: 30px;
        }

        .cc-draft-pool-groups {
            display: grid;
            gap: 12px;
            min-height: 0;
            overflow: auto;
            padding: 12px;
        }

        .cc-draft-pool-group {
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            overflow: hidden;
        }

        .cc-draft-pool-group.foodie { border-color: #bfe8dd; }
        .cc-draft-pool-group.real-estate { border-color: #c8dcf6; }
        .cc-draft-pool-group.travel { border-color: #ddd4fa; }

        .cc-draft-pool-group-header {
            align-items: center;
            background: #f8fbfd;
            border-bottom: 1px solid var(--cc-border);
            display: flex;
            justify-content: space-between;
            padding: 8px 9px;
        }

        .cc-draft-pool-group-header strong {
            color: var(--cc-text);
            font-size: 11px;
            line-height: 1.2;
        }

        .cc-draft-pool-group-header span {
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 999px;
            color: var(--cc-muted);
            font-size: 10px;
            font-weight: 900;
            padding: 2px 6px;
        }

        .cc-draft-pool-grid {
            display: grid;
            gap: 8px;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            padding: 8px;
        }

        .cc-draft-pool-card {
            appearance: none;
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            cursor: pointer;
            display: grid;
            gap: 5px;
            min-width: 0;
            padding: 6px;
            text-align: left;
        }

        .cc-draft-pool-card:hover,
        .cc-draft-pool-card:focus-visible,
        .cc-lane-card:hover,
        .cc-lane-card:focus-visible {
            border-color: var(--cc-blue);
            box-shadow: 0 8px 18px rgba(47, 128, 237, 0.16);
            outline: none;
        }

        .cc-draft-pool-thumb {
            aspect-ratio: 1 / 1;
            border-radius: 7px;
            width: 100%;
        }

        .cc-draft-pool-thumb-media {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .cc-draft-pool-card strong {
            color: var(--cc-text);
            display: block;
            font-size: 10px;
            line-height: 1.2;
            min-height: 24px;
            overflow: hidden;
        }

        .cc-draft-pool-card span {
            color: var(--cc-muted);
            display: block;
            font-size: 9px;
            font-weight: 800;
            line-height: 1.2;
        }

        .cc-draft-pool-empty {
            color: var(--cc-muted);
            font-size: 12px;
            font-weight: 800;
            padding: 18px;
            text-align: center;
        }

        .cc-row-label,
        .cc-lane-card-wrap,
        .cc-lane-overflow,
        .cc-lane-empty {
            position: absolute;
            transform: translate(-50%, -50%);
            z-index: 3;
        }

        .cc-row-label {
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            min-width: 112px;
            padding: 7px 9px;
        }

        .cc-row-label strong {
            color: var(--cc-text);
            display: block;
            font-size: 11px;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-row-label span {
            color: var(--cc-muted);
            display: block;
            font-size: 10px;
            font-weight: 900;
            line-height: 1.2;
            margin-top: 3px;
        }

        .cc-lane-card {
            appearance: none;
            align-items: center;
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            box-shadow: 0 10px 22px rgba(28, 59, 89, 0.08);
            cursor: pointer;
            display: grid;
            gap: 8px;
            grid-template-columns: 42px minmax(0, 1fr);
            min-height: 74px;
            padding: 7px;
            text-align: left;
            width: 130px;
        }

        .cc-lane-card.posted {
            grid-template-columns: 36px minmax(0, 1fr);
            min-height: 66px;
            width: 108px;
        }

        .cc-lane-card.foodie { border-left: 4px solid var(--cc-teal); }
        .cc-lane-card.real-estate { border-left: 4px solid var(--cc-blue); }
        .cc-lane-card.travel { border-left: 4px solid var(--cc-purple); }
        .cc-lane-card.general { border-left: 4px solid var(--cc-amber); }

        .cc-lane-thumb {
            aspect-ratio: 1 / 1;
            border-radius: 7px;
            width: 100%;
        }

        .cc-lane-thumb-media {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .cc-lane-copy {
            min-width: 0;
        }

        .cc-lane-copy strong {
            color: var(--cc-text);
            display: block;
            font-size: 10px;
            line-height: 1.2;
            max-height: 24px;
            overflow: hidden;
        }

        .cc-lane-copy span,
        .cc-lane-copy em {
            display: block;
            font-size: 9px;
            font-style: normal;
            font-weight: 800;
            line-height: 1.15;
            margin-top: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-lane-copy span {
            color: var(--cc-muted);
        }

        .cc-lane-copy em {
            color: var(--cc-blue);
        }

        .cc-lane-overflow,
        .cc-lane-empty {
            background: rgba(255, 255, 255, 0.88);
            border: 1px dashed var(--cc-border-strong);
            border-radius: 8px;
            color: var(--cc-muted);
            font-size: 10px;
            font-weight: 900;
            padding: 8px 10px;
            text-align: center;
            width: 74px;
        }

        .cc-lane-overflow strong {
            color: var(--cc-text);
            display: block;
            font-size: 13px;
            line-height: 1;
        }

        .cc-lane-overflow span {
            display: block;
            font-size: 9px;
            margin-top: 3px;
        }

        .cc-phone-node {
            align-items: center;
            display: flex;
            flex-direction: column;
            width: 150px;
        }

        .cc-device-avatar {
            align-items: center;
            background: #fff;
            border: 2px solid rgba(47, 128, 237, 0.18);
            border-radius: 999px;
            box-shadow: 0 10px 20px rgba(20, 32, 51, 0.16);
            display: flex;
            height: 46px;
            justify-content: center;
            margin-bottom: 7px;
            overflow: hidden;
            width: 46px;
        }

        .cc-device-avatar img {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .cc-device-avatar span {
            color: var(--cc-blue);
            font-size: 13px;
            font-weight: 900;
            letter-spacing: 0;
        }

        .cc-phone-node[data-device-id] {
            cursor: pointer;
        }

        .cc-phone-node.expanded {
            z-index: 7;
        }

        .cc-phone-node.expanded .cc-device-avatar {
            border-width: 4px;
            height: 82px;
            margin-bottom: 14px;
            width: 82px;
        }

        .cc-phone-node.expanded .cc-device-avatar span {
            font-size: 22px;
        }

        .cc-phone-frame {
            background: #172033;
            border: 3px solid #263244;
            border-radius: 24px;
            box-sizing: border-box;
            box-shadow: 0 14px 24px rgba(20, 32, 51, 0.18);
            height: 224px;
            padding: 13px 8px 8px;
            position: relative;
            transform-origin: center top;
            width: 120px;
        }

        .cc-phone-node.expanded .cc-phone-frame {
            border-width: 8px;
            border-radius: 48px;
            box-shadow: 0 0 0 10px rgba(47, 128, 237, 0.14), 0 34px 64px rgba(20, 32, 51, 0.26);
            height: 720px;
            padding: 43px 27px 27px;
            width: 390px;
        }

        .cc-phone-node.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 5px rgba(47, 128, 237, 0.16), 0 16px 28px rgba(20, 32, 51, 0.2);
        }

        .cc-phone-node.expanded.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 10px rgba(47, 128, 237, 0.18), 0 34px 64px rgba(20, 32, 51, 0.26);
        }

        .cc-graph-canvas[data-heatmap="risk"] .cc-phone-node.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 5px rgba(228, 86, 86, 0.2), 0 16px 28px rgba(20, 32, 51, 0.2);
        }

        .cc-graph-canvas[data-heatmap="risk"] .cc-phone-node.expanded.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 10px rgba(228, 86, 86, 0.2), 0 34px 64px rgba(20, 32, 51, 0.26);
        }

        .cc-graph-canvas[data-heatmap="health"] .cc-phone-node.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 5px rgba(32, 178, 107, 0.2), 0 16px 28px rgba(20, 32, 51, 0.2);
        }

        .cc-graph-canvas[data-heatmap="health"] .cc-phone-node.expanded.heat-high .cc-phone-frame {
            box-shadow: 0 0 0 10px rgba(32, 178, 107, 0.2), 0 34px 64px rgba(20, 32, 51, 0.26);
        }

        .cc-phone-speaker {
            background: #0c1220;
            border-radius: 999px;
            height: 4px;
            left: 50%;
            position: absolute;
            top: 5px;
            transform: translateX(-50%);
            width: 30px;
            z-index: 3;
        }

        .cc-phone-node.expanded .cc-phone-speaker {
            height: 8px;
            top: 16px;
            width: 88px;
        }

        .cc-phone-screen {
            background: #f8fbfd;
            border-radius: 17px;
            height: 100%;
            overflow: hidden;
            position: relative;
            width: 100%;
        }

        .cc-phone-screen::after {
            content: "";
            inset: 0;
            position: absolute;
            z-index: 5;
        }

        .cc-phone-node.expanded .cc-phone-screen {
            border-radius: 34px;
        }

        .cc-phone-click-target {
            appearance: none;
            background: transparent;
            border: 0;
            cursor: pointer;
            inset: 0;
            padding: 0;
            position: absolute;
            z-index: 6;
        }

        .cc-phone-click-target:focus-visible {
            outline: 3px solid rgba(47, 128, 237, 0.55);
            outline-offset: -8px;
        }

        .cc-phone-stream-frame,
        .cc-phone-stream-media {
            border: 0;
            display: block;
            height: 100%;
            object-fit: contain;
            pointer-events: none;
            width: 100%;
        }

        .cc-phone-stream-placeholder,
        .cc-phone-fallback {
            align-items: center;
            background: linear-gradient(180deg, #f8fbfd, #eaf4fb);
            color: var(--cc-muted);
            display: flex;
            flex-direction: column;
            gap: 4px;
            height: 100%;
            justify-content: center;
            padding: 8px;
            text-align: center;
        }

        .cc-phone-node.expanded .cc-phone-stream-placeholder,
        .cc-phone-node.expanded .cc-phone-fallback {
            gap: 14px;
            padding: 24px;
        }

        .cc-phone-stream-placeholder strong,
        .cc-phone-fallback strong {
            color: var(--cc-text);
            font-size: 10px;
            line-height: 1.1;
        }

        .cc-phone-stream-placeholder span,
        .cc-phone-fallback span {
            font-size: 8px;
            line-height: 1.15;
        }

        .cc-phone-node.expanded .cc-phone-stream-placeholder strong,
        .cc-phone-node.expanded .cc-phone-fallback strong {
            font-size: 18px;
            line-height: 1.18;
        }

        .cc-phone-node.expanded .cc-phone-stream-placeholder span,
        .cc-phone-node.expanded .cc-phone-fallback span {
            font-size: 13px;
            line-height: 1.3;
        }

        .cc-phone-fallback-thumb {
            border-radius: 9px;
            height: 72px;
            overflow: hidden;
            position: relative;
            width: 52px;
        }

        .cc-phone-node.expanded .cc-phone-fallback-thumb {
            border-radius: 18px;
            height: 330px;
            width: 230px;
        }

        .cc-phone-fallback-radar {
            height: 58px;
            position: relative;
            width: 58px;
        }

        .cc-phone-node.expanded .cc-phone-fallback-radar {
            height: 150px;
            width: 150px;
        }

        .cc-phone-fallback-radar i {
            border: 1px solid rgba(47, 128, 237, 0.35);
            border-radius: 999px;
            inset: 8px;
            position: absolute;
        }

        .cc-phone-fallback-radar i:nth-child(2) { animation-delay: 0.5s; }
        .cc-phone-fallback-radar i:nth-child(3) { animation-delay: 1s; }

        .cc-phone-node > strong {
            color: var(--cc-text);
            font-size: 12px;
            margin-top: 7px;
            max-width: 150px;
            overflow: hidden;
            text-align: center;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-phone-node.expanded > strong {
            font-size: 15px;
            max-width: 380px;
        }

        .cc-phone-node > span {
            align-items: center;
            color: var(--cc-muted);
            display: inline-flex;
            font-size: 10px;
            gap: 4px;
            justify-content: center;
            margin-top: 2px;
            max-width: 150px;
            text-align: center;
        }

        .cc-phone-node.expanded > span {
            font-size: 12px;
            max-width: 380px;
        }

        .cc-phone-node > span i {
            background: var(--cc-green);
            border-radius: 999px;
            display: inline-block;
            height: 6px;
            width: 6px;
        }

        .cc-phone-node.posting > span i { background: var(--cc-amber); }
        .cc-phone-node.cooling > span i { background: var(--cc-blue); }
        .cc-phone-node.standby > span i { background: var(--cc-teal); }
        .cc-phone-node.attention > span i { background: var(--cc-red); }

        .device-avatar-panel {
            border-top: 1px solid #e0dcd5;
            margin-top: 20px;
            padding-top: 16px;
            scroll-margin-top: 72px;
        }

        .device-avatar-panel-header {
            align-items: flex-start;
            display: flex;
            gap: 16px;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .device-avatar-panel-header h4 {
            color: #1a1a1a;
            font-size: 14px;
            margin: 0;
        }

        .device-avatar-panel-header p {
            color: #777;
            font-size: 12px;
            line-height: 1.35;
            margin: 4px 0 0;
        }

        .device-avatar-panel-header span {
            background: #eef5ff;
            border: 1px solid #c8dcf6;
            border-radius: 999px;
            color: #2f80ed;
            flex-shrink: 0;
            font-size: 12px;
            font-weight: 800;
            padding: 4px 10px;
        }

        .device-avatar-manager {
            display: grid;
            gap: 12px;
        }

        .device-avatar-upload {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            display: grid;
            gap: 12px;
            grid-template-columns: minmax(0, 1fr) auto;
            padding: 12px;
        }

        .device-avatar-upload-fields {
            display: grid;
            gap: 10px;
            grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 0.8fr) minmax(180px, 1fr);
        }

        .device-avatar-upload label,
        .device-avatar-fields label {
            display: grid;
            gap: 5px;
            margin: 0;
        }

        .device-avatar-upload label span,
        .device-avatar-fields label span {
            color: #555;
            font-size: 11px;
            font-weight: 800;
        }

        .device-avatar-upload input,
        .device-avatar-upload select,
        .device-avatar-fields input,
        .device-avatar-fields select,
        .device-avatar-fields textarea {
            border: 1px solid #d5d0c8;
            border-radius: 6px;
            box-sizing: border-box;
            color: #1a1a1a;
            font-family: inherit;
            font-size: 12px;
            padding: 8px 9px;
            width: 100%;
        }

        .device-avatar-fields textarea {
            min-height: 54px;
            resize: vertical;
        }

        .device-avatar-upload-actions {
            align-items: flex-end;
            display: flex;
            flex-direction: column;
            gap: 8px;
            justify-content: space-between;
            min-width: 120px;
        }

        .device-avatar-upload-actions p {
            color: #777;
            font-size: 12px;
            margin: 0;
            text-align: right;
        }

        .device-avatar-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        }

        .device-avatar-card {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            display: grid;
            gap: 10px;
            grid-template-columns: 82px minmax(0, 1fr);
            padding: 10px;
        }

        .device-avatar-card.primary {
            border-color: #2f80ed;
            box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.1);
        }

        .device-avatar-card.deleted {
            opacity: 0.75;
        }

        .device-avatar-preview {
            aspect-ratio: 1 / 1;
            background: #f5f1ea;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            width: 82px;
        }

        .device-avatar-preview img {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .device-avatar-preview span {
            background: rgba(47, 128, 237, 0.92);
            border-radius: 999px;
            bottom: 5px;
            color: #fff;
            font-size: 9px;
            font-weight: 900;
            left: 5px;
            padding: 2px 6px;
            position: absolute;
        }

        .device-avatar-fields {
            display: grid;
            gap: 8px;
            min-width: 0;
        }

        .device-avatar-tag-suggestions {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .device-avatar-tag-suggestions button {
            appearance: none;
            background: #faf8f3;
            border: 1px solid #e0dcd5;
            border-radius: 999px;
            color: #555;
            cursor: pointer;
            font-size: 10px;
            font-weight: 700;
            padding: 3px 7px;
        }

        .device-avatar-tag-suggestions button.selected {
            background: #eef5ff;
            border-color: #c8dcf6;
            color: #2f80ed;
        }

        .device-avatar-actions {
            display: flex;
            gap: 7px;
            grid-column: 1 / -1;
            justify-content: flex-end;
        }

        .device-avatar-actions button,
        .device-avatar-upload-actions button,
        .device-avatar-action {
            white-space: nowrap;
        }

        .device-avatar-empty {
            background: #fff;
            border: 1px dashed #d5d0c8;
            border-radius: 8px;
            color: #777;
            font-size: 13px;
            font-weight: 700;
            padding: 14px;
            text-align: center;
        }

        .device-avatar-bin {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            overflow: hidden;
        }

        .device-avatar-bin summary {
            align-items: center;
            cursor: pointer;
            display: flex;
            font-size: 12px;
            font-weight: 900;
            justify-content: space-between;
            padding: 10px 12px;
        }

        .device-avatar-bin summary span {
            background: #f3eee6;
            border-radius: 999px;
            color: #777;
            font-size: 11px;
            padding: 2px 7px;
        }

        .device-avatar-bin .device-avatar-grid,
        .device-avatar-bin p {
            border-top: 1px solid #e0dcd5;
            padding: 12px;
        }

        .device-row-avatar {
            align-items: center;
            background: #eef5ff;
            border: 1px solid #c8dcf6;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            height: 34px;
            justify-content: center;
            margin-right: 8px;
            overflow: hidden;
            padding: 0;
            vertical-align: middle;
            width: 34px;
        }

        .device-row-avatar img {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .device-row-avatar span {
            color: #2f80ed;
            font-size: 11px;
            font-weight: 900;
        }

        .cc-graph-empty {
            align-items: center;
            background: rgba(255, 255, 255, 0.86);
            border: 1px dashed var(--cc-border-strong);
            border-radius: 8px;
            color: var(--cc-muted);
            display: flex;
            font-size: 13px;
            font-weight: 800;
            inset: 42% auto auto 50%;
            justify-content: center;
            min-width: 260px;
            padding: 18px;
            position: absolute;
            transform: translate(-50%, -50%);
        }

        .cc-graph-status-bar {
            align-items: center;
            border-top: 1px solid var(--cc-border);
            display: grid;
            gap: 12px;
            grid-template-columns: 1.2fr 0.8fr 0.7fr;
            padding: 11px 16px;
        }

        .cc-graph-status-bar div {
            min-width: 0;
        }

        .cc-graph-status-bar span {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .cc-graph-status-bar strong {
            color: var(--cc-text);
            display: block;
            font-size: 12px;
            line-height: 1.3;
            margin-top: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-right-rail {
            display: grid;
            gap: 12px;
            grid-area: right;
            grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
            min-width: 0;
        }

        .cc-output-panel,
        .cc-anomaly-panel {
            grid-column: span 2;
        }

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

        .cc-metric-card {
            background: #fbfdff;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            min-height: 70px;
            overflow: hidden;
            padding: 9px 10px;
            position: relative;
        }

        .cc-metric-card:nth-child(1) {
            grid-column: span 2;
        }

        .cc-metric-card span {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-weight: 800;
        }

        .cc-metric-card strong {
            color: var(--cc-text);
            display: block;
            font-size: 18px;
            line-height: 1.1;
            margin: 5px 0 3px;
        }

        .cc-metric-card em {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-style: normal;
            font-weight: 800;
        }

        .cc-metric-card.healthy em { color: var(--cc-green); }
        .cc-metric-card.attention em { color: var(--cc-red); }

        .cc-anomaly-panel summary {
            align-items: center;
            cursor: pointer;
            display: flex;
            gap: 12px;
            justify-content: space-between;
            list-style: none;
            padding: 12px 14px;
        }

        .cc-anomaly-panel summary::-webkit-details-marker {
            display: none;
        }

        .cc-anomaly-panel summary h2 {
            color: var(--cc-text);
            font-size: 15px;
            line-height: 1.2;
            margin: 0 0 4px;
        }

        .cc-anomaly-panel summary p {
            color: var(--cc-muted);
            font-size: 12px;
            line-height: 1.35;
        }

        .cc-anomaly-panel summary > strong {
            align-items: center;
            background: #f7fbfd;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            color: var(--cc-text);
            display: flex;
            flex-shrink: 0;
            font-size: 20px;
            height: 48px;
            justify-content: center;
            width: 56px;
        }

        .cc-anomaly-panel[data-tone="attention"] summary > strong {
            background: #fff4f4;
            border-color: #ffd0d0;
            color: var(--cc-red);
        }

        .cc-anomaly-panel[data-tone="healthy"] summary > strong {
            background: #ecfbf5;
            border-color: #bce8d8;
            color: var(--cc-green);
        }

        .cc-anomaly-list {
            border-top: 1px solid var(--cc-border);
            display: grid;
            gap: 8px;
            padding: 10px 12px 12px;
        }

        .cc-anomaly-item {
            align-items: center;
            background: #fbfdff;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            display: grid;
            gap: 10px;
            grid-template-columns: 40px minmax(0, 1fr);
            padding: 9px;
        }

        .cc-anomaly-item > strong {
            align-items: center;
            background: #eef5ff;
            border-radius: 999px;
            color: var(--cc-blue);
            display: flex;
            font-size: 14px;
            height: 34px;
            justify-content: center;
            width: 34px;
        }

        .cc-anomaly-item.warn > strong {
            background: #fff7e7;
            color: #b97709;
        }

        .cc-anomaly-item.error > strong {
            background: #fff0f0;
            color: var(--cc-red);
        }

        .cc-anomaly-item span {
            color: var(--cc-text);
            display: block;
            font-size: 12px;
            font-weight: 900;
            line-height: 1.25;
        }

        .cc-anomaly-item em {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-style: normal;
            line-height: 1.3;
            margin-top: 3px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-output-grid {
            display: grid;
            gap: 10px;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            padding: 12px;
        }

        .cc-output-item {
            min-width: 0;
            position: relative;
        }

        .cc-output-item .cc-thumb-wrap {
            aspect-ratio: 3 / 4;
            border-radius: 8px;
        }

        .cc-output-item span {
            background: rgba(20, 32, 51, 0.76);
            border-radius: 999px;
            bottom: 5px;
            color: #fff;
            font-size: 10px;
            font-weight: 800;
            left: 5px;
            max-width: calc(100% - 10px);
            overflow: hidden;
            padding: 3px 6px;
            position: absolute;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-log-panel {
            grid-area: log;
            margin-bottom: 18px;
        }

        .cc-log-tools {
            display: flex;
            gap: 8px;
        }

        .cc-log-tools input {
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 7px;
            color: var(--cc-text);
            font-family: inherit;
            font-size: 12px;
            min-height: 32px;
            padding: 7px 10px;
            width: 220px;
        }

        .cc-log-table {
            max-height: 280px;
            overflow: auto;
        }

        .cc-log-head,
        .cc-log-row {
            display: grid;
            gap: 10px;
            grid-template-columns: 96px 70px 120px minmax(150px, 0.8fr) minmax(220px, 1fr);
            padding: 8px 14px;
        }

        .cc-log-head {
            background: #f7fbfd;
            border-bottom: 1px solid var(--cc-border);
            color: var(--cc-muted);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.03em;
        }

        .cc-log-row {
            border-bottom: 1px solid var(--cc-border);
            color: #405169;
            font-size: 11px;
        }

        .cc-log-row span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cc-log-row i {
            border-radius: 999px;
            display: inline-block;
            font-size: 10px;
            font-style: normal;
            font-weight: 900;
            padding: 3px 7px;
        }

        .cc-log-row i.info {
            background: #e8fbf6;
            color: var(--cc-teal);
        }

        .cc-log-row i.warn {
            background: #fff7e7;
            color: #b97709;
        }

        .cc-log-row i.error {
            background: #fff0f0;
            color: var(--cc-red);
        }

        .cc-empty-state {
            color: var(--cc-muted);
            font-size: 12px;
            font-weight: 800;
            padding: 18px;
            text-align: center;
        }

        .cc-queue-modal-overlay {
            align-items: center;
            background: rgba(20, 32, 51, 0.48);
            display: flex;
            inset: 0;
            justify-content: center;
            padding: 22px;
            position: fixed;
            z-index: 320;
        }

        .cc-queue-modal {
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 10px;
            box-shadow: 0 24px 70px rgba(20, 32, 51, 0.24);
            max-height: 92vh;
            max-width: 1080px;
            overflow: hidden;
            width: min(1080px, 96vw);
        }

        .cc-queue-modal > header {
            align-items: center;
            border-bottom: 1px solid var(--cc-border);
            display: flex;
            justify-content: space-between;
            padding: 16px 18px;
        }

        .cc-queue-modal > header span {
            color: var(--cc-muted);
            display: block;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .cc-queue-modal > header h2 {
            color: var(--cc-text);
            font-size: 18px;
            line-height: 1.2;
            margin: 4px 0 0;
        }

        .cc-modal-close {
            appearance: none;
            background: #f7fbfd;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            color: var(--cc-muted);
            cursor: pointer;
            font-size: 22px;
            font-weight: 700;
            height: 36px;
            line-height: 1;
            width: 36px;
        }

        .cc-queue-modal-grid {
            display: grid;
            grid-template-columns: 320px minmax(0, 1fr);
            max-height: calc(92vh - 70px);
            overflow: auto;
        }

        .cc-queue-modal-preview {
            background: #f8fbfd;
            border-right: 1px solid var(--cc-border);
            padding: 16px;
        }

        .cc-queue-modal-preview p {
            color: var(--cc-muted);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.35;
            margin-top: 12px;
        }

        .cc-queue-modal-media-grid {
            display: grid;
            gap: 8px;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .cc-queue-modal-thumb {
            aspect-ratio: 3 / 4;
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 8px;
            cursor: pointer;
            overflow: hidden;
            padding: 0;
            position: relative;
        }

        .cc-queue-modal-thumb img,
        .cc-queue-modal-thumb video {
            display: block;
            height: 100%;
            object-fit: cover;
            width: 100%;
        }

        .cc-queue-modal-thumb span {
            background: rgba(20, 32, 51, 0.76);
            border-radius: 999px;
            bottom: 6px;
            color: #fff;
            font-size: 10px;
            font-weight: 900;
            left: 6px;
            padding: 3px 7px;
            position: absolute;
        }

        .cc-queue-modal-media-empty {
            align-items: center;
            aspect-ratio: 3 / 4;
            background: #fff;
            border: 1px dashed var(--cc-border-strong);
            border-radius: 8px;
            color: var(--cc-muted);
            display: flex;
            font-size: 12px;
            font-weight: 800;
            grid-column: 1 / -1;
            justify-content: center;
            padding: 18px;
            text-align: center;
        }

        .cc-queue-modal-form {
            display: grid;
            gap: 13px;
            padding: 16px 18px 18px;
        }

        .cc-queue-modal-form label {
            display: grid;
            gap: 6px;
        }

        .cc-queue-modal-form label span {
            color: var(--cc-muted);
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
        }

        .cc-queue-modal-form input,
        .cc-queue-modal-form textarea,
        .cc-queue-modal-form select {
            background: #fff;
            border: 1px solid var(--cc-border);
            border-radius: 7px;
            color: var(--cc-text);
            font-family: inherit;
            font-size: 13px;
            line-height: 1.4;
            padding: 9px 10px;
            width: 100%;
        }

        .cc-queue-modal-form textarea {
            min-height: 180px;
            resize: vertical;
        }

        .cc-queue-modal-fields {
            display: grid;
            gap: 10px;
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .cc-queue-tags {
            color: var(--cc-muted);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.45;
        }

        .cc-queue-modal-form footer {
            align-items: center;
            border-top: 1px solid var(--cc-border);
            display: flex;
            gap: 12px;
            justify-content: space-between;
            margin-top: 2px;
            padding-top: 14px;
        }

        .cc-queue-modal-form footer div {
            display: flex;
            gap: 8px;
        }

        .cc-primary-btn,
        .cc-secondary-btn,
        .cc-danger-btn {
            appearance: none;
            border: 1px solid var(--cc-border);
            border-radius: 7px;
            cursor: pointer;
            font-family: inherit;
            font-size: 12px;
            font-weight: 900;
            min-height: 34px;
            padding: 8px 12px;
        }

        .cc-primary-btn {
            background: var(--cc-text);
            border-color: var(--cc-text);
            color: #fff;
        }

        .cc-secondary-btn {
            background: #fff;
            color: var(--cc-text);
        }

        .cc-danger-btn {
            background: #fff5f5;
            border-color: #ffc7c7;
            color: var(--cc-red);
        }

        @keyframes cc-pulse {
            0%, 100% { opacity: 0.72; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.08); }
        }

        @media (prefers-reduced-motion: reduce) {
            .cc-link,
            .cc-live-dot.loading,
            .cc-phone-fallback-radar i,
            .cc-graph-canvas.breathing-enabled .cc-phone-node .cc-phone-frame {
                animation: none !important;
            }

            .cc-packet-dot {
                display: none;
            }
        }

        @media (max-width: 1320px) {
            .cc-topbar {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .cc-situation-band {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .cc-top-actions {
                justify-content: flex-start;
            }

            .cc-dashboard-grid {
                grid-template-areas:
                    "graph"
                    "right"
                    "log";
                grid-template-columns: minmax(0, 1fr);
            }

            .cc-right-rail {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .cc-output-panel {
                grid-column: span 2;
            }

            .cc-output-grid {
                grid-template-columns: repeat(6, minmax(0, 1fr));
            }
        }

        @media (max-width: 980px) {
            .cc-dashboard-grid {
                grid-template-areas:
                    "graph"
                    "right"
                    "log";
                grid-template-columns: 1fr;
            }

            .cc-right-rail,
            .cc-topbar,
            .cc-situation-band {
                grid-template-columns: 1fr;
            }

            .cc-output-panel,
            .cc-anomaly-panel {
                grid-column: auto;
            }

            .cc-output-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }

            .cc-queue-panel,
            .cc-graph-panel,
            .cc-right-rail,
            .cc-log-panel {
                grid-area: auto;
            }

            .cc-graph-panel {
                min-height: auto;
            }

            .cc-graph-canvas {
                min-height: 720px;
            }

            .cc-log-head,
            .cc-log-row {
                grid-template-columns: 92px 64px minmax(90px, 0.7fr) minmax(150px, 1fr);
            }

            .cc-log-head span:nth-child(5),
            .cc-log-row span:nth-child(5) {
                display: none;
            }
        }

        @media (max-width: 760px) {
            .cc-topbar {
                gap: 10px;
            }

            .cc-top-actions,
            .cc-panel-header,
            .cc-graph-header,
            .cc-graph-toolbar,
            .cc-graph-status-bar,
            .cc-log-tools {
                align-items: stretch;
                flex-direction: column;
            }

            .cc-graph-header,
            .cc-panel-header {
                gap: 10px;
            }

            .cc-mode-control {
                align-items: stretch;
                flex-wrap: wrap;
                width: 100%;
            }

            .cc-mode-control span {
                flex-basis: 100%;
                margin: 0 2px 4px;
            }

            .cc-mode-control button {
                flex: 1;
            }

            .cc-zoom-control {
                display: none;
            }

            .cc-queue-item {
                grid-template-columns: 58px minmax(0, 1fr);
            }

            .cc-graph-canvas {
                height: auto;
                min-height: auto;
                overflow: visible;
            }

            .cc-graph-scene,
            .cc-graph-zoom-layer {
                height: auto !important;
                position: static;
                transform: none !important;
                width: auto !important;
            }

            .cc-graph-svg {
                display: none;
            }

            .cc-graph-nodes {
                display: grid;
                gap: 12px;
                grid-template-columns: 1fr;
                padding: 14px;
                position: static;
            }

            .cc-account-node,
            .cc-source-node,
            .cc-manufacturer-node,
            .cc-content-node,
            .cc-gateway-node,
            .cc-draft-pool-node,
            .cc-graph-axis-label,
            .cc-row-label,
            .cc-lane-card-wrap,
            .cc-lane-overflow,
            .cc-lane-empty,
            .cc-phone-node {
                left: auto !important;
                position: static;
                top: auto !important;
                transform: none;
                width: auto;
            }

            .cc-source-node,
            .cc-manufacturer-node {
                cursor: default;
                height: auto;
                justify-content: flex-start;
                min-width: 0;
                padding: 10px;
            }

            .cc-source-node::before,
            .cc-source-node::after,
            .cc-manufacturer-node::before,
            .cc-manufacturer-node::after {
                display: none;
            }

            .cc-source-node > div,
            .cc-manufacturer-node > div {
                display: block;
            }

            .cc-source-node i {
                flex-shrink: 0;
                height: 32px;
                width: 32px;
            }

            .cc-manufacturer-node {
                gap: 10px;
            }

            .cc-manufacturer-node img,
            .cc-manufacturer-node > i {
                height: 42px;
                width: 42px;
            }

            .cc-graph-axis-label {
                border-radius: 8px;
                text-align: left;
            }

            .cc-draft-pool-node {
                height: auto !important;
                width: auto !important;
            }

            .cc-draft-pool-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .cc-row-label,
            .cc-lane-overflow,
            .cc-lane-empty {
                width: auto;
            }

            .cc-lane-card,
            .cc-lane-card.posted {
                width: 100%;
            }

            .cc-phone-node {
                background: #fff;
                border: 1px solid var(--cc-border);
                border-radius: 8px;
                padding: 12px;
            }

            .cc-device-avatar {
                margin: 0 auto 8px;
            }

            .cc-phone-frame {
                height: 220px;
                margin: 0 auto;
                width: 124px;
            }

            .cc-phone-node.expanded .cc-phone-frame {
                border-radius: 24px;
                border-width: 3px;
                height: 220px;
                padding: 13px 8px 8px;
                width: 124px;
            }

            .cc-graph-status-bar {
                grid-template-columns: 1fr;
            }

            .cc-metric-grid,
            .cc-output-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .device-avatar-upload,
            .device-avatar-upload-fields {
                grid-template-columns: 1fr;
            }

            .device-avatar-upload-actions {
                align-items: stretch;
            }

            .device-avatar-upload-actions p {
                text-align: left;
            }

            .device-avatar-grid {
                grid-template-columns: 1fr;
            }

            .device-avatar-card {
                grid-template-columns: 74px minmax(0, 1fr);
            }

            .device-avatar-preview {
                width: 74px;
            }

            .cc-metric-card:nth-child(1) {
                grid-column: span 2;
            }

            .cc-log-tools input,
            .cc-log-tools button {
                width: 100%;
            }

            .cc-log-head,
            .cc-log-row {
                grid-template-columns: 86px 58px minmax(120px, 1fr);
            }

            .cc-log-head span:nth-child(4),
            .cc-log-row span:nth-child(4) {
                display: none;
            }

            .cc-queue-modal-overlay {
                align-items: stretch;
                padding: 10px;
            }

            .cc-queue-modal {
                max-height: calc(100vh - 20px);
                width: 100%;
            }

            .cc-queue-modal-grid {
                grid-template-columns: 1fr;
                max-height: calc(100vh - 90px);
            }

            .cc-queue-modal-preview {
                border-right: 0;
                border-bottom: 1px solid var(--cc-border);
            }

            .cc-queue-modal-media-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .cc-queue-modal-fields {
                grid-template-columns: 1fr;
            }

            .cc-queue-modal-form footer {
                align-items: stretch;
                flex-direction: column-reverse;
            }

            .cc-queue-modal-form footer div,
            .cc-primary-btn,
            .cc-secondary-btn,
            .cc-danger-btn {
                width: 100%;
            }
        }

        .tab-badge {
            display: inline-block;
            background: #c0392b;
            color: white;
            border-radius: 10px;
            padding: 1px 7px;
            font-size: 10px;
            font-weight: 700;
            margin-left: 5px;
            min-width: 18px;
            text-align: center;
        }

        .dm-card {
            background: #faf8f3;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            padding: 14px;
            margin-bottom: 12px;
        }

        .dm-card.has-unread {
            border-color: #c0392b;
            background: #fff5f5;
        }

        .dm-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .dm-device-name {
            font-size: 16px;
            font-weight: 700;
            color: #1a1a1a;
        }

        .dm-unread-badge {
            background: #c0392b;
            color: white;
            border-radius: 12px;
            padding: 3px 10px;
            font-size: 13px;
            font-weight: 700;
        }

        .btn-check-dm {
            background: #2596be;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 6px 14px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        .btn-check-dm:hover {
            background: #1e7a9c;
        }

        .dm-timestamp {
            font-size: 11px;
            color: #999;
            margin-bottom: 8px;
        }

        .dm-conversation {
            background: white;
            border-radius: 5px;
            padding: 8px;
            margin-bottom: 6px;
            border-left: 3px solid #2596be;
        }

        .dm-sender {
            font-weight: 600;
            color: #1a1a1a;
            font-size: 13px;
            margin-bottom: 2px;
        }

        .dm-preview {
            color: #666;
            font-size: 13px;
        }

        /* Schedule Modal */
        #scheduleModal {
            backdrop-filter: blur(2px);
        }

        /* Today Tasks Grid */
        #todayTasksContainer {
            margin-top: 10px;
        }

        /* Sidebar DM Check Button */
        .device-card button {
            transition: background 0.2s, border-color 0.2s;
        }
        .device-card button:hover {
            background: #e8f4f8;
            border-color: #2596be;
            color: #2596be;
        }

        /* Calendar Week View */
        .calendar-week {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 10px;
            overflow: hidden;
            font-size: 12px;
        }
        .calendar-header {
            display: grid;
            grid-template-columns: 50px repeat(7, 1fr);
            border-bottom: 1px solid #e0dcd5;
            background: #faf8f3;
        }
        .calendar-header-cell {
            padding: 10px 4px;
            text-align: center;
            font-weight: 600;
            color: #666;
            border-right: 1px solid #eee;
        }
        .calendar-header-cell:last-child {
            border-right: none;
        }
        .calendar-header-cell.today {
            background: #e8f4f8;
            color: #2596be;
        }
        .calendar-header-cell .day-name {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .calendar-header-cell .day-num {
            font-size: 15px;
            margin-top: 2px;
        }
        .calendar-body {
            display: grid;
            grid-template-columns: 50px repeat(7, 1fr);
            height: 560px;
            overflow-y: auto;
            position: relative;
        }
        .calendar-time-col {
            background: #faf8f3;
            border-right: 1px solid #e0dcd5;
            position: relative;
        }
        .calendar-time-slot {
            height: 40px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            padding-right: 6px;
            padding-top: 2px;
            font-size: 10px;
            color: #aaa;
            position: relative;
        }
        .calendar-day-col {
            border-right: 1px solid #f0f0f0;
            position: relative;
        }
        .calendar-day-col:last-child {
            border-right: none;
        }
        .calendar-day-col.today {
            background: #f8fbfc;
        }
        .calendar-hour-line {
            height: 40px;
            border-bottom: 1px solid #f5f5f5;
        }

        .calendar-current-time {
            position: absolute;
            left: 0;
            right: 0;
            height: 2px;
            background: #e74c3c;
            z-index: 20;
            pointer-events: none;
        }

        .calendar-current-time::before {
            content: '';
            position: absolute;
            left: -5px;
            top: -4px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #e74c3c;
            border: 2px solid white;
            box-shadow: 0 0 0 1px #e74c3c;
        }

        .calendar-time-col .calendar-current-time-label {
            position: absolute;
            right: 6px;
            top: -8px;
            font-size: 10px;
            font-weight: 700;
            color: #e74c3c;
            background: white;
            padding: 1px 4px;
            border-radius: 3px;
            border: 1px solid #e74c3c;
        }
        .calendar-task {
            position: absolute;
            left: 2px;
            right: 2px;
            border-radius: 4px;
            padding: 2px 5px;
            font-size: 10px;
            color: #fff;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            cursor: pointer;
            line-height: 1.3;
            box-shadow: 0 1px 2px rgba(0,0,0,0.15);
            z-index: 2;
            opacity: 0.6;
            transition: opacity 0.15s, transform 0.1s;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .calendar-task:hover {
            opacity: 1;
            z-index: 5;
            transform: scale(1.02);
            box-shadow: 0 2px 6px rgba(0,0,0,0.25);
        }
        .calendar-task.readonly-task {
            cursor: default;
            opacity: 0.75;
        }
        .calendar-task.readonly-task:hover {
            opacity: 0.9;
            transform: none;
            box-shadow: 0 1px 2px rgba(0,0,0,0.15);
        }

        /* Task Detail Modal */
        #taskDetailModal .form-group input[readonly] {
            cursor: not-allowed;
        }
        #taskDetailModal .form-group input:disabled {
            background: #f5f5f0;
            color: #999;
            cursor: not-allowed;
            border-color: #e0dcd5;
        }
        .btn-secondary {
            transition: background 0.2s, border-color 0.2s;
        }
        .btn-secondary:hover {
            background: #e8e4dc;
            border-color: #c0bbb3;
        }
        .calendar-task[data-tooltip] {
            position: absolute;
        }
        .calendar-task[data-tooltip]:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 50%;
            bottom: 100%;
            transform: translateX(-50%);
            background: #1a1a1a;
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 11px;
            white-space: pre-line;
            line-height: 1.5;
            z-index: 100;
            pointer-events: none;
            min-width: 180px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            margin-bottom: 6px;
        }
        .calendar-task[data-tooltip]:hover::before {
            content: '';
            position: absolute;
            left: 50%;
            bottom: 100%;
            transform: translateX(-50%);
            margin-bottom: 1px;
            border: 5px solid transparent;
            border-top-color: #1a1a1a;
            z-index: 100;
            pointer-events: none;
        }
        .calendar-filter-btn {
            padding: 3px 12px;
            border-radius: 14px;
            font-size: 12px;
            border: 1.5px solid #ddd;
            cursor: pointer;
            background: #fff;
            color: #555;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .calendar-filter-btn.inactive {
            opacity: 0.4;
            background: #f5f5f5;
            border-color: #e0e0e0;
        }
        .calendar-filter-btn .filter-swatch {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            display: inline-block;
        }
        .calendar-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 14px;
            font-size: 12px;
            color: #555;
        }
        .calendar-legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .calendar-legend-swatch {
            width: 12px;
            height: 12px;
            border-radius: 3px;
        }

        /* Content Studio */
        .cs-nav-btn {
            display: inline-flex;
            align-items: center;
            padding: 8px 16px;
            background: #f5f5f0;
            border: 2px solid #d5d0c8;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            color: #666;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
            text-decoration: none;
        }
        .cs-nav-btn:hover {
            background: #ebe8e0;
            border-color: #c0bbb2;
        }
        .cs-nav-btn.active {
            background: #1a1a1a;
            border-color: #1a1a1a;
            color: white;
        }
        .cs-section {
            display: none;
        }
        .cs-section.active {
            display: block;
        }
        .genre-empty-state {
            min-height: 220px;
            display: flex;
            align-items: center;
            gap: 18px;
            color: #1a1a1a;
        }
        .genre-empty-icon {
            width: 64px;
            height: 64px;
            display: grid;
            place-items: center;
            border-radius: 8px;
            background: #f5f5f0;
            border: 1px solid #e0dcd5;
            font-size: 30px;
            flex: 0 0 auto;
        }
        .genre-empty-title {
            margin: 0 0 8px;
            font-size: 18px;
            color: #1a1a1a;
        }
        .genre-empty-copy {
            margin: 0;
            max-width: 520px;
            color: #666;
            font-size: 13px;
            line-height: 1.6;
        }
        .studio-shell {
            display: flex;
            flex-direction: column;
            gap: 18px;
            margin-bottom: 18px;
        }
        .studio-shell-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            flex-wrap: wrap;
        }
        .studio-kicker {
            font-size: 11px;
            font-weight: 700;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 6px;
        }
        .studio-title {
            margin: 0;
            font-size: 24px;
            color: #1a1a1a;
            line-height: 1.2;
        }
        .studio-subtitle {
            margin: 8px 0 0;
            color: #666;
            font-size: 13px;
            line-height: 1.6;
            max-width: 760px;
        }
        .studio-route-nav {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .studio-panel {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }
        .studio-panel-padded {
            padding: 16px;
        }
        .studio-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 16px;
            flex-wrap: wrap;
            padding: 16px;
        }
        .studio-panel-header-tight {
            padding: 14px 16px;
        }
        .studio-toolbar-cluster {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        .studio-muted {
            font-size: 12px;
            color: #777;
            line-height: 1.5;
        }
        .studio-select-wrap {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            background: #faf9f7;
            font-size: 12px;
            color: #666;
            font-weight: 600;
        }
        .studio-select-wrap select {
            min-width: 110px;
            min-height: 32px;
            padding: 6px 28px 6px 10px;
            border: 1px solid #d5d0c8;
            border-radius: 6px;
            background: #fff;
            font-size: 12px;
            font-family: inherit;
        }
        .studio-segmented {
            display: inline-flex;
            gap: 4px;
            padding: 4px;
            border-radius: 10px;
            background: #f5f5f0;
            border: 1px solid #e0dcd5;
        }
        .studio-segment-btn {
            border: none;
            background: transparent;
            color: #666;
            border-radius: 8px;
            padding: 8px 12px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            font-family: inherit;
        }
        .studio-segment-btn.active {
            background: #fff;
            color: #1a1a1a;
            box-shadow: 0 1px 2px rgba(0,0,0,0.08);
        }
        .studio-news-layout {
            display: grid;
            grid-template-columns: 280px minmax(0, 1fr);
            gap: 20px;
            min-height: 560px;
        }
        .studio-news-sidebar {
            display: flex;
            flex-direction: column;
            border-right: 1px solid #e0dcd5;
            padding-right: 16px;
            min-width: 0;
        }
        .studio-news-main {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .studio-foodie-layout {
            display: grid;
            grid-template-columns: 360px minmax(0, 1fr);
            gap: 20px;
            min-height: 560px;
        }
        .studio-travel-layout {
            display: grid;
            grid-template-columns: 360px minmax(0, 1fr);
            gap: 20px;
            min-height: 560px;
        }
        .travel-tabs {
            display: inline-flex;
            gap: 4px;
            padding: 4px;
            margin-bottom: 16px;
            border: 1px solid #dbeafe;
            border-radius: 8px;
            background: #f8fbff;
        }
        .travel-tab-btn {
            min-width: 120px;
            padding: 8px 14px;
            border: 0;
            border-radius: 6px;
            background: transparent;
            color: #0369a1;
            font: inherit;
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }
        .travel-tab-btn.active {
            background: #0ea5e9;
            color: #fff;
            box-shadow: 0 1px 3px rgba(14, 165, 233, 0.24);
        }
        .travel-workspace-panel {
            display: none;
        }
        .travel-workspace-panel.active {
            display: block;
        }
        .travel-itinerary-advanced {
            margin-top: 16px;
        }
        .travel-itinerary-summary {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            cursor: pointer;
            color: #0369a1;
            font-size: 13px;
            font-weight: 800;
        }
        .travel-itinerary-summary span:last-child {
            color: #777;
            font-size: 12px;
        }
        .studio-details-block {
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid #ece7df;
        }
        .studio-details-block summary {
            cursor: pointer;
            font-size: 12px;
            font-weight: 700;
            color: #666;
            list-style: none;
        }
        .studio-details-block summary::-webkit-details-marker {
            display: none;
        }
        .studio-details-block[open] summary {
            margin-bottom: 12px;
        }
        .studio-drafts-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
        }

        /* News Source Cards */
        .news-source-card {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 10px;
            padding: 16px;
            transition: box-shadow 0.2s, border-color 0.2s;
        }
        .news-source-card:hover {
            border-color: #2596be;
            box-shadow: 0 2px 8px rgba(37,150,190,0.12);
        }
        .news-source-card.selected {
            border-color: #2596be;
            background: #f0f8fc;
            box-shadow: 0 0 0 2px rgba(37,150,190,0.2);
        }
        .news-source-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 8px;
        }
        .news-source-name {
            font-weight: 700;
            font-size: 15px;
            color: #1a1a1a;
        }
        .news-source-type {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            background: #f0f0f0;
            color: #666;
            text-transform: uppercase;
            font-weight: 600;
        }
        .news-source-url {
            font-size: 12px;
            color: #888;
            margin-bottom: 10px;
            word-break: break-all;
        }
        .news-source-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
        }
        .news-source-last {
            color: #999;
        }
        .news-source-actions {
            display: flex;
            gap: 6px;
        }
        .news-source-actions button {
            padding: 4px 10px;
            font-size: 11px;
            border-radius: 4px;
            border: 1px solid #d5d0c8;
            background: #f5f5f0;
            cursor: pointer;
            font-family: inherit;
            font-weight: 600;
        }
        .news-source-actions button:hover {
            background: #ebe8e0;
        }
        .news-source-actions .fetch-btn {
            background: #1a1a1a;
            color: white;
            border-color: #1a1a1a;
        }
        .news-source-actions .fetch-btn:hover {
            background: #333;
        }
        .news-source-actions .fetch-btn:disabled {
            background: #ccc;
            border-color: #ccc;
            cursor: not-allowed;
        }

        /* News Source Sidebar */
        .news-source-sidebar-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.15s;
            border: 1px solid transparent;
        }
        .news-source-sidebar-item:hover {
            background: #f5f5f0;
        }
        .news-source-sidebar-item.active {
            background: #f0f8fc;
            border-color: #2596be;
        }
        .news-source-sidebar-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: #1a1a1a;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            flex-shrink: 0;
        }
        .news-source-sidebar-info {
            flex: 1;
            min-width: 0;
        }
        .news-source-sidebar-name {
            font-weight: 600;
            font-size: 13px;
            color: #1a1a1a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .news-source-sidebar-meta {
            font-size: 11px;
            color: #999;
            margin-top: 2px;
        }
        .news-source-sidebar-count {
            font-size: 12px;
            font-weight: 700;
            color: #666;
            background: #f0f0f0;
            padding: 2px 8px;
            border-radius: 10px;
            flex-shrink: 0;
        }
        .news-source-sidebar-item.active .news-source-sidebar-count {
            background: #2596be;
            color: white;
        }
        .news-source-sidebar-fetch {
            padding: 3px 8px;
            font-size: 10px;
            border-radius: 4px;
            border: 1px solid #d5d0c8;
            background: #f5f5f0;
            cursor: pointer;
            font-family: inherit;
            font-weight: 600;
            flex-shrink: 0;
        }
        .news-source-sidebar-fetch:hover {
            background: #1a1a1a;
            color: white;
            border-color: #1a1a1a;
        }

        /* News Article Cards */
        .news-article-card {
            background: #fff;
            border: 1px solid #e0dcd5;
            border-radius: 10px;
            padding: 14px;
            transition: box-shadow 0.2s, border-color 0.2s;
            cursor: pointer;
            position: relative;
        }
        .news-article-card:hover {
            border-color: #2596be;
            box-shadow: 0 2px 8px rgba(37,150,190,0.12);
        }
        .news-article-card.selected {
            border-color: #2596be;
            background: #f0f8fc;
            box-shadow: 0 0 0 2px rgba(37,150,190,0.2);
        }
        .news-article-card.used {
            opacity: 0.6;
        }
        .generating-btn {
            opacity: 0.6;
            pointer-events: none;
            position: relative;
        }
        .generating-btn::after {
            content: '';
            display: inline-block;
            width: 10px;
            height: 10px;
            border: 2px solid #fff;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-left: 6px;
            vertical-align: middle;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .news-article-checkbox {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        .news-article-title {
            font-weight: 600;
            font-size: 14px;
            color: #1a1a1a;
            margin-bottom: 6px;
            padding-right: 24px;
            line-height: 1.4;
        }
        .news-article-summary {
            font-size: 12px;
            color: #666;
            line-height: 1.5;
            margin-bottom: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .news-article-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
        }
        .news-article-source {
            color: #2596be;
            font-weight: 600;
        }
        .news-article-date {
            color: #999;
        }
        .news-article-badge {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            background: #e8f5e9;
            color: #2e7d32;
        }
        .news-article-category-badge {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
        }
        .news-article-thumbnail {
            width: 100%;
            height: 140px;
            object-fit: cover;
            border-radius: 6px;
            margin-bottom: 10px;
            background: #f0f0f0;
        }

        /* ============================================================
           MOBILE RESPONSIVE STYLES
           ============================================================ */

        /* --- Mobile UI Elements (hidden on desktop) --- */
        .mobile-sidebar-toggle,
        .mobile-sidebar-backdrop,
        .mobile-bottom-nav {
            display: none;
        }

        /* Swipe hint for sidebar (mobile only, subtle) */
        .mobile-swipe-hint {
            display: none;
        }

        /* ============================================================
           PHONES (up to 768px)
           ============================================================ */
        @media (max-width: 768px), (max-aspect-ratio: 1/1) {
            /* Base */
            body {
                flex-direction: column;
                font-size: 15px;
            }
            body.sidebar-open {
                overflow: hidden;
            }

            /* Hamburger Toggle */
            .mobile-sidebar-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
                position: fixed;
                top: 10px;
                left: 10px;
                z-index: 100;
                width: 44px;
                height: 44px;
                background: #fff;
                border: 1px solid #e0dcd5;
                border-radius: 10px;
                font-size: 20px;
                cursor: pointer;
                box-shadow: 0 2px 10px rgba(0,0,0,0.08);
                padding: 0;
                color: #1a1a1a;
                transition: transform 0.15s, background 0.15s;
            }
            .mobile-sidebar-toggle:active {
                transform: scale(0.95);
                background: #f5f5f0;
            }

            /* Sidebar Overlay */
            .sidebar {
                position: fixed;
                top: 0;
                left: 0;
                width: 280px;
                height: 100vh;
                height: 100dvh;
                z-index: 95;
                transform: translateX(-100%);
                transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
                border-right: none;
                box-shadow: 2px 0 16px rgba(0,0,0,0.18);
            }
            .sidebar.mobile-open {
                transform: translateX(0);
            }

            /* Backdrop */
            .mobile-sidebar-backdrop {
                display: none;
                position: fixed;
                top: 0; left: 0; right: 0; bottom: 0;
                background: rgba(0,0,0,0.35);
                z-index: 90;
                backdrop-filter: blur(2px);
                -webkit-backdrop-filter: blur(2px);
            }
            .mobile-sidebar-backdrop.visible {
                display: block;
            }

            /* Bottom Navigation */
            .mobile-bottom-nav {
                display: flex;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                height: 60px;
                background: #fff;
                border-top: 1px solid #e0dcd5;
                z-index: 85;
                justify-content: space-around;
                align-items: center;
                padding-bottom: env(safe-area-inset-bottom, 0);
                box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
            }
            body.has-bottom-nav {
                padding-bottom: 60px;
            }
            body.has-bottom-nav .main-content {
                padding-bottom: 80px;
            }

            .mobile-nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                flex: 1;
                height: 100%;
                text-decoration: none;
                color: #999;
                font-size: 10px;
                font-weight: 600;
                gap: 2px;
                transition: color 0.15s;
                min-width: 0;
                padding: 4px 2px;
                border-radius: 8px;
                margin: 0 2px;
            }
            .mobile-nav-item.active {
                color: #2596be;
                background: #f0f8fc;
            }
            .mobile-nav-icon {
                font-size: 20px;
                line-height: 1;
            }
            .mobile-nav-label {
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 100%;
            }

            /* Main Content */
            .main-content {
                padding: 16px;
                padding-top: 56px;
                min-height: auto;
                overflow-x: hidden;
            }
            .main-content h1 {
                font-size: 22px;
                margin-bottom: 4px;
                padding-left: 48px;
            }
            .subtitle {
                font-size: 13px;
                margin-bottom: 16px;
                padding-left: 48px;
            }

            /* Page Tabs (mainNav) - hide on mobile, bottom nav replaces */
            #mainNav.tabs {
                display: none;
            }

            /* Sub-tabs / horizontal scrollable tab bars */
            .tabs:not(#mainNav) {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                gap: 4px;
                padding-bottom: 4px;
                scrollbar-width: none;
                position: relative;
                top: auto;
                margin-top: 0;
            }
            .tabs:not(#mainNav)::-webkit-scrollbar {
                display: none;
            }
            .tab {
                white-space: nowrap;
                flex-shrink: 0;
                padding: 8px 14px;
                font-size: 13px;
            }

            /* Content Studio sub-nav buttons */
            .cs-nav-btn {
                flex-shrink: 0;
                font-size: 12px;
                padding: 6px 12px;
                min-height: 40px;
            }

            /* Tables - horizontal scroll wrapper */
            .table-wrapper,
            table {
                display: block;
                width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                white-space: nowrap;
            }
            table thead,
            table tbody,
            table tr {
                display: table;
                width: 100%;
                table-layout: auto;
                min-width: 600px;
            }
            th, td {
                padding: 8px 10px;
                font-size: 13px;
            }

            /* Forms - larger inputs to prevent iOS zoom */
            input[type="text"],
            input[type="number"],
            input[type="email"],
            input[type="password"],
            input[type="date"],
            input[type="datetime-local"],
            input[type="time"],
            textarea,
            select {
                font-size: 16px;
                min-height: 44px;
                padding: 10px 12px;
            }
            textarea {
                min-height: 80px;
            }

            /* Buttons - touch targets */
            button,
            .btn-primary,
            .btn-delete,
            .btn-edit,
            .btn-secondary,
            .slot-suggestion-btn,
            .cs-nav-btn,
            .calendar-filter-btn {
                min-height: 44px;
                min-width: 44px;
            }

            html,
            body {
                max-width: 100%;
                overflow-x: hidden;
            }

            *,
            *::before,
            *::after {
                box-sizing: border-box;
            }

            .main-content,
            .main-content > *,
            .studio-shell,
            .studio-panel,
            .studio-panel > *,
            .studio-news-main,
            .studio-news-sidebar,
            .studio-foodie-layout > *,
            .studio-travel-layout > *,
            #contentStudio,
            #draftBoard,
            #schedule {
                max-width: 100%;
                min-width: 0;
            }

            .studio-panel-header,
            .studio-shell-header,
            .studio-toolbar-cluster,
            .studio-select-wrap,
            .foodie-photo-toolbar,
            .foodie-photo-actions,
            .foodie-carousel-tools,
            .foodie-carousel-slide-actions,
            .foodie-draft-media-tools,
            .draft-preview-copy-actions,
            .mobile-action-row {
                display: flex !important;
                flex-wrap: wrap !important;
                gap: 8px !important;
                min-width: 0;
            }

            .studio-toolbar-cluster > *,
            .studio-select-wrap > *,
            .foodie-photo-toolbar > *,
            .foodie-carousel-tools > *,
            .foodie-draft-media-tools > *,
            .draft-preview-copy-actions > *,
            .mobile-action-row > * {
                min-width: 0;
            }

            .foodie-photo-toolbar button,
            .foodie-photo-toolbar select,
            .foodie-carousel-tools button,
            .foodie-carousel-slide-actions button,
            .foodie-draft-media-tools button,
            .draft-preview-copy-actions button,
            .mobile-action-row button,
            .foodie-inline-action-btn {
                min-height: 44px !important;
                padding: 10px 12px !important;
                white-space: normal;
            }

            .foodie-carousel-slide-actions button,
            .foodie-draft-media-tools button,
            .foodie-photo-actions button {
                flex: 1 1 84px !important;
            }

            #contentStudio input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
            #contentStudio textarea,
            #contentStudio select,
            #schedule input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
            #schedule textarea,
            #schedule select,
            .creator-modal-box input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
            .creator-modal-box textarea,
            .creator-modal-box select,
            .foodie-taxonomy-editor input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
            .foodie-taxonomy-editor textarea,
            .foodie-taxonomy-editor select {
                min-height: 44px !important;
                font-size: 16px !important;
            }

            #contentStudio input[type="file"],
            .foodie-taxonomy-editor input[type="file"] {
                max-width: 100%;
            }

            .studio-route-nav,
            .travel-tabs,
            .studio-segmented {
                max-width: 100%;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
            }

            .studio-route-nav::-webkit-scrollbar,
            .travel-tabs::-webkit-scrollbar,
            .studio-segmented::-webkit-scrollbar {
                display: none;
            }

            .studio-route-nav {
                flex-wrap: nowrap !important;
            }

            .studio-route-nav .cs-nav-btn {
                min-height: 44px;
                white-space: nowrap;
            }

            /* Image upload */
            .image-upload {
                padding: 20px;
            }
            .upload-icon {
                font-size: 32px;
            }

            /* Preview items */
            .preview-item {
                padding: 10px;
            }
            .preview-item img,
            .preview-item video,
            .preview-item .media-wrap {
                width: 50px;
                height: 50px;
            }
            .preview-item .order-number {
                font-size: 14px;
                min-width: 22px;
            }

            /* Content Studio - News Feed: stack columns */
            #newsFeed > div:first-child {
                flex-direction: column !important;
                height: auto !important;
                min-height: auto !important;
            }
            .studio-news-layout {
                grid-template-columns: 1fr !important;
                min-height: auto !important;
            }
            .studio-news-sidebar {
                width: 100% !important;
                border-right: none !important;
                padding-right: 0 !important;
                max-height: 220px;
                border-bottom: 1px solid #e0dcd5;
                padding-bottom: 12px;
                margin-bottom: 12px;
            }
            .studio-foodie-layout,
            .studio-travel-layout {
                grid-template-columns: 1fr !important;
                min-height: auto !important;
            }
            .studio-panel,
            .studio-shell,
            .studio-news-layout,
            .studio-foodie-layout,
            .studio-travel-layout {
                overflow: visible;
            }
            .studio-panel-header,
            .studio-shell-header {
                flex-direction: column;
                align-items: stretch;
            }
            .studio-toolbar-cluster {
                width: 100%;
            }
            .studio-select-wrap {
                width: 100%;
                justify-content: space-between;
            }
            .studio-route-nav {
                overflow-x: auto;
                padding-bottom: 2px;
                flex-wrap: nowrap;
            }
            #newsArticlesList {
                grid-template-columns: 1fr !important;
            }
            #foodiePlacesList,
            #travelSourcesList,
            #travelSpotsList,
            #travelHotelsList,
            .mobile-card-grid {
                grid-template-columns: 1fr !important;
            }
            .news-source-sidebar-item {
                padding: 8px 10px;
            }
            .news-source-sidebar-icon {
                width: 28px;
                height: 28px;
                font-size: 11px;
            }
            .news-article-card {
                padding: 12px;
            }
            .news-article-title {
                font-size: 14px;
            }
            .news-article-thumbnail {
                height: 160px;
            }

            .foodie-filter-bar,
            .travel-filter-bar {
                grid-template-columns: 1fr !important;
            }

            .device-page-tabs {
                overflow-x: auto;
                padding-bottom: 2px;
            }

            .device-page-tab {
                flex: 0 0 auto;
                min-height: 44px;
                white-space: nowrap;
            }

            .device-screen-header {
                align-items: stretch;
                flex-direction: column;
            }

            .device-screen-actions,
            .device-stream-card-actions,
            .device-stream-form-actions {
                width: 100%;
            }

            .device-screen-actions > *,
            .device-stream-card-actions > *,
            .device-stream-form-actions > * {
                flex: 1;
                min-height: 44px;
            }

            .device-stream-form {
                grid-template-columns: 1fr !important;
                padding: 14px;
            }

            .device-screen-grid {
                grid-template-columns: 1fr !important;
            }

            .device-stream-viewport {
                min-height: 360px;
            }

            .foodie-taxonomy-picker,
            .travel-taxonomy-picker {
                max-height: 220px;
            }

            .foodie-taxonomy-chip,
            .travel-taxonomy-chip {
                min-height: 36px;
                padding: 8px 10px;
                line-height: 1.2;
            }

            .foodie-taxonomy-chip input,
            .travel-taxonomy-chip input {
                min-width: 18px;
                min-height: 18px;
            }

            /* Draft Board: single column on phone */
            .studio-drafts-grid,
            #draftBoard > div[style*="grid-template-columns: repeat(4"],
            #draftBoard > div[style*="grid-template-columns:repeat(4"] {
                grid-template-columns: 1fr !important;
                gap: 16px !important;
            }

            /* Device cards in sidebar */
            .device-card {
                padding: 10px;
            }
            .device-progress-row {
                gap: 6px;
            }
            .device-progress-label {
                width: 38px;
                font-size: 10px;
            }
            .device-progress-value {
                width: 40px;
                font-size: 10px;
            }

            /* Device Manager - stack form grids */
            #deviceFormCard div[style*="grid-template-columns: 1fr 1fr"],
            #deviceFormCard div[style*="grid-template-columns:1fr 1fr"] {
                grid-template-columns: 1fr !important;
            }
            #deviceFormCard div[style*="grid-template-columns: 1fr 1fr 1fr"],
            #deviceFormCard div[style*="grid-template-columns:1fr 1fr 1fr"] {
                grid-template-columns: 1fr !important;
            }

            /* Schedules page - action buttons wrap */
            #schedules > div:first-child {
                flex-wrap: wrap;
                gap: 8px;
            }

            /* Calendar: horizontally scrollable */
            .calendar-week {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: 8px;
            }
            .calendar-header,
            .calendar-body {
                min-width: 700px;
            }
            .calendar-header-cell {
                padding: 8px 2px;
                font-size: 11px;
            }
            .calendar-header-cell .day-num {
                font-size: 13px;
            }
            .calendar-task {
                font-size: 9px;
                padding: 1px 3px;
                line-height: 1.2;
            }
            .calendar-time-slot {
                height: 36px;
                font-size: 9px;
            }
            .calendar-hour-line {
                height: 36px;
            }

            /* Modals: full-width with safe margins */
            #promptPreviewModal > div,
            #articleDetailModal > div,
            #postDetailModal > div,
            #scheduleModal > div,
            #taskDetailModal > div,
            #taskDetailModal ~ div > div,
            .modal-overlay .modal,
            .modal-overlay.active .modal,
            div[style*="position: fixed"] > div[style*="border-radius: 12px"],
            div[style*="position:fixed"] > div[style*="border-radius:12px"] {
                max-width: calc(100vw - 20px) !important;
                width: calc(100vw - 20px) !important;
                margin: 10px !important;
                padding: 16px !important;
                max-height: 90vh;
                max-height: 90dvh;
                overflow-y: auto;
            }
            div[style*="position: fixed"] > div[style*="max-width: 700px"],
            div[style*="position:fixed"] > div[style*="max-width:700px"] {
                max-width: calc(100vw - 20px) !important;
                width: calc(100vw - 20px) !important;
            }

            .media-preview-modal,
            .foodie-draft-preview-modal,
            .foodie-taxonomy-editor-overlay,
            .creator-modal-overlay {
                align-items: stretch !important;
                justify-content: center !important;
                padding: 10px !important;
                padding-top: max(10px, env(safe-area-inset-top)) !important;
                padding-bottom: max(76px, calc(12px + env(safe-area-inset-bottom))) !important;
                overflow: hidden !important;
            }

            .media-preview-shell,
            .media-preview-shell-with-details,
            .foodie-draft-preview-box,
            .foodie-taxonomy-editor,
            .creator-modal-box {
                width: calc(100vw - 20px) !important;
                max-width: calc(100vw - 20px) !important;
                max-height: calc(100dvh - 92px) !important;
                margin: 0 !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch;
            }

            .media-preview-shell-with-details {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 10px !important;
                align-items: start !important;
            }

            .media-preview-media-panel {
                justify-content: flex-start !important;
            }

            .media-preview-media-panel img,
            .media-preview-media-panel video {
                width: 100% !important;
                max-height: 42dvh !important;
                object-fit: contain !important;
            }

            .media-preview-details {
                max-height: none !important;
                padding: 14px !important;
                overflow: visible !important;
            }

            .media-preview-shell > button:first-child,
            .media-preview-shell-with-details > button:first-child {
                top: 8px !important;
                right: 8px !important;
                z-index: 2;
                width: 44px;
                height: 44px;
                border-radius: 999px !important;
                background: rgba(0, 0, 0, 0.55) !important;
            }

            #articleDetailContent,
            #articleDetailContent > *,
            .media-preview-details > *,
            .foodie-draft-preview-box > * {
                max-width: 100%;
                min-width: 0;
            }

            #articleDetailContent [style*="grid-template-columns: repeat(auto-fill, minmax(110px"],
            #articleDetailContent [style*="grid-template-columns: repeat(auto-fill, minmax(140px"],
            #articleDetailContent [style*="grid-template-columns: repeat(auto-fill, minmax(150px"],
            .foodie-generated-carousel-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
                gap: 8px !important;
            }

            #articleDetailContent [style*="grid-template-columns:112px"],
            #articleDetailContent [style*="grid-template-columns: 112px"],
            .foodie-dish-label-layout,
            .foodie-slide-reference-row {
                grid-template-columns: 1fr !important;
            }

            .foodie-dish-label-layout > img,
            .foodie-slide-reference-row > img {
                width: min(180px, 100%) !important;
                max-height: 240px !important;
                justify-self: center;
            }

            .foodie-dish-label-options {
                grid-template-columns: 1fr !important;
                max-height: 34dvh !important;
                padding-right: 0 !important;
            }

            .foodie-taxonomy-editor-header {
                align-items: flex-start;
            }

            .foodie-taxonomy-editor-actions {
                position: sticky;
                bottom: -1px;
                z-index: 1;
                background: #fff;
                flex-wrap: wrap;
            }

            .foodie-taxonomy-editor-actions button {
                flex: 1 1 140px;
                min-height: 44px;
            }

            .foodie-photo-tile {
                min-height: 0 !important;
            }

            .foodie-photo-tile img {
                height: auto !important;
                aspect-ratio: 1 / 1;
            }

            .foodie-photo-actions {
                justify-content: stretch !important;
            }

            .foodie-photo-actions button {
                flex: 1 1 96px;
            }

            .foodie-generated-carousel-item {
                min-width: 0;
            }

            .foodie-generated-carousel-item a {
                min-height: 0;
            }

            /* Modal actions: stack buttons */
            .modal-actions,
            div[style*="display: flex; gap: 10px"] {
                flex-direction: column !important;
            }
            .modal-actions button,
            div[style*="display: flex; gap: 10px"] button {
                width: 100%;
            }

            /* Status message: above bottom nav */
            #statusMessage,
            .status-message {
                left: 12px !important;
                right: 12px !important;
                max-width: none !important;
                bottom: 72px !important;
                font-size: 14px;
            }

            /* DM cards */
            .dm-card {
                padding: 12px;
            }
            .dm-header {
                flex-wrap: wrap;
                gap: 8px;
            }

            /* Login page */
            .login-container {
                margin: 16px;
                padding: 32px 20px;
                max-width: none;
            }
            .login-header h1 {
                font-size: 22px;
            }

            /* Admin page sections (if using styles.css) */
            .section-card {
                padding: 16px;
            }
            .device-checkboxes {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            .user-assignment-card {
                padding: 12px;
            }
            .assigned-devices {
                gap: 4px;
            }
            .assigned-device-tag {
                font-size: 11px;
                padding: 2px 8px;
            }

            /* Scrollbar styling for mobile tables */
            .table-wrapper::-webkit-scrollbar,
            .calendar-week::-webkit-scrollbar,
            .tabs::-webkit-scrollbar {
                height: 4px;
            }
            .table-wrapper::-webkit-scrollbar-thumb,
            .calendar-week::-webkit-scrollbar-thumb,
            .tabs::-webkit-scrollbar-thumb {
                background: #d0ccc4;
                border-radius: 2px;
            }

            /* Slot suggestion buttons wrap */
            div[style*="display: flex; flex-wrap: wrap; gap: 8px"] .slot-suggestion-btn {
                flex: 1;
                min-width: 100px;
                justify-content: center;
            }

            /* Date/time picker row stacks */
            div[style*="display: flex; gap: 8px; margin-bottom: 10px"],
            div[style*="display: flex; gap: 8px; align-items: stretch"] {
                flex-direction: column !important;
            }
            div[style*="display: flex; gap: 8px; margin-bottom: 10px"] > *,
            div[style*="display: flex; gap: 8px; align-items: stretch"] > * {
                width: 100% !important;
                flex: none !important;
            }

            /* Post action button area */
            div[style*="display: flex; gap: 12px"] {
                flex-direction: column !important;
            }
            div[style*="display: flex; gap: 12px"] > button {
                width: 100%;
            }
        }

        /* ============================================================
           TABLETS (769px - 1024px)
           ============================================================ */
        @media (max-width: 1024px) and (min-width: 769px) {
            .sidebar {
                width: 260px;
            }
            .main-content {
                padding: 20px 24px;
            }
            #draftBoard > div[style*="grid-template-columns: repeat(4"],
            #draftBoard > div[style*="grid-template-columns:repeat(4"] {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            #newsArticlesList {
                grid-template-columns: repeat(2, 1fr) !important;
            }
            .calendar-header,
            .calendar-body {
                min-width: 600px;
            }
        }

        /* ============================================================
           VERY SMALL PHONES (up to 380px)
           ============================================================ */
        @media (max-width: 380px) {
            .mobile-nav-label {
                font-size: 9px;
            }
            .mobile-nav-icon {
                font-size: 18px;
            }
            .main-content h1 {
                font-size: 20px;
                padding-left: 44px;
            }
            .news-article-thumbnail {
                height: 140px;
            }
        }

        /* ============================================================
           FOODIE TAXONOMY
           ============================================================ */
        .foodie-taxonomy-picker {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 8px;
            border: 1px solid #e0dcd5;
            border-radius: 8px;
            background: #fffdf9;
            max-height: 168px;
            overflow: auto;
        }

        .travel-taxonomy-picker {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 8px;
            border: 1px solid #dbeafe;
            border-radius: 8px;
            background: #f8fbff;
            max-height: 168px;
            overflow: auto;
        }

        .foodie-taxonomy-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 8px;
            border: 1px solid #e8dccf;
            border-radius: 999px;
            background: #fff;
            color: #4b4036;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            user-select: none;
        }

        .travel-taxonomy-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 8px;
            border: 1px solid #bfdbfe;
            border-radius: 999px;
            background: #fff;
            color: #075985;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            user-select: none;
        }

        .foodie-taxonomy-chip input {
            margin: 0;
            accent-color: #ea580c;
        }

        .travel-taxonomy-chip input {
            margin: 0;
            accent-color: #0ea5e9;
        }

        .foodie-filter-bar {
            display: grid;
            grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(130px, 1fr)) auto;
            gap: 8px;
            align-items: center;
            margin-bottom: 8px;
        }

        .travel-filter-bar {
            display: grid;
            grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)) auto;
            gap: 8px;
            align-items: center;
            margin-bottom: 8px;
        }

        .foodie-filter-input,
        .foodie-filter-select,
        .travel-filter-input,
        .travel-filter-select,
        .travel-input {
            width: 100%;
            min-width: 0;
            padding: 8px 10px;
            border: 1px solid #d5d0c8;
            border-radius: 6px;
            background: #fff;
            color: #333;
            font: inherit;
            font-size: 12px;
            box-sizing: border-box;
        }

        .travel-textarea {
            resize: vertical;
            line-height: 1.5;
        }

        .foodie-clear-filter-btn,
        .travel-clear-filter-btn {
            padding: 8px 10px;
            border: 1px solid #d5d0c8;
            border-radius: 6px;
            background: #f5f5f0;
            color: #555;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }

        .foodie-filter-summary,
        .travel-filter-summary {
            min-height: 18px;
            margin-bottom: 8px;
            color: #777;
            font-size: 12px;
        }

        .foodie-template-bar {
            display: grid;
            grid-template-columns: auto minmax(220px, 320px);
            gap: 8px;
            align-items: center;
            justify-content: end;
            margin-bottom: 10px;
        }

        .foodie-template-bar label {
            color: #666;
            font-size: 12px;
            font-weight: 800;
        }

        .foodie-detail-template-control {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: #666;
            font-size: 12px;
            font-weight: 800;
            white-space: nowrap;
        }

        .foodie-detail-template-label {
            color: #666;
        }

        .foodie-template-menu-trigger {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 31px;
            padding: 6px 9px;
            border: 1px solid #d5d0c8;
            border-radius: 6px;
            background: #fff;
            color: #333;
            font: inherit;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }

        .foodie-template-menu {
            position: absolute;
            z-index: 260;
            top: calc(100% + 8px);
            right: 0;
            width: min(380px, 82vw);
            padding: 8px;
            border: 1px solid #d5d0c8;
            border-radius: 8px;
            background: #fff;
            box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
            display: grid;
            gap: 7px;
            white-space: normal;
        }

        .foodie-template-menu[hidden] {
            display: none;
        }

        .foodie-template-menu-option {
            display: grid;
            gap: 4px;
            width: 100%;
            padding: 9px 10px;
            border: 1px solid #eee5db;
            border-radius: 7px;
            background: #fff;
            color: #333;
            text-align: left;
            cursor: pointer;
            font: inherit;
        }

        .foodie-template-menu-option.active,
        .foodie-template-menu-option:hover {
            border-color: #fb923c;
            background: #fff7ed;
        }

        .foodie-template-option-label {
            color: #ea580c;
            font-size: 12px;
            font-weight: 900;
        }

        .foodie-template-option-title {
            color: #1a1a1a;
            font-size: 13px;
            font-weight: 900;
            line-height: 1.3;
        }

        .foodie-template-option-body {
            color: #666;
            font-size: 12px;
            font-weight: 500;
            line-height: 1.5;
        }

        .foodie-category-row {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 8px;
        }

        .foodie-category-chip {
            display: inline-flex;
            align-items: center;
            max-width: 100%;
            padding: 2px 6px;
            border-radius: 999px;
            font-size: 10px;
            font-weight: 800;
            line-height: 1.4;
        }

        .foodie-category-chip-cuisine {
            border: 1px solid #fed7aa;
            background: #fff7ed;
            color: #c2410c;
        }

        .foodie-category-chip-dining {
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1d4ed8;
        }

        .foodie-category-chip-raw {
            border: 1px solid #e0dcd5;
            background: #f8f7f4;
            color: #6b6258;
        }

        .travel-category-chip {
            display: inline-flex;
            align-items: center;
            padding: 3px 8px;
            border: 1px solid #bfdbfe;
            border-radius: 999px;
            background: #eff6ff;
            color: #0369a1;
            font-size: 11px;
            font-weight: 800;
            line-height: 1.2;
        }

        .foodie-inline-action-btn {
            padding: 6px 10px;
            border: 1px solid #ea580c;
            border-radius: 6px;
            background: #fff7ed;
            color: #ea580c;
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
            font-family: inherit;
        }

        .foodie-taxonomy-editor-overlay {
            position: fixed;
            inset: 0;
            z-index: 300;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(0, 0, 0, 0.5);
        }

        .foodie-taxonomy-editor {
            width: min(920px, 100%);
            max-height: 90vh;
            overflow: auto;
            padding: 18px;
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
        }

        .foodie-taxonomy-editor-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 14px;
        }

        .foodie-taxonomy-editor-title {
            color: #1a1a1a;
            font-size: 17px;
            font-weight: 850;
        }

        .foodie-taxonomy-editor-subtitle {
            margin-top: 4px;
            color: #777;
            font-size: 13px;
        }

        .foodie-taxonomy-editor-close {
            border: none;
            background: transparent;
            color: #999;
            font-size: 24px;
            line-height: 1;
            cursor: pointer;
        }

        .foodie-taxonomy-editor-grid {
            display: grid;
            grid-template-columns: 1fr 1.4fr;
            gap: 14px;
        }

        .foodie-taxonomy-editor-label {
            margin-bottom: 7px;
            color: #555;
            font-size: 12px;
            font-weight: 850;
            text-transform: uppercase;
        }

        .foodie-taxonomy-editor-note {
            margin-top: 12px;
            color: #777;
            font-size: 12px;
            line-height: 1.5;
        }

        .foodie-taxonomy-editor-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 16px;
            padding-top: 14px;
            border-top: 1px solid #eee6da;
        }

        @media (max-width: 980px) {
            .foodie-filter-bar,
            .travel-filter-bar {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 620px) {
            .foodie-filter-bar,
            .travel-filter-bar {
                grid-template-columns: 1fr;
            }

            .foodie-taxonomy-editor-grid {
                grid-template-columns: 1fr;
            }
        }
