/* ============================================
   METRO TIMELINE VISUALIZATION
   ============================================ */

.metro-timeline-container {
    width: 100%;
    min-height: 600px;
    overflow-x: auto;
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow);
}

.metro-timeline-wrapper {
    display: flex;
    min-width: max-content;
    padding: 3rem;
    background: radial-gradient(circle at 10px 10px, var(--border-color) 1px, transparent 0);
    background-size: 30px 30px;
}

.metro-characters-column {
    flex: 0 0 220px;
    padding-right: 1.5rem;
    border-right: 2px dashed var(--border-color);
    position: sticky;
    left: 0;
    background: var(--bg-primary);
    z-index: 10;
}

.metro-character-row {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.metro-character-row:hover {
    background: var(--bg-secondary);
    transform: translateX(5px);
    border-color: var(--border-color);
}

.metro-character-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.metro-character-color:hover {
    transform: scale(1.2) rotate(15deg);
}

.metro-character-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metro-events-area {
    flex: 1;
    position: relative;
    min-width: 800px;
}

.metro-svg-container {
    display: block;
    min-height: 500px;
}

.metro-event-node {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.metro-event-node:hover circle {
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

.metro-event-node:hover text {
    font-weight: 800;
    font-size: 13px;
}

.metro-event-label {
    font-size: 11px;
    fill: var(--text-primary);
    pointer-events: none;
    font-family: 'Crimson Pro', serif;
    transition: all 0.2s;
}

.metro-line {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-width 0.3s;
}

.metro-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    align-items: center;
    border: 1px solid var(--border-color);
}

.metro-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.metro-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.metro-legend-line {
    width: 40px;
    height: 6px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Metro Events Sortable List (Sidebar) */
.metro-events-sortable {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0.5rem;
}

.metro-event-item {
    display: flex;
    align-items: stretch;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.metro-event-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--shadow);
    transform: translateY(-2px);
}

.metro-event-item.dragging {
    opacity: 0.4;
    cursor: grabbing;
    transform: scale(0.95);
}

.metro-event-item.drag-over {
    border-color: var(--accent-blue);
    background: rgba(var(--accent-blue-rgb), 0.05);
}

.metro-event-reorder-btns {
    display: flex;
    flex-direction: column;
    gap: px;
    padding: 0.4rem;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
}

.metro-reorder-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.metro-reorder-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.metro-event-item-content {
    flex: 1;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metro-event-item-title {
    font-weight: 600;
    color: var(--text-primary);
}

.metro-event-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Source Code Pro', monospace;
}

/* Metro Event Modal Refinements */
.metro-event-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.metro-characters-selector {
    max-height: 240px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    background: var(--bg-primary);
    margin-top: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.metro-char-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 2px;
    border: 1px solid transparent;
}

.metro-char-option:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.metro-char-option.selected {
    background: rgba(var(--accent-blue-rgb), 0.08);
    border-color: rgba(var(--accent-blue-rgb), 0.3);
}

.metro-char-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

.metro-char-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.metro-linked-chars {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    min-height: 48px;
    align-items: center;
}

.metro-linked-char-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    animation: fadeInScale 0.2s ease-out;
}

.metro-linked-char-tag .remove-char {
    cursor: pointer;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.metro-linked-char-tag .remove-char:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.arc-scenes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.arc-scene-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.arc-scene-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.arc-scene-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.arc-scene-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.arc-scene-intensity {
    color: var(--primary-color);
    font-weight: 600;
}

.arc-scene-notes {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Arc Editor View Styles */
.arc-editor-view {
    padding: 2rem;
    max-width: none;
    margin: 0 auto;
}

.arc-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.arc-editor-header h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--text-primary);
}

.arc-editor-actions-header {
    display: flex;
    gap: 0.75rem;
}

.arc-editor-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.arc-editor-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.arc-editor-section h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.arc-editor-section h3 [data-lucide] {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.arc-editor-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.arc-editor-header h2 [data-lucide] {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.btn-primary [data-lucide],
.btn-secondary [data-lucide] {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-help {
    margin: 0.5rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.color-picker-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.color-picker-group input[type="color"] {
    width: 80px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.form-input-small {
    width: 120px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.arc-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

/* Sidebar item styles for arcs */
.sidebar-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item-icon [data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.sidebar-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.sidebar-empty-icon [data-lucide] {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.arc-panel-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    margin-bottom: 0.5rem;
}

.arc-panel-empty-icon [data-lucide] {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.arc-in-scene-title [data-lucide] {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.arc-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.arc-type-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.arc-type-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.arc-type-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arc-type-icon [data-lucide] {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.arc-type-card.selected .arc-type-icon [data-lucide] {
    color: white;
}

.arc-type-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.arc-type-card.selected .arc-type-label {
    color: white;
}

/* Arc Scene Panel Styles */
.arc-scene-panel {
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 250px;
    width: 280px;
    height: 100%;
    z-index: 10;
}

.arc-scene-panel.hidden {
    display: none;
    min-width: 0;
    width: 0;
}

.arc-scene-panel-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.arc-scene-panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.arc-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 1;
}

.arc-panel-close:hover {
    color: var(--error-color);
}

.arc-scene-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.arc-scene-info {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.arc-scene-info-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.arc-in-scene {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.arc-in-scene-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.arc-in-scene-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.arc-in-scene-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
}

.arc-in-scene-remove:hover {
    color: var(--error-color);
}

.arc-in-scene-control {
    margin-bottom: 1rem;
}

.arc-in-scene-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.arc-intensity-slider {
    width: 100%;
    margin-bottom: 0.5rem;
}

.arc-intensity-value {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

.arc-status-select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    font-size: 0.9rem;
}

.arc-column-select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.arc-notes-textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
}

.arc-panel-add-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.arc-panel-add-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-gold);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: transform 0.2s;
}

.arc-panel-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

.arc-panel-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.arc-panel-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ============================================ 
   LIVE TENSION METER 
   ============================================ */

.tension-meter-container {
    position: fixed;
    bottom: 2rem;
    right: 6.5rem;
    /* Left of focus button */
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none; /* Hidden by default — shown only in editor view via body.view-editor */
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--border-color);
}

/* Only show in editor view */
body.view-editor .tension-meter-container {
    display: flex;
}

.tension-meter-container:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tension-meter-svg {
    transform: rotate(-90deg);
    width: 50px;
    height: 50px;
}

.tension-meter-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 4;
}

.tension-meter-fill {
    fill: none;
    stroke: var(--accent-blue);
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.5s ease;
}

.tension-value-display {
    position: absolute;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tooltip premium */
.tension-tooltip {
    position: absolute;
    bottom: 110%;
    right: 0;
    width: 220px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}

.tension-meter-container:hover .tension-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.tension-tooltip-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tension-tooltip-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.tension-tags-container {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tension-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

.tension-tag-high {
    background: rgba(196, 69, 54, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(196, 69, 54, 0.2);
}

.tension-tag-medium {
    background: rgba(184, 134, 11, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.tension-tag-low {
    background: rgba(58, 123, 200, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(58, 123, 200, 0.2);
}

.tension-meter-container.focus-hide {
    opacity: 0.2;
}

.tension-meter-container.focus-hide:hover {
    opacity: 1;
}

/* ============================================
   RELATION GRAPH STYLES
   ============================================ */

.relation-map-container {
    height: 100%;
    overflow-y: auto;
    padding: 2rem 3rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) transparent;
}

#relationsGraph {
    position: relative;
    height: 700px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 10px var(--shadow);
    background-image:
        radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
    overflow: hidden;
}

.char-node-draggable {
    position: absolute;
    text-align: center;
    cursor: move;
    z-index: 5;
}

.char-avatar-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    transform: translate(-50%, -50%);
    /* Anchor center to parent's left/top */
}

.char-node-draggable.selected .char-avatar-circle {
    border-color: var(--accent-red);
    border-width: 5px;
    box-shadow: 0 0 20px rgba(196, 69, 54, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

.char-node-draggable.first-selected .char-avatar-circle::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed var(--accent-red);
    border-radius: 50%;
    animation: rotate-dashed 10s linear infinite;
}

@keyframes rotate-dashed {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.char-node-label {
    position: absolute;
    top: 35px;
    /* Offset from center */
    left: 0;
    transform: translateX(-50%);
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--bg-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 4px var(--shadow);
}

.relation-line {
    transition: opacity 0.2s, stroke-width 0.2s;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.relation-line:hover {
    opacity: 1 !important;
    stroke-width: 5 !important;
}

.selection-mode-banner {
    background: var(--accent-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInDown 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(196, 69, 54, 0.3);
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}