.popup-panel.mission-popup {
    width: 100%;
    height: 100dvh;
    top: 0;
    left: 0;
    transform: none;
    border-radius: 0;
    background: #0a0a0a;
    border: none;
    display: flex !important;
    flex-direction: column;
}
.eight-direction {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    height: 48px;
    width: 100%;
}
.eight-direction > img {
    height: 100%;
    width: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.direction-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 1;
}
.dir-main-name {
    font-size: 0.95em;
    font-weight: 700;
    color: #eee;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.dir-progress {
    position: relative;
    width: 140px;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dir-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 2px 5px 5px 2px;
    height: 100%;
    background: linear-gradient(180deg, rgba(76,109,145,.78) 0%, rgba(39,63,93,.90) 40%, rgb(0 110 255 / 96%) 100%);
    transition: width .4s ease;
    z-index: 1;
}
.dir-progress-text {
    position: relative;
    z-index: 2;
    font-size: 0.65em;
    color: #ffdd88;
    text-shadow: 0 0 2px #000;
}
.mission-body {
    height: 100% !important;
    padding: 0 !important;
    flex: 1;
}
.mission-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 10px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mission-list::-webkit-scrollbar { display: none; }
.mission-list:has(.mission-map-wrapper) {
    overflow: hidden;
    padding: 0;
    gap: 0;
}
.mission-card {
    display: flex;
    flex-direction: column;
    width: 80%;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity .35s ease, transform .35s cubic-bezier(.22, .8, .25, 1);
    cursor: pointer;
    position: relative;
}
.mission-card.visible {
    opacity: 1;
    transform: translateX(0);
}
.mission-name {
    position: relative;
    width: 177px;
    height: 40px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 -30px -15px;
}
.quest-nameplate {
    position: absolute;
    width: 100%;
    height: 100%;
}
.quest-text {
    z-index: 1;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.6px;
    color: #eee;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.mission-detail {
    position: relative;
    width: 100%;
    aspect-ratio: 8 / 3;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    filter: brightness(1.08) saturate(1.2);
}
.mission-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}
.mission-card.inactive,
.mission-card.locked {
    filter: grayscale(1) brightness(0.8);
    opacity: 0.7;
}
.mission-card-done,
.mission-card-lock {
    width: 50px;
    object-fit: cover;
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
}
.mission-card-continued {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    pointer-events: none;
    color: #fff;
    font-weight: 600;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 8px rgba(0, 0, 0, 0.9);
}
.mission-card-run {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}
.mission-card.completed {
    filter: brightness(0.72);
    opacity: 0.85;
}
.mission-card.is-pending .mission-name,
.mission-card.is-pending .mission-detail {
    filter: brightness(0.72);
}

.mission-card.completed .mission-card-done {
    filter: brightness(1.39);
    opacity: 1;
}
.is-sub {
    position: absolute;
    left: 10px;
    font-weight: 700;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.5));
    color: #eee;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.mission-map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    background: #0a0a0a;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mission-map-wrapper::-webkit-scrollbar { display: none; }
.mission-map-content {
    position: relative;
    height: min(135dvh, 1400px);
    width: calc(min(135dvh, 1400px) * 945 / 1504);
    min-width: 100%;
    min-height: 100%;
    transition: transform .4s cubic-bezier(.25, .8, .25, 1);
}
.mission-map-content.zooming { will-change: transform; }
.mission-map-content .map-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
.map-region {
    fill: transparent;
    stroke: none;
    cursor: pointer;
}
.map-region:hover { fill: rgba(95, 185, 255, 0.08); }
.map-region-name.unknown {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: #aaa;
    color: #aaa;
    letter-spacing: 6px;
    font-size: 1.4em;
    font-weight: 600;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}
.map-name-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}
.map-region-name {
    position: absolute;
    transform: translate(-50%, -50%);
    max-width: 40%;
    white-space: nowrap;
    pointer-events: none;
    font-weight: 700;
    font-size: 1.6em;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff6cc 0%, #ffdf66 40%, #d4a017 70%, #8a6400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.95)) drop-shadow(0 0 12px rgba(255,215,0,0.5));
}
.map-region.unlocked {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
.map-region.unlocked:hover { fill: rgba(95, 185, 255, 0.12); }
.map-region.region-selected {
    fill: rgba(95, 185, 255, 0.22) !important;
    filter: drop-shadow(0 0 18px rgba(80, 180, 255, 0.55)) drop-shadow(0 0 6px rgba(120, 210, 255, 0.35));
    transition: fill .3s ease, filter .3s ease;
}
.mission-list.has-sub-bg {
    position: relative;
    background: transparent;
    overflow-y: auto;
}
.mission-popup > .sub-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.mission-popup > .sub-bg-layer .sub-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.6) grayscale(0.6);
}
.mission-popup > .sub-bg-layer .sub-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 18, 30, 0.35) 0%, rgba(10, 18, 30, 0.45) 50%, rgba(10, 18, 30, 0.55) 100%);
    backdrop-filter: blur(2px);
}
.mission-map-zoom {
    position: fixed;
    right: 5px;
    bottom: 50px;
    width: 40px;
    height: 76px;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}
.mission-map-zoom .gps-zoom {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.mission-map-zoom .zoom {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    z-index: 1;
    cursor: pointer;
    user-select: none;
}
.mission-map-zoom .zoom.disabled {
    opacity: 0.35;
    cursor: default;
}
.mission-map-guide {
    position: fixed;
    left: 0;
    bottom: 5px;
    z-index: 9;
    display: flex;
    align-items: center;
    color: aliceblue;
    transition: opacity .25s ease;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    width: 100%;
    background: rgb(0 0 0 / 50%);
}
.map-guide-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.map-guide-item img {
    width: 24px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 5px;
}
.map-guide-item span {
    font-size: 0.8em;
}