/* Korean Chingu — shared styles
   Layout idea: a quiet index of topics; each topic is its own page with one long,
   numbered walkthrough in a single reading column, Korean screen labels as paired chips. */
:root {
  --paper: #f3f6f5;
  --surface: #ffffff;
  --ink: #132221;
  --muted: #566664;
  --line: #d3dcda;
  --accent: #0b6e69;
  --accent-soft: #dff0ee;
  --stamp: #c53d22;
  --stamp-soft: #fbe9e4;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1918; --surface: #172322; --ink: #e6efed; --muted: #9bb0ad;
    --line: #2b3b39; --accent: #5cc9c1; --accent-soft: #163735; --stamp: #f08a70; --stamp-soft: #3a211b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
.tagline { color: var(--muted); font-size: 14px; }

/* Home */
.intro { padding: 44px 0 28px; display: grid; gap: 14px; }
.intro h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 700; }
.intro p { color: var(--muted); max-width: 58ch; }
.topics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); padding: 0 0 56px; list-style: none; margin: 0; }
.topic { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; min-height: 132px; align-content: start; height: 100%; }
.topic .ko { font-weight: 600; font-size: 13px; color: var(--muted); }
.topic h2 { font-size: 20px; font-weight: 700; }
.topic p { font-size: 14px; color: var(--muted); }
a.topic { border-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
a.topic:hover { background: var(--accent-soft); }
a.topic .go { font-size: 14px; font-weight: 600; color: var(--accent); margin-top: 4px; }
div.topic { opacity: .72; }
div.topic .soon { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* Guide */
.crumbs { margin: 26px 0 0; font-size: 15px; font-weight: 500; }
.guide-head { padding: 18px 0 8px; display: grid; gap: 12px; }
.guide-head .ko { font-weight: 600; color: var(--muted); font-size: 15px; }
.guide-head h1 { font-size: clamp(30px, 6vw, 42px); font-weight: 700; }
.guide-head .lede { color: var(--muted); max-width: 60ch; }
.checked { font-size: 13px; color: var(--muted); }

figure { margin: 0; }
.specimen { margin: 22px 0 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.code { display: flex; gap: 10px; font-family: var(--font-mono); font-size: clamp(20px, 5vw, 30px); font-variant-numeric: tabular-nums; min-width: max-content; }
.code > div { display: grid; gap: 6px; justify-items: start; }
.code b { font-weight: 500; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); }
.code small { font-family: var(--font-body); font-size: 12px; color: var(--muted); max-width: 13ch; line-height: 1.3; }
.specimen figcaption { font-size: 13px; color: var(--muted); margin-top: 14px; }

nav.toc { margin: 22px 0 8px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
nav.toc ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 15px; }

section.part { padding: 34px 0 6px; border-top: 1px solid var(--line); margin-top: 30px; display: grid; gap: 16px; scroll-margin-top: 12px; }
section.part > h2 { font-size: 26px; font-weight: 700; display: flex; gap: 12px; align-items: baseline; }
section.part > h2 .n { font-family: var(--font-mono); font-size: 15px; color: var(--accent); font-weight: 500; flex: none; }
section.part p, section.part li { max-width: 65ch; }
section.part ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

.paths { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.path { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 8px; align-content: start; }
.path h3 { font-size: 17px; font-weight: 700; }
.path p { font-size: 15px; color: var(--muted); }
.pill { justify-self: start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--stamp-soft); color: var(--stamp); }

ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
ol.steps > li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; max-width: none; }
ol.steps > li::before { content: counter(s); font-family: var(--font-mono); font-size: 14px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); }
ol.steps .body { display: grid; gap: 8px; }
ol.steps h3 { font-size: 17px; font-weight: 700; font-family: var(--font-body); line-height: 1.4; }
.labels { display: flex; flex-wrap: wrap; gap: 8px; }
.label { display: inline-grid; grid-auto-flow: column; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; font-size: 14px; background: var(--surface); }
.label .k { padding: 3px 9px; font-weight: 600; background: var(--accent-soft); }
.label .e { padding: 3px 9px; color: var(--muted); }

.note { padding: 14px 16px; border-radius: 10px; background: var(--stamp-soft); border: 1px solid var(--stamp); display: grid; gap: 4px; }
.note strong { color: var(--stamp); font-size: 14px; letter-spacing: .02em; }
.note p { font-size: 15px; }

.calc { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 14px; }
.calc label { font-weight: 600; font-size: 15px; display: grid; gap: 6px; justify-items: start; }
.calc input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); }
.calc dl { margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.calc dt { font-size: 13px; color: var(--muted); }
.calc dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 17px; }

.table-wrap { overflow-x: auto; }
table.gloss { width: 100%; border-collapse: collapse; font-size: 15px; }
table.gloss th, table.gloss td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.gloss th { font-size: 13px; color: var(--muted); font-weight: 600; }
table.gloss td:first-child { font-weight: 600; white-space: nowrap; }

.sources { font-size: 14px; }
.notfound { padding: 60px 0; display: grid; gap: 14px; }
footer.site { margin-top: 48px; border-top: 1px solid var(--line); padding: 22px 0 40px; color: var(--muted); font-size: 13px; }
footer.site p { max-width: 70ch; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- Visual guide ---------- */
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.facts li { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }

.need { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); list-style: none; margin: 0; padding: 0 !important; }
.need li { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 2px; }
.need b { font-size: 16px; }
.need span { font-size: 13px; color: var(--muted); }

.vstep { display: grid; gap: 20px; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.vstep .say { display: grid; gap: 12px; align-content: start; }
.vstep .num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; }
.vstep h3 { font-size: 22px; font-weight: 700; }
.vstep p { font-size: 16px; }
@media (max-width: 620px) { .vstep { grid-template-columns: 1fr; } .vstep .shot { max-width: 320px; justify-self: center; } }

.shot { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #fff; line-height: 0; width: 100%; }
.shot img { width: 100%; height: auto; display: block; }
.shot .spot { position: absolute; border: 3px solid #e2452a; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(10, 20, 20, .5); }
.shot .box { position: absolute; border: 3px solid #e2452a; border-radius: 8px; }
.badge { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e2452a; color: #fff; font: 700 13px/1 var(--font-body); flex: none; }
.shot .badge { position: absolute; transform: translate(-40%, -40%); box-shadow: 0 0 0 2px #fff; }
.placeholder { border: 2px dashed var(--line); border-radius: 12px; min-height: 220px; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; background: var(--paper); }

ol.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ol.legend li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 15px; }
ol.legend .k { font-weight: 600; display: block; }
ol.legend .e { color: var(--muted); display: block; }

.flow { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); list-style: none; margin: 0; padding: 0 !important; counter-reset: f; }
.flow li { counter-increment: f; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; align-content: start; }
.flow li::before { content: counter(f); font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.flow b { font-size: 16px; line-height: 1.3; }
.flow span { font-size: 14px; color: var(--muted); }

details.more { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 16px; }
details.more summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
details.more > *:not(summary) { margin-bottom: 14px; }
.credit { font-size: 13px; color: var(--muted); }

/* ---------- Car guide ---------- */
.shops { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); list-style: none; margin: 0; padding: 0 !important; }
.shop { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-left-width: 5px; border-radius: 10px; display: grid; gap: 8px; align-content: start; }
.shop.hi { border-left-color: #1f8a5b; }
.shop.mid { border-left-color: #c98a12; }
.shop.lo { border-left-color: #c53d22; }
.shop h3 { font-size: 18px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.shop h3 small { font: 600 13px var(--font-body); color: var(--muted); }
.shop p { font-size: 15px; }
.shop a { font-size: 14px; font-weight: 600; }
.trust { justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; letter-spacing: .02em; }
.hi .trust { background: #dff3e8; color: #17694a; }
.mid .trust { background: #fbefd6; color: #8a5d05; }
.lo .trust { background: var(--stamp-soft); color: var(--stamp); }
@media (prefers-color-scheme: dark) {
  .hi .trust { background: #143a2a; color: #7fd6ab; }
  .mid .trust { background: #3a2c10; color: #f0c56a; }
}

.dodont { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dodont > div { padding: 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.dodont ul { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
.dodont li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: 15px; }
.dodont li::before { font-weight: 700; font-size: 16px; line-height: 1.5; }
.dodont .do li::before { content: "✓"; color: #1f8a5b; }
.dodont .dont li::before { content: "✕"; color: #c53d22; }
.dodont h3 { font-size: 16px; font-family: var(--font-body); }

.timeline { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 0; counter-reset: t; }
.timeline li { counter-increment: t; display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: counter(t); width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 600 14px var(--font-mono); position: relative; z-index: 1; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.timeline b { display: block; font-size: 16px; }
.timeline li > span > span { font-size: 15px; color: var(--muted); }
.timeline .when { display: inline-block; font: 600 12px var(--font-body); color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; margin-top: 4px; }

.wide-shot { overflow-x: auto; }
.wide-shot .shot { min-width: 560px; }
