@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400&display=swap");

/* 시안과 같은 크기를 유지하고, 1280px 미만에서는 가로로 스크롤합니다. */
html:has(.wildhuter-page) {
    overflow-x: auto;
}

body.index-page:has(.wildhuter-page) {
    min-width: 1280px;
    overflow-x: visible;
}

/* 푸터가 본문보다 넓어져 오른쪽에 빈 공간이 생기는 것을 방지합니다. */
body.index-page:has(.wildhuter-page) #ft {
    min-width: 0;
}

.wildhuter-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #160830 url("../images/bg.png?v=20261203-1") no-repeat center top;
    pointer-events: none;
}

.wildhuter-page {
    --section-gap: 180px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--section-gap);
    padding-bottom: var(--section-gap);
    isolation: isolate;
}

.wildhuter-page img {
    display: block;
    height: auto;
}

.wildhuter-page button {
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.wildhuter-page button:disabled {
    cursor: default;
}

.wildhuter-page button:focus-visible,
.wildhuter-page a:focus-visible {
    outline: 2px solid #e6b7f7;
    outline-offset: 5px;
}

.wildhuter-page [hidden] {
    display: none;
}

/* GNB가 위에 겹쳐지는 문서 상단 0px부터 히어로 1270px을 계산합니다. */
.wildhuter-hero {
    position: relative;
    width: 100%;
    height: 1270px;
    overflow: hidden;
}

.wildhuter-hero-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2560px;
    height: 100%;
    transform: translateX(-50%);
}

.wildhuter-hero-video {
    position: absolute;
    left: 850px;
    top: 0;
    width: auto;
    height: 1225px;
    max-width: none;
    pointer-events: none;
}

.wildhuter-title {
    position: absolute;
    left: 665px;
    top: 230px;
    margin: 0;
}

.wildhuter-subtext {
    position: absolute;
    left: 682px;
    top: 844px;
}

/* 금색 획만 남긴 전용 마스크로 타이틀의 배경 블러를 효과 범위에서 제외합니다. */
@media (prefers-reduced-motion: no-preference) {
    .wildhuter-title.is-sweeping::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        mask: url("../images/title-sweep-mask.png") center / 100% 100% no-repeat;
        background: linear-gradient(
            112deg,
            transparent 37%,
            rgb(255 222 151 / 22%) 40%,
            rgb(255 250 215 / 76%) 42%,
            rgb(252 193 88 / 28%) 44%,
            transparent 47%
        ) 100% 50% / 190% 100% no-repeat;
        mix-blend-mode: screen;
        opacity: 0;
        animation: wildhuter-title-sweep 0.7s ease-in-out;
    }

    .wildhuter-pv .wildhuter-video-play.is-glowing {
        border-radius: 50%;
        animation: wildhuter-pv-glow 0.6s ease-out;
    }
}

@keyframes wildhuter-title-sweep {
    from { background-position: 100% 50%; }
    12%, 84% { opacity: 1; }
    to { background-position: 0% 50%; }
}

@keyframes wildhuter-pv-glow {
    from, to { box-shadow: 0 0 0 0 rgb(218 152 255 / 0%); }
    40% { box-shadow: 0 0 16px 5px rgb(218 152 255 / 67%); }
}

.wildhuter-pv-section {
    /* 시안의 PV 프레임 상단은 문서 기준 1414px입니다. */
    margin-top: calc(144px - var(--section-gap));
}

.wildhuter-video-pair {
    display: flex;
    gap: 40px;
}

.wildhuter-video-card {
    position: relative;
    width: 600px;
    height: 338px;
    background: #17112f;
}

.wildhuter-video-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 2px solid #a184bc;
    pointer-events: none;
}

.wildhuter-pv {
    width: 854px;
    height: 480px;
}

/* 검정 40%에 해당하는 어둡기를 썸네일에만 적용합니다. */
.wildhuter-video-card .wildhuter-video-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
    pointer-events: none;
}

.wildhuter-video-card iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.wildhuter-video-label,
.wildhuter-video-play {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wildhuter-video-label {
    top: 0;
    z-index: 2;
    pointer-events: none;
}

.wildhuter-video-play {
    top: 50%;
    z-index: 2;
}

/* PV 프레임의 하단부터 section2 이미지 상단까지 153px입니다. */
.wildhuter-section-two {
    margin-top: calc(153px - var(--section-gap));
}

.wildhuter-spine h2 {
    width: max-content;
    margin: 0 auto 52px;
}

.wildhuter-frame {
    position: relative;
    width: 909px;
    height: 1070px;
    margin-inline: auto;
    background: url("../images/frame.png?v=20261203-1") no-repeat;
}

.wildhuter-slide-video {
    position: absolute;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    width: 820px;
    height: 588px;
    object-fit: contain;
}

.wildhuter-slide-caption {
    position: absolute;
    /* 기존 프레임에서 보이스 버튼이 시작하던 높이입니다. */
    top: 670px;
    inset-inline: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.wildhuter-voice-button:disabled {
    opacity: 0.45;
}

.wildhuter-slide-prev,
.wildhuter-slide-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.wildhuter-slide-prev {
    right: calc(100% + 24px);
    width: 82px;
}

.wildhuter-slide-next {
    left: calc(100% + 24px);
    width: 81px;
}

.wildhuter-teams {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 42px;
}

.wildhuter-teams button {
    position: relative;
}

.wildhuter-slider > .wildhuter-teams button[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    top: calc(100% + 6px);
    left: 15%;
    width: 70%;
    height: 2px;
    background: #e6b7f7;
}

.wildhuter-page .wildhuter-scenario-open {
    margin: 40px auto 0;
}

.wildhuter-scenario-open:enabled:is(:hover, :focus-visible),
.wildhuter-scenario-teams button:enabled:is(:hover, :focus-visible) {
    filter: brightness(110%);
}

.wildhuter-scenario-dialog {
    --scenario-line-color: rgb(241 229 247 / 50%);
    width: 1127px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    background: transparent;
    color: #f1e5f7;
    font-family: "Noto Serif KR", serif;
    font-size: 17pt;
    overscroll-behavior: contain;
}

.wildhuter-scenario-dialog::backdrop {
    background: rgb(0 0 0 / 70%);
}

/* 원본 프레임 크기와 좌표를 사용합니다. 화면이 작으면 모달 안에서 이동할 수 있습니다. */
.wildhuter-scenario-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 55px;
    box-sizing: border-box;
    width: 1127px;
    height: 911px;
    padding-top: 55px;
    background: url("../images/modal_frame.png") center top no-repeat;
}

.wildhuter-scenario-close-form {
    position: sticky;
    z-index: 1;
    top: 46px;
    left: calc(100% - 88px);
    width: 36px;
    height: 36px;
    margin: 0 0 -36px;
}

.wildhuter-page .wildhuter-scenario-close {
    width: 36px;
    height: 36px;
    color: #f1e5f7;
    font: inherit;
    font-size: 22pt;
    font-weight: 700;
    line-height: 1;
}

.wildhuter-scenario-teams {
    flex: 0 0 72px;
    margin-top: 0;
}

.wildhuter-scenario-content {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 984px;
    height: 645px;
    padding-right: 20px;
    overflow-y: auto;
    text-align: left;
    overflow-wrap: anywhere;
    -webkit-user-select: none;
    user-select: none;
}

.wildhuter-scenario-content::-webkit-scrollbar {
    width: 5px;
}

.wildhuter-scenario-content::-webkit-scrollbar-thumb {
    background: var(--scenario-line-color);
}

.wildhuter-scenario-content::-webkit-scrollbar-track {
    background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
    .wildhuter-scenario-content {
        scrollbar-width: thin;
        scrollbar-color: var(--scenario-line-color) transparent;
    }
}

.wildhuter-page .wildhuter-scenario-content p {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
}

.wildhuter-page .wildhuter-scenario-content p + p {
    margin-top: 1em;
}

/* 대괄호 제목을 앞 문단과 구분해 읽을 수 있도록 위 여백을 넓힙니다. */
.wildhuter-page .wildhuter-scenario-content p + .wildhuter-scenario-accent {
    margin-top: 54px;
}

.wildhuter-page .wildhuter-scenario-content p.wildhuter-scenario-break {
    margin-top: 72px;
}

.wildhuter-scenario-accent {
    color: #f3d39b;
}

.wildhuter-scenario-accent em {
    font-style: italic;
}

.wildhuter-scenario-line {
    width: 100%;
    height: 1px;
    /* 기존 여백에 시나리오 본문 한 줄 높이를 더합니다. */
    margin: calc(48px + 1.7em) 0;
    border: 0;
    background: var(--scenario-line-color);
    opacity: 1;
}

.wildhuter-status:empty {
    display: none;
}

.wildhuter-status {
    display: block;
    color: #fff;
    margin-top: 14px;
}

.wildhuter-info-link {
    display: block;
    width: max-content;
    margin: 40px auto 0;
}
