:root {
  color-scheme: light dark;
  --paper: #f6f4ed;
  --surface: #fffefa;
  --surface-soft: #e9efea;
  --ink: #18262c;
  --muted: #506167;
  --line: #d4dcd7;
  --accent: #963720;
  --accent-ink: #fffefa;
  --teal: #2e6b64;
  --sun: #d39a2f;
  --focus: #2e6b64;
  --shadow: 0 12px 38px rgba(24, 38, 44, .09);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-family: var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111b1f;
    --surface: #19282d;
    --surface-soft: #24363a;
    --ink: #f2f3ed;
    --muted: #bdc9c5;
    --line: #3b4f52;
    --accent: #ffad84;
    --accent-ink: #202622;
    --teal: #8ac9b9;
    --sun: #e6bd65;
    --focus: #8ac9b9;
    --shadow: 0 14px 38px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }
body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}
button, input { font: inherit; }
button, a, input[type="range"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
#intro-title:focus, #question-title:focus, #result-heading:focus, #reveal-state:focus {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
  border-radius: 4px;
}
button { color: inherit; }
a { color: var(--accent); text-underline-offset: .2em; }
[hidden] { display: none !important; }

.page-orbit {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  opacity: .38;
}
.orbit-one {
  top: 94px;
  left: calc(50% - 470px);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 38% 35%, rgba(211, 154, 47, .22), transparent 68%);
}
.orbit-two {
  top: 390px;
  right: max(0px, calc(50% - 520px));
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 48% 44%, rgba(46, 107, 100, .16), transparent 70%);
}
.site-head, .page-footer {
  width: min(100% - 32px, 820px);
  margin-inline: auto;
}
.site-head {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 760;
  text-decoration: none;
}
.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 3px;
  background: var(--surface);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1rem;
}
.edition {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
}
.app-shell {
  width: min(100% - 28px, 540px);
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  padding: 24px 0 32px;
}
.screen { animation: appear .34s ease both; }
.intro-screen {
  width: min(100%, 440px);
  margin-inline: auto;
  padding: 0 2px 14px;
}
.hero-art {
  position: relative;
  height: 210px;
  margin: 0 auto 1.1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 18% 25%, rgba(211, 154, 47, .14), transparent 42%),
    radial-gradient(ellipse at 88% 82%, rgba(46, 107, 100, .14), transparent 42%),
    var(--surface);
}
.hero-art svg { display: block; width: 100%; height: 100%; }
.art-sky { fill: var(--surface-soft); }
.art-hill { opacity: .93; }
.art-hill-back { fill: var(--teal); opacity: .4; }
.art-hill-front { fill: var(--teal); opacity: .68; }
.art-bridge { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.art-bridge-line { fill: none; stroke: var(--accent); stroke-width: 3; opacity: .72; }
.art-sun { fill: var(--sun); opacity: .92; }
.art-dot { fill: var(--accent); }
.art-label {
  position: absolute;
  bottom: 19px;
  z-index: 1;
  padding: .24rem .62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 1rem;
  font-weight: 760;
}
.art-label-left { left: 20px; }
.art-label-right { right: 20px; }
.eyebrow {
  margin: 0 0 .55rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .05em;
}
h1, h2, h3, p { margin-top: 0; }
.intro-title {
  margin-bottom: .85rem;
  font-size: clamp(2.15rem, 10vw, 3.15rem);
  line-height: 1.13;
  letter-spacing: -.055em;
  word-break: keep-all;
}
.intro-title span { color: var(--teal); }
.intro-copy {
  max-width: 37ch;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.58;
  word-break: keep-all;
}
.topic-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.35rem; }
.topic-chips span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: .27rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 680;
}
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 780;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, background-color .16s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(.98); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button-text { border-color: transparent; background: transparent; color: var(--accent); }
.button-start {
  width: 100%;
  min-height: 58px;
  justify-content: space-between;
  padding-inline: 1.15rem;
  border-radius: 16px;
  font-size: 1.08rem;
  box-shadow: 0 8px 20px rgba(150, 55, 32, .14);
}
.button-start svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.intro-note { margin: .75rem 0 0; color: var(--muted); font-size: 1rem; text-align: center; }

.question-screen { padding-bottom: 14px; }
.progress-wrap { margin: 0 2px .85rem; }
.progress-meta { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.progress-label { font-size: 1rem; font-weight: 770; }
.score-label { color: var(--muted); font-size: 1rem; font-variant-numeric: tabular-nums; }
progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
}
progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-soft); }
progress::-webkit-progress-value { border-radius: 999px; background: var(--teal); transition: width .3s ease; }
progress::-moz-progress-bar { border-radius: 999px; background: var(--teal); }
.quiz-card {
  padding: clamp(18px, 5vw, 26px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.1rem; }
.question-type { color: var(--accent); font-size: 1rem; font-weight: 800; }
.category-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: .22rem .65rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1rem;
  font-weight: 720;
}
.quiz-card h2 {
  margin-bottom: .7rem;
  font-size: clamp(1.55rem, 6.8vw, 2.05rem);
  line-height: 1.28;
  letter-spacing: -.04em;
  word-break: keep-all;
}
.question-prompt { margin-bottom: 1.2rem; color: var(--muted); word-break: keep-all; }
.answer-area { display: grid; gap: .65rem; }
.choice-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-weight: 760;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, background-color .16s ease;
}
.choice-button::after {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  content: "";
}
.choice-button:hover { transform: translateY(-1px); border-color: var(--teal); background: var(--surface-soft); }
.choice-button[disabled] { cursor: default; }
.slider-card {
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.slider-topline { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.slider-topline label { font-weight: 740; }
.slider-value { color: var(--accent); font-size: 1.28rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.estimate-range { display: block; width: 100%; min-height: 48px; margin: .45rem 0 .1rem; accent-color: var(--accent); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; margin-top: -.2rem; color: var(--muted); font-size: 1rem; }
.slider-note { margin: .45rem 0 0; color: var(--muted); font-size: 1rem; }
.slider-submit { width: 100%; margin-top: .8rem; }
.reveal-panel { margin-top: 1.35rem; padding-top: 1.15rem; border-top: 1px solid var(--line); animation: reveal-in .36s ease both; }
.reveal-state {
  display: flex;
  min-height: 48px;
  align-items: center;
  margin-bottom: .9rem;
  padding: .55rem .8rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 830;
  word-break: keep-all;
}
.reveal-state[data-state="correct"] { background: color-mix(in srgb, var(--teal) 16%, var(--surface)); color: var(--teal); }
.reveal-state[data-state="incorrect"] { background: color-mix(in srgb, var(--sun) 20%, var(--surface)); color: var(--ink); }
.visual-result { display: grid; gap: .72rem; margin: 0 0 1rem; }
.bar-row { display: grid; gap: .25rem; }
.bar-heading { display: flex; justify-content: space-between; gap: .75rem; font-size: 1rem; }
.bar-heading strong { font-variant-numeric: tabular-nums; }
.bar-track { height: 12px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.bar-fill { width: 0; height: 100%; border-radius: inherit; transition: width .7s cubic-bezier(.18,.7,.2,1); }
.bar-fill[data-tone="coral"] { background: var(--accent); }
.bar-fill[data-tone="teal"] { background: var(--teal); }
.bar-fill[data-tone="sun"] { background: var(--sun); }
.explanation { margin: .9rem 0 .8rem; font-size: 1rem; line-height: 1.62; word-break: keep-all; }
.source-list { display: grid; gap: .25rem; margin: 0 0 1rem; padding: .75rem .9rem; border-radius: 12px; background: var(--surface-soft); list-style: none; }
.source-list li { font-size: 1rem; line-height: 1.45; }
.source-list a { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.source-year { margin-left: .28rem; color: var(--muted); white-space: normal; }
.next-button { position: relative; z-index: 1; width: 100%; margin-top: .8rem; touch-action: manipulation; }
.story-visual { margin: 0 0 1rem; }
.food-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: .3rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.food-step {
  display: grid;
  min-width: 0;
  min-height: 116px;
  align-content: center;
  justify-items: center;
  gap: .4rem;
  padding: .4rem .2rem;
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.food-step-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--step-tone) 18%, var(--surface)); color: var(--step-tone); font-size: 1.25rem; font-weight: 850; }
.food-step strong { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.food-step small { color: var(--muted); font-size: 1rem; line-height: 1.25; }
.food-arrow { align-self: center; color: var(--accent); font-size: 1.15rem; font-weight: 850; }
.shared-border {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  text-align: center;
}
.border-countries { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.border-country { display: grid; min-height: 52px; align-items: center; padding: .45rem .35rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1rem; font-weight: 800; }
.border-mark { width: 2px; height: 50px; border-left: 2px dashed var(--accent); }
.border-cave { min-height: 52px; padding: .65rem .75rem; border-radius: 12px; background: var(--surface); font-size: 1rem; font-weight: 750; }
.border-count { color: var(--accent); font-size: 1rem; font-weight: 850; }

.result-screen { padding-bottom: 18px; }
.result-eyebrow { margin: .3rem 0 .65rem; }
.result-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 91% 12%, rgba(211,154,47,.17), transparent 32%),
    var(--surface);
  box-shadow: var(--shadow);
}
.result-overline { margin: 0 0 .25rem; color: var(--muted); font-size: 1rem; font-weight: 730; }
.result-score-card h2 { margin: 0 0 .35rem; font-size: clamp(1.4rem, 6vw, 1.8rem); line-height: 1.22; word-break: keep-all; }
.result-title { margin: 0; color: var(--teal); font-weight: 750; word-break: keep-all; }
.score-stamp {
  display: flex;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: center;
  padding-top: 18px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  transform: rotate(7deg);
}
.score-stamp strong { font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.score-stamp span { margin-left: .15rem; font-size: 1rem; font-weight: 760; }
.surprise-card {
  margin-top: 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.surprise-topline { display: flex; align-items: center; gap: .4rem; margin-bottom: .55rem; color: var(--muted); font-size: 1rem; font-weight: 720; }
.sparkle { color: var(--accent); font-size: 1.05rem; }
.surprise-card h3 { margin: 0 0 .45rem; font-size: 1.08rem; }
.surprise-question { margin: 0 0 .35rem; font-weight: 750; word-break: keep-all; }
.surprise-answer { margin: 0 0 .45rem; color: var(--accent); font-size: 1.2rem; font-weight: 850; }
.surprise-note { margin: 0 0 .7rem; color: var(--muted); font-size: 1rem; word-break: keep-all; }
.surprise-source { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-size: 1rem; line-height: 1.4; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.result-actions .button { width: 100%; min-height: 58px; padding-inline: .45rem; font-size: 1rem; }
.result-actions .button-text { grid-column: 1 / -1; }
.share-status { min-height: 1.55em; margin: .7rem 0 .35rem; color: var(--teal); font-size: 1rem; font-weight: 700; }
.manual-copy { display: grid; gap: .35rem; margin: .4rem 0 .8rem; }
.manual-copy label { color: var(--muted); font-size: 1rem; }
.manual-copy input { width: 100%; min-height: 48px; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.privacy-note { margin: .75rem 0 0; color: var(--muted); font-size: 1rem; text-align: center; word-break: keep-all; }
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.noscript-message { margin: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

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

@media (min-width: 700px) {
  .app-shell { padding-top: 40px; }
  .intro-screen { padding-top: 4px; }
  .hero-art { height: 230px; }
  .question-screen { padding-top: 2px; }
}
@media (max-width: 360px) {
  .site-head, .page-footer { width: calc(100% - 24px); }
  .app-shell { width: calc(100% - 20px); padding-top: 16px; }
  .hero-art { height: 182px; border-radius: 20px; }
  .intro-copy { font-size: 1rem; }
  .quiz-card { padding: 17px; border-radius: 20px; }
  .result-score-card { padding: .9rem; }
  .score-stamp { width: 75px; height: 75px; padding-top: 14px; }
  .score-stamp strong { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Original science illustrations: each line, shape and label carries part of the explanation. */
.hero-orbit { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 7 7; opacity: .72; }
.hero-planet { fill: var(--surface-soft); stroke: var(--teal); stroke-width: 3; }
.hero-latitude { fill: none; stroke: var(--teal); stroke-width: 2; opacity: .62; }
.hero-moon { fill: var(--sun); stroke: var(--accent); stroke-width: 2; }
.hero-lens { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.science-diagram { display: block; width: 100%; height: auto; max-height: 220px; border-radius: 16px; overflow: hidden; }
.diagram-text { fill: var(--ink); font-family: var(--font); font-size: 11px; font-weight: 760; }
.moon-distance .diagram-text { font-size: 18px; }
.moon-distance .moon-detail { font-size: 16px; }
.diagram-small-text { font-size: 9px; }
.diagram-draw { animation: diagram-flow 1.8s linear infinite; }
.diagram-pulse { transform-box: fill-box; transform-origin: center; animation: diagram-pulse 1.8s ease-in-out infinite; }
.diagram-pulse.delay { animation-delay: -.7s; }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 0 1.4rem; color: var(--muted); font-size: 1rem; }
.page-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-weight: 720; overflow-wrap: anywhere; }

@keyframes diagram-flow { to { stroke-dashoffset: -34; } }
@keyframes diagram-pulse { 0%, 100% { opacity: .58; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  .diagram-draw, .diagram-pulse { animation: none !important; }
}
