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

        body {
            font-family: 'Segoe UI', 'Microsoft JhengHei', sans-serif;
            background: #1e1e2f;
            color: #e0e0e0;
            overflow: hidden;
            height: 100vh;
        }

        .page {
            display: none;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .page.active {
            display: flex;
            flex-direction: column;
        }

        .login-container {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .login-card {
            background: rgba(255,255,255,0.95);
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            min-width: 320px;
        }

        .login-card h1 {
            color: #333;
            margin-bottom: 10px;
        }

        .login-card p {
            color: #666;
            margin-bottom: 30px;
        }

        .google-btn {
            background: #4285f4;
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            transition: transform 0.2s;
        }

        .google-btn:hover {
            transform: translateY(-2px);
            background: #3367d6;
        }

        .project-header {
            background: #2a2a3a;
            padding: 16px 24px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #3a3a4a;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
        }
        .user-avatar[src=""], .user-avatar:not([src]) {
            display: none;
        }

        .btn {
            background: #4a6fa5;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            transition: background 0.2s;
        }

        .btn-danger {
            background: #c94f4f;
        }

        .btn-danger:hover {
            background: #b33e3e;
        }

        .btn-success {
            background: #5a9e5e;
        }

        .btn:hover {
            background: #5f7fb0;
        }

        .project-list {
            flex: 1;
            overflow-y: auto;
            padding: 24px;
        }

        /* Project table */
        .project-table {
            width: 100%;
            border-collapse: collapse;
            background: #2a2a3a;
            border-radius: 12px;
            overflow: hidden;
        }
        .project-table th, .project-table td {
            padding: 12px 16px;
            text-align: left;
            border-bottom: 1px solid #3a3a4a;
        }
        .project-table th {
            background: #323242;
            font-size: 13px;
            color: #aaa;
            cursor: pointer;
            white-space: nowrap;
            user-select: none;
        }
        .project-table th:hover { color: #e0e0e0; }
        .project-table th .sort-arrow { margin-left: 4px; font-size: 10px; }
        .project-table tr:hover td { background: #323242; }
        .project-table td { font-size: 14px; }
        .project-table .col-num { width: 50px; text-align: center; color: #888; }
        .project-table .col-actions { white-space: nowrap; }
        .project-table .col-actions button { margin-right: 6px; }
        .project-table .col-time { font-size: 12px; color: #aaa; white-space: nowrap; }
        .project-toolbar {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
            align-items: center;
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .modal-content {
            background: #2a2a3a;
            border-radius: 16px;
            padding: 24px;
            min-width: 400px;
        }

        .modal-content input {
            width: 100%;
            padding: 10px;
            margin: 16px 0;
            background: #1e1e2f;
            border: 1px solid #4a4a5a;
            color: white;
            border-radius: 6px;
        }

        .editor-container {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .toolbar {
            background: #2a2a3a;
            padding: 8px 16px;
            display: flex;
            gap: 8px;
            border-bottom: 1px solid #3a3a4a;
            flex-wrap: wrap;
        }

        .canvas-area {
            flex: 1;
            position: relative;
            overflow: hidden;
            background: #1e1e2f;
        }

        #canvas {
            position: relative;
            width: 100%;
            height: 100%;
            transform-origin: 0 0;
            cursor: grab;
        }

        .node {
            position: absolute;
            background: #2d2d3d;
            border: 2px solid #5a6a8a;
            border-radius: 8px;
            width: var(--node-width, 250px);
            padding: 12px;
            overflow: hidden;
            cursor: grab;
            transition: box-shadow 0.2s;
            z-index: 10;
            box-shadow: 2px 3px 8px rgba(0,0,0,0.4);
        }

        .node.selected {
            border-color: #6a9eff;
            box-shadow: 0 0 0 3px rgba(106,158,255,0.5), 0 0 12px rgba(106,158,255,0.3), 2px 3px 8px rgba(0,0,0,0.4);
            z-index: 15 !important;
        }
        .node.preview-active {
            border-color: #ff9800;
            box-shadow: 0 0 0 3px rgba(255,152,0,0.6), 0 0 16px rgba(255,152,0,0.4);
        }
        .node.selected.preview-active {
            border-color: #ff9800;
            box-shadow: 0 0 0 3px rgba(255,152,0,0.6), 0 0 16px rgba(255,152,0,0.4), 0 0 0 6px rgba(106,158,255,0.3);
        }

        .node.dialog { border-top: 4px solid var(--color-dialog, #4caf50); }
        .node.choice { border-top: 4px solid var(--color-choice, #ff9800); }
        .node.condition { border-top: 4px solid var(--color-condition, #2196f3); }
        .node.action { border-top: 4px solid var(--color-action, #9c27b0); }

        .node-header {
            font-weight: bold;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            overflow: hidden;
        }
        .node-id {
            font-size: 10px;
            font-weight: normal;
            white-space: nowrap;
        }
        .node-id .id-alpha { color: #8aafff; }
        .node-id .id-num { color: #ccc; }
        .id-display .id-alpha { color: #8aafff; }
        .id-display .id-num { color: #ccc; }

        .node-content {
            font-size: 12px;
            color: #ccc;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .node-note {
            font-size: 11px;
            color: #a89060;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 4px;
            border-top: 1px dashed #4a4a5a;
            padding-top: 3px;
        }

        .port {
            position: absolute;
            width: 12px;
            height: 12px;
            background: #6a9eff;
            border-radius: 50%;
            cursor: crosshair;
            z-index: 20;
        }

        .port.output {
            right: -6px;
        }

        .port.input {
            left: -6px;
        }

        #selectionBox {
            position: absolute;
            border: 1px dashed #6a9eff;
            background: rgba(106, 158, 255, 0.1);
            pointer-events: none;
            z-index: 100;
        }

        .node-option-item {
            font-size: 11px;
            color: #bbb;
            padding: 3px 0;
            border-top: 1px solid #3a3a4a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .node-condition-out {
            font-size: 11px;
            color: #bbb;
            padding: 3px 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 5;
        }

        svg path.edge-visible {
            pointer-events: none;
            stroke: #8a9acc;
            stroke-width: 2;
            fill: none;
        }

        svg path.edge-hit {
            pointer-events: stroke;
            stroke: transparent;
            stroke-width: 12;
            fill: none;
            cursor: pointer;
        }

        svg path.edge-visible.edge-hover {
            stroke: #ffaa66;
            stroke-width: 3;
        }

        svg path.edge-visible.edge-selected {
            stroke: #ff6644;
            stroke-width: 3;
        }

        /* Frame styles (node depth) */
        .frame {
            position: absolute;
            border-radius: 12px;
            z-index: 2;
            box-shadow: 3px 4px 12px rgba(0,0,0,0.35);
        }
        .frame.scene-frame {
            border: 2px solid rgba(76, 175, 80, 0.6);
            background: rgba(76, 175, 80, 0.05);
            pointer-events: all;
            cursor: grab;
        }
        .frame.scene-frame:hover {
            border-color: rgba(76, 175, 80, 0.9);
        }
        .frame.scene-frame.frame-selected {
            border-color: var(--color-scene, #4caf50);
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5), 0 0 12px rgba(76, 175, 80, 0.3), 3px 4px 12px rgba(0,0,0,0.35);
        }
        .frame.drop-target {
            border-color: #ff9800 !important;
            background: rgba(255, 152, 0, 0.15) !important;
            box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.5), 0 0 16px rgba(255, 152, 0, 0.3) !important;
        }
        .frame.section-frame {
            border: 2px solid rgba(33, 150, 243, 0.45);
            background: rgba(33, 150, 243, 0.03);
            pointer-events: none;
        }
        .frame.section-frame.frame-interactive {
            pointer-events: all;
            cursor: grab;
        }
        .frame.section-frame.frame-interactive:hover {
            border-color: rgba(33, 150, 243, 0.8);
        }
        .frame.section-frame.frame-selected {
            border-color: var(--color-section, #2196f3);
            box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.5), 0 0 12px rgba(33, 150, 243, 0.3), 3px 4px 12px rgba(0,0,0,0.35);
        }
        .frame.chapter-frame {
            border: 2px solid rgba(156, 39, 176, 0.4);
            background: rgba(156, 39, 176, 0.03);
            pointer-events: none;
        }
        .frame.chapter-frame.frame-interactive {
            pointer-events: all;
            cursor: grab;
        }
        .frame.chapter-frame.frame-interactive:hover {
            border-color: rgba(156, 39, 176, 0.7);
        }
        .frame.chapter-frame.frame-selected {
            border-color: var(--color-chapter, #9c27b0);
            box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.5), 0 0 12px rgba(156, 39, 176, 0.3), 3px 4px 12px rgba(0,0,0,0.35);
        }
        .frame-label {
            position: absolute;
            bottom: 100%;
            left: 8px;
            font-size: 16px;
            font-weight: bold;
            padding: 3px 10px;
            border-radius: 4px;
            white-space: nowrap;
            margin-bottom: 2px;
        }
        .scene-frame .frame-label { background: #2a3a2a; color: var(--color-scene, #81c784); }
        .section-frame .frame-label { background: #1e2a3a; color: var(--color-section, #64b5f6); }
        .chapter-frame .frame-label { background: #2a1e3a; color: var(--color-chapter, #ce93d8); }
        .frame-info {
            position: absolute;
            bottom: 4px;
            right: 8px;
            font-size: 10px;
            color: #888;
            pointer-events: none;
        }
        .frame-note {
            position: absolute;
            top: 4px;
            left: 8px;
            right: 8px;
            font-size: 11px;
            color: #a89060;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            pointer-events: none;
            font-style: italic;
        }

        /* Depth cards (scene/section/chapter depth) */
        .depth-card {
            position: absolute;
            background: #2d2d3d;
            border: 2px solid #5a6a8a;
            border-radius: 10px;
            min-width: 120px;
            padding: 14px;
            cursor: grab;
            z-index: 10;
        }
        .depth-card.selected {
            border-color: #6a9eff;
            box-shadow: 0 0 0 3px rgba(106,158,255,0.5), 0 0 12px rgba(106,158,255,0.3);
            z-index: 15 !important;
        }
        .depth-card.scene-card { border-top: 4px solid var(--color-scene, #4caf50); }
        .depth-card.section-card { border-top: 4px solid var(--color-section, #2196f3); }
        .depth-card.chapter-card { border-top: 4px solid var(--color-chapter, #9c27b0); }
        .depth-card-header {
            font-weight: bold;
            margin-bottom: 6px;
            font-size: 16px;
        }
        .depth-card-thumb {
            margin-bottom: 6px;
            border-radius: 4px;
            overflow: hidden;
            max-height: 80px;
        }
        .depth-card-thumb img {
            width: 100%;
            height: 80px;
            object-fit: cover;
            display: block;
        }
        .depth-card-info {
            font-size: 11px;
            color: #aaa;
            line-height: 1.8;
        }

        /* Resource popup styles */
        .res-popup { max-width: 600px; max-height: 80vh; overflow-y: auto; min-width: 500px; }
        .ps-settings-popup { display: flex; flex-direction: column; overflow: hidden; }
        .res-popup h3 { margin-bottom: 16px; }
        .res-popup .res-toolbar, .res-mgmt-popup .res-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
        .res-popup .res-toolbar select, .res-popup .res-toolbar input, .res-mgmt-popup .res-toolbar select, .res-mgmt-popup .res-toolbar input { padding: 6px; background: #1e1e2f; border: 1px solid #4a4a5a; color: white; border-radius: 4px; }
        .res-list { max-height: 350px; overflow-y: auto; border: 1px solid #3a3a4a; border-radius: 6px; }
        .res-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #3a3a4a; cursor: pointer; transition: background 0.15s; }
        .res-item:last-child { border-bottom: none; }
        .res-item:hover { background: #3a3a4a; }
        .res-item.active { background: #4a6fa5; }
        .res-item-thumb { width: 48px; height: 48px; background: #1e1e2f; border-radius: 4px; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #666; font-size: 20px; overflow: hidden; }
        .res-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
        .res-item-info { flex: 1; min-width: 0; }
        .res-item-info .name { font-size: 13px; color: #e0e0e0; }
        .res-item-info .desc { font-size: 11px; color: #888; margin-top: 2px; }
        .res-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
        .res-item-actions button { padding: 2px 8px; font-size: 12px; }
        .res-popup .res-footer, .res-mgmt-popup .res-footer { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
        .res-group { margin-bottom: 8px; border: 1px solid #3a3a4a; border-radius: 6px; }
        .res-group-header { padding: 8px 12px; background: #2d2d3d; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 6px; }
        .res-group-header:hover { background: #3a3a4a; }
        .res-group-body { display: none; padding: 4px; }
        .res-group-body.open { display: block; max-height: 250px; overflow-y: auto; }
        .res-upload-area { border: 2px dashed #4a4a5a; border-radius: 8px; padding: 20px; text-align: center; color: #888; cursor: pointer; margin: 12px 0; }
        .res-upload-area:hover { border-color: #6a9eff; color: #aaa; }
        .res-upload-area input[type="file"] { display: none; }
        .res-coord-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid #3a3a4a; }
        .res-coord-row input { width: 80px; padding: 4px; background: #1e1e2f; border: 1px solid #4a4a5a; color: white; border-radius: 4px; text-align: center; }
        .res-coord-row .coord-name { width: 100px; }
        .inline-add-btn { background: #3a5a3a; border: 1px solid #5a8a5a; color: #8fc; padding: 2px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; }
        .inline-add-btn:hover { background: #4a6a4a; }
        .field-row { display: flex; gap: 4px; align-items: center; }
        .field-row select, .field-row input { flex: 1; }
        .field-row .btn { padding: 4px 10px; flex-shrink: 0; }

        /* Resource management page modal */
        .res-mgmt-popup { max-width: 800px; min-width: 700px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; }
        .res-mgmt-popup > #resMgmtContent { flex: 1; min-height: 0; display: flex; flex-direction: column; }
        .res-mgmt-popup > #resMgmtContent > .res-toolbar { flex-shrink: 0; }
        .res-mgmt-popup > #resMgmtContent > .res-scroll-area { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid #3a3a4a; border-radius: 6px; }
        .res-mgmt-popup > #resMgmtContent > h4 { flex-shrink: 0; }
        .res-mgmt-popup > .res-footer { flex-shrink: 0; }
        .res-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 2px solid #4a4a5a; margin-bottom: 16px; flex-shrink: 0; }
        .res-tab { padding: 6px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; color: #aaa; transition: all 0.2s; font-size: 13px; }
        .res-tab:hover { color: #e0e0e0; }
        .res-tab.active { color: #6a9eff; border-bottom-color: #6a9eff; }
        .res-tab-content { display: none; }
        .res-tab-content.active { display: block; }

        .right-panel {
            position: fixed;
            right: 0;
            top: 0;
            width: 400px;
            height: 100%;
            background: #2a2a3a;
            border-left: 1px solid #4a4a5a;
            transform: translateX(100%);
            transition: transform 0.3s;
            z-index: 200;
            overflow-y: auto;
            padding: 20px;
        }

        .right-panel.open {
            transform: translateX(0);
        }

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

        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-size: 12px;
            color: #aaa;
        }

        .form-group .checkbox-row {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .form-group .checkbox-row input[type="checkbox"] {
            width: auto;
            margin: 0;
        }
        .form-group .checkbox-row label {
            display: inline;
            margin: 0;
            cursor: pointer;
        }

        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            padding: 8px;
            background: #1e1e2f;
            border: 1px solid #4a4a5a;
            color: white;
            border-radius: 4px;
        }

        .preview-split {
            position: fixed;
            background: #1a1a2a;
            display: flex;
            flex-direction: column;
            z-index: 100;
        }
        .preview-split.split-bottom {
            bottom: 0; left: 0; right: 0;
            height: 300px;
            border-top: 1px solid #4a4a5a;
        }
        .preview-split.split-left {
            top: 44px; left: 0; bottom: 0;
            width: 400px;
            border-right: 1px solid #4a4a5a;
            flex-direction: row;
        }

        .preview-resize-handle {
            background: #4a6fa5;
        }
        .split-bottom .preview-resize-handle {
            height: 4px; cursor: ns-resize;
        }
        .split-left .preview-resize-handle {
            width: 4px; height: auto; cursor: ew-resize; order: 1;
        }
        .split-left .preview-content {
            order: 0; flex: 1;
        }

        .preview-content {
            flex: 1;
            padding: 0;
            overflow: hidden;
            position: relative;
            background: #111;
        }

        /* Game preview 16:9 container */
        .gp-viewport {
            position: relative;
            width: 100%;
            aspect-ratio: 16 / 9;
            max-width: 100%;
            max-height: 100%;
            overflow: hidden;
            background: #0a0a1a;
        }
        .gp-bg {
            position: absolute; inset: 0;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        .gp-sprites {
            position: absolute; inset: 0;
            pointer-events: none;
        }
        .gp-sprite {
            position: absolute;
            bottom: 0;
            transform-origin: bottom center;
        }
        .gp-sprite img { max-height: 80%; width: auto; }
        .gp-dialog-box {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            background: linear-gradient(0deg, rgba(10,10,30,0.95) 0%, rgba(10,10,30,0.85) 100%);
            padding: 12px 16px 16px;
            min-height: 100px;
        }
        .gp-speaker-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 8px;
        }
        .gp-face {
            width: 52px; height: 52px;
            border-radius: 50%;
            background: #4a6fa5;
            flex-shrink: 0;
            overflow: hidden;
            border: 2px solid #6a9eff;
        }
        .gp-face img { width: 100%; height: 100%; object-fit: cover; }
        .gp-speaker-name {
            font-size: 15px;
            font-weight: bold;
            color: #6adfff;
        }
        .gp-text {
            font-size: 14px;
            color: #e8e8e8;
            line-height: 1.7;
            white-space: pre-wrap;
            min-height: 36px;
        }
        .gp-voice-btn {
            position: absolute;
            top: 12px; right: 16px;
            background: rgba(106,158,255,0.3);
            border: 1px solid rgba(106,158,255,0.5);
            color: #6a9eff;
            border-radius: 50%;
            width: 28px; height: 28px;
            cursor: pointer;
            font-size: 12px;
        }
        .gp-nav {
            position: absolute;
            top: 8px; left: 50%; transform: translateX(-50%);
            display: flex; gap: 8px; z-index: 10;
        }
        .gp-nav button {
            background: rgba(255,255,255,0.12);
            border: 1px solid rgba(255,255,255,0.2);
            color: #ccc;
            padding: 4px 14px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        .gp-nav button:hover { background: rgba(255,255,255,0.25); }
        .gp-nav button:disabled { opacity: 0.3; cursor: default; }
        .gp-node-indicator {
            position: absolute;
            top: 8px; right: 12px;
            font-size: 10px;
            color: rgba(255,255,255,0.4);
        }
        .gp-choices {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 280px;
        }
        .gp-choice-btn {
            background: rgba(30,30,60,0.9);
            border: 2px solid #6a9eff;
            color: #e0e0e0;
            padding: 12px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
            text-align: center;
        }
        .gp-choice-btn:hover {
            background: rgba(106,158,255,0.3);
            border-color: #8ab8ff;
        }
        .gp-system-msg {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(30,30,60,0.85);
            border: 1px solid #4a4a5a;
            border-radius: 8px;
            padding: 16px 28px;
            color: #aaa;
            font-size: 13px;
            text-align: center;
            max-width: 400px;
        }
        .gp-system-msg .sys-type { color: #6a9eff; font-weight: bold; margin-bottom: 6px; }
        /* Chapter/Section selection screens */
        .gp-select-screen {
            position: absolute; inset: 0;
            display: flex;
            flex-direction: column;
            padding: 16px;
            overflow-y: auto;
            background: #0a0a1a;
        }
        .gp-select-title {
            font-size: 16px;
            font-weight: bold;
            color: #6adfff;
            margin-bottom: 12px;
            text-align: center;
        }
        .gp-select-list {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
        }
        .gp-select-card {
            background: #2a2a3a;
            border: 2px solid #4a4a5a;
            border-radius: 10px;
            width: 160px;
            cursor: pointer;
            overflow: hidden;
            transition: all 0.2s;
        }
        .gp-select-card:hover {
            border-color: #6a9eff;
            transform: translateY(-2px);
        }
        .gp-select-card-img {
            width: 100%; height: 90px;
            background: #1e1e2f;
            background-size: cover;
            background-position: center;
        }
        .gp-select-card-name {
            padding: 8px;
            font-size: 13px;
            text-align: center;
            color: #e0e0e0;
        }
        /* Chapter select: vertical list */
        .gp-chapter-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-width: 400px;
            margin: 0 auto;
            width: 100%;
        }
        .gp-chapter-card {
            display: flex;
            background: #2a2a3a;
            border: 2px solid #4a4a5a;
            border-radius: 10px;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.2s;
        }
        .gp-chapter-card:hover {
            border-color: #9c27b0;
            transform: translateX(4px);
        }
        .gp-chapter-card-img {
            width: 120px; min-height: 72px;
            background: #1e1e2f;
            background-size: cover;
            background-position: center;
            flex-shrink: 0;
        }
        .gp-chapter-card-info {
            padding: 10px 14px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .gp-chapter-card-info .name { font-size: 14px; font-weight: bold; color: #ce93d8; }
        .gp-chapter-card-info .desc { font-size: 11px; color: #888; margin-top: 4px; }

        /* Project table enhancements */
        .project-table tbody tr { transition: background 0.15s; }
        .project-table tbody tr:nth-child(even) td { background: rgba(42,42,58,0.5); }
        .project-table tbody tr:hover td { background: #3a3a5a !important; }

        @media (max-width: 768px) {
            .right-panel { width: 100%; }
            .toolbar { gap: 4px; }
            .btn { padding: 4px 8px; font-size: 12px; }
        }
