/* =========================================================
   Quan họ Bắc Ninh — presentation summary
   Palette taken from the original slide deck
   ========================================================= */
:root {
  --bg: #F6EFE2;
  --bg-alt: #EFE3CC;
  --paper: #FFFBF3;
  --ink: #231915;
  --ink-soft: #5E5047;
  --line: #E3D7C2;
  --red: #A3302A;
  --red-soft: #F3DAD5;
  --gold: #C9A24A;
  --gold-deep: #7E6220;
  --gold-soft: #F4E6C4;
  --teal: #1F4E5F;
  --teal-soft: #DCE8E9;
  --night: #1B1310;
  --night-2: #2A1D17;
  --gold-light: #E3C477;

  --font-sans: "Be Vietnam Pro", "Noto Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-serif: "Noto Serif", "Noto Serif KR", "Noto Sans KR", serif;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(43, 33, 27, .06), 0 8px 24px -12px rgba(43, 33, 27, .18);
  --nav-h: 56px;
  --gutter: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
a { color: var(--red); text-underline-offset: 3px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--gold-soft); padding: .05em .4em; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.fine { font-size: .84rem; color: var(--ink-soft); }

/* ---------- progress + header ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); transform-origin: 0 50%; transform: scaleX(0); }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: rgba(251, 246, 236, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, color .3s;
}
.site-header.on-dark { background: rgba(27, 19, 16, .55); color: var(--bg); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 10px; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; flex: none; font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--gold); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--red); }
.nav { flex: 1; min-width: 0; height: 100%; position: relative; }
.nav::after { /* fade hint that the list scrolls */
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 28px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg));
}
.site-header.on-dark .nav::after { background: linear-gradient(90deg, transparent, rgba(27, 19, 16, .9)); }
.nav-list {
  list-style: none; margin: 0; padding: 0 28px 0 4px; height: 100%;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block; white-space: nowrap; padding: 6px 11px; border-radius: 999px;
  color: inherit; text-decoration: none; font-size: .9rem; font-weight: 500; opacity: .78;
  transition: background .2s, color .2s, opacity .2s;
}
.nav-list a:hover { opacity: 1; background: rgba(201, 162, 74, .16); }
.nav-list a.is-active { opacity: 1; background: var(--red); color: #fff; }

/* ---------- photo slots / placeholders ---------- */
.photo {
  position: relative; margin: 0; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(201, 162, 74, .10) 0 12px, transparent 12px 24px),
    var(--bg-alt);
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ph-note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 16px; text-align: center; color: var(--ink-soft); font-size: .85rem;
  border: 2px dashed rgba(163, 48, 42, .35); border-radius: inherit;
}
.ph-note strong { color: var(--red); font-size: .95rem; }
.ph-note span { font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
.photo-credit { position: absolute; z-index: 2; right: 8px; bottom: 8px; font-size: .7rem; color: #fff; background: rgba(27, 19, 16, .6); padding: 2px 8px; border-radius: 6px; max-width: calc(100% - 16px); }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  color: var(--bg); background: var(--night); overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 56px;
}
.hero-photo { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(201, 162, 74, .08) 0 14px, transparent 14px 28px), #2B211B; }
.hero-photo .ph-note { color: rgba(251, 246, 236, .7); border-color: rgba(201, 162, 74, .45); inset: calc(var(--nav-h) + 12px) 12px auto 12px; height: 110px; border-radius: var(--radius); }
.hero-photo .ph-note strong { color: var(--gold); }
/* while hero.jpg is missing, keep the placeholder label clear of the hero text */
.hero:has(.hero-photo img[hidden]) { padding-top: calc(var(--nav-h) + 150px); }
.hero::after { /* legibility scrim */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(27, 19, 16, .45) 0%, rgba(27, 19, 16, .38) 40%, rgba(27, 19, 16, .92) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { background: rgba(27, 19, 16, .5); display: inline-block; font-size: .82rem; letter-spacing: .06em; color: var(--gold); border: 1px solid rgba(201, 162, 74, .6); padding: 4px 12px; border-radius: 999px; }
.hero-title { font-family: var(--font-serif); font-weight: 700; font-size: clamp(3.2rem, 15vw, 7.5rem); line-height: .98; margin: 18px 0 10px; letter-spacing: -.01em; }
.hero-title span { display: block; }
.hero-title-sub { color: var(--gold); }
.hero-tag { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.pill { background: var(--red); color: #fff; padding: 2px 12px; border-radius: 999px; font-weight: 700; }
.hero-pron { color: rgba(251, 246, 236, .75); }
.hero-quote { margin: 26px 0 0; padding-left: 14px; border-left: 3px solid var(--gold); font-size: clamp(1rem, 3.8vw, 1.25rem); line-height: 1.65; max-width: 36em; font-family: "Noto Serif KR", var(--font-serif); font-weight: 600; }
.hero-presenter { margin-top: 26px; display: grid; gap: 16px; }
.hero-meta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: .88rem; max-width: 640px; }
.hero-meta div { border-top: 1px solid rgba(251, 246, 236, .22); padding-top: 8px; }
.hero-meta dt { color: var(--gold); font-size: .74rem; letter-spacing: .08em; }
.hero-meta dd { margin: 0; }
.hero-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; color: var(--bg); text-decoration: none; font-size: .88rem; opacity: .85; }
.hero-cta svg { animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }
.hero-credit { position: absolute; z-index: 2; right: 12px; bottom: 10px; font-size: .68rem; color: rgba(251, 246, 236, .6); }

/* ---------- sections ---------- */
.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-num { color: var(--gold-deep); font-size: .82rem; font-weight: 700; letter-spacing: .1em; margin-bottom: 10px; }
.section-num::before { content: ""; display: inline-block; width: 22px; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 8px; }
.section h2 { font-family: "Noto Serif KR", var(--font-serif); font-weight: 700; font-size: clamp(1.7rem, 6.4vw, 2.6rem); letter-spacing: -.01em; }
.lead { margin-top: 14px; font-size: clamp(1rem, 3.6vw, 1.12rem); color: var(--ink-soft); }
.lead strong { color: var(--ink); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow); }

/* pronunciation helper */
.pron {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  padding: 12px 14px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid rgba(201, 162, 74, .35); font-size: .88rem;
}
.pron-label { font-weight: 700; color: var(--gold-deep); margin-right: 4px; font-size: .8rem; letter-spacing: .04em; }
.pron span:not(.pron-label) { background: var(--paper); border-radius: 999px; padding: 2px 10px; border: 1px solid rgba(201, 162, 74, .3); }
.pron b { font-weight: 600; margin-right: 4px; color: var(--red); }
.pron em { font-style: normal; color: var(--ink-soft); font-size: .8rem; }
.src-inline { margin-top: 12px; font-size: .78rem; color: var(--ink-soft); }

/* ---------- 01 intro ---------- */
.intro-grid { display: grid; gap: 24px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--red), var(--gold)); }
.timeline li { position: relative; padding-bottom: 24px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--red); }
.tl-date { font-size: .8rem; font-weight: 700; color: var(--red); letter-spacing: .06em; }
.timeline h3 { font-size: 1.15rem; margin: 2px 0 4px; }
.timeline p:not(.tl-date) { color: var(--ink-soft); font-size: .94rem; }
.photo-card { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }

/* ---------- 02 region ---------- */
.region-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.rs { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.rs-num { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.8rem, 8vw, 2.6rem); line-height: 1.1; }
.rs-num small { font-family: var(--font-sans); font-size: .9rem; margin-left: 2px; color: var(--ink-soft); }
.rs-label { font-size: .78rem; color: var(--ink-soft); line-height: 1.45; margin-top: 4px; }
.rs-label em { font-style: normal; color: var(--ink); }
.rs-total .rs-num { color: var(--gold-deep); }
.rs-bn { border-top: 4px solid var(--red); }
.rs-bn .rs-num { color: var(--red); }
.rs-bg { border-top: 4px solid var(--teal); }
.rs-bg .rs-num { color: var(--teal); }
.rs-bar { grid-column: 1 / -1; display: flex; gap: 3px; height: 10px; }
.rs-bar span { display: block; width: var(--w); border-radius: 999px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.2s var(--ease) .2s; }
.rs-bar-bn { background: var(--red); }
.rs-bar-bg { background: var(--teal); }
.is-visible .rs-bar span { transform: scaleX(1); }

.map-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px; box-shadow: var(--shadow); }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg);
  padding: 7px 14px; min-height: 40px; border-radius: 999px; font-size: .88rem; font-weight: 500; transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-bn { background: var(--red); }
.dot-bg { background: var(--teal); }
.chip.is-active .dot { box-shadow: 0 0 0 2px var(--bg); }

.map-grid { display: grid; gap: 12px; }
.map-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
#map { height: 62vh; min-height: 340px; max-height: 560px; background: #EFE7D6; }
.map-unlock {
  position: absolute; z-index: 500; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); border: 0; border-radius: 999px; padding: 9px 16px; font-size: .85rem; box-shadow: var(--shadow);
}
.map-unlock[aria-pressed="true"] { background: var(--red); }
.map-fallback { padding: 24px; text-align: center; }
.map-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.map-list button {
  width: 100%; height: 100%; text-align: left; background: var(--bg); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: 10px; padding: 10px 12px; line-height: 1.4; transition: background .2s, transform .2s;
}
.map-list button:hover, .map-list button.is-active { background: var(--gold-soft); }
.map-list button.is-active { transform: translateX(2px); }
.map-list .ml-bn { border-left-color: var(--red); }
.map-list .ml-bg { border-left-color: var(--teal); }
.map-list .ml-ref { border-left-color: #9C9387; }
.map-list b { display: block; font-size: .95rem; }
.map-list span { display: block; font-size: .76rem; color: var(--ink-soft); }
.map-list li[hidden] { display: none; }
.map-note { margin-top: 12px; font-size: .8rem; color: var(--ink-soft); line-height: 1.6; }
.map-note em { font-style: normal; color: var(--ink); font-weight: 500; }

/* leaflet skin */
.leaflet-container { font-family: var(--font-sans); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.5; min-width: 190px; }
.pop-prov { display: inline-block; font-size: .72rem; font-weight: 700; color: #fff; padding: 1px 8px; border-radius: 999px; margin-bottom: 6px; }
.pop-prov.bn { background: var(--red); }
.pop-prov.bg { background: var(--teal); }
.pop-prov.ref { background: #8A8178; }
.pop-title { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--ink); }
.pop-vi { margin: 0; color: var(--ink-soft); font-size: .84rem; }
.pop-desc { margin: 8px 0 0; font-size: .86rem; color: var(--ink); }
.pop-approx { margin: 6px 0 0; font-size: .72rem; color: var(--ink-soft); }
.leaflet-tooltip.tt { background: var(--paper); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: .78rem; border-radius: 8px; padding: 2px 8px; box-shadow: 0 2px 6px rgba(43, 33, 27, .15); }
.leaflet-tooltip.tt.bn { border-color: var(--red); }
.leaflet-tooltip.tt.bg { border-color: var(--teal); }
.leaflet-tooltip.region-label { background: transparent; border: 0; box-shadow: none; color: var(--gold-deep); font-family: var(--font-serif); font-weight: 700; font-size: .84rem; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-tooltip.region-label::before { display: none; }
.map-legend { background: rgba(255, 253, 248, .95); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .74rem; line-height: 1.7; color: var(--ink); box-shadow: 0 2px 8px rgba(43, 33, 27, .12); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map-legend .lg-zone { width: 14px; height: 8px; border-radius: 2px; border: 1.5px dashed var(--gold-deep); background: rgba(201, 162, 74, .18); }

/* ---------- 03 art ---------- */
.duet { display: grid; gap: 10px; align-items: stretch; }
.singer { border-radius: var(--radius-lg); padding: 22px; color: #fff; position: relative; overflow: hidden; }
.singer::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .08); }
.singer-m { background: var(--teal); }
.singer-f { background: var(--red); }
.singer-role { font-size: .78rem; letter-spacing: .08em; opacity: .8; }
.singer h3 { font-family: var(--font-serif); font-size: 1.9rem; margin-top: 2px; }
.singer-pron { color: var(--gold-soft); font-size: .9rem; margin-bottom: 10px; }
.singer p:last-child { font-size: .94rem; opacity: .95; }
.duet-link { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold-deep); font-weight: 700; }
.duet-link b { background: var(--gold-soft); border: 1px solid var(--gold); padding: 3px 14px; border-radius: 999px; font-size: .9rem; }
.wave { height: 14px; width: 60px; background: radial-gradient(circle at 7px 7px, var(--gold) 2.5px, transparent 3px) 0 0 / 14px 14px repeat-x; opacity: .8; animation: flow 1.6s linear infinite; }
.wave-r { animation-direction: reverse; }
@keyframes flow { to { background-position-x: 14px; } }

.art-grid { display: grid; gap: 14px; margin-top: 14px; }
.numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.numbers .big { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1.05; color: var(--red); }
.numbers .big small { font-family: var(--font-sans); font-size: .95rem; color: var(--ink-soft); margin-left: 2px; }
.numbers p:not(.big) { color: var(--ink-soft); font-size: .9rem; }
.numbers-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--ink); }
.numbers-foot svg { color: var(--gold-deep); flex: none; }
.voice h3 { font-size: 1.1rem; margin-bottom: 12px; }
.voice-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.voice-list li { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.voice-list b { font-size: 1.15rem; font-family: "Noto Serif KR", var(--font-serif); grid-row: span 2; color: var(--red); }
.voice-list span { font-weight: 600; font-size: .9rem; }
.voice-list em { font-style: normal; font-size: .76rem; color: var(--ink-soft); }

/* ---------- 04 stage ---------- */
.forms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; position: relative; }
.form-no { position: absolute; top: 12px; right: 14px; font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--gold); opacity: .55; line-height: 1; }
.form-card h3 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--red); padding-right: 26px; }
.form-kind { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--gold-deep); background: var(--gold-soft); padding: 1px 8px; border-radius: 999px; margin: 6px 0; }
.form-card p:last-child { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }

.festival { margin-top: 16px; display: grid; grid-template-columns: auto 1fr; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.festival-date { background: var(--red); padding: 18px 16px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.festival-date p:first-child { font-size: .78rem; letter-spacing: .1em; opacity: .85; }
.festival-day { font-family: var(--font-serif); font-weight: 700; font-size: 1.9rem; line-height: 1.1; white-space: nowrap; }
.festival-day small { font-size: .9rem; font-family: var(--font-sans); margin: 0 2px; }
.festival-body { padding: 18px; }
.festival-body h3 { font-size: 1.05rem; color: var(--gold); }
.festival-facts { margin: 10px 0 0; padding-left: 18px; font-size: .9rem; }
.festival-facts li + li { margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--gold); font-weight: 600; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.festival .link-btn { margin-top: 8px; }

/* ---------- 05 costume ---------- */
.costume-grid { display: grid; gap: 14px; }
.attire { border-top: 5px solid var(--red); }
.attire-m { border-top-color: var(--teal); }
.attire-who { font-weight: 700; font-size: .95rem; margin-bottom: 10px; }
.attire ul { list-style: none; margin: 0; padding: 0; }
.attire li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.attire li:last-child { border-bottom: 0; }
.attire li b { font-weight: 600; color: var(--red); }
.attire-m li b { color: var(--teal); }
.attire li span { font-size: .88rem; color: var(--ink-soft); }
.photo-tall { aspect-ratio: 3 / 4; max-height: 520px; }

/* ---------- 06 values ---------- */
.ketcha { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; gap: 4px; margin-bottom: 18px; }
.village { position: relative; aspect-ratio: 1; display: grid; place-items: center; text-align: center; font-size: .82rem; line-height: 1.4; }
.village-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); background: var(--paper); box-shadow: inset 0 0 0 6px var(--bg-alt), inset 0 0 0 7px rgba(163, 48, 42, .25); }
.village p { position: relative; padding: 0 8px; }
.village b { color: var(--red); }
.bond { text-align: center; }
.bond svg { width: 100%; height: 36px; overflow: visible; }
.bond path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 1.6s var(--ease) .3s; }
.is-visible .bond path { stroke-dashoffset: 0; }
.bond p { font-size: .85rem; margin-top: 2px; }
.bond b { color: var(--gold-deep); }
.values-grid { display: grid; gap: 14px; }
.value h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--red); }
.value p { color: var(--ink-soft); font-size: .95rem; }
.tags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; font-size: .86rem; }
.tags span { color: var(--gold-deep); font-weight: 600; margin-left: 4px; }

/* ---------- 07 today ---------- */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 14px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--red), var(--gold)); }
.stat-wide, .stats .stat:first-child { grid-column: 1 / -1; }
.stat-num { font-family: var(--font-serif); font-weight: 700; color: var(--red); font-size: clamp(1.8rem, 8.5vw, 2.6rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-num small { font-family: var(--font-sans); font-size: .82rem; color: var(--ink-soft); margin: 0 2px; font-weight: 500; }
.stat-label { margin-top: 6px; font-size: .9rem; font-weight: 500; line-height: 1.5; }
.stat-sub { font-size: .8rem; color: var(--ink-soft); margin-top: 2px; }
.growth { margin-top: 12px; display: grid; gap: 6px; }
.growth-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-soft); }
.growth-row i { display: block; height: 10px; width: var(--w); min-width: 6px; border-radius: 999px; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
.growth-row:last-child i { background: var(--red); }
.is-visible .growth-row i { transform: scaleX(1); }
.growth-row b { color: var(--ink); font-weight: 600; }

/* ---------- 08 compare ---------- */
.compare { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.cmp-row { display: grid; grid-template-columns: 52px 1fr 1fr; border-top: 1px solid var(--line); }
.cmp-row:first-child { border-top: 0; }
.cmp-row > span { padding: 12px 10px; font-size: .88rem; line-height: 1.5; }
.cmp-key { font-weight: 700; color: var(--ink-soft); font-size: .78rem !important; background: var(--bg); display: flex; align-items: center; justify-content: center; text-align: center; }
.cmp-a { border-right: 1px solid var(--line); }
.cmp-head > span { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; padding: 14px 10px; color: #fff; }
.cmp-head .cmp-key { background: var(--ink); }
.cmp-head .cmp-a { background: var(--red); border-right-color: transparent; }
.cmp-head .cmp-b { background: var(--teal); }
.common-title { margin: 26px 0 10px; font-size: 1.1rem; }
.common { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.common li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 52px; position: relative; }
.common-no { position: absolute; left: 14px; top: 12px; font-size: 1.4rem; color: var(--gold-deep); line-height: 1; }
.common h4 { font-size: 1rem; }
.common p { font-size: .88rem; color: var(--ink-soft); }

/* ---------- 09 closing ---------- */
.closing { color: var(--bg); background: var(--night); overflow: hidden; padding: 96px 0 80px; }
.closing-photo { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(201, 162, 74, .07) 0 14px, transparent 14px 28px), var(--night); }
.closing-photo .ph-note { color: rgba(251, 246, 236, .65); border-color: rgba(201, 162, 74, .4); inset: 16px 16px auto 16px; height: 64px; border-radius: var(--radius); }
.closing-photo .ph-note strong { color: var(--gold); }
.closing::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(27, 19, 16, .55), rgba(27, 19, 16, .9)); pointer-events: none; }
.closing-inner { position: relative; z-index: 2; }
.closing .section-num { color: var(--gold); }
.closing h2 { font-size: clamp(1.8rem, 7.4vw, 3rem); line-height: 1.3; }
.closing h2 span { color: var(--gold); }
.closing-text { margin-top: 18px; max-width: 40em; color: rgba(251, 246, 236, .86); font-size: 1rem; }
.closing-grid { display: grid; gap: 14px; margin-top: 32px; }
.qr-card { display: flex; align-items: center; gap: 16px; background: rgba(251, 246, 236, .08); border: 1px solid rgba(201, 162, 74, .35); border-radius: var(--radius-lg); padding: 16px; }
.qr { width: 112px; height: 112px; flex: none; background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-title { font-size: .8rem; color: var(--gold); letter-spacing: .06em; }
.qr-url .seg { white-space: nowrap; }
.qr-url { display: block; color: var(--bg); font-weight: 600; font-size: .95rem; margin: 2px 0 4px; overflow-wrap: normal; word-break: normal; }
.thanks { border-left: 3px solid var(--gold); padding: 4px 0 4px 16px; }
.thanks-main { font-family: "Noto Serif KR", var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.thanks p + p { margin-top: 4px; color: rgba(251, 246, 236, .86); }
.thanks-vi { font-size: .88rem; opacity: .7; }
.closing-credit { position: static; display: inline-block; margin-top: 24px; background: rgba(0, 0, 0, .35); }

/* ---------- sources ---------- */
.sources { padding: 56px 0; background: var(--bg); }
.sources h2 { font-size: 1.5rem; }
.sources > .container > .fine { margin: 6px 0 18px; }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.src-list li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .88rem; scroll-margin-top: calc(var(--nav-h) + 16px); }
.src-list li:target { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.src-list h3 { font-size: .9rem; color: var(--red); margin-bottom: 2px; }

.site-footer { background: var(--ink); color: rgba(251, 246, 236, .75); font-size: .8rem; padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.to-top { color: var(--gold); text-decoration: none; }

/* ---------- touch feel ---------- */
html { -webkit-tap-highlight-color: transparent; }
.nav-list a { min-height: 40px; display: flex; align-items: center; }
.chip, .quiz-opt, .say-btn, [data-say], .map-list button, .btn-primary { touch-action: manipulation; }

/* hero photo: slow Ken Burns drift */
.hero-photo img { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
/* animated hero: slides cross-fade, each drifting in its own direction */
.hero-slide { opacity: 0; transition: opacity 1.8s ease-in-out; will-change: opacity, transform; }
.hero-slide.is-active { opacity: 1; }
.hero-slide:nth-of-type(2) { animation-name: kenburns2; animation-duration: 22s; transform-origin: 35% 45%; }
.hero-slide:nth-of-type(3) { animation-name: kenburns3; animation-duration: 28s; transform-origin: 30% 70%; object-position: 28% 50%; }
@keyframes kenburns2 { from { transform: scale(1.14) translate(2%, 0); } to { transform: scale(1.03) translate(-1%, -1%); } }
@keyframes kenburns3 { from { transform: scale(1.03) translate(0, 1.5%); } to { transform: scale(1.13) translate(1.5%, -1%); } }
.hero-credit { transition: opacity .6s; }
.hero-credit.is-fading { opacity: 0; }

/* ---------- listen buttons ---------- */
.say-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px 4px 10px;
  border-radius: 999px; border: 1px solid rgba(201, 162, 74, .6); background: rgba(27, 19, 16, .35); color: var(--gold); font-size: .82rem; font-weight: 600;
}
.say-btn:active { transform: scale(.96); }
.hero-tag { flex-wrap: wrap; }
.pron-label small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .72rem; letter-spacing: 0; }
.pron span[data-say] { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; transition: background .2s, border-color .2s, transform .15s; }
.pron span[data-say]:active { transform: scale(.96); }
.pron span[data-say]:hover { border-color: var(--gold); }
.say-ico { color: var(--gold-deep); flex: none; }
.voice-list li[data-say] { cursor: pointer; position: relative; transition: border-color .2s, background .2s, transform .15s; }
.voice-list li[data-say]::after { content: ""; position: absolute; right: 10px; top: 10px; width: 14px; height: 14px; opacity: .55;
  background: currentColor; color: var(--gold-deep);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4zm12.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4zm12.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4z'/%3E%3C/svg%3E") center / contain no-repeat; }
.voice-list li[data-say]:active { transform: scale(.97); }
.is-speaking { border-color: var(--gold) !important; background: var(--gold-soft) !important; animation: speak .9s ease-in-out infinite; }
.say-btn.is-speaking { background: var(--gold) !important; color: var(--ink); }
@keyframes speak { 50% { box-shadow: 0 0 0 6px rgba(201, 162, 74, .25); } }

/* ---------- Hội Lim countdown ---------- */
.dday { margin-top: 12px; display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; background: rgba(201, 162, 74, .14); border: 1px solid rgba(201, 162, 74, .4); border-radius: 12px; padding: 8px 12px; font-size: .88rem; }
.dday b { font-family: var(--font-serif); font-size: 1.35rem; color: var(--gold); }
.dday span { font-size: .78rem; opacity: .75; }

/* ---------- quiz ---------- */
.quiz { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 20px; box-shadow: var(--shadow); max-width: 720px; overflow: hidden; }
.quiz-top { display: flex; justify-content: space-between; font-size: .84rem; color: var(--ink-soft); }
.quiz-top b { color: var(--red); font-size: 1rem; }
.quiz-score { font-weight: 600; color: var(--gold-deep); }
.quiz-bar { height: 6px; border-radius: 999px; background: var(--bg-alt); margin: 10px 0 16px; overflow: hidden; }
.quiz-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); transform-origin: 0 50%; transition: transform .5s var(--ease); }
.quiz-q { font-size: 1.12rem; line-height: 1.5; margin-bottom: 14px; outline: none; }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts.is-ox { grid-template-columns: 1fr 1fr; }
.quiz-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; text-align: left;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: .98rem; font-weight: 500;
  transition: border-color .2s, background .2s, transform .12s;
}
.quiz-opt:not(:disabled):hover { border-color: var(--gold); }
.quiz-opt:not(:disabled):active { transform: scale(.98); }
.quiz-key { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.is-ox .quiz-opt { justify-content: center; min-height: 84px; font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; }
.is-ox .quiz-key { display: none; }
.quiz-opt:disabled { cursor: default; opacity: .55; }
.quiz-opt.is-correct { opacity: 1; border-color: #1F4E5F; background: #DCE8E9; }
.quiz-opt.is-correct .quiz-key { background: #1F4E5F; border-color: #1F4E5F; color: #fff; }
.quiz-opt.is-wrong { opacity: 1; border-color: var(--red); background: var(--red-soft); animation: shake .35s; }
.quiz-opt.is-wrong .quiz-key { background: var(--red); border-color: var(--red); color: #fff; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.quiz-feedback:empty { display: none; }
.quiz-feedback { margin-top: 14px; padding: 14px; border-radius: 14px; font-size: .94rem; animation: pop .35s var(--ease); }
.quiz-feedback.ok { background: #DCE8E9; border: 1px solid #B9CFD3; }
.quiz-feedback.no { background: var(--red-soft); border: 1px solid #E3C3BB; }
.quiz-verdict { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.ok .quiz-verdict { color: #1F4E5F; }
.no .quiz-verdict { color: var(--red); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.quiz-actions .link-btn { color: var(--red); }
.btn-primary { border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; padding: 12px 22px; min-height: 46px; font-size: .95rem; }
.btn-primary:active { transform: scale(.97); }
.quiz-result { text-align: center; padding: 8px 0 4px; animation: pop .4s var(--ease); }
.quiz-ring {
  --p: 0; width: 132px; height: 132px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--red) calc(var(--p) * 360deg), var(--bg-alt) 0);
}
.quiz-ring span { width: 104px; height: 104px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: 1rem; color: var(--ink-soft); }
.quiz-ring b { font-family: var(--font-serif); font-size: 2.4rem; color: var(--red); line-height: 1; }
.quiz-grade-label { font-size: .78rem; color: var(--gold-deep); letter-spacing: .1em; font-weight: 700; }
.quiz-result-title { font-family: "Noto Serif KR", var(--font-serif); font-size: 1.6rem; margin: 2px 0 6px; outline: none; }
.quiz-msg { color: var(--ink-soft); }
.quiz-dots { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 16px 0 18px; }
.quiz-dots li { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: #fff; }
.quiz-dots .ok { background: #1F4E5F; }
.quiz-dots .no { background: var(--red); }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: rotate(540deg); } }

/* ---------- floating quiz button ---------- */
.quiz-fab {
  position: fixed; z-index: 45; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; min-height: 48px; border-radius: 999px;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 700; font-size: .92rem;
  box-shadow: 0 10px 24px -8px rgba(163, 48, 42, .6);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.quiz-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.quiz-fab:active { transform: scale(.95); }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 70; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .86rem;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- phones only ---------- */
@media (max-width: 639px) {
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 24px; }
  .festival { grid-template-columns: 1fr; }
  .festival-date { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 10px; padding: 12px 18px; text-align: left; }
  .festival-day { font-size: 1.6rem; }
}

/* ---------- ≥ 640px ---------- */
@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .hero-meta { grid-template-columns: repeat(4, minmax(0, auto)); max-width: 880px; gap: 10px 28px; }
  .forms { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-wide, .stats .stat:first-child { grid-column: span 1; }
  .stats .stat:nth-child(4), .stats .stat:nth-child(5) { grid-column: span 3; }
  .common { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmp-row { grid-template-columns: 88px 1fr 1fr; }
  .cmp-row > span { padding: 14px 18px; font-size: .95rem; }
  .map-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .closing-grid { grid-template-columns: auto 1fr; align-items: center; gap: 32px; }
}

/* ---------- ≥ 900px ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 64px; }
  .section { padding: 104px 0; }
  .hero { align-items: center; }
  .intro-grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; }
  .map-grid { grid-template-columns: 1fr 260px; }
  .map-list { grid-template-columns: 1fr; align-content: start; }
  #map { height: 520px; max-height: none; }
  .duet { grid-template-columns: 1fr auto 1fr; }
  .duet-link { flex-direction: column; }
  .wave { width: 14px; height: 60px; background: radial-gradient(circle at 7px 7px, var(--gold) 2.5px, transparent 3px) 0 0 / 14px 14px repeat-y; animation-name: flowY; }
  @keyframes flowY { to { background-position-y: 14px; } }
  .art-grid { grid-template-columns: 1fr 1fr; }
  .costume-grid { grid-template-columns: 1fr 1fr 1fr; align-items: center; }
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .stats .stat, .stats .stat:first-child { grid-column: span 2; }
  .stats .stat:nth-child(4), .stats .stat:nth-child(5) { grid-column: span 3; }
  .ketcha { max-width: 640px; margin: 0 auto 28px; }
  .src-list { grid-template-columns: 1fr 1fr; }
  .quiz { padding: 28px 32px; }
  .quiz-opts:not(.is-ox) { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   Polish pass (mobile-first)
   ========================================================= */

/* numbers card: keep "약 400여 곡" on one line */
.numbers .big { white-space: nowrap; }
.numbers .big .pre { font-size: .95rem; margin: 0 4px 0 0; }

/* costume: segmented tabs (hidden on desktop where both lists show) */
.attire-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); }
.attire-tabs button {
  flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft);
  font-weight: 600; font-size: .9rem; transition: background .25s, color .25s, box-shadow .25s; touch-action: manipulation;
}
.attire-tabs button[aria-selected="true"] { background: var(--paper); color: var(--red); box-shadow: 0 1px 2px rgba(43, 33, 27, .08), 0 4px 12px -6px rgba(43, 33, 27, .3); }
.attire-tabs button[data-attire="m"][aria-selected="true"] { color: var(--teal); }
@media (max-width: 899px) {
  .costume-grid .photo-tall { order: -1; aspect-ratio: 4 / 3; }
  .costume-grid[data-show="f"] .attire-m, .costume-grid[data-show="m"] .attire-f { display: none; }
  .costume-grid .attire { animation: pop .35s var(--ease); }
}
@media (min-width: 900px) { .attire-tabs { display: none; } }

/* closing: share on phones, QR on desktop */
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.btn-share {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--night); font-weight: 700; font-size: .9rem; touch-action: manipulation;
}
.btn-share:active { transform: scale(.96); }
.only-coarse { display: none; }
@media (pointer: coarse) { .only-coarse { display: inline; } .only-fine { display: none; } }

/* sources: collapsible */
.src-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.src-details > summary::-webkit-details-marker { display: none; }
.src-details > summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(45deg) translateY(-3px); transition: transform .25s; }
.src-details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.src-details > summary h2 { font-size: 1.2rem; }
.src-hint { margin-left: auto; font-size: .8rem; color: var(--ink-soft); }
.src-hint b { color: var(--red); }
.src-details[open] .src-hint b { font-size: 0; }
.src-details[open] .src-hint b::after { content: "접기"; font-size: .8rem; }
.src-details > .fine { margin: 14px 0 12px; }

/* ---------- phones ---------- */
@media (max-width: 639px) {
  /* pronunciation helpers: one swipeable strip instead of a tall box */
  .pron {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none;
    margin: 22px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter); border-radius: 0; border-left: 0; border-right: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .pron::-webkit-scrollbar { display: none; }
  .pron > * { flex: none; scroll-snap-align: start; }
  .pron span[data-say] { white-space: nowrap; }
  .pron::after { content: ""; flex: none; width: 24px; }

  /* map: district cards become a swipeable strip under the map */
  .map-wrap { padding: 10px; }
  .map-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 10px; gap: 8px; margin: 0 -10px; padding: 2px 10px 6px; scrollbar-width: none; }
  .map-list::-webkit-scrollbar { display: none; }
  .map-list li { flex: 0 0 66%; scroll-snap-align: center; }
  .map-unlock { top: 10px; right: 10px; left: auto; bottom: auto; transform: none; padding: 8px 14px; }
  #map { height: 56vh; min-height: 320px; }
  .map-note { font-size: .76rem; }
  .leaflet-bottom.leaflet-left .map-legend { margin-bottom: 30px; margin-left: 8px; font-size: .7rem; padding: 6px 8px; }
  .leaflet-control-attribution { font-size: .6rem; }

  .region-stats { gap: 8px; }
  .rs { padding: 10px; }
  .rs-label { font-size: .72rem; }

  .photo-credit { font-size: .6rem; padding: 2px 6px; right: 6px; bottom: 6px; }
  .src-inline { font-size: .72rem; }
  .qr { width: 92px; height: 92px; padding: 5px; }
  .qr-card { gap: 14px; padding: 14px; }
  .cmp-row > span { font-size: .84rem; }
  .card { padding: 18px; }
  .hero-cta { margin-top: 20px; }
}

/* =========================================================
   Sơn mài · Lacquer & Gold Leaf theme
   ========================================================= */
.section h2, .hero-title, .closing h2, .thanks-main, .quiz-q, .quiz-result-title { font-family: var(--font-serif); }

/* ---------- header / table of contents ---------- */
.site-header { background: rgba(246, 239, 226, .9); }
.site-header.on-dark { background: rgba(27, 19, 16, .72); }
.brand svg { flex: none; }
.nav-tools { display: none; align-items: center; gap: 10px; margin-left: auto; padding-right: 12px; }
.chapter { font-size: .74rem; letter-spacing: .14em; opacity: .8; font-variant-numeric: tabular-nums; }
.chapter b { font-weight: 700; color: var(--gold-deep); }
.on-dark .chapter b { color: var(--gold); }
.menu-btn, .menu-close {
  width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(201, 162, 74, .6);
  background: transparent; color: inherit; display: grid; place-items: center; touch-action: manipulation;
}
.menu-btn:active, .menu-close:active { transform: scale(.94); }
@media (max-width: 899px) {
  .nav { display: none; }
  .nav-tools { display: flex; }
}
.menu-sheet {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; background: var(--night); color: var(--bg);
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom)); animation: sheetIn .35s var(--ease);
  background-image: radial-gradient(circle at 115% -5%, transparent 0 120px, rgba(201, 162, 74, .14) 121px 122px, transparent 123px 170px, rgba(201, 162, 74, .1) 171px 172px, transparent 173px);
}
.menu-sheet[hidden] { display: none; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-10px); } }
.menu-head { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.menu-title { font-size: .78rem; font-weight: 700; letter-spacing: .24em; color: var(--gold); }
.menu-list { list-style: none; margin: 6px 0 0; padding: 0; }
.menu-list a {
  display: flex; align-items: baseline; gap: 16px; padding: 15px 2px; min-height: 44px; box-sizing: border-box;
  border-bottom: 1px solid rgba(201, 162, 74, .18); color: var(--bg); text-decoration: none;
  font-family: var(--font-serif); font-size: 1.28rem; font-weight: 600;
}
.menu-list a > span:first-child { flex: none; width: 24px; font-family: var(--font-sans); font-size: .78rem; letter-spacing: .06em; color: var(--gold); }
.menu-list a.is-active { color: var(--gold-light); }
.menu-list a:active { background: rgba(201, 162, 74, .08); }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero::after { background: linear-gradient(180deg, rgba(27, 19, 16, .62) 0%, rgba(27, 19, 16, .12) 20%, rgba(27, 19, 16, .38) 44%, rgba(27, 19, 16, .93) 68%, #1B1310 100%); }
.hero-rings { position: absolute; z-index: 1; width: 360px; height: 360px; right: -150px; top: 32%; opacity: .5; pointer-events: none; animation: spin 140s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.eyebrow { background: none; border: 0; padding: 0; border-radius: 0; display: inline-flex; align-items: center; gap: 10px; font-size: .76rem; font-weight: 600; letter-spacing: .14em; color: var(--gold); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.hero-title { font-size: clamp(4rem, 20vw, 8rem); line-height: .95; margin: 16px 0 0; letter-spacing: -.02em; }
.hero-title-sub { font-style: italic; font-weight: 600; font-size: .7em; margin-top: 6px; letter-spacing: 0; }
.hero-sub { margin-top: 14px; max-width: 30em; font-size: .95rem; line-height: 1.6; color: rgba(246, 239, 226, .86); }
.hero-tag { margin-top: 16px; gap: 10px; }
.say-btn { min-height: 44px; padding: 0 16px 0 12px; font-size: .88rem; color: var(--gold-light); border-color: rgba(201, 162, 74, .7); background: rgba(27, 19, 16, .5); }
.hero-quote { display: flex; gap: 10px; margin-top: 20px; padding-left: 0; border-left: 0; font-size: clamp(1rem, 4.1vw, 1.2rem); }
.q-mark { font-family: var(--font-serif); font-size: 2.6rem; line-height: .9; color: var(--gold); }
.hero-presenter { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(201, 162, 74, .35); display: flex; flex-direction: column; gap: 4px; max-width: 640px; }
.hp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hp-name { font-size: .96rem; font-weight: 600; }
.hp-name span { margin-left: 4px; font-weight: 400; opacity: .7; }
.hp-row time { font-size: .75rem; letter-spacing: .06em; color: var(--gold); white-space: nowrap; }
.hp-meta { font-size: .8rem; color: rgba(246, 239, 226, .72); }
.hero-foot { margin-top: 18px; max-width: 640px; display: flex; align-items: center; justify-content: space-between; }
.hero-foot .hero-cta { margin-top: 0; }
.hero-dots { display: flex; gap: 6px; }
.hero-dots span { width: 8px; height: 3px; border-radius: 2px; background: rgba(246, 239, 226, .4); transition: width .5s var(--ease), background .5s; }
.hero-dots .is-on { width: 24px; background: var(--gold); }

/* ---------- section heads: ring badge ---------- */
.section-num { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: .76rem; letter-spacing: .16em; color: var(--gold-deep); }
.section-num::before { display: none; }
.sn-badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; letter-spacing: 0; color: var(--gold-deep);
  background: radial-gradient(circle, transparent 0 17px, rgba(201, 162, 74, .35) 17.5px 18.5px, transparent 19px);
}
.section h2 { font-size: clamp(1.85rem, 7.8vw, 2.7rem); line-height: 1.3; }
.lead { font-size: clamp(1rem, 3.9vw, 1.1rem); line-height: 1.75; }

/* ---------- 01 intro ---------- */
.intro-main { display: flex; flex-direction: column; gap: 18px; }
.seal-card { position: relative; overflow: hidden; border-radius: 22px; background: var(--red); color: var(--bg); padding: 24px 22px; }
.seal-rings { position: absolute; width: 200px; height: 200px; right: -60px; top: -50px; opacity: .35; }
.seal-kicker { font-size: .75rem; letter-spacing: .14em; color: #F2D9A0; }
.seal-year { font-family: var(--font-serif); font-size: 4rem; font-weight: 700; line-height: 1; margin: 6px 0 4px; }
.seal-date { font-size: .95rem; font-weight: 600; }
.seal-code { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: .75rem; color: #F2D9A0; }
.seal-code code { background: rgba(27, 19, 16, .28); color: var(--bg); }
.timeline { padding: 0; }
.timeline::before, .timeline li::before { display: none; }
.timeline li { display: grid; grid-template-columns: 78px minmax(0, 1fr); column-gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.timeline .tl-date { grid-row: span 2; font-family: var(--font-serif); font-size: .82rem; letter-spacing: 0; color: var(--red); }
.timeline h3 { font-size: 1rem; margin: 0 0 2px; }
.timeline p:not(.tl-date) { font-size: .85rem; }
.photo-card { border-radius: 22px; }

/* ---------- 02 region ---------- */
.region-stats { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.rs-big { display: flex; align-items: flex-end; gap: 16px; }
.rs-big .rs-num { font-size: 5.6rem; line-height: .85; color: var(--red); }
.rs-big .rs-label { margin: 0; padding-bottom: 6px; display: flex; flex-direction: column; font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }
.rs-big .rs-label b { font-size: 1rem; color: var(--ink); }
.rs-bar { height: 12px; }
.rs-bar span { border-radius: 6px; }
.rs-legend { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; color: var(--ink-soft); }
.rs-legend b { font-weight: 700; margin-right: 4px; }
.rs-legend b.bn { color: var(--red); }
.rs-legend b.bg { color: var(--teal); }
.chip.is-active { background: var(--night); border-color: var(--night); }

/* ---------- 03 on lacquer ---------- */
.section-dark { position: relative; overflow: hidden; background: var(--night); color: var(--bg); }
.section-dark::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -140px; top: -100px; border-radius: 50%; pointer-events: none; opacity: .55;
  background: repeating-radial-gradient(circle, transparent 0 27px, rgba(201, 162, 74, .45) 27.5px 28.5px, transparent 29px 34px);
}
.section-dark .container { position: relative; }
.section-dark .section-num { color: var(--gold); }
.section-dark .sn-badge { color: var(--gold-light); }
.section-dark .lead { color: rgba(246, 239, 226, .8); }
.section-dark .lead strong { color: var(--bg); }
.section-dark .card { background: var(--night-2); border-color: rgba(201, 162, 74, .25); box-shadow: none; color: var(--bg); }
.section-dark .numbers .big { color: var(--gold-light); }
.section-dark .numbers .big small, .section-dark .numbers p:not(.big) { color: rgba(246, 239, 226, .72); }
.section-dark .numbers-foot { border-top-color: rgba(201, 162, 74, .25); color: var(--bg); }
.section-dark .numbers-foot svg { color: var(--gold); }
.section-dark .voice-list li { background: transparent; border-color: rgba(201, 162, 74, .35); color: var(--bg); }
.section-dark .voice-list b { color: var(--gold-light); }
.section-dark .voice-list em { color: rgba(246, 239, 226, .6); }
.section-dark .voice-list li[data-say]::after { color: var(--gold); }
.section-dark .fine { color: rgba(246, 239, 226, .55); }
.section-dark .pron { background: var(--night-2); border-color: rgba(201, 162, 74, .25); }
.section-dark .pron-label { color: var(--gold); }
.section-dark .pron-label small { color: rgba(246, 239, 226, .55); }
.section-dark .pron span[data-say] { background: var(--night); border-color: rgba(201, 162, 74, .35); color: var(--bg); }
.section-dark .pron b { color: var(--gold-light); }
.section-dark .say-ico { color: var(--gold); }
.section-dark .src-inline { color: rgba(246, 239, 226, .55); }
.section-dark .src-inline a { color: var(--gold); }
.section-dark .is-speaking { background: rgba(201, 162, 74, .2) !important; }
/* call-and-response bubbles */
.duet { gap: 0; }
.singer-m { border-radius: 22px 22px 22px 6px; width: 86%; justify-self: start; }
.singer-f { border-radius: 22px 22px 6px 22px; width: 86%; justify-self: end; background: var(--red); }
.duet-link { height: 56px; }
.duet-link b { background: var(--gold); border-color: var(--gold); color: var(--night); }
@media (min-width: 900px) { .singer-m, .singer-f { width: auto; } .duet-link { height: auto; } }

/* ---------- cards & chips ---------- */
.card { border-radius: 20px; }
.pron span:not(.pron-label) { border-color: #D9C69A; }
.form-card, .stat, .common li, .src-list li, .map-list button { border-radius: 16px; }

/* ---------- 09 quiz ---------- */
.quiz { border-radius: 22px; }
.quiz-segs { display: flex; gap: 4px; margin: 12px 0 20px; }
.quiz-segs i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.quiz-segs i.done { background: var(--gold); }
.quiz-segs i.now { background: var(--red); }
.quiz-qno { display: block; margin-bottom: 6px; font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; line-height: 1; color: var(--red); }
.quiz-q { font-size: 1.35rem; line-height: 1.45; margin-bottom: 18px; }
.quiz-opt { min-height: 58px; border-radius: 16px; background: var(--paper); border: 1px solid #D9C69A; }
.quiz-opt.is-correct, .quiz-opt.is-wrong { border-width: 2px; }
.quiz-ring { background: conic-gradient(var(--red) calc(var(--p) * 360deg), var(--line) 0); }
.btn-primary { background: var(--night); }
.quiz-fab { background: var(--red); }

/* ---------- 10 closing ---------- */
.closing { padding-top: 300px; }
.closing-photo { inset: 0 0 auto 0; height: 440px; }
.closing::after { background: linear-gradient(180deg, rgba(27, 19, 16, .15) 0, rgba(27, 19, 16, .3) 240px, #1B1310 440px); }
.closing-photo .hero-slide, .closing-photo img { object-position: 28% 50%; }
.closing .section-num { color: var(--gold); }
.closing .sn-badge { color: var(--gold-light); }
.closing h2 { font-size: clamp(1.9rem, 8vw, 3rem); }
.closing h2 span { color: var(--gold-light); }
.qr-card { flex-direction: column; align-items: stretch; gap: 12px; background: var(--night-2); border-color: rgba(201, 162, 74, .3); border-radius: 20px; padding: 18px; }
.qr-card > div:last-child { display: flex; flex-direction: column; gap: 6px; }
.qr-title { font-size: .76rem; letter-spacing: .12em; }
.qr-url { font-size: 1.02rem; margin: 0; text-decoration: none; }
.share-row { width: 100%; flex-wrap: nowrap; gap: 10px; margin-top: 6px; }
.btn-share { flex: 1; justify-content: center; min-height: 48px; background: var(--gold); color: var(--night); font-size: .95rem; }
#copy-url { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(201, 162, 74, .6); color: var(--gold-light); text-decoration: none; white-space: nowrap; }
#copy-url:only-child, .btn-share[hidden] + #copy-url { flex: 1; }
.thanks { border-left: 0; padding-left: 0; }
.thanks-main { font-size: 1.55rem; color: var(--gold-light); }
.thanks-vi { font-family: var(--font-serif); font-style: italic; }
@media (max-width: 899px) { .qr { display: none; } }
@media (min-width: 900px) {
  .closing { padding-top: 360px; }
  .closing-photo { height: 560px; }
  .closing::after { background: linear-gradient(180deg, rgba(27, 19, 16, .15) 0, rgba(27, 19, 16, .35) 320px, #1B1310 560px); }
  .qr-card { flex-direction: row; align-items: center; }
  .qr-card > div:last-child { flex: 1; }
  .hero-rings { width: 560px; height: 560px; right: -140px; top: 16%; }
  .intro-grid { align-items: start; }
  .rs-legend { flex-direction: row; justify-content: space-between; }
}

/* ---------- phones: photo on top, text below (no text over the faces) ---------- */
@media (max-width: 899px) {
  .hero { --photo-h: 58svh; display: block; min-height: 0; padding: 0 0 40px; }
  .hero-photo { position: relative; inset: auto; height: var(--photo-h); min-height: 340px; }
  .hero-slide { object-position: 50% 28%; }
  .hero-slide:nth-of-type(3) { object-position: 28% 50%; }
  .hero::after {
    inset: 0 0 auto 0; height: calc(var(--photo-h) + 2px); min-height: 342px;
    background: linear-gradient(180deg, rgba(27, 19, 16, .55) 0, rgba(27, 19, 16, 0) 18%, rgba(27, 19, 16, 0) 62%, #1B1310 100%);
  }
  .hero-inner { margin-top: -56px; }
  .hero-title { margin-top: 12px; }
  .hero-rings { top: calc(var(--photo-h) - 150px); }
  .hero-credit { top: calc(var(--nav-h) + 8px); bottom: auto; right: 10px; padding: 2px 8px; border-radius: 6px; font-size: .6rem; color: rgba(246, 239, 226, .85); background: rgba(27, 19, 16, .55); }
  .hero-rings { opacity: .3; }
  .hero:has(.hero-photo img[hidden]) { padding-top: 0; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .rs-bar span, .growth-row i { transform: none; }
  .bond path { stroke-dashoffset: 0; }
}
@media print {
  .site-header, .progress, .map-unlock, .hero-cta { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .hero, .closing { min-height: auto; }
}
