/* EVE return route - centered fullscreen layout */
#game-container.exploration-return-mode #background-layer {
    opacity: 0 !important;
    background-image: none !important;
    background-color: #06131d !important;
    filter: none !important;
}

#game-container.exploration-return-mode #character-layer,
#game-container.exploration-return-mode #character-sprite {
    display: none !important;
}

#choice-container.eve-return-panel {
    position: absolute !important;
    top: 138px !important;
    right: 18px !important;
    bottom: 14px !important;
    left: 18px !important;
    z-index: 12 !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    pointer-events: auto !important;
}

.eve-return-shell {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 26px 30px 22px;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    color: #e8f5fa;
    background:
        radial-gradient(circle at 50% 42%, rgba(29, 114, 149, .15), transparent 35%),
        linear-gradient(180deg, #071925 0%, #041019 100%);
    border: 1px solid rgba(98, 184, 214, .28);
    border-radius: 20px;
}

.eve-return-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(94, 171, 198, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(94, 171, 198, .035) 1px, transparent 1px);
    background-size: 56px 56px;
}

.eve-return-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(104, 190, 220, .16);
}

.eve-return-kicker {
    color: rgba(112, 210, 237, .78);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .22em;
}

.eve-return-header h2 {
    margin: 5px 0 0;
    font-size: clamp(44px, 4vw, 58px);
    line-height: .95;
}

.eve-return-header p {
    margin: 10px 0 0;
    color: rgba(187, 216, 227, .66);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .08em;
}

.eve-return-link-status {
    min-width: 230px;
    padding: 14px 18px;
    border: 1px solid rgba(102, 203, 231, .22);
    border-radius: 11px;
    background: rgba(6, 22, 32, .78);
    text-align: right;
}

.eve-return-link-status span,
.eve-return-link-status small {
    display: block;
    color: rgba(157, 194, 208, .68);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}

.eve-return-link-status strong {
    display: block;
    margin: 4px 0 5px;
    color: #9ff2e3;
    font-size: 15px;
    letter-spacing: .12em;
}

.eve-return-route-notice,
.eve-return-secured-note {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: 80%;
    margin: 12px auto 0;
    padding: 8px 15px;
    border: 1px solid rgba(119, 194, 221, .18);
    border-radius: 999px;
    background: rgba(7, 22, 32, .76);
    color: rgba(211, 233, 240, .8);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.eve-return-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    min-height: 0;
    margin: 18px 0;
    padding: 34px 40px 28px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(93, 180, 210, .12);
    border-radius: 18px;
    background: rgba(3, 14, 23, .58);
}

.eve-return-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .25;
    background-image:
        linear-gradient(rgba(104, 185, 214, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 185, 214, .08) 1px, transparent 1px);
    background-size: 48px 48px;
}

.eve-return-route {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 260px;
    align-items: center;
    justify-content: center;
}

.eve-return-node,
.eve-return-endpoint {
    position: relative;
    display: flex;
    width: 148px;
    height: 188px;
    flex: 0 0 148px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.eve-return-node-core,
.eve-return-endpoint-icon {
    position: relative;
    display: grid;
    width: 118px;
    height: 118px;
    place-items: center;
    border: 1px solid rgba(104, 188, 220, .4);
    background: linear-gradient(145deg, #123545, #06151f);
    clip-path: polygon(25% 7%, 75% 7%, 100% 50%, 75% 93%, 25% 93%, 0 50%);
}

.eve-return-node-core b {
    color: rgba(203, 229, 237, .68);
    font-size: 42px;
}

.eve-return-endpoint-icon {
    color: #b8e7f0;
    font-size: 30px;
}

.eve-return-node small,
.eve-return-endpoint small {
    margin-top: 14px;
    color: rgba(164, 195, 207, .68);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.eve-return-line {
    position: relative;
    width: clamp(70px, 8vw, 180px);
    height: 4px;
    flex: 0 1 180px;
    background: repeating-linear-gradient(90deg, rgba(113, 195, 219, .28) 0 9px, transparent 9px 16px);
}

.eve-return-line i {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(87, 197, 223, .55), rgba(117, 238, 203, .9));
}

.eve-return-line.is-done i {
    width: 100%;
}

.eve-return-node.is-current .eve-return-node-core {
    border-color: rgba(116, 220, 243, .9);
    box-shadow: 0 0 26px rgba(57, 189, 226, .2);
}

.eve-return-node.is-current::before,
.eve-return-node.is-scanning::after {
    content: "";
    position: absolute;
    top: 21px;
    width: 118px;
    height: 118px;
    border: 1px solid rgba(108, 220, 244, .4);
    border-radius: 50%;
    pointer-events: none;
}

.eve-return-node.is-current::before {
    animation: eve-return-pulse 1.7s ease-out infinite;
}

.eve-return-node.is-scanning::after {
    border-right-color: transparent;
    border-left-color: transparent;
    animation: eve-return-spin .65s linear infinite;
}

.eve-return-node.is-done:not(.is-battle) .eve-return-node-core,
.eve-return-endpoint.is-complete .eve-return-endpoint-icon {
    border-color: rgba(105, 220, 185, .58);
    background: linear-gradient(145deg, #15473e, #071d1d);
}

.eve-return-node.is-done:not(.is-battle) .eve-return-node-core b,
.eve-return-endpoint.is-complete .eve-return-endpoint-icon {
    color: #aef0d9;
}

.eve-return-node.is-battle .eve-return-node-core {
    border-color: rgba(242, 153, 96, .78);
    background: linear-gradient(145deg, #5b2d1f, #201313);
}

.eve-return-node.is-battle .eve-return-node-core b {
    color: #ffd0b3;
}

.eve-return-endpoint.is-active .eve-return-endpoint-icon {
    box-shadow: 0 0 24px rgba(73, 190, 224, .18);
}

.eve-return-home.is-arriving .eve-return-endpoint-icon {
    animation: eve-return-home-glow .8s ease-in-out infinite alternate;
}

.eve-return-status {
    position: relative;
    z-index: 1;
    width: min(760px, 92%);
    margin-top: 10px;
    padding: 18px 22px;
    border: 1px solid rgba(100, 184, 214, .16);
    border-radius: 14px;
    background: rgba(5, 18, 29, .8);
    text-align: center;
}

.eve-return-status span {
    display: block;
    color: rgba(122, 213, 236, .72);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
}

.eve-return-status strong {
    display: block;
    margin-top: 8px;
    font-size: clamp(28px, 2.6vw, 40px);
    font-weight: 900;
}

.eve-return-status small {
    display: block;
    margin-top: 7px;
    color: rgba(193, 221, 230, .72);
    font-size: 13px;
    font-weight: 700;
}

.eve-return-action {
    position: relative;
    z-index: 1;
    align-self: center;
    width: min(420px, 100%);
    min-height: 72px;
    padding: 16px 28px;
    color: #f8fbff;
    background: linear-gradient(180deg, rgba(25, 73, 110, .98), rgba(8, 34, 54, .98));
    border: 1px solid rgba(113, 197, 231, .5);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(194, 240, 255, .08), 0 8px 18px rgba(0, 0, 0, .22);
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 900;
    letter-spacing: -.02em;
    cursor: pointer;
}

.eve-return-action:hover {
    filter: brightness(1.08);
}

.eve-return-action:active {
    transform: translateY(1px);
}

@keyframes eve-return-pulse {
    0% { transform: scale(.9); opacity: .9; }
    100% { transform: scale(1.28); opacity: 0; }
}

@keyframes eve-return-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes eve-return-home-glow {
    from { box-shadow: 0 0 16px rgba(98, 200, 224, .22); }
    to { box-shadow: 0 0 28px rgba(120, 238, 201, .42); }
}

@media (max-width: 1200px) {
    .eve-return-node,
    .eve-return-endpoint {
        width: 124px;
        height: 166px;
        flex-basis: 124px;
    }

    .eve-return-node-core,
    .eve-return-endpoint-icon {
        width: 98px;
        height: 98px;
    }

    .eve-return-node.is-current::before,
    .eve-return-node.is-scanning::after {
        width: 98px;
        height: 98px;
    }

    .eve-return-line {
        width: clamp(44px, 6vw, 110px);
        flex-basis: 110px;
    }
}

@media (max-width: 860px) {
    #choice-container.eve-return-panel {
        top: 126px !important;
        right: 10px !important;
        left: 10px !important;
        bottom: 10px !important;
    }

    .eve-return-shell {
        padding: 18px 16px 16px;
    }

    .eve-return-header {
        gap: 12px;
        flex-direction: column;
    }

    .eve-return-link-status {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    .eve-return-route {
        min-height: 180px;
        transform: scale(.82);
        transform-origin: center center;
    }

    .eve-return-status {
        width: 100%;
    }

    .eve-return-action {
        width: 100%;
        min-height: 64px;
    }
}


/* Return-home repair presentation */
.eve-return-repair-overlay {
    position: absolute;
    inset: 0;
    z-index: 24;
    display: grid;
    place-items: center;
    background: rgba(3, 12, 19, .42);
    backdrop-filter: blur(2px);
    pointer-events: none;
    animation: eve-return-repair-fade-in .18s ease-out both;
}

.eve-return-repair-panel {
    width: min(560px, 82vw);
    padding: 24px 30px 22px;
    color: #eaf7fb;
    background: linear-gradient(145deg, rgba(8, 29, 42, .97), rgba(4, 17, 27, .97));
    border: 1px solid rgba(102, 202, 230, .34);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .38), inset 0 0 28px rgba(65, 180, 215, .04);
    text-align: center;
}

.eve-return-repair-panel > span {
    display: block;
    color: rgba(106, 215, 237, .78);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .24em;
}

.eve-return-repair-panel > strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
    letter-spacing: .03em;
}

.eve-return-repair-panel > small {
    display: block;
    margin-top: 10px;
    color: rgba(183, 211, 222, .72);
    font-size: 12px;
    font-weight: 700;
}

.eve-return-repair-track {
    position: relative;
    height: 5px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(116, 188, 211, .12);
}

.eve-return-repair-track i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 34%;
    background: linear-gradient(90deg, rgba(70, 180, 220, .9), rgba(113, 238, 202, .95));
    box-shadow: 0 0 12px rgba(85, 222, 210, .28);
    animation: eve-return-repair-scan 1.05s ease-in-out infinite alternate;
}

.eve-return-repair-overlay.is-complete .eve-return-repair-panel {
    border-color: rgba(109, 229, 190, .42);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .38), 0 0 24px rgba(80, 210, 172, .10);
}

.eve-return-repair-overlay.is-complete .eve-return-repair-track i {
    left: 0;
    width: 100%;
    animation: none;
}

@keyframes eve-return-repair-scan {
    from { left: 0; }
    to { left: 66%; }
}

@keyframes eve-return-repair-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
