/* ==========================================================================
   Paseo 가이드 — Stardust Design System V2 기반
   크림 캔버스 · 4단계 그린 · 골드 강조 · 주황은 한 화면에 하나 · 그래디언트 없음
   데스크톱: 16:9 스테이지(컨테이너 단위로 비례 확대) / 모바일: 세로 흐름
   ========================================================================== */

/* Pretendard 는 shell.html 에서 직접 불러온다(@import 로 한 단계 더 거치지 않도록) */

/* ---------- 1. 토큰 ---------- */
:root {
  --green-starbucks: #006241;
  --green-accent: #00754a;
  --green-house: #1e3932;
  --green-uplift: #2b5148;
  --green-light: #d4e9e2;
  --green-deep: #172b26;

  --gold: #cba258;
  --gold-light: #dfc49d;
  --gold-lightest: #faf6ee;
  --gold-ink: #86651c; /* 밝은 표면 위 골드 텍스트용(대비 확보) */

  --point: #ff6a13;
  --point-lightest: #fff3ea;

  --white: #ffffff;
  --neutral-cool: #f9f9f9;
  --neutral-warm: #f2f0eb;
  --ceramic: #edebe9;

  --text: rgba(0, 0, 0, 0.87);
  --text-soft: rgba(0, 0, 0, 0.58);
  --text-on-dark: #ffffff;
  --text-on-dark-soft: rgba(255, 255, 255, 0.7);
  --hairline: #e7e7e7;
  --input-border: #d6dbde;
  --red: #c82014;

  --shadow-card: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.24);
  --shadow-nav: 0 1px 3px rgba(0, 0, 0, 0.1), 0 2px 2px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.07);
  --shadow-frap: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.14);
  --shadow-lift: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 2px 4px rgba(0, 0, 0, 0.08), 0 12px 24px rgba(0, 0, 0, 0.08);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Pretendard Variable", monospace;

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 0.2s;
  --dur-base: 0.3s;
  --dur-slow: 0.4s;

  --nav-h: 56px;
}

/* ---------- 2. 베이스 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-snap-type: y proximity;
  background: var(--neutral-warm);
}

/* 부드러운 스크롤은 처음 자리를 잡은 뒤에만 켠다(app.js 가 is-settled 를 붙인다).
   여는 순간부터 켜 두면 #링크나 읽던 자리로 갈 때 맨 위에서부터 길게 굴러 내려간다 */
html.is-settled {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: var(--text);
  background: var(--neutral-warm);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
}

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

svg {
  display: block;
}

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

/* 어두운 바탕에서는 초록 테두리가 묻히므로 금색으로 */
.tone-dark :focus-visible,
.term :focus-visible,
.card.dark :focus-visible,
.node.dark :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--gold);
}

/* 목차 시트나 크게 보기가 열려 있는 동안 뒤 화면을 멈춘다 */
html.is-locked {
  scroll-snap-type: none;
}

html.is-locked body {
  overflow: hidden;
}

/* 보는 기기에 맞는 것만 보여 준다: data-on="ios android computer" (shell.html 머리 스크립트가 html[data-device] 를 정한다) */
html[data-device="ios"] [data-on]:not([data-on~="ios"]),
html[data-device="android"] [data-on]:not([data-on~="android"]),
html:not([data-device="ios"]):not([data-device="android"]) [data-on]:not([data-on~="computer"]) {
  display: none !important;
}

/* 스크립트가 등장 준비를 마치기 전에 내용이 먼저 보였다가 사라지는 깜빡임을 막는다 */
html.js:not(.is-ready) .frame > * {
  opacity: 0;
}

/* app.js 를 끝내 못 불러온 경우: 등장 효과 없이 장식(산책길·밑줄·단계 선)까지 그대로 보여 준다 */
html.is-static .rv,
html.is-static .trail a,
html.is-static .trail::before,
html.is-static .rule,
html.is-static .steps::before {
  opacity: 1 !important;
  transform: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 3. 상단 내비 ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 max(clamp(16px, 2.4vw, 40px), env(safe-area-inset-right)) 0
    max(clamp(16px, 2.4vw, 40px), env(safe-area-inset-left));
  background: var(--white);
  box-shadow: var(--shadow-nav);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--green-starbucks);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.nav__brand svg {
  width: 22px;
  height: 22px;
}

.nav__brand {
  margin-right: 0;
}

/* 만든 곳: MaumFlex */
.nav__maker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  padding-left: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  border-left: 1px solid rgba(0, 0, 0, 0.14);
  white-space: nowrap;
}

.nav__maker .mf {
  --mf-h: 26px;
}

/* 공식 로고: 한 줄판(심벌 + 글자)이 기본, .mf--full 은 표어까지. 어두운 바탕에서는 흰색판 */
.mf {
  display: inline-block;
  flex: none;
  height: var(--mf-h, 1.7em);
  aspect-ratio: 760 / 178;
  vertical-align: middle;
  background: url("./brand/maumflex-line.webp") left center / contain no-repeat;
}

.mf--full {
  aspect-ratio: 640 / 150;
  background-image: url("./brand/maumflex.webp");
}

.tone-dark .mf {
  background-image: url("./brand/maumflex-line-white.webp");
}

.tone-dark .mf--full {
  background-image: url("./brand/maumflex-white.webp");
}

.sheet__maker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 22px 4px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.sheet__maker .mf {
  --mf-h: 46px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}

.nav__links a {
  position: relative;
  padding: 8px 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 50px;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.nav__links a:hover {
  color: var(--text);
}

.nav__links a[aria-current="true"] {
  color: var(--green-accent);
  background: rgba(0, 117, 74, 0.08);
}

.nav__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__count {
  margin-right: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nav__count b {
  font-weight: 800;
  color: var(--green-starbucks);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 50px;
  background: var(--neutral-warm);
}

.seg button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.seg button[aria-pressed="true"] {
  background: var(--white);
  color: var(--green-accent);
  box-shadow: var(--shadow-card);
}

.seg button:active {
  transform: scale(0.95);
}

.nav__menu {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--text);
  background: transparent;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.nav__menu:active {
  transform: scale(0.95);
}

.nav__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
}

.nav__progress i {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  transition: transform 0.5s var(--ease-out);
}

.nav__progress b {
  position: absolute;
  top: 50%;
  left: calc(var(--progress, 0) * 100%);
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--white), var(--shadow-card);
  transition: left 0.5s var(--ease-out);
}

/* 모바일 목차 시트 */
.sheet {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 49;
  display: none;
  padding: 16px max(20px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  background: var(--neutral-warm);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet.is-open {
  display: block;
  animation: sheet-in var(--dur-base) var(--ease-out);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.sheet a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 4px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sheet a span {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-ink);
  letter-spacing: 0.08em;
  min-width: 22px;
}

/* 지금 읽는 구간 */
.sheet > a[aria-current="true"] {
  color: var(--green-starbucks);
  box-shadow: inset 3px 0 0 var(--gold);
  padding-left: 14px;
}

.sheet__os {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
}

.sheet__os .seg {
  display: inline-flex;
  background: var(--white);
}

.sheet__os .seg button[aria-pressed="true"] {
  background: var(--green-light);
  color: var(--green-starbucks);
  box-shadow: none;
}

/* ---------- 4. 덱 엔진 (16:9 스테이지) ---------- */
.slide {
  --bg: var(--neutral-warm);
  --fg: var(--text);
  --fg-soft: var(--text-soft);
  --heading: var(--green-starbucks);
  --card-bg: var(--white);
  --line: rgba(0, 0, 0, 0.1);
  --em: var(--gold-ink);

  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--fg);
  scroll-snap-align: start;
  overflow: hidden;
}

.tone-white {
  --bg: var(--white);
  --card-bg: var(--neutral-cool);
}

.tone-ceramic {
  --bg: var(--ceramic);
}

.tone-gold {
  --bg: var(--gold-lightest);
}

.tone-dark {
  --bg: var(--green-house);
  --fg: var(--text-on-dark);
  --fg-soft: var(--text-on-dark-soft);
  --heading: var(--white);
  --card-bg: var(--green-uplift);
  --line: rgba(255, 255, 255, 0.16);
  --em: var(--gold);
}

.stage {
  /* 1280×720 기준 1px = --u. 스테이지 폭은 화면에서 바로 계산되므로 컨테이너 단위 없이도 같은 값이 나온다 */
  --u: calc(min(100vw, (100vh - var(--nav-h)) * 16 / 9) / 1280);
  --fs-display: calc(68 * var(--u));
  --fs-title: calc(46 * var(--u));
  --fs-sub: calc(30 * var(--u));
  --fs-lead: calc(27 * var(--u));
  --fs-body: calc(24 * var(--u));
  --fs-small: calc(20 * var(--u));
  --fs-micro: calc(16 * var(--u));
  --fs-figure: calc(112 * var(--u));
  --pad-x: calc(76 * var(--u));
  --pad-top: calc(58 * var(--u));
  --pad-bottom: calc(66 * var(--u));

  position: relative;
  container-type: inline-size;
  width: min(100vw, calc((100vh - var(--nav-h)) * 16 / 9));
  width: min(100vw, calc((100svh - var(--nav-h)) * 16 / 9));
  aspect-ratio: 16 / 9;
}

@supports (height: 1svh) {
  .stage {
    --u: calc(min(100vw, (100svh - var(--nav-h)) * 16 / 9) / 1280);
  }
}

/* 컨테이너 단위를 아는 브라우저에서는 스테이지 폭에 정확히 맞춘다 */
@supports (width: 1cqw) {
  .stage {
    --u: 0.078125cqw;
  }
}

/* 배경의 큰 쪽 번호: 제목 오른쪽 위 빈자리에 아주 옅게 (표지·구간 표지 제외, build.mjs 가 data-num 을 붙인다) */
.stage {
  isolation: isolate;
  --ghost-opacity: 0.065;
}

.tone-dark .stage {
  --ghost-opacity: 0.1;
}

.stage[data-num]::before {
  content: attr(data-num);
  /* 꾸밈이므로 화면 낭독기는 읽지 않게 한다(이 문법을 모르는 브라우저는 윗줄을 쓴다) */
  content: attr(data-num) / "";
  position: absolute;
  z-index: -1;
  top: calc(34 * var(--u));
  right: calc(64 * var(--u));
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: calc(220 * var(--u));
  font-variant-numeric: lining-nums;
  line-height: 0.8;
  color: var(--green-house);
  opacity: var(--ghost-opacity);
  pointer-events: none;
  user-select: none;
}

.tone-dark .stage[data-num]::before {
  color: var(--gold);
}

/* 슬라이드에 들어올 때 천천히 떠오른다 */
html.js .stage[data-num]::before {
  opacity: 0;
  transition: opacity 1.4s var(--ease-out) 0.2s;
}

html.js .slide.is-in .stage[data-num]::before,
html.is-static .stage[data-num]::before {
  opacity: var(--ghost-opacity);
}

.frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
  font-size: var(--fs-body);
}

.stage-foot {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: calc(26 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-micro);
  color: var(--fg-soft);
  pointer-events: none;
}

.stage-foot .brand {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.stage-foot .num {
  font-variant-numeric: tabular-nums;
}

.stage-foot .by {
  display: inline-flex;
  align-items: center;
  gap: calc(18 * var(--u));
}

.stage-foot .mf {
  --mf-h: calc(24 * var(--u));
}

/* 표지 윗줄과 일러두기의 만든 곳 표시 */
.over--maker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(8 * var(--u)) calc(16 * var(--u));
}

.over--maker .mf {
  --mf-h: calc(46 * var(--u));
}

.over--maker > span:last-child {
  padding-left: calc(16 * var(--u));
  border-left: 1px solid var(--line);
}

.maker {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  margin-top: calc(22 * var(--u));
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg-soft);
}

.maker .mf {
  --mf-h: calc(58 * var(--u));
}

/* ---------- 5. 타이포그래피 ---------- */
.over {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--fg-soft);
  text-transform: uppercase;
}

.title {
  margin-top: calc(10 * var(--u));
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-wrap: balance;
}

.display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-wrap: balance;
}

.sub {
  font-size: var(--fs-sub);
  font-weight: 400;
  line-height: 1.4;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  text-wrap: pretty;
}

.frame p {
  line-height: 1.6;
  text-wrap: pretty;
}

.small {
  font-size: var(--fs-small);
}

.micro {
  font-size: var(--fs-micro);
}

.soft {
  color: var(--fg-soft);
}

.serif {
  font-family: var(--font-serif);
  font-weight: 700;
}

em,
.em {
  font-style: normal;
  font-weight: 700;
  color: var(--em);
}

strong {
  font-weight: 700;
}

mark {
  padding: 0 0.18em;
  color: inherit;
  background: var(--gold-lightest);
  box-shadow: inset 0 -0.42em 0 rgba(203, 162, 88, 0.38);
  border-radius: 2px;
}

.tone-gold mark {
  background: transparent;
}

.point {
  color: var(--point);
}

.green {
  color: var(--green-accent);
}

.frame a:not(.btn):not([class]) {
  color: var(--green-accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: opacity var(--dur-fast) ease;
}

.frame a:not(.btn):not([class]):hover {
  opacity: 0.7;
}

.tone-dark .frame a:not(.btn):not([class]) {
  color: var(--gold);
}

.rule {
  display: block;
  width: calc(80 * var(--u));
  height: calc(4 * var(--u));
  min-height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transform-origin: 0 50%;
}

.head {
  margin-bottom: calc(26 * var(--u));
}

.head .lead {
  margin-top: calc(14 * var(--u));
  max-width: 46em;
  color: var(--fg);
}

/* ---------- 6. 레이아웃 헬퍼 ---------- */
.grow {
  flex: 1 1 auto;
  min-height: 0;
}

.center {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cols-2,
.cols-3,
.cols-4,
.split,
.split-46,
.split-64 {
  display: grid;
  gap: calc(24 * var(--u));
  align-items: stretch;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(44 * var(--u));
  align-items: center;
}

.split-46 {
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: calc(44 * var(--u));
  align-items: center;
}

.split-64 {
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: calc(44 * var(--u));
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: calc(26 * var(--u));
}

.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(12 * var(--u));
}

.top {
  align-items: start;
}

/* ---------- 7. 컴포넌트 ---------- */

/* 카드 */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(24 * var(--u));
  background: var(--card-bg);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.card h3 {
  font-size: calc(25 * var(--u));
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.card p {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--fg-soft);
}

.card p strong,
.card p em {
  color: var(--fg);
}

.card p em {
  color: var(--em);
}

.card.gold {
  background: var(--gold-lightest);
}

.card.mint {
  background: var(--green-light);
}

.card.dark {
  background: var(--green-house);
  color: var(--white);
}

.card.dark p {
  color: var(--text-on-dark-soft);
}

.card.dark p strong {
  color: var(--white);
}

.card.dark em {
  color: var(--gold);
}

.card.flat {
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.card .tag {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--em);
}

.card.mint .tag {
  color: var(--green-starbucks);
}

@media (hover: hover) {
  .card.hover:hover {
    transform: translateY(calc(-3 * var(--u)));
    box-shadow: var(--shadow-lift);
  }
}

/* 아이콘 원 */
.ico {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(52 * var(--u));
  height: calc(52 * var(--u));
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-starbucks);
}

.ico svg {
  width: 52%;
  height: 52%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico.gold {
  background: var(--gold-lightest);
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 1px var(--gold-light);
}

.ico.dark {
  background: var(--green-house);
  color: var(--white);
}

.ico.sm {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
}

.tone-dark .ico {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: calc(4 * var(--u)) calc(13 * var(--u));
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  border-radius: 50px;
  white-space: nowrap;
  color: var(--green-starbucks);
  background: var(--green-light);
}

.badge.gold {
  color: var(--gold-ink);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--gold);
}

.badge.dark {
  color: var(--white);
  background: var(--green-house);
}

.badge.neutral {
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.06);
}

.badge.point {
  color: var(--point);
  background: var(--point-lightest);
}

.tone-dark .badge.gold {
  color: var(--gold);
}

.tone-dark .badge.neutral {
  color: var(--text-on-dark-soft);
  background: rgba(255, 255, 255, 0.1);
}

/* 버튼 — 예외 없이 풀-필 + scale(0.95) 프레스 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: calc(13 * var(--u)) calc(28 * var(--u));
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
  background: var(--green-accent);
  border: 1px solid var(--green-accent);
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.btn:hover {
  background: var(--green-starbucks);
  border-color: var(--green-starbucks);
}

.btn:active {
  transform: scale(0.95);
}

.btn.outline {
  color: var(--green-accent);
  background: transparent;
}

.btn.outline:hover {
  background: rgba(0, 117, 74, 0.06);
}

.btn.inverted {
  color: var(--green-accent);
  background: var(--white);
  border-color: var(--white);
}

.btn.on-dark {
  color: var(--white);
  background: transparent;
  border-color: var(--white);
}

.btn.on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 내려받기 버튼 줄 */
.get__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(10 * var(--u)) calc(12 * var(--u));
  margin-top: calc(14 * var(--u));
}

.get__row .btn {
  padding: calc(11 * var(--u)) calc(22 * var(--u));
}

.callout.get {
  margin-bottom: calc(24 * var(--u));
}

/* 누를 수 있는 화면 글자(스토어 이름 등) */
a.ui {
  color: var(--green-starbucks);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 불릿 */
.list {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}

.list > li {
  position: relative;
  padding-left: calc(30 * var(--u));
  line-height: 1.55;
}

.list > li::before {
  content: "";
  position: absolute;
  left: calc(4 * var(--u));
  top: 0.62em;
  width: calc(9 * var(--u));
  height: calc(9 * var(--u));
  min-width: 6px;
  min-height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.list.check > li::before {
  top: 0.42em;
  left: 0;
  width: calc(20 * var(--u));
  height: calc(11 * var(--u));
  border-radius: 0;
  background: none;
  border-left: calc(3 * var(--u)) solid var(--green-accent);
  border-bottom: calc(3 * var(--u)) solid var(--green-accent);
  transform: rotate(-45deg) scale(0.72);
  transform-origin: 30% 50%;
}

.list.small > li {
  font-size: var(--fs-small);
}

/* 단계 */
.steps {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: calc(22 * var(--u));
  counter-reset: step;
}

.steps::before {
  content: "";
  position: absolute;
  left: calc(26 * var(--u));
  right: calc(26 * var(--u));
  top: calc(26 * var(--u));
  height: 2px;
  background: var(--gold-light);
  transform-origin: 0 50%;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: calc(52 * var(--u));
  height: calc(52 * var(--u));
  margin-bottom: calc(8 * var(--u));
  font-size: calc(23 * var(--u));
  font-weight: 800;
  color: var(--white);
  background: var(--green-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 calc(7 * var(--u)) var(--bg);
}

.step h3 {
  font-size: calc(25 * var(--u));
  font-weight: 700;
  line-height: 1.3;
}

.step p {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--fg-soft);
}

.step p strong {
  color: var(--fg);
}

.tone-dark .steps::before {
  background: rgba(255, 255, 255, 0.24);
}

.tone-dark .step::before {
  color: var(--green-house);
  background: var(--gold);
}

/* 세로 단계 (따라 하기) */
.vsteps {
  display: flex;
  flex-direction: column;
  counter-reset: vstep;
}

.vstep {
  position: relative;
  display: grid;
  grid-template-columns: calc(44 * var(--u)) minmax(0, 1fr);
  column-gap: calc(18 * var(--u));
  padding-bottom: calc(18 * var(--u));
  counter-increment: vstep;
}

.vstep::before {
  content: counter(vstep);
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  font-size: calc(20 * var(--u));
  font-weight: 800;
  color: var(--white);
  background: var(--green-accent);
  border-radius: 50%;
  z-index: 1;
}

.vstep::after {
  content: "";
  position: absolute;
  left: calc(21 * var(--u));
  top: calc(44 * var(--u));
  bottom: 0;
  width: 2px;
  background: var(--gold-light);
}

.vstep:last-child {
  padding-bottom: 0;
}

.vstep:last-child::after {
  display: none;
}

.vstep h3 {
  font-size: calc(24 * var(--u));
  font-weight: 700;
  line-height: 1.35;
  padding-top: calc(5 * var(--u));
}

.vstep p {
  grid-column: 2;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--fg-soft);
}

.vstep p strong {
  color: var(--fg);
}

/* 비유 대응표 */
.map {
  display: flex;
  flex-direction: column;
}

.map__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) calc(40 * var(--u)) minmax(0, 3fr) minmax(0, 6fr);
  align-items: center;
  column-gap: calc(16 * var(--u));
  padding: calc(13 * var(--u)) 0;
  border-bottom: 1px solid var(--line);
}

.map__row:last-child {
  border-bottom: 0;
}

.map__a {
  font-family: var(--font-serif);
  font-size: calc(27 * var(--u));
  font-weight: 800;
  color: var(--green-house);
}

.map__arrow {
  color: var(--gold);
}

.map__arrow svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map__b {
  font-size: calc(23 * var(--u));
  font-weight: 700;
  color: var(--green-accent);
}

.map__c {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--fg-soft);
}

/* 표 카드 */
.table {
  display: flex;
  flex-direction: column;
  padding: calc(8 * var(--u)) calc(28 * var(--u));
  background: var(--white);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
  font-size: var(--fs-small);
}

.table .tr {
  display: grid;
  grid-template-columns: var(--cols, 1fr 1fr 1fr);
  column-gap: calc(22 * var(--u));
  align-items: center;
  padding: calc(12 * var(--u)) 0;
  border-bottom: 1px solid var(--hairline);
  line-height: 1.45;
}

.table .tr:last-child {
  border-bottom: 0;
}

.table .th {
  padding: calc(13 * var(--u)) 0 calc(11 * var(--u));
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.table .tr > :first-child {
  font-weight: 700;
}

.table .val {
  font-weight: 700;
  color: var(--gold-ink);
}

.table .ok {
  color: var(--green-accent);
  font-weight: 700;
}

.table.dense .tr {
  padding: calc(8 * var(--u)) 0;
}

/* 터미널 / 코드 */
.term {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--green-deep);
  color: #e8efec;
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: calc(19 * var(--u));
  letter-spacing: 0;
  word-break: normal;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(11 * var(--u)) calc(16 * var(--u));
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  color: rgba(255, 255, 255, 0.55);
}

.term__bar i {
  width: calc(11 * var(--u));
  height: calc(11 * var(--u));
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.term__bar span {
  margin-left: calc(8 * var(--u));
}

.term pre {
  margin: 0;
  padding: calc(18 * var(--u)) calc(22 * var(--u));
  font: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.term .c {
  color: rgba(255, 255, 255, 0.58);
}

.term .p {
  color: var(--gold);
  user-select: none;
}

.term .g {
  color: #8fd3b6;
}

.term .o {
  color: rgba(255, 255, 255, 0.7);
}

.copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: calc(4 * var(--u)) calc(12 * var(--u));
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

.copy:active {
  transform: scale(0.95);
}

.copy.is-done {
  color: var(--green-house);
  background: var(--gold);
}

.copy.is-fail {
  color: var(--green-house);
  background: var(--white);
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: 0;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: rgba(0, 98, 65, 0.08);
  color: var(--green-starbucks);
  word-break: normal;
  overflow-wrap: anywhere;
}

.tone-dark code,
.card.dark code {
  background: rgba(255, 255, 255, 0.12);
  color: #d9efe6;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.75em;
  padding: 0.1em 0.5em;
  font-family: var(--font-sans);
  font-size: 0.84em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--input-border);
  border-bottom-width: 2px;
  border-radius: 7px;
  white-space: nowrap;
}

.keys {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.28em;
}

/* 운영체제 전환: html[data-os="mac"|"win"] */
html[data-os="mac"] [data-win],
html[data-os="win"] [data-mac] {
  display: none !important;
}

/* 콜아웃 */
.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: calc(16 * var(--u));
  padding: calc(18 * var(--u)) calc(22 * var(--u));
  background: var(--gold-lightest);
  border-radius: calc(12 * var(--u));
  box-shadow: inset calc(4 * var(--u)) 0 0 var(--gold);
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--text);
}

.callout > b {
  padding-top: 0.12em;
  font-size: var(--fs-micro);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
  white-space: nowrap;
}

.callout.warn {
  background: var(--point-lightest);
  box-shadow: inset calc(4 * var(--u)) 0 0 var(--point);
}

.callout.warn > b {
  color: #b84300;
}

.callout.mint {
  background: var(--green-light);
  box-shadow: inset calc(4 * var(--u)) 0 0 var(--green-accent);
}

.callout.mint > b {
  color: var(--green-starbucks);
}

.tone-gold .callout:not(.warn):not(.mint) {
  background: var(--white);
}

/* 큰 수치 */
.figures {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: calc(32 * var(--u));
}

.figure b {
  display: block;
  font-size: var(--fs-figure);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--green-accent);
}

.figure b.point {
  /* 크림 바탕에서 큰 글자 대비 3:1 을 넘기도록 포인트 주황을 한 단계 짙게 */
  color: #d95400;
}

.figure b.uplift {
  color: var(--green-uplift);
}

.figure b.gold {
  color: var(--gold);
}

.figure strong {
  display: block;
  margin-top: calc(10 * var(--u));
  font-size: var(--fs-body);
  font-weight: 600;
}

.figure span {
  display: block;
  margin-top: calc(4 * var(--u));
  font-size: var(--fs-small);
  color: var(--fg-soft);
}

/* 인용 */
.quote {
  font-family: var(--font-serif);
  font-size: calc(42 * var(--u));
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--green-house);
  text-wrap: balance;
}

.tone-dark .quote {
  color: var(--white);
}

.quote + .cite {
  margin-top: calc(22 * var(--u));
  font-size: var(--fs-small);
  color: var(--fg-soft);
}

/* Do / Don't */
.dd h3 {
  margin-bottom: calc(14 * var(--u));
  font-size: calc(24 * var(--u));
  font-weight: 800;
  color: var(--green-accent);
}

.dd.dont h3 {
  color: var(--red);
}

.dd li {
  padding: calc(9 * var(--u)) 0;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}

.dd li:last-child {
  border-bottom: 0;
}

/* 체크리스트 (진행 상태는 이 브라우저에 저장) */
.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(12 * var(--u)) calc(20 * var(--u));
}

.check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: calc(14 * var(--u));
  padding: calc(14 * var(--u)) calc(18 * var(--u));
  text-align: left;
  background: var(--card-bg);
  border: 0;
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.check:active {
  transform: scale(0.985);
}

.check__box {
  display: grid;
  place-items: center;
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  margin-top: calc(2 * var(--u));
  border-radius: 50%;
  border: 2px solid var(--input-border);
  color: transparent;
  transition: all var(--dur-fast) ease;
}

.check__box svg {
  width: 60%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check b {
  display: block;
  font-size: calc(22 * var(--u));
  font-weight: 700;
  line-height: 1.35;
}

.check small {
  display: block;
  margin-top: calc(2 * var(--u));
  font-size: calc(18 * var(--u));
  line-height: 1.45;
  color: var(--fg-soft);
}

.check[aria-pressed="true"] {
  background: var(--green-light);
}

.check[aria-pressed="true"] .check__box {
  background: var(--green-accent);
  border-color: var(--green-accent);
  color: var(--white);
}

.check[aria-pressed="true"] b {
  color: var(--green-starbucks);
}

.meter {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--fg-soft);
}

.meter__track {
  flex: 1;
  height: calc(8 * var(--u));
  min-height: 6px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.meter__track i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 50px;
  background: var(--green-accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--done, 0));
  transition: transform 0.6s var(--ease-out);
}

.meter button {
  border: 0;
  background: none;
  padding: 0;
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--fg-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* 질문·답 카드 */
.qa h3 {
  font-size: calc(23 * var(--u));
}

.qa h3::before {
  content: "Q";
  margin-right: 0.45em;
  font-weight: 800;
  color: var(--gold-ink);
}

/* 마무리 3열 */
.next {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding-top: calc(22 * var(--u));
  border-top: calc(3 * var(--u)) solid var(--gold);
}

.next:nth-child(2) {
  border-top-color: var(--green-accent);
}

.next:nth-child(3) {
  border-top-color: rgba(255, 255, 255, 0.4);
}

.next h3 {
  font-size: calc(25 * var(--u));
  font-weight: 700;
}

.next p {
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--fg-soft);
}

/* 챕터 구분 슬라이드 */
.chapter-no {
  font-size: calc(150 * var(--u));
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.chapter-title {
  margin-top: calc(20 * var(--u));
  font-size: calc(54 * var(--u));
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}

.chapter-lead {
  margin-top: calc(16 * var(--u));
  max-width: 30em;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--text-on-dark-soft);
}

/* 화면 속 글자(버튼·메뉴 이름) */
.ui {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  padding: 0.06em 0.5em;
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: 7px;
  white-space: nowrap;
}

.ui i {
  font-style: normal;
  font-size: 0.82em;
  font-weight: 500;
  color: var(--text-soft);
}

.tone-dark .ui,
.card.dark .ui {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.tone-dark .ui i,
.card.dark .ui i {
  color: var(--text-on-dark-soft);
}

/* 메뉴 경로: 설정 › 호스트 › 기기 페어링 */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(8 * var(--u)) calc(24 * var(--u));
  font-size: var(--fs-small);
}

.crumbs.inline {
  display: inline-flex;
  vertical-align: middle;
  font-size: inherit;
}

.crumbs > * {
  position: relative;
}

.crumbs > * + *::before {
  content: "";
  position: absolute;
  left: calc(-15 * var(--u));
  top: 50%;
  width: 0.4em;
  height: 0.4em;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

/* 버튼이 바뀌어 가는 흐름: 커밋 → 푸시 → PR */
.pillflow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(10 * var(--u));
}

.pillflow > b {
  padding: calc(9 * var(--u)) calc(22 * var(--u));
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--white);
  background: var(--green-accent);
  border-radius: 50px;
  white-space: nowrap;
}

.pillflow > b.ghost {
  color: var(--green-accent);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--green-accent);
}

.pillflow > b.gold {
  color: var(--green-house);
  background: var(--gold);
}

.pillflow > svg {
  width: calc(26 * var(--u));
  height: calc(26 * var(--u));
  min-width: 16px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 포함 관계: 프로젝트 ⊃ 워크스페이스 ⊃ 탭 */
.nest {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  padding: calc(40 * var(--u)) calc(16 * var(--u)) calc(16 * var(--u));
  border-radius: calc(12 * var(--u));
  background: var(--card-bg);
  box-shadow: var(--shadow-card);
}

.nest > em {
  position: absolute;
  left: calc(16 * var(--u));
  top: calc(10 * var(--u));
  font-size: calc(17 * var(--u));
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--green-starbucks);
}

.nest .nest {
  background: var(--green-light);
  box-shadow: none;
}

.nest .nest .nest {
  flex-direction: row;
  flex-wrap: wrap;
  gap: calc(8 * var(--u));
  padding: calc(14 * var(--u));
  background: var(--white);
}

.nest__tab {
  display: inline-flex;
  align-items: center;
  gap: calc(7 * var(--u));
  padding: calc(6 * var(--u)) calc(13 * var(--u));
  font-size: calc(18 * var(--u));
  font-weight: 600;
  background: var(--neutral-warm);
  border-radius: 50px;
  white-space: nowrap;
}

.nest__tab svg {
  width: 1.05em;
  height: 1.05em;
  fill: none;
  stroke: var(--green-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 어두운 화면 조각(앱 일부를 크게 보여 줄 때) */
.panel {
  --a-line: rgba(255, 255, 255, 0.09);
  --a-soft: rgba(255, 255, 255, 0.58);
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  padding: calc(18 * var(--u));
  color: #eef4f1;
  background: var(--green-house);
  border-radius: calc(14 * var(--u));
  box-shadow: var(--shadow-lift);
  font-size: calc(17 * var(--u));
  line-height: 1.5;
  letter-spacing: 0;
}

.panel .app__composer {
  margin: 0;
}

.panel .app__controls {
  font-size: calc(15 * var(--u));
  flex-wrap: wrap;
}

.panel .app__controls span {
  padding: calc(4 * var(--u)) calc(11 * var(--u));
}

.panel .app__controls span.is-hot {
  color: var(--green-house);
  background: var(--gold);
  font-weight: 700;
}

.panel .msg {
  max-width: none;
}

.panel__title {
  font-size: calc(14 * var(--u));
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--a-soft);
}

.diff {
  display: flex;
  flex-direction: column;
  border-radius: calc(9 * var(--u));
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: calc(16 * var(--u));
  line-height: 1.7;
}

.diff > span {
  display: block;
  padding: 0 calc(12 * var(--u));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.72);
}

.diff > .add {
  color: #c9f0df;
  background: rgba(143, 211, 182, 0.16);
}

.diff > .del {
  color: #f6c9bf;
  background: rgba(240, 160, 143, 0.14);
}

.diff > .note {
  margin: calc(6 * var(--u)) calc(10 * var(--u));
  padding: calc(6 * var(--u)) calc(12 * var(--u));
  font-family: var(--font-sans);
  color: var(--green-house);
  background: var(--gold);
  border-radius: calc(9 * var(--u));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(5 * var(--u)) calc(13 * var(--u));
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
  color: #eef4f1;
  font-size: calc(16 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}

.chip.is-hot {
  color: var(--green-house);
  background: var(--gold);
}

/* 장 구분 슬라이드의 산책길: 전체 구간 중 지금 위치 */
.trail {
  position: absolute;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: calc(92 * var(--u));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.frame.has-trail {
  padding-bottom: calc(190 * var(--u));
}

.trail::before {
  content: "";
  position: absolute;
  left: calc(8 * var(--u));
  right: calc(8 * var(--u));
  top: calc(8 * var(--u));
  border-top: 2px dotted rgba(255, 255, 255, 0.32);
  transform-origin: 0 50%;
}

.trail a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--u));
  width: calc(16 * var(--u));
  text-decoration: none;
  color: rgba(255, 255, 255, 0.62);
}

.trail a:first-child {
  align-items: flex-start;
}

.trail a:last-child {
  align-items: flex-end;
}

.trail i {
  flex: none;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  background: var(--green-house);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  transition: transform var(--dur-fast) ease;
}

.trail span {
  font-size: calc(15 * var(--u));
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.trail a.is-past i {
  background: var(--gold);
  box-shadow: none;
}

.trail a.is-past {
  color: rgba(255, 255, 255, 0.72);
}

.trail a.is-now i {
  background: var(--gold);
  box-shadow: 0 0 0 calc(5 * var(--u)) rgba(203, 162, 88, 0.28);
}

.trail a.is-now {
  color: var(--gold);
}

.trail a.is-now span {
  font-weight: 800;
}

.trail a:hover i {
  transform: scale(1.25);
}

html.js .trail::before {
  transform: scaleX(0);
  transition: transform 1.6s var(--ease-out) 0.3s;
}

html.js .slide.is-in .trail::before {
  transform: scaleX(1);
}

html.js .trail a {
  opacity: 0;
  transform: translate3d(0, calc(8 * var(--u, 1px)), 0);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--n, 0) * 90ms + 500ms);
}

html.js .slide.is-in .trail a {
  opacity: 1;
  transform: none;
}

.slide.is-in .trail a.is-now i {
  animation: trail-now 2.8s ease-in-out infinite;
  animation-delay: 1.6s;
}

@keyframes trail-now {
  50% {
    box-shadow: 0 0 0 calc(11 * var(--u)) rgba(203, 162, 88, 0);
  }
}

/* 실제 화면 캡처 (누르면 크게 본다) */
.shot {
  display: flex;
  flex-direction: column;
  gap: calc(9 * var(--u));
  min-width: 0;
}

.shot__img {
  position: relative;
  display: block;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.shot__img img {
  display: block;
  width: 100%;
  height: auto;
}

/* 높이를 정해 위쪽부터 잘라 보여 준다: <figure class="shot fit" style="--h: 400"> */
.shot.fit .shot__img {
  height: calc(var(--h, 400) * var(--u));
}

.shot.fit .shot__img img {
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, top center);
}

.shot.phone .shot__img {
  width: calc(214 * var(--u));
  margin: 0 auto;
  border: calc(6 * var(--u)) solid #101816;
  border-radius: calc(28 * var(--u));
}

.shot figcaption {
  display: flex;
  align-items: baseline;
  gap: calc(9 * var(--u));
  font-size: var(--fs-micro);
  line-height: 1.45;
  color: var(--fg-soft);
}

.shot figcaption::before {
  content: "실제 화면";
  flex: none;
  padding: calc(1 * var(--u)) calc(9 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--em);
  border-radius: 50px;
  box-shadow: inset 0 0 0 1.5px var(--gold);
}

@media (hover: hover) {
  .shot__img:hover {
    transform: translateY(calc(-2 * var(--u)));
  }
}

.lightbox {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  overscroll-behavior: contain;
}

.lightbox::backdrop {
  background: rgba(23, 43, 38, 0.86);
}

.lightbox[open] {
  animation: lightbox-in 0.28s var(--ease-out);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  cursor: zoom-out;
}

.lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-frap);
}

.lightbox figcaption {
  max-width: 46em;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
}

.lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.lightbox__close:active {
  transform: scale(0.95);
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* 운영체제 전환 꼬리표: 누르면 Mac ↔ Windows */
.os-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-left: calc(12 * var(--u));
  padding: calc(3 * var(--u)) calc(12 * var(--u));
  font: inherit;
  font-size: calc(14 * var(--u));
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: middle;
  color: var(--green-starbucks);
  background: var(--green-light);
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.os-tag::before {
  content: "Mac 기준";
}

.os-tag::after {
  content: "Windows로 보기";
  padding-left: 0.6em;
  font-weight: 500;
  border-left: 1px solid rgba(0, 98, 65, 0.3);
}

html[data-os="win"] .os-tag::before {
  content: "Windows 기준";
}

html[data-os="win"] .os-tag::after {
  content: "Mac으로 보기";
}

.os-tag:hover {
  background: #c4dfd6;
}

.os-tag:active {
  transform: scale(0.95);
}

.tone-dark .os-tag {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.tone-dark .os-tag::after {
  border-left-color: rgba(255, 255, 255, 0.3);
}

/* 슬라이드 안의 큰 전환 스위치 */
.frame .seg {
  padding: calc(4 * var(--u));
  background: rgba(0, 0, 0, 0.06);
}

.frame .seg button {
  padding: calc(8 * var(--u)) calc(22 * var(--u));
  font-size: calc(18 * var(--u));
}

/* 되돌아가는 화살: 검수 → 작업 (.flow.cols-custom 의 둘째 줄에 둔다) */
.loopback {
  position: relative;
  grid-column: var(--span, 5 / 8);
  height: calc(36 * var(--u));
  margin: calc(4 * var(--u)) var(--inset, 20.8%) 0;
  border: 2px dashed var(--gold);
  border-top: 0;
  border-radius: 0 0 calc(18 * var(--u)) calc(18 * var(--u));
}

.loopback::before {
  content: "";
  position: absolute;
  left: calc(-7 * var(--u) - 1px);
  top: calc(-6 * var(--u));
  border-left: calc(7 * var(--u)) solid transparent;
  border-right: calc(7 * var(--u)) solid transparent;
  border-bottom: calc(10 * var(--u)) solid var(--gold);
}

.loopback::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: calc(-6 * var(--u));
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  border-radius: 50%;
  background: var(--green-accent);
  opacity: 0;
}

.slide.is-in .loopback::after {
  animation: loopback 3.6s var(--ease) infinite;
  animation-delay: 2.4s;
}

@keyframes loopback {
  0% {
    right: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    right: calc(100% - 10 * var(--u));
    opacity: 0;
  }
}

.loopback span {
  position: absolute;
  left: 50%;
  bottom: 0;
  padding: 0 calc(12 * var(--u));
  font-size: var(--fs-micro);
  font-weight: 700;
  white-space: nowrap;
  color: var(--em);
  background: var(--bg);
  transform: translate(-50%, 50%);
}

/* ---------- 8. 도식: 연결 흐름 ---------- */
.flow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
}

.flow.cols-custom {
  grid-auto-flow: row;
  grid-template-columns: var(--cols);
}

.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(20 * var(--u)) calc(16 * var(--u));
  text-align: center;
  background: var(--card-bg);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
}

.node b {
  font-size: calc(22 * var(--u));
  font-weight: 700;
  line-height: 1.3;
}

.node span {
  font-size: calc(18 * var(--u));
  line-height: 1.4;
  color: var(--fg-soft);
}

.node small {
  font-family: var(--font-serif);
  font-size: calc(18 * var(--u));
  font-weight: 700;
  color: var(--gold-ink);
}

.node.dark {
  background: var(--green-house);
  color: var(--white);
}

.node.dark span {
  color: var(--text-on-dark-soft);
}

.node.dark small {
  color: var(--gold);
}

.node.dark code {
  background: rgba(255, 255, 255, 0.12);
  color: #d9efe6;
}

.node.row {
  flex-direction: row;
  align-items: center;
  gap: calc(14 * var(--u));
  padding: calc(12 * var(--u)) calc(16 * var(--u));
  text-align: left;
}

.node.row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.node.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--gold-light);
}

.wire {
  position: relative;
  height: calc(40 * var(--u));
  min-width: calc(40 * var(--u));
  display: grid;
  place-items: center;
}

.wire::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  margin-top: -1px;
  border-top: 2px dashed var(--gold);
}

.wire::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  min-width: 7px;
  min-height: 7px;
  margin-top: calc(-5 * var(--u));
  border-radius: 50%;
  background: var(--green-accent);
  opacity: 0;
}

.slide.is-in .wire::after {
  animation: packet 3.2s var(--ease) infinite;
  animation-delay: var(--wd, 0.8s);
}

.wire.rev::after {
  animation-direction: reverse !important;
}

.wire span {
  position: relative;
  padding: 0 calc(8 * var(--u));
  font-size: calc(15 * var(--u));
  font-weight: 700;
  color: var(--gold-ink);
  background: var(--bg);
  white-space: nowrap;
}

@keyframes packet {
  0% {
    left: 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 10 * var(--u));
    opacity: 0;
  }
}

/* ---------- 9. 앱 화면 약도 ---------- */
.app {
  --a-bg: var(--green-house);
  --a-side: var(--green-deep);
  --a-line: rgba(255, 255, 255, 0.09);
  --a-soft: rgba(255, 255, 255, 0.58);
  position: relative;
  display: grid;
  grid-template-columns: 23% minmax(0, 1fr) 25%;
  width: 100%;
  aspect-ratio: 16 / 10;
  color: #eef4f1;
  background: var(--a-bg);
  border-radius: calc(14 * var(--u));
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  font-size: calc(13.5 * var(--u));
  line-height: 1.45;
  letter-spacing: 0;
}

.app.no-right {
  grid-template-columns: 27% minmax(0, 1fr);
}

.app__side,
.app__main,
.app__right {
  position: relative;
}

.app__side {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
  padding: calc(12 * var(--u)) calc(10 * var(--u));
  background: var(--a-side);
  border-right: 1px solid var(--a-line);
  min-width: 0;
}

.app__dots {
  display: flex;
  gap: calc(6 * var(--u));
  padding: calc(2 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u));
}

.app__dots i {
  width: calc(9 * var(--u));
  height: calc(9 * var(--u));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.app__item {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(5 * var(--u)) calc(8 * var(--u));
  border-radius: calc(7 * var(--u));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #dfe9e5;
}

.app__item svg {
  flex: none;
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

.app__item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.app__label {
  padding: calc(10 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u));
  font-size: calc(11.5 * var(--u));
  color: var(--a-soft);
}

.app__dot {
  flex: none;
  width: calc(8 * var(--u));
  height: calc(8 * var(--u));
  border-radius: 50%;
  background: var(--gold);
}

.app__dot.run {
  background: #8fd3b6;
  animation: breathe 2.4s ease-in-out infinite;
}

.app__dot.idle {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}

.app__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app__head {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(9 * var(--u)) calc(14 * var(--u));
  border-bottom: 1px solid var(--a-line);
  font-weight: 600;
}

.app__head small {
  font-size: 1em;
  font-weight: 400;
  color: var(--a-soft);
}

.app__chip {
  margin-left: auto;
  padding: calc(3 * var(--u)) calc(10 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 600;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.1);
}

.app__tabs {
  display: flex;
  gap: calc(4 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  border-bottom: 1px solid var(--a-line);
  overflow: hidden;
}

.app__tab {
  padding: calc(4 * var(--u)) calc(10 * var(--u));
  border-radius: calc(7 * var(--u));
  color: var(--a-soft);
  white-space: nowrap;
}

.app__tab.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.app__chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: calc(9 * var(--u));
  padding: calc(14 * var(--u)) calc(16 * var(--u));
  overflow: hidden;
}

.msg {
  max-width: 88%;
  color: #e3ece8;
}

.msg.me {
  align-self: flex-end;
  padding: calc(6 * var(--u)) calc(12 * var(--u));
  background: rgba(255, 255, 255, 0.12);
  border-radius: calc(10 * var(--u));
  color: var(--white);
}

.msg.tool {
  display: flex;
  align-items: center;
  gap: calc(7 * var(--u));
  color: var(--a-soft);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.msg.tool::before {
  content: "";
  width: calc(6 * var(--u));
  height: calc(6 * var(--u));
  border-radius: 50%;
  background: #8fd3b6;
}

.msg.ask {
  align-self: stretch;
  max-width: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(8 * var(--u));
  padding: calc(9 * var(--u)) calc(12 * var(--u));
  border-radius: calc(10 * var(--u));
  background: rgba(203, 162, 88, 0.16);
  box-shadow: inset 0 0 0 1px rgba(203, 162, 88, 0.55);
  color: var(--white);
}

.msg.ask b {
  margin-left: auto;
  padding: calc(3 * var(--u)) calc(11 * var(--u));
  border-radius: 50px;
  background: var(--gold);
  color: var(--green-house);
  font-weight: 700;
}

.msg.ask i {
  font-style: normal;
  padding: calc(3 * var(--u)) calc(11 * var(--u));
  border-radius: 50px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.app__composer {
  margin: 0 calc(14 * var(--u)) calc(14 * var(--u));
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  border-radius: calc(11 * var(--u));
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--a-line);
  color: var(--a-soft);
}

.app__controls {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  margin-top: calc(9 * var(--u));
  font-size: calc(12 * var(--u));
  white-space: nowrap;
  overflow: hidden;
}

.app__controls span {
  padding: calc(2 * var(--u)) calc(8 * var(--u));
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe9e5;
}

.app__send {
  margin-left: auto;
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  border-radius: 50%;
  background: var(--gold);
}

.app__right {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--u));
  padding: calc(9 * var(--u)) calc(10 * var(--u));
  border-left: 1px solid var(--a-line);
  min-width: 0;
}

.app__file {
  display: flex;
  justify-content: space-between;
  gap: calc(6 * var(--u));
  padding: calc(3 * var(--u)) calc(6 * var(--u));
  font-family: var(--font-mono);
  font-size: calc(12 * var(--u));
  white-space: nowrap;
  overflow: hidden;
}

.app__file span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.app__file .add {
  color: #8fd3b6;
}

.app__file .del {
  color: #f0a08f;
}

/* 약도 위 번호 핀 */
.pin {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  min-width: 20px;
  min-height: 20px;
  margin: calc(-15 * var(--u)) 0 0 calc(-15 * var(--u));
  font-family: var(--font-sans);
  font-size: calc(16 * var(--u));
  font-weight: 800;
  color: var(--green-house);
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 calc(3 * var(--u)) rgba(203, 162, 88, 0.3), var(--shadow-frap);
}

.pin.tl {
  left: calc(6 * var(--u));
  top: calc(6 * var(--u));
  margin: 0;
}

.pin.tr {
  right: calc(6 * var(--u));
  top: calc(6 * var(--u));
  margin: 0;
}

.pin.bl {
  left: calc(6 * var(--u));
  bottom: calc(6 * var(--u));
  margin: 0;
}

.pin.br {
  right: calc(6 * var(--u));
  bottom: calc(6 * var(--u));
  margin: 0;
}

.pin.mr {
  right: calc(6 * var(--u));
  top: 50%;
}

.slide.is-in .pin {
  animation: pin-pulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.35s + 1s);
}

@keyframes pin-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 calc(3 * var(--u)) rgba(203, 162, 88, 0.3), var(--shadow-frap);
  }
  50% {
    box-shadow: 0 0 0 calc(9 * var(--u)) rgba(203, 162, 88, 0), var(--shadow-frap);
  }
}

.legend {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}

.legend li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: calc(14 * var(--u));
  align-items: start;
}

.legend li > i {
  display: grid;
  place-items: center;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  margin-top: calc(2 * var(--u));
  font-style: normal;
  font-size: calc(17 * var(--u));
  font-weight: 800;
  color: var(--green-house);
  background: var(--gold);
  border-radius: 50%;
}

.legend b {
  display: block;
  font-size: calc(22 * var(--u));
  font-weight: 700;
  line-height: 1.35;
}

.legend li > div > span {
  display: block;
  font-size: calc(19 * var(--u));
  line-height: 1.5;
  color: var(--fg-soft);
}

/* 휴대폰 약도 */
.phone {
  position: relative;
  width: calc(250 * var(--u));
  aspect-ratio: 9 / 18.5;
  margin: 0 auto;
  padding: calc(9 * var(--u));
  background: #101816;
  border-radius: calc(36 * var(--u));
  box-shadow: var(--shadow-lift);
}

.phone__screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--green-house);
  border-radius: calc(28 * var(--u));
  overflow: hidden;
  color: #eef4f1;
  font-size: calc(13.5 * var(--u));
  line-height: 1.45;
}

.phone__bar {
  padding: calc(16 * var(--u)) calc(14 * var(--u)) calc(9 * var(--u));
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.phone__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: calc(8 * var(--u));
  padding: calc(12 * var(--u));
}

.phone__input {
  margin: 0 calc(10 * var(--u)) calc(14 * var(--u));
  padding: calc(9 * var(--u)) calc(12 * var(--u));
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.55);
}

/* QR 약도 */
.qr {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: calc(4 * var(--u));
  width: calc(150 * var(--u));
  padding: calc(14 * var(--u));
  background: var(--white);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
}

.qr i {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--green-house);
}

.qr i.o {
  background: transparent;
}

/* ---------- 10. 등장 애니메이션 ---------- */
html.js .rv {
  opacity: 0;
  transform: translate3d(0, calc(18 * var(--u, 1px)), 0);
  transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 65ms + 60ms);
}

html.js .slide.is-in .rv {
  opacity: 1;
  transform: none;
}

html.js .rule {
  transform: scaleX(0);
  transition: transform 1s var(--ease-out) 0.15s;
}

html.js .slide.is-in .rule {
  transform: scaleX(1);
}

html.js .steps::before {
  transform: scaleX(0);
  transition: transform 1.4s var(--ease-out) 0.3s;
}

html.js .slide.is-in .steps::before {
  transform: scaleX(1);
}

html.js .seq > * {
  opacity: 0;
  transform: translate3d(0, calc(8 * var(--u, 1px)), 0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

html.js .seq > .is-on {
  opacity: 1;
  transform: none;
}

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 0.1em;
  vertical-align: -0.18em;
  background: var(--gold);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.typing {
  display: inline-flex;
  gap: calc(4 * var(--u));
  align-items: center;
}

.typing i {
  width: calc(6 * var(--u));
  height: calc(6 * var(--u));
  min-width: 4px;
  min-height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  animation: typing 1.2s ease-in-out infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  40% {
    opacity: 1;
    transform: translateY(calc(-3 * var(--u)));
  }
}

/* 표지의 산책길 */
.path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.path path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
  vector-effect: non-scaling-stroke;
}

.path circle {
  fill: var(--green-accent);
}

.path .walker {
  offset-rotate: 0deg;
  animation: walk 20s ease-in-out infinite alternate;
}

@keyframes walk {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}

/* 차례 */
.toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(14 * var(--u)) calc(20 * var(--u));
}

.toc a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: calc(18 * var(--u));
  padding: calc(15 * var(--u)) calc(22 * var(--u));
  text-decoration: none;
  background: var(--card-bg);
  border-radius: calc(12 * var(--u));
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}

.toc a b {
  font-size: calc(30 * var(--u));
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold-ink);
  font-variant-numeric: tabular-nums;
}

.toc a strong {
  display: block;
  font-size: calc(23 * var(--u));
  font-weight: 700;
  line-height: 1.35;
}

.toc a span {
  font-size: calc(18 * var(--u));
  line-height: 1.4;
  color: var(--fg-soft);
}

.toc a strong {
  color: var(--fg);
}

@media (hover: hover) {
  .toc a:hover {
    transform: translateY(calc(-2 * var(--u)));
    box-shadow: var(--shadow-lift);
  }
}

.toc a:active {
  transform: scale(0.98);
}

/* ---------- 11. 떠 있는 다음 버튼 (Frap) ---------- */
.frap {
  position: fixed;
  right: max(clamp(8px, 1.2vw, 24px), env(safe-area-inset-right));
  bottom: max(clamp(48px, 4.6vw, 76px), env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: clamp(44px, 4.2vw, 56px);
  height: clamp(44px, 4.2vw, 56px);
  color: var(--white);
  background: var(--green-accent);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-frap);
  cursor: pointer;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease, opacity var(--dur-base) ease;
}

.frap:active {
  transform: scale(0.95);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.14);
}

.frap svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-base) var(--ease);
}

.frap.is-end svg {
  transform: rotate(180deg);
}

/* ---------- 12. 모바일·세로 화면: 흐름 모드 ---------- */
/* 덱 조건(넓고, 가로로 길고, 너무 낮지 않은 화면)의 부정. app.js 의 deckQuery 와 반드시 같이 고친다 */
@media not all and (min-width: 900px) and (min-aspect-ratio: 5/4) and (min-height: 560px) {
  html {
    scroll-snap-type: none;
    scroll-padding-top: var(--nav-h);
  }

  /* 탭으로 옮겨 다닐 때 초점 받은 것이 내비 바로 밑에 붙지 않도록 */
  .slide a,
  .slide button,
  .slide [tabindex] {
    scroll-margin-top: 12px;
  }

  .nav__links,
  .nav > .nav__tools > .seg {
    display: none;
  }

  .nav__menu {
    display: inline-flex;
  }

  .slide {
    display: block;
    min-height: 0;
    padding-top: 0;
    overflow: visible;
  }

  .slide:first-of-type {
    padding-top: var(--nav-h);
  }

  .stage {
    --u: 0.74px;
    --fs-display: clamp(2.2rem, 9.6vw, 3.1rem);
    --fs-title: clamp(1.65rem, 6.6vw, 2.2rem);
    --fs-sub: 1.25rem;
    --fs-lead: 1.125rem;
    --fs-body: 1.0625rem;
    --fs-small: 1rem;
    --fs-micro: 0.8125rem;
    --fs-figure: clamp(3.4rem, 17vw, 5rem);
    --pad-x: clamp(20px, 5.4vw, 40px);
    --pad-top: 56px;
    --pad-bottom: 56px;

    container-type: normal;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: auto;
  }

  .frame {
    position: relative;
    inset: auto;
  }

  /* 배경의 큰 쪽 번호는 각 장 오른쪽 위에 작게 */
  .stage[data-num]::before {
    top: 18px;
    right: 10px;
    font-size: 132px;
  }

  /* 세로로 읽는 화면에서는 쪽 번호 대신 만든 곳 표시만 작게 남긴다 */
  .stage-foot {
    position: static;
    justify-content: flex-end;
    padding: 0 20px 18px;
    margin-top: -6px;
  }

  .stage-foot .brand,
  .stage-foot .num {
    display: none;
  }

  .stage-foot .mf {
    --mf-h: 22px;
  }

  /* 마지막 장에서는 떠 있는 '맨 처음으로' 버튼이 만든 곳 표시를 가리지 않도록 */
  .slide:last-child .stage-foot {
    padding-bottom: 76px;
  }

  .over--maker .mf {
    --mf-h: 40px;
  }

  .over--maker > span:last-child {
    padding-left: 0;
    border-left: 0;
    flex-basis: 100%;
  }

  .maker .mf {
    --mf-h: 52px;
  }

  .nav__maker {
    display: none;
  }

  .nav__brand {
    margin-right: auto;
  }

  .head {
    margin-bottom: 22px;
  }

  .cols-2,
  .cols-3,
  .cols-4,
  .split,
  .split-46,
  .split-64,
  .checks,
  .figures {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    gap: 14px;
  }

  .split,
  .split-46,
  .split-64 {
    gap: 26px;
  }

  .figures {
    gap: 26px;
  }

  .card {
    padding: 18px;
    border-radius: 12px;
    gap: 8px;
  }

  .card h3,
  .step h3,
  .vstep h3,
  .next h3 {
    font-size: 1.1875rem;
  }

  .qa h3 {
    font-size: 1.125rem;
  }

  .ico {
    width: 44px;
    height: 44px;
  }

  .ico.sm {
    width: 36px;
    height: 36px;
  }

  .badge {
    padding: 3px 11px;
  }

  .btn {
    padding: 13px 24px;
    font-size: 1rem;
    min-height: 46px;
  }

  .list {
    gap: 10px;
  }

  .list > li {
    padding-left: 22px;
  }

  .list > li::before {
    left: 3px;
    width: 7px;
    height: 7px;
  }

  .list.check > li {
    padding-left: 26px;
  }

  .list.check > li::before {
    left: 0;
    width: 16px;
    height: 9px;
    border-width: 2.5px;
  }

  /* 가로 단계 → 세로 */
  .steps {
    grid-auto-flow: row;
    gap: 0;
  }

  .steps::before {
    left: 20px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 2px;
    height: auto;
    transform-origin: 50% 0;
  }

  html.js .steps::before {
    transform: scaleY(0);
  }

  html.js .slide.is-in .steps::before {
    transform: scaleY(1);
  }

  .step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 4px;
    padding-bottom: 20px;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step::before {
    grid-row: 1 / span 3;
    width: 42px;
    height: 42px;
    margin: 0;
    font-size: 1.0625rem;
    box-shadow: 0 0 0 5px var(--bg);
  }

  .step > * {
    grid-column: 2;
  }

  .step h3 {
    padding-top: 7px;
  }

  .vstep {
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 14px;
    padding-bottom: 18px;
  }

  .vstep::before {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .vstep::after {
    left: 18px;
    top: 38px;
  }

  .vstep h3 {
    padding-top: 5px;
  }

  /* 비유 대응표 → 카드형 */
  .map__row {
    grid-template-columns: auto 22px minmax(0, 1fr);
    row-gap: 4px;
    column-gap: 10px;
    padding: 14px 0;
  }

  .map__a {
    font-size: 1.25rem;
  }

  .map__b {
    font-size: 1.0625rem;
  }

  .map__c {
    grid-column: 1 / -1;
  }

  /* 표 → 항목별 묶음 */
  .table {
    padding: 4px 18px;
    border-radius: 12px;
  }

  .table .th {
    display: none;
  }

  .table .tr {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3px;
    padding: 14px 0;
  }

  .table .tr > [data-th]::before {
    content: attr(data-th) " · ";
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-soft);
  }

  .table.dense .tr {
    padding: 12px 0;
  }

  .table.keep .th {
    display: grid;
  }

  .table.keep .tr {
    grid-template-columns: var(--cols-m, 1fr auto);
    column-gap: 14px;
  }

  .term {
    border-radius: 12px;
    font-size: 0.875rem;
  }

  .term__bar {
    padding: 9px 14px;
  }

  .term__bar i {
    width: 9px;
    height: 9px;
  }

  .term pre {
    padding: 14px 16px;
  }

  .copy {
    padding: 5px 12px;
  }

  .callout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 4px;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: inset 4px 0 0 var(--gold);
  }

  .callout.warn {
    box-shadow: inset 4px 0 0 var(--point);
  }

  .callout.mint {
    box-shadow: inset 4px 0 0 var(--green-accent);
  }

  .quote {
    font-size: clamp(1.5rem, 6.4vw, 2rem);
  }

  .check {
    padding: 14px 16px;
    border-radius: 12px;
  }

  .check__box {
    width: 26px;
    height: 26px;
  }

  .check b {
    font-size: 1.0625rem;
  }

  .check small {
    font-size: 0.9375rem;
  }

  .meter__track {
    height: 7px;
  }

  .chapter-no {
    font-size: clamp(5rem, 26vw, 7.5rem);
  }

  .chapter-title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    margin-top: 12px;
  }

  .chapter-lead {
    margin-top: 12px;
  }

  .next {
    padding-top: 16px;
    border-top-width: 3px;
  }

  .rule {
    width: 60px;
    height: 4px;
  }

  .frame.has-trail {
    padding-bottom: var(--pad-bottom);
  }

  .trail {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 34px;
  }

  .trail::before {
    left: 6px;
    right: 6px;
    top: 5px;
  }

  .trail a {
    width: 12px;
  }

  .trail i {
    width: 12px;
    height: 12px;
  }

  .trail span {
    display: none;
  }

  .trail a.is-now i {
    box-shadow: 0 0 0 4px rgba(203, 162, 88, 0.28);
  }

  .shot {
    gap: 8px;
  }

  .shot__img {
    border-radius: 12px;
  }

  .shot.fit .shot__img {
    height: auto;
    max-height: 460px;
  }

  .shot.fit .shot__img img {
    height: auto;
  }

  .shot.phone .shot__img {
    width: 200px;
    border-width: 6px;
    border-radius: 26px;
  }

  .shot figcaption::before {
    padding: 1px 9px;
    font-size: 0.75rem;
  }

  .os-tag {
    margin: 6px 0 0;
    padding: 4px 12px;
    font-size: 0.8125rem;
  }

  .frame .seg {
    padding: 4px;
  }

  .frame .seg button {
    padding: 9px 20px;
    font-size: 1rem;
  }

  .loopback {
    grid-column: auto;
    height: auto;
    margin: 12px 0 0;
    padding: 10px 14px;
    border: 2px dashed var(--gold);
    border-radius: 12px;
  }

  .loopback::before,
  .loopback::after {
    display: none;
  }

  .loopback span {
    position: static;
    padding: 0;
    white-space: normal;
    background: none;
    transform: none;
  }

  .toc {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .toc a {
    padding: 14px 18px;
    border-radius: 12px;
    column-gap: 16px;
  }

  .toc a b {
    font-size: 1.375rem;
  }

  .toc a strong {
    font-size: 1.0625rem;
  }

  .toc a span {
    font-size: 0.9375rem;
  }

  .crumbs {
    gap: 8px 20px;
    font-size: 1rem;
  }

  .crumbs > * + *::before {
    left: -13px;
  }

  .ui {
    white-space: normal;
  }

  .pillflow {
    gap: 8px;
  }

  .pillflow > b {
    padding: 8px 16px;
    font-size: 0.9375rem;
  }

  .nest {
    padding: 38px 12px 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .nest .nest .nest {
    padding: 12px;
  }

  .nest > em {
    left: 14px;
    top: 10px;
    font-size: 0.8125rem;
  }

  .nest__tab {
    padding: 5px 11px;
    font-size: 0.875rem;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
    font-size: 0.875rem;
  }

  .panel .app__controls,
  .chip {
    font-size: 0.8125rem;
  }

  .panel__title {
    font-size: 0.75rem;
  }

  .diff {
    font-size: 0.8125rem;
  }

  /* 연결 도식 → 세로 */
  .flow,
  .flow.cols-custom {
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .node {
    padding: 16px;
    border-radius: 12px;
  }

  .node b {
    font-size: 1.125rem;
  }

  .node span,
  .node small {
    font-size: 0.9375rem;
  }

  .wire {
    height: 46px;
    width: 100%;
  }

  .wire::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    width: 0;
    height: auto;
    margin: 0 0 0 -1px;
    border-top: 0;
    border-left: 2px dashed var(--gold);
  }

  .wire::after {
    left: 50%;
    top: 0;
    margin: 0 0 0 -4px;
    width: 8px;
    height: 8px;
  }

  .slide.is-in .wire::after {
    animation-name: packet-v;
  }

  .wire span {
    font-size: 0.8125rem;
    padding: 2px 8px;
  }

  @keyframes packet-v {
    0% {
      top: 0;
      opacity: 0;
    }
    12% {
      opacity: 1;
    }
    88% {
      opacity: 1;
    }
    100% {
      top: calc(100% - 8px);
      opacity: 0;
    }
  }

  /* 앱 약도: 높이는 내용에 맞추고, 오른쪽 구역은 아래 띠로 내린다 */
  .app,
  .app.no-right {
    --u: 0.86px;
    grid-template-columns: 34% minmax(0, 1fr);
    aspect-ratio: auto;
    border-radius: 12px;
    font-size: 12px;
  }

  .app__chat {
    min-height: 150px;
    padding: 12px;
  }

  .app__composer {
    margin: 0 10px 10px;
  }

  .app .app__right {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    padding: 8px 12px 10px;
    border-left: 0;
    border-top: 1px solid var(--a-line);
  }

  .app__right .app__tabs {
    width: 100%;
  }

  .app__label {
    font-size: 10.5px;
  }

  .app__controls,
  .app__chip,
  .app__file {
    font-size: 10.5px;
  }

  .pin {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .pin:not(.tl):not(.tr):not(.bl):not(.br) {
    margin: -12px 0 0 -12px;
  }

  .legend li > i {
    width: 28px;
    height: 28px;
    font-size: 0.9375rem;
  }

  .legend b {
    font-size: 1.0625rem;
  }

  .legend li > div > span {
    font-size: 0.9375rem;
  }

  .phone {
    --u: 1px;
    width: 220px;
  }

  .qr {
    --u: 1px;
  }

  .frap {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }

  /* 글자를 크게 키운 화면에서 긴 주소가 든 칩이 밖으로 나가지 않도록 */
  .chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hide-m {
    display: none !important;
  }
}

@media (min-width: 900px) and (min-aspect-ratio: 5/4) and (min-height: 560px) {
  .only-m {
    display: none !important;
  }
}

/* 큰 내비 링크가 넘치는 폭에서는 목차 버튼으로 */
@media (max-width: 1239.98px) {
  .nav__links {
    display: none;
  }

  .nav__menu {
    display: inline-flex;
  }
}

/* ---------- 13. 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  html,
  html.is-settled {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  html.js .rv,
  html.js .seq > *,
  html.js .rule,
  html.js .steps::before,
  html.js .trail a,
  html.js .trail::before {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .nav,
  .frap,
  .sheet {
    display: none !important;
  }

  .slide {
    min-height: 0;
    padding-top: 0;
    break-inside: avoid;
  }

  html.js .rv,
  html.js .seq > *,
  html.js .rule,
  html.js .steps::before,
  html.js .trail a,
  html.js .trail::before {
    opacity: 1 !important;
    transform: none !important;
  }

  html.js .stage[data-num]::before {
    opacity: var(--ghost-opacity) !important;
  }

  .slide,
  .slide * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .lightbox {
    display: none !important;
  }
}
