/* ===========================================
   base.css — 모든 덱이 공유하는 공통 스타일 (모노크롬 다크)
   사용: <link rel="stylesheet" href="../_asset/css/base.css">
   덱 전용 스타일만 각 덱의 <style>에 추가한다.
   =========================================== */

/* ---------- FONTS (Pretendard, 이 파일 기준 상대경로) ---------- */
@font-face {
    font-family: 'Pretendard';
    src: url('../font/pretendard/Pretendard-Light.woff2') format('woff2'),
         url('../font/pretendard/Pretendard-Light.woff') format('woff');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../font/pretendard/Pretendard-Medium.woff2') format('woff2'),
         url('../font/pretendard/Pretendard-Medium.woff') format('woff');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url('../font/pretendard/Pretendard-Bold.woff2') format('woff2'),
         url('../font/pretendard/Pretendard-Bold.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../font/pretendard/Pretendard-ExtraBold.woff2') format('woff2'),
         url('../font/pretendard/Pretendard-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Pretendard';
    src: url('../font/pretendard/Pretendard-Black.woff2') format('woff2'),
         url('../font/pretendard/Pretendard-Black.woff') format('woff');
    font-weight: 900;
    font-display: swap;
}

/* 다국어 — 일본어·힌디어 글자만 Noto Sans 로 표시 (해당 언어를 볼 때만 파일을 불러온다) */
@font-face {
    font-family: 'Noto Sans JP';
    src: url('../font/noto-sans/NotoSansJP-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'Noto Sans SC';
    src: url('../font/noto-sans/NotoSansSC-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'Noto Sans Devanagari';
    src: url('../font/noto-sans/NotoSansDevanagari-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

/* Montserrat — 영어 디스플레이용 가변 웹폰트(굵기 100~900), 서브셋별 unicode-range */
@font-face {
    font-family: 'Montserrat';
    src: url('../font/montserrat/montserrat-latin-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../font/montserrat/montserrat-latin-ext-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../font/montserrat/montserrat-vietnamese-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../font/montserrat/montserrat-cyrillic-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- TOKENS ---------- */
:root {
    /* Color */
    --bg-base: #000000;
    --bg-deep: #0d0d0d;
    --glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.16);
    --border-pill: rgba(255, 255, 255, 0.14);
    --ink: #ffffff;
    --ink-soft: #a3a3a3;
    --ink-muted: #737373;
    --ink-dim: #4d4d4d;   /* 비활성·배경처럼 물러나는 큰 글자 */
    --blue: #4d7cff;
    --point: var(--blue);   /* 텍스트 포인트 색 — 정말 중요한 곳에만 */
    --grad-text: linear-gradient(90deg, #ffffff 0%, #8ab4ff 55%, #a78bfa 100%);
    --grad-ring: linear-gradient(135deg, #ffffff, #737373);
    --glow: 0 0 40px rgba(255, 255, 255, 0.16);

    /* Font */
    --font-body: 'Pretendard', -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Montserrat', 'Pretendard', -apple-system, 'Helvetica Neue', Arial, sans-serif;  /* 영어 큰 제목용 (한글은 Pretendard로 폴백) */
    --fw-heavy: 700;
    --fw-body: 500;
    --fw-light: 300;

    /* Radius */
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-full: 9999px;

    /* Fluid type — 최대값이 데스크톱 기준, 화면 너비에 따라 비율이 변한다 */
    --fs-display: clamp(38px, 6.2vw, 80px);
    --fs-h1: clamp(28px, 4.4vw, 56px);
    --fs-h2: clamp(24px, 3.6vw, 44px);
    --fs-h3: clamp(19px, 2.4vw, 32px);
    --fs-body-lg: clamp(15px, 1.7vw, 20px);
    --fs-body: clamp(13px, 1.15vw, 16px);
    --fs-body-sm: clamp(12px, 1vw, 14px);
    --fs-label: clamp(10px, 0.85vw, 12px);

    /* 슬라이드 글자 역할 4가지 — 모든 덱은 화면 글자에 이 값만 쓴다 (원 안 글씨는 원 크기 비례 규칙을 따로 쓴다)
       태그: 제목 위 아주 작은 회색 글씨 / 제목: 장의 굵은 큰 제목 / 소제목: 단(칼럼)마다의 굵은 제목 / 설명: 제목 아래 회색 문장·목록 */
    --t-tag: var(--fs-label);
    --t-title: var(--fs-h2);
    --t-subhead: var(--fs-h3);
    --t-body: clamp(16px, 1.9vw, 26px);

    /* 원 크기 5단계 — 모든 원은 이 중 하나를 쓴다. 기준(--circle-size)은 화면 폭·높이에 맞춰 줄어들고,
       원 안 글자 크기도 이 기준에 맞춘다 (그래서 단계가 달라도 원 안 글자는 같다).
       280px = 공통 요소 + 페이지 태그·제목·부제 자리 */
    --circle-size: min(21.6vw, calc((100vh - 280px) * 0.45), 276px);
    --circle-size: min(21.6vw, calc((100svh - 280px) * 0.45), 276px);   /* 모바일: 주소창이 보일 때 높이 기준 */
    --c-xs: calc(var(--circle-size) * 0.5);    /* XS — 예비 (작은 표시 원) */
    --c-sm: calc(var(--circle-size) * 0.75);   /* S  — 예비 (원이 많은 장) */
    --c-md: var(--circle-size);                /* M  — 기본 (지표 원) */
    --c-lg: calc(var(--circle-size) * 1.1);    /* L  — 대상·시나리오 원 */
    --c-xl: calc(var(--circle-size) * 1.45);   /* XL — 원 안에 목록이 들어가는 원 (시가총액·타임프레임) */

    /* Fluid spacing */
    --space-xs: clamp(6px, 0.8vw, 8px);
    --space-sm: clamp(8px, 1.2vw, 12px);
    --space-md: clamp(12px, 1.6vw, 16px);
    --space-lg: clamp(16px, 2.4vw, 24px);
    --space-xl: clamp(20px, 3vw, 32px);
    --space-section: clamp(28px, 6vw, 80px);

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    /* Side rail — 화면 너비에 비례 */
    --edge: clamp(8px, 1.6vw, 32px);
    --logo-size: clamp(34px, 4vw, 96px);
    /* 안전 영역 — 슬라이드 위아래 여백. 헤더(로고·섹션 내비게이션·언어 선택)와 푸터(하단 바) 중 큰 쪽 + 숨 쉴 틈.
       위아래를 같게 두어 콘텐츠는 여전히 화면 정중앙에 오고, 헤더·푸터와 겹치지 않는다 */
    --safe-y: calc(var(--edge) + max(var(--logo-size), 44px) + clamp(8px, 1.4vw, 20px));
}
/* 폰: 설명 문장은 17px 고정 (화면 너비 비례로는 너무 작아진다) */
@media (max-width: 700px) {
    :root {
        --t-body: 17px;
        --circle-size: min(35vw, 19.5vh);
        --c-xl: calc(var(--circle-size) * 1.7);   /* 폰: 목록이 든 원은 읽히도록 조금 더 크게 */
    }
}

/* ---------- LANGUAGE ----------
   Pretendard 를 항상 1순위로 쓴다 (영어·한글·스페인어·인도네시아어·독일어·러시아어 글자와, 모든 언어의 숫자·기호는 전부 Pretendard).
   Pretendard 에 글자가 없는 것(일본어 한자, 중국어 한자, 힌디어)만 그 언어의 Noto Sans 로 채운다 */
:lang(ja) { --font-body: 'Pretendard', 'Noto Sans JP', -apple-system, 'Helvetica Neue', Arial, sans-serif; }
:lang(zh) { --font-body: 'Pretendard', 'Noto Sans SC', -apple-system, 'Helvetica Neue', Arial, sans-serif; }
:lang(hi) { --font-body: 'Pretendard', 'Noto Sans Devanagari', -apple-system, 'Helvetica Neue', Arial, sans-serif; }

/* ---------- LINE BREAK (줄바꿈은 단어·문장 단위로만) ----------
   한국어: 띄어쓰기(단어) 단위로만 줄바꿈. 일본어·중국어: 글자 사이에서 끊지 않고, 문구에 넣어 둔 끊는 자리(U+200B)에서만 줄바꿈 */
:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh) { word-break: keep-all; line-break: strict; }
body { overflow-wrap: break-word; }

/* ---------- RESET ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-base);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: var(--fw-body);
    letter-spacing: 0;
}

img, svg { max-width: 100%; display: block; }

/* ---------- SLIDE (전체 화면 패널, 콘텐츠 정중앙) ---------- */
.slide {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;   /* 모바일: 주소창을 뺀 실제로 보이는 높이 → 콘텐츠가 화면 정중앙에 온다 (지원 안 하면 위 100vh) */
    padding: var(--safe-y) 0;   /* 헤더·푸터 자리 — 콘텐츠는 이 사이에서 정중앙. 넘치면 페이지 스크립트(fitSlides)가 그 장만 줄인다 */
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
        var(--bg-base);
    transition: opacity 0.4s var(--ease-out-expo);
}
.slide.active, .slide.visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* 하단 점 패턴 — 깊이감용 장식 (항상 콘텐츠 뒤) */
.slide::before {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 34%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
    mask-image: linear-gradient(to top, #000 0%, transparent 100%);
    pointer-events: none;
}

.slide-inner {
    position: relative;
    z-index: 1;
    width: min(1100px, 88vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
    padding: var(--space-section) 0;
}

/* 진입 애니메이션 — 빠르고 정밀하게 */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
}
.slide.visible .reveal { opacity: 1; transform: translateY(0); }
.slide.visible .reveal:nth-child(1) { transition-delay: 0.05s; }
.slide.visible .reveal:nth-child(2) { transition-delay: 0.13s; }
.slide.visible .reveal:nth-child(3) { transition-delay: 0.21s; }
.slide.visible .reveal:nth-child(4) { transition-delay: 0.29s; }
.slide.visible .reveal:nth-child(5) { transition-delay: 0.37s; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 {
    font-weight: var(--fw-heavy);
    line-height: 1.1;
    letter-spacing: 0;
}
.display { font-size: var(--fs-display); line-height: 1.05; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }

.body-lg { font-size: var(--fs-body-lg); font-weight: var(--fw-light); color: var(--ink-soft); line-height: 1.5; }
.body    { font-size: var(--fs-body); color: var(--ink-soft); line-height: 1.5; }
.body-sm { font-size: var(--fs-body-sm); color: var(--ink-muted); line-height: 1.5; }

/* 그라데이션 강조 텍스트 — 덱 전체에서 가장 중요한 한 곳에만 */
.text-grad {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 영문 대문자 서브 라벨 (한글에는 쓰지 않는다) */
.eyebrow {
    font-size: var(--fs-body-sm);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* KPI 수치 (기본 흰색) */
.kpi { font-size: var(--fs-h2); font-weight: var(--fw-heavy); line-height: 1; color: var(--ink); }
.delta { font-size: var(--fs-body-sm); color: var(--ink-soft); }

/* 텍스트 포인트 색 — 흰색·회색으로 구분되지 않는 핵심에만 (덱당 1~2곳) */
.point { color: var(--point); }

/* 색 없이 위계 만들기 — 회색 문장 안의 핵심어는 흰색, 물러나는 글자는 어두운 회색 */
.em { color: var(--ink); }
.dim { color: var(--ink-dim); }

/* ---------- COMPONENTS ---------- */

/* 알약 라벨 */
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    background: var(--glass);
    border: 1px solid var(--border-pill);
    color: var(--ink-soft);
    font-size: var(--fs-body-sm);
    line-height: 1.2;
    white-space: nowrap;
}
.pill.accent { border-color: var(--ink); color: var(--ink); }

/* 버튼 (알약, 터치 영역 44px 이상) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--space-xl);
    border-radius: var(--radius-full);
    font-size: var(--fs-body);
    font-weight: var(--fw-body);
    white-space: nowrap;
    cursor: default;
}
.btn-primary { background: var(--ink); color: var(--bg-base); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--border-pill); }

/* 글래스 패널 */
.glass {
    background: var(--glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: left;
}
.glass-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

/* 아이콘 원 (안쪽에 1.5px stroke 라인 아이콘) */
.icon-ring {
    flex: none;
    width: clamp(36px, 4vw, 48px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--glass);
    display: grid;
    place-items: center;
    color: var(--ink-soft);
}
.icon-ring svg { width: 50%; height: 50%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* 허브 (중앙 큰 원) */
.hub {
    width: clamp(120px, 18vw, 220px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-content: center;
    gap: var(--space-xs);
    text-align: center;
    border: 2px solid transparent;
    background:
        radial-gradient(circle at 50% 40%, #1c1c1c, var(--bg-base) 72%) padding-box,
        var(--grad-ring) border-box;
    box-shadow: var(--glow);
    animation: hub-pulse 5s ease-in-out infinite;
}
@keyframes hub-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}

/* 그리드 유틸 */
.grid-auto {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
}
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: center; }

/* ---------- DIAGRAM (SVG viewBox 로 통째로 비율 변화) ---------- */
.diagram { width: min(760px, 80vw); margin: 0 auto; }
.diagram svg { width: 100%; height: auto; }
.node-circle { fill: var(--bg-deep); stroke: var(--border-glass); stroke-width: 1.5; }
.node-circle.hub-ring { stroke: url(#lineGrad) var(--ink); stroke-width: 2; }
.node-label { fill: var(--ink-soft); font-family: var(--font-body); font-weight: var(--fw-body); }
.base-line { fill: none; stroke: var(--border-glass); stroke-width: 1.2; }
.flow-line {
    fill: none;
    stroke: url(#lineGrad) var(--ink);   /* svg 안에 <linearGradient id="lineGrad"> 정의 */
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 6 14;
    animation: flow-dash 1.4s linear infinite;
}
@keyframes flow-dash { to { stroke-dashoffset: -40; } }

/* ---------- SIDE RAIL (로고 좌상단 · 내비게이션 우하단 고정) ---------- */
.brand-mark {
    position: fixed;
    top: var(--edge);
    left: calc(var(--edge) + clamp(2px, 0.4vw, 8px));
    width: var(--logo-size);
    height: var(--logo-size);
    z-index: 500;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
/* 섹션 내비게이션 — 로고 오른쪽 고정: 01 안내  02  03 …  지금 섹션만 이름이 펼쳐지고 흰색(굵기는 같음), 나머지는 번호만 어두운 회색
   섹션이 바뀌면 이전 이름이 접히고 새 이름이 펼쳐진다 (max-width·opacity 전환) */
/* 로고 오른쪽 묶음: 섹션 내비게이션 */
.deck-head {
    position: fixed;
    top: var(--edge);
    left: calc(var(--edge) + clamp(2px, 0.4vw, 8px) + var(--logo-size) + clamp(14px, 2vw, 28px));
    right: calc(var(--edge) + 112px);   /* 언어 선택 앞에서 멈춘다 (폰에서는 아래 미디어 쿼리) */
    height: var(--logo-size);
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.2vw, 32px);
    min-width: 0;
    z-index: 500;
}
.section-nav {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.7vw, 10px);
    min-width: 0;
}
/* 번호 사이 작은 가로줄 (01 — 02 — 03) */
.section-nav .sec + .sec::before {
    content: '';
    width: clamp(8px, 0.9vw, 12px);
    height: 1px;
    margin-right: clamp(6px, 0.7vw, 10px);
    background: var(--ink-dim);
    flex: none;
}
.section-nav .sec {
    all: unset;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    font-weight: var(--fw-body);   /* 굵게 하지 않는다 — 지금 섹션은 흰색으로만 구분 */
    line-height: 1;
    color: var(--ink-dim);
    flex: none;
    cursor: pointer;
    transition: color 0.4s ease;
}
.section-nav .sec.on { flex: 0 1 auto; min-width: 0; }   /* 자리가 모자라면 지금 섹션 이름만 줄어든다(… 처리) */
.section-nav .sec:hover { color: var(--ink-soft); }
.section-nav .sec.on { color: var(--ink); }
.section-nav .sec-num { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.section-nav .sec-name {
    display: inline-block;
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: max-width 0.6s var(--ease-out-expo), margin-left 0.6s var(--ease-out-expo), opacity 0.35s ease;
}
.section-nav .sec.on .sec-name {
    max-width: 30em;
    margin-left: 0.6em;
    opacity: 1;
    transition: max-width 0.7s var(--ease-out-expo) 0.1s, margin-left 0.7s var(--ease-out-expo) 0.1s, opacity 0.5s ease 0.25s;
}
:lang(ko) .section-nav .sec-name, :lang(ja) .section-nav .sec-name, :lang(zh) .section-nav .sec-name, :lang(hi) .section-nav .sec-name { letter-spacing: 0.02em; }
@media (max-width: 700px) {
    .deck-head { right: calc(var(--edge) + 32px + 12px); }   /* 폰: 언어 선택은 32px 동그란 버튼 */
    .section-nav { gap: 7px; }
    .section-nav .sec + .sec::before { display: none; }   /* 폰: 번호 사이 가로줄을 빼서 이름 자리를 만든다 */
    .section-nav .sec { font-size: 11px; }
    .section-nav .sec-name { letter-spacing: 0.04em; }
    .section-nav .sec.on .sec-name { margin-left: 0.4em; }
}

/* 언어 선택 — 우측 상단 고정 드롭다운 (네이티브 select: 키보드·폰에서 기본 선택창이 그대로 열린다)
   알약 모양 안에 지구 아이콘 + 현재 언어 이름 + 아래 화살표 */
.lang-switch {
    position: fixed;
    top: var(--edge);
    right: var(--edge);
    height: var(--logo-size);
    display: flex;
    align-items: center;
    z-index: 500;
}
.lang-select {
    position: relative;
    display: flex;
    align-items: center;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-pill);
    background: var(--glass);
    color: var(--ink-soft);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.lang-select:hover, .lang-select:focus-within { border-color: rgba(255, 255, 255, 0.5); color: var(--ink); }
.lang-select svg {
    position: absolute;
    top: 50%;
    width: 15px;
    height: 15px;
    transform: translateY(-50%);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.lang-select .lang-globe { left: 12px; }
.lang-select .lang-caret { right: 11px; width: 12px; height: 12px; }
.lang-select select {
    appearance: none;
    -webkit-appearance: none;
    height: 100%;
    padding: 0 32px 0 34px;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: inherit;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: var(--fw-heavy);
    cursor: pointer;
    outline: none;
    color-scheme: dark;   /* 펼쳐지는 목록도 어두운 색으로 */
}
.lang-select select option { background: var(--bg-deep); color: var(--ink); }
/* 폰: 섹션 내비게이션과 겹치지 않게 지구 아이콘만 있는 동그란 버튼으로 줄인다 (누르면 기본 선택창에 언어 이름이 그대로 나온다) */
@media (max-width: 700px) {
    .lang-select { width: 32px; height: 32px; justify-content: center; }
    .lang-select select { width: 100%; padding: 0; color: transparent; font-size: 16px; }
    .lang-select .lang-globe { left: 50%; width: 15px; height: 15px; transform: translate(-50%, -50%); }
    .lang-select .lang-caret { display: none; }
}

/* 좌하단 고정 푸터: 카피라이트(왼쪽) + 안전 문구 — 작고 조용하게, 내비게이션과 같은 높이 */
.footer-note {
    position: fixed;
    left: calc(var(--edge) + clamp(2px, 0.4vw, 8px));
    bottom: var(--edge);
    min-height: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 500;
    font-size: 11px;
    color: var(--ink-muted);
    letter-spacing: 0;
}
.footer-note .copyright {
    flex: none;
    font-weight: var(--fw-heavy);
    white-space: nowrap;
}
.footer-note .disclaimer { margin: 0; }
/* 하단 바 — 좌하단 푸터(.footer-note)와 우하단 내비게이션(.side-rail)을 한 줄로 묶는다
   푸터 영역이 내비게이션 너비를 뺀 나머지를 모두 차지하고(화면에 따라 동적으로 늘고 줄어듦),
   두 영역은 수직 가운데 정렬. 남는 폭이 260px 보다 좁아지면(폰) 푸터가 윗줄로 올라가고 내비게이션은 아랫줄 오른쪽에 온다 */
.bottom-bar {
    position: fixed;
    left: calc(var(--edge) + clamp(2px, 0.4vw, 8px));
    right: var(--edge);
    bottom: var(--edge);
    z-index: 500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
}
.bottom-bar .footer-note {
    position: static;
    flex: 1 1 260px;
    min-width: 0;
    line-height: 1.4;
}
.bottom-bar .side-rail {
    position: static;
    flex: none;
    margin-left: auto;
}

/* 화면이 너무 작을 때(폰 가로폭 700px 이하 또는 높이 480px 이하)는 안전 문구를 숨긴다.
   카피라이트와 내비게이션만 남아 같은 줄에 놓인다 */
@media (max-width: 700px), (max-height: 480px) {
    .footer-note .disclaimer { display: none; }
    .bottom-bar .footer-note { flex: 0 1 auto; }
}
.side-rail {
    position: fixed;
    right: var(--edge);
    bottom: var(--edge);
    z-index: 500;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}
.side-rail .nav-btn {
    all: unset;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    background: var(--glass);
    border: 1px solid var(--border-pill);
    color: var(--ink);
    font-size: 0;   /* 버튼 안 ‹ › 글자는 숨기고 아래 ::before 로 화살표를 그린다 (글꼴마다 글자 높이가 달라 가운데가 안 맞으므로) */
    cursor: pointer;
    backdrop-filter: blur(6px);
}
/* 화살표 — 두 변만 그린 정사각형을 45도 돌린 꺾쇠. 꺾쇠 무게중심이 꼭짓점 반대쪽으로 쏠리므로 그만큼 옮겨 정확히 가운데 */
.side-rail .nav-btn::before {
    content: '';
    width: 5.5px;
    height: 5.5px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
}
#nextBtn::before { transform: translateX(-1.2px) rotate(45deg); }
#prevBtn::before { transform: translateX(1.2px) rotate(-135deg); }
.side-rail .nav-btn:hover { border-color: var(--ink); }
/* 내비게이션은 이전·다음 버튼만 (몇 번째 장인지는 로고 오른쪽 섹션 내비게이션이 보여준다) */

/* 좁은 화면: 하단 내비게이션과 본문이 겹치지 않도록 여백 확보 */
@media (max-width: 640px) {
    .slide-inner { padding-bottom: calc(var(--space-section) + 88px); }
}

/* ---------- INLINE EDITOR (좌상단 호버 또는 E 키) ---------- */
.edit-hotzone { position: fixed; top: 0; left: 0; width: 100px; height: 100px; z-index: 900; cursor: pointer; }
.edit-toggle {
    position: fixed;
    top: var(--edge);
    left: calc(var(--edge) + var(--logo-size) + 12px);
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-pill);
    background: var(--bg-deep);
    color: var(--ink);
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 901; cursor: pointer;
}
.edit-toggle.show, .edit-toggle.active { opacity: 1; pointer-events: auto; }
.edit-toggle.active { border-color: var(--ink); color: var(--ink); }
body.edit-mode [contenteditable="true"] { outline: 1px dashed var(--ink-soft); outline-offset: 4px; cursor: text; }
.save-toast {
    position: fixed; top: 24px; left: 50%; transform: translate(-50%, -20px);
    padding: 9px 20px; background: var(--bg-deep);
    border: 1px solid var(--border-glass);
    color: var(--ink); font-size: 13px; border-radius: var(--radius-full);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 902;
}
.save-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
    }
}
