/* 색: 밤하늘 쪽으로 살짝 푸른 잉크 회색 한 줄기 + 앱 아이콘의 네온 하늘색 하나.
   하늘색은 주요 버튼, 선택 상태, 스카이플롯의 사용 위성, 점수에만 쓴다 */
:root {
    --bg: #0b0d14;
    --surface: #11141c;
    --raised: #1a1e28;
    --line: rgba(238, 240, 245, 0.08);
    --line-strong: rgba(238, 240, 245, 0.14);
    --fg: #eef0f5;
    --fg-2: #a3a9b8;
    --muted: #7a8296;
    --accent: #19dfff;
    --on-accent: #06222a;
    --right: #4cc38a;
    --wrong: #f0595e;

    --sans: "IBM Plex Sans KR", system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fast: 160ms;
    --enter: 400ms;
}

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

html {
    scroll-behavior: smooth;
}

/* 모바일에서 누를 때 생기는 기본 네모 하이라이트를 없앰. 눌림 상태는 각 요소의 스타일로 표시 */
a,
button,
summary {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    /* 한국어 단어가 중간에서 끊기지 않도록 어절 단위로 줄바꿈 */
    word-break: keep-all;
    overflow-wrap: break-word;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nowrap {
    white-space: nowrap;
}

.icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── 버튼 ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--raised);
    color: var(--fg);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

@media (hover: hover) {
    .btn:hover {
        border-color: rgba(238, 240, 245, 0.24);
        background: #222734;
    }
    .btn-primary:hover {
        border-color: #6be9ff;
        background: #6be9ff;
    }
}

/* ── 첫 화면 ── */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: max(16px, env(safe-area-inset-top)) 32px 64px;
    border-bottom: 1px solid var(--line);
}

/* 오른쪽 위 언어 버튼(높이 44)과 같은 줄에 맞춘다 */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
}

.logo-mark {
    width: 32px;
    height: 32px;
}

.hero-inner {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
    padding-top: 32px;
}

.hero-copy,
.skyplot {
    animation: rise var(--enter) var(--ease) both;
}

.skyplot {
    animation-delay: 60ms;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 출시 시기: 첫 화면에서 가장 먼저 읽히는 줄. IBM Plex Mono에는 한글이 없어 sans로 둔다 */
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--fg);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* 스토어 배지: Google Play는 링크(a.store-link)라 hover·눌림 상태를 두고,
   App Store는 아직 링크가 없는 표시용(div.store)이라 버튼처럼 보이지 않게 두지 않는다 */
.stores {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.stores > li {
    display: flex;
}

.store {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 184px;
    min-height: 56px;
    padding: 8px 20px 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
}

.store .icon {
    width: 20px;
    height: 20px;
}

.store-first {
    border-color: rgba(25, 223, 255, 0.4);
    color: var(--fg);
}

.store-first .icon {
    color: var(--accent);
}

.store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.store-when {
    font-size: 12px;
    color: var(--muted);
}

.store-first .store-when {
    color: var(--fg-2);
}

.store-name {
    font-size: 16px;
    font-weight: 500;
}

.store-link {
    text-decoration: none;
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.store-link:hover {
    border-color: var(--accent);
    background: var(--raised);
}

.store-link:active {
    background: var(--surface);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin-top: 24px;
}

.hero-links .wait-link {
    margin-top: 0;
}

.wait-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 4px 0;
    font-size: 15px;
    color: var(--fg-2);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 4px;
    transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease);
}

.wait-link:hover {
    color: var(--fg);
    text-decoration-color: var(--fg-2);
}

.hero h1 {
    margin-top: 16px;
    font-size: 56px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

html[lang="en"] .hero h1 {
    letter-spacing: -0.03em;
}

/* 한글은 같은 크기에서 더 크게 보여 한 단계 작게 */
html[lang="ko"] .hero h1 {
    font-size: 52px;
}

.hero-sub {
    max-width: 36rem;
    margin-top: 24px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--fg-2);
}

/* 스카이플롯 */

.skyplot {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}

.skyplot svg {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
    font-family: var(--mono);
}

.sky-grid {
    fill: none;
    stroke: rgba(238, 240, 245, 0.1);
    stroke-width: 1;
}

.sky-axis {
    font-size: 12px;
    fill: var(--muted);
}

.sky-range {
    stroke: var(--fg-2);
    stroke-opacity: 0.3;
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.sky-sat circle {
    fill: #4a5163;
}

.sky-sat text {
    font-size: 12px;
    fill: var(--muted);
}

/* 출시 단계 위성: 예정은 속이 빈 원, 진행 중은 하늘색, 끝난 단계(is-done)는 흰색 */
.sky-sat.is-step circle {
    fill: var(--surface);
    stroke: var(--fg-2);
    stroke-width: 1.5;
}

.sky-sat.is-step text {
    font-size: 13px;
    font-weight: 500;
    fill: var(--fg-2);
}

.sky-sat.is-done circle {
    fill: var(--fg);
    stroke: none;
}

.sky-sat.is-now circle {
    fill: var(--accent);
    stroke: none;
}

.sky-sat.is-now .halo {
    fill: none;
    stroke: var(--accent);
    stroke-opacity: 0.4;
    stroke-width: 1;
}

.sky-sat.is-now text {
    fill: var(--fg);
}

.sky-range.is-now {
    stroke: var(--accent);
    stroke-opacity: 0.6;
}

.sky-you circle:first-child {
    fill: rgba(238, 240, 245, 0.1);
}

.sky-you circle:last-child {
    fill: var(--fg);
}

.skyplot figcaption {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    line-height: 20px;
}

.milestones-title {
    color: var(--fg-2);
}

.milestones {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.milestones li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 12px;
    border-top: 2px solid var(--line-strong);
}

.milestones li.is-now {
    border-top-color: var(--accent);
}

.milestones li.is-done {
    border-top-color: var(--fg);
}

/* 출시(G29): 끝난 단계지만 출시를 알리려고 위 막대만 시안으로 둔다 */
.milestones li.is-launch {
    border-top-color: var(--accent);
}

.ms-id {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 16px;
    color: var(--muted);
}

.ms-name {
    font-weight: 500;
    color: var(--fg);
}

.ms-state {
    font-size: 13px;
    color: var(--muted);
}

.milestones li.is-now .ms-state {
    color: var(--accent);
}

/* ── 기능 소개 ──
   소개(.overview) → 기능 섹션(.feature, 글과 스크린샷 두 칸) → 그 밖의 기능(.more) → 사용 방법(.how).
   하늘색은 쓰지 않고 회색 단계로만 구분한다 */

.overview,
.feature,
.more,
.how,
.cta {
    width: 100%;
    /* 글 폭은 첫 화면(.hero-inner)과 같은 1200px. 좌우 여백 64px을 더한 값 */
    max-width: 1264px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    /* 오른쪽 위 언어 버튼에 제목이 가리지 않도록 */
    scroll-margin-top: 80px;
}

.eyebrow {
    font-size: 14px;
    line-height: 20px;
    color: var(--muted);
}

.overview h2,
.feature h2,
.more h2,
.how h2,
.cta h2 {
    margin-top: 8px;
    font-size: 36px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.overview {
    padding-top: 112px;
}

.cards {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.card-num {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 20px;
    color: var(--muted);
}

.card h3 {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.card p {
    margin-top: 8px;
    font-size: 15px;
    color: var(--fg-2);
}

.card-link {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 16px;
    font-size: 14px;
    color: var(--fg-2);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-underline-offset: 4px;
    transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease);
}

.card-link:hover {
    color: var(--fg);
    text-decoration-color: var(--fg-2);
}

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 64px;
    padding-top: 128px;
}

/* 스크린샷을 왼쪽에 두는 섹션 */
.feature.is-flip .feature-media {
    order: -1;
}

/* 스크린샷이 아직 없는 섹션: 글만 한 칸으로, 항목은 두 줄로 나눈다 */
.feature.no-media {
    grid-template-columns: minmax(0, 1fr);
}

.feature.no-media .points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 48px;
}

.feature.no-media .lead,
.feature.no-media .note {
    max-width: 40rem;
}

.lead {
    margin-top: 16px;
    font-size: 17px;
    color: var(--fg-2);
}

.points {
    list-style: none;
    display: grid;
    gap: 20px;
    margin-top: 32px;
}

.points li {
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    color: var(--fg-2);
}

.points li::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
}

.points strong {
    display: block;
    margin-bottom: 2px;
    font-size: 16px;
    font-weight: 500;
    color: var(--fg);
}

.note {
    margin-top: 28px;
    padding-left: 16px;
    border-left: 2px solid var(--line-strong);
    font-size: 14px;
    color: var(--muted);
}

.note a {
    color: var(--fg-2);
    text-underline-offset: 3px;
}

.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.chips li {
    padding: 4px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    line-height: 20px;
    color: var(--fg-2);
}

/* 스크린샷은 상단 상태 표시줄을 포함하며 두 장이면 나란히 둔다 */
.feature-media,
.more-media {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shots {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.shot {
    display: block;
    flex: 0 1 260px;
    min-width: 0;
    height: auto;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface);
}

.feature-media figcaption,
.more-media figcaption {
    margin-top: 16px;
    font-size: 13px;
    line-height: 20px;
    color: var(--muted);
    text-align: center;
}

.more {
    padding-top: 128px;
}

.more-media {
    margin-top: 48px;
}

.how {
    padding-top: 128px;
    padding-bottom: 32px;
}

/* 사용 방법: 첫 화면 출시 단계 목록처럼 위 막대로 단계를 나눈다 */
.steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.steps li {
    padding-top: 20px;
    border-top: 2px solid var(--line-strong);
}

.step-num {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 20px;
    color: var(--muted);
}

.steps h3 {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.steps p {
    margin-top: 8px;
    font-size: 15px;
    color: var(--fg-2);
}

/* 다운로드 안내 */
.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 96px;
    padding-bottom: 96px;
    text-align: center;
}

.cta-sub {
    max-width: 36rem;
    margin-top: 12px;
    color: var(--fg-2);
}

.cta .store {
    margin-top: 32px;
    text-align: left;
}

/* ── FAQ ── */

.faq {
    max-width: 720px;
    margin: 0 auto;
    padding: 96px 16px 64px;
}

.faq-eyebrow {
    font-size: 14px;
    line-height: 20px;
    color: var(--muted);
}

.faq h2 {
    margin: 8px 0 12px;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.faq-intro {
    margin-bottom: 32px;
    color: var(--fg-2);
}

/* ── 기본/심화 탭 ──
   자바스크립트가 없으면 탭은 숨겨지고 두 패널이 소제목(.level-title)과 함께 차례로 보인다.
   탭이 켜지면(.has-level-tabs) 소제목을 감추고 고른 패널 하나만 보인다 */

.level-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface);
}

.level-tabs[hidden] {
    display: none;
}

.level-tabs [role="tab"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

@media (hover: hover) {
    .level-tabs [role="tab"]:hover {
        color: var(--fg);
    }
}

.level-tabs [aria-selected="true"] {
    background: var(--raised);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--fg);
}

/* 탭 옆 문항 수 */
.level-count {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.level-panel + .level-panel {
    margin-top: 48px;
}

.has-level-tabs .level-panel + .level-panel {
    margin-top: 0;
}

.level-title {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 500;
}

.has-level-tabs .level-title {
    display: none;
}

.level-intro {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--muted);
}

.faq-list {
    display: grid;
    gap: 8px;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.faq details[open] {
    border-color: var(--line-strong);
    background: var(--raised);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 16px 20px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
    border-radius: 14px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

/* + 아이콘: 펼치면 45도 회전해 × 모양이 됨 */
.faq summary::after {
    content: "";
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    background:
        linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
        linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
    color: var(--muted);
    transition: transform var(--fast) var(--ease), color var(--fast) var(--ease);
}

@media (hover: hover) {
    .faq summary:hover::after {
        color: var(--fg);
    }
}

.faq details[open] summary::after {
    transform: rotate(45deg);
    color: var(--fg);
}

.faq .answer {
    padding: 0 20px 20px;
    color: var(--fg-2);
}

.faq details[open] .answer {
    animation: reveal 300ms var(--ease);
}

@keyframes reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── O/X 퀴즈 ── */

/* 퀴즈 해설에서 FAQ로 이동할 때 오른쪽 위 언어 버튼에 가리지 않도록 */
.faq details,
.quiz {
    scroll-margin-top: 80px;
}

.quiz {
    margin-top: 112px;
}

.quiz[hidden] {
    display: none;
}

.quiz-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.quiz-item {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color var(--fast) var(--ease);
}

.quiz-item[data-state="correct"] {
    border-color: rgba(76, 195, 138, 0.4);
}

.quiz-item[data-state="wrong"] {
    border-color: rgba(240, 89, 94, 0.4);
}

.quiz-q {
    display: flex;
    gap: 12px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
}

.quiz-num {
    flex-shrink: 0;
    width: 24px;
    padding-top: 3px;
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

/* 문제 번호 아래로 선택지와 해설을 같은 세로줄에 맞춘다 */
.quiz-choices,
.quiz-feedback {
    margin-left: 36px;
}

.quiz-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.quiz-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--raised);
    color: var(--fg);
    font: inherit;
    cursor: pointer;
    transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.quiz-choice:not([aria-disabled="true"]):active {
    transform: scale(0.98);
}

.quiz-mark {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

.quiz-label {
    font-size: 14px;
    color: var(--fg-2);
}

/* 터치 기기에서 누른 뒤 hover 색이 남지 않도록 마우스가 있을 때만 */
@media (hover: hover) {
    .quiz-choice:not([aria-disabled="true"]):hover {
        border-color: rgba(238, 240, 245, 0.24);
        background: #222734;
    }
}

/* 채점 뒤: 정답 버튼은 초록, 고른 오답은 빨강, 나머지는 흐리게 */
.quiz-choice[aria-disabled="true"] {
    cursor: default;
    opacity: 0.4;
}

.quiz-choice.is-answer {
    opacity: 1;
    border-color: var(--right);
    color: var(--right);
}

.quiz-item[data-state="wrong"] .quiz-choice[aria-pressed="true"] {
    opacity: 1;
    border-color: var(--wrong);
    color: var(--wrong);
}

.quiz-choice.is-answer .quiz-label,
.quiz-choice[aria-pressed="true"] .quiz-label {
    color: inherit;
}

.quiz-verdict {
    font-weight: 500;
}

.quiz-verdict:not(:empty) {
    margin-top: 16px;
}

.quiz-item[data-state="correct"] .quiz-verdict {
    color: var(--right);
}

.quiz-item[data-state="wrong"] .quiz-verdict {
    color: var(--wrong);
}

.quiz-explain {
    margin-top: 4px;
    font-size: 15px;
    color: var(--fg-2);
    animation: reveal 300ms var(--ease);
}

.quiz-more {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 0;
    font-size: 14px;
    color: var(--fg);
    text-decoration-color: var(--muted);
    text-underline-offset: 4px;
    transition: text-decoration-color var(--fast) var(--ease);
}

.quiz-more:hover {
    text-decoration-color: var(--fg);
}

.quiz-result {
    margin-top: 24px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--raised);
    scroll-margin: 24px 0;
    animation: reveal 300ms var(--ease);
}

.quiz-result:focus {
    outline: none;
}

.quiz-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    color: var(--fg-2);
}

/* 화면에서 하늘색 숫자는 점수 하나뿐 */
.quiz-score strong {
    font-family: var(--mono);
    font-size: 64px;
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

.quiz-total {
    font-family: var(--mono);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.quiz-grade {
    margin-top: 12px;
    font-weight: 500;
}

.quiz-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.quiz-btn {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.quiz-btn:active {
    transform: scale(0.98);
}

.quiz-btn-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

@media (hover: hover) {
    .quiz-btn:hover {
        border-color: rgba(238, 240, 245, 0.24);
        background: #222734;
    }
    .quiz-btn-primary:hover {
        border-color: #6be9ff;
        background: #6be9ff;
    }
}

.quiz-toast {
    margin-top: 16px;
    font-size: 14px;
    color: var(--fg-2);
}

.quiz-toast:empty {
    margin-top: 0;
}

.footer {
    padding: 24px 16px 40px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* ── 언어 전환 ── */

/* 현재 언어가 아닌 콘텐츠는 숨김 */
html[lang="ko"] [data-lang="en"],
html[lang="en"] [data-lang="ko"] {
    display: none;
}

.lang-switch {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 10;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--surface);
}

.lang-switch button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.lang-switch button:hover {
    color: var(--fg);
}

.lang-switch button[aria-pressed="true"] {
    background: var(--raised);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .hero-copy,
    .skyplot,
    .faq details[open] .answer,
    .quiz-explain,
    .quiz-result {
        animation: none;
    }
}

/* ── 쿠키 동의 ── */

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    margin-top: 4px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 8px;
    border: 0;
    border-radius: 4px;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: color var(--fast) var(--ease);
}

.footer-link:hover {
    color: var(--fg);
}

.consent {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-size: 14px;
    line-height: 1.6;
    color: var(--fg-2);
}

/* display: flex가 hidden 속성을 덮어쓰지 않도록 */
.consent[hidden] {
    display: none;
}

.consent p {
    flex: 1 1 240px;
}

.consent-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* 거부와 동의를 같은 모양으로 두어 어느 한쪽으로 유도하지 않는다 */
.consent-actions button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--raised);
    color: var(--fg);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.consent-actions button:hover {
    border-color: rgba(238, 240, 245, 0.24);
    background: #222734;
}

.consent a {
    color: var(--fg);
    text-underline-offset: 4px;
}

/* ── 개인정보처리방침 (privacy.html) ── */

.policy {
    max-width: 720px;
    margin: 0 auto;
    padding: calc(max(16px, env(safe-area-inset-top)) + 64px) 16px 48px;
}

.policy-back {
    display: inline-block;
    margin-bottom: 24px;
    padding: 4px 0;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color var(--fast) var(--ease);
}

.policy-back:hover {
    color: var(--fg);
}

.policy h1 {
    font-size: 32px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.policy-meta {
    margin: 8px 0 32px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 13px;
}

.policy h2 {
    margin: 40px 0 12px;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.4;
}

.policy p,
.policy ul,
.policy table {
    margin-bottom: 12px;
    color: var(--fg-2);
}

.policy ul {
    padding-left: 1.25em;
}

.policy li + li {
    margin-top: 8px;
}

.policy strong {
    font-weight: 500;
    color: var(--fg);
}

.policy a {
    color: var(--fg);
    text-underline-offset: 4px;
}

.policy table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.policy th,
.policy td {
    padding: 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.policy th {
    width: 32%;
    background: var(--surface);
    font-weight: 500;
    color: var(--fg);
}

/* ── 작은 화면 ── */

@media (max-width: 880px) {
    .hero {
        min-height: 0;
        padding: max(16px, env(safe-area-inset-top)) 16px 48px;
    }
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding-top: 48px;
    }
    .hero h1 {
        font-size: 36px;
        line-height: 1.2;
    }
    .hero-sub {
        margin-top: 16px;
        font-size: 16px;
    }
    .stores {
        margin-top: 24px;
    }
    .stores > li {
        flex: 1 1 0;
        min-width: 0;
    }
    .store {
        flex: 1;
        min-width: 0;
    }
    .milestones {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
    }
    .skyplot {
        padding: 20px;
        border-radius: 16px;
    }
    .skyplot svg {
        max-width: 360px;
    }
    /* SVG가 줄어들어도 위성 이름이 11px 아래로 작아지지 않도록 */
    .sky-axis,
    .sky-sat text,
    .sky-sat.is-step text {
        font-size: 18px;
    }
    .overview,
    .feature,
    .more,
    .how,
    .cta {
        padding-left: 16px;
        padding-right: 16px;
    }
    .overview {
        padding-top: 72px;
    }
    .overview h2,
    .feature h2,
    .more h2,
    .how h2,
    .cta h2 {
        font-size: 28px;
    }
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 24px;
    }
    .card {
        padding: 20px;
    }
    /* 한 칸으로 쌓고 스크린샷은 늘 글 아래에 */
    .feature,
    .feature.no-media {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding-top: 88px;
    }
    .feature.is-flip .feature-media {
        order: 0;
    }
    /* 좁은 화면에서는 제목 줄바꿈을 화면 폭에 맡긴다 */
    .feature h2 br {
        display: none;
    }
    .feature.no-media .points {
        grid-template-columns: minmax(0, 1fr);
    }
    .lead {
        font-size: 16px;
    }
    .points {
        margin-top: 24px;
    }
    .shots {
        gap: 12px;
    }
    .shot {
        border-radius: 14px;
    }
    .more,
    .how {
        padding-top: 88px;
    }
    .steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        margin-top: 24px;
    }
    .cta {
        padding-top: 72px;
        padding-bottom: 72px;
    }
    .faq {
        padding-top: 64px;
    }
    .faq h2,
    .policy h1 {
        font-size: 28px;
    }
    .quiz {
        margin-top: 80px;
    }
    .quiz-item {
        padding: 16px;
    }
    .quiz-choices,
    .quiz-feedback {
        margin-left: 0;
    }
    /* 휴대폰에서는 탭 두 개가 폭을 나눠 쓴다 */
    .level-tabs {
        display: flex;
    }
    .level-tabs [role="tab"] {
        flex: 1;
        justify-content: center;
    }
}

/* 아주 좁은 화면(360px 미만): 스토어 배지는 한 줄에 하나, 스카이플롯 라벨은 더 크게 */
/* 휴대폰 세로 화면: 카드는 한 줄에 하나 */
@media (max-width: 560px) {
    .cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 359px) {
    .stores > li {
        flex-basis: 100%;
    }
    .sky-axis,
    .sky-sat text,
    .sky-sat.is-step text {
        font-size: 22px;
    }
}
