:root {
  --violet: #6129d8;
  --violet-deep: #4a1fb0;
  --violet-soft: #f1ebff;
  --violet-line: #cfc1f5;
  --ground-tint: #f6f3ff;
  --mint-deep: #007a5c;
  --mint-soft: #e2f9f2;
  --blue-deep: #1348c4;
  --blue-soft: #e9f0ff;
  --orange-soft: #fff3df;
  --ink: #25203a;
  --body: #4b4662;
  --muted: #615c75;
  --line: #e5e8f0;
  --ground-alt: #f8f7fc;
  --off: #eeeef3;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--violet-deep); transition: color .18s; }
a:hover { color: #2f1378; }
:focus-visible { outline: 3px solid #246bff; outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; padding: 10px 16px; background: #fff; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ── 상단 ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 9px; }
.top nav { margin-left: auto; display: flex; gap: 4px; }
.top nav a { padding: 9px 16px; border-radius: 10px; color: var(--body); font-weight: 500; font-size: 16px; text-decoration: none; transition: background .2s, color .2s; }
.top nav a:hover { background: var(--ground-alt); color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--violet-soft); color: var(--violet-deep); font-weight: 700; }

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 13px;
  border: 1.5px solid var(--violet); background: var(--violet); color: #fff;
  font-size: 16.5px; font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
a.btn:hover { background: var(--violet-deep); border-color: var(--violet-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(97, 41, 216, .22); }
a.btn:active { transform: translateY(0); box-shadow: none; }
.btn.ghost { background: #fff; border-color: var(--violet-line); color: var(--violet-deep); }
a.btn.ghost:hover { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-deep); box-shadow: none; }
.btn.light { background: #fff; border-color: #fff; color: var(--ink); }
a.btn.light:hover { background: var(--violet-soft); border-color: var(--violet-soft); color: var(--ink); box-shadow: none; }
.btn.off { background: var(--off); border-color: var(--off); color: var(--body); cursor: default; }
.btn.big { min-height: 56px; font-size: 17px; border-radius: 14px; }
.btn.stacked { flex-direction: column; gap: 0; font-size: 16px; }
.btn.stacked small { font-size: 12.5px; font-weight: 500; }

/* ── 첫 화면 ───────────────────────────────────────── */
.hero { background: var(--ground-tint); }
.hero .wrap { padding-top: 64px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.hero p { font-size: 19px; color: var(--body); max-width: 560px; }
.hero.compact .wrap { padding-top: 48px; padding-bottom: 36px; }
.hero.compact h1 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 10px; }
.hero.compact p { font-size: 18px; }

.programs { display: flex; flex-direction: column; gap: 16px; padding-top: 40px; padding-bottom: 16px; }
.program {
  display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
  padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.program:hover { border-color: var(--violet-line); box-shadow: 0 10px 30px rgba(37, 32, 58, .07); transform: translateY(-2px); }
.tile { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 18px; background: var(--violet-soft); color: var(--violet); }
.tile-phone { background: var(--mint-soft); color: var(--mint-deep); }
.tile-kiosk { background: var(--blue-soft); color: var(--blue-deep); }
.tile.small { width: 56px; height: 56px; border-radius: 15px; margin-bottom: 16px; }
.program-text { flex: 1 1 300px; min-width: 0; }
.who { font-size: 14px; font-weight: 700; color: var(--mint-deep); margin-bottom: 2px; }
.program h2 { font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.program .desc { font-size: 16px; color: var(--body); margin-bottom: 8px; }
.more { font-size: 15px; font-weight: 500; }
.program-actions { flex: 0 1 340px; display: flex; flex-wrap: wrap; gap: 10px; }
.program-actions .btn { flex: 1 1 150px; padding: 0 16px; }

.steps-section { padding-top: 48px; padding-bottom: 24px; }
.steps-section h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { padding: 24px; border-radius: 16px; background: var(--ground-alt); }
.steps .num { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.steps p { font-size: 15.5px; color: var(--body); }

.band { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 24px 26px; border-radius: 20px; }
.band > div { flex: 1 1 320px; min-width: 0; }
.band h2 { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.band p { font-size: 15.5px; }
.band.dark { background: var(--ink); color: #fff; margin: 24px 0 72px; padding: 28px; }
.band.dark h2 { font-size: 22px; margin-bottom: 4px; }
.band.dark p { color: #d9d5e8; font-size: 16px; }
.band.soft { background: var(--ground-tint); margin-top: 24px; }
.band.soft h2 { font-size: 18px; }
.band.soft p { color: var(--body); }

/* ── 기기 선택 ─────────────────────────────────────── */
.choose { padding-top: 28px; padding-bottom: 72px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; margin-bottom: 12px; }
.back svg { transition: transform .2s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.choose h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.choose .lead { font-size: 18px; color: var(--body); margin-bottom: 32px; }
.platforms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.platform { display: flex; flex-direction: column; padding: 24px; border-radius: 18px; border: 1.5px solid var(--violet-line); background: #fff; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.platform.ready:hover { border-color: var(--violet); box-shadow: 0 10px 30px rgba(97, 41, 216, .1); transform: translateY(-2px); }
.platform.pending { border: 1px solid var(--line); background: var(--ground-alt); }
.platform.pending .tile { background: var(--off); color: var(--muted); }
.platform h2 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.platform p { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; min-height: 1px; }
.platform .btn { margin-top: auto; padding: 0 14px; }
.foot-note { margin-top: 20px; font-size: 15px; color: var(--muted); }

/* ── 설명서 ────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chips a { display: flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--violet-line); background: #fff; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.chips a:hover { border-color: var(--violet); transform: translateY(-1px); }
.chips a.plain { border-color: transparent; background: none; color: var(--violet-deep); text-decoration: underline; }

.guide-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px 48px; padding-top: 40px; padding-bottom: 72px; }
.toc { flex: 0 0 210px; position: sticky; top: 84px; font-size: 15px; max-height: calc(100vh - 100px); overflow-y: auto; }
.toc p { font-size: 13px; font-weight: 700; color: var(--violet-deep); margin: 0 0 4px; }
.toc ul { list-style: none; margin: 0 0 16px; padding: 0; }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--body); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover, .toc a.active { color: var(--violet-deep); border-left-color: var(--violet); }
.toc a.active { font-weight: 700; }

.guide { flex: 999 1 560px; min-width: 0; }
.guide .part { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 18px 22px; border-radius: 16px; background: var(--ink); color: #fff; margin: 64px 0 0; }
.guide .part:first-child { margin-top: 0; }
.guide .part > div { flex: 1 1 240px; min-width: 0; }
.part-who { font-size: 13px; font-weight: 700; color: #bfefe2; }
.part-name { font-size: 24px; font-weight: 800; line-height: 1.35; }
.guide .part .btn { min-height: 44px; font-size: 15px; padding: 0 18px; }
.guide h2 { font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; margin: 44px 0 10px; padding-top: 28px; border-top: 1px solid var(--line); }
.guide .part + h2 { border-top: 0; margin-top: 0; padding-top: 28px; }
.guide h2 small { font-size: 15px; font-weight: 500; color: var(--muted); }
.guide h3 { font-size: 19px; font-weight: 700; margin: 26px 0 6px; }
.guide p { margin: 0 0 12px; }
.guide ul, .guide ol { margin: 0 0 14px; padding-left: 22px; }
.guide li { margin: 4px 0; }
.guide .dl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.menu { font-weight: 700; color: var(--violet-deep); white-space: nowrap; }
.tip, .warn { padding: 14px 16px; border-radius: 12px; font-size: 15.5px; }
.guide .tip, .guide .warn { margin-bottom: 16px; }
.tip { background: var(--mint-soft); }
.warn { background: var(--orange-soft); }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; }
table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--ground-alt); font-size: 14px; color: var(--muted); white-space: nowrap; }
tbody th { font-weight: 700; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid #cfcbe0; border-bottom-width: 2px; background: #fff; font: inherit; font-size: 14px; }
code { font-size: 14.5px; background: var(--ground-alt); padding: 1px 6px; border-radius: 6px; }
details { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 10px; transition: border-color .2s; }
details[open], details:hover { border-color: var(--violet-line); }
summary { padding: 15px 18px; font-weight: 700; cursor: pointer; }
details > div { padding: 0 18px 14px; color: var(--body); font-size: 15.5px; }
details > div p:last-child { margin-bottom: 0; }

/* ── 하단 ─────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; padding-bottom: 36px; font-size: 14px; color: var(--muted); }

/* ── 부드러운 화면 전환 ──────────────────────────────── */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
.foot { view-transition-name: foot; }
main { view-transition-name: page; }

@keyframes page-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  ::view-transition-old(page) { animation: page-out .18s ease-in both; }
  ::view-transition-new(page) { animation: page-in .38s var(--ease) both; }
  ::view-transition-group(foot) { animation-duration: .3s; }
  /* 화면이 바뀐 뒤 카드가 차례로 떠오릅니다. */
  .program, .platform, .steps li { animation: rise .5s var(--ease) backwards; }
  .program:nth-child(2), .platform:nth-child(2), .steps li:nth-child(2) { animation-delay: .06s; }
  .program:nth-child(3), .platform:nth-child(3), .steps li:nth-child(3) { animation-delay: .12s; }
  .platform:nth-child(4) { animation-delay: .18s; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; transition: none !important; }
}

@media (max-width: 760px) {
  .toc { position: static; flex: 1 1 100%; max-height: none; padding: 16px 18px; border-radius: 14px; background: var(--ground-alt); }
  .toc ul:last-child { margin-bottom: 0; }
  .program { padding: 22px; gap: 16px; }
  .program-actions { flex: 1 1 100%; }
  .hero .wrap { padding-top: 44px; padding-bottom: 40px; }
  .guide .part { margin-top: 48px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top nav a { padding: 9px 12px; }
  .foot .wrap { flex-direction: column; }
}
@media print {
  .top, .toc, .chips, .foot { display: none; }
}
