/* Seoul Bar - one stylesheet, system fonts only, no JavaScript. */
:root {
  --paper: #FBF6EE;
  --paper-2: #F4ECDF;
  --paper-3: #EDE2D0;
  --ink: #2A211C;
  --muted: #6B5A50;
  --line: #E2D6C3;
  --acc: #B8441F;
  --acc-dark: #953616;
  --green: #2F6B4F;
  --green-soft: #E2ECE5;
  --lamp: #FBD99C;
  --night: #1B1516;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --measure: 680px;
  --wide: 1160px;
  --radius: 10px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.7 var(--font);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--acc); text-underline-offset: 3px; text-decoration-thickness: 1px; }

a:hover { color: var(--acc-dark); }

:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--lamp); color: var(--ink); }

h1,
h2,
h3,
h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

h1 { font-size: clamp(1.75rem, 1.25rem + 2.4vw, 2rem); margin: 0.25em 0 0.5em; text-wrap: balance; }

h2 { font-size: 1.4rem; margin: 1.9em 0 0.65em; text-wrap: balance; }

h3 { font-size: 1.15rem; margin: 1.5em 0 0.5em; }

p,
li { overflow-wrap: anywhere; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }

.narrow { max-width: calc(var(--measure) + 40px); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
}

.skip:focus { left: 12px; }

.sec-h {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.head-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand svg { width: 18px; height: 36px; }

.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.menu a:hover { background: var(--paper-2); color: var(--acc); }

.menu a[aria-current="page"] { color: var(--acc); box-shadow: inset 0 -2px 0 var(--acc); }

/* ---------- home hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(76vh, 640px);
  overflow: hidden;
  background: var(--night);
  color: #fff;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 21, 22, 0.93) 0%, rgba(27, 21, 22, 0.62) 38%, rgba(27, 21, 22, 0.12) 82%);
}

.hero-in {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 110px 20px 56px;
}

.hero .eyebrow {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lamp);
}

.hero h1 { max-width: 20em; margin: 0.3em 0 0.5em; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45); }

.hero .lede { max-width: 40em; margin: 0; font-size: 1.05rem; line-height: 1.6; color: #f6efe4; }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--acc);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover { background: var(--acc-dark); color: #fff; }

.btn.ghost { background: rgba(251, 246, 238, 0.94); color: var(--ink); }

.btn.ghost:hover { background: #fff; color: var(--ink); }

/* ---------- home sections ---------- */
.home-sec { padding: 44px 20px 10px; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.sec-head h2 { margin: 0; }

.more { font-size: 0.95rem; font-weight: 600; white-space: nowrap; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 14px 18px 18px; }

.card h3 { margin: 0; font-size: 1.1rem; line-height: 1.35; }

.card h3 a { color: var(--ink); text-decoration: none; }

.card h3 a:hover { color: var(--acc); text-decoration: underline; }

.card-text { margin: 0; font-size: 0.93rem; line-height: 1.55; color: var(--muted); }

.tag {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag a {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  text-decoration: none;
}

.tag a:hover { background: var(--green); color: #fff; }

.card-body .tag { margin: 0; }

.nb .card:first-child { grid-column: span 2; }

/* the wide card is twice as broad, so its photo is cropped shorter to keep the row even */
.nb .card:first-child .card-img img { aspect-ratio: 3 / 1; object-position: 50% 60%; }

/* compact one-line cards used inside guide text */
.cards.mini { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 1.5em 0 1.9em; }

.cards.mini .card { flex-direction: row; align-items: stretch; }

.cards.mini .card-img { flex: 0 0 136px; }

.cards.mini .card-img img { height: 100%; aspect-ratio: auto; }

.cards.mini .card-body { padding: 12px 16px; gap: 5px; }

.cards.mini .card h3 { font-size: 1rem; }

.cards.mini .card-text { font-size: 0.88rem; }

@media (max-width: 600px) {
  .cards.mini .card-img { flex-basis: 104px; }
}

/* ---------- list rows ---------- */
.rows { display: block; }

.row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.rows > .row:first-child,
.home-sec .row:first-child { padding-top: 4px; border-top: 0; }

.row-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.row-title { margin: 2px 0 6px; font-size: 1.25rem; line-height: 1.3; }

.row-title a { color: var(--ink); text-decoration: none; }

.row-title a:hover { color: var(--acc); text-decoration: underline; }

.row .meta { margin: 0; font-size: 0.85rem; color: var(--muted); }

.taglink { color: var(--green); font-weight: 700; text-decoration: none; }

.taglink:hover { text-decoration: underline; }

.row-text { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }

/* ---------- article ---------- */
.art-head { padding-top: 26px; }

.wide-head { max-width: var(--wide); margin: 0 auto; padding: 38px 20px 10px; }

.crumbs { margin: 0 0 20px; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: 0;
  padding: 0;
  font-size: 0.83rem;
  list-style: none;
}

.crumbs li { display: flex; gap: 10px; align-items: center; min-width: 0; }

.crumbs li + li::before { content: "›"; color: var(--muted); }

.crumbs a { color: var(--muted); text-decoration: none; }

.crumbs a:hover { color: var(--acc); text-decoration: underline; }

.crumbs [aria-current="page"] {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lede { margin: 0 0 14px; font-size: 1.1rem; line-height: 1.55; color: var(--muted); }

.byline { margin: 0 0 24px; font-size: 0.9rem; color: var(--muted); }

.toc {
  margin-bottom: 26px;
  padding: 16px 20px 18px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toc .sec-h { margin: 0 0 8px; }

.toc ol { margin: 0; padding-left: 1.3em; font-size: 0.93rem; line-height: 1.5; columns: 2; column-gap: 32px; }

.toc li { break-inside: avoid; margin: 0 0 6px; }

.toc a { text-decoration: none; }

.toc a:hover { text-decoration: underline; }

.text p { margin: 0 0 1.15em; }

.text h2::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.5em;
  vertical-align: 0.02em;
  background: var(--acc);
  border-radius: 2px;
}

.text h3 { font-size: 1.15rem; }

.text ul,
.text ol { margin: 0 0 1.15em; padding-left: 1.3em; }

.text li { margin: 0 0 0.4em; }

.text blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--acc);
  font-style: italic;
  color: var(--muted);
}

figure.ph { margin: 1.8em 0 2.1em; }

figure.ph img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

figure.art { margin: 1.8em 0 2.1em; }

figure.art img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.box {
  margin: 1.8em 0;
  padding: 18px 22px;
  background: var(--paper-2);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.box > :last-child { margin-bottom: 0; }

.box-h { margin: 0 0 8px; font-weight: 700; color: var(--green); }

.box.faq { border-left-color: var(--acc); }

.box.faq h2 { margin: 0 0 6px; }

.box.faq h2::before { background: var(--acc); }

details { padding: 10px 0; border-top: 1px solid var(--line); }

details summary { position: relative; padding-left: 1.5em; font-weight: 600; list-style: none; cursor: pointer; }

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

details summary::before { content: "+"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--acc); }

details[open] summary::before { content: "–"; }

details p { margin: 0.6em 0 0; color: var(--muted); }

.table-wrap { margin: 1.4em 0; overflow-x: auto; }

table { width: 100%; font-size: 0.93rem; line-height: 1.45; border-collapse: collapse; }

th,
td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }

th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--paper-2);
}

/* ---------- related ---------- */
.related { margin-top: 52px; padding: 34px 0 40px; background: var(--paper-2); border-top: 1px solid var(--line); }

.related .cards { display: flex; flex-wrap: wrap; gap: 24px; }

.related .card { flex: 0 1 calc((100% - 48px) / 3); min-width: min(100%, 240px); }

.related .card .card-img img { aspect-ratio: 16 / 10; }

.guide-links { margin: 18px 0 0; font-size: 0.95rem; color: var(--muted); }

.home-box ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.55;
}

.home-box a { font-weight: 700; }

/* ---------- 404 ---------- */
.lost .art img { max-width: 560px; margin: 0 auto; }

.link-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin: 8px 0 0;
  padding: 0 0 44px;
  list-style: none;
}

.link-list a { font-weight: 700; text-decoration: none; }

.link-list a:hover { text-decoration: underline; }

.link-list span { display: block; font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { margin-top: 56px; background: var(--paper-2); border-top: 1px solid var(--line); }

.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 22px;
}

.foot-grid p { margin: 0 0 8px; }

.foot-brand { font-size: 1.1rem; font-weight: 800; }

.foot-text { max-width: 38ch; font-size: 0.93rem; line-height: 1.6; color: var(--muted); }

.foot-grid ul { margin: 0; padding: 0; font-size: 0.93rem; line-height: 1.7; list-style: none; }

.foot-grid ul a { color: var(--ink); text-decoration: none; }

.foot-grid ul a:hover { color: var(--acc); text-decoration: underline; }

.foot-end {
  padding-top: 14px;
  padding-bottom: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.foot-end p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }

  .related .card { flex: 1 1 calc((100% - 24px) / 2); }

  .foot-grid { grid-template-columns: 1fr 1fr; }

  .foot-grid > div { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }

  .nb .card:first-child { grid-column: auto; }

  .nb .card:first-child .card-img img { aspect-ratio: 3 / 2; }

  .row { grid-template-columns: 112px 1fr; gap: 14px; }

  .row-title { font-size: 1.08rem; }

  .row-text { display: none; }

  .toc ol { columns: 1; }

  .related .card { flex: 1 1 100%; }

  .home-box ul { grid-template-columns: 1fr; }

  .link-list { grid-template-columns: 1fr; }

  .foot-grid { grid-template-columns: 1fr; }

  .hero-in { padding-bottom: 76px; }

  .home-sec { padding-top: 36px; }
}

@media print {
  .site-head,
  .related,
  .toc,
  .skip { display: none; }

  body { background: #fff; color: #000; font-size: 12pt; }

  a { color: #000; text-decoration: none; }
}
