* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #0e0e0e;
    color: #00ff00;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

body.layout-loading {
    overflow: hidden;
}

#title {
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    text-align: left;
    margin: 0;
}

.app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    background: rgba(0, 0, 0, 0.35);
}

.header-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.timestamp-display {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(0, 255, 0, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}

.header-controls button {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.auth-button {
    padding: 4px 10px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.auth-button.secondary {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 255, 0, 0.35);
}

.auth-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
}

.auth-player {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-auto-track {
    display: flex;
    align-items: center;
    gap: 4px;
}

.auth-auto-track[hidden] {
    display: none;
}

.auth-auto-track-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    user-select: none;
    position: relative;
}

.auth-auto-track-toggle input {
    position: absolute;
    opacity: 0;
    width: 32px;
    height: 16px;
    cursor: pointer;
}

.auth-auto-track-slider {
    width: 32px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 0, 0.45);
    background: rgba(0, 0, 0, 0.6);
    position: relative;
    transition: background 150ms ease, border-color 150ms ease;
}

.auth-auto-track-slider::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00ff00;
    top: 1px;
    left: 1px;
    transition: transform 150ms ease;
}

.auth-auto-track-toggle input:checked + .auth-auto-track-slider {
    background: rgba(0, 255, 0, 0.2);
    border-color: rgba(0, 255, 0, 0.85);
}

.auth-auto-track-toggle input:checked + .auth-auto-track-slider::after {
    transform: translateX(16px);
}

.auth-auto-track-text {
    text-transform: uppercase;
}

.auth-auto-track-status {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: rgba(0, 255, 0, 0.7);
    text-transform: uppercase;
}

.auth-auto-track-toggle input:disabled + .auth-auto-track-slider {
    opacity: 0.5;
}

.auth-auto-track.is-paused .auth-auto-track-status {
    color: #ffeb3b;
}

.auth-character {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.auth-location {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 0, 0.75);
}

.auth-inline-message {
    margin-left: auto;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    min-width: 220px;
    text-align: right;
    color: rgba(0, 255, 0, 0.75);
}

.auth-inline-message.error {
    color: #ff6b6b;
}

.auth-refresh-button {
    padding: 2px 8px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
}

.auth-refresh-button[hidden] {
    display: none;
}

.auth-refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.module-preferences-container {
    position: relative;
    display: flex;
    align-items: center;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 16px;
}

th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    opacity: 0.25;
}

th.sort-asc::after {
    content: '▲';
    opacity: 0.8;
}

th.sort-desc::after {
    content: '▼';
    opacity: 0.8;
}

.module-preferences {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    padding: 10px 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

.module-preferences.open {
    display: flex;
}

.module-preferences h3 {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 0, 0.8);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.module-preferences-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.module-preferences-item input[type="checkbox"] {
    accent-color: #00ff00;
}

.module-preferences-empty {
    font-size: 0.7rem;
    color: rgba(0, 255, 0, 0.6);
}

#modulePreferencesButton[aria-expanded="true"] {
    background: rgba(0, 255, 0, 0.18);
    border-color: rgba(0, 255, 0, 0.7);
}

#layoutLockButton[data-locked="true"] {
    background: rgba(0, 255, 0, 0.18);
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.8);
}

.layout-locked .module-header {
    cursor: default;
}

.layout-locked .module-resize-handle {
    display: none;
    pointer-events: none;
}

.error-message {
    color: #ff0000;
    text-align: right;
    margin: 0;
    min-width: 160px;
    margin-left: 12px;
    font-size: 0.75rem;
    visibility: hidden;
}

.error-message.visible {
    visibility: visible;
}

.app-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.08) 0%, rgba(0, 0, 0, 0.94) 70%);
    z-index: 3000;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-core {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.loader-ring {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 0, 0.25);
    border-top-color: #00ff00;
    box-shadow: 0 0 18px rgba(0, 255, 0, 0.55);
    animation: loaderSpin 1.1s linear infinite;
    z-index: 1;
}

.loader-ring::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 0, 0.35);
    box-shadow: 0 0 16px rgba(0, 255, 0, 0.45);
    opacity: 0.8;
}

.loader-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.14) 0%, rgba(0, 255, 0, 0) 70%);
    filter: blur(10px);
    animation: loaderPulse 1.8s ease-in-out infinite;
    z-index: 0;
}

.loader-text {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.85);
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderPulse {
    0% {
        transform: scale(0.92);
        opacity: 0.45;
    }
    50% {
        transform: scale(1);
        opacity: 0.9;
    }
    100% {
        transform: scale(0.92);
        opacity: 0.45;
    }
}

.app-context-menu {
    position: fixed;
    min-width: 200px;
    max-width: 320px;
    background: rgba(3, 3, 3, 0.96);
    border: 1px solid rgba(0, 255, 0, 0.35);
    border-radius: 10px;
    padding: 4px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 18px rgba(0, 255, 0, 0.2);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 120ms ease, transform 120ms ease;
    pointer-events: none;
    z-index: 3600;
}

.app-context-menu.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.app-context-menu__header {
    padding: 6px 14px 4px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.75);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.app-context-menu__items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px;
}

.app-context-menu__item {
    width: 100%;
    background: transparent;
    border: none;
    color: #f5fff5;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 8px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 120ms ease, transform 120ms ease;
}

.app-context-menu__item:focus-visible,
.app-context-menu__item:hover {
    background: rgba(0, 255, 0, 0.08);
    outline: none;
}

.app-context-menu__item:disabled {
    color: rgba(245, 255, 245, 0.6);
    cursor: not-allowed;
    background: transparent;
}

.app-context-menu__item[data-tone="danger"] {
    border: 1px solid rgba(255, 82, 82, 0.5);
}

.app-context-menu__item[data-tone="warning"] {
    border: 1px solid rgba(255, 193, 7, 0.45);
}

.app-context-menu__item-label {
    font-weight: 600;
    font-size: 0.78rem;
}

.app-context-menu__item-detail {
    font-size: 0.7rem;
    color: rgba(245, 255, 245, 0.8);
    margin-top: 2px;
    word-break: break-word;
}

.app-context-menu__item-meta {
    margin-top: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 255, 0, 0.55);
}

.app-context-menu__separator {
    height: 1px;
    background: rgba(0, 255, 0, 0.15);
    margin: 4px 0;
}

.app-context-menu__label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.6);
    padding: 6px 8px 2px;
}

.app-context-menu__empty {
    padding: 8px 10px;
    font-size: 0.78rem;
    color: rgba(245, 255, 245, 0.65);
    text-align: center;
}

.app-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 60px);
    background: rgba(3, 3, 3, 0.92);
    color: #f5fff5;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 0, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    opacity: 0;
    transition: opacity 240ms ease, transform 240ms ease;
    pointer-events: none;
    z-index: 3650;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.app-toast[data-tone="success"] {
    border-color: rgba(46, 204, 113, 0.55);
    color: #abffcf;
}

.app-toast[data-tone="error"] {
    border-color: rgba(255, 99, 71, 0.65);
    color: #ffbbbb;
}

.app-toast[data-tone="warning"] {
    border-color: rgba(255, 193, 7, 0.55);
    color: #ffe9a3;
}

@media (prefers-reduced-motion: reduce) {
    .app-context-menu,
    .app-toast {
        transition: none;
    }
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 0;
    gap: 0;
    min-height: 0;
}

main::-webkit-scrollbar {
    width: 12px;
}

main::-webkit-scrollbar-track {
    background: #333;
}

main::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}



.module-grid {
    width: 100%;
    height: 100%;
    position: relative;
    flex: 1;
    overflow: auto;
    padding: 0;
    min-height: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
}

.module-grid::-webkit-scrollbar {
    width: 12px;
}

.module-grid::-webkit-scrollbar-track {
    background: #333;
}

.module-grid::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.module {
    position: absolute;
    background-color: #161616;
    border: 1px solid #00ff00;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 0 0 rgba(0, 255, 0, 0);
}

.module:focus-within,
.module:hover {
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.module.dragging {
    box-shadow: 0 0 18px rgba(0, 255, 0, 0.35);
    cursor: grabbing;
}

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    background: rgba(0, 0, 0, 0.25);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.module.dragging .module-header {
    cursor: grabbing;
}

.module-header h2 {
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.module-status {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.8);
}

.module-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    overflow: hidden;
}

.module-scrollable {
    flex: 1;
    overflow: auto;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 4px;
    padding: 8px;
    background-color: #111;
    min-height: 0;
}

#mapContainer {
    position: relative;
    overflow: hidden;
}

.map-control-bar {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 255, 0, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 12;
}

.map-update-button {
    padding: 4px 12px;
    border: 1px solid rgba(0, 255, 0, 0.45);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.map-update-button:hover,
.map-update-button:focus {
    background: rgba(0, 255, 0, 0.15);
    color: #ccffcc;
    transform: translateY(-1px);
}

.map-update-button:focus-visible {
    outline: 2px solid rgba(0, 255, 0, 0.85);
    outline-offset: 1px;
}

.map-search-controls {
    position: relative;
    display: flex;
    align-items: center;
}

.map-search-toggle {
    padding: 4px 14px;
    border: 1px solid rgba(0, 255, 0, 0.45);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.map-search-toggle:hover,
.map-search-toggle:focus {
    background: rgba(0, 255, 0, 0.15);
    color: #ccffcc;
    transform: translateY(-1px);
}

.map-search-toggle:focus-visible {
    outline: 2px solid rgba(0, 255, 0, 0.85);
    outline-offset: 1px;
}

.map-search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    align-items: center;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 8px 22px rgba(0, 255, 0, 0.2);
    width: clamp(220px, 32vw, 320px);
    backdrop-filter: blur(6px);
    z-index: 20;
}

.map-search-panel[hidden] {
    display: none !important;
}

.map-route-controls {
    position: relative;
    display: flex;
    align-items: center;
}

.map-route-controls.is-disabled {
    opacity: 0.6;
}

.map-route-toggle {
    padding: 4px 14px;
    border: 1px solid rgba(0, 200, 255, 0.5);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #66f7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.map-route-toggle.is-disabled,
.map-route-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.map-route-toggle:hover,
.map-route-toggle:focus {
    background: rgba(0, 200, 255, 0.18);
    color: #bff8ff;
    transform: translateY(-1px);
}

.map-route-toggle:focus-visible {
    outline: 2px solid rgba(0, 200, 255, 0.85);
    outline-offset: 1px;
}

.map-route-toggle.is-active {
    background: rgba(0, 200, 255, 0.25);
    color: #e2fbff;
    border-color: rgba(0, 200, 255, 0.75);
    box-shadow: 0 0 12px rgba(0, 200, 255, 0.35);
}

.map-route-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(0, 200, 255, 0.45);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 10px 26px rgba(0, 180, 255, 0.25);
    width: clamp(240px, 34vw, 360px);
    backdrop-filter: blur(6px);
    z-index: 20;
}

.map-route-panel[hidden] {
    display: none !important;
}

.map-route-origin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9deaff;
}

.map-route-origin-value {
    font-weight: 600;
    color: #ffffff;
}

.map-route-destination {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-route-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 200, 255, 0.45);
    background: rgba(4, 28, 44, 0.9);
    color: #e8fcff;
    font-size: 0.9rem;
}

.map-route-input:focus {
    outline: 2px solid rgba(0, 200, 255, 0.75);
    outline-offset: 1px;
    border-color: rgba(0, 200, 255, 0.8);
}

.map-route-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: rgba(2, 18, 30, 0.95);
    border: 1px solid rgba(0, 200, 255, 0.35);
    border-radius: 6px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.4);
    max-height: 210px;
    overflow-y: auto;
    z-index: 22;
}

.map-route-suggestions::-webkit-scrollbar {
    width: 12px;
}

.map-route-suggestions::-webkit-scrollbar-track {
    background: #333;
}

.map-route-suggestions::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.map-route-suggestions[hidden] {
    display: none !important;
}

.map-route-suggestion {
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #e8fcff;
    transition: background 0.15s ease, color 0.15s ease;
}

.map-route-suggestion:hover,
.map-route-suggestion:focus {
    background: rgba(0, 200, 255, 0.2);
    color: #ffffff;
}

.map-route-suggestion-label {
    font-size: 0.88rem;
    font-weight: 600;
}

.map-route-suggestion-meta {
    font-size: 0.72rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.map-route-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-route-preference-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8edfff;
}

.map-route-preference {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 200, 255, 0.45);
    background: rgba(0, 18, 32, 0.9);
    color: #e8fcff;
    font-size: 0.85rem;
}

.map-route-preference:focus {
    outline: 2px solid rgba(0, 200, 255, 0.75);
    outline-offset: 1px;
    border-color: rgba(0, 200, 255, 0.8);
}

.map-route-submit {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(0, 200, 255, 0.55);
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.35), rgba(0, 115, 170, 0.4));
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.map-route-submit:hover,
.map-route-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 200, 255, 0.3);
}

.map-route-submit:focus-visible {
    outline: 2px solid rgba(0, 200, 255, 0.75);
    outline-offset: 1px;
}

.map-route-submit[disabled],
.map-route-submit:disabled {
    opacity: 0.55;
    cursor: wait;
}

.map-route-message {
    font-size: 0.78rem;
    color: #a2f3ff;
    min-height: 1.1rem;
}

.map-route-message-error {
    color: #ff8080;
}

.map-route-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(0, 200, 255, 0.25);
    padding-top: 8px;
}

.map-route-summary-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.map-route-summary-line {
    font-size: 0.78rem;
    color: #c8f6ff;
    line-height: 1.3;
}

.map-route-summary-total {
    font-weight: 600;
    color: #ffffff;
}

.map-route-controls.is-open .map-route-panel {
    animation: map-route-panel-enter 0.15s ease-out;
}

@keyframes map-route-panel-enter {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nodes circle.is-route {
    filter: drop-shadow(0 0 6px rgba(0, 224, 255, 0.65));
}

.links line.is-route {
    filter: drop-shadow(0 0 6px rgba(0, 224, 255, 0.55));
}

.route-overlay-lines {
    pointer-events: none;
}

.route-overlay-lines line {
    stroke: #00e0ff;
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-dasharray: 6 4;
    opacity: 0.85;
}

.route-overlay-segment-labels {
    pointer-events: none;
}

.route-overlay-segment-label {
    font-size: 0.62rem;
    font-weight: 600;
    fill: #f1ffff;
    stroke: rgba(0, 0, 0, 0.35);
    stroke-width: 3px;
    paint-order: stroke fill;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.route-overlay-nodes {
    pointer-events: none;
}

.route-overlay-nodes circle {
    pointer-events: auto;
    cursor: grab;
    fill: #001a26;
    stroke: #00e0ff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 6px rgba(0, 224, 255, 0.35));
}

.route-overlay-nodes circle:active {
    cursor: grabbing;
}

.route-overlay-labels {
    pointer-events: none;
}

.route-overlay-label {
    font-size: 0.7rem;
    font-weight: 600;
    fill: #d8faff;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.75);
}

.crosshair-layer {
    pointer-events: none;
}

.crosshair-layer .crosshair {
    opacity: 0.85;
}

.routes-module {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.routes-add {
    position: relative;
    display: flex;
    gap: 8px;
    align-items: center;
}

.routes-input {
    flex: 1;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 200, 255, 0.45);
    background: rgba(4, 28, 44, 0.8);
    color: #e8fcff;
    font-size: 0.9rem;
}

.routes-input:focus {
    outline: 2px solid rgba(0, 200, 255, 0.75);
    outline-offset: 1px;
}

.routes-add-button {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 200, 255, 0.5);
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.35), rgba(0, 115, 170, 0.4));
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.routes-add-button:hover,
.routes-add-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 200, 255, 0.25);
}

.routes-add-button:focus-visible {
    outline: 2px solid rgba(0, 200, 255, 0.75);
    outline-offset: 1px;
}

.routes-message {
    min-height: 1.1rem;
    font-size: 0.78rem;
    color: #a2f3ff;
}

.routes-message-error {
    color: #ff8080;
}

.routes-list {
    list-style: none;
    margin: 0;
    padding: 0 2px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #00aaff #333;
}

.routes-list::-webkit-scrollbar {
    width: 12px;
}

.routes-list::-webkit-scrollbar-track {
    background: #333;
}

.routes-list::-webkit-scrollbar-thumb {
    background-color: #00aaff;
    border-radius: 10px;
    border: 3px solid #333;
}

.routes-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.routes-item[draggable="true"] {
    cursor: grab;
}

.routes-item.is-dragging {
    opacity: 0.75;
}

.routes-item.is-dragging .routes-item-main {
    border-style: dashed;
}

.routes-item-handle {
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(160, 220, 255, 0.7);
    font-size: 1rem;
    user-select: none;
    cursor: grab;
}

.routes-item-handle::before {
    content: '⋮⋮';
    letter-spacing: 0.1em;
}


.routes-item-main {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 200, 255, 0.35);
    border-radius: 6px;
    color: #e8fcff;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.15s ease, border 0.15s ease;
}

.routes-item-main:hover,
.routes-item-main:focus {
    background: rgba(0, 200, 255, 0.18);
    border-color: rgba(0, 200, 255, 0.6);
}

.routes-item-name {
    font-weight: 600;
}

.routes-item-distance {
    font-size: 0.78rem;
    opacity: 0.85;
}

.routes-item-distance[data-state="loading"]::after {
    content: '...';
}

.routes-item-distance[data-state="error"] {
    color: #ff9f9f;
}

.routes-item-distance[data-state="ready"] {
    color: #9deaff;
}

.routes-item-remove {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

.routes-item-remove:hover,
.routes-item-remove:focus {
    color: #ff8080;
}

.routes-empty {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
}

.routes-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 200, 255, 0.35);
    border-radius: 6px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.4);
    max-height: 180px;
    overflow-y: auto;
    z-index: 22;
}

.routes-suggestions::-webkit-scrollbar {
    width: 12px;
}

.routes-suggestions::-webkit-scrollbar-track {
    background: #333;
}

.routes-suggestions::-webkit-scrollbar-thumb {
    background-color: #00c8ff;
    border-radius: 10px;
    border: 3px solid #333;
}

.routes-suggestions[hidden] {
    display: none !important;
}

.routes-suggestion {
    padding: 6px 10px;
    font-size: 0.75rem;
    color: #e8fcff;
    border-bottom: 1px solid rgba(0, 200, 255, 0.08);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.routes-suggestion:last-child {
    border-bottom: none;
}

.routes-suggestion.is-active,
.routes-suggestion:hover {
    background: rgba(0, 200, 255, 0.2);
    color: #ffffff;
}

.routes-suggestion-label {
    display: block;
    line-height: 1.25;
}

.routes-suggestion-meta {
    display: block;
    font-size: 0.68rem;
    color: rgba(0, 200, 255, 0.65);
    margin-top: 2px;
    letter-spacing: 0.04em;
}

.routes-suggestion-highlight {
    color: #00e0ff;
}

.map-key-controls {
    position: relative;
    display: flex;
    align-items: center;
}

.map-key-toggle {
    padding: 4px 12px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: #00ff00;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.map-key-toggle:hover,
.map-key-toggle:focus {
    background: rgba(0, 255, 0, 0.15);
    color: #ccffcc;
    transform: translateY(-1px);
}

.map-key-toggle:focus-visible {
    outline: 2px solid rgba(0, 255, 0, 0.85);
    outline-offset: 1px;
}

.map-key-toggle.is-active {
    background: rgba(0, 255, 0, 0.2);
    color: #d8ffd8;
    border-color: rgba(0, 255, 0, 0.75);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.35);
}

.map-key-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
    max-width: clamp(220px, 30vw, 280px);
    padding: 12px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 0, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 18;
}

.map-key-panel[hidden] {
    display: none !important;
}

.map-key-controls.is-open .map-key-panel {
    animation: mapKeyReveal 0.18s ease-out;
}

.map-key-heading {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.85);
    margin: 0;
}

.map-key-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.map-key-section-title {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.65);
    margin: 0;
}

.map-key-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.map-key-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: rgba(204, 255, 204, 0.9);
}

.map-key-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.35);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.25);
    flex-shrink: 0;
}

.map-key-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(210, 255, 210, 0.95);
    text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
}

@keyframes mapKeyReveal {
    0% {
        opacity: 0;
        transform: translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-physics-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(0, 255, 0, 0.85);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    user-select: none;
}

.map-physics-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.map-physics-slider {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 0, 0.35);
    background: rgba(0, 255, 0, 0.14);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.map-physics-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.9);
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.45);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.map-physics-toggle.is-active .map-physics-slider {
    background: rgba(0, 255, 0, 0.34);
    border-color: rgba(0, 255, 0, 0.7);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.25);
}

.map-physics-toggle.is-active .map-physics-slider::after {
    transform: translateX(16px);
    background: #111;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.65);
}

.map-physics-label {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    color: rgba(0, 255, 0, 0.7);
}

.map-physics-status {
    font-size: 0.64rem;
    letter-spacing: 0.24em;
    color: rgba(0, 255, 0, 0.45);
    transition: color 0.2s ease;
}

.map-physics-toggle.is-active .map-physics-status {
    color: #00ff9a;
}

.map-physics-toggle:focus-within .map-physics-slider {
    outline: 2px solid rgba(0, 255, 0, 0.55);
    outline-offset: 2px;
}

.map-search-input {
    background: rgba(0, 0, 0, 0.4);
    color: #c8ffc8;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 4px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.8rem;
}

.map-search-input:focus {
    border-color: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.25);
    outline: none;
}

.map-search-submit {
    background: rgba(0, 255, 0, 0.18);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.55);
    border-radius: 4px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.map-search-submit:hover,
.map-search-submit:focus {
    background: rgba(0, 255, 0, 0.28);
    border-color: rgba(0, 255, 0, 0.9);
}

.map-search-submit:focus-visible {
    outline: 2px solid rgba(0, 255, 0, 0.8);
    outline-offset: 2px;
}

.map-search-suggestions {
    grid-column: 1 / -1;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 0, 0.25);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: inset 0 1px 0 rgba(0, 255, 0, 0.18);
}

.map-search-suggestions::-webkit-scrollbar {
    width: 12px;
}

.map-search-suggestions::-webkit-scrollbar-track {
    background: #333;
}

.map-search-suggestions::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.map-search-suggestions[hidden] {
    display: none !important;
}

.map-search-suggestion {
    padding: 6px 8px;
    font-size: 0.75rem;
    color: #d0ffd0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.08);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.map-search-suggestion:last-child {
    border-bottom: none;
}

.map-search-suggestion.is-active,
.map-search-suggestion:hover {
    background: rgba(0, 255, 0, 0.16);
    color: #00ff9a;
}

.map-search-suggestion-label {
    display: block;
    line-height: 1.25;
}

.map-search-suggestion-meta {
    display: block;
    font-size: 0.68rem;
    color: rgba(0, 255, 0, 0.65);
    margin-top: 2px;
    letter-spacing: 0.04em;
}

.map-search-suggestion-highlight {
    color: #00ff88;
}

.map-search-message {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 0, 0.75);
    min-height: 0.85em;
}

.map-search-message-error {
    color: #ff6b6b;
}

.module-resize-handle {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    border-right: 2px solid rgba(0, 255, 0, 0.6);
    border-bottom: 2px solid rgba(0, 255, 0, 0.6);
    pointer-events: auto;
    cursor: nwse-resize;
    touch-action: none;
}

table {
    border-collapse: collapse;
    width: 100%;
    background-color: #1e1e1e;
    color: #00ff00;
}

.bookmark-remaining {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

th,
td {
    border: 1px solid rgba(0, 255, 0, 0.35);
    padding: 8px;
    text-align: left;
    font-size: 0.85rem;
}

th {
    background-color: rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 2;
}

.highlight {
    background-color: rgba(255, 235, 59, 0.1);
    color: #ffeb3b;
}

.bookmark-missing {
    background-color: rgba(255, 77, 0, 0.2);
    color: #ffb870;
}

.bookmark-stale {
    background-color: rgba(0, 123, 255, 0.16);
    color: #8cd5ff;
}

.bookmark-matched {
    background-color: rgba(0, 255, 0, 0.14);
}

.module-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 3px;
    padding: 4px 8px;
    text-transform: uppercase;
}

.legend-missing {
    border-color: rgba(255, 77, 0, 0.5);
    color: #ffb870;
}

.legend-stale {
    border-color: rgba(0, 123, 255, 0.5);
    color: #8cd5ff;
}

.legend-matched {
    border-color: rgba(0, 255, 0, 0.5);
    color: #00ff00;
}

.system-tag {
    position: absolute;
    padding: 5px;
    background-color: #333;
    border: 1px solid #00ff00;
    border-radius: 3px;
    color: #00ff00;
}

.connection-line {
    position: absolute;
    width: 5px;
    background-color: #00ff00;
}

.selected {
    fill: #ffeb3b;
}

h1 {
    text-align: center;
}

button {
    background-color: #000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px 20px;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover {
    background-color: #00ff00;
    color: #333;
}

button:disabled {
    background-color: #555;
    color: #888;
    border: 1px solid #888;
    cursor: not-allowed;
}

.module-scrollable::-webkit-scrollbar {
    width: 12px;
}

.module-scrollable::-webkit-scrollbar-track {
    background: #333;
}

.module-scrollable::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.label-background {
    fill: #121212;
}

.label-rect {
    fill: #121212;
    stroke: #00ff00;
    stroke-width: 1px;
}

.zoom-rect {
    fill: none;
    pointer-events: all;
}

.center-text {
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: transparent;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
    overflow: hidden;
}

.tutorial-modal-content {
    background-color: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 10px;
    padding: 24px 28px;
    text-align: left;
    max-width: 720px;
    width: clamp(320px, 70vw, 720px);
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.tutorial-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.tutorial-modal-title {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tutorial-modal-close {
    background: none;
    border: none;
    color: rgba(0, 255, 0, 0.75);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.tutorial-modal-close:hover,
.tutorial-modal-close:focus {
    color: #00ff00;
}

.tutorial-modal-body {
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 18px;
    max-height: 60vh;
}

.tutorial-modal-body::-webkit-scrollbar {
    width: 12px;
}

.tutorial-modal-body::-webkit-scrollbar-track {
    background: #333;
}

.tutorial-modal-body::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.tutorial-image {
    border: 2px solid #00ff00;
    border-radius: 4px;
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.tutorial-intro {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 16px;
    color: rgba(0, 255, 0, 0.85);
}

.tutorial-steps {
    margin-left: 0;
    padding-left: 4ch;
    font-size: 0.85rem;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.tutorial-steps li {
    margin-bottom: 10px;
}

.tutorial-modal-footer {
    display: flex;
    justify-content: flex-end;
}

.tutorial-dismiss-button {
    padding: 8px 18px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

video {
    width: 100%;
    height: 100%;
    max-height: 90vh;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.signature-module {
    overflow: hidden;
    gap: 12px;
}

.signature-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.signature-legend {
    gap: 6px;
}

.signature-table-container {
    padding: 0;
}

.signature-message {
    min-height: 18px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 0, 0.8);
}

.signature-message.error {
    color: #ff6b6b;
}

.signature-table-container table {
    width: 100%;
}

.signature-placeholder {
    font-style: italic;
    color: rgba(0, 255, 0, 0.6);
    padding: 8px;
}

.signature-message-error {
    color: #ff6b6b;
}

.signature-table {
    border-collapse: collapse;
}

.signature-table th,
.signature-table td {
    padding: 4px 6px;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(0, 255, 0, 0.1);
}

.signature-table tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.signature-table tbody tr.signature-wormhole:hover {
    background-color: rgba(0, 255, 0, 0.08);
}

.signature-table tbody tr.signature-wormhole {
    box-shadow: inset 3px 0 0 rgba(0, 200, 255, 0.4);
}

.signature-row-jumping {
    position: relative;
}

.signature-row-jumping::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 153, 0.6);
    box-shadow: 0 0 12px rgba(0, 255, 153, 0.45);
    pointer-events: none;
    opacity: 0.5;
    animation: signature-row-pulse 1.2s ease-in-out infinite;
    z-index: 1;
}

@keyframes signature-row-pulse {
    0%, 100% {
        opacity: 0.35;
        box-shadow: 0 0 12px rgba(0, 255, 153, 0.45);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 20px rgba(0, 255, 153, 0.75);
    }
}

.signature-table th:last-child {
    width: 220px;
}

.signature-row-actions {
    display: inline-flex;
    gap: 4px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
}

.signature-actions-cell {
    white-space: nowrap;
    min-width: 220px;
}

.signature-row-actions button {
    padding: 2px 6px;
    font-size: 0.7rem;
    line-height: 1.15;
    flex: 0 0 auto;
}

.signature-wormhole-toggle[data-state="on"] {
    color: rgba(0, 255, 153, 0.9);
    border-color: rgba(0, 255, 153, 0.8);
}

.signature-wormhole-toggle[data-state="off"] {
    color: rgba(0, 200, 255, 0.85);
    border-color: rgba(0, 200, 255, 0.5);
}

.signature-table td.signature-id-cell {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
}

td.bookmark-label-cell {
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
}

.signature-table .bookmark-label-cell.bookmark-label-pending {
    white-space: pre-line;
    color: #b9f6ca;
    font-style: italic;
}

.signature-table tbody tr.signature-override-off {
    box-shadow: inset 3px 0 0 rgba(255, 107, 107, 0.45);
}

.signature-override-button {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signature-override-button[data-state="forceOn"] {
    color: rgba(0, 255, 153, 0.9);
    border-color: rgba(0, 255, 153, 0.8);
}

.signature-override-button[data-state="forceOff"] {
    color: rgba(255, 107, 107, 0.85);
    border-color: rgba(255, 107, 107, 0.8);
}

#wormholeTutorialButton {
    padding: 4px 8px;
    font-size: 0.7rem;
}

.intel-module {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding-bottom: 14px;
}

.intel-nickname-label {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: rgba(0, 255, 0, 0.75);
}

.intel-nickname-input {
    background: transparent;
    color: #c8ffc8;
    border: 1px solid rgba(0, 255, 0, 0.25);
    border-radius: 4px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.85rem;
    box-shadow: inset 0 0 8px rgba(0, 255, 0, 0.05);
    caret-color: #00ff00;
}

.intel-nickname-input:focus {
    border-color: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.2);
    outline: none;
}

.intel-nickname-input::placeholder {
    color: rgba(0, 255, 0, 0.35);
}

.intel-nickname-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.intel-system-link {
    color: #00ff00;
    text-decoration: none;
    border-bottom: 1px dotted rgba(0, 255, 0, 0.35);
    padding-bottom: 1px;
    text-transform: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.intel-system-link:hover,
.intel-system-link:focus {
    color: #8cff8c;
    border-color: rgba(140, 255, 140, 0.85);
    outline: none;
}

.intel-system-link:focus-visible {
    outline: 2px solid rgba(0, 255, 0, 0.7);
    outline-offset: 2px;
}

.intel-textarea {
    display: none;
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    background: transparent;
    color: #c8ffc8;
    border: 1px solid rgba(0, 255, 0, 0.25);
    border-radius: 4px;
    padding: 10px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
    box-shadow: inset 0 0 12px rgba(0, 255, 0, 0.05);
    caret-color: #00ff00;
}

.intel-textarea:focus {
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.25);
    outline: none;
}

.intel-textarea::placeholder {
    color: rgba(0, 255, 0, 0.35);
}

.intel-textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: transparent;
    box-shadow: none;
}

.stats-module {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.stat-card {
    padding: 12px;
    border: 1px solid rgba(0, 255, 0, 0.25);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 70px;
    box-shadow: inset 0 0 12px rgba(0, 255, 0, 0.05);
}

.stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: rgba(0, 255, 0, 0.7);
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #8cff8c;
}

.stats-leaderboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.stats-leaderboard h3 {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: rgba(0, 255, 0, 0.85);
    text-transform: uppercase;
}

.stats-leaderboard-list {
    list-style: decimal;
    margin: 0 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100%;
    overflow-y: auto;
}

.stats-leaderboard-list::-webkit-scrollbar {
    width: 12px;
}

.stats-leaderboard-list::-webkit-scrollbar-track {
    background: #333;
}

.stats-leaderboard-list::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border-radius: 10px;
    border: 3px solid #333;
}

.stats-leaderboard-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.stats-leaderboard-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-leaderboard-count {
    font-variant-numeric: tabular-nums;
    color: #00ff00;
}

.stats-empty {
    font-size: 0.75rem;
    color: rgba(0, 255, 0, 0.6);
}

.module-hint {
    font-size: 0.7rem;
    color: rgba(0, 255, 0, 0.6);
}

.module.module-hidden {
    display: none !important;
}

@media (max-width: 960px) {
    main {
        padding: 0 10px 18px;
    }

    .module-grid {
        height: 100%;
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .module-grid {
        height: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 150px;
    }
}

.callback-body {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background-color: #0e0e0e;
    color: #00ff00;
    padding: 24px;
}

.callback-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.callback-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(0, 255, 0, 0.2);
    border-top-color: rgba(0, 255, 0, 0.9);
    animation: callback-spin 0.9s linear infinite;
}

@keyframes callback-spin {
    to {
        transform: rotate(360deg);
    }
}

.callback-status {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.callback-status.error {
    color: #ff6b6b;
}












