        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #0a0a0a;
            color: #e0e0e0;
            min-height: 100vh;
        }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 24px;
            border-bottom: 1px solid #222;
        }
        h1 {
            font-size: 20px;
            color: #fff;
        }
        #auth-header-container {
            display: flex;
            align-items: center;
        }
        .main-content {
            display: flex;
            height: calc(100vh - 60px);
        }
        .ranked-panel {
            width: 350px;
            min-width: 300px;
            border-right: 1px solid #222;
            display: flex;
            flex-direction: column;
        }
        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            border-bottom: 1px solid #222;
            background: #0d0d0d;
        }
        .panel-header button {
            padding: 8px 16px;
            background: #4ade80;
            color: #000;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
        }
        .panel-header button:hover {
            background: #3fcf70;
        }
        .graph-panel {
            flex: 1;
            overflow: hidden;
            position: relative;
        }
        #graph-container {
            width: 100%;
            height: 100%;
            background: #0a0a0a;
        }
        #graph-container svg {
            width: 100%;
            height: 100%;
        }
        .node-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .node-card {
            background: #1a1a1a;
            border: 1px solid #333;
            border-radius: 6px;
            padding: 12px;
            cursor: pointer;
            transition: border-color 0.15s;
        }
        .node-card:hover {
            border-color: #555;
        }
        .node-card.selected {
            border-color: #4ade80;
        }
        .node-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
        }
        .node-name {
            font-size: 14px;
            font-weight: 500;
            color: #fff;
        }
        .node-score {
            font-size: 16px;
            font-weight: 600;
            color: #4ade80;
        }
        .node-meta {
            font-size: 11px;
            color: #666;
        }
        .parents {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 6px;
        }
        .parent-tag {
            font-size: 10px;
            background: #2a2a2a;
            padding: 2px 6px;
            border-radius: 3px;
            color: #888;
        }
        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
        }
        .error {
            background: #3a1a1a;
            border: 1px solid #f44336;
            color: #ff6b6b;
            padding: 16px;
            border-radius: 8px;
            margin: 16px;
        }
        #page-timing {
            position: fixed;
            bottom: 8px;
            right: 8px;
            font-size: 11px;
            color: #444;
            font-family: monospace;
        }
        /* Mobile responsive layout */
        @media (max-width: 768px) {
            .main-content {
                flex-direction: column;
            }
            .ranked-panel {
                width: 100%;
                min-width: unset;
                height: 35vh;
                flex: none;
                border-right: none;
                border-bottom: 1px solid #222;
            }
            .graph-panel {
                flex: 1;
                min-height: 200px;
            }
            #graph-container {
                height: 100%;
            }
            .header {
                flex-wrap: wrap;
                gap: 8px;
                padding: 8px 12px;
            }
            .header h1 {
                font-size: 14px;
            }
            #auth-header-container {
                flex-shrink: 0;
            }
            .add-modal-content {
                width: 95%;
                max-height: 90vh;
                padding: 16px;
            }
        }
        .rank {
            font-size: 12px;
            color: #555;
            margin-right: 6px;
        }
        .node-circle {
            cursor: pointer;
        }
        .node-label {
            font-size: 10px;
            fill: #999;
            pointer-events: none;
        }
        .node-label.private-label {
            fill: #666;
            font-style: italic;
        }
        .link {
            stroke-opacity: 0.6;
        }
        .tooltip {
            position: absolute;
            background: #222;
            border: 1px solid #444;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 12px;
            pointer-events: none;
            z-index: 100;
        }
        .tooltip .name { font-weight: 600; color: #fff; }
        .tooltip .score { color: #4ade80; }
        .tooltip .meta { color: #888; font-size: 11px; }
        .selection-ring {
            fill: none;
            stroke: #fff;
            stroke-width: 3;
        }
        .graph-legend {
            position: absolute;
            bottom: 16px;
            left: 16px;
            background: rgba(20, 20, 20, 0.9);
            border: 1px solid #333;
            border-radius: 6px;
            padding: 12px;
            font-size: 11px;
            color: #888;
        }
        .legend-title {
            color: #ccc;
            font-weight: 500;
            margin-bottom: 8px;
        }
        .legend-row {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }
        .legend-circles {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .legend-circle {
            border-radius: 50%;
        }
        .legend-gradient {
            width: 60px;
            height: 12px;
            border-radius: 2px;
        }
        /* Auth modal */
        .auth-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        .auth-modal-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
        }
        .auth-modal-content {
            position: relative;
            background: #1a1a1a;
            border-radius: 12px;
            padding: 24px;
            max-width: 400px;
            width: 90%;
        }
        .auth-modal-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
        }
        .login-required {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            gap: 16px;
        }
        .login-required .btn-row {
            display: flex;
            gap: 12px;
        }
        .login-required button {
            padding: 12px 24px;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
        }
        .login-required .btn-signin {
            background: transparent;
            border: 1px solid #444;
            color: #ccc;
        }
        .login-required .btn-signin:hover {
            border-color: #666;
            color: #fff;
        }
        .login-required .btn-signup {
            background: #4ade80;
            border: none;
            color: #000;
        }
        .login-required .btn-signup:hover {
            background: #22c55e;
        }
        /* Add forms */
        .header-btn {
            padding: 8px 16px;
            background: #2a2a2a;
            border: 1px solid #444;
            color: #ccc;
            border-radius: 4px;
            cursor: pointer;
            margin-right: 12px;
        }
        .header-btn:hover {
            background: #333;
        }
        .add-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        .add-modal-backdrop {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
        }
        .add-modal-content {
            position: relative;
            background: #1a1a1a;
            border-radius: 12px;
            padding: 24px;
            max-width: 450px;
            max-height: 90vh;
            overflow-y: auto;
            width: 90%;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .add-modal-close {
            position: absolute;
            top: 12px;
            right: 12px;
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
        }
        .add-modal h2 {
            color: #fff;
            margin-bottom: 20px;
            font-size: 18px;
        }
        .add-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            align-items: center;
        }
        .add-tab {
            padding: 8px 16px;
            background: #2a2a2a;
            border: 1px solid #333;
            color: #888;
            border-radius: 4px;
            cursor: pointer;
        }
        .add-tab.active {
            background: #333;
            color: #fff;
            border-color: #555;
        }
        .form-group {
            margin-bottom: 16px;
        }
        .form-group label {
            display: block;
            margin-bottom: 6px;
            color: #aaa;
            font-size: 13px;
        }
        .form-group input,
        .form-group select {
            width: 100%;
            padding: 10px 12px;
            background: #0a0a0a;
            border: 1px solid #333;
            border-radius: 4px;
            color: #fff;
            font-size: 14px;
        }
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: #4ade80;
        }
        .form-group input::placeholder {
            color: #555;
        }
        .form-group select option {
            background: #1a1a1a;
            color: #fff;
        }
        .form-row {
            display: flex;
            gap: 12px;
        }
        .form-row .form-group {
            flex: 1;
        }
        .form-submit {
            width: 100%;
            padding: 12px;
            background: #4ade80;
            border: none;
            border-radius: 6px;
            color: #000;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            margin-top: 8px;
        }
        .form-submit:hover {
            background: #3fcf70;
        }
        .form-submit:disabled {
            background: #333;
            color: #666;
            cursor: not-allowed;
        }
        .form-hint {
            font-size: 11px;
            color: #555;
            margin-top: 4px;
        }
        .form-message {
            padding: 10px;
            border-radius: 4px;
            margin-bottom: 16px;
            font-size: 13px;
        }
        .form-message.success {
            background: rgba(74, 222, 128, 0.1);
            border: 1px solid #4ade80;
            color: #4ade80;
        }
        .form-message.error {
            background: rgba(248, 113, 113, 0.1);
            border: 1px solid #f87171;
            color: #f87171;
        }
        /* Spreadsheet table styles */
        .edit-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .edit-table th {
            background: #1a1a1a;
            padding: 10px 12px;
            text-align: left;
            font-weight: 500;
            color: #888;
            border-bottom: 1px solid #333;
            position: sticky;
            top: 0;
        }
        .help-icon {
            position: relative;
            display: inline-block;
            width: 14px;
            height: 14px;
            background: #333;
            color: #888;
            border-radius: 50%;
            font-size: 10px;
            line-height: 14px;
            text-align: center;
            cursor: help;
            margin-left: 4px;
            vertical-align: middle;
        }
        .help-icon:hover {
            background: #444;
            color: #aaa;
        }
        .help-icon:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            top: 100%;
            right: -10px;
            margin-top: 8px;
            background: #222;
            color: #ccc;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: normal;
            width: 260px;
            white-space: normal;
            word-wrap: break-word;
            line-height: 1.4;
            text-align: left;
            z-index: 10000;
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
            border: 1px solid #444;
            pointer-events: none;
        }
        .edit-table td {
            padding: 0;
            border-bottom: 1px solid #333;
        }
        .edit-table td.editable-cell {
            padding: 10px 12px;
            background: #1f1f1f;
            color: #fff;
            cursor: pointer;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .edit-table td.editable-cell:hover {
            background: #252525;
        }
        .edit-table tr:hover td.editable-cell {
            background: #252525;
        }
        .edit-table td input:not([type="checkbox"]) {
            width: 100%;
            padding: 10px 12px;
            background: #1f1f1f;
            border: none;
            color: #fff;
            font-size: 13px;
            outline: none;
        }
        .edit-table td input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin: 0 auto;
            cursor: pointer;
            accent-color: #4ade80;
        }
        .edit-table td input:not([type="checkbox"]):focus {
            background: #252525;
        }
        .edit-table td input:not([type="checkbox"]).modified {
            background: rgba(74, 222, 128, 0.1);
        }
        .edit-table td.number-cell input {
            text-align: right;
        }
        .edit-table .delete-btn {
            background: none;
            border: none;
            color: #666;
            cursor: pointer;
            padding: 8px 12px;
            font-size: 16px;
        }
        .edit-table .delete-btn:hover {
            color: #f87171;
        }
        .edit-table .add-btn {
            background: none;
            border: 1px solid #444;
            color: #888;
            cursor: pointer;
            padding: 4px 12px;
            font-size: 12px;
            border-radius: 4px;
        }
        .edit-table .add-btn:hover {
            border-color: #4ade80;
            color: #4ade80;
        }
        .edit-table .new-row input {
            color: #666;
        }
        .edit-table .new-row input::placeholder {
            color: #444;
        }
        .table-container {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            border: 1px solid #333;
            border-radius: 6px;
        }
        .edit-table {
            border-collapse: separate;
            border-spacing: 0;
        }
        .table-container .sticky-row {
            position: sticky;
            bottom: 0;
            z-index: 10;
        }
        .table-container .sticky-row td {
            background: #0d0d0d;
            border-top: 2px solid #333;
            box-shadow: 0 -4px 8px rgba(0,0,0,0.5);
        }
        .table-container .sticky-row input::placeholder {
            color: #4ade80;
        }
        .edit-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            padding: 40px;
            color: #888;
        }
        .edit-loading.hidden {
            display: none;
        }
        .edit-spinner {
            width: 20px;
            height: 20px;
            border: 2px solid #333;
            border-top-color: #4ade80;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .table-stats {
            font-size: 12px;
            color: #666;
            margin-top: 12px;
        }
        .autocomplete-wrapper {
            position: relative;
        }
        .autocomplete-list {
            position: fixed;
            max-height: 300px;
            overflow-y: auto;
            background: #252525;
            border: 1px solid #4ade80;
            border-bottom: none;
            border-radius: 6px 6px 0 0;
            z-index: 10000;
            box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
        }
        .autocomplete-item {
            padding: 10px 12px;
            cursor: pointer;
            font-size: 13px;
            border-bottom: 1px solid #333;
        }
        .autocomplete-item:last-child {
            border-bottom: none;
        }
        .autocomplete-item:hover, .autocomplete-item.selected {
            background: #3a3a3a;
        }
        .autocomplete-item .score {
            color: #666;
            font-size: 11px;
            margin-left: 8px;
        }
        .edit-table tr.hidden {
            display: none;
        }
        .highlight {
            background: rgba(74, 222, 128, 0.3);
        }
        .private-task {
            color: #888;
            font-style: italic;
        }
        input.private-obscured {
            color: #888;
            font-style: italic;
        }
        .score-cell {
            color: #888;
            font-family: monospace;
            text-align: right;
            padding: 10px 12px;
            transition: color 0.3s;
        }
        .score-cell.score-changed {
            color: #4ade80;
        }

        /* Custom table styles */
        .table-search {
            margin-bottom: 12px;
        }
        .table-search input {
            width: 100%;
            padding: 10px 12px;
            background: #252525;
            border: 1px solid #333;
            border-radius: 6px;
            color: #fff;
            font-size: 13px;
        }
        .table-search input:focus {
            border-color: #4ade80;
            outline: none;
        }
        .table-search input::placeholder {
            color: #666;
        }
        .custom-table-wrapper {
            max-height: 320px;
            overflow-y: auto;
            border: 1px solid #333;
            border-radius: 6px;
        }
        .custom-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .custom-table th {
            position: sticky;
            top: 0;
            background: #1a1a1a;
            color: #888;
            font-weight: 500;
            text-align: left;
            padding: 10px 12px;
            border-bottom: 1px solid #333;
            z-index: 1;
        }
        .custom-table td {
            padding: 0;
            border-bottom: 1px solid #222;
        }
        .custom-table tr:nth-child(odd) {
            background: #111;
        }
        .custom-table tr:hover {
            background: #1a1a1a;
        }
        .custom-table input[type="text"],
        .custom-table input[type="number"] {
            width: 100%;
            padding: 8px 12px;
            background: transparent;
            border: none;
            color: #fff;
            font-size: 13px;
        }
        .custom-table input[type="text"]:focus,
        .custom-table input[type="number"]:focus {
            outline: none;
            background: #252525;
        }
        .custom-table input.flash-success {
            animation: flashSuccess 0.4s ease-out;
        }
        @keyframes flashSuccess {
            0% { background: #3a5a3a; }
            100% { background: transparent; }
        }
        .custom-table input[type="checkbox"] {
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: #4ade80;
        }
        .custom-table .score-cell {
            padding: 8px 12px;
            color: #888;
            font-family: monospace;
            text-align: right;
        }
        .custom-table .checkbox-cell {
            text-align: center;
            padding: 8px;
        }
        .custom-table .delete-cell {
            width: 40px;
            text-align: center;
        }
        .custom-table .delete-btn {
            background: none;
            border: none;
            color: #555;
            cursor: pointer;
            font-size: 18px;
            padding: 4px 8px;
        }
        .custom-table .delete-btn:hover {
            color: #f87171;
        }
        .custom-table tr.hidden {
            display: none;
        }
        @media (max-width: 768px) {
            .custom-table {
                font-size: 11px;
            }
            .custom-table th,
            .custom-table td {
                padding: 6px 8px;
            }
            .custom-table input[type="text"],
            .custom-table input[type="number"] {
                padding: 6px 8px;
                font-size: 11px;
            }
            .custom-table input[type="checkbox"] {
                width: 14px;
                height: 14px;
            }
        }
        .add-form {
            display: flex;
            gap: 8px;
            padding: 12px;
            background: #1a1a1a;
            border-top: 1px solid #333;
            align-items: center;
            flex-wrap: wrap;
        }
        @media (max-width: 768px) {
            .add-form {
                gap: 6px;
                padding: 8px;
            }
            .add-form input {
                font-size: 12px;
                padding: 6px 8px;
            }
            .add-form input[type="number"] {
                width: 50px;
            }
            .add-form button {
                padding: 6px 12px;
                font-size: 12px;
            }
        }
        .add-form input {
            flex: 1;
            padding: 8px 12px;
            background: #252525;
            border: 1px solid #333;
            border-radius: 4px;
            color: #fff;
            font-size: 13px;
        }
        .add-form input:focus {
            border-color: #4ade80;
            outline: none;
        }
        .add-form input[type="number"] {
            width: 80px;
            flex: none;
        }
        .add-form input[type="checkbox"] {
            width: 16px;
            height: 16px;
            flex: none;
        }
        .add-form button {
            padding: 8px 16px;
            background: #4ade80;
            border: none;
            border-radius: 4px;
            color: #000;
            font-weight: 500;
            cursor: pointer;
        }
        .add-form button:hover {
            background: #22c55e;
        }
        /* Focus filter bar */
        .focus-filter-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            margin-bottom: 8px;
            background: #1a2a1a;
            border: 1px solid #2a4a2a;
            border-radius: 6px;
        }
        .focus-filter-info {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }
        .focus-filter-label {
            font-size: 11px;
            color: #666;
            flex-shrink: 0;
        }
        .focus-filter-name {
            font-size: 13px;
            font-weight: 600;
            color: #4ade80;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .focus-filter-score {
            font-size: 12px;
            color: #888;
            flex-shrink: 0;
        }
        .focus-filter-clear {
            background: none;
            border: none;
            color: #888;
            font-size: 20px;
            cursor: pointer;
            padding: 0 4px;
            line-height: 1;
            flex-shrink: 0;
        }
        .focus-filter-clear:hover {
            color: #fff;
        }
        /* Clickable parent tags */
        .parent-tag-clickable {
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }
        .parent-tag-clickable:hover {
            background: #3a3a3a;
            color: #4ade80;
        }
        /* Focus/drill-down button on node cards */
        .focus-btn {
            background: none;
            border: 1px solid #333;
            color: #666;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 3px;
            cursor: pointer;
            line-height: 1;
        }
        .focus-btn:hover {
            border-color: #4ade80;
            color: #4ade80;
        }
        /* Import modal textarea */
        #import-textarea:focus {
            border-color: #4ade80;
            outline: none;
        }
        #import-preview-content {
            max-height: 350px;
            overflow-y: auto;
        }
