:root {
  --ink: #07162f;
  --ink-soft: #23324b;
  --blue: #3367e8;
  --blue-bright: #4f86ff;
  --sky: #eaf1ff;
  --yellow: #ffca4b;
  --paper: #f7f9fd;
  --white: #ffffff;
  --line: #dce3ef;
  --muted: #69758a;
  --green: #16845b;
  --red: #b54437;
  --shadow: 0 20px 60px rgba(21, 40, 75, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  max-width: 100%;
  overflow-x: hidden;
}
button, input { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 99; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

.topbar {
  min-height: 70px;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 253, .9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: white; background: var(--ink); font-family: Georgia, serif; font-style: italic; }
.top-actions { display: flex; align-items: center; gap: 1.4rem; }
.checked-date { color: var(--muted); font-size: .82rem; }
.small-link { color: var(--blue); text-decoration: none; font-size: .88rem; font-weight: 600; }

main { overflow: clip; }
.intro {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 4vw, 3.5rem) clamp(3.5rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, .65fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: end;
  position: relative;
  min-width: 0;
}
.intro-copy, .intro-copy > *, .before-card { min-width: 0; max-width: 100%; }
.intro::before { content: "API"; position: absolute; top: 1.5rem; right: -1rem; font: 800 clamp(8rem, 22vw, 20rem)/1 "IBM Plex Sans KR"; color: rgba(51, 103, 232, .035); letter-spacing: -.1em; pointer-events: none; }
.eyebrow { display: flex; gap: .65rem; align-items: center; margin: 0 0 1.4rem; color: var(--blue); font-size: .78rem; font-weight: 700; letter-spacing: .13em; }
.eyebrow span { width: 30px; height: 2px; background: var(--blue); }
h1 { margin: 0; max-width: 800px; font-size: clamp(3.1rem, 7.7vw, 6.8rem); line-height: .98; letter-spacing: -.075em; font-weight: 700; }
h1 .title-main, h1 em { display: block; }
h1 em { color: var(--blue); font-family: "Gowun Dodum", sans-serif; font-style: normal; font-weight: 400; letter-spacing: -.06em; }
.lede { max-width: 690px; margin: 2.2rem 0 0; color: var(--ink-soft); font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.8; }

.before-card { position: relative; padding: 1.7rem; background: var(--ink); color: white; box-shadow: 14px 14px 0 var(--yellow); }
.card-kicker { margin: 0 0 1rem; color: #9eb9f7; font-size: .74rem; font-weight: 700; letter-spacing: .13em; }
.ready-list { list-style: none; margin: 0; padding: 0; }
.ready-list li { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.13); }
.ready-list li > span { color: var(--yellow); font: 600 .85rem/1 "IBM Plex Sans KR"; }
.ready-list strong, .ready-list small { display: block; }
.ready-list strong { font-size: .98rem; }
.ready-list small { margin-top: .1rem; color: #aebbd2; font-size: .78rem; }
.privacy-note { margin: 1rem 0 0; padding: .75rem .8rem; background: rgba(255,255,255,.08); color: #cbd5e8; font-size: .76rem; line-height: 1.5; }

.route-picker { background: white; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(2.8rem, 5vw, 4.5rem) max(1.25rem, calc((100vw - 1180px)/2)); }
.section-label > span { color: var(--blue); font-size: .75rem; font-weight: 700; letter-spacing: .14em; }
.section-label h2 { margin: .15rem 0 1.5rem; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.25; letter-spacing: -.045em; }
.route-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.route-tab { min-height: 118px; padding: 1.2rem 1.4rem; border: 1px solid var(--line); background: white; color: var(--ink); display: grid; grid-template-columns: 44px 1fr 26px; align-items: center; gap: 1rem; text-align: left; cursor: pointer; transition: .22s ease; }
.route-tab:hover { border-color: #9cb8fb; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(51, 103, 232, .09); }
.route-tab.is-active { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 8px 8px 0 var(--blue-bright); }
.route-number { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid currentColor; font-weight: 700; }
.route-tab strong, .route-tab small { display: block; }
.route-tab strong { font-size: 1.04rem; }
.route-tab small { margin-top: .2rem; color: var(--muted); font-size: .78rem; }
.route-tab.is-active small { color: #aebbd2; }
.route-arrow { font-size: 1.4rem; }

.guide-shell { max-width: 1180px; margin: 0 auto; padding: clamp(4rem, 7vw, 7rem) 1.25rem; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.progress-rail { position: sticky; top: 100px; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; }
.progress-head span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.progress-head strong { font-size: 1.2rem; }
.progress-track { height: 4px; margin: .65rem 0 1.5rem; background: var(--line); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .35s ease; }
.progress-rail ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.progress-rail li a { display: block; position: relative; padding: .72rem 0 .72rem 1.1rem; color: var(--muted); text-decoration: none; font-size: .82rem; line-height: 1.35; }
.progress-rail li a::before { content: ""; position: absolute; left: -4px; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--paper); border: 1px solid #aab5c6; }
.progress-rail li.is-done a { color: var(--green); }
.progress-rail li.is-done a::before { background: var(--green); border-color: var(--green); }
.reset-button { margin-top: 1.2rem; padding: 0; border: 0; background: none; color: var(--muted); font-size: .76rem; text-decoration: underline; cursor: pointer; }

.route-panel[hidden] { display: none; }
.route-summary { padding: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 2rem; background: var(--sky); border-left: 5px solid var(--blue); display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.route-summary h2 { margin: .45rem 0 .4rem; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.045em; }
.route-summary p { max-width: 610px; margin: 0; color: var(--ink-soft); }
.recommend-badge, .advanced-badge { display: inline-block; padding: .28rem .55rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.recommend-badge { background: var(--yellow); }
.advanced-badge { background: var(--ink); color: white; }
.primary-button { flex: 0 0 auto; display: inline-flex; gap: .8rem; align-items: center; padding: .8rem 1rem; background: var(--blue); color: white; text-decoration: none; font-size: .82rem; font-weight: 700; box-shadow: 4px 4px 0 var(--ink); }
.primary-button:hover { background: #204fc5; }

.console-map { margin: -1rem 0 3.2rem; padding: 1.25rem; border: 1px solid var(--line); background: white; box-shadow: 7px 7px 0 #e6ecf7; }
.console-map > p { margin: 0 0 .8rem; color: var(--muted); font-size: .78rem; }
.console-map > p span { margin-right: .55rem; color: var(--blue); font-weight: 700; letter-spacing: .08em; }
.console-map > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.console-map a { min-width: 0; padding: .85rem; display: grid; grid-template-columns: 27px minmax(0, 1fr) 18px; gap: .55rem; align-items: center; color: var(--ink); background: var(--paper); border: 1px solid transparent; text-decoration: none; transition: .2s ease; }
.console-map a:hover { border-color: #aac0f5; background: var(--sky); transform: translateY(-2px); }
.console-map a b { width: 25px; height: 25px; display: grid; place-items: center; color: white; background: var(--blue); font-size: .68rem; }
.console-map a strong, .console-map a small { display: block; }
.console-map a strong { font-size: .8rem; line-height: 1.4; }
.console-map a small { margin-top: .15rem; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.console-map a i { color: var(--blue); font-style: normal; }
.console-map.project-map > div { grid-template-columns: repeat(5, 1fr); }
.console-map.project-map a { grid-template-columns: 24px minmax(0, 1fr); }
.console-map.project-map a i { display: none; }

.steps { counter-reset: step; }
.step-card { display: grid; grid-template-columns: 62px 1fr; position: relative; }
.step-card:not(:last-child)::before { content: ""; position: absolute; top: 50px; bottom: -1px; left: 24px; width: 1px; background: #cbd5e4; }
.step-marker { position: relative; z-index: 1; }
.step-marker span { width: 49px; height: 49px; display: grid; place-items: center; border: 1px solid var(--ink); background: var(--paper); font-weight: 700; }
.step-card.is-done .step-marker span { color: white; background: var(--green); border-color: var(--green); }
.step-body { padding: 0 0 4.2rem 1.25rem; }
.step-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.step-heading p { margin: 0 0 .1rem; color: var(--blue); font-size: .7rem; font-weight: 700; letter-spacing: .13em; }
.step-heading h3 { margin: 0; font-size: clamp(1.3rem, 2.5vw, 1.75rem); line-height: 1.35; letter-spacing: -.035em; }
.step-body > p { margin: 0 0 1.2rem; color: var(--ink-soft); }
.done-check { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .65rem; border: 1px solid var(--line); color: var(--muted); background: white; font-size: .75rem; cursor: pointer; user-select: none; }
.done-check input { accent-color: var(--green); }
.step-card.is-done .done-check { color: var(--green); border-color: #a9d6c4; background: #f0fbf6; }

.screen-cue, .notice { display: flex; gap: .85rem; padding: 1rem 1.1rem; margin-top: 1.2rem; }
.screen-cue { background: white; border: 1px solid var(--line); box-shadow: 5px 5px 0 #dce6fc; }
.screen-cue > span { color: var(--blue); font-size: 1.3rem; }
.screen-cue strong, .screen-cue p { display: block; }
.screen-cue strong { font-size: .8rem; }
.screen-cue p { margin: .1rem 0 0; color: var(--muted); font-size: .83rem; line-height: 1.55; }
.button-path { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: 1rem; margin: 1.2rem 0; background: var(--ink); color: white; }
.button-path span { padding: .35rem .55rem; border: 1px solid rgba(255,255,255,.25); font-size: .78rem; }
.button-path i { color: var(--yellow); font-style: normal; }
.fine-print { color: var(--muted) !important; font-size: .82rem; line-height: 1.6; }
.address-cue { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; margin: 1.2rem 0; border-left: 3px solid var(--blue); background: white; }
.address-cue span { flex: 0 0 auto; color: var(--blue); font-size: .7rem; font-weight: 700; letter-spacing: .08em; }
.address-cue code { min-width: 0; overflow-wrap: anywhere; color: var(--ink-soft); font-size: .8rem; }
.micro-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1.2rem 0; padding: 0; list-style: none; }
.micro-steps li { min-width: 0; padding: .75rem; display: flex; align-items: center; gap: .55rem; background: white; border: 1px solid var(--line); color: var(--ink-soft); font-size: .76rem; line-height: 1.45; }
.micro-steps li b { flex: 0 0 auto; width: 21px; height: 21px; display: grid; place-items: center; color: var(--blue); border: 1px solid #a9bff0; font-size: .64rem; }
.micro-steps li span { min-width: 0; }
.branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1.2rem 0; }
.branch-grid > div { padding: 1rem 1.1rem; background: white; border: 1px solid var(--line); }
.branch-grid > div:first-child { border-top: 3px solid var(--blue); }
.branch-grid > div:last-child { border-top: 3px solid var(--yellow); }
.branch-grid span, .branch-grid strong { display: block; }
.branch-grid span { color: var(--blue); font-size: .7rem; font-weight: 700; }
.branch-grid strong { margin-top: .15rem; font-size: .94rem; }
.branch-grid ol { margin: .65rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: .77rem; }
.inline-action { display: inline-flex; margin: .1rem 0 1rem; padding-bottom: .12rem; color: var(--blue); border-bottom: 1px solid currentColor; text-decoration: none; font-size: .8rem; font-weight: 700; }
.inline-action:hover { color: #173f9e; }
.notice { border: 1px solid; }
.notice > span { flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .75rem; }
.notice strong { font-size: .86rem; }
.notice p { margin: .1rem 0 0; font-size: .82rem; line-height: 1.6; }
.notice.caution { color: #71510a; background: #fff8df; border-color: #ead080; }
.notice.success { color: #116b49; background: #effaf5; border-color: #a8d9c6; }
.notice.info { color: #244d96; background: #eef4ff; border-color: #b7caf1; }

.fake-console { margin-top: 1.2rem; border: 1px solid #bfcae0; background: white; box-shadow: var(--shadow); }
.fake-bar { height: 34px; padding: 0 .7rem; display: flex; align-items: center; gap: .32rem; background: #eef2f8; border-bottom: 1px solid var(--line); }
.fake-bar span { width: 7px; height: 7px; border-radius: 50%; background: #aeb8c9; }
.fake-bar em { margin-left: .5rem; color: #728097; font-size: .66rem; font-style: normal; }
.fake-content { padding: 1.3rem; }
.fake-content small { color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .1em; }
.fake-content > div { margin-top: .35rem; display: flex; gap: .5rem; }
.fake-content code { flex: 1; padding: .65rem .8rem; background: #f3f6fb; color: var(--ink); overflow: hidden; }
.fake-content button { border: 0; padding: 0 1rem; color: white; background: var(--blue); }

.do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem; }
.do-dont > div { padding: 1rem 1.1rem; background: white; border-top: 3px solid; }
.do-dont .do { border-color: var(--green); }
.do-dont .dont { border-color: var(--red); }
.do-dont span { font-size: .74rem; font-weight: 700; }
.do-dont .do span { color: var(--green); }
.do-dont .dont span { color: var(--red); }
.do-dont ul { margin: .55rem 0 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: .8rem; }

details { background: white; border: 1px solid var(--line); }
details summary { padding: 1rem 1.15rem; cursor: pointer; font-weight: 600; }
details summary::marker { color: var(--blue); }
.code-wrap { position: relative; border-top: 1px solid var(--line); }
pre { margin: 0; padding: 1.3rem; overflow-x: auto; background: var(--ink); color: #dce7ff; font-size: .78rem; line-height: 1.7; }
.copy-code { position: absolute; right: .6rem; top: .6rem; z-index: 1; padding: .35rem .55rem; border: 1px solid rgba(255,255,255,.3); color: white; background: #25395e; font-size: .7rem; cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.restriction-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem; }
.restriction-grid > div { padding: 1rem; background: white; border: 1px solid var(--line); }
.restriction-grid span, .restriction-grid strong, .restriction-grid small { display: block; }
.restriction-grid span { color: var(--blue); font-size: .7rem; font-weight: 700; }
.restriction-grid strong { margin-top: .3rem; font-size: .9rem; }
.restriction-grid small { margin-top: .2rem; color: var(--muted); font-size: .7rem; }

.troubleshooting, .sources { margin-top: 3rem; padding-top: 3.5rem; border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.faq-grid details p { margin: 0; padding: 0 1.15rem 1rem; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.decision-card { margin-top: 4rem; padding: clamp(1.5rem, 4vw, 2.4rem); background: var(--ink); color: white; display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; align-items: center; }
.decision-card > div { display: flex; align-items: center; gap: 1rem; }
.decision-card .mini-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--yellow); color: var(--yellow); font-size: 1.4rem; }
.decision-card p { margin: 0; color: #c6d0e3; }
.decision-card > div p { color: #9fb1d2; font-size: .72rem; font-weight: 700; letter-spacing: .1em; }
.decision-card h2 { margin: .15rem 0 0; font-size: 1.3rem; }
.source-links { border-top: 1px solid var(--ink); }
.source-links a { display: grid; grid-template-columns: 40px 1fr 30px; gap: 1rem; align-items: center; padding: 1.15rem .4rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.source-links a:hover { background: white; padding-left: 1rem; padding-right: 1rem; }
.source-links span { color: var(--blue); font-size: .73rem; font-weight: 700; }
.source-links strong, .source-links small { display: block; }
.source-links strong { font-size: .92rem; }
.source-links small { color: var(--muted); font-size: .75rem; }
.source-links b { color: var(--blue); }

footer { padding: 2.5rem max(1.25rem, calc((100vw - 1180px)/2)); background: #020b1d; color: #8fa0bd; display: flex; justify-content: space-between; gap: 2rem; font-size: .73rem; }
footer p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 50; transform: translate(-50%, 30px); padding: .6rem 1rem; color: white; background: var(--ink); opacity: 0; pointer-events: none; transition: .25s ease; font-size: .8rem; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; align-items: start; }
  .before-card { max-width: 520px; }
  .guide-shell { grid-template-columns: 1fr; }
  .progress-rail { position: static; padding: 1rem; background: white; border: 1px solid var(--line); }
  .progress-rail ol, .reset-button { display: none; }
  .progress-track { margin-bottom: 0; }
  .route-summary { align-items: start; flex-direction: column; }
  .console-map.project-map > div { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 15px; word-break: normal; overflow-wrap: anywhere; }
  .topbar { min-height: 60px; }
  .checked-date { display: none; }
  .intro { width: 100%; padding-top: 3.5rem; }
  .intro-copy { width: 100%; overflow: hidden; }
  .lede { width: 100%; overflow-wrap: break-word; word-break: keep-all; }
  h1 { font-size: clamp(2.55rem, 11.3vw, 3rem); line-height: 1.06; letter-spacing: -.065em; }
  h1 .title-main { white-space: normal; font-size: .9em; }
  h1 em { margin-top: .2rem; }
  .before-card { box-shadow: 8px 8px 0 var(--yellow); }
  .route-tabs, .do-dont, .restriction-grid, .faq-grid, .decision-card, .branch-grid { grid-template-columns: 1fr; }
  .console-map > div, .console-map.project-map > div { grid-template-columns: 1fr; }
  .micro-steps { grid-template-columns: 1fr; }
  .route-tab { min-height: 96px; }
  .guide-shell { padding-left: 1rem; padding-right: 1rem; }
  .step-card { grid-template-columns: 44px 1fr; }
  .step-marker span { width: 38px; height: 38px; }
  .step-card:not(:last-child)::before { left: 18px; top: 38px; }
  .step-body { padding-left: .75rem; }
  .step-heading { gap: .6rem; }
  .done-check { padding: .3rem .45rem; }
  .fake-content > div { flex-direction: column; }
  .fake-content button { min-height: 40px; }
  footer { flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
