/* ================================================
   DISTRAIL - BOUUL GAMES
   Dark Purple / Fog Atmosphere Theme
   ================================================ */

/* --- Variables --- */
:root {
    --bg-dark: #000000;
    --bg-mid: #000000;
    --bg-purple: #000000;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-dim: #666680;
    --accent: #c0a0ff;
    --accent-glow: rgba(192, 160, 255, 0.3);
    --highlight: #ff6b6b;
    --card-bg: rgba(0, 0, 0, 0.55);
    --card-border: rgba(255, 255, 255, 0.08);
    --line-color: rgba(255, 255, 255, 0.2);
    --header-height: 100px;
    --page-zoom: 1;
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Pretendard', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    scroll-margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.desktop-only-line {
    display: block;
}

.mobile-only-line {
    display: none;
}

/* ================================================
   GLOBAL FOG BACKGROUND
   ================================================ */
.fog-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.fog-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    opacity: 0;
}

.fog-1 {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(160,120,200,0.06) 0%, transparent 50%);
    animation: fogDrift1 28s infinite ease-in-out;
}

.fog-2 {
    background:
        radial-gradient(ellipse at 60% 70%, rgba(255,255,255,0.03) 0%, transparent 55%),
        radial-gradient(ellipse at 25% 20%, rgba(100,80,180,0.05) 0%, transparent 60%);
    animation: fogDrift2 35s infinite ease-in-out 5s;
}

.fog-3 {
    background:
        radial-gradient(ellipse at 45% 40%, rgba(200,180,255,0.04) 0%, transparent 45%),
        radial-gradient(ellipse at 75% 60%, rgba(255,255,255,0.02) 0%, transparent 50%);
    animation: fogDrift3 40s infinite ease-in-out 12s;
}

@keyframes fogDrift1 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
    30% { opacity: 0.9; transform: translate(-3%, 2%) scale(1.05); }
    60% { opacity: 0.6; transform: translate(-7%, -1%) scale(1.08); }
    80% { opacity: 1; transform: translate(-2%, 3%) scale(1.02); }
}

@keyframes fogDrift2 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
    25% { opacity: 0.8; transform: translate(4%, -2%) scale(1.03); }
    55% { opacity: 0.5; transform: translate(-5%, 3%) scale(1.1); }
    85% { opacity: 0.9; transform: translate(2%, -1%) scale(1.05); }
}

@keyframes fogDrift3 {
    0%, 100% { opacity: 0; transform: translate(0, 0) scale(1); }
    20% { opacity: 0.7; transform: translate(-2%, -3%) scale(1.06); }
    50% { opacity: 1; transform: translate(3%, 2%) scale(1.02); }
    75% { opacity: 0.4; transform: translate(-4%, 1%) scale(1.08); }
}

/* Section-level fog overlays */
.section-fog-overlay {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

.fog-overlay-left {
    top: 15%;
    left: -150px;
    background: rgba(120, 80, 180, 0.12);
}

.fog-overlay-right {
    bottom: 15%;
    right: -150px;
    background: rgba(80, 100, 200, 0.1);
}

/* ================================================
   NAVIGATION
   ================================================ */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    background: linear-gradient(to bottom,
        rgba(10,10,21,1) 0%,
        rgba(10,10,21,0.7) 60%,
        transparent 100%);
    z-index: 1000;
    transition: background 0.4s ease;
}

nav.scrolled {
    background: linear-gradient(to bottom,
        rgba(10,10,21,1) 0%,
        rgba(10,10,21,0.7) 60%,
        transparent 100%);
}

.logo {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.logo img {
    height: 110px;
    width: auto;
    object-fit: contain;
    transform: translateY(10px);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 90px;
}

nav ul li a {
    font-family: 'Dohyun', sans-serif;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    opacity: 0.55;
    text-transform: uppercase;
    font-weight: 400;
}

nav ul li a:hover {
    opacity: 1;
    text-shadow: 0 0 15px var(--accent-glow);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    position: relative;
    height: calc(100vh / var(--page-zoom, 1));
    min-height: 600px;
    background: url('bg_out.jpg') top center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,21,0.4) 0%,
        rgba(10,10,21,0.15) 30%,
        rgba(10,10,21,0.2) 50%,
        rgba(10,10,21,0.6) 75%,
        rgba(10,10,21,1) 100%
    );
    z-index: 1;
}



/* Hero bottom fog transition */
.hero-bottom-fog {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, var(--bg-dark) 0%, transparent 100%);
    z-index: 2;
}

/* ================================================
   BACKGROUND WRAPPER (below hero)
   ================================================ */
.bg-wrapper {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: -200px;
    padding-top: 150px;
    display: flex;
    flex-direction: column;
}

.bg-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background_1.webp') top center / cover no-repeat;
    opacity: var(--bg-opacity, 0.3);
    transition: opacity 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

/* ================================================
   TIMELINE BACK WRAPPER (fog-story ~ door-tech)
   ================================================ */
.timeline-back-wrapper {
    position: relative;
}

.timeline-back-wrapper::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    height: calc(100% + 100px);
    background: url('timeline_back.webp') center top no-repeat;
    background-size: 70%;
    pointer-events: none;
    z-index: 0;
}

/* ================================================
   FOG INTRO (안개 타이틀)
   ================================================ */
.fog-intro {
    max-width: 1080px;
    margin: 0 auto;
    padding-top: 300px;
    padding-bottom: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.fog-intro-img {
    display: block;
    width: 100%;
    height: 100%;
}

.fog-aside {
    position: absolute;
    top: 49%;
    left: 38%;
    font-family: 'Dohyun', sans-serif;
    font-size: clamp(1rem, 3vw, 2.5rem);
    color: #000;
    font-weight: 500;
    letter-spacing: -3px;
}

.fog-line-overlay {
    position: absolute;
    right: 36%;
    top: 70.5%;
    font-family: 'Dohyun', sans-serif;
    font-size: clamp(1rem, 3vw, 2.5rem);
    color: #000;
    font-weight: 500;
    letter-spacing: -3px;
}

/* ================================================
   FOG VISUAL (컨셉아트 + 설명)
   ================================================ */
.fog-visual {
    margin-top: 40px;
    margin-bottom: 60px;
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 1;
}

.fog-visual-img {
    display: block;
    max-width: 80%;
    height: auto;
    opacity: 0;
}

.prism-img-overlay {
    position: absolute;
    top: -19px;
    left: 34%;
    transform: translateX(-50%);
    width: auto;
    max-width: 47.8%;
    height: auto;
    pointer-events: none;
    z-index: 1;
}

.prism-textbox-overlay {
    position: absolute;
    right: 10%;
    top: 47.7%;
    transform: translateY(-50%);
    width: 41%;
    max-width: 41%;
    height: auto;
    pointer-events: none;
    z-index: 2;
}

.fog-desc-box {
    position: absolute;
    right: 11%;
    top: 44%;
    transform: translateY(-50%);
    max-width: 55%;
    padding: 22px 28px;
    font-size: 1.33rem;
    color: var(--text-primary);
    line-height: 1;
    z-index: 3;
}

.fog-desc-box p {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
}

.fog-desc-box p + p {
    margin-top: 6px;
}

.text-big {
    font-size: 1.4em;
    font-weight: 800;
}

.text-yellow {
    color: #f0d050;
    font-weight: 700;
}

/* ================================================
   TIMELINE
   ================================================ */
.timeline {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 0 60px;
}

.tl-origin h4,
.tl-origin p,
.tl-content h4,
.tl-content p,
.tl-final-box h4,
.tl-final-box p,
.tl-final-big {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
}

.timeline-line {
    display: none;
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent,
        var(--line-color) 5%,
        var(--line-color) 95%,
        transparent
    );
    transform: translateX(-50%);
}

/* Origin circle */
.tl-origin {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-10px);
    margin-bottom: 110px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.tl-origin.reveal.visible {
    transform: translateY(-10px);
}

.tl-origin h4 {
    font-size: 2.4rem;
    font-weight: 900;
    text-shadow: none;
    letter-spacing: 4px;
    color: #fff;
    text-shadow:
        -1px 0 0 #000,
        1px 0 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    line-height: 1.28;
    margin-bottom: -3px;
}

.tl-origin p {
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: none;
    color: #fff;
    text-shadow:
        -1px 0 0 #000,
        1px 0 0 #000,
        0 -1px 0 #000,
        0 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    letter-spacing: 2px;
    line-height: 1.28;
}


.tl-origin-circle img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    margin-bottom: 6px;
    opacity: 0.6;
}

.tl-origin-circle h4 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
    line-height: 1.2;
}

.tl-origin-circle p {
    font-size: 1.8rem;
    color: var(--text-primary);
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Timeline items */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 10px 0;
    margin-bottom: 20px;
}

.timeline-item.left {
    padding-right: 40px;
    text-align: right;
}

.timeline-item.right {
    margin-left: 50%;
    padding-left: 40px;
    text-align: left;
}

/* Timeline branch images */
.tl-branch-img {
    position: absolute;
    top: 0;
    max-width: 120%;
    height: auto;
    z-index: 0;
}

.tl-branch-right {
    right: 0;
}

.tl-branch-left {
    left: 0;
}

/* 개별 branch 이미지 위치 조절 */
.tl-branch-1 {
    top: -17px;
    right: 0px;
}

.tl-branch-2 {
    top: -1px;
    left: 0px;
}

.tl-branch-3 {
    top: -10px;
    right: 0px;
}

.tl-branch-4 {
    top: -30px;
    left: 0px;
}

/* 개별 텍스트 위치 조절 */
.tl-text-1 {
    margin-top: 7px;
    margin-right: 0px;
}

.tl-text-2 {
    margin-top: 13px;
    margin-left: 0px;
}

.tl-text-3 {
    margin-top: 5px;
    margin-right: 0px;
}

.tl-text-4 {
    margin-top: -15px;
    margin-left: 0px;
}

.tl-text-5 {
    margin-top: 0px;
}

.tl-branch-end {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 53%;
    z-index: 0;
}

.tl-content {
    background: transparent;
    padding: 12px 25px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.tl-content.skew {
    transform: skewX(-2deg);
}

.tl-content.skew > * {
    transform: skewX(2deg);
}

.tl-content:hover {
    transform: skewX(-2deg) translateX(-4px);
}

.timeline-item.right .tl-content:hover {
    transform: skewX(-2deg) translateX(4px);
}

.tl-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0px;
    letter-spacing: 3px;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.08;
    white-space: nowrap;
}

.tl-content p {
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

/* Final big box */
.tl-final {
    display: flex;
    justify-content: center;
    margin-top: 120px;
    position: relative;
    z-index: 2;
}

.tl-final-box {
    background: transparent;
    padding: 22px 45px;
    text-align: center;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.tl-final-box h4 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 0px;
    line-height: 1.08;
    white-space: nowrap;
}

.tl-final-box p {
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 1px;
    white-space: nowrap;
    line-height: 1.2;
}

.tl-final-big {
    font-size: clamp(1.6rem, 4vw, 2rem) !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    letter-spacing: 3px !important;
    margin-top: 4px;
    line-height: 1.12;
}

/* ================================================
   PLACE GUIDE SECTION (장소 안내)
   ================================================ */
.place-guide {
    position: relative;
    padding-top: 350px;
    z-index: 1;
    overflow: hidden;
}

.pg-back-img {
    display: block;
    width: 73%;
    height: auto;
    margin: 0 auto;
}

/* 로비 이미지 - 독립 배치 */
.pg-lobby-img {
    position: absolute;
    width: 40.8%;
    top: 63%;
    left: 34.6%;
    transform: translate(-50%, -50%);
    height: auto;
    z-index: 1;
    transition: opacity 0.18s ease;
}

/* 도어테크 로고 - 독립 배치 */
.pg-title-img {
    position: absolute;
    top: 370px;
    right: 13%;
    width: 30%;
    height: auto;
    z-index: 1;
}

/* 설명 글자 - 독립 배치 */
.pg-desc {
    position: absolute;
    top: 400px;
    right: 12%;
    max-width: 30%;
    z-index: 1;
    transition: opacity 0.18s ease;
}

.pg-lobby-img.is-switching,
.pg-desc.is-switching {
    opacity: 0.35;
}

.pg-desc p {
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: pre-line;
}

.pg-desc p:first-child {
    font-size: 2rem;
    line-height: 1.15;
    margin-bottom: 40px;
}

.pg-desc strong {
    font-weight: 700;
}

.pg-action-bars {
    position: absolute;
    top: 805px;
    right: 18.3%;
    display: flex;
    gap: 14px;
    z-index: 2;
}

.pg-action-btn {
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 0;
    cursor: pointer;
}

.pg-action-btn img {
    display: block;
    width: 78px;
    height: auto;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.pg-action-btn[aria-pressed="false"] img {
    filter: grayscale(1);
    opacity: 0.65;
}

.pg-action-btn[aria-pressed="true"] img {
    filter: none;
    opacity: 1;
}

.pg-action-btn:hover img {
    transform: translateY(-2px);
}

/* Bottom decorative lines */
.pg-bottom-lines {
    max-width: 1100px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pg-line {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.2);
}

/* ================================================
   CHARACTER SECTION
   ================================================ */
.character-section {
    position: relative;
    padding: 60px 5% 200px;
    z-index: 1;
    background: transparent;
    overflow: visible;
}

.section-heading {
    text-align: center;
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    font-weight: 700;
    letter-spacing: 8px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.section-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--accent);
    margin: 15px auto 0;
    opacity: 0.4;
}

.char-title-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}

.char-title-img {
    display: block;
    max-width: 32%;
    height: auto;
}

.char-title-wrap .section-heading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'PuradakGentleGothic', sans-serif;
    font-size: clamp(2.0rem, 4.3vw, 2.7rem);
    font-weight: 400;
    letter-spacing: 1.5px;
    margin-bottom: 0;
    z-index: 1;
    color: #000;
}

.char-title-wrap .section-heading::after {
    display: none;
}

/* Character Slider */
.char-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

.char-arrow {
    width: 70px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    flex-shrink: 0;
    border: none;
    background: transparent;
    filter: none;
    margin-top: 100px;
}

.char-arrow-left {
    position: absolute;
    left: 5%;
    z-index: 10;
}

.char-arrow-right {
    position: absolute;
    right: 5%;
    z-index: 10;
}

.char-arrow:hover {
    transform: scale(1.1);
}

.char-arrow:active {
    transform: scale(0.95);
}

/* Monitor transition */
.monitor-screen.char-fade {
    opacity: 0;
    transform: translateX(20px);
}

.monitor-screen {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Monitor Frame */
.monitor {
    margin: 0 auto;
    padding-top: 100px;
    position: relative;
    z-index: 1;
    height: 600px;
}

.char-slot-img {
    display: block;
    width: 1520px;
    height: auto;
    position: absolute;
    top: 410px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    max-width: none;
}

.monitor-screen {
    position: absolute;
    top: 120px;
    right: 5%;
    width: 600px;
    max-width: none;
    background: transparent;
    border: none;
    z-index: 1;
}

.char-standalone-img {
    position: absolute;
    top: 19px;
    right: -160px;
    height: 145%;
    width: auto !important;
    max-width: none !important;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.28s ease;
    will-change: opacity;
}

.char-standalone-img.is-switching {
    opacity: 0.12;
}

.char-img-wrap {
    display: none;
}

.char-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}


.char-img-wrap:hover img {
    transform: scale(1.03);
}

.char-zoom-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.char-zoom-btn span {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.7);
}

.char-zoom-btn:hover {
    border-color: #fff;
    background: rgba(0,0,0,0.7);
}

/* 돋보기 버튼 (character_info.png) */
.char-info-btn {
    position: relative;
    display: block;
    margin: 25px auto 0 36%;
    width: 130px;
    height: auto;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.char-info-btn:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* 캐릭터 전신 팝업 */
.char-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.char-popup-overlay.active {
    display: flex;
}

.char-popup-img {
    max-height: calc(90vh / var(--page-zoom, 1));
    max-width: calc(90vw / var(--page-zoom, 1));
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* Right side info */
.char-info {
    padding: 0;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* Name bar */
.char-name-bar {
    background: transparent;
    border-bottom: none;
    position: absolute;
    top: -5px;
    left: 580px;
    right: auto;
    min-width: 520px;
}

.char-name-bar::before {
    display: none;
}

.char-name-bar h3 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: #000;
    font-style: italic;
    white-space: nowrap;
}

/* Affiliation */
.char-affiliation {
    position: absolute;
    top: 105px;
    left: 815px;
    right: auto;
    width: 300px;
    height: 56px;
    display: flex;
    align-items: center;
    font-size: 2rem;
    color: #fff;
    letter-spacing: 3px;
    border-bottom: none;
    text-align: left;
    white-space: nowrap;
}

/* Age / Gender */
.char-meta {
    position: absolute;
    top: 180px;
    right: -75px;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 2px;
}

/* Personality tags */
.char-personality {
    position: absolute;
    top: 212px;
    right: -232px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: none;
}

.char-personality span {
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 1px;
}

.char-personality span + span::before {
    content: '-';
    margin-right: 8px;
    opacity: 0.4;
}

/* Quote */
.char-quote {
    position: absolute;
    top: 280px;
    left: 595px;
    right: auto;
    width: 500px;
    height: 52px;
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    line-height: 1.2;
    color: #fff;
    letter-spacing: 2px;
    border-bottom: none;
    background: transparent;
    text-align: left;
    white-space: nowrap;
}

/* Description */
.char-desc {
    position: absolute;
    top: 370px;
    right: -550px;
    max-width: 100%;
}

.char-desc p {
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: normal;
}

/* Monitor Stand */
.monitor-stand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stand-neck {
    width: 45px;
    height: 30px;
    background: linear-gradient(to bottom, #222238, #1a1a30);
    border-left: 2px solid #333;
    border-right: 2px solid #333;
}

.stand-base {
    width: 130px;
    height: 12px;
    background: linear-gradient(to bottom, #222238, #1a1a30);
    border-radius: 0 0 6px 6px;
    border: 2px solid #333;
    border-top: none;
}

/* ================================================
   GAME SYSTEM SECTION
   ================================================ */
.game-system {
    position: relative;
    padding: 50px 5%;
    padding-top: 30px;
    z-index: 1;
    background: transparent;
    overflow: hidden;
}

.game-system .section-heading {
    font-family: 'PuradakGentleGothic', sans-serif;
    font-size: clamp(2.4rem, 4.7vw, 4.0rem);
    font-weight: 500;
    letter-spacing: 2px;
}

.game-system .section-heading::after {
    display: none;
}

/* Parallax image layers */
.mist-side-img {
    position: absolute;
    top: 400px;
    left: 0;
    width: 100%;
    height: 200%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
    max-width: none;
}

/* Subtitle area */
.gs-subtitle {
    margin-top: 120px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gs-subtitle-img {
    width: 1050px;
    max-width: 100%;
    height: auto;
}

.gs-tagline {
    text-align: left;
}

.gs-sub-text {
    text-align: right;
}

.gs-tag-bg {
    background: rgba(50, 70, 130, 0.5);
    padding: 8px 18px;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    display: inline-block;
}

.gs-highlight {
    color: var(--highlight);
    font-weight: 800;
    font-size: 1.3em;
}

/* Diagram */
.gs-diagram {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Tree connector lines */
.gs-tree-img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 10px auto 0;
}

/* Cards row */
.gs-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.gs-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    margin-top: -100px;
}

.gs-card-label {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Dohyun', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #000;
    letter-spacing: 0.8px;
    text-align: center;
    white-space: nowrap;
}

.gs-card:hover {
    transform: translateY(-4px);
}

.gs-card-img {
    width: 300px;
    max-width: none;
    height: auto;
}

/* 슬롯 개별 위치 조절 (필요시 translateX로 좌우 미세 조절) */

.gs-lore {
    text-align: center;
    font-family: 'Dohyun', sans-serif;
    font-size: clamp(1.4rem, 2.8vw, 2.3rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.2;
    margin-top: 100px;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

/* ================================================
   FOOTER
   ================================================ */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 5% 40px;
    background: transparent;
    border-top: none;
}

.bg-wrapper footer,
.bg-wrapper-2 footer {
    margin-top: auto;
    padding-bottom: 40px;
}

.footer-lore {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 30px;
}

.copyright {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ================================================
   INFO PAGE - HERO BANNER
   ================================================ */
/* Info page background wrapper */
.bg-wrapper-2 {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: -450px;
    padding-top: 450px;
    display: flex;
    flex-direction: column;
}

.bg-wrapper-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background_2.webp') top center / cover no-repeat;
    z-index: -1;
    pointer-events: none;
}

.bg-wrapper-2 .info-section {
    background: transparent;
}

.bg-wrapper-2 .info-section-alt {
    background: transparent;
}

/* Info page title images */
.info-title-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 70px;
    margin-top: 230px;
}

.info-title-img {
    width: 560px;
    max-width: none;
    height: auto;
}

.info-title-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'PuradakGentleGothic', sans-serif;
    font-size: clamp(2.0rem, 4.3vw, 2.7rem);
    font-weight: 700;
    letter-spacing: 6px;
    color: #000;
    z-index: 1;
}

.info-hero {
    position: relative;
    height: calc(35vh / var(--page-zoom, 1));
    min-height: 250px;
    background: url('bg_out.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.info-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,10,21,0.6) 0%,
        rgba(10,10,21,0.4) 50%,
        rgba(10,10,21,1) 100%
    );
    z-index: 1;
}

.info-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.info-hero-content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 10px;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.info-hero-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    opacity: 0.7;
}

/* ================================================
   INFO PAGE - SECTIONS
   ================================================ */
.info-section {
    position: relative;
    padding: 80px 0;
    z-index: 1;
    background: transparent;
}

.info-section-alt {
    background: transparent;
}

.info-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5%;
    position: relative;
    z-index: 1;
}

.info-section-desc {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* ================================================
   INFO PAGE - MEDIA LAYOUT
   ================================================ */
.media-layout {
    display: flex;
    gap: 150px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 50px;
}

.media-column {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
}

.media-content {
    position: relative;
    display: flex;
    justify-content: center;
}

.media-back-img {
    width: 105%;
    max-width: none;
    height: auto;
}

.media-gallery-wrap {
    position: absolute;
    top: 0%;
    left: 0%;
    right: 0%;
    bottom: 5%;
    overflow-y: auto;
    overflow-x: hidden;
}

.media-gallery-wrap::-webkit-scrollbar {
    width: 10px;
}

.media-gallery-wrap::-webkit-scrollbar-button:vertical:start:decrement {
    height: 50px;
    display: block;
    background: transparent;
}

.media-gallery-wrap::-webkit-scrollbar-button:vertical:end:increment {
    height: 30px;
    display: block;
    background: transparent;
}

.media-gallery-wrap::-webkit-scrollbar-track {
    background: rgba(66, 61, 61, 0.5);
    border-radius: 5px;
}

.media-gallery-wrap::-webkit-scrollbar-thumb {
    background: #fff;
    border-radius: 5px;
}

.sns-content {
    position: relative;
    display: flex;
    justify-content: center;
}

.sns-back-img {
    width: 90%;
    height: auto;
    margin-top: 40px;
}

.sns-icons {
    position: absolute;
    top: 20%;
    left: 15%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sns-icon {
    width: 50px;
    height: auto;
    transition: transform 0.3s ease;
}

.sns-icon:hover {
    transform: scale(1.15);
}

.sns-column {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
}

/* Gallery grid (left) */

.media-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    background: transparent;
    padding: 30px;
}

.media-gallery-item {
    background: #fff;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    max-width: 200px;
}

.media-gallery-item.hidden {
    display: block;
}

.media-gallery-item:hover img {
    opacity: 0.6;
}

.media-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('media_view_button.png') center / 80% auto no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.media-gallery-item:hover::after {
    opacity: 1;
}

.media-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

/* Gallery page navigation */
.gallery-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 0;
    background: #000;
}

.gallery-nav.active {
    display: flex;
}

.gallery-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.gallery-page {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* ================================================
   LIGHTBOX
   ================================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: calc(85vw / var(--page-zoom, 1));
    max-height: calc(80vh / var(--page-zoom, 1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(80vh / var(--page-zoom, 1));
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 10;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 15px;
    letter-spacing: 2px;
}

/* SNS list (right) */
.media-sns-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.media-sns-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    flex: 1;
}

.media-sns-item:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
}

.media-sns-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--accent);
    transition: all 0.3s ease;
}

.media-sns-item:hover .media-sns-icon {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.media-sns-item h3 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ================================================
   INFO PAGE - ABOUT
   ================================================ */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 40px;
    margin-top: 200px;
}

.about-top {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 50px;
}

.about-logo-area {
    position: absolute;
    top: 0;
    left: -55%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-logo-img {
    width: 520px;
    max-width: none;
    height: auto;
}

.about-logo-label {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.about-name-area {
    position: absolute;
    top: 200px;
    right: 14%;
}

.about-name-img {
    width: 350px;
    max-width: none;
    height: auto;
}

.about-quote {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
    font-size: 2.0rem !important;
    color: #fff;
    font-style: italic;
    letter-spacing: 1px;
    margin-top: 0px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    top: 130px;
    left: 230px;
    white-space: nowrap;
}

.about-desc {
    text-align: center;
    margin-top: 215px;
    margin-bottom: 200px;
    width: min(120%, 980px);
}

.about-desc p {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
    font-size: 1.6rem;
    color: #fff;
    line-height: 1.5;
    letter-spacing: 0.4px;
}

/* ================================================
   INFO PAGE - TEAM
   ================================================ */
.team-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-slots {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: -20px;
}

.member-slot-img {
    width: 95%;
    height: auto;
}

.member-line-img {
    width: 1065px;
    max-width: none;
    height: auto;
    margin-top: 0;
    margin-left: 14px;
}

.team-heading {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--text-primary);
    padding: 100px 40px;
    margin-top: 500px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.team-member {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 250px;
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.team-member:hover {
    transform: translateY(-8px);
    filter: brightness(1.2);
}

.member-text {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 80%;
}

.member-title {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.0rem;
    font-weight: 450;
    color: #fff;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.member-name {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 450;
    color: #fff;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.member-detail {
    font-family: 'OneStoreMobileGothicBody', sans-serif;
    position: absolute;
    top: 225px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 450;
    color: #fff;
    line-height: 1.5;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.member-like {
    display: none;
}

/* ================================================
   INFO PAGE - CONTACT FORM
   ================================================ */
section#contact {
    margin-top: -440px;
}

/* Mailbox style contact form */
.mailbox-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    width: 1200px;
    max-width: none;
    margin-top: -10px;
    margin-left: calc(50% - 600px);
}

.mailbox-back-img {
    width: 100%;
    max-width: none;
    height: auto;
}

.mailbox-form {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    bottom: 5%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mailbox-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mailbox-row label {
    font-family: 'Dohyun', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 2px;
    width: 90px;
    min-width: 90px;
    flex: 0 0 90px;
}

.mailbox-input-wrap {
    position: relative;
    flex: 1;
}

.mailbox-textbox-img {
    width: 100%;
    height: auto;
    display: block;
}

.mailbox-input-wrap input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 15px;
    font-size: 1.5rem;
    color: #000;
    font-family: 'Pretendard', sans-serif;
}

.mailbox-row-full {
    flex: 1;
}

.mailbox-textarea-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.mailbox-textarea-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.mailbox-textarea-wrap textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 15px;
    font-size: 1.5rem;
    color: #000;
    font-family: 'Pretendard', sans-serif;
    resize: none;
}

.mailbox-submit {
    display: flex;
    justify-content: center;
}

.mailbox-submit button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
    position: relative;
}

.mailbox-submit button:hover {
    transform: scale(1.05);
}

.mailbox-send-img {
    width: 250px;
    height: auto;
}

.mailbox-send-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Dohyun', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 4px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

.contact-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.contact-form-row label {
    flex-shrink: 0;
    width: 70px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.contact-form-row input {
    flex: 1;
    height: 38px;
    padding: 0 14px;
    font-size: 0.85rem;
    font-family: 'Pretendard', sans-serif;
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.contact-form-row-full {
    flex-direction: column;
    align-items: stretch;
}

.contact-form-row-full textarea {
    width: 100%;
    padding: 14px;
    font-size: 0.85rem;
    font-family: 'Pretendard', sans-serif;
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    outline: none;
    resize: vertical;
    min-height: 140px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-row-full textarea::placeholder {
    color: var(--text-dim);
}

.contact-form-row-full textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.contact-form-submit {
    justify-content: flex-end;
    margin-bottom: 0;
    margin-top: 8px;
}

.contact-form-submit button {
    padding: 10px 32px;
    font-size: 0.85rem;
    font-family: 'Pretendard', sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form-submit button:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* ================================================
   SCROLL REVEAL ANIMATION
   ================================================ */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for timeline items */
.timeline-item.reveal:nth-child(3) { transition-delay: 0s; }
.timeline-item.reveal:nth-child(4) { transition-delay: 0.1s; }
.timeline-item.reveal:nth-child(5) { transition-delay: 0.2s; }
.timeline-item.reveal:nth-child(6) { transition-delay: 0.3s; }

/* ================================================
   MOBILE / NARROW OVERRIDES (is-mobile)
   모바일 뷰포트=1920px이므로 0.195배(375px폰) 축소됨
   nav 요소를 ~5배 키워서 실제 화면에서 적절하게 보이게 함
   ================================================ */
html.is-mobile {
    --header-height: 320px;
}

html.is-mobile .logo img {
    height: 300px;
}

html.is-mobile .hamburger {
    display: flex;
    gap: 24px;
    padding: 50px;
}

html.is-mobile .hamburger span {
    width: 140px;
    height: 10px;
    border-radius: 5px;
}

html.is-mobile .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(24px, 24px);
}

html.is-mobile .hamburger.active span:nth-child(2) {
    opacity: 0;
}

html.is-mobile .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(24px, -24px);
}

html.is-mobile nav ul {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10,10,21,0.97);
    flex-direction: column;
    padding: 50px 0;
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(15px);
}

html.is-mobile nav ul.active {
    transform: translateX(0);
}

html.is-mobile nav ul li {
    padding: 65px 8%;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

html.is-mobile nav ul li a {
    font-family: 'Dohyun', sans-serif;
    font-size: 5.5rem;
    display: block;
    opacity: 0.7;
    letter-spacing: 6px;
}

html.is-mobile .bg-wrapper {
    zoom: 1;
}

html.is-mobile .bg-wrapper-2 {
    zoom: 1;
}

/* ================================================
   RESPONSIVE - TABLET
   ================================================ */
@media (max-width: 900px) {
    .fog-visual {
        flex-direction: column;
        align-items: center;
    }

    .polaroid-inner img {
        width: 260px;
        height: 180px;
    }

    .fog-desc-box {
        text-align: center;
        font-size: 0.8rem;
    }

    .pg-title h2 {
        font-size: 2.5rem;
    }
}

/* ================================================
   RESPONSIVE - MOBILE
   ================================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    /* Nav */
    .hamburger {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: rgba(10,10,21,0.97);
        flex-direction: column;
        padding: 15px 0;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        backdrop-filter: blur(15px);
    }

    nav ul.active {
        transform: translateX(0);
    }

    nav ul li {
        padding: 14px 5%;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    nav ul li a {
        font-family: 'Dohyun', sans-serif;
        font-size: 0.9rem;
        display: block;
        opacity: 0.7;
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

    /* Fog Story */
    .fog-story {
        padding: 30px 0 60px;
    }

    .fog-intro {
        margin-bottom: 50px;
    }

    .fog-main-title {
        font-size: 3rem;
    }

    .fog-visual {
        flex-direction: column;
        gap: 30px;
    }

    .polaroid-frame {
        transform: rotate(-2deg);
    }

    .polaroid-inner img {
        width: 220px;
        height: 155px;
    }

    /* Timeline - single column */
    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        margin-left: 0;
        padding-left: 30px;
        padding-right: 15px;
        text-align: left;
    }

    .timeline-line {
        left: 10px;
    }

    .tl-origin-circle {
        width: 110px;
        height: 110px;
    }

    .tl-final-box {
        padding: 25px 20px;
    }

    /* Door Tech */
    .place-guide {
        padding: 60px 5%;
    }

    .pg-layout {
        flex-direction: column;
    }

    .pg-image {
        flex: none;
    }

    .pg-title h2 {
        font-size: 2rem;
    }

    .pg-title h3 {
        font-size: 1.2rem;
    }

    /* Character */
    .character-section {
        padding: 70px 2%;
    }

    .char-slider {
        gap: 8px;
    }

    .char-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .monitor-screen {
        flex-direction: column;
        height: 750px;
    }

    .char-img-wrap {
        flex: none;
        height: 300px;
    }

    .char-info {
        padding: 0;
    }

    .char-name-bar h3 {
        font-size: 1.1rem;
    }

    .char-affiliation,
    .char-meta,
    .char-personality,
    .char-quote,
    .char-desc {
        padding-left: 18px;
        padding-right: 18px;
    }

    /* Game System */
    .game-system {
        padding: 70px 5%;
    }

    .parallax-layer {
        width: 55%;
        opacity: 0.7;
    }

    .gs-cards {
        gap: 10px;
    }

    .gs-card {
        padding: 20px 10px 16px;
        border-radius: 10px;
    }

    .gs-card-icon {
        width: 55px;
        height: 55px;
        margin-bottom: 10px;
    }

    .gs-card-label {
        font-size: 0.7rem;
    }

    .gs-subtitle {
        margin-bottom: 25px;
    }

    /* Section headings */
    .section-heading {
        font-size: 1.3rem;
        letter-spacing: 5px;
        margin-bottom: 35px;
    }

    /* Footer */
    footer {
        padding: 40px 5% 30px;
    }

    .footer-lore {
        font-size: 0.82rem;
    }

    /* Section fog */
    .section-fog-overlay {
        width: 250px;
        height: 250px;
    }

    /* Info Page */
    .info-hero {
        height: 28vh;
        min-height: 200px;
    }

    .info-section {
        padding: 60px 0;
    }

    .media-layout {
        flex-direction: column;
    }

    .media-sns-list {
        flex: none;
        flex-direction: row;
    }

    .media-sns-item {
        padding: 15px 10px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 30px;
    }

    .about-logo-area {
        width: 120px;
        height: 120px;
    }

    .about-tags {
        justify-content: center;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px 14px;
    }

    .team-photo {
        width: 70px;
        height: 70px;
    }

    .team-heading {
        margin-top: 45px;
    }

    .contact-form {
        padding: 25px 18px;
    }

    .contact-form-row label {
        width: 55px;
        font-size: 0.8rem;
    }
}

/* ================================================
   RESPONSIVE - SMALL MOBILE
   ================================================ */
@media (max-width: 480px) {
    .fog-main-title {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }

    .fog-statement .statement-big {
        font-size: 1.4rem;
        letter-spacing: 3px;
    }

    .polaroid-inner img {
        width: 180px;
        height: 126px;
    }

    .connector-icon {
        width: 60px;
        height: 60px;
    }

    .connector-icon img {
        width: 35px;
        height: 35px;
    }

    .tl-content {
        padding: 15px 18px;
    }

    .tl-content h4 {
        font-size: 0.95rem;
        letter-spacing: 2px;
    }

    .tl-content p {
        font-size: 0.78rem;
    }

    .monitor-bezel {
        border-width: 2px;
        border-radius: 6px 6px 0 0;
    }

    .stand-neck {
        width: 35px;
        height: 25px;
    }

    .stand-base {
        width: 100px;
        height: 10px;
    }

    .gs-card-icon {
        width: 45px;
        height: 45px;
    }

    .gs-card-label {
        font-size: 0.65rem;
    }

    .gs-tree {
        height: 50px;
    }

    .gs-tree-v {
        height: 25px;
    }

    .gs-tree-branch-left,
    .gs-tree-branch-center,
    .gs-tree-branch-right {
        top: 25px;
        height: 25px;
    }

    .gs-tree-h {
        top: 25px;
    }
}

/* ================================================
   PAGE-SCALED OVERRIDES
   zoom/뷰포트 스케일링이 활성화되면 반응형 CSS의
   레이아웃 변경을 무효화하여 항상 데스크탑 레이아웃 유지
   ================================================ */
html.page-scaled .fog-intro {
    max-width: 1080px;
    padding-top: 300px;
}

html.page-scaled .fog-aside {
    font-size: 40px;
    top: 54%;
    left: 38%;
}

html.page-scaled .fog-line-overlay {
    font-size: 40px;
    right: 36%;
    top: 71%;
}

html.page-scaled .fog-visual {
    flex-direction: row;
}

html.is-mobile .fog-visual-img {
    max-width: 100%;
    margin-left: -1%;
    margin-top: -4%;
}

html.is-mobile .prism-img-overlay {
    width: auto;
    max-width: 60%;
    top: -80px;
    left: 29.5%;
    transform: translateX(-50%);
}

html.page-scaled .fog-desc-box {
    font-size: 1.33rem;
    right: 11%;
    top: 44%;
    max-width: 55%;
    padding: 22px 28px;
    line-height: 1;
    text-align: left;
}

html.page-scaled .prism-textbox-overlay {
    right: 10%;
    top: 47.7%;
    width: 41%;
    max-width: 41%;
}

html.page-scaled .fog-desc-box p + p {
    margin-top: 6px;
}

html.page-scaled .timeline-item,
html.page-scaled .timeline-item.left,
html.page-scaled .timeline-item.right {
    width: 50%;
}

html.page-scaled .timeline-item.left {
    padding-right: 40px;
    padding-left: 0;
    text-align: right;
    margin-left: 0;
}

html.page-scaled .timeline-item.right {
    margin-left: 50%;
    padding-left: 40px;
    padding-right: 0;
    text-align: left;
}

html.page-scaled .tl-final-box {
    padding: 22px 45px;
}

html.page-scaled .hero {
    min-height: 600px;
}

html.page-scaled .place-guide {
    padding: 0;
    padding-top: 350px;
    overflow: hidden;
}

html.page-scaled .pg-back-img {
    width: 73%;
}

html.page-scaled .pg-lobby-img {
    width: 40.8%;
    top: 63%;
    left: 34.6%;
}

html.page-scaled .pg-title-img {
    top: 370px;
    right: 13%;
    width: 30%;
}

html.page-scaled .pg-action-bars {
    top: 805px;
    right: 18.3%;
    gap: 14px;
}

html.page-scaled .pg-action-btn img {
    width: 78px;
}

html.page-scaled .character-section {
    padding: 60px 5% 200px;
}

html.page-scaled .monitor-screen {
    height: auto;
}

html.page-scaled .char-slider {
    gap: 0;
}

html.page-scaled .char-arrow {
    width: 70px;
    height: auto;
}

html.page-scaled .char-name-bar h3 {
    font-size: 4rem;
}

html.page-scaled .char-affiliation {
    font-size: 2rem;
}

html.page-scaled .char-meta {
    font-size: 1.2rem;
}

html.page-scaled .char-personality span {
    font-size: 1.3rem;
}

html.page-scaled .char-quote {
    font-size: 1.6rem;
}

html.page-scaled .char-desc p {
    font-size: 1.2rem;
}

html.page-scaled .char-affiliation,
html.page-scaled .char-meta,
html.page-scaled .char-personality,
html.page-scaled .char-quote,
html.page-scaled .char-desc {
    padding-left: 0;
    padding-right: 0;
}

html.page-scaled .char-img-wrap {
    height: auto;
}

html.page-scaled .game-system {
    padding: 50px 5%;
    padding-top: 30px;
}

html.page-scaled .gs-cards {
    gap: 40px;
}

html.page-scaled .gs-card-label {
    font-size: 1.5rem;
}

html.page-scaled .gs-lore {
    font-size: clamp(1.4rem, 2.8vw, 2.3rem);
    margin-top: 100px;
    letter-spacing: 1px;
}

html.page-scaled .section-heading {
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    letter-spacing: 8px;
    margin-bottom: 50px;
}

html.page-scaled .char-title-wrap .section-heading {
    font-size: clamp(2.0rem, 4.3vw, 2.7rem);
    letter-spacing: 1.5px;
}

html.page-scaled .game-system .section-heading {
    font-family: 'PuradakGentleGothic', sans-serif;
    font-size: clamp(2.4rem, 4.7vw, 4.0rem);
    font-weight: 500;
    letter-spacing: 2px;
}

html.page-scaled .section-fog-overlay {
    width: 400px;
    height: 400px;
}

html.page-scaled .media-layout {
    flex-direction: row;
}

html.page-scaled .info-section {
    padding: 80px 0;
}

html.page-scaled .info-hero {
    min-height: 250px;
}

html.page-scaled footer {
    padding: 100px 5% 40px;
}

/* 모바일 전용 보정 (page-scaled 뒤에 배치) */
html.is-mobile.page-scaled .timeline-back-wrapper::before {
    background-size: 95%;
    top: -155px;
}

html.is-mobile.page-scaled .tl-origin {
    transform: translateY(-10px);
}

html.is-mobile.page-scaled .tl-branch-end {
    top: -55px !important;
}

html.is-mobile.page-scaled .tl-branch-1,
html.is-mobile.page-scaled .tl-branch-2,
html.is-mobile.page-scaled .tl-branch-3,
html.is-mobile.page-scaled .tl-branch-4 {
    max-width: 128%;
}

html.is-mobile.page-scaled .tl-final-box {
    transform: translateY(10px);
}

html.is-mobile.page-scaled .tl-content h4,
html.is-mobile.page-scaled .tl-final-box h4 {
    font-size: 1.8rem;
    line-height: 1.12;
    transform: translateY(-6px);
}

html.is-mobile.page-scaled .tl-final-box h4 {
    transform: translateY(-28px);
}

html.is-mobile.page-scaled .tl-content p,
html.is-mobile.page-scaled .tl-final-box p {
    font-size: 1.8rem;
    line-height: 1.24;
    transform: translateY(-6px);
}

html.is-mobile.page-scaled .tl-final-box p {
    transform: translateY(-28px);
}

html.is-mobile.page-scaled .tl-final-big {
    font-size: 2.3rem !important;
    line-height: 1.16;
    transform: translateY(-32px);
}

html.is-mobile.page-scaled .char-meta {
    font-size: 1.6rem;
    top: 170px;
    right: -100px;
}

html.is-mobile.page-scaled .char-personality {
    top: 215px;
    right: -278px;
}

html.is-mobile.page-scaled .char-personality span {
    font-size: 1.6rem;
}

html.is-mobile.page-scaled .char-arrow-left {
    left: -5%;
}

html.is-mobile.page-scaled .char-arrow-right {
    right: -5%;
}

html.is-mobile.page-scaled .char-title-wrap .section-heading {
    font-size: 2.5rem;
    letter-spacing: 1.5px;
}

html.is-mobile.page-scaled .char-title-img {
    max-width: 45%;
}

html.is-mobile.page-scaled .char-info-btn {
    margin-left: 31%;
}

html.is-mobile.page-scaled .fog-desc-box {
    right: 1%;
    top: 52%;
    max-width: 75%;
    font-size: 1.78rem;
    line-height: 1.16;
    padding: 22px 28px;
}

html.is-mobile.page-scaled .prism-textbox-overlay {
    right: 2%;
    top: 55%;
    width: 70%;
    max-width: 70%;
}

html.is-mobile .desktop-only-line {
    display: block;
}

html.is-mobile .mobile-only-line {
    display: none;
}

html.is-mobile.page-scaled .pg-back-img {
    width: 100%;
}

html.is-mobile.page-scaled .pg-lobby-img {
    width: 56.5%;
    top: 62%;
    left: 28.8%;
}

html.is-mobile.page-scaled .pg-title-img {
    width: 41%;
    top: 365px;
    right: 0%;
}

html.is-mobile.page-scaled .pg-action-bars {
    top: 810px;
    right: 1.5%;
    gap: 10px;
}

html.is-mobile.page-scaled .pg-action-btn img {
    width: 105px;
}

html.is-mobile.page-scaled .pg-desc {
    top: 400px;
    right: 0.8%;
    max-width: 40%;
}

html.is-mobile.page-scaled .pg-desc p {
    font-size: 2rem;
}

html.is-mobile.page-scaled .pg-desc p:first-child {
    font-size: 2.5rem;
}

html.is-mobile.page-scaled .char-quote {
    font-size: 2rem;
    right: -485px;
    top: 280px;
}

html.is-mobile.page-scaled .char-desc {
    top: 350px;
    right: -600px;
    max-width: 110%;
}

html.is-mobile.page-scaled .char-desc p {
    font-size: 1.6rem;
    line-height: 1.4;
}

html.is-mobile.page-scaled .gs-card-label {
    font-size: 1.7rem;
}

html.is-mobile.page-scaled .gs-lore {
    font-size: 2.5rem;
    line-height: 1.28;
}

html.is-mobile.page-scaled .copyright {
    font-size: 1.1rem;
}

html.is-mobile.page-scaled .mist-side-img {
    top: 800px;
    height: auto;
    object-fit: contain;
}

html.is-mobile.page-scaled .bg-wrapper-2::before {
    background-position: center top !important;
    background-size: 140% auto !important;
}

/* INFO 모바일: SNS 박스 숨기고 아이콘만 MEDIA 아래 배치 */
html.is-mobile.page-scaled .bg-wrapper-2 .media-layout {
    display: block;
    margin-top: -100px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-column {
    max-width: 100%;
    margin: 0 auto;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-back-img {
    width: 145%;
}

html.is-mobile.page-scaled .bg-wrapper-2 .sns-column {
    flex: none;
    width: auto;
    margin-top: 30px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .sns-column .info-title-wrap,
html.is-mobile.page-scaled .bg-wrapper-2 .sns-back-img {
    display: none;
}

html.is-mobile.page-scaled .bg-wrapper-2 .sns-content {
    position: static;
    display: block;
}

html.is-mobile.page-scaled .bg-wrapper-2 .sns-icons {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 56px;
    margin: 0 auto;
}

html.is-mobile.page-scaled .bg-wrapper-2 .sns-icon {
    width: 80px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-gallery-wrap {
    top: 0%;
    right: -18%;
    bottom: 6%;
    left: -10%;
    padding-right: 40px;
    box-sizing: border-box;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
    padding: 0;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-gallery-item {
    max-width: none;
    width: 100%;
    aspect-ratio: 1 / 1;
}

html.is-mobile.page-scaled .bg-wrapper-2 .media-gallery-wrap::-webkit-scrollbar {
    width: 22px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-desc p {
    font-size: 1.9rem;
    line-height: 1.55;
}

/* INFO ABOUT 모바일 개별 튜닝 포인트 */
html.is-mobile.page-scaled .bg-wrapper-2 {
    --m-about-content-mt: 180px;
    --m-about-content-px: 20px;
    --m-about-top-h: 280px;
    --m-about-top-mb: 40px;

    --m-about-logo-top: -300px;
    --m-about-logo-left: -40%;
    --m-about-logo-w: 500px;

    --m-about-name-top: -10px;
    --m-about-name-right: 20%;
    --m-about-name-w: 350px;

    --m-about-quote-top:-60px;
    --m-about-quote-left: 240px;
    --m-about-quote-size-rem: 2.2;

    --m-about-desc-mt: -20px;
    --m-about-desc-mb: 220px;
    --m-about-desc-maxw: 150%;
    --m-about-desc-size-rem: 2.0;
    --m-about-desc-lh: 1.55;
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-content {
    margin-top: var(--m-about-content-mt);
    padding-left: var(--m-about-content-px);
    padding-right: var(--m-about-content-px);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-top {
    height: var(--m-about-top-h);
    margin-bottom: var(--m-about-top-mb);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-logo-area {
    top: var(--m-about-logo-top);
    left: var(--m-about-logo-left);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-logo-img {
    width: var(--m-about-logo-w);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-name-area {
    top: var(--m-about-name-top);
    right: var(--m-about-name-right);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-name-img {
    width: var(--m-about-name-w);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-quote {
    top: var(--m-about-quote-top);
    left: var(--m-about-quote-left);
    font-size: calc(var(--m-about-quote-size-rem) * 1rem) !important;
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-desc {
    margin-top: var(--m-about-desc-mt);
    margin-bottom: var(--m-about-desc-mb);
    max-width: var(--m-about-desc-maxw);
}

html.is-mobile.page-scaled .bg-wrapper-2 .about-desc p {
    font-size: calc(var(--m-about-desc-size-rem) * 1rem);
    line-height: var(--m-about-desc-lh);
    white-space: nowrap;
}

html.is-mobile.page-scaled .bg-wrapper-2 .team-slots {
    gap: 20px;
    margin-top: 30px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .team-member {
    width: 270px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .member-slot-img {
    width: 100%;
}

html.is-mobile.page-scaled .bg-wrapper-2 .member-line-img {
    width: 1165px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .member-title {
    font-size: 2.3rem;
    top: 55px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .member-name {
    font-size: 2.0rem;
    top: 135px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .member-detail {
    font-size: 1.6rem;
    top: 250px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-wrap {
    width: 1360px;
    margin-top: 20px;
    margin-left: calc(50% - 680px);
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-form {
    gap: 14px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-row label {
    font-size: 2.0rem;
    width: 96px;
    min-width: 96px;
    flex: 0 0 96px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-input-wrap input {
    font-size: 2.0rem;
    padding: 0 18px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-textarea-wrap textarea {
    font-size: 2.0rem;
    padding: 18px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-send-img {
    width: 300px;
}

html.is-mobile.page-scaled .bg-wrapper-2 .mailbox-send-text {
    font-size: 1.65rem;
}

html.is-mobile.page-scaled .bg-wrapper-2 section#contact {
    padding-bottom: 500px;
}

html.is-mobile.page-scaled .lightbox-close {
    top: 26px;
    right: 26px;
    font-size: 10rem;
}

html.is-mobile.page-scaled .lightbox-prev,
html.is-mobile.page-scaled .lightbox-next {
    width: 90px;
    height: 90px;
    font-size: 5rem;
}

html.is-mobile.page-scaled .lightbox-prev { left: 26px; }
html.is-mobile.page-scaled .lightbox-next { right: 26px; }

html.is-mobile.page-scaled .lightbox-counter {
    font-size: 2.2rem;
    letter-spacing: 3px;
}
