/* 소개 화면 전용. 학습 화면의 색과 크기는 그대로 둠.
   한눈에: 첫 화면 왼쪽은 "무엇인지", 오른쪽은 "바로 시작". 아래 섹션은 짧게. */
@font-face {
    font-family: 'Noto Serif KR';
    src: url('../fonts/NotoSerifKRVariable.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
}

body.landing-home { background: #f6f3ee; background-image: none; color: #1d2a31; }
#app.landing-page { max-width: 1180px; padding: 0 32px; }
.landing-page {
    --lp-ink: #1d2a31; --lp-muted: #5f6a6f; --lp-line: #e4ded4; --lp-paper: #fffdf9;
    --lp-accent: #9a4a26; --lp-accent-soft: #f4e7dc; --lp-deep: #1f3640;
    --font-title: 'Noto Serif KR', 'Batang', serif;
    font-weight: 500; letter-spacing: -.01em;
}
.landing-page h1, .landing-page h2, .landing-page h3 { font-family: var(--font-title); font-weight: 700; letter-spacing: -.02em; word-break: keep-all; color: var(--lp-ink); }
.landing-page p { margin: 0; }
.landing-page a { color: inherit; text-decoration: none; }
.landing-page a:hover { text-decoration: underline; text-underline-offset: 5px; }
.landing-page section { scroll-margin-top: 24px; }
.landing-page :focus-visible { outline: 3px solid #2f7a68; outline-offset: 4px; }
.landing-skip { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--lp-ink, #1d2a31); color: #fff !important; border-radius: 10px; transform: translateY(-180%); }
.landing-skip:focus { transform: translateY(0); }

/* 머리말 */
.landing-header { display: flex; align-items: center; gap: 24px; padding: 22px 0; }
.landing-brand { display: flex; gap: 10px; align-items: center; font-family: var(--font-title); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.landing-brand img { flex: none; border-radius: 10px; }
.landing-brand small { display: block; font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--lp-muted); margin-top: 4px; }
.landing-header nav { display: flex; gap: 6px; margin-left: auto; font-size: 15px; font-weight: 600; color: var(--lp-muted); }
.landing-header nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; white-space: nowrap; }
.landing-header nav a:hover { background: #ece6dc; color: var(--lp-ink); text-decoration: none; }
.landing-header > .landing-button { margin-left: auto; }
.landing-bgm { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--lp-line); border-radius: 999px; background: var(--lp-paper); font-size: 18px; cursor: pointer; }
.landing-bgm:hover { border-color: #cfc5b6; }
.landing-bgm[aria-pressed="true"] { border-color: var(--lp-accent); background: #f6e7dc; }
/* 📲 앱 설치 · 📱 QR (머리글 오른쪽) */
.landing-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.landing-chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #d8cfc0; border-radius: 999px; background: #fffdf8; color: var(--lp-ink); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.landing-chip:hover { background: #ece6dc; }
.landing-chip-primary { background: var(--lp-ink); border-color: var(--lp-ink); color: #fff; }
.landing-chip-primary:hover { background: #2b2620; }
.landing-header-actions .landing-bgm { width: 38px; height: 38px; font-size: 16px; }

/* 단추 */
.landing-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 56px; padding: 14px 24px; border: 1px solid var(--lp-ink); border-radius: 14px; background: var(--lp-ink); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 18px; line-height: 1.3; transition: background .16s, transform .16s, box-shadow .16s; }
.landing-button:hover { background: #2c3f48; transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(29, 42, 49, .7); }
.landing-button span { font-size: 16px; opacity: .8; }
.landing-button-secondary { background: transparent; color: var(--lp-ink); border-color: #cfc7ba; }
.landing-button-secondary:hover { background: #ece6dc; box-shadow: none; }
.landing-eyebrow { color: var(--lp-accent); font-size: 14px; letter-spacing: .06em; font-weight: 700; margin-bottom: 14px !important; }

/* 첫 화면: 짙은 바탕(머리글과 이어짐)에 제목·정거장 지도·시작 */
.landing-page { --lp-night: #1c3139; --lp-cream: #f8f1e6; --lp-gold: #e3a75d; --lp-go: #b45a2e; --lp-go-ring: #d9773f; --lp-night-muted: #a9bcc1; }
.landing-header-dark, .landing-hero.hero { background: var(--lp-night); box-shadow: 0 0 0 100vmax var(--lp-night); clip-path: inset(0 -100vmax); }
.landing-header-dark .landing-brand { color: var(--lp-cream); }
.landing-header-dark .landing-brand small, .landing-header-dark nav { color: var(--lp-night-muted); }
.landing-header-dark nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.landing-header-dark .landing-chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: var(--lp-cream); }
.landing-header-dark .landing-chip:hover { background: rgba(255, 255, 255, .14); }
.landing-header-dark .landing-chip-primary { background: var(--lp-cream); border-color: var(--lp-cream); color: var(--lp-ink); }
.landing-header-dark .landing-chip-primary:hover { background: #fff; }
.landing-header-dark .landing-bgm { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); }
.landing-header-dark .landing-bgm[aria-pressed="true"] { border-color: var(--lp-gold); background: rgba(227, 167, 93, .18); }
.landing-header-dark :focus-visible, .landing-hero :focus-visible { outline-color: var(--lp-gold); }

.landing-hero.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); grid-template-areas: 'copy map' 'start map'; column-gap: 40px; margin-top: -1px; align-items: start; text-align: left; padding: 36px 0 64px; color: var(--lp-cream); }
.landing-hero-copy { grid-area: copy; align-self: end; }
.landing-hero h1 { color: var(--lp-cream); font-size: clamp(34px, 3.6vw, 46px); font-weight: 800; line-height: 1.2; outline: none; }
.landing-hero h1 > span { color: var(--lp-gold); }
.landing-lead { margin-top: 16px !important; color: var(--lp-night-muted); font-size: 18px; line-height: 1.6; }

/* 10개 정거장 지도 (넓은 화면은 지그재그 길, 좁은 화면은 가로 띠) */
.landing-journey { grid-area: map; position: relative; height: 500px; }
.landing-journey-path { position: absolute; inset: 0; }
.landing-journey-path svg { width: 100%; height: 100%; display: block; }
.landing-journey-path polyline { fill: none; stroke: rgba(227, 167, 93, .55); stroke-width: 3; stroke-dasharray: 6 7; }
.landing-journey ol { list-style: none; margin: 0; padding: 0; }
.landing-stop { position: absolute; left: var(--x); top: var(--y); width: 96px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.landing-medal { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--lp-cream); border: 3px solid transparent; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.landing-medal svg { width: 74%; height: 74%; }
.landing-stop.is-done .landing-medal { border-color: var(--lp-gold); }
.landing-stop.is-open .landing-medal { border-color: var(--lp-go-ring); box-shadow: 0 0 0 6px rgba(217, 119, 63, .32); }
.landing-stop.is-locked .landing-medal { filter: grayscale(.6) brightness(.85); opacity: .8; }
.landing-stop-name { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.25; color: var(--lp-cream); }

/* 바로 시작: 이어가기 카드 · 이 기기의 탐험가 · 작은 단추 */
.landing-start { grid-area: start; max-width: 520px; margin-top: 28px; }
.landing-resume { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 20px; border-radius: 22px; background: var(--lp-cream); color: var(--lp-ink); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); margin-bottom: 18px; }
.landing-resume-avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: #efe2cf; font-size: 38px; }
.landing-resume h2 { font-family: var(--font-body); font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.landing-resume h2 small { font-size: 15px; font-weight: 700; color: var(--lp-muted); }
.landing-resume p { margin-top: 4px !important; font-size: 14px; color: var(--lp-muted); }
.landing-progress { grid-column: 1 / -1; height: 6px; margin-top: 10px; border-radius: 9px; background: #e9dfd1; overflow: hidden; }
.landing-progress span { display: block; height: 100%; background: var(--lp-go); }
.landing-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px; border: 0; border-radius: 14px; background: var(--lp-go); color: #fff; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.landing-go:hover { background: #9c4c25; }
.landing-resume .landing-go { grid-column: 1 / -1; margin-top: 12px; }
.landing-explorers { margin-bottom: 16px; }
.landing-explorers h2 { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--lp-night-muted); margin-bottom: 10px; }
.landing-explorers .name-input { font-size: 16px; margin-bottom: 10px; color: var(--lp-ink); background: #fff; }
.landing-explorers .name-input::placeholder { color: #7a848a; }
.landing-explorers .muted { color: var(--lp-night-muted); }
.landing-start .explorer-list { display: flex; flex-wrap: wrap; gap: 8px; }
.landing-start .explorer-list button { font-family: var(--font-body); display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--lp-cream); font-size: 16px; font-weight: 700; box-shadow: none; }
.landing-start .explorer-list button:hover { border-color: var(--lp-gold); background: rgba(255, 255, 255, .12); }
.landing-start .explorer-list button.hidden { display: none; }
.landing-start .explorer-list .av { display: inline; font-size: 24px; }
.landing-start .explorer-list .small { display: inline; color: var(--lp-night-muted); font-size: 13px; }
.landing-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.landing-pill { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--lp-cream); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.landing-pill:hover { background: rgba(255, 255, 255, .14); }
.landing-pills .landing-go { min-width: 220px; padding: 0 22px; }

/* 아래 섹션 공통 */
.landing-section { padding: 64px 0; border-top: 1px solid var(--lp-line); }
.landing-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.landing-section-heading h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.3; }
.landing-section-heading > p { color: var(--lp-muted); font-size: 16px; line-height: 1.7; text-align: right; }
.landing-section-heading .landing-eyebrow { margin-bottom: 8px !important; }

/* 한 정거장, 다섯 걸음 */
.landing-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.landing-steps li { position: relative; padding: 20px 18px 22px; border: 1px solid var(--lp-line); border-radius: 18px; background: var(--lp-paper); }
.landing-step-no { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700; color: #776d60; letter-spacing: .08em; }
.landing-step-emoji { display: block; font-size: 30px; margin-bottom: 10px; }
.landing-steps strong { display: block; font-family: var(--font-title); font-size: 18px; color: var(--lp-ink); }
.landing-steps p { margin-top: 6px !important; color: var(--lp-muted); font-size: 14px; line-height: 1.6; }

/* 10개 정거장 */
.landing-unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.landing-unit { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px; border: 1px solid var(--lp-line); border-radius: 18px; background: var(--lp-paper); }
.landing-unit-art { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: #f1ece4; }
.landing-unit-art svg { width: 100%; height: 100%; display: block; }
.landing-unit-no { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--lp-accent); }
.landing-unit h3 { font-size: 19px; margin: 4px 0 6px; line-height: 1.35; }
.landing-unit p { color: var(--lp-muted); font-size: 14px; line-height: 1.65; }

/* 사용법 영상 (기존 구조 그대로, 크기만 줄임) */
.landing-video-guide .landing-section-heading { align-items: flex-end; }
.landing-video-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.landing-video-player { margin: 0; }
.landing-video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #1d2a31; border: 1px solid var(--lp-line); }
.landing-video-frame video, .landing-video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.landing-video-cover { position: absolute; inset: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.landing-video-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(16, 24, 28, .55)); }
.landing-video-cover-action { position: absolute; left: 20px; bottom: 18px; z-index: 1; display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 17px; }
.landing-video-cover-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--lp-ink); font-size: 18px; padding-left: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.landing-video-player figcaption { margin-top: 10px; color: var(--lp-muted); font-size: 13px; line-height: 1.6; }
.landing-video-player figcaption span { display: block; }
.landing-video-error { color: #9a3412; font-size: 14px; margin-top: 8px !important; }
.landing-video-fallback { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.landing-video-fallback[hidden] { display: none; }
.landing-video-fallback button, .landing-video-fallback a { min-height: 44px; padding: 8px 14px; border: 1px solid var(--lp-line); border-radius: 12px; background: #fff; font-size: 15px; font-weight: 600; }
.landing-video-summary { padding: 20px 22px; border: 1px solid var(--lp-line); border-radius: 18px; background: var(--lp-paper); }
.landing-video-summary h3 { font-size: 17px; margin-bottom: 8px; }
.landing-video-summary ol { list-style: none; margin: 0; padding: 0; }
.landing-video-summary li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #efe9df; }
.landing-video-summary li:first-child { border-top: 0; }
.landing-video-summary li > span { flex: none; font-size: 12px; font-weight: 700; color: var(--lp-accent); padding-top: 2px; }
.landing-video-summary strong { font-size: 15px; }
.landing-video-summary li p { color: var(--lp-muted); font-size: 13px; line-height: 1.55; margin-top: 2px !important; }

/* 선생님께 */
.landing-classroom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin: 8px 0 0; padding: 44px; border-radius: 26px; background: var(--lp-deep); color: #e8eef0; }
.landing-classroom .landing-eyebrow { color: #e8b48f; }
.landing-classroom h2 { color: #fff; font-size: clamp(26px, 2.8vw, 34px); line-height: 1.3; }
.landing-classroom-copy > p:not(.landing-eyebrow) { margin-top: 12px !important; color: #b9c7cc; font-size: 16px; line-height: 1.7; }
.landing-classroom-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 24px; }
.landing-classroom .landing-button { background: #fff; color: var(--lp-ink); border-color: #fff; }
.landing-classroom .landing-button:hover { background: #f1ece4; }
.landing-classroom-guide { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0; border: 0; background: none; color: #e8eef0; font: inherit; font-weight: 700; cursor: pointer; }
.landing-classroom-guide:hover { text-decoration: underline; text-underline-offset: 5px; }
.landing-faq details { border-top: 1px solid rgba(255, 255, 255, .14); }
.landing-faq details:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.landing-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; cursor: pointer; font-weight: 700; color: #fff; list-style: none; }
.landing-faq summary::-webkit-details-marker { display: none; }
.landing-faq summary::after { content: '+'; font-size: 20px; color: #e8b48f; }
.landing-faq details[open] summary::after { content: '–'; }
.landing-faq details p { padding-bottom: 14px; color: #b9c7cc; font-size: 15px; line-height: 1.7; }

/* 꼬리말 */
.landing-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 32px 0 40px; color: var(--lp-muted); font-size: 14px; }
.landing-footer a { font-weight: 600; }

/* 사용법 화면 */
.landing-help-content { max-width: 760px; margin: 24px auto 0; padding-bottom: 48px; }
.landing-help-content > h1 { font-size: 38px; margin: 16px 0 20px; }

@media (max-width: 1000px) {
    .landing-header { flex-wrap: wrap; row-gap: 4px; }
    .landing-header nav { order: 3; width: 100%; margin-left: -12px; }
    .landing-header-actions { margin-left: auto; }
    .landing-hero.hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'map' 'start'; padding-top: 20px; }
    .landing-journey { height: auto; margin: 22px -32px 0; }
    .landing-journey-path { display: none; }
    /* 좁은 화면: 10개 정거장을 한눈에(스크롤 없이) 격자로 */
    .landing-journey ol { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px 4px; padding: 4px 32px 6px; }
    .landing-stop { position: relative; left: auto; top: auto; transform: none; width: auto; min-width: 0; }
    .landing-medal { width: 56px; height: 56px; }
    .landing-stop-name { font-size: 12px; }
    .landing-start { margin-top: 20px; max-width: 560px; }
    .landing-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .landing-unit-grid { grid-template-columns: minmax(0, 1fr); }
    .landing-video-layout, .landing-classroom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    #app.landing-page { padding: 0 16px; }
    .landing-header { flex-wrap: wrap; gap: 6px 12px; padding: 14px 0 6px; }
    .landing-header-actions { margin-left: auto; gap: 6px; }
    .landing-chip { min-height: 34px; padding: 0 11px; font-size: 13px; }
    .landing-header-actions .landing-bgm { width: 34px; height: 34px; font-size: 15px; }
    .landing-header nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; gap: 2px; font-size: 14px; scrollbar-width: none; }
    .landing-header nav::-webkit-scrollbar { display: none; }
    .landing-header nav a { padding: 0 10px; white-space: nowrap; }
    .landing-hero.hero { padding: 10px 0 36px; }
    .landing-hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
    .landing-lead { font-size: 15px; margin-top: 8px !important; }
    .landing-journey { margin: 16px -16px 0; }
    .landing-journey ol { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 4px 16px 6px; }
    .landing-medal { width: 46px; height: 46px; border-width: 2px; }
    .landing-stop-name { font-size: 11px; }
    .landing-resume { padding: 16px; gap: 2px 14px; }
    .landing-resume-avatar { width: 54px; height: 54px; font-size: 32px; }
    .landing-go, .landing-pills .landing-go { width: 100%; min-width: 0; }
    .landing-pill { flex: 1 1 auto; justify-content: center; }
    .landing-section { padding: 44px 0; }
    .landing-section-heading { display: block; margin-bottom: 20px; }
    .landing-section-heading > p { text-align: left; margin-top: 8px !important; }
    .landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .landing-steps li:last-child { grid-column: 1 / -1; }
    .landing-unit { grid-template-columns: 60px minmax(0, 1fr); padding: 16px; }
    .landing-unit-art { width: 60px; height: 60px; }
    .landing-classroom { padding: 28px 22px; border-radius: 22px; gap: 24px; }
    .landing-button { width: 100%; }
}
/* 가로로 눕힌 휴대폰: 화면이 낮으니 정거장 띠를 숨겨 시작 단추가 바로 보이게 */
@media (max-width: 1000px) and (max-height: 500px) {
    .landing-journey { display: none; }
    .landing-hero.hero { padding-top: 8px; }
    .landing-start { margin-top: 14px; }
}
/* 휴대폰: 앱 설치·QR을 앱 이름과 같은 맨 윗줄에 */
@media (max-width: 520px) {
    .landing-header { flex-wrap: wrap; column-gap: 8px; }
    .landing-brand { gap: 8px; font-size: 17px; min-width: 0; }
    .landing-brand img { width: 30px; height: 30px; }
    .landing-brand small { letter-spacing: .12em; }
    .landing-header-actions { gap: 5px; }
    .landing-chip { min-height: 32px; padding: 0 9px; font-size: 12.5px; }
    .landing-header-actions .landing-bgm { width: 32px; height: 32px; font-size: 14px; }
    .landing-chip-wide { display: none; }
}
@media (max-width: 360px) {
    .landing-brand { font-size: 16px; }
    .landing-hero h1 { font-size: 27px; }
    .landing-steps { grid-template-columns: minmax(0, 1fr); }
}
@media print { .landing-page .landing-header, .landing-page .landing-start, .landing-journey, .landing-skip, .landing-video-player { display: none; } .landing-hero.hero, .landing-hero h1, .landing-hero h1 > span, .landing-lead { background: none; box-shadow: none; color: #000; } }
