/* ════════════════════════════════════════════════════════════════
   jace-catalog — "쇼룸 (Showroom)"
   밝은 화이트 매장 × 코발트 블루 단일 액센트 × 다크 터미널 진열창.
   페이지 크롬 = 클린 커머스(화이트·카드 그리드·명확한 CTA),
   터미널 창 내부 = 다크 유지 — 실물 스크린샷처럼 박힌다.
   모노스페이스 = 기계의 목소리(상품명·배지·터미널·메타),
   산세리프  = 사람의 목소리(카피·설명·버튼).
   ════════════════════════════════════════════════════════════════ */

:root {
  /* light surfaces */
  --bg0: #f7f8fa;         /* page */
  --bg1: #ffffff;         /* card */
  --bg2: #f1f3f6;         /* raised / hover */
  --line: #e3e7ee;
  --line-soft: #ecEFf4;

  /* text */
  --tx: #171a20;
  --tx2: #475467;
  --tx3: #667085;

  /* cobalt blue — 단일 포인트 */
  --acc: #2563eb;
  --acc-strong: #1d4ed8;
  --acc-dim: rgba(37, 99, 235, 0.08);
  --acc-line: rgba(37, 99, 235, 0.28);
  --acc-ink: #ffffff;     /* text on blue */

  /* semantic (light) */
  --ok: #15803d;
  --err: #d92d20;

  /* terminal world — 다크 유지 (데이터 스펙 계약 색 포함) */
  --term-bg: #0d1117;
  --term-line: #262d37;
  --term-tx: #cdd6e0;
  --term-amber: #ffb454;
  --term-ok: #6fd98b;
  --term-err: #ff6d67;

  /* type */
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;

  /* rhythm */
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 8px 22px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 48px rgba(16, 24, 40, 0.14);
  --ease: cubic-bezier(0.22, 0.9, 0.3, 1);
}

/* ── reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg0);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code {
  font-family: var(--mono); font-size: 0.88em;
  color: var(--acc-strong); background: var(--acc-dim);
  padding: 1px 5px; border-radius: 4px;
}
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── header ────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: var(--mono);
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 1px;
}
.logo-sep { color: var(--acc); }
.logo-cursor {
  display: inline-block; width: 0.55em; height: 1.05em;
  margin-left: 4px; background: var(--acc);
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.head-nav { display: flex; gap: 6px; }
.head-nav a {
  padding: 7px 13px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--tx2);
  transition: color 0.15s, background 0.15s;
}
.head-nav a:hover { color: var(--tx); background: var(--bg2); }
.nav-count {
  display: inline-block; min-width: 19px; text-align: center;
  margin-left: 7px; padding: 0 5px;
  background: var(--acc); color: var(--acc-ink);
  border-radius: 999px; font-family: var(--mono); font-size: 11.5px;
  font-weight: 700; line-height: 19px; vertical-align: 1px;
}

/* ── hub hero ──────────────────────────────────────────────────── */
.hub-hero { padding: 58px 0 38px; max-width: 640px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em;
  color: var(--acc-strong); margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 12px; border: 1px solid var(--acc-line);
  border-radius: 999px; background: var(--acc-dim);
}
.hero-eyebrow::before { content: "❯"; }
.hub-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.22; letter-spacing: -0.028em; font-weight: 800;
}
.hero-sub {
  margin: 0; max-width: 34em;
  color: var(--tx2); font-size: clamp(15px, 1.6vw, 16.5px);
}

/* ── featured set card ─────────────────────────────────────────── */
.set-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 40px; align-items: center;
  margin: 8px 0 14px;
  padding: 36px 40px;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.set-eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--acc-strong);
}
.set-feature-name { margin: 0 0 4px; font-size: clamp(23px, 3vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.set-feature-name a:hover { color: var(--acc-strong); }
.set-feature-tag { margin: 0 0 14px; color: var(--acc-strong); font-weight: 650; font-size: 16px; }
.set-feature-hero { margin: 0 0 18px; color: var(--tx2); max-width: 36em; }
.feature-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 22px; padding: 0; list-style: none;
}
.feature-chips li {
  padding: 5px 12px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--tx2);
}
.set-feature-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.set-term { box-shadow: var(--shadow-lg); }

/* ── hub peek ──────────────────────────────────────────────────── */
.hub-peek { padding: 10px 0 26px; }
.peek-more {
  margin-left: auto;
  font-size: 13.5px; font-weight: 700; color: var(--acc-strong);
  white-space: nowrap;
}
.peek-more:hover { text-decoration: underline; }

/* ── buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--r-md);
  font-size: 14.5px; font-weight: 700; line-height: 1.3;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--acc); color: var(--acc-ink); box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: var(--acc-strong); }
.btn-ghost { border-color: var(--line); color: var(--tx2); background: var(--bg1); }
.btn-ghost:hover { border-color: var(--tx3); color: var(--tx); }
.btn-in-cart {
  background: var(--acc-dim); color: var(--acc-strong);
  border-color: var(--acc-line);
}
.btn-in-cart:hover { border-color: var(--acc); }
.btn-lg { padding: 13px 24px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ── badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--line); color: var(--tx2); background: var(--bg1);
}
.badge.b-cat { color: var(--acc-strong); border-color: var(--acc-line); background: var(--acc-dim); }
.badge.b-sudo { color: var(--ok); border-color: rgba(21, 128, 61, 0.28); background: rgba(21, 128, 61, 0.07); }

/* ── category section ──────────────────────────────────────────── */
.cat-section { padding: 14px 0 12px; }
.cat-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 22px 0 16px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.cat-head h2 {
  margin: 0;
  font-size: 19px; font-weight: 800; letter-spacing: -0.01em;
}
.cat-desc { color: var(--tx3); font-size: 13.5px; }
.cat-count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--tx3); }

/* ── product card ──────────────────────────────────────────────── */
.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--acc-line);
  box-shadow: var(--shadow-md);
}
/* 커버 = 다크 터미널 "상품 사진" */
.card-cover {
  position: relative; display: flex; align-items: flex-end;
  height: 128px; padding: 13px 16px;
  background:
    radial-gradient(rgba(255, 180, 84, 0.05) 1px, transparent 1.5px) 0 0 / 16px 16px,
    linear-gradient(160deg, #161c26, var(--term-bg) 80%);
  border-bottom: 1px solid var(--line);
}
/* 썸네일 — 도구의 시그니처 순간 정지 화면 */
.cover-thumb {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  width: 100%; min-width: 0; align-self: stretch;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6;
  color: var(--term-tx);
}
.cover-thumb .tl { white-space: nowrap; overflow: hidden; }

.cover-prompt {
  font-family: var(--mono); font-size: 15px; color: var(--term-tx);
  display: inline-flex; align-items: center; gap: 2px;
  min-width: 0;
}
.cover-prompt .ps1 { color: var(--term-amber); margin-right: 8px; }
.cover-prompt b { color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-cursor {
  display: inline-block; flex: none; width: 0.55em; height: 1.1em;
  margin-left: 3px; background: var(--term-amber);
  animation: blink 1.15s steps(1) infinite;
}
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.card-name { margin: 0; font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.card-name a:hover { color: var(--acc-strong); }
.card-tag { margin: -4px 0 0; color: var(--tx2); font-size: 14px; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: auto; padding-top: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--tx3);
}
.card-actions { display: flex; gap: 9px; margin-top: 4px; }
.card-actions .btn { flex: 1; }

/* ── crumbs ────────────────────────────────────────────────────── */
.crumb, .crumbs {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 24px 0 4px;
  font-family: var(--mono); font-size: 13px; color: var(--tx3);
}
.crumb:hover { color: var(--acc-strong); }
.crumbs { flex-wrap: wrap; }
.crumbs a:hover { color: var(--acc-strong); }
.crumb-sep { font-weight: 700; color: #c6cdd8; }
.crumb-here { color: var(--tx2); font-weight: 700; }

/* ── set detail head ───────────────────────────────────────────── */
.set-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 220px;
  gap: 36px; align-items: start;
  margin: 14px 0 10px;
  padding: 30px 34px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-sm);
}
.set-head h1 { margin: 0 0 4px; font-size: clamp(26px, 3.6vw, 34px); font-weight: 800; letter-spacing: -0.024em; }
.set-tagline { margin: 0 0 14px; color: var(--acc-strong); font-weight: 650; font-size: 16.5px; }
.set-desc p { margin: 0 0 10px; color: var(--tx2); max-width: 46em; }
.set-desc p:last-child { margin-bottom: 14px; }
.set-head .feature-chips { margin-bottom: 0; }
.set-head-side { display: grid; gap: 10px; }
.set-stat {
  display: flex; align-items: baseline; gap: 8px;
  padding: 12px 16px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.set-stat b { font-family: var(--mono); font-size: 18px; color: var(--tx); }
.set-stat span { font-size: 13px; color: var(--tx3); }

/* ── product detail — 커머스 상단 (미디어 + 구매 컬럼) ─────────── */
.pd-top {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px; align-items: start;
  padding: 14px 0 8px;
}
.pd-media { min-width: 0; }

.pd-buy {
  position: sticky; top: 84px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 0;
}
.pd-name { margin: 0 0 3px; font-family: var(--mono); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.pd-tagline { margin: 0 0 12px; color: var(--acc-strong); font-size: 14.5px; font-weight: 650; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pd-herotext { margin: 0 0 18px; color: var(--tx2); font-size: 13.5px; line-height: 1.7; }
.pd-buy .btn + .btn { margin-top: 9px; }
.pd-rows { display: grid; margin-top: 16px; border-top: 1px solid var(--line-soft); }
.pd-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 2px; border-bottom: 1px dashed var(--line-soft);
  font-size: 13px; color: var(--tx3);
}
.pd-row:last-child { border-bottom: 0; }
.pd-row b { font-family: var(--mono); font-weight: 600; color: var(--tx); text-align: right; }
.pd-row b a:hover { color: var(--acc-strong); }
.pd-row .ok { color: var(--ok); }

/* ── product detail — 하단 본문 ────────────────────────────────── */
.pd-body { max-width: 760px; padding-bottom: 72px; }
.sect-title {
  display: flex; align-items: center; gap: 10px;
  margin: 38px 0 16px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
}
.sect-title::before { content: "❯"; color: var(--acc); font-family: var(--mono); }

.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.highlights li {
  padding: 11px 15px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); font-size: 14.5px;
  box-shadow: var(--shadow-sm);
}
.description p { margin: 0 0 14px; color: var(--tx2); max-width: 46em; }
.description p:last-child { margin-bottom: 0; }

/* ── install box / code ────────────────────────────────────────── */
.install-box {
  margin-top: 10px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.install-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.install-head .badge { flex: none; }
.install-summary { font-size: 13.5px; color: var(--tx2); }
.codeblock { position: relative; margin: 0; }
.code-label {
  display: block; padding: 12px 18px 6px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--tx3); text-transform: uppercase;
}
/* 코드는 터미널 세계 — 다크 유지 */
.codeblock pre {
  margin: 0 18px 14px; padding: 13px 16px;
  background: var(--term-bg);
  border-radius: var(--r-md);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  color: var(--term-tx); overflow-x: auto;
}
.install-note {
  display: flex; gap: 9px;
  margin: 0 18px 16px; padding: 10px 14px;
  background: var(--acc-dim); border-left: 3px solid var(--acc);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13px; color: var(--tx2);
}
.note-tag { font-family: var(--mono); font-weight: 700; color: var(--acc-strong); flex: none; }
.install-cta { padding: 2px 18px 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════════
   터미널 세계 — 다크 유지. 창 크롬만 밝은 페이지와 어울리게.
   ════════════════════════════════════════════════════════════════ */
.term {
  position: relative;
  background: var(--term-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
/* 창 타이틀바 = 라이트 — 실물 창 스크린샷의 결 */
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px;
  background: linear-gradient(#fbfcfd, #f1f3f6);
  border-bottom: 1px solid var(--line);
}
.term-dots { display: inline-flex; gap: 6px; flex: none; }
.term-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #dde2ea;
}
.term-dots i:first-child { background: #f0857c; }
.term-dots i:nth-child(2) { background: #f3c469; }
.term-dots i:nth-child(3) { background: #7ed09a; }
.term-title {
  font-family: var(--mono); font-size: 12px; color: var(--tx3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.term-body {
  position: relative;
  padding: 14px 16px;
  background-image: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.012) 2px 3px);
  overflow-x: auto;
}
.term-screen {
  font-family: var(--mono); font-size: 14px; line-height: 1.55;
  color: var(--term-tx);
  height: calc(var(--rows, 12) * 1.55em);
  overflow: hidden;
}
.t-line { white-space: pre; min-height: 1.55em; }
.t-prompt .t-ps1 { color: var(--term-amber); font-weight: 700; margin-right: 0.6em; }
.t-cursor {
  display: inline-block; width: 0.55em; height: 1.1em;
  vertical-align: -0.15em; background: var(--term-amber);
  animation: blink 1.05s steps(1) infinite;
}

/* 터미널 내부 색 클래스 (데이터 스펙 계약 — 변경 금지) */
.c-dim { color: #5b6675; }
.c-acc { color: var(--term-amber); font-weight: 700; }
.c-ok  { color: var(--term-ok); }
.c-err { color: var(--term-err); }
.c-sel {
  display: inline-block; min-width: 100%;
  background: rgba(255, 180, 84, 0.13);
  box-shadow: inset 2px 0 0 var(--term-amber);
}
.c-inv {
  display: inline-block; min-width: 0.55em;
  background: var(--term-tx); color: var(--term-bg);
  animation: blink 1.05s steps(1) infinite;
}

/* 키캡 플래시 오버레이 */
.key-flash {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(10, 12, 15, 0.72), transparent 75%);
  transition: opacity 0.18s;
}
.key-flash.on { opacity: 1; }
.key-flash .kf {
  display: inline-flex; align-items: center; gap: 8px;
  transform: scale(0.85);
  transition: transform 0.22s var(--ease);
}
.key-flash.on .kf { transform: scale(1); }
.key-flash .kbd { font-size: 20px; padding: 8px 16px; box-shadow: 0 4px 0 #12161b, 0 10px 28px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.09); }
.key-flash .kplus { font-size: 18px; }

/* 리플레이 */
.term-replay {
  position: absolute; right: 10px; bottom: 10px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(23, 27, 33, 0.9); border: 1px solid var(--term-line);
  font-family: var(--mono); font-size: 12px; color: var(--term-tx);
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s var(--ease), color 0.15s, border-color 0.15s;
}
.term-replay.show { opacity: 1; pointer-events: auto; transform: none; }
.term-replay:hover { color: var(--term-amber); border-color: rgba(255, 180, 84, 0.4); }

/* ── keycap (다크 진열대 소품) ─────────────────────────────────── */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 5px 11px;
  background: linear-gradient(#2b323b, #1f252d);
  border: 1px solid #3a4250; border-radius: 7px;
  box-shadow: 0 3px 0 #12161b, inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: #e8eaee;
  transition: transform 0.1s, box-shadow 0.1s;
}
.kplus { color: #6b7684; font-family: var(--mono); margin: 0 2px; }
.keys-demo {
  display: grid; gap: 12px;
  padding: 22px 20px;
  background: var(--term-bg);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.keys-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: #161c26; border: 1px solid var(--term-line); border-radius: var(--r-md);
}
.keys-row:hover .kbd { transform: translateY(2px); box-shadow: 0 1px 0 #12161b, inset 0 1px 0 rgba(255,255,255,.08); }
.keys-combo { display: inline-flex; align-items: center; flex: none; }
.keys-effect { font-size: 14px; color: #a6afbc; }

/* ── before / after ────────────────────────────────────────────── */
.ba-toggle {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: 240px; margin: 0 auto 14px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px;
  box-shadow: var(--shadow-sm);
}
.ba-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: var(--acc); border-radius: 999px;
  transition: transform 0.28s var(--ease), background 0.28s;
}
.ba-toggle[data-idx="1"] .ba-thumb { transform: translateX(100%); }
.ba-toggle[data-idx="0"] .ba-thumb { background: var(--bg2); }
.ba-tab {
  position: relative; z-index: 1;
  padding: 6px 0; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--tx3);
  transition: color 0.2s;
}
.ba-toggle[data-idx="0"] .ba-tab:first-child { color: var(--tx); }
.ba-toggle[data-idx="1"] .ba-tab:last-child { color: var(--acc-ink); }
.ba-panes { display: grid; }
.ba-pane {
  grid-area: 1 / 1;
  padding: 14px 16px;
  font-family: var(--mono); font-size: 13px; line-height: 1.55; color: var(--term-tx);
  opacity: 0; transform: translateX(10px);
  transition: opacity 0.25s, transform 0.3s var(--ease);
  pointer-events: none;
  overflow-x: auto;
}
.ba-pane.active { opacity: 1; transform: none; pointer-events: auto; }
.ba-pane.active .t-line { animation: lineIn 0.32s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes lineIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}

/* ── demo gallery (커머스 미디어 뷰어) ─────────────────────────── */
.gallery-viewer { min-height: 120px; }
.gallery-caption {
  margin: 12px 2px 14px;
  font-size: 13.5px; color: var(--tx3);
}
.gallery-caption::before { content: "└ "; font-family: var(--mono); color: var(--acc); }
.gallery-thumbs {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.thumb {
  flex: 1 1 0; min-width: 150px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 10px 13px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
}
.thumb:hover { background: var(--bg2); transform: translateY(-1px); }
.thumb.active {
  border-color: var(--acc);
  background: var(--acc-dim);
}
.thumb-ic { font-family: var(--mono); font-size: 12px; color: var(--acc-strong); }
.thumb-t { font-size: 12.5px; font-weight: 650; color: var(--tx2); line-height: 1.4; }
.thumb.active .thumb-t { color: var(--tx); }

/* ── install gate ──────────────────────────────────────────────── */
.gate { padding: 6px 0 80px; max-width: 860px; margin: 0 auto; }
.gate .crumb { margin-bottom: 14px; }
.gate-head h1 { margin: 10px 0 8px; font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.gate-sub { margin: 0 0 30px; color: var(--tx2); }
.gate-sub b { color: var(--tx); }

.gate-items { display: grid; gap: 10px; margin-bottom: 34px; }
.gate-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.gate-item-name { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.gate-item-name a:hover { color: var(--acc-strong); }
.gate-item-meta { display: flex; gap: 7px; align-items: center; margin-left: auto; }
.gate-item-meta .badge { flex: none; }
.gate-remove {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--tx3); border: 1px solid transparent;
  font-size: 15px; line-height: 1;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.gate-remove:hover { color: var(--err); border-color: rgba(217, 45, 32, 0.3); background: rgba(217, 45, 32, 0.06); }

.gate-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.method {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 18px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.method:hover { border-color: var(--acc-line); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.method-ic {
  font-family: var(--mono); font-size: 13px; font-weight: 700; line-height: 1;
  color: var(--acc-strong);
  align-self: flex-start; padding: 5px 9px;
  background: var(--acc-dim); border-radius: var(--r-sm);
}
.method h3 { margin: 0; font-size: 15.5px; font-weight: 750; }
.method p { margin: 0; font-size: 13px; color: var(--tx3); flex: 1; }
.method .btn { width: 100%; }
.method-pre {
  margin: 0; padding: 10px 12px;
  background: var(--term-bg); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--term-tx);
  white-space: pre-wrap; word-break: break-all;
}
.gate-preview { margin-top: 26px; }
.gate-preview summary {
  cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--tx3);
  padding: 8px 2px; user-select: none;
}
.gate-preview summary:hover { color: var(--acc-strong); }
.gate-preview .codeblock pre { margin: 10px 0 0; }
.gate-empty {
  padding: 60px 24px; text-align: center;
  background: var(--bg1); border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.gate-empty p { color: var(--tx2); margin: 0 0 20px; }
.gate-empty .empty-glyph { font-family: var(--mono); font-size: 34px; color: var(--tx3); display: block; margin-bottom: 12px; }

/* ── cart bar ──────────────────────────────────────────────────── */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.08);
  animation: cartIn 0.3s var(--ease);
}
@keyframes cartIn { from { transform: translateY(100%); } }
.cartbar-inner { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.cartbar-count { flex: none; font-size: 14px; color: var(--tx2); }
.cartbar-count b { font-family: var(--mono); font-size: 16px; color: var(--acc-strong); }
.cartbar-names {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 12.5px; color: var(--tx3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.has-cartbar { padding-bottom: 74px; }

/* ── toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 92px; z-index: 70;
  transform: translateX(-50%);
  padding: 11px 20px;
  background: #1f2430; color: #f4f6f9;
  border-radius: 999px; box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 600;
  animation: toastIn 0.25s var(--ease);
}
.toast::before { content: "✓ "; color: var(--term-ok); font-weight: 800; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── footer ────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); margin-top: 60px; background: var(--bg1); }
.foot-inner {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline;
  padding-top: 26px; padding-bottom: 34px;
}
.foot-logo { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.foot-note { font-size: 12.5px; color: var(--tx3); }

/* ── not found ─────────────────────────────────────────────────── */
.notfound { padding: 90px 0; text-align: center; }
.notfound h1 { font-family: var(--mono); font-size: 40px; margin: 0 0 10px; }
.notfound p { color: var(--tx2); margin: 0 0 24px; }

/* ── responsive ────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .pd-top { grid-template-columns: 1fr; gap: 18px; }
  .pd-buy { position: static; order: -1; margin-top: 10px; }
  .set-head { grid-template-columns: 1fr; gap: 18px; }
  .set-head-side { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .set-feature { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; }
  .set-term { max-width: 560px; }
  .gate-methods { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .set-head-side { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .head-inner { height: 54px; }
  .logo { font-size: 15.5px; }
  .head-nav a { padding: 6px 9px; font-size: 13px; }
  .hub-hero { padding: 38px 0 26px; }
  .set-feature { padding: 22px 18px; }
  .set-feature-cta .btn { flex: 1; }
  .set-head { padding: 22px 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .term-screen, .ba-pane { font-size: 11.5px; }
  .cartbar-names { display: none; }
  .gate-item { flex-wrap: wrap; }
  .gate-item-meta { margin-left: 0; width: 100%; }
  .gate-item .gate-remove { margin-left: auto; order: -1; }
  .codeblock pre { margin: 0 12px 12px; }
  .install-note { margin: 0 12px 14px; }
}

/* ── reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
  .logo-cursor, .cover-cursor, .t-cursor, .c-inv { animation: none !important; }
}
