@charset "UTF-8";

:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    color-scheme: dark;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #071c30;
}

body {
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
}

button {
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

[hidden] {
    display: none !important;
}

.landscape-stage {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: #071c30;
}

#app,
.screen {
    width: 100%;
    height: 100%;
}

.screen {
    position: fixed;
    inset: 0;
    display: none;
    overflow: hidden;
}

.screen.is-active {
    display: block;
}

/* 开场视频 */
.intro-screen {
    background: #071c30;
}

.intro-video {
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    background: #071c30;
}

.video-intro-text {
    position: absolute;
    z-index: 2;
    bottom: calc(var(--safe-bottom) + clamp(24px, 6vh, 64px));
    left: 50%;
    width: min(1000px, calc(90%));
    margin: 0;
    padding: clamp(14px, 1.6vw, 24px) clamp(18px, 2.2vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: rgba(3, 17, 29, 0.38);
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(12px, 0.95vw, 17px);
    line-height: 1.9;
    letter-spacing: 0.04em;
    text-align: justify;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transform: translate(-50%, 8px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
    pointer-events: none;
}

.intro-screen.is-playing .video-intro-text {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.play-panel {
    position: absolute;
    top: 80%;
    left: 50%;
    width: min(90%, 620px);
    text-align: center;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease, visibility 0.4s;
}

.intro-kicker {
    margin: 0 0 1.6vh;
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(9px, 0.72vw, 14px);
    letter-spacing: 0.42em;
}

.play-panel h1 {
    margin: 0;
    font-family: "STKaiti", "KaiTi", "Songti SC", serif;
    font-size: clamp(38px, 5.3vw, 92px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.4);
}

.intro-subtitle {
    margin: 1.8vh 0 4vh;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(12px, 1.1vw, 21px);
    letter-spacing: 0.32em;
    text-indent: 0.32em;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-width: 166px;
    min-height: 52px;
    padding: 12px 26px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(5, 33, 53, 0.24);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
    font-size: clamp(13px, 0.95vw, 18px);
    letter-spacing: 0.12em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.17);
    transform: translateY(-2px);
}

.play-button:active {
    transform: scale(0.97);
}

.play-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.play-button__icon {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
}

.video-status {
    margin: 2vh 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: clamp(10px, 0.72vw, 14px);
    letter-spacing: 0.08em;
}

.intro-screen.is-playing .play-panel {
    visibility: hidden;
    opacity: 0;
}

.skip-button {
    position: absolute;
    z-index: 3;
    top: calc(var(--safe-top) + 22px);
    right: calc(var(--safe-right) + 28px);
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    font-size: clamp(11px, 0.8vw, 15px);
    letter-spacing: 0.08em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.skip-button span {
    display: inline-block;
    margin-left: 5px;
}

.video-loading {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    font-size: 13px;
    transform: translate(-50%, -50%);
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 地图页 */
.map-screen {
    isolation: isolate;
    background: #096a9e;
}

.map-backgrounds,
.map-background,
.map-shade {
    position: absolute;
    inset: 0;
}

.map-background {
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transition: opacity 1.1s ease-in-out;
}

.map-background.is-active {
    opacity: 1;
}

.map-shade {
    z-index: 1;
    background: linear-gradient(180deg, rgba(2, 41, 68, 0.05), transparent 35%, rgba(2, 29, 48, 0.08));
    pointer-events: none;
}

.map-wrap {
    position: absolute;
    z-index: 2;
    top: 48%;
    left: 50%;
    width: min(94vw, calc(94vh * 1.2628));
    width: min(94vw, calc(94dvh * 1.2628));
    aspect-ratio: 937 / 742;
    transform: translate(-50%, -50%);
}

.map-outline {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-markers {
    position: absolute;
    inset: 0;
}

.map-point {
    position: absolute;
    top: var(--y);
    left: var(--x);
    z-index: 2;
    width: 42px;
    height: 42px;
    background: transparent;
    font-size: clamp(12px, 1.42vw, 29px);
    transform: translate(-50%, -50%);
}

.map-point.is-active {
    z-index: 3;
}

.map-point__dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(8px, 0.7vw, 14px);
    height: clamp(8px, 0.7vw, 14px);
    border: 1.5px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 38, 66, 0.25);
    transform: translate(-50%, -50%);
    transition: background 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.map-point__dot::after {
    position: absolute;
    inset: -5px;
    border: 1px solid #fff0b0;
    border-radius: 50%;
    content: "";
    opacity: 0;
    transform: scale(0.7);
}

.map-point.is-active .map-point__dot {
    border-color: #fff7cf;
    background: #fff7cf;
    box-shadow: 0 0 0 4px rgba(255, 247, 207, 0.12), 0 0 14px rgba(255, 239, 176, 0.75);
    transform: translate(-50%, -50%) scale(1.1);
}

.map-point.is-active .map-point__dot::after {
    animation: map-point-pulse 2.2s ease-out infinite;
}

.map-point__label {
    position: absolute;
    display: block;
    width: max-content;
    color: #fff;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: nowrap;
    padding: 0.1em 0.28em;
    text-shadow: 0 2px 6px rgba(0, 39, 68, 0.55);
    transition: font-size 0.35s ease, font-weight 0.35s ease, color 0.35s ease, text-shadow 0.35s ease;
}

.map-point__label::after {
    position: absolute;
    bottom: -0.24em;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffe699 25%, #fff8d8 50%, #ffe699 75%, transparent);
    box-shadow: 0 0 7px rgba(255, 230, 153, 0.55);
    content: "";
    opacity: 0;
    transform: translateX(-50%);
    transition: width 0.35s ease, opacity 0.35s ease;
}

.map-point.is-active .map-point__label {
    color: #fff7cf;
    font-size: 1.24em;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 3px rgba(0, 30, 55, 0.8), 0 0 10px rgba(255, 239, 176, 0.65), 0 0 22px rgba(255, 239, 176, 0.28);
}

.map-point.is-active .map-point__label::after {
    width: 78%;
    opacity: 1;
}

.map-point--right .map-point__label {
    top: 50%;
    left: calc(50% + 10px);
    transform: translateY(-50%);
}

.map-point--left .map-point__label {
    top: 50%;
    right: calc(50% + 10px);
    transform: translateY(-50%);
}

.map-point--top .map-point__label {
    bottom: calc(50% + 7px);
    left: 50%;
    transform: translateX(-50%);
}

.map-point--bottom .map-point__label {
    top: calc(50% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

.map-tip {
    position: absolute;
    z-index: 3;
    bottom: calc(var(--safe-bottom) + 1vh);
    left: 50%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(10px, 0.72vw, 14px);
    letter-spacing: 0.14em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.map-tip>span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
    animation: breathe 2s ease-in-out infinite;
}

/* 横向长图 */
.long-screen {
    background: #102d3c;
}

.long-scroll {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.long-scroll::-webkit-scrollbar {
    display: none;
}

.long-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.long-track {
    position: relative;
    width: max-content;
    min-width: 100%;
    height: 100%;
}

.long-image {
    display: block;
    width: auto;
    max-width: none;
    height: 100%;
    pointer-events: none;
}

.long-image.is-loading {
    visibility: hidden;
}

.article-hotspot,
.map-more-button {
    position: absolute;
    z-index: 5;
    right: 10px;
    bottom: 30px;
    width: 10%;
    height: 45%;
    background: transparent;
    background-position: right center;
}

.article-hotspot>img,
.map-more-button>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    margin-right: 0
}

.back-map-button {
    position: absolute;
    z-index: 5;
    top: calc(var(--safe-top) + 20px);
    right: calc(var(--safe-right) + 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
}

.back-map-button>img {
    display: block;
    width: 60px;
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

.music-toggle {
    position: absolute;
    z-index: 20;
    top: calc(var(--safe-top) + 20px);
    left: calc(var(--safe-left) + 20px);
    width: 5%;
    min-width: 36px;
    max-width: 48px;
    height: auto;
    aspect-ratio: 1;
    background: transparent;
}

.music-toggle>img {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.music-toggle.is-playing>img {
    animation: spin 3s linear infinite;
    will-change: transform;
}

.scroll-hint {
    position: absolute;
    z-index: 2;
    bottom: calc(var(--safe-bottom) + 22px);
    left: 50%;
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(4, 22, 31, 0.42);
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(10px, 0.75vw, 14px);
    letter-spacing: 0.1em;
    transform: translateX(-50%);
    transition: opacity 0.35s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.scroll-hint>span {
    display: inline-block;
    margin-left: 5px;
    animation: nudge 1.5s ease-in-out infinite;
}

.scroll-hint.is-hidden {
    opacity: 0;
}

/* 图文稿件弹窗 */
.article-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: calc(var(--safe-top) + 4vh) calc(var(--safe-right) + 5vw) calc(var(--safe-bottom) + 4vh) calc(var(--safe-left) + 5vw);
}

.article-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 15, 24, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade-in 0.25s ease both;
}

.article-panel {
    position: relative;
    z-index: 1;
    width: min(860px, 86vw);
    max-width: 100%;
    height: min(82vh, 760px);
    height: min(82dvh, 760px);
    max-height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #f7f3ea;
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.4);
    color: #283a40;
    animation: panel-in 0.3s ease both;
}

.article-close {
    position: absolute;
    z-index: 2;
    top: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(20, 42, 49, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.article-close>span::before,
.article-close>span::after {
    position: absolute;
    top: 18px;
    left: 10px;
    width: 18px;
    height: 1.5px;
    background: #fff;
    content: "";
}

.article-close>span::before {
    transform: rotate(45deg);
}

.article-close>span::after {
    transform: rotate(-45deg);
}

.article-content {
    height: 100%;
    padding: clamp(32px, 5vw, 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
    font-size: clamp(14px, 1.05vw, 18px);
    line-height: 1.9;
}

.article-eyebrow {
    margin: 0 0 12px;
    color: #8b6d43;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 0.78em;
    letter-spacing: 0.18em;
}

.article-content h2 {
    margin: 0 45px 18px 0;
    color: #183f4b;
    font-size: clamp(25px, 2.2vw, 38px);
    font-weight: 600;
    line-height: 1.35;
}

.article-content h3 {
    margin: 1.5em 0 0.5em;
    color: #285865;
    font-size: 1.15em;
}

.article-content p {
    margin: 0 0 1.15em;
    text-align: justify;
}

.article-content .article-lead {
    color: #66777a;
    font-size: 1.02em;
}

.article-content figure {
    margin: 1.5em 0;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

.article-content figure img {
    width: 100%;
}

.article-content iframe.video {
    display: block;
    max-width: 100%;
    margin: 1.5em auto;
    border: 0;
}

.article-content iframe.video.vertical-video {
    width: min(100%, 320px);
    height: auto;
    aspect-ratio: 9 / 16;
}

.article-content figcaption {
    margin-top: 8px;
    color: #829093;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 0.75em;
    line-height: 1.6;
    text-align: center;
}

body.modal-open {
    overscroll-behavior: none;
}

.article-panel {
    touch-action: pan-y;
}

.article-content {
    touch-action: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes map-point-pulse {
    0% {
        opacity: 0.7;
        transform: scale(0.7);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

@keyframes breathe {
    50% {
        opacity: 0.45;
        transform: scale(0.8);
    }
}

@keyframes nudge {
    50% {
        transform: translateX(5px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes panel-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
}

/* 竖持手机时旋转整个舞台，横屏内容不依赖系统自动旋转。 */
@media (orientation: portrait) and (max-width: 900px) {
    .landscape-stage {
        inset: auto;
        top: 50%;
        left: 50%;
        width: 100vh;
        width: 100dvh;
        height: 100vw;
        height: 100dvw;
        transform: translate(-50%, -50%) rotate(90deg);
        transform-origin: center;
    }

    .map-wrap {
        width: min(94vh, calc(94vw * 1.2628));
        width: min(94dvh, calc(94dvw * 1.2628));
    }

    .article-modal {
        padding: calc(var(--safe-top) + 4dvw) calc(var(--safe-right) + 5dvh) calc(var(--safe-bottom) + 4dvw) calc(var(--safe-left) + 5dvh);
    }

    .article-panel {
        width: min(860px, 86dvh);
        height: min(82dvw, 760px);
    }
}

@media (max-height: 500px) {
    .video-intro-text {
        bottom: calc(var(--safe-bottom) + 20px);
        width: min(90%, 980px);
        padding: 10px 16px;
        font-size: 12px;
        line-height: 1.65;
    }

    .play-panel h1 {
        font-size: clamp(34px, 5vw, 62px);
    }

    .intro-subtitle {
        margin: 10px 0 20px;
    }

    .play-button {
        min-width: 146px;
        min-height: 42px;
        padding: 8px 21px;
    }

    .video-status {
        margin-top: 10px;
    }

    .skip-button {
        top: calc(var(--safe-top) + 12px);
        right: calc(var(--safe-right) + 16px);
    }

    .map-point {
        font-size: clamp(11px, 1.55vw, 20px);
    }

    .article-modal {
        padding-top: calc(var(--safe-top) + 3vh);
        padding-bottom: calc(var(--safe-bottom) + 3vh);
    }

    .article-panel {
        width: min(820px, 88vw);
        height: 88dvh;
    }

    .article-content {
        padding: 28px 42px;
        font-size: 14px;
        line-height: 1.8;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}