/* Red Horizon // Visual Techtree v9: accordion + draggable maps + selected line highlight */
#view-tech .panel {
    max-width: min(1280px, calc(100vw - 84px)) !important;
    width: 100%;
    padding: 16px !important;
    overflow: visible !important;
}

#view-tech .panel > h2 {
    display: none;
}

.tt-root {
    color: #d9f7ff;
    font-family: 'Rajdhani', 'Orbitron', monospace;
}

.tt-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.5fr);
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(0, 229, 255, 0.22);
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 180, 60, 0.035)),
        rgba(0, 0, 0, 0.55);
    box-shadow: inset 0 0 22px rgba(0, 229, 255, 0.06), 0 0 28px rgba(0, 0, 0, 0.35);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.tt-kicker {
    color: var(--ui-highlight, #ffb43c);
    letter-spacing: 3px;
    font-size: 0.72rem;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
}

.tt-titleblock h2 {
    margin: 4px 0 6px;
    color: var(--ui-color, #00e5ff);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.15rem, 1.7vw, 1.55rem);
    text-shadow: 0 0 14px rgba(0, 229, 255, 0.38);
}

.tt-titleblock p {
    margin: 0;
    color: rgba(217, 247, 255, 0.68);
    line-height: 1.35;
}

.tt-controls {
    display: grid;
    gap: 8px;
}

.tt-filter-row,
.tt-search-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tt-filter,
.tt-search {
    border: 1px solid rgba(0, 229, 255, 0.25);
    background: rgba(0, 14, 18, 0.92);
    color: rgba(217, 247, 255, 0.88);
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 2px;
    font: 600 0.88rem 'Rajdhani', monospace;
    letter-spacing: 0.5px;
    outline: none;
}

.tt-filter {
    cursor: pointer;
    text-transform: uppercase;
}

.tt-filter:hover,
.tt-filter.active,
.tt-search:focus {
    color: #001114;
    background: var(--ui-color, #00e5ff);
    border-color: var(--ui-color, #00e5ff);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.38);
}

.tt-search {
    min-width: min(310px, 100%);
    flex: 1;
    text-transform: none;
}

.tt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 14px;
    align-items: start;
}

.tt-main {
    min-width: 0;
}

.tt-accordion {
    display: grid;
    gap: 10px;
}

.tt-lane-accordion {
    border: 1px solid rgba(0, 229, 255, 0.18);
    background: rgba(0, 5, 7, 0.76);
    box-shadow: inset 0 0 24px rgba(0, 229, 255, 0.025), 0 8px 20px rgba(0, 0, 0, 0.22);
}

.tt-lane-accordion summary {
    min-height: 52px;
    display: grid;
    grid-template-columns: 34px minmax(140px, 1fr) auto minmax(210px, auto);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    background:
        linear-gradient(90deg, rgba(0, 229, 255, 0.09), transparent),
        rgba(0, 0, 0, 0.34);
}

.tt-lane-accordion[open] summary {
    border-bottom-color: rgba(0, 229, 255, 0.16);
}

.tt-lane-accordion summary::marker {
    color: var(--ui-highlight, #ffb43c);
}

.tt-lane-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--ui-highlight, #ffb43c);
    border: 1px solid rgba(255, 180, 60, 0.18);
    background: rgba(255, 180, 60, 0.055);
}

.tt-lane-title {
    color: var(--ui-color, #00e5ff);
    font: 800 0.96rem 'Orbitron', monospace;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.tt-lane-count {
    color: rgba(217, 247, 255, 0.75);
    font-weight: 800;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.tt-lane-stats {
    color: rgba(217, 247, 255, 0.55);
    text-align: right;
    font-size: 0.82rem;
}

.tt-lane-stats b {
    font-family: 'Orbitron', monospace;
    font-weight: 800;
}

.tt-lane-stats .owned { color: #00ffaa; }
.tt-lane-stats .available { color: #ffb43c; }
.tt-lane-stats .locked { color: #ff7474; }

.tt-map-shell {
    position: relative;
    height: min(430px, 54vh);
    overflow: auto;
    border-top: 1px solid rgba(0, 229, 255, 0.08);
    background:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.08), transparent 34%),
        radial-gradient(circle at 80% 10%, rgba(255, 180, 60, 0.07), transparent 32%),
        #03080a;
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
    box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.75);
    scroll-behavior: smooth;
    cursor: grab;
    touch-action: none;
}

.tt-map-shell.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.tt-scroll-hint {
    position: sticky;
    top: 8px;
    left: 8px;
    z-index: 20;
    display: inline-block;
    margin: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    color: rgba(217, 247, 255, 0.62);
    background: rgba(0, 0, 0, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.tt-map {
    position: relative;
    min-width: 100%;
}

.tt-edges {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.tt-edge {
    fill: none;
    stroke-width: 2.1;
    opacity: 0.72;
}

.tt-edge.met {
    stroke: rgba(0, 255, 170, 0.68);
    filter: drop-shadow(0 0 4px rgba(0, 255, 170, 0.22));
}

.tt-edge.missing {
    stroke: rgba(255, 76, 76, 0.42);
    stroke-dasharray: 7 7;
}

.tt-edge.selected {
    opacity: 1;
    stroke-width: 3;
}

.tt-edge-label {
    fill: rgba(217, 247, 255, 0.48);
    font: 700 10px 'Rajdhani', monospace;
    paint-order: stroke;
    stroke: rgba(0, 0, 0, 0.92);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.tt-node {
    position: absolute;
    width: 190px;
    height: 74px;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 9px;
    align-items: center;
    padding: 7px;
    text-align: left;
    background: rgba(0, 10, 13, 0.94);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: #d9f7ff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42), inset 0 0 16px rgba(0, 229, 255, 0.035);
    cursor: pointer;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.tt-node:hover,
.tt-node.selected {
    transform: translateY(-2px);
    border-color: var(--ui-color, #00e5ff);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.24), inset 0 0 18px rgba(0, 229, 255, 0.08);
    z-index: 8;
}

.tt-node.pulse {
    animation: ttPulse 0.9s ease;
}

@keyframes ttPulse {
    0%, 100% { box-shadow: 0 0 22px rgba(0, 229, 255, 0.24), inset 0 0 18px rgba(0, 229, 255, 0.08); }
    45% { box-shadow: 0 0 38px rgba(255, 180, 60, 0.55), inset 0 0 20px rgba(255, 180, 60, 0.16); }
}

.tt-node.owned {
    border-color: rgba(0, 255, 170, 0.52);
}

.tt-node.available {
    border-color: rgba(255, 180, 60, 0.56);
}

.tt-node.locked {
    border-color: rgba(255, 76, 76, 0.34);
    filter: saturate(0.58);
    opacity: 0.82;
}

.tt-node-img {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.82);
    position: relative;
}

.tt-node-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(0, 0, 0, 0.6));
}

.tt-node-img span {
    position: absolute;
    right: 4px;
    bottom: 2px;
    z-index: 2;
    color: var(--ui-highlight, #ffb43c);
    text-shadow: 0 0 8px #000;
}

.tt-node-type {
    color: rgba(255, 180, 60, 0.72);
    font-size: 0.64rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-family: 'Orbitron', monospace;
}

.tt-node-name {
    color: #f5fdff;
    font: 700 0.93rem 'Rajdhani', monospace;
    line-height: 1.03;
    margin: 3px 0;
}

.tt-node-meta {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: rgba(217, 247, 255, 0.62);
}

.tt-node-meta span,
.tt-status-pill {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 5px;
}

.tt-missing {
    color: #ff7474;
}

.tt-map-shell.compact .tt-map {
    transform: scale(0.9);
    transform-origin: top left;
}

.tt-empty-lane {
    min-height: 110px;
    display: grid;
    place-items: center;
    color: rgba(217, 247, 255, 0.58);
    background: rgba(0, 0, 0, 0.22);
}

.tt-detail {
    position: sticky;
    top: 82px;
    max-height: calc(100vh - 98px);
    border: 1px solid rgba(0, 229, 255, 0.18);
    background: rgba(0, 5, 7, 0.9);
    box-shadow: inset 0 0 28px rgba(0, 229, 255, 0.035), 0 12px 28px rgba(0, 0, 0, 0.25);
    overflow: auto;
}

.tt-detail-cover {
    height: 126px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tt-detail-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 5, 7, 1));
}

.tt-detail-body {
    padding: 14px;
}

.tt-detail h3 {
    margin: 3px 0 8px;
    color: var(--ui-color, #00e5ff);
    font: 700 1.22rem 'Orbitron', monospace;
    line-height: 1.16;
}

.tt-detail h4 {
    margin: 15px 0 8px;
    color: rgba(255, 180, 60, 0.9);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.tt-detail p {
    color: rgba(217, 247, 255, 0.72);
    line-height: 1.36;
    white-space: pre-line;
}

.tt-status-pill {
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.72rem;
}

.tt-status-pill.owned { color: #00ffaa; border-color: rgba(0, 255, 170, 0.34); }
.tt-status-pill.available { color: #ffb43c; border-color: rgba(255, 180, 60, 0.34); }
.tt-status-pill.locked { color: #ff7474; border-color: rgba(255, 76, 76, 0.34); }

.tt-detail-grid {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.tt-detail-grid div {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.tt-detail-grid strong {
    display: block;
    color: rgba(255, 180, 60, 0.82);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.tt-detail-grid span {
    color: rgba(217, 247, 255, 0.82);
}

.tt-req-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.tt-req-list li {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 6px;
    align-items: start;
    padding: 0;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(217, 247, 255, 0.78);
}

.tt-req-list li > span {
    padding: 7px 0 0 8px;
}

.tt-req-list button {
    width: 100%;
    min-height: 34px;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: 700 0.85rem 'Rajdhani', monospace;
    text-align: left;
    cursor: pointer;
}

.tt-req-list button:hover {
    color: var(--ui-color, #00e5ff);
}

.tt-req-list em {
    display: block;
    margin-top: 1px;
    font-style: normal;
    font-size: 0.72rem;
    color: rgba(217, 247, 255, 0.46);
}

.tt-req-list li.met { color: #00ffaa; }
.tt-req-list li.missing { color: #ff7474; }
.tt-req-list li.neutral { color: rgba(217, 247, 255, 0.6); }

@media (max-width: 1100px) {
    #view-tech .panel {
        max-width: 100% !important;
        padding: 10px !important;
    }

    .tt-toolbar {
        grid-template-columns: 1fr;
        clip-path: none;
    }

    .tt-filter-row,
    .tt-search-row {
        justify-content: flex-start;
    }

    .tt-layout {
        grid-template-columns: 1fr;
    }

    .tt-detail {
        position: relative;
        top: auto;
        max-height: none;
        order: -1;
    }

    .tt-map-shell {
        height: 58vh;
        touch-action: none;
    }

    .tt-lane-accordion summary {
        grid-template-columns: 30px minmax(0, 1fr) auto;
    }

    .tt-lane-stats {
        grid-column: 2 / -1;
        text-align: left;
    }
}

/* v3 Fix: Detailpanel darf den Tree nicht überdecken und Akkordion bleibt manuell steuerbar. */
.tt-accordion-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 24vw, 380px) !important;
    gap: 16px !important;
    align-items: start !important;
    position: relative !important;
}

.tt-accordion-layout .tt-main {
    min-width: 0 !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.tt-accordion-layout .tt-detail {
    grid-column: 2 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 76px !important;
    align-self: start !important;
    z-index: 2 !important;
}

.tt-lane-accordion:not([open]) > .tt-map-shell,
.tt-lane-accordion:not([open]) > .tt-empty-lane {
    display: none !important;
}

@media (max-width: 980px) {
    .tt-accordion-layout {
        grid-template-columns: 1fr !important;
    }

    .tt-accordion-layout .tt-main {
        order: 1 !important;
    }

    .tt-accordion-layout .tt-detail {
        grid-column: 1 !important;
        order: 2 !important;
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        z-index: 1 !important;
    }
}


/* v4 Hard-Fix: Detailpanel als echte, reservierte Spalte. Kein Overlay mehr. */
#view-tech .panel {
    overflow: visible !important;
}

.tt-layout-v4,
.tt-accordion-layout.tt-layout-v4 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v4 .tt-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: calc(100% - 398px) !important;
    position: relative !important;
    z-index: 1 !important;
}

.tt-layout-v4 .tt-detail {
    flex: 0 0 380px !important;
    width: 380px !important;
    min-width: 340px !important;
    max-width: 380px !important;
    box-sizing: border-box !important;
    grid-column: auto !important;
    order: 2 !important;
    position: sticky !important;
    top: 78px !important;
    align-self: flex-start !important;
    z-index: 1 !important;
    transform: none !important;
    margin: 0 !important;
}

.tt-map-shell,
.tt-map,
.tt-accordion {
    max-width: 100% !important;
}

.tt-node {
    touch-action: manipulation;
}

@media (max-width: 1180px) {
    .tt-layout-v4,
    .tt-accordion-layout.tt-layout-v4 {
        flex-direction: column !important;
    }

    .tt-layout-v4 .tt-main {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .tt-layout-v4 .tt-detail {
        order: 2 !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}

/* v5 Fix: linksbündige Akkordions, harte Spalten und kein Unterlaufen des Detailpanels. */
#view-tech,
#view-tech .panel,
#view-tech .tt-root {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

#view-tech .panel {
    width: 100% !important;
    overflow: visible !important;
}

.tt-layout-v5,
.tt-accordion-layout.tt-layout-v5 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(340px, 25vw, 390px) !important;
    gap: 18px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v5 .tt-main {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important;
    contain: inline-size !important;
}

.tt-layout-v5 .tt-detail {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 78px !important;
    align-self: start !important;
    z-index: 2 !important;
    transform: none !important;
    margin: 0 !important;
}

.tt-accordion,
.tt-lane-accordion,
.tt-lane-accordion summary,
.tt-map-shell {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.tt-accordion {
    justify-items: stretch !important;
    align-items: stretch !important;
    overflow: hidden !important;
}

.tt-lane-accordion {
    display: block !important;
    overflow: hidden !important;
    justify-self: stretch !important;
    contain: inline-size !important;
}

.tt-lane-accordion summary {
    justify-content: stretch !important;
    justify-items: start !important;
    text-align: left !important;
    overflow: hidden !important;
    grid-template-columns: 34px minmax(0, 1fr) auto minmax(0, 210px) !important;
}

.tt-lane-title,
.tt-lane-stats,
.tt-lane-count {
    min-width: 0 !important;
}

.tt-lane-title,
.tt-lane-stats {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.tt-map-shell {
    display: block !important;
    overflow: auto !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    contain: layout paint !important;
}

.tt-map {
    position: relative !important;
    display: block !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform-origin: top left !important;
}

.tt-map-shell.compact .tt-map {
    transform-origin: top left !important;
}

.tt-node {
    box-sizing: border-box !important;
}

@media (max-width: 1180px) {
    .tt-layout-v5,
    .tt-accordion-layout.tt-layout-v5 {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .tt-layout-v5 .tt-main {
        grid-column: 1 !important;
        order: 1 !important;
        overflow: visible !important;
        contain: none !important;
    }

    .tt-layout-v5 .tt-detail {
        grid-column: 1 !important;
        order: 2 !important;
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}

@media (max-width: 760px) {
    .tt-lane-accordion summary {
        grid-template-columns: 30px minmax(0, 1fr) auto !important;
    }

    .tt-lane-stats {
        grid-column: 2 / -1 !important;
        text-align: left !important;
        white-space: normal !important;
    }
}

/* v6 Stabilitäts-Fix: linksbündig, keine Breiten-Ausbrüche, kein Tick-Reset. */
.tt-layout-v6,
.tt-accordion-layout.tt-layout-v6 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v6 .tt-main {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important;
    contain: inline-size !important;
}

.tt-layout-v6 .tt-detail-slot {
    flex: 0 0 clamp(340px, 25vw, 390px) !important;
    width: clamp(340px, 25vw, 390px) !important;
    min-width: 340px !important;
    max-width: 390px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
}

.tt-layout-v6 .tt-detail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 78px !important;
    z-index: 2 !important;
    margin: 0 !important;
    transform: none !important;
}

.tt-layout-v6 .tt-accordion,
.tt-layout-v6 .tt-lane-accordion,
.tt-layout-v6 .tt-map-shell {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}

.tt-layout-v6 .tt-accordion {
    display: block !important;
    overflow: hidden !important;
    text-align: left !important;
}

.tt-layout-v6 .tt-lane-accordion {
    display: block !important;
    overflow: hidden !important;
    contain: inline-size !important;
    margin-bottom: 10px !important;
}

.tt-layout-v6 .tt-lane-accordion summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-items: start !important;
    justify-content: start !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.tt-layout-v6 .tt-map-shell {
    overflow: auto !important;
    contain: layout paint !important;
    left: 0 !important;
    right: auto !important;
    padding: 0 !important;
}

.tt-layout-v6 .tt-map {
    position: relative !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform-origin: top left !important;
    max-width: none !important;
    min-width: 0 !important;
}

.tt-layout-v6 .tt-scroll-hint {
    left: 8px !important;
    right: auto !important;
}

@media (max-width: 1180px) {
    .tt-layout-v6,
    .tt-accordion-layout.tt-layout-v6 {
        flex-direction: column !important;
        overflow: visible !important;
    }

    .tt-layout-v6 .tt-main {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        contain: none !important;
        overflow: visible !important;
    }

    .tt-layout-v6 .tt-detail-slot {
        order: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .tt-layout-v6 .tt-detail {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}

/* v7 Logik-Sortierung: echte lokale Ketten pro Reiter, externe Requirements nur als Marker. */
.tt-layout-v7,
.tt-accordion-layout.tt-layout-v7 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v7 .tt-main {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important;
    contain: inline-size !important;
}

.tt-layout-v7 .tt-detail-slot {
    flex: 0 0 clamp(340px, 25vw, 390px) !important;
    width: clamp(340px, 25vw, 390px) !important;
    min-width: 340px !important;
    max-width: 390px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
}

.tt-layout-v7 .tt-detail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 78px !important;
    z-index: 2 !important;
    margin: 0 !important;
    transform: none !important;
}

.tt-layout-v7 .tt-accordion,
.tt-layout-v7 .tt-lane-accordion,
.tt-layout-v7 .tt-map-shell {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}

.tt-layout-v7 .tt-accordion {
    display: block !important;
    overflow: hidden !important;
    text-align: left !important;
}

.tt-layout-v7 .tt-lane-accordion {
    display: block !important;
    overflow: hidden !important;
    contain: inline-size !important;
    margin-bottom: 10px !important;
}

.tt-layout-v7 .tt-lane-accordion summary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-items: start !important;
    justify-content: start !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.tt-layout-v7 .tt-map-shell {
    overflow: auto !important;
    contain: layout paint !important;
    left: 0 !important;
    right: auto !important;
    padding: 0 !important;
}

.tt-layout-v7 .tt-map {
    position: relative !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform-origin: top left !important;
    max-width: none !important;
    min-width: 0 !important;
}

.tt-layout-v7 .tt-scroll-hint {
    left: 8px !important;
    right: auto !important;
}

.tt-root-badge { color: #8eeeff; }
.tt-met-badge { color: #00ffaa; }
.tt-external-badge {
    color: #ffb43c;
    border-color: rgba(255, 180, 60, 0.22) !important;
    background: rgba(255, 180, 60, 0.07) !important;
}

@media (max-width: 1180px) {
    .tt-layout-v7,
    .tt-accordion-layout.tt-layout-v7 {
        flex-direction: column !important;
        overflow: visible !important;
    }

    .tt-layout-v7 .tt-main {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        contain: none !important;
        overflow: visible !important;
    }

    .tt-layout-v7 .tt-detail-slot {
        order: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .tt-layout-v7 .tt-detail {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}


/* v8 Abstand + Auswahl-Hervorhebung: Karten überlagern sich weniger und Auswahl ist klar sichtbar. */
.tt-layout-v8,
.tt-accordion-layout.tt-layout-v8,
.tt-layout-v7,
.tt-accordion-layout.tt-layout-v7 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v8 .tt-main,
.tt-layout-v7 .tt-main {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important;
    contain: inline-size !important;
}

.tt-layout-v8 .tt-detail-slot,
.tt-layout-v7 .tt-detail-slot {
    flex: 0 0 clamp(350px, 25vw, 400px) !important;
    width: clamp(350px, 25vw, 400px) !important;
    min-width: 350px !important;
    max-width: 400px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 2 !important;
}

.tt-layout-v8 .tt-map-shell,
.tt-layout-v7 .tt-map-shell {
    height: min(520px, 62vh) !important;
    overflow: auto !important;
    contain: layout paint !important;
    padding: 0 !important;
    scroll-padding: 64px 64px !important;
}

.tt-layout-v8 .tt-map,
.tt-layout-v7 .tt-map {
    position: relative !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform-origin: top left !important;
    max-width: none !important;
    min-width: 0 !important;
}

.tt-layout-v8 .tt-edges,
.tt-layout-v7 .tt-edges {
    z-index: 1 !important;
}

.tt-layout-v8 .tt-edge,
.tt-layout-v7 .tt-edge {
    stroke-width: 1.7 !important;
    opacity: 0.52 !important;
}

.tt-layout-v8 .tt-edge.selected,
.tt-layout-v7 .tt-edge.selected {
    opacity: 0.92 !important;
    stroke-width: 2.6 !important;
    filter: drop-shadow(0 0 5px rgba(255, 180, 60, 0.35));
}

.tt-layout-v8 .tt-edge-label,
.tt-layout-v7 .tt-edge-label {
    font-size: 9px !important;
    opacity: 0.7 !important;
}

.tt-layout-v8 .tt-node,
.tt-layout-v7 .tt-node {
    width: 214px !important;
    height: 86px !important;
    grid-template-columns: 60px 1fr !important;
    gap: 11px !important;
    padding: 9px !important;
    z-index: 5 !important;
    overflow: visible !important;
}

.tt-layout-v8 .tt-node-img,
.tt-layout-v7 .tt-node-img {
    width: 56px !important;
    height: 56px !important;
}

.tt-layout-v8 .tt-node-name,
.tt-layout-v7 .tt-node-name {
    font-size: 0.98rem !important;
    line-height: 1.05 !important;
}

.tt-layout-v8 .tt-node-meta,
.tt-layout-v7 .tt-node-meta {
    gap: 6px !important;
}

.tt-layout-v8 .tt-node:hover,
.tt-layout-v7 .tt-node:hover {
    z-index: 20 !important;
}

.tt-layout-v8 .tt-node.selected,
.tt-layout-v7 .tt-node.selected {
    z-index: 35 !important;
    transform: translateY(-3px) scale(1.025) !important;
    border-color: var(--ui-highlight, #ffb43c) !important;
    background:
        linear-gradient(135deg, rgba(255, 180, 60, 0.22), rgba(0, 229, 255, 0.10)),
        rgba(4, 18, 20, 0.98) !important;
    box-shadow:
        0 0 0 2px rgba(255, 180, 60, 0.72),
        0 0 28px rgba(255, 180, 60, 0.42),
        0 0 42px rgba(0, 229, 255, 0.18),
        inset 0 0 22px rgba(255, 180, 60, 0.12) !important;
}

.tt-layout-v8 .tt-node.selected::before,
.tt-layout-v7 .tt-node.selected::before {
    content: 'AUSGEWÄHLT';
    position: absolute;
    top: -22px;
    left: 0;
    z-index: 3;
    padding: 3px 8px;
    color: #050505;
    background: var(--ui-highlight, #ffb43c);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font: 900 0.62rem 'Orbitron', monospace;
    letter-spacing: 1.2px;
    box-shadow: 0 0 14px rgba(255, 180, 60, 0.35);
}

.tt-layout-v8 .tt-node.selected .tt-node-name,
.tt-layout-v7 .tt-node.selected .tt-node-name {
    color: #fff6d8 !important;
    text-shadow: 0 0 10px rgba(255, 180, 60, 0.42) !important;
}

.tt-layout-v8 .tt-node.selected .tt-node-img,
.tt-layout-v7 .tt-node.selected .tt-node-img {
    border-color: rgba(255, 180, 60, 0.72) !important;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.72),
        0 0 16px rgba(255, 180, 60, 0.25) !important;
}

.tt-layout-v8 .tt-detail,
.tt-layout-v7 .tt-detail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 78px !important;
    z-index: 2 !important;
    margin: 0 !important;
    transform: none !important;
}

.tt-layout-v8 .tt-detail.owned,
.tt-layout-v7 .tt-detail.owned { border-color: rgba(0, 255, 170, 0.34) !important; }
.tt-layout-v8 .tt-detail.available,
.tt-layout-v7 .tt-detail.available { border-color: rgba(255, 180, 60, 0.42) !important; }
.tt-layout-v8 .tt-detail.locked,
.tt-layout-v7 .tt-detail.locked { border-color: rgba(255, 76, 76, 0.34) !important; }

@media (max-width: 1180px) {
    .tt-layout-v8,
    .tt-accordion-layout.tt-layout-v8,
    .tt-layout-v7,
    .tt-accordion-layout.tt-layout-v7 {
        flex-direction: column !important;
        overflow: visible !important;
    }

    .tt-layout-v8 .tt-main,
    .tt-layout-v7 .tt-main {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        contain: none !important;
        overflow: visible !important;
    }

    .tt-layout-v8 .tt-detail-slot,
    .tt-layout-v7 .tt-detail-slot {
        order: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .tt-layout-v8 .tt-detail,
    .tt-layout-v7 .tt-detail {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}


/* v9 Auswahl-Linien: eingehende Voraussetzungen und ausgehende Freischaltungen leuchten unterschiedlich. */
.tt-layout-v9 .tt-edge.selected {
    opacity: 1 !important;
    stroke-width: 3.8 !important;
    stroke-dasharray: none !important;
    paint-order: stroke;
}

.tt-layout-v9 .tt-edge.selected.incoming {
    stroke: rgba(0, 229, 255, 0.98) !important;
    filter:
        drop-shadow(0 0 4px rgba(0, 229, 255, 0.75))
        drop-shadow(0 0 12px rgba(0, 229, 255, 0.35)) !important;
}

.tt-layout-v9 .tt-edge.selected.outgoing {
    stroke: rgba(255, 190, 70, 0.98) !important;
    filter:
        drop-shadow(0 0 4px rgba(255, 190, 70, 0.75))
        drop-shadow(0 0 12px rgba(255, 160, 40, 0.35)) !important;
}

.tt-layout-v9 .tt-edge-label.selected {
    opacity: 1 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    stroke-width: 4px !important;
}

.tt-layout-v9 .tt-edge-label.selected.incoming {
    fill: rgba(155, 245, 255, 1) !important;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.55));
}

.tt-layout-v9 .tt-edge-label.selected.outgoing {
    fill: rgba(255, 218, 120, 1) !important;
    filter: drop-shadow(0 0 6px rgba(255, 190, 70, 0.55));
}

.tt-layout-v9 .tt-node.selected {
    z-index: 7 !important;
}


/* v10 Masterplan: 5 Kernkategorien + Querverweis-Sprungbuttons */
.tt-edge-portal {
    fill: none;
    stroke: rgba(255, 180, 60, 0.68);
    stroke-width: 2.2;
    stroke-dasharray: 9 6;
    opacity: 0.92;
    filter: drop-shadow(0 0 5px rgba(255, 180, 60, 0.18));
}

.tt-external-jump {
    position: absolute;
    width: 164px;
    min-height: 30px;
    display: grid;
    gap: 1px;
    align-content: center;
    padding: 5px 8px;
    border: 1px solid rgba(255, 180, 60, 0.34);
    background: linear-gradient(180deg, rgba(255, 180, 60, 0.12), rgba(0, 12, 16, 0.96));
    color: #ecfbff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36), inset 0 0 18px rgba(255, 180, 60, 0.05);
    z-index: 5;
}

.tt-external-jump:hover,
.tt-external-jump.selected {
    transform: translateY(-1px);
    border-color: var(--ui-color, #00e5ff);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.22), inset 0 0 16px rgba(0, 229, 255, 0.08);
}

.tt-external-jump.incoming {
    clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%);
}

.tt-external-jump.outgoing {
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
}

.tt-portal-lane {
    color: var(--ui-highlight, #ffb43c);
    font: 800 0.61rem 'Orbitron', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.95;
}

.tt-portal-name {
    color: #f5fdff;
    font: 700 0.82rem 'Rajdhani', monospace;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt-portal-level {
    color: rgba(217, 247, 255, 0.68);
    font: 700 0.67rem 'Rajdhani', monospace;
}

.tt-root-badge,
.tt-external-badge,
.tt-met-badge {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 5px;
}

.tt-external-badge {
    color: #ffb43c;
}

.tt-met-badge {
    color: #00ffaa;
}

.tt-layout-v9 .tt-edge-portal.selected.incoming {
    stroke: rgba(0, 255, 170, 0.95);
}

.tt-layout-v9 .tt-edge-portal.selected.outgoing {
    stroke: rgba(0, 229, 255, 0.95);
}

@media (max-width: 760px) {
    .tt-external-jump {
        width: 150px;
    }
}

/* v11 Fix: Querverweise liegen in einer eigenen Schiene und überdecken keine Knoten mehr. */
.tt-map {
    isolation: isolate;
}

.tt-node {
    z-index: 6;
}

.tt-external-jump {
    z-index: 4;
}

.tt-external-jump:hover,
.tt-external-jump.selected {
    z-index: 9;
}

.tt-edge-portal {
    opacity: 0.76;
}

.tt-map-shell.compact .tt-external-jump {
    transform-origin: top left;
}

/* v12 Fix: Querverweise sind jetzt kontextuell statt permanent. */
.tt-external-jump {
    max-width: 164px;
}

.tt-external-jump:not(.selected):not(:hover) {
    opacity: 0.94;
}

.tt-node .tt-external-badge {
    white-space: nowrap;
}

/* v13 Gateway-Fix: ein Sammelbutton pro Zielkategorie statt Button-Flut. */
.tt-external-jump.tt-category-gateway {
    width: 218px !important;
    max-width: 218px !important;
    min-height: 46px !important;
    padding: 8px 12px !important;
    gap: 3px !important;
    border-color: rgba(255, 180, 60, 0.46) !important;
    background:
        linear-gradient(90deg, rgba(255, 180, 60, 0.18), rgba(0, 229, 255, 0.045)),
        rgba(0, 12, 16, 0.98) !important;
}

.tt-external-jump.tt-category-gateway .tt-portal-lane {
    font-size: 0.66rem !important;
    line-height: 1.05 !important;
}

.tt-external-jump.tt-category-gateway .tt-portal-name {
    color: rgba(217, 247, 255, 0.92) !important;
    font-size: 0.92rem !important;
    line-height: 1.08 !important;
}

.tt-external-jump.tt-category-gateway .tt-portal-level {
    font-size: 0.72rem !important;
}

.tt-edge-portal {
    stroke-width: 2.6 !important;
    stroke-dasharray: 10 7 !important;
}

@media (max-width: 760px) {
    .tt-external-jump.tt-category-gateway {
        width: 190px !important;
        max-width: 190px !important;
    }
}

/* Visual Techtree v12: Orientierung + stabile Suche */
.tt-search-count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 180, 60, 0.22);
    background: rgba(255, 180, 60, 0.08);
    color: rgba(255, 220, 155, 0.9);
    font: 800 0.82rem 'Rajdhani', monospace;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.tt-advisor {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.055), rgba(255, 180, 60, 0.03)),
        rgba(0, 6, 9, 0.78);
    box-shadow: inset 0 0 22px rgba(0, 229, 255, 0.035), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.tt-advisor-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}

.tt-advisor-head strong {
    display: block;
    margin-top: 3px;
    color: var(--ui-color, #00e5ff);
    font: 800 1rem 'Orbitron', monospace;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.tt-advisor-note {
    color: rgba(217, 247, 255, 0.52);
    font-size: 0.78rem;
    white-space: nowrap;
}

.tt-advisor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tt-advisor section {
    min-width: 0;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(0, 0, 0, 0.23);
}

.tt-advisor h3 {
    margin: 0 0 8px;
    color: rgba(255, 180, 60, 0.9);
    font: 800 0.78rem 'Orbitron', monospace;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tt-advisor-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tt-advisor-pill {
    display: grid;
    gap: 1px;
    max-width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    background: rgba(0, 14, 18, 0.84);
    color: rgba(217, 247, 255, 0.88);
    text-align: left;
    cursor: pointer;
    font-family: 'Rajdhani', monospace;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.tt-advisor-pill:hover {
    color: #001114;
    background: var(--ui-color, #00e5ff);
    border-color: var(--ui-color, #00e5ff);
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}

.tt-advisor-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.tt-advisor-pill em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(217, 247, 255, 0.55);
    font-style: normal;
    font-size: 0.72rem;
}

.tt-advisor-pill:hover em {
    color: rgba(0, 17, 20, 0.72);
}

.tt-advisor-pill.available {
    border-color: rgba(255, 180, 60, 0.42);
}

.tt-advisor-pill.locked {
    border-color: rgba(255, 76, 76, 0.28);
}

.tt-advisor-empty {
    color: rgba(217, 247, 255, 0.48);
    font-size: 0.82rem;
}

@media (max-width: 1100px) {
    .tt-advisor-grid {
        grid-template-columns: 1fr;
    }

    .tt-advisor-head {
        align-items: start;
        flex-direction: column;
    }

    .tt-advisor-note {
        white-space: normal;
    }
}

/* v14 Techtree-Landkarte: Kategorie-Tabs, Tier-Spalten, Pfad-Fokus. */
#view-tech .panel {
    max-width: min(1480px, calc(100vw - 64px)) !important;
}

.tt-toolbar-map {
    grid-template-columns: minmax(320px, 0.95fr) minmax(520px, 1.55fr) !important;
}

.tt-map-layout,
.tt-layout-v14 {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    isolation: isolate !important;
}

.tt-layout-v14 .tt-main {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    contain: inline-size !important;
}

.tt-layout-v14 .tt-detail-slot {
    flex: 0 0 clamp(360px, 25vw, 420px) !important;
    width: clamp(360px, 25vw, 420px) !important;
    min-width: 360px !important;
    max-width: 420px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 3 !important;
}

.tt-layout-v14 .tt-detail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    position: sticky !important;
    top: 78px !important;
    z-index: 3 !important;
}

.tt-techmap {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.tt-lane-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.tt-lane-tab {
    min-width: 0;
    min-height: 72px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.055), rgba(255, 180, 60, 0.025)),
        rgba(0, 7, 10, 0.82);
    color: rgba(217, 247, 255, 0.78);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease, background 0.14s ease;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.tt-lane-tab:hover,
.tt-lane-tab.active {
    transform: translateY(-1px);
    border-color: var(--ui-color, #00e5ff);
    background:
        linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(255, 180, 60, 0.055)),
        rgba(0, 15, 19, 0.96);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.18), inset 0 0 18px rgba(0, 229, 255, 0.05);
}

.tt-lane-tab.active {
    border-color: var(--ui-highlight, #ffb43c);
    box-shadow: 0 0 0 1px rgba(255, 180, 60, 0.42), 0 0 22px rgba(255, 180, 60, 0.18);
}

.tt-lane-tab-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--ui-highlight, #ffb43c);
    border: 1px solid rgba(255, 180, 60, 0.2);
    background: rgba(255, 180, 60, 0.06);
    font-size: 1rem;
}

.tt-lane-tab-main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.tt-lane-tab-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f6fdff;
    font: 900 0.78rem 'Orbitron', monospace;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.tt-lane-tab-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(217, 247, 255, 0.56);
    font-style: normal;
    font-size: 0.76rem;
}

.tt-category-card {
    border: 1px solid rgba(0, 229, 255, 0.18);
    background: rgba(0, 5, 7, 0.72);
    box-shadow: inset 0 0 28px rgba(0, 229, 255, 0.025), 0 8px 22px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.tt-category-head {
    min-height: 68px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
    background:
        linear-gradient(90deg, rgba(0, 229, 255, 0.10), transparent),
        rgba(0, 0, 0, 0.36);
}

.tt-category-head h3 {
    margin: 3px 0 0;
    color: var(--ui-color, #00e5ff);
    font: 900 1.05rem 'Orbitron', monospace;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.tt-category-stats {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.tt-category-stats span {
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: rgba(217, 247, 255, 0.62);
    font-size: 0.78rem;
    white-space: nowrap;
}

.tt-category-stats b {
    color: var(--ui-highlight, #ffb43c);
    font-family: 'Orbitron', monospace;
}

.tt-layout-v14 .tt-map-shell {
    height: min(620px, 68vh) !important;
    border-top: 0 !important;
    overflow: auto !important;
    contain: layout paint !important;
    scroll-padding: 78px 78px !important;
}

.tt-layout-v14 .tt-map {
    position: relative !important;
    display: block !important;
    max-width: none !important;
    min-width: 0 !important;
    transform-origin: top left !important;
    isolation: isolate !important;
}

.tt-tier-ruler {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    z-index: 2;
    pointer-events: none;
}

.tt-tier-marker {
    position: absolute;
    top: 10px;
    height: calc(100% - 10px);
    border-left: 1px solid rgba(0, 229, 255, 0.20);
    color: rgba(217, 247, 255, 0.5);
    font: 900 0.68rem 'Orbitron', monospace;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.tt-tier-marker::after {
    content: '';
    position: absolute;
    left: 0;
    top: 34px;
    width: 1px;
    height: 560px;
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.16), rgba(0, 229, 255, 0.02));
}

.tt-tier-marker span {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(0, 229, 255, 0.12);
}

.tt-layout-v14 .tt-edges {
    z-index: 1 !important;
}

.tt-layout-v14 .tt-node {
    width: 214px !important;
    height: 86px !important;
    grid-template-columns: 60px 1fr !important;
    gap: 11px !important;
    padding: 9px !important;
    z-index: 6 !important;
}

.tt-layout-v14 .tt-node-img {
    width: 56px !important;
    height: 56px !important;
}

.tt-layout-v14 .tt-node.focus-dim {
    opacity: 0.34 !important;
    filter: saturate(0.45) brightness(0.68) !important;
}

.tt-layout-v14 .tt-node.focus-in {
    border-color: rgba(0, 229, 255, 0.76) !important;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.20), inset 0 0 16px rgba(0, 229, 255, 0.06) !important;
}

.tt-layout-v14 .tt-node.focus-out {
    border-color: rgba(255, 190, 70, 0.74) !important;
    box-shadow: 0 0 18px rgba(255, 190, 70, 0.18), inset 0 0 16px rgba(255, 190, 70, 0.05) !important;
}

.tt-layout-v14 .tt-node.focus-active,
.tt-layout-v14 .tt-node.selected {
    z-index: 35 !important;
    transform: translateY(-3px) scale(1.025) !important;
    border-color: var(--ui-highlight, #ffb43c) !important;
    background:
        linear-gradient(135deg, rgba(255, 180, 60, 0.22), rgba(0, 229, 255, 0.10)),
        rgba(4, 18, 20, 0.98) !important;
    box-shadow:
        0 0 0 2px rgba(255, 180, 60, 0.72),
        0 0 28px rgba(255, 180, 60, 0.42),
        0 0 42px rgba(0, 229, 255, 0.18),
        inset 0 0 22px rgba(255, 180, 60, 0.12) !important;
}

.tt-layout-v14 .tt-node.selected::before {
    content: 'FOKUS';
    position: absolute;
    top: -22px;
    left: 0;
    z-index: 3;
    padding: 3px 8px;
    color: #050505;
    background: var(--ui-highlight, #ffb43c);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font: 900 0.62rem 'Orbitron', monospace;
    letter-spacing: 1.2px;
    box-shadow: 0 0 14px rgba(255, 180, 60, 0.35);
}

.tt-layout-v14 .tt-edge {
    stroke-width: 1.7 !important;
    opacity: 0.46 !important;
}

.tt-layout-v14 .tt-edge.focus-dim {
    opacity: 0.10 !important;
}

.tt-layout-v14 .tt-edge-label.focus-dim {
    opacity: 0 !important;
}

.tt-layout-v14 .tt-edge.selected,
.tt-layout-v14 .tt-edge.focus-in,
.tt-layout-v14 .tt-edge.focus-out {
    opacity: 1 !important;
    stroke-width: 3.7 !important;
    stroke-dasharray: none !important;
    paint-order: stroke;
}

.tt-layout-v14 .tt-edge.selected.incoming,
.tt-layout-v14 .tt-edge.focus-in {
    stroke: rgba(0, 229, 255, 0.98) !important;
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.75)) drop-shadow(0 0 13px rgba(0, 229, 255, 0.32)) !important;
}

.tt-layout-v14 .tt-edge.selected.outgoing,
.tt-layout-v14 .tt-edge.focus-out {
    stroke: rgba(255, 190, 70, 0.98) !important;
    filter: drop-shadow(0 0 5px rgba(255, 190, 70, 0.75)) drop-shadow(0 0 13px rgba(255, 160, 40, 0.32)) !important;
}

.tt-layout-v14 .tt-edge-label.selected,
.tt-layout-v14 .tt-edge-label.focus-in,
.tt-layout-v14 .tt-edge-label.focus-out {
    opacity: 1 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    stroke-width: 4px !important;
}

.tt-layout-v14 .tt-edge-label.focus-in,
.tt-layout-v14 .tt-edge-label.selected.incoming {
    fill: rgba(155, 245, 255, 1) !important;
}

.tt-layout-v14 .tt-edge-label.focus-out,
.tt-layout-v14 .tt-edge-label.selected.outgoing {
    fill: rgba(255, 218, 120, 1) !important;
}

.tt-map-empty {
    min-height: 320px !important;
}

@media (max-width: 1280px) {
    .tt-lane-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tt-toolbar-map {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1180px) {
    .tt-map-layout,
    .tt-layout-v14 {
        flex-direction: column !important;
        overflow: visible !important;
    }

    .tt-layout-v14 .tt-main {
        width: 100% !important;
        contain: none !important;
        overflow: visible !important;
    }

    .tt-layout-v14 .tt-detail-slot {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }

    .tt-layout-v14 .tt-detail {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}

@media (max-width: 760px) {
    .tt-lane-tabs {
        grid-template-columns: 1fr;
    }

    .tt-category-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .tt-category-stats {
        justify-content: flex-start;
    }
}
