/* Vibly 검토용 UX 시안 — 외부 폰트·이미지·CDN 없음 */

:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --surface-3: #e4ebe8;
  --ink: #15211d;
  --ink-2: #3f4d48;
  --muted: #6d7a75;
  --line: #dbe3df;
  --line-strong: #c3cfc9;
  --accent: #0f8f6e;
  --accent-strong: #0b7158;
  --accent-soft: #e1f3ec;
  --teal: #178f9c;
  --teal-soft: #e0f2f4;
  --warn: #a96a12;
  --warn-soft: #fbf0db;
  --danger: #b43d3d;
  --danger-soft: #f9e5e5;
  --info: #2f66a8;
  --info-soft: #e5edf8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 33, 29, 0.04), 0 8px 24px rgba(21, 33, 29, 0.06);
  --shadow-lg: 0 18px 50px rgba(21, 33, 29, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 248px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-strong); }
ul, ol { margin: 0; padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
pre {
  margin: 0;
  padding: 12px 14px;
  background: #182420;
  color: #d9e8e2;
  border-radius: var(--radius-sm);
  overflow: auto;
  white-space: pre;
  line-height: 1.5;
}
pre .cm { color: #8fb3a7; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 12px; }

/* 검토용 상단 띠 */
.review-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--ink-2);
  background: #fff8e9;
  border-bottom: 1px solid #f1e3c2;
}
.review-strip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-strong); text-decoration: underline; text-underline-offset: 2px;
}

/* 레이아웃 */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh - 32px); }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.content { min-width: 0; }
.topbar { display: none; }
.view { padding: 32px 40px 72px; max-width: 1180px; }
.view:focus { outline: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 4px 6px; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand--small .brand__mark { width: 26px; height: 26px; }
.brand--small .brand__name { font-size: 1.1rem; }

.nav { display: flex; flex-direction: column; gap: 18px; margin-top: 26px; flex: 1; }
.nav__group-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px; margin-bottom: 6px;
}
.nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav__link:hover { background: var(--surface-2); color: var(--ink); }
.nav__link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.nav__icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav__count { margin-left: auto; font-size: 0.74rem; color: var(--muted); }

.sidebar__foot { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.wallet-mini { font-size: 0.8rem; color: var(--ink-2); display: grid; gap: 2px; }
.wallet-mini strong { color: var(--ink); }

.role-chip { font-size: 0.78rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

.bottom-nav { display: none; }

/* 공통 */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head__text { display: grid; gap: 6px; max-width: 640px; }
.page-head .lead { color: var(--ink-2); }
.eyebrow { font-size: 0.78rem; font-weight: 700; color: var(--accent-strong); letter-spacing: 0.02em; }
.crumbs { font-size: 0.84rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.hint { font-size: 0.8rem; color: var(--muted); }
.note { font-size: 0.86rem; color: var(--ink-2); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row--between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.stack--tight { gap: 8px; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.layout-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; }
.card--soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card--accent { border-color: #bfe3d4; background: #f3fbf7; box-shadow: none; }
.card--warn { border-color: #efd8a8; background: var(--warn-soft); box-shadow: none; }
.card--danger { border-color: #ecc5c5; background: var(--danger-soft); box-shadow: none; }
.card--info { border-color: #c5d6ee; background: var(--info-soft); box-shadow: none; }
.card h2, .card h3 { margin-bottom: 10px; }
.card__title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card__title-row h2, .card__title-row h3 { margin: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge--accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge--teal { background: var(--teal-soft); color: #11707a; }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-2); }
.badge--example { background: #fff4df; color: #8a5a0d; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--surface-2); color: var(--ink);
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--sm { padding: 7px 12px; font-size: 0.86rem; border-radius: 9px; }
.btn--lg { padding: 13px 22px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; line-height: 1;
}
.icon-btn:hover { background: var(--surface-3); }
.help-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-size: 0.78rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; margin-left: 6px; /* 터치 대상 24px 이상 */
}
.help-btn:hover { color: var(--accent-strong); border-color: var(--accent); }

/* 폼 */
.field { display: grid; gap: 6px; }
.field--compact { gap: 4px; }
.field__label { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field input[type="text"], .field input[type="number"], .field input[type="url"], .field input[type="search"],
.field select, .field textarea, .search input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); min-height: 42px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); }
.field__error { font-size: 0.8rem; color: var(--danger); }
.field__help { font-size: 0.8rem; color: var(--muted); }
.search { position: relative; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.choice--selected { border-color: var(--accent); background: #f3fbf7; }
.choice--disabled { opacity: 0.55; cursor: not-allowed; }
.choice__body { display: grid; gap: 3px; min-width: 0; }
.choice__title { font-weight: 600; }
.choice__meta { font-size: 0.8rem; color: var(--muted); }
.checkline { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; }
.checkline input { accent-color: var(--accent); margin-top: 3px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 0.86rem; cursor: pointer; color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 11px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); }

/* 앱 카드 */
.app-card { position: relative; display: grid; gap: 12px; padding: 16px; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.app-card:hover { box-shadow: 0 10px 30px rgba(21, 33, 29, 0.1); transform: translateY(-1px); }
.app-card:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.app-card__preview { border-radius: 12px; background: var(--surface-2); padding: 10px; }
.app-card__badges { position: absolute; top: 24px; left: 24px; display: flex; gap: 6px; }
.app-card__title { font-size: 1.02rem; font-weight: 700; }
.app-card__title a { color: inherit; text-decoration: none; }
.app-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app-card__tag { font-size: 0.86rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.app-card__owner { display: flex; gap: 8px; align-items: center; font-size: 0.82rem; color: var(--ink-2); }
.app-card__save { position: relative; z-index: 2; } /* 카드 전체 링크(::after) 위에서 눌리도록 */
.app-card--featured { border-color: #bfe3d4; background: #f7fcfa; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--teal-soft); color: #11707a; display: inline-flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 700; flex: none; }
.price { font-weight: 800; color: var(--ink); font-size: 1.02rem; }
.price small { font-weight: 600; color: var(--muted); font-size: 0.78rem; margin-left: 2px; }

/* 미리보기 SVG */
.pv { width: 100%; height: auto; aspect-ratio: 16 / 10; }
.pv-paper { fill: #fff; stroke: var(--line); }
.pv-ink { fill: var(--ink); }
.pv-line { fill: var(--line-strong); }
.pv-soft { fill: var(--surface-3); }
.pv-accent { fill: var(--accent); }
.pv-accent-soft { fill: var(--accent-soft); }
.pv-teal { fill: var(--teal); }
.pv-teal-soft { fill: var(--teal-soft); }
.pv-warn { fill: #f0c36a; }
.pv-stroke { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* 결과 문서 */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; gap: 8px; }
.doc__title { font-weight: 700; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.doc__line { font-size: 0.92rem; color: var(--ink-2); padding-left: 10px; border-left: 3px solid var(--accent-soft); }
.doc--sample { background: #fbfcfb; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 0.9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list { display: grid; gap: 6px; padding-left: 1.1em; font-size: 0.92rem; }
.list--check { list-style: none; padding: 0; }
.list--check li { display: flex; gap: 8px; align-items: flex-start; }
.list--check li::before { content: "✓"; color: var(--accent); font-weight: 800; flex: none; }
.list--x li::before { content: "✕"; color: var(--danger); }

/* 진행 단계 */
.steps { list-style: none; padding: 0; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.step + .step::before { content: ""; position: absolute; left: 13px; top: -8px; height: 18px; width: 2px; background: var(--line); }
.step__dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.step--done .step__dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.step--active .step__dot { border-color: var(--accent); color: var(--accent-strong); }
.step--active .step__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.1s infinite var(--ease); }
.step--failed .step__dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.step--unknown .step__dot { background: var(--warn); border-color: var(--warn); color: #fff; }
.step__label { font-weight: 600; }
.step__sub { font-size: 0.82rem; color: var(--muted); }
@keyframes pulse { 0%, 100% { transform: scale(0.7); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

/* 마법사 */
.wizard { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.wizard__steps { list-style: none; padding: 0; display: grid; gap: 4px; }
.wizard__steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 0.88rem; color: var(--muted); }
.wizard__steps li[aria-current="step"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.wizard__steps .step-num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; flex: none; }
.wizard__steps li.is-done .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard__steps li button { all: unset; cursor: pointer; display: flex; gap: 10px; align-items: center; width: 100%; border-radius: 8px; }
.wizard__steps li button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wizard__foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.save-indicator { font-size: 0.8rem; color: var(--muted); }

/* 표 */
.table-wrap { overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 0.78rem; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 상태 */
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.empty svg { width: 56px; height: 56px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-card { display: grid; gap: 10px; padding: 16px; }
.sk-card .skeleton { height: 14px; }
.sk-card .skeleton.tall { height: 110px; border-radius: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.stat { display: grid; gap: 4px; }
.stat__label { font-size: 0.78rem; color: var(--muted); }
.stat__value { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.stat__sub { font-size: 0.78rem; color: var(--muted); }

.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.funnel .stat { padding: 12px; border-radius: 12px; background: var(--surface-2); }

.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 0.88rem; }
.callout--warn { background: var(--warn-soft); color: #6d4406; }
.callout--info { background: var(--info-soft); color: #244f82; }
.callout--accent { background: var(--accent-soft); color: var(--accent-strong); }
.callout--danger { background: var(--danger-soft); color: var(--danger); }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

details.help { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
details.help summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
details.help p { margin-top: 8px; font-size: 0.88rem; color: var(--ink-2); }

/* 모달 */
.modal-root { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal-root[hidden] { display: none; } /* 작성자 display:grid가 UA [hidden]보다 우선하므로 명시 */
.modal-backdrop { position: absolute; inset: 0; background: rgba(21, 33, 29, 0.45); }
.modal {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: grid; grid-template-rows: auto 1fr auto;
  animation: rise .18s var(--ease);
}
.modal--wide { width: min(760px, 100%); }
.modal--sheet { align-self: end; width: 100%; border-radius: 18px 18px 0 0; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 0; }
.modal-head h2 { font-size: 1.1rem; }
.modal-body { padding: 16px 20px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 20px; flex-wrap: wrap; }
.modal-owner { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.modal-owner svg { width: 18px; height: 18px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 0.88rem;
  box-shadow: var(--shadow-lg); z-index: 70; max-width: calc(100vw - 32px);
}

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

.ledger-amount--minus { color: var(--danger); }
.ledger-amount--plus { color: var(--accent-strong); }
.ledger-amount--hold { color: var(--warn); }

.path-table th:first-child, .path-table td:first-child { width: 28%; }

.preview-frame { border: 2px dashed var(--teal); border-radius: var(--radius); padding: 14px; background: #f7fbfb; }
.preview-frame__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.84rem; color: #11707a; flex-wrap: wrap; }

/* 반응형 */
@media (max-width: 1100px) {
  .view { padding: 28px 28px 80px; }
  .layout-detail { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 959px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
  }
  .topbar__right { display: flex; align-items: center; gap: 8px; }
  .view { padding: 20px 16px 96px; }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button {
    display: grid; justify-items: center; gap: 2px; padding: 6px 4px; font-size: 0.7rem; font-weight: 600;
    color: var(--muted); text-decoration: none; background: none; border: 0; border-radius: 10px; cursor: pointer;
  }
  .bottom-nav a[aria-current="page"] { color: var(--accent-strong); }
  .bottom-nav .nav__icon { width: 22px; height: 22px; }
  .wizard { grid-template-columns: 1fr; }
  .wizard__steps { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: thin; }
  .wizard__steps li { flex: none; }
  .wizard__steps .step-text { display: none; }
  .wizard__steps li[aria-current="step"] .step-text { display: inline; }
  .page-head { margin-bottom: 16px; }
  h1 { font-size: 1.35rem; }
  .modal { width: 100%; }
  .modal-root { align-items: end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { font-size: 0.78rem; }
  .kv dd { margin-bottom: 6px; }
  table.tbl.tbl--stack thead { display: none; }
  table.tbl.tbl--stack tr { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.tbl.tbl--stack td { display: grid; grid-template-columns: 90px 1fr; gap: 8px; border: 0; padding: 2px 0; }
  table.tbl.tbl--stack td::before { content: attr(data-label); color: var(--muted); font-size: 0.78rem; }
  table.tbl.tbl--stack td.num { text-align: left; }
  .app-card__badges { top: 22px; left: 22px; }
  .review-strip { font-size: 0.74rem; padding: 6px 12px; }
}
@media (max-width: 420px) {
  .grid--cards { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .skeleton { background: var(--surface-2); }
  .step--active .step__dot::after { opacity: 1; transform: none; }
}

/* 로컬 카탈로그 연결 상태 */
.conn-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 16px; font-size: 0.8rem; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); }
.conn-note--api { background: #e9f6f0; border-color: #c7e6d8; }
.conn-note--offline { background: #fdf1f1; border-color: #f0d2d2; color: #7a2e2e; }
.conn-note strong { font-weight: 700; }
.field-errors { margin: 0; padding-left: 1.1em; font-size: 0.84rem; color: var(--danger); display: grid; gap: 4px; }

/* 개인 링크 등록: 작은 화면에서도 URL·버튼·입력창이 카드 밖으로 넘치지 않는다. */
.registration-form { max-width: 680px; display: grid; gap: 16px; min-width: 0; }
.registration-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 18px; }
.registration-fields input, .registration-fields textarea { min-width: 0; width: 100%; font-size: 16px; }
.registration-fields button { min-height: 44px; white-space: normal; }
.registered-app { min-width: 0; overflow-wrap: anywhere; }
.registered-app__url { margin: 12px 0; overflow-wrap: anywhere; }
.status-pill { font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
