:root {
  --ink: #111a2e;
  --muted: #5a6476;
  --line: #e4e8f0;
  --surface: #ffffff;
  --navy: #1b3d8f;
  --navy-hover: #132e6e;
  --navy-soft: #eaf0fb;
  --em: #2556d0;
  --focus: #f0b429;
  --c: var(--navy); --c-btn: var(--navy); --c-soft: var(--navy-soft);
  color-scheme: light;
  font-family: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
.c-green  { --c: #16a34a; --c-btn: #15803d; --c-soft: #e9f7ef; }
.c-blue   { --c: #2563eb; --c-btn: #1d4ed8; --c-soft: #eaf0fe; }
.c-purple { --c: #7c3aed; --c-btn: #6d28d9; --c-soft: #f2ecfe; }
.c-orange { --c: #ea8a0c; --c-btn: #c2410c; --c-soft: #fdf2e4; }
.c-rose   { --c: #e11d48; --c-btn: #be123c; --c-soft: #fdebef; }
.c-navy   { --c: var(--navy); --c-btn: var(--navy); --c-soft: var(--navy-soft); }
.c-muted  { --c: #a3abba; --c-btn: #5a6476; --c-soft: #f2f4f8; }

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #e6ecfa 0%, #f1f4fb 38%, #f6f7fb 100%) fixed;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--em); text-underline-offset: 3px; }
a:hover { color: var(--navy-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.025em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.75rem, 5.6vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 750; }
p { margin: 0 0 .8em; }
small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.hint { color: var(--muted); font-size: .92rem; }
.lead { color: var(--muted); font-size: 1.02rem; max-width: 40em; }

/* Shell: 모바일은 상단 바 + 메뉴, 데스크톱은 왼쪽 사이드바 */
.shell { min-height: 100vh; }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.sidebar { display: none; }
.content { padding: 0 12px 24px; min-width: 0; }
.panel { background: var(--surface); border-radius: 22px; padding: 24px 18px; box-shadow: 0 10px 40px rgba(27, 61, 143, .08); max-width: 1440px; margin-inline: auto; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; font-size: .8rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: .98rem; }
.brand-text small { font-size: .72rem; font-weight: 600; color: var(--navy); letter-spacing: .04em; }

.mobile-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; cursor: pointer; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::before { content: "☰"; font-size: 1rem; }
.mobile-menu[open] summary::before { content: "✕"; }
.mobile-menu nav { position: absolute; z-index: 10; top: calc(100% - 4px); left: 12px; right: 12px; background: var(--surface); border-radius: 18px; padding: 12px; box-shadow: 0 16px 40px rgba(17, 26, 46, .16); }

.nav-group + .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-title { font-size: .74rem; font-weight: 700; color: var(--muted); margin: 4px 10px 6px; letter-spacing: .03em; }
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .94rem; }
.nav-group a:hover { background: #f4f6fb; color: var(--ink); }
.nav-group a[aria-current="page"] { background: var(--navy-soft); color: var(--navy); box-shadow: inset 3px 0 0 var(--navy); }
.nav-label { display: flex; flex-direction: column; line-height: 1.3; }
.nav-label small { font-size: .76rem; font-weight: 500; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.dot-green { background: #16a34a; } .dot-blue { background: #2563eb; } .dot-purple { background: #7c3aed; }
.dot-orange { background: #ea8a0c; } .dot-rose { background: #e11d48; } .dot-navy { background: var(--navy); }
.dot-muted { background: transparent; border: 2px solid #a3abba; }
.dot-home { background: var(--navy); border-radius: 3px; }
.dot-line { background: transparent; border: 2px solid var(--line); }

/* Buttons & chips */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 1px solid transparent; text-align: center; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(27, 61, 143, .25); }
.btn-primary:hover { background: var(--navy-hover); color: #fff; }
.btn-fill { background: var(--c-btn); color: #fff; }
.btn-fill:hover { filter: brightness(.92); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #b9c1d1; color: var(--ink); }
.ext { margin-left: 2px; font-size: .85em; }
.btn .ext { margin-left: 0; }

.badge, .tag-operator { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; letter-spacing: 0; }
.badge-done { background: #eef0f4; color: #4a5263; }
.badge-scheduled { background: #e3edfd; color: #1a428a; }
.badge-open { background: var(--navy); color: #fff; }
.badge-tbd { background: #fdf3dc; color: #6b4b00; }
.badge-planning { background: transparent; color: var(--muted); border: 1px dashed #a3abba; }
.badge-materials { background: #e3f4e9; color: #17552f; }
.badge-next { background: var(--navy); color: #fff; }
.badge-presenter { background: #f3ebfb; color: #5b2a7a; }
.tag-operator { background: #f3ebfb; color: #5b2a7a; }

/* Hero */
.hero { padding: 4px 0 8px; }
.hero-shot { display: none; margin: 0; }
.hero-shot figcaption { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.hero-shot .shot-frame { box-shadow: 0 16px 40px rgba(27, 61, 143, .12); }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: .8rem; font-weight: 700; margin-bottom: 18px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
.dots i:nth-child(2) { background: #2563eb; } .dots i:nth-child(3) { background: #7c3aed; } .dots i:nth-child(4) { background: #ea8a0c; }
.hero h1 { font-size: clamp(1.8rem, 6.4vw, 2.75rem); letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--em); }
.hero-lead { color: var(--muted); font-size: 1.05rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.tags li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: #3b4558; background: #fafbfd; }

/* Track cards */
/* 열 개수는 화면 너비가 아니라 카드가 들어갈 공간 너비로 정합니다(카드 하나가 300px 이상일 때만 늘림). */
.tracks-area { container-type: inline-size; }
.tracks { display: grid; gap: 14px; margin-top: 28px; }
@container (min-width: 560px) {
  .tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track-wide { grid-column: 1 / -1; }
}
@container (min-width: 1280px) {
  .tracks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.track { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 18px; padding: 20px; min-width: 0; }
.track-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.track-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c-soft); }
.track-icon span { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .12); }
.track-name { min-width: 0; flex: 1; }
.track-kicker { font-size: .78rem; font-weight: 700; color: var(--muted); margin: 0 0 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.track h3 { margin: 0; font-size: 1.15rem; }
.track h3 a { color: var(--ink); text-decoration: none; }
.track h3 a:hover { color: var(--c-btn); }
.track-top > .badge { margin-left: auto; margin-top: 2px; }
.track-desc { color: var(--muted); font-size: .94rem; }
.track .checks { margin-bottom: 4px; }
.track-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.btn, .badge, .track-kicker { white-space: nowrap; }
.track-actions .btn-fill { flex: 1; }
.track.is-planning { background: #fbfcfe; }
.track.is-planning .track-desc { margin-bottom: 0; }

.checks { list-style: none; margin: 0 0 .8em; padding: 0; display: grid; gap: 6px; }
.checks li { position: relative; padding-left: 24px; font-size: .94rem; }
.checks li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--c); font-weight: 800; }

.strip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 18px; border-radius: 16px; background: var(--navy-soft); color: var(--ink); text-decoration: none; font-size: .94rem; min-height: 56px; }
.strip strong { color: var(--navy); margin-right: 4px; }
.strip:hover { color: var(--ink); background: #dfe7f8; }
.strip-arrow { margin-left: auto; font-weight: 800; color: var(--navy); }

/* Page heads */
.page-head { margin-bottom: 8px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.detail-head { background: var(--c-soft); border-radius: 18px; padding: 22px 20px; border-top: 4px solid var(--c); }
.detail-head .lead { color: #3f4859; }
.detail-head .actions { margin-top: 14px; }
.info { display: grid; gap: 6px; margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .75); }
.info div { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 8px; align-items: baseline; }
.info dt { font-size: .74rem; font-weight: 700; color: var(--muted); }
.info dd { margin: 0; font-size: .9rem; font-weight: 600; }
.note { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--navy-soft); font-size: .94rem; }

.block { margin-top: 32px; }
.block > h2 { margin-bottom: 4px; }
.block.two { display: grid; gap: 14px; }
.box { border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.box h2 { font-size: 1.05rem; }
.box .checks { margin-bottom: 0; }

.shot { margin: 0; max-width: 560px; }
.video { max-width: 640px; }
.shot-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.shot figcaption, .video figcaption { margin-top: 8px; font-size: .86rem; color: var(--muted); }
.video { margin: 0; }
.video video { width: 100%; border-radius: 14px; background: #000; }

/* Missions (accordion) */
.mission { border: 1px solid var(--line); border-radius: 16px; margin-top: 10px; background: var(--surface); }
.mission[open] { border-color: #cfd6e4; box-shadow: 0 6px 20px rgba(17, 26, 46, .05); }
.mission > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.mission > summary::-webkit-details-marker { display: none; }
.mission > summary::after { content: "⌄"; margin-left: auto; font-size: 1.2rem; color: var(--muted); transition: transform .15s; line-height: 1; }
.mission[open] > summary::after { transform: rotate(180deg); }
.mission-no { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-size: .88rem; font-weight: 800; }
.more .mission-no { background: var(--c-soft); color: var(--c-btn); }
.mission-title { min-width: 0; }
.mission-body { padding: 0 16px 16px; }
.mission-body > p, .result, .stuck, .option { max-width: 78ch; }
.result { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 12px; background: #f6f8fc; font-size: .94rem; }
.result p { margin: 0; }
.result strong { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.result .checks { margin: 0; }
.stuck { margin-top: 10px; border-radius: 12px; background: #fdf7e8; }
.stuck summary { min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-weight: 700; font-size: .9rem; color: #6b4b00; cursor: pointer; }
.stuck ul { margin: 0; padding: 0 14px 12px 32px; font-size: .92rem; }
.stuck li + li { margin-top: 4px; }
.option { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-top: 8px; }
.option summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.option[open] { padding-bottom: 12px; }

/* Copy blocks: 넘치는 코드는 블록 안에서만 가로로 스크롤합니다. */
.copy-block { margin-top: 12px; border: 1px solid #d4dbea; border-radius: 12px; overflow: hidden; background: #f8faff; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; background: #eef2fb; font-size: .8rem; font-weight: 700; color: #2a3a66; }
.copy-button { min-height: 38px; min-width: 64px; padding: 6px 14px; border-radius: 9px; border: 1px solid var(--navy); background: var(--surface); color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.copy-button:hover { background: var(--navy); color: #fff; }
.copy-block pre { margin: 0; padding: 14px; overflow-x: auto; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; font-family: inherit; font-size: .93rem; line-height: 1.7; }
.copy-block code { font-family: inherit; }
.copy-block pre.is-code { white-space: pre; overflow-wrap: normal; font-family: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", monospace; font-size: .88rem; }
.copy-status { margin: 0; padding: 0 14px; font-size: .86rem; font-weight: 600; }
.copy-status:not(:empty) { padding-block: 8px; border-top: 1px solid #dde2f2; }
.copy-status.is-error { color: #8a3b00; }
.copy-status.is-ok { color: #17552f; }

/* Resources */
.res-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.res-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.res-link { font-weight: 700; padding-block: 4px; }
.res-list small { flex-basis: 100%; font-size: .84rem; }
.next-box { border-radius: 16px; background: #f6f8fc; padding: 18px; }

/* Timeline (roadmap) */
.timeline { list-style: none; margin: 24px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 4px 0 4px 44px; }
.tl-dot { position: absolute; left: 6px; top: 10px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c); }
.tl.is-next .tl-dot { background: var(--c); box-shadow: 0 0 0 5px var(--c-soft); }
.tl-body { padding: 4px 0; }
.tl.is-next .tl-body { background: var(--c-soft); border-radius: 14px; padding: 12px 14px; margin-left: -8px; }
.tl h2 { font-size: 1.15rem; margin: 2px 0; }
.tl h2 a { color: var(--ink); text-decoration: none; }
.tl h2 a:hover { color: var(--c-btn); text-decoration: underline; }
.tl-outcome { color: var(--muted); font-size: .92rem; margin: 0; }
.tl-date { font-size: .84rem; color: var(--muted); margin: 2px 0 0; }
.tl-studio { position: relative; padding: 6px 0 6px 44px; }
.tl-studio a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--navy-soft); color: var(--navy); font-size: .78rem; font-weight: 700; text-decoration: none; }

/* Projects, about */
.projects { display: grid; gap: 14px; margin-top: 10px; }
.project { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.project .shot-frame { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.project-body { padding: 16px; }
.project-body p { margin-bottom: .4em; }
.card-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 700; }
.card-links a { min-height: 40px; display: inline-flex; align-items: center; }
.collab { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.collab li { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.collab span { color: var(--muted); font-size: .92rem; }
.empty, .pending { border: 1px dashed #b7bfcd; border-radius: 16px; padding: 18px; color: var(--ink); }
.empty .hint { margin: 6px 0 0; }
.pending { margin-top: 20px; }

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }
.pager a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.site-footer { max-width: 1440px; margin-inline: auto; padding: 18px 8px 8px; font-size: .82rem; color: var(--muted); }
.site-footer p { margin: 0 0 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 6px !important; }
.footer-links a { display: inline-flex; min-height: 40px; align-items: center; }

@media (min-width: 760px) {
  .panel { padding: 36px; }
  .block.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; background: none; gap: 8px; }
  .info div { display: block; background: rgba(255, 255, 255, .75); border-radius: 12px; padding: 10px 12px; }
  .projects, .collab { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-head { padding: 28px; }
}
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); }
  .topbar { display: none; }
  .sidebar { display: block; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: rgba(255, 255, 255, .85); border-right: 1px solid var(--line); padding: 18px 14px; }
  .sidebar .brand { padding: 0 6px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); width: 100%; }
  .content { padding: 28px 32px 32px; }
  .panel { padding: 44px 48px; }
}
@media (min-width: 1200px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 48px; align-items: center; }
  .hero-shot { display: block; grid-column: 2; grid-row: 1; }
  .hero-copy { grid-column: 1; grid-row: 1; }
}
/* 넓은 화면: 워크숍 카드를 한 줄에, 글자는 조금 크게 */
@media (min-width: 1400px) {
  .content { padding: 32px 40px 40px; }
  .panel { padding: 52px 56px; }
}
@media (min-width: 1700px) {
  :root { font-size: 17px; }
  .shell { grid-template-columns: 288px minmax(0, 1fr); }
  .panel { max-width: 1560px; }
  .site-footer { max-width: 1560px; }
}
@media (max-width: 380px) {
  .track-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .sidebar, .topbar, .copy-button, .pager { display: none; }
  .mission:not([open]) .mission-body { display: block; }
}
