/* FMM Korea edition (K1). Values follow DESIGN.kr.md and DESIGN.core.md */
:root {
  --bg: #faf9f5;
  --ink: #111;
  --muted: #5f5d57;
  --soft: #efede5;
  --lime: #d7f23d;
  --rule: #e4e1d6;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --tab-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.75;
  word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.prose a, .refs a, .note a, .alt-link a, .status-foot a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 50; border-radius: 8px; }
.skip:focus { top: 8px; }
.notice { margin: 0; padding: 8px 20px; background: var(--lime); color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; }

/* top */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 26px; letter-spacing: -0.05em; }
.logo span { background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 88% / 100% 8px; }
.topnav { display: none; }
.topnav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--muted); }
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.tabbar ul { display: flex; list-style: none; margin: 0 auto; padding: 0; max-width: 560px; }
.tabbar li { flex: 1; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--tab-h); font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { fill: var(--lime); stroke: var(--ink); stroke-width: 2; }

/* layout */
main { min-height: 60vh; }
.feed { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.hero-wrap { max-width: 1080px; margin: 0 auto; padding: 8px 20px 0; }
.head { padding: 28px 0 8px; }
.head h1 { margin: 0 0 10px; font-size: 32px; line-height: 1.25; font-weight: 800; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.head-eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.head-lead { margin: 0; font-size: 17px; color: var(--muted); }
.feed-h { margin: 56px 0 4px; font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.empty, .note { color: var(--muted); font-size: 15px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* chips */
.chips { margin: 20px -20px 0; }
.chips ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--soft); font-size: 15px; font-weight: 600; white-space: nowrap; }
.chips a:hover { background: var(--rule); }
.chips a[aria-current="page"] { background: var(--lime); }

/* cards */
.card { margin: 48px 0 0; position: relative; }
.hero-wrap .card { margin-top: 12px; }
.card-cover { display: block; border-radius: 20px; overflow: hidden; background: var(--soft); aspect-ratio: 16 / 9; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.5; }
.card-meta a { position: relative; }
.card-meta a::after { content: ""; position: absolute; inset: -12px -4px; }
.card-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.card-title { margin: 0 0 8px; font-size: 24px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--lime); text-underline-offset: 4px; }
.card-desc { margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-date { margin: 0; font-size: 13.5px; color: var(--muted); }
.card-big .card-title { font-size: 30px; }
.card-big .card-desc { font-size: 17px; }
.badge { display: inline-block; padding: 0 10px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 12.5px; font-weight: 700; line-height: 1.7; }
.card-kind { color: var(--ink); }

/* status */
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.st-mark { font-size: 12px; }
.st-unknown, .st-unavailable { color: var(--muted); }
.status-card, .pcard { margin: 40px 0 0; padding: 24px; background: var(--soft); border-radius: 20px; }
.pcard { margin-top: 16px; }
.status-eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.status-card h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em; }
.status-state { margin: 0 0 8px; }
.status-state .st { background: var(--lime); border-radius: 999px; padding: 4px 14px; }
.status-state .st-unavailable, .status-state .st-unknown { background: var(--bg); color: var(--ink); }
.status-note { margin: 0 0 8px; font-size: 16px; }
.status-foot, .pcard-src { margin: 0; font-size: 13.5px; color: var(--muted); }
.pcard-state { margin: 0 0 6px; }
.pcard-name { margin: 0 0 4px; font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.pcard-name a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.pcard-note { margin: 0 0 6px; font-size: 16px; color: var(--muted); }
.conn { margin-top: 40px; }
.conn h2 { font-size: 20px; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.03em; }
.conn ul { list-style: none; margin: 0; padding: 0; }
.conn li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.conn-foot { font-size: 13.5px; color: var(--muted); }
.others { margin-top: 28px; }
.others summary { cursor: pointer; display: flex; align-items: center; min-height: 48px; font-weight: 700; font-size: 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; white-space: nowrap; }
thead th { color: var(--muted); font-size: 13px; }

/* search, pager */
.search-box { display: flex; gap: 8px; margin-top: 12px; }
.search-box input { flex: 1; min-width: 0; min-height: 52px; padding: 0 20px; font: inherit; font-size: 17px; color: inherit; background: var(--soft); border: 2px solid transparent; border-radius: 999px; }
.search-box input:focus { border-color: var(--ink); outline: none; }
.search-box button { min-height: 52px; padding: 0 24px; font: inherit; font-weight: 700; color: var(--ink); background: var(--lime); border: 0; border-radius: 999px; cursor: pointer; }
.pager { display: flex; gap: 8px; margin: 40px 0 0; }
.pager a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--soft); font-weight: 700; }

/* article */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--lime); box-shadow: 0 0 0 0.5px var(--ink); }
.art { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.art-head { padding: 28px 0 0; }
.art-head .card-meta { margin-top: 0; }
.art-head h1 { margin: 6px 0 14px; font-size: 28px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.art-lead { margin: 0 0 14px; font-size: 20px; line-height: 1.6; color: var(--muted); }
.byline { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; font-size: 14px; color: var(--muted); }
.ai-note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.ai-note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 0 0 1px var(--ink); margin-right: 8px; }
.art-cover { margin: 24px -20px 0; }
.art-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.art-cover figcaption { margin: 8px 20px 0; font-size: 12.5px; color: var(--muted); }
.points { margin: 32px 0; padding: 24px; background: var(--soft); border-radius: 20px; }
.points h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.points h2 span { background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 88% / 100% 8px; }
.points ul { margin: 0; padding-left: 1.2em; }
.points li { margin: 6px 0; font-size: 17px; line-height: 1.6; }
.prose { font-size: 18px; line-height: 1.75; }
.prose h2 { margin: 2.2em 0 0.5em; font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: -0.03em; }
.prose h3 { margin: 1.8em 0 0.4em; font-size: 20px; font-weight: 800; }
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin: 0.35em 0; }
.prose .table-wrap { margin: 0 0 1.4em; }
.prose table { font-size: 15.5px; }
.refs { margin-top: 48px; font-size: 14.5px; }
.refs h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.refs ol { margin: 0; padding-left: 1.3em; }
.refs li { margin: 6px 0; line-height: 1.6; }
.hist { list-style: none; margin: 0; padding: 0; }
.alt-link { margin: 32px 0 0; font-size: 14px; }
.alt-link a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.related { margin-top: 24px; }
.sharebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); z-index: 35; display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--ink); color: #fff; border-radius: 999px; }
.sharebar[hidden] { display: none; }
.sharebar button { min-height: 44px; padding: 0 18px; font: inherit; font-size: 15px; font-weight: 700; color: #fff; background: transparent; border: 0; border-radius: 999px; cursor: pointer; }
.sharebar button:hover { background: #2a2a2a; }
.sharebar button:focus-visible { outline-color: var(--lime); }
.share-msg { padding-right: 12px; font-size: 13px; color: var(--lime); }
.share-msg:empty { display: none; }

/* footer */
.foot { margin-top: 96px; padding: 40px 0 32px; background: var(--ink); color: #d8d6cc; }
.foot-in { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.foot-logo { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.05em; color: var(--lime); }
.foot-text { margin: 0 0 16px; font-size: 15px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; margin: 0 0 12px; padding: 0; }
.foot ul a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: #fff; }
.foot-note { margin: 0; font-size: 13px; color: #a9a79d; }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity 240ms ease-out, transform 240ms ease-out; }
  .js [data-reveal].in { opacity: 1; transform: none; }
  @view-transition { navigation: auto; }
}

@media (min-width: 900px) {
  :root { --tab-h: 0px; }
  .tabbar { display: none; }
  .topnav { display: block; }
  .top-in { height: 72px; }
  .feed, .art, .foot-in { max-width: 720px; }
  .hero-wrap { padding-top: 16px; }
  .hero-wrap .card-big { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 40px; align-items: end; }
  .hero-wrap .card-big .card-cover { grid-row: 1 / 6; }
  .hero-wrap .card-big .card-meta { margin-top: 0; align-self: end; }
  .card-big .card-title { font-size: 40px; }
  .card-title { font-size: 26px; }
  .art-head h1 { font-size: 34px; }
  .art-cover { margin: 24px 0 0; }
  .art-cover img { border-radius: 20px; }
  .art-cover figcaption { margin-left: 0; }
  .head h1 { font-size: 40px; }
  .sharebar { bottom: 24px; }
  .chips { margin: 20px 0 0; }
  .chips ul { padding: 0; flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 899px) {
  .hero-wrap .card-big .card-title { font-size: 30px; }
}
@media (max-width: 480px) {
  body { font-size: 17.5px; }
  .art-head h1 { font-size: 28px; }
  .card-title { font-size: 22px; }
  .card-big .card-title { font-size: 28px; }
}

/* source tier label */
.src-tier { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1.6; padding: 0 7px; margin-right: 4px; border-radius: 999px; background: var(--soft); color: var(--ink); vertical-align: 1px; }
