/* AnaExchange 홈페이지 스타일
   - 색은 모두 :root 변수로 정의하고 다크 모드에서 다시 정의한다.
   - 상승(매수) 빨강, 하락(매도) 파랑 (한국 관례). */

:root {
  color-scheme: light;
  --bg: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceff3;
  --border: #e1e5ea;
  --text: #1a1e24;
  --text-muted: #6a7380;
  --brand: #0e8f7e;
  --brand-strong: #0a7466;
  --brand-contrast: #ffffff;
  --rise: #d23f3f;
  --rise-bg: rgba(210, 63, 63, 0.08);
  --rise-soft: rgba(210, 63, 63, 0.35);
  --fall: #2d6bd2;
  --fall-bg: rgba(45, 107, 210, 0.08);
  --fall-soft: rgba(45, 107, 210, 0.35);
  --ok: #138a52;
  --error: #c62f2f;
  --grid: #eef0f3;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --radius: 8px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1217;
    --surface: #151a21;
    --surface-2: #1b2129;
    --surface-3: #232a34;
    --border: #29313c;
    --text: #e5e8ec;
    --text-muted: #8c95a2;
    --brand: #23b3a0;
    --brand-strong: #39c7b4;
    --brand-contrast: #06201c;
    --rise: #f05d5d;
    --rise-bg: rgba(240, 93, 93, 0.10);
    --rise-soft: rgba(240, 93, 93, 0.40);
    --fall: #4f8ff7;
    --fall-bg: rgba(79, 143, 247, 0.10);
    --fall-soft: rgba(79, 143, 247, 0.40);
    --ok: #3ac27e;
    --error: #ff6b6b;
    --grid: #1e252e;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1217;
  --surface: #151a21;
  --surface-2: #1b2129;
  --surface-3: #232a34;
  --border: #29313c;
  --text: #e5e8ec;
  --text-muted: #8c95a2;
  --brand: #23b3a0;
  --brand-strong: #39c7b4;
  --brand-contrast: #06201c;
  --rise: #f05d5d;
  --rise-bg: rgba(240, 93, 93, 0.10);
  --rise-soft: rgba(240, 93, 93, 0.40);
  --fall: #4f8ff7;
  --fall-bg: rgba(79, 143, 247, 0.10);
  --fall-soft: rgba(79, 143, 247, 0.40);
  --ok: #3ac27e;
  --error: #ff6b6b;
  --grid: #1e252e;
  --shadow: none;
}

/* ------------------------------------------------------------ 기본 */

*, *::before, *::after { box-sizing: border-box; }

/* hidden 속성은 클래스의 display 지정보다 항상 우선한다 (버튼·flex 패널 숨김) */
[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, p { margin: 0; }
h2 { font-size: 14px; font-weight: 700; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.rise { color: var(--rise); }
.fall { color: var(--fall); }
.even { color: var(--text); }

/* ------------------------------------------------------------ 상단 바 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 15px;
}

.topnav { display: flex; gap: 16px; }
.topnav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.topnav a.active { color: var(--text); border-bottom-color: var(--brand); }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.conn .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.conn[data-state="open"] .dot { background: var(--ok); }
.conn[data-state="closed"] .dot { background: var(--error); }
.conn[data-state="connecting"] .dot { animation: pulse 1s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.3; } }

.account {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* ------------------------------------------------------------ 버튼 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-buy { background: var(--rise); color: #fff; }
.btn-sell { background: var(--fall); color: #fff; }
.btn-buy:hover:not(:disabled), .btn-sell:hover:not(:disabled) { filter: brightness(1.06); }
.btn-block { width: 100%; height: 44px; font-size: 15px; }
.btn-small { height: 26px; padding: 0 10px; font-size: 12px; background: var(--surface-2); border-color: var(--border); }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 16px;
  line-height: 1;
}

/* ------------------------------------------------------------ 레이아웃 */

.page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px;
}

.view[hidden] { display: none; }

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.empty {
  padding: 24px 8px;
  text-align: center;
  color: var(--text-muted);
}

.status-line { color: var(--text-muted); }
.status-line.error { color: var(--error); }

/* ------------------------------------------------------------ 시세 헤더 */

.market-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.mh-title { display: flex; align-items: baseline; gap: 8px; }
.mh-title h1 { font-size: 20px; font-weight: 800; }

.mh-price { display: flex; flex-direction: column; }
.mh-price strong { font-size: 26px; font-weight: 800; line-height: 1.15; }
.mh-price span { font-size: 13px; }

.mh-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 4px 24px;
  margin: 0 0 0 auto;
}
.mh-stats div { display: flex; flex-direction: column; }
.mh-stats dt { font-size: 12px; color: var(--text-muted); }
.mh-stats dd { margin: 0; font-weight: 600; }

/* ------------------------------------------------------------ 차트 */

.chart-wrap { position: relative; }
.chart { height: 380px; width: 100%; }
.chart-notice {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 6px;
}
.chart-notice[hidden] { display: none; }

/* ------------------------------------------------------------ 호가 */

.book-cols, .trade-cols {
  display: grid;
  padding: 0 8px 4px;
  border-bottom: 1px solid var(--border);
}
.book-cols { grid-template-columns: 1fr 1fr; }
.book-cols span:last-child { text-align: right; }

.orderbook { display: flex; flex-direction: column; }

.book-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-bottom: 1px solid var(--surface);
  text-align: left;
  overflow: hidden;
}
.book-row.ask { background: var(--fall-bg); }
.book-row.bid { background: var(--rise-bg); }
.book-row:hover { filter: brightness(0.97); }
.book-row .bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  right: 0;
  opacity: 0.25;
  border-radius: 2px 0 0 2px;
  pointer-events: none;
}
.book-row.ask .bar { background: var(--fall); }
.book-row.bid .bar { background: var(--rise); }
.book-row .price { position: relative; font-weight: 700; }
.book-row .qty { position: relative; text-align: right; }

.book-mid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

/* ------------------------------------------------------------ 주문 패널 */

.order-form { display: flex; flex-direction: column; gap: 10px; }

.side-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.side-tab {
  height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
}
.side-tab.buy.active { color: var(--rise); border-bottom-color: var(--rise); }
.side-tab.sell.active { color: var(--fall); border-bottom-color: var(--fall); }

.type-tabs { display: flex; gap: 6px; }
.type-tab {
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}
.type-tab.active { background: var(--surface-3); border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 4px; }
.label { font-size: 12px; color: var(--text-muted); }

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.field-row .num { text-align: right; overflow-wrap: anywhere; }
.total-row { padding-top: 8px; border-top: 1px dashed var(--border); }

input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
input:focus { border-color: var(--brand); outline: none; }
input.flash { animation: flash 0.6s ease; }
@keyframes flash { 0% { background: var(--surface-3); } 100% { background: var(--surface-2); } }

.stepper { display: grid; grid-template-columns: minmax(0, 1fr) 38px 38px; gap: 4px; }
.step-btn {
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 18px;
  line-height: 1;
}

.pct-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pct-btn {
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
}
.pct-btn:hover { background: var(--surface-2); }

.hint { min-height: 1em; }
.form-message { min-height: 1.2em; font-size: 13px; overflow-wrap: anywhere; }
.form-message.error { color: var(--error); }
.form-message.ok { color: var(--ok); }


/* ------------------------------------------------------------ 체결 */

.trade-cols { grid-template-columns: 1fr 1fr 1fr; }
.trade-cols span:not(:first-child) { text-align: right; }
.trades { max-height: 520px; overflow-y: auto; }
.trade-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 8px;
  border-bottom: 1px solid var(--surface-2);
}
.trade-row span:not(:first-child) { text-align: right; }

/* ------------------------------------------------------------ 내 주문·자산 */

.mine-head { align-items: center; flex-wrap: wrap; }
.mine-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.mine-tab {
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
}
.mine-tab.active { background: var(--surface-3); color: var(--text); }

.mine-body { min-height: 120px; }
.login-prompt { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.data-table th { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.data-table .num { text-align: right; }
.data-table .action { text-align: right; }

.asset-summary { margin-bottom: 8px; }

/* ------------------------------------------------------------ 바닥글·대화상자·알림 */

.footer { text-align: center; padding: 16px; }

.dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.dialog-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.dialog-body h2 { font-size: 18px; }
.dialog-body input { text-align: left; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
.toast {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}
.toast.ok { background: var(--ok); color: #fff; }
.toast.error { background: var(--error); color: #fff; }

/* ------------------------------------------------------------ v2 공통 요소 */

.link { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--brand); }
.footer a { color: inherit; }

.text-left { text-align: left; }

textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font: inherit;
  color: inherit;
  resize: vertical;
}
textarea:focus { border-color: var(--brand); outline: none; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}
.badge-sub { background: rgba(14, 143, 126, 0.14); color: var(--brand); }
.badge-listed { background: var(--rise-bg); color: var(--rise); }
.badge-halting { background: rgba(214, 138, 0, 0.16); color: #b26b00; }
.badge-liquidated { background: var(--surface-3); color: var(--text-muted); }
.badge-unknown { background: var(--surface-3); color: var(--text-muted); }
:root[data-theme="dark"] .badge-halting { color: #f0b04a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-halting { color: #f0b04a; }
}

.progress {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.info-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; }
.info-list dt { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.info-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.info-list.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }

.sub-title { font-size: 13px; font-weight: 700; margin: 16px 0 6px; }
.notice {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border-left: 3px solid var(--fall);
}
.description { white-space: pre-line; overflow-wrap: anywhere; margin-bottom: 4px; }
.preview { color: var(--text-muted); min-height: 1.2em; }
.preview.error { color: var(--error); }

/* ------------------------------------------------------------ 상품 목록 */

.list-hero { padding: 12px 4px 16px; }
.list-hero h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.list-toolbar .search { width: min(320px, 100%); margin: 0; }

.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-tab {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
}
.filter-tab.active { background: var(--text); color: var(--surface); border-color: var(--text); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-name { margin: 0; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.pc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.pc-price strong { font-size: 20px; font-weight: 800; }
.pc-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.pc-stats div { display: flex; flex-direction: column; min-width: 0; }
.pc-stats dt { font-size: 12px; color: var(--text-muted); }
.pc-stats dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pc-progress { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }

/* ------------------------------------------------------------ 상품 상세 */

.back-link {
  display: inline-block;
  margin: 0 0 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}
.back-link:hover { color: var(--text); }

.detail-layout {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 360px;
  grid-template-areas:
    "head   head   head   side"
    "chart  chart  chart  side"
    "book   order  trades side"
    "divs   divs   divs   side";
}
.detail-layout .market-head { grid-area: head; }
.detail-layout .detail-side { grid-area: side; }
.detail-layout .chart-panel { grid-area: chart; }
.detail-layout .book-panel { grid-area: book; }
.detail-layout .order-panel { grid-area: order; }
.detail-layout .trades-panel { grid-area: trades; }
.detail-layout .dividends-panel { grid-area: divs; }

.detail-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* 청약 중·정보만: 거래 영역을 숨기고 2열로 */
.detail-layout:not([data-mode="trade"]) {
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas:
    "head side"
    "divs side";
}
.detail-layout:not([data-mode="trade"]) .order-only,
.detail-layout:not([data-mode="trade"]) .trade-only { display: none; }
.detail-layout[data-mode="subscription"] .trade-section,
.detail-layout[data-mode="info"] .trade-section { display: none; }

/* 청산중·청산완료: 지난 차트와 체결은 보여 준다 */
.detail-layout[data-mode="closed"] {
  grid-template-areas:
    "head   side"
    "chart  side"
    "trades side"
    "divs   side";
}

.market-head .mh-title { flex-wrap: wrap; }
.market-head .mh-stats { grid-template-columns: repeat(4, auto); }
.mh-price #mh-price-label { line-height: 1.2; }

.sub-panel .progress { margin: 4px 0; }
.sub-panel .order-form { margin-top: 8px; }

/* ------------------------------------------------------------ 내 자산 */

.me-layout { display: flex; flex-direction: column; gap: 8px; }
.me-layout[hidden] { display: none; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
.summary-grid div { display: flex; flex-direction: column; min-width: 0; }
.summary-grid dt { font-size: 12px; color: var(--text-muted); }
.summary-grid dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.summary-grid #me-total { font-size: 20px; }
.login-prompt[hidden] { display: none; }

/* ------------------------------------------------------------ 반응형 */

@media (max-width: 1279px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "head   head"
      "side   side"
      "chart  chart"
      "book   order"
      "trades trades"
      "divs   divs";
  }
  .detail-layout:not([data-mode="trade"]) {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "head side"
      "divs side";
  }
  .detail-layout[data-mode="closed"] {
    grid-template-areas:
      "head   side"
      "chart  side"
      "trades side"
      "divs   side";
  }
  .trades { max-height: 260px; }
  .market-head .mh-stats { grid-template-columns: repeat(2, auto); }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .conn #ws-status-text { display: none; }
  .account { display: none; }
  .brand-name { display: none; }

  .page { padding: 8px 16px; }
  .detail-layout,
  .detail-layout:not([data-mode="trade"]),
  .detail-layout[data-mode="closed"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "side" "chart" "order" "book" "trades" "divs";
  }
  .chart { height: 280px; }
  .market-head .mh-stats { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .mh-price strong { font-size: 22px; }
  .trades { max-height: 240px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ v2.1 상품군 */

.nav-groups {
  display: flex;
  gap: 16px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-groups::-webkit-scrollbar { display: none; }
.nav-group {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-group.active { color: var(--text); border-bottom-color: var(--brand); }
.nav-group.hidden-group { font-style: italic; }
.topnav { min-width: 0; }
.topnav > a { white-space: nowrap; }

.crumbs { color: var(--text-muted); margin: 4px 4px 8px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.group-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.group-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.gc-name { margin: 0; font-size: 20px; font-weight: 800; overflow-wrap: anywhere; }
.gc-desc { white-space: pre-line; overflow-wrap: anywhere; }
.gc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--border); }
.gc-stats div { display: flex; flex-direction: column; }
.gc-stats dt { font-size: 12px; color: var(--text-muted); }
.gc-stats dd { margin: 0; font-weight: 700; font-size: 16px; }
.gc-go { color: var(--brand); font-weight: 700; margin-top: 4px; }

@media (max-width: 768px) {
  .topnav { gap: 12px; overflow-x: auto; }
  .nav-groups { gap: 12px; }
}

/* ------------------------------------------------------------ v3 회원: 로그인 창 · 가입 · 인증 · 재설정 */

.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form input { text-align: left; }
.auth-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { text-decoration-color: var(--brand); }
.link-btn.muted { color: var(--text-muted); }

.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.check input { width: auto; height: auto; }

.auth-view { display: flex; justify-content: center; padding: 24px 0; }
.auth-panel { width: min(440px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.auth-title { font-size: 20px; }
.auth-result { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agree-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
}
.agree-box p { margin: 0 0 4px 22px; }
.me-zero-notice { margin-top: 10px; }

/* ------------------------------------------------------------ 약관 (#/terms, #/privacy, v3.1) */

.legal-doc { max-width: 760px; margin: 0 auto; line-height: 1.7; }
.legal-doc h1 { font-size: 22px; margin: 0 0 4px; }
.legal-doc h2 { font-size: 16px; margin: 24px 0 8px; }
.legal-doc p, .legal-doc li { font-size: 14px; }
.legal-doc ol, .legal-doc ul { padding-left: 22px; margin: 0 0 8px; }
.legal-doc ol ol { list-style: lower-alpha; margin-top: 4px; }
.legal-table { width: 100%; margin: 8px 0 12px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; font-size: 13px; }
.legal-company {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  margin: 24px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 13px;
}
.legal-company dt { color: var(--text-muted); }
.legal-company dd { margin: 0; }
.footer a { text-decoration: underline; }
@media (max-width: 600px) {
  .legal-table { display: block; overflow-x: auto; }
}

/* ============================================================ 랜딩 첫 화면 (v3.2, ARCHITECTURE 9.16)
   - 첫 화면 배경은 테마와 관계없이 어둡다(영상 화면처럼).
   - 장면 3개가 18초 주기로 6초씩 바뀐다. 장면마다 --d(시작 지연 0/6/12초, fill-mode backwards)를 두고
     안쪽 움직임·자막·진행 막대도 같은 지연을 써서 장면이 나타날 때마다 처음부터 다시 그려진다.
   - 움직임은 transform·opacity·stroke만 쓴다(GPU 합성). prefers-reduced-motion이면 모두 멈춘다. */

.home-view { display: flex; flex-direction: column; gap: 40px; }

.hero {
  --hero-ink: #f3f7f9;
  --hero-muted: rgba(225, 236, 240, 0.78);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100vw;
  margin: -12px calc(50% - 50vw) 0;
  min-height: clamp(560px, 88vh, 860px);
  display: flex;
  align-items: flex-start;
  background: #060c12;
  color: var(--hero-ink);
}

.hero-stage { position: absolute; inset: 0; z-index: -1; }
.scene {
  --d: 0s;
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: hero-scene 18s var(--d) linear infinite;
  will-change: opacity, transform;
}
.scene-road { --d: 0s; }
.scene-mint { --d: 6s; }
.scene-chart { --d: 12s; background: radial-gradient(ellipse at 70% 40%, #0f2a33 0%, #060c12 70%); }
.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

@keyframes hero-scene {
  0% { opacity: 0; transform: scale(1.06); }
  4% { opacity: 1; }
  33.3% { opacity: 1; }
  38% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

/* ① 도로 */
.skyline { animation: hero-skyline 80s linear infinite; }
@keyframes hero-skyline { to { transform: translateX(-1600px); } }
.lane { animation: hero-lane 0.9s linear infinite; }
.lane-2 { animation-duration: 0.7s; }
@keyframes hero-lane { to { stroke-dashoffset: 120; } }
.car-fill-a { fill: #f2f5f7; }
.car-fill-b { fill: #23b3a0; }
.car-fill-c { fill: #f05d5d; }
.car-a { animation: hero-car-a 9s linear infinite; }
.car-b { animation: hero-car-b 7s -2.5s linear infinite; }
/* car-c는 car-a와 같은 차로·같은 속도로 반 주기 뒤를 달린다(겹치지 않게) */
.car-c { animation: hero-car-c 9s -4.5s linear infinite; }
@keyframes hero-car-a { from { transform: translate(-420px, 652px) scale(1.1); } to { transform: translate(1720px, 652px) scale(1.1); } }
@keyframes hero-car-b { from { transform: translate(-560px, 764px) scale(1.4); } to { transform: translate(1800px, 764px) scale(1.4); } }
@keyframes hero-car-c { from { transform: translate(-420px, 652px) scale(1.1); } to { transform: translate(1720px, 652px) scale(1.1); } }
.wheel { animation: hero-wheel 0.5s linear infinite; }
@keyframes hero-wheel { to { transform: rotate(360deg); } }
.coin { animation: hero-coin 2.4s ease-out infinite; opacity: 0; }
.coin-2 { animation-delay: 1.2s; }
@keyframes hero-coin {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-110px); opacity: 0; }
}
.svg-tag { font: 700 17px var(--font); fill: #fff; }
.svg-tag-sm { font-size: 15px; }
.svg-coin { font: 800 17px var(--font); fill: #7a5200; }
.svg-coin-sm { font-size: 14px; }

/* ② 상품 만들기 */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hero-draw 18s var(--d) ease-out infinite; }
.draw-late { animation-name: hero-draw-late; }
@keyframes hero-draw { 0% { stroke-dashoffset: 1; } 12%, 100% { stroke-dashoffset: 0; } }
@keyframes hero-draw-late { 0%, 5% { stroke-dashoffset: 1; } 15%, 100% { stroke-dashoffset: 0; } }
.scene-mint .draw, .scene-mint .draw-late { --d: 6s; }
.flow { animation: hero-flow 1s linear infinite; }
@keyframes hero-flow { to { stroke-dashoffset: -22; } }
.mint-tile { transform-box: fill-box; transform-origin: center; animation: hero-tile 18s linear infinite; }
@keyframes hero-tile {
  0%, 10% { opacity: 0; transform: scale(0.3); }
  14%, 36% { opacity: 1; transform: scale(1); }
  38%, 100% { opacity: 0; transform: scale(1); }
}
.mint-card { animation: hero-card 18s 6s ease-out infinite; }
@keyframes hero-card { 0%, 8% { opacity: 0; } 14%, 100% { opacity: 1; } }
.mint-bar { transform-box: fill-box; transform-origin: left center; animation: hero-bar 18s 6s ease-out infinite; }
@keyframes hero-bar { 0%, 14% { transform: scaleX(0); } 30%, 100% { transform: scaleX(0.78); } }
.svg-dim { font: 500 9px var(--font); fill: #39c7b4; opacity: 0.8; }
.svg-card-title { font: 800 24px var(--font); fill: #f3f7f9; }
.svg-card-text { font: 500 18px var(--font); fill: #9fb4bb; }
.svg-card-strong { font: 800 20px var(--font); fill: #39c7b4; }

/* ③ 거래소 차트 */
.hero-chart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-book {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(9, 18, 24, 0.72);
  border: 1px solid rgba(80, 120, 130, 0.35);
  backdrop-filter: blur(6px);
  font-size: 12px;
  color: #c8d6dc;
}
.hb-title { font-weight: 700; margin-bottom: 8px; color: #f3f7f9; }
.hb-side { display: flex; flex-direction: column; gap: 3px; }
.hb-row { position: relative; display: flex; justify-content: space-between; padding: 2px 6px; font-variant-numeric: tabular-nums; }
.hb-row i { position: absolute; inset: 0 0 0 auto; border-radius: 3px; transition: width 0.5s ease; }
.hb-asks .hb-row i { background: rgba(79, 143, 247, 0.22); }
.hb-bids .hb-row i { background: rgba(240, 93, 93, 0.22); }
.hb-row span { position: relative; }
.hb-asks .hb-row span:first-child { color: #6fa4ff; }
.hb-bids .hb-row span:first-child { color: #ff7b7b; }
.hb-price { margin: 8px 0; text-align: center; font-size: 18px; font-weight: 800; color: #ff7b7b; font-variant-numeric: tabular-nums; }

/* 실제 영상 (config.heroVideo가 있을 때만) */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.hero-stage.has-video .hero-video { opacity: 1; }

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 9, 13, 0.82) 0%, rgba(4, 9, 13, 0.55) 34%, rgba(4, 9, 13, 0.08) 62%, rgba(4, 9, 13, 0) 100%),
    linear-gradient(180deg, rgba(4, 9, 13, 0.25) 0%, rgba(4, 9, 13, 0) 30%, rgba(4, 9, 13, 0) 85%, rgba(4, 9, 13, 0.45) 100%);
}

/* 문구 */
.hero-content {
  position: relative;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 88px) 24px 200px;
}
.hero-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(57, 199, 180, 0.45);
  background: rgba(14, 143, 126, 0.16);
  color: #7fe3d4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero-title {
  max-width: 640px;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
  word-break: keep-all;
}
.hero-accent {
  background: linear-gradient(90deg, #39c7b4, #8be9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  max-width: 520px;
  margin-top: 20px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--hero-muted);
  word-break: keep-all;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-hero, .btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-hero { border: 0; background: #23b3a0; color: #04201c; box-shadow: 0 10px 30px rgba(35, 179, 160, 0.35); }
.btn-hero:hover { background: #39c7b4; transform: translateY(-1px); }
.btn-hero-ghost { border: 1px solid rgba(255, 255, 255, 0.45); color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-hero-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 12px 36px;
  margin: 44px 0 0;
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats dt { font-size: 13px; color: var(--hero-muted); }
.hero-stats dd { margin: 0; font-size: 28px; font-weight: 900; color: #fff; }

/* 장면 설명과 진행 막대 (영상 자막처럼) */
.hero-captions {
  position: absolute;
  right: max(24px, calc(50% - 600px));
  top: 24px;
  width: min(360px, calc(100% - 48px));
  height: 52px;
}
.hero-caption {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  font-weight: 600;
  color: #e6f1f4;
  text-align: right;
  animation: hero-caption 18s var(--d) ease-out infinite;
}
.cap-no { color: #39c7b4; font-weight: 900; margin-right: 6px; }
.cap-road { --d: 0s; }
.cap-mint { --d: 6s; }
.cap-chart { --d: 12s; }
@keyframes hero-caption {
  0% { opacity: 0; transform: translateY(8px); }
  5%, 31% { opacity: 1; transform: translateY(0); }
  35%, 100% { opacity: 0; transform: translateY(-6px); }
}
.hero-progress { position: absolute; left: 0; right: 0; top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hp { position: relative; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.hp::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #39c7b4;
  transform-origin: left center;
  transform: scaleX(0);
  animation: hero-progress 18s var(--d) linear infinite;
}
.hp-road { --d: 0s; }
.hp-mint { --d: 6s; }
.hp-chart { --d: 12s; }
@keyframes hero-progress { 0% { transform: scaleX(0); } 33.3% { transform: scaleX(1); } 33.4%, 100% { transform: scaleX(0); } }

/* 실시간 시세 띠 */
.home-ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -40px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.ht-label {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--rise-bg);
  color: var(--rise);
  font-size: 12px;
  font-weight: 800;
}
.ht-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ht-track { display: flex; width: max-content; animation: hero-ticker 40s linear infinite; }
.ht-track:hover, .ht-track:focus-within { animation-play-state: paused; }
@keyframes hero-ticker { to { transform: translateX(-50%); } }
.ht-item { margin-right: 32px; display: inline-flex; gap: 8px; align-items: baseline; white-space: nowrap; color: var(--text); text-decoration: none; font-size: 13px; }
.ht-item strong { font-variant-numeric: tabular-nums; }

/* 섹션 공통 */
.section-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 900; letter-spacing: -0.01em; }
.section-sub { margin: 6px 0 16px; }

/* 섹션 머리말 */
.section-head { margin-bottom: 20px; }
.section-eyebrow { margin-bottom: 6px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: 0.04em; }
.section-head .section-sub { margin: 8px 0 0; font-size: 15px; }

/* 투자 흐름: 그림 카드 4장 + 단계 사이 화살표 */
.how, .home-groups, .home-risk { width: min(1200px, 100%); margin-left: auto; margin-right: auto; }
.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  counter-reset: none;
}
.how-step {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.how-step:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(16, 24, 40, 0.12); }
/* 단계 사이 화살표 (넓은 화면) */
.how-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 78px;
  right: -17px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--brand);
  border-right: 3px solid var(--brand);
  transform: rotate(45deg);
  opacity: 0.7;
}
.how-figure { overflow: hidden; border-radius: 17px 17px 0 0; aspect-ratio: 16 / 10; background: var(--surface-2); }
.how-figure img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.how-step:hover .how-figure img { transform: scale(1.04); }
.how-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.how-chip {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.how-body h3 { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.how-body p { margin: 0; color: var(--text-muted); line-height: 1.65; word-break: keep-all; }

/* 상품군 카드 (첫 화면): 위 그림 + 아래 설명. 하나뿐이면 옆으로 놓는다 */
.home-groups .group-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; }
.home-groups .group-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.home-groups .group-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(16, 24, 40, 0.12); }
.gc-media { aspect-ratio: 16 / 7.5; overflow: hidden; background: var(--surface-2); }
.gc-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.group-card:hover .gc-media img { transform: scale(1.04); }
.gc-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.home-groups .gc-name { font-size: 22px; }
.home-groups .gc-desc { line-height: 1.65; word-break: keep-all; }
.home-groups .gc-go {
  align-self: flex-start;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 14px;
  font-weight: 800;
}
.home-groups .group-card:hover .gc-go { background: var(--brand-strong); }
.home-groups .group-grid.single { grid-template-columns: 1fr; }
.group-grid.single .group-card { flex-direction: row; align-items: stretch; }
.group-grid.single .gc-media { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; }
.group-grid.single .gc-body { flex: 1; justify-content: center; padding: 32px 36px; }
.group-grid.single .gc-name { font-size: 28px; }

.home-risk { padding: 0 4px 8px; }
.home-groups { scroll-margin-top: 72px; }
.home-risk a { color: var(--brand); }

@media (max-width: 900px) {
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-step:nth-child(2)::after { display: none; }
  .group-grid.single .group-card { flex-direction: column; }
  .group-grid.single .gc-media { flex: none; aspect-ratio: 16 / 7.5; min-height: 0; }
  .group-grid.single .gc-body { padding: 20px 22px 22px; }
  .hero-book { display: none; }
  /* 좁은 화면: 문구가 있는 위쪽만 어둡게, 아래쪽 장면은 보이게 */
  .hero-shade { background: linear-gradient(180deg, rgba(4, 9, 13, 0.6) 0%, rgba(4, 9, 13, 0.75) 55%, rgba(4, 9, 13, 0.15) 75%, rgba(4, 9, 13, 0.35) 100%); }
}
@media (max-width: 600px) {
  .hero { min-height: 620px; }
  .hero-content { padding: 48px 16px 112px; }
  .hero-stats { grid-template-columns: repeat(2, max-content); gap: 12px 28px; margin-top: 32px; }
  .hero-stats dd { font-size: 22px; }
  .hero-captions { right: 16px; width: calc(100% - 32px); top: auto; bottom: 16px; }
  .hero-progress { top: auto; bottom: 0; }
  /* 좁은 화면: 2열 카드(그림 전체가 보이게), 글씨를 줄인다 */
  .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .how-step::after { display: none; }
  .how-step { border-radius: 14px; }
  .how-figure { border-radius: 13px 13px 0 0; }
  .how-body { padding: 12px 12px 14px; gap: 4px; }
  .how-chip { font-size: 10px; padding: 2px 7px; }
  .how-body h3 { font-size: 16px; margin-top: 2px; }
  .how-body p { font-size: 12.5px; line-height: 1.55; }
  .btn-hero, .btn-hero-ghost { flex: 1 1 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero *, .hero *::after, .ht-track { animation: none !important; transition: none !important; }
  .scene-road, .cap-road { opacity: 1; }
  .scene-mint, .scene-chart, .cap-mint, .cap-chart { opacity: 0; }
  .car-a { transform: translate(260px, 662px) scale(0.85); }
  .car-b { transform: translate(760px, 742px); }
  .car-c { transform: translate(1100px, 822px) scale(1.15); }
  .hp-road::after { transform: scaleX(1); }
}
/* 첫 화면이 아닐 때·탭이 숨겨졌을 때는 움직임을 멈춘다 (js/landing.js) */
.hero.paused *, .hero.paused *::after { animation-play-state: paused !important; }
/* 지연 전에는 첫 키프레임(숨김) 상태로 둔다: 첫 화면에 들어올 때 다른 장면이 겹쳐 보이지 않게 (리뷰 v3.2 L1) */
.scene, .draw, .mint-tile, .mint-card, .mint-bar, .hero-caption, .hp::after { animation-fill-mode: backwards; }
