:root {
  --bg: #eceff3;
  --panel: #f7f8fa;
  --panel-2: #eef1f5;
  --line: #c5ceda;
  --text: #020617;
  --muted: #334155;
  --accent: #1d4ed8;
  --accent-2: #047857;
  --warn: #b45309;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --touch: 44px;
}

/* 관리자도 밝은 UI (사이트와 동일 계열) */
.admin-page {
  --bg: #eceff3;
  --panel: #ffffff;
  --panel-2: #f1f5f9;
  --line: #cbd5e1;
  --text: #020617;
  --muted: #334155;
  --accent: #1d4ed8;
  --accent-2: #047857;
  --warn: #b45309;
  --danger: #b91c1c;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}
html, body { margin: 0; padding: 0; overflow-x: clip; max-width: 100%; }
body {
  font-family: Sora, Outfit, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.panel {
  background: var(--panel);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
}
/* 관리자 콘솔: 화면 폭 최대한 사용 (노드 공급 표가 한쪽에 몰리지 않게) */
.admin-page .container {
  width: min(1680px, 100%);
}

/* ── Topbar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.admin-page .topbar {
  background: rgba(247, 248, 250, 0.96);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
  position: relative;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.nav a, .nav button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}
/* .nav a { display:inline-flex } 가 HTML hidden 을 덮어써서 관리자/로그아웃이 보이던 버그 수정 */
.nav a[hidden],
.nav button[hidden],
[hidden] {
  display: none !important;
}
.nav a:hover, .nav button:hover {
  color: var(--accent);
  background: #eff6ff;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.nav-toggle.open { background: var(--accent); border-color: var(--accent); }

/* ── Hero / sections ── */
.hero { padding: clamp(24px, 5vw, 48px) 0 20px; }
.hero h1, .page-title {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  margin: 0 0 10px;
  line-height: 1.25;
}
.hero p, .page-desc { color: var(--muted); margin: 0; max-width: 720px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.section-head h3, .panel > h3 {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 20px);
  margin: 16px 0 24px;
}

/* ── Product grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin: 20px 0 32px;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 18px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card h3 { margin: 0; font-size: 1.02rem; line-height: 1.35; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
  margin-right: 4px;
}
.badge.pc { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.badge.policy { background: #e2e8f0; color: #0f172a; }
.badge.ok { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.badge.bad { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.admin-page .badge {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.meta { color: var(--muted); font-size: 0.88rem; margin: 6px 0; }
.price { font-size: clamp(1.2rem, 4vw, 1.45rem); font-weight: 800; margin: 8px 0; }
.price small { font-size: 0.85rem; color: var(--muted); font-weight: 500; }

.product-pick {
  margin-top: auto;
  padding-top: 8px;
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch);
}
.product-pick input { width: auto; accent-color: var(--accent); transform: scale(1.15); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  min-height: var(--touch);
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.block { width: 100%; }
.btn.small { padding: 8px 12px; font-size: 0.82rem; border-radius: 8px; min-height: 36px; }
.btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  filter: none;
  background: #94a3b8;
  color: #ffffff;
  border-color: #64748b;
  box-shadow: none;
}

/* ── Forms ── */
.form {
  display: grid;
  gap: 14px;
  max-width: 440px;
  width: 100%;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.9rem; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  min-height: var(--touch);
  font-weight: 600;
}
.admin-page input, .admin-page select, .admin-page textarea {
  background: #ffffff;
  color: var(--text);
  border-color: var(--line);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(29, 78, 216, 0.35);
  outline-offset: 1px;
}

/* ── Tables (desktop) ── */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: 100%;
}
.table-wrap.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap.fit-width {
  overflow-x: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  background: #e2e8f0;
  color: #0f172a;
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 800;
  white-space: nowrap;
}
.admin-page th {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #eff6ff; }
.admin-page tr:hover td { background: #eff6ff; }

.table-wrap.excel-grid th {
  background: #0f172a;
  color: #ffffff;
  border-right: 1px solid #334155;
}
.table-wrap.excel-grid td {
  background: #ffffff;
  color: #020617;
  border-right: 1px solid #e2e8f0;
}
.table-wrap.excel-grid tr:nth-child(even) td { background: #f8fafc; }
.table-wrap.excel-grid tr:hover td { background: #eff6ff; }
.table-wrap.excel-grid input[type="radio"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  cursor: pointer;
  transform: none;
  flex-shrink: 0;
}
.table-wrap.excel-grid td.col-select,
.table-wrap.excel-grid th.col-select {
  width: 34px;
  max-width: 34px;
  text-align: center;
  padding: 3px 4px !important;
  overflow: visible;
}
.table-wrap.excel-grid td.col-select input[type="radio"] {
  display: block;
  margin: 0 auto;
}

.tight-grid table {
  font-size: 0.82rem;
  table-layout: fixed;
  width: 100%;
}
.tight-grid th, .tight-grid td {
  padding: 4px 7px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tight-grid .ip-highlight { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.02em; }
.cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.cell-clip code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.action-cell {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow: visible;
  white-space: nowrap;
}
.action-cell .btn.small {
  padding: 2px 6px;
  font-size: 0.7rem;
  min-height: 22px;
  line-height: 1.1;
  flex-shrink: 0;
}
.ip-tabs, .category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
.cat-chip.active {
  border-color: rgba(79, 140, 255, 0.7);
  color: var(--text);
  background: rgba(79, 140, 255, 0.15);
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.25);
}
.cat-count {
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  font-size: 0.75rem;
  font-weight: 700;
}
.cat-count.empty { opacity: 0.45; }
.badge.ok, .badge.ok-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.badge.bad {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.badge.warn-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.badge.muted-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.nav a.nav-active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}
.row-own td { box-shadow: inset 3px 0 0 #f59e0b; opacity: 0.85; }
.row-owned td,
.row-sold td,
.row-disabled td {
  opacity: 0.72;
  color: #64748b !important;
}
.row-owned td { box-shadow: inset 3px 0 0 #64748b; }
.row-sold td { box-shadow: inset 3px 0 0 #475569; }
.row-usable td { box-shadow: inset 3px 0 0 #059669; }
.row-unusable td {
  box-shadow: inset 3px 0 0 #ef4444;
  opacity: 0.85;
}
.row-selected td { background: #dbeafe !important; }
.purchase-stat { font-size: 0.82rem; color: var(--muted); padding: 8px 10px !important; }
.purchase-stat .ok { color: #047857; font-weight: 700; }
.purchase-stat .bad { color: #b91c1c; font-weight: 700; }
.summary-tr td { background: #f1f5f9 !important; color: #0f172a !important; }
.empty-cell { white-space: normal !important; color: var(--muted); padding: 16px !important; }
.ok-tag { color: #047857 !important; }
.muted { color: var(--muted); font-size: 0.78rem; }

/* ── Messages ── */
.msg { margin-top: 10px; font-size: 0.95rem; line-height: 1.5; word-break: break-word; font-weight: 700; }
.msg.error { color: #991b1b; }
.msg.ok { color: #14532d; padding: 12px; background: #dcfce7; border-radius: 10px; border: 1px solid #86efac; }
.admin-page .msg.error { color: #991b1b; }
.admin-page .msg.ok { color: #14532d; background: #dcfce7; border: 1px solid #86efac; }
.msg.warn {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 12px;
  border-radius: 10px;
}
.warn { color: #fbbf24; }
code {
  background: rgba(0,0,0,0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  word-break: break-all;
}

/* ── KV / stats ── */
.kv-grid {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 0;
}
.kv-grid .k, .kv-grid .v {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.kv-grid .k { background: #0f1628; color: var(--muted); font-weight: 600; }
.kv-grid .v { background: rgba(255,255,255,0.02); word-break: break-all; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 10px;
  margin: 16px 0;
}
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat .n { font-size: clamp(1.2rem, 4vw, 1.5rem); font-weight: 800; }
.stat .l { color: var(--muted); font-size: 0.82rem; }

.tab-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.tab-bar .btn { flex-shrink: 0; white-space: nowrap; }

.footer {
  color: #0f172a;
  font-size: 0.9rem;
  padding: 24px 0 max(32px, env(safe-area-inset-bottom, 32px));
  border-top: 1px solid var(--line);
  margin-top: 24px;
  text-align: center;
  font-weight: 600;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  margin-bottom: 10px;
}
.footer-links a {
  color: #0f172a !important;
  text-decoration: none;
  font-weight: 800;
}
.footer-links a:hover { color: #1d4ed8 !important; text-decoration: underline; }
.footer-limits, .footer-fairuse {
  margin: 0 auto 8px;
  max-width: 720px;
  line-height: 1.5;
  color: #1e293b !important;
  font-weight: 600;
}
.footer-meta { color: #0f172a; font-weight: 700; }
.footer-brand { color: #020617; font-weight: 800; }
.nav-ico { display: none !important; }
.site-notice-banner {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  color: #f8fafc;
  font-size: 0.9rem;
}
.site-notice-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
}
.site-notice-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}
.site-notice-text {
  color: inherit;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.site-notice-more,
.site-notice-inner a {
  color: #93c5fd;
  margin-left: auto;
  font-weight: 700;
  text-decoration: none;
}
.site-notice-more:hover,
.site-notice-inner a:hover { color: #fff; text-decoration: underline; }
.site-doc { padding: clamp(18px, 3vw, 28px); }
.site-doc-body {
  margin-top: 16px;
  line-height: 1.7;
  color: var(--text);
  word-break: keep-all;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #1e3a8a;
  margin-top: 10px;
}

/* ── Shop wizard ── */
.shop-wizard { padding: clamp(16px, 3vw, 24px); }
.shop-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.shop-step {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
}
.shop-step.active {
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}
.shop-step-arrow { color: var(--muted); font-size: 0.75rem; }

.shop-block { margin-bottom: 24px; }
.shop-block-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

/* 구매 IP 탭: 카드형 대신 타이트한 엑셀 탭 */
.ip-tabs.category-bar,
.ip-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}
.ip-tabs .cat-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f172a;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.ip-tabs .cat-chip:hover { border-color: rgba(79, 140, 255, 0.45); color: var(--text); }
.ip-tabs .cat-chip.active {
  border-color: rgba(79, 140, 255, 0.75);
  background: rgba(79, 140, 255, 0.14);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.ip-tabs .cat-label { font-weight: 700; font-size: 0.82rem; line-height: 1.2; }
.ip-tabs .cat-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 1px 7px;
  border-radius: 4px;
  min-width: 1.5em;
  text-align: center;
}
.ip-tabs .cat-count.empty { color: #64748b; background: #f1f5f9; }

.category-desc {
  margin: 0 0 8px;
  padding: 6px 10px;
  background: rgba(79, 140, 255, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.product-picker {
  max-width: 100%;
}
.product-picker-table {
  margin-top: 4px;
}
.product-picker-table td.col-select {
  width: 34px;
}
.product-picker-table tr.row-selected td {
  background: rgba(79, 140, 255, 0.18) !important;
}
.product-option {
  display: block;
  cursor: pointer;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.product-option input { position: absolute; opacity: 0; pointer-events: none; }
.product-option.selected { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(79,140,255,0.25); }
.product-option-body { padding: 14px; background: var(--panel-2); }
.product-option-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.product-option-top strong { font-size: 1.1rem; }
.product-option-gb { font-size: 0.8rem; color: var(--muted); }
.product-option-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}
.product-option-price small { font-size: 0.75rem; font-weight: 600; }
.product-option-name { font-size: 0.72rem; color: var(--muted); line-height: 1.3; }

.node-filter-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.ip-highlight { color: #047857; font-size: 1rem; font-weight: 700; }
.responsive-table tr.row-selected td { background: rgba(79, 140, 255, 0.1) !important; }

.purchase-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  max-width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, var(--panel-2) 0%, #0f1628 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: sticky;
  bottom: 12px;
  z-index: 50;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
}
.purchase-summary { flex: 1; min-width: 200px; }
.purchase-summary-placeholder { color: var(--muted); font-size: 0.9rem; }
.summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.summary-tag {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
}
.summary-tag.ip-tag { color: #047857; border-color: #6ee7b7; }
.summary-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-left: auto;
}
.purchase-bar .btn { min-width: 120px; flex-shrink: 0; }
.empty-hint { padding: 16px; text-align: center; }

/* ── Tablet ── */
@media (max-width: 900px) {
  th, td { padding: 8px 10px; font-size: 0.84rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
}

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .category-bar { grid-template-columns: 1fr; }
  .purchase-bar {
    flex-direction: column;
    align-items: stretch;
    bottom: max(8px, env(safe-area-inset-bottom, 8px));
  }
  .purchase-bar .btn { width: 100%; }
  .summary-price { margin-left: 0; }
  .shop-step-arrow { display: none; }

  .topbar-inner .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
    z-index: 200;
  }
  .topbar-inner .nav.open { display: flex; }
  .topbar-inner .nav a,
  .topbar-inner .nav button {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .hero { padding-top: 20px; }
  .panel { margin: 12px 0 20px; }

  .form.panel { max-width: 100%; }

  .kv-grid { grid-template-columns: 1fr; }
  .kv-grid .k { border-bottom: 0; padding-bottom: 4px; }
}

/* ── Mobile card tables ── */
@media (max-width: 720px) {
  .responsive-table table { border: 0; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: block; }
  .responsive-table tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--panel-2);
  }
  .responsive-table tr:hover td { background: transparent; }
  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    word-break: break-word;
  }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 0.78rem;
    flex-shrink: 0;
    min-width: 72px;
  }
  .responsive-table td[colspan] {
    display: block;
    text-align: center;
    padding: 16px;
  }
  .responsive-table td[colspan]::before { display: none; }
  .responsive-table td[data-label="구매"],
  .responsive-table td[data-label="액션"] {
    flex-direction: column;
    align-items: stretch;
  }
  .responsive-table td[data-label="구매"] .btn,
  .responsive-table td[data-label="액션"] .btn {
    width: 100%;
  }
  .responsive-table .excel-grid td { background: transparent; border-right: 0; }
}

@media (max-width: 480px) {
  .brand { font-size: 1rem; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 14px; }
}

.usage-guide {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
}
.purchases-first {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: var(--panel);
  color: var(--text);
}
.purchases-first .section-head h3 {
  color: #86efac;
  font-weight: 800;
}
.purchases-first .purchase-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.purchases-first .filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.purchases-first .filter-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: #22c55e;
  cursor: pointer;
}
.purchases-first .btn.secondary {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}
.purchases-first .btn.secondary:hover {
  background: rgba(79, 140, 255, 0.12);
  filter: none;
}
.purchases-first .highlight-tip {
  color: #b45309;
}
.purchases-first .purchase-stat {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}
.purchases-first .purchase-stat .ok { color: #047857 !important; }
.purchases-first .purchase-stat .bad { color: #b91c1c !important; }
.purchases-first .purchase-stat small { color: #475569; }
.purchases-first .summary-tr td {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-bottom: 1px solid var(--line);
}
.purchases-first .action-cell .btn.secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
.usage-guide > h3 {
  color: #0f172a;
  font-weight: 800;
}
.usage-guide .highlight-tip {
  color: #b45309;
}
.usage-guide .usage-steps,
.usage-guide .usage-steps li {
  color: #334155;
}
.usage-guide .usage-code summary {
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.usage-guide code {
  background: #e2e8f0;
  color: #0f172a;
}
.highlight-tip {
  color: #b45309;
  font-weight: 600;
}
.usage-steps {
  margin: 0 0 12px 18px;
  line-height: 1.6;
}
.usage-code pre,
#usage-python-sample {
  background: #0f172a;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .table-wrap.fit-width { overflow-x: auto; }
}

/* ── Admin console ── */
.admin-page .hero h1 { margin-bottom: 6px; }
.admin-page .hero > .meta { margin-bottom: 4px; }

.admin-overview {
  padding: 18px 20px;
  margin-bottom: 8px;
}
.admin-overview-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}
.admin-overview-head .meta strong {
  color: #1d4ed8;
  font-weight: 700;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.overview-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 0;
}
.overview-card h4 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}
.overview-scroll {
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.overview-scroll th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #e2e8f0;
  color: #0f172a;
}
.compact-table {
  font-size: 0.82rem;
}
.compact-table th,
.compact-table td {
  padding: 8px 10px;
  white-space: nowrap;
}
.compact-table code {
  font-size: 0.78rem;
  padding: 1px 5px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px 0;
}
.admin-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  padding: 10px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  min-height: 40px;
  line-height: 1.2;
}
.admin-tab:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.admin-tab.active {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.admin-tab:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

.admin-table-panel {
  margin-top: 0;
}
.admin-table-panel .section-head {
  margin-bottom: 12px;
}
.admin-table-panel .table-wrap {
  border-radius: 10px;
}

.admin-user-detail {
  margin-top: 0;
  margin-bottom: 16px;
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 120px);
}
.admin-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.admin-detail-top h3 { margin: 0; }

.admin-detail-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
}
.admin-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}
.admin-detail-meta h4 {
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-points-line {
  margin: 8px 0 0;
  font-size: 1.35rem;
  color: #047857;
}
.admin-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-detail-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-detail-section {
  margin-bottom: 16px;
}
.admin-detail-section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #0f172a;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.admin-form-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}
.admin-form-grid input,
.admin-form-grid select {
  min-height: 40px;
  font-size: 0.9rem;
}
.admin-form-actions {
  display: flex;
  align-items: end;
}

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.admin-inline-form input,
.admin-inline-form select {
  min-height: 38px;
  min-width: 140px;
  font-size: 0.88rem;
}
.admin-tools {
  margin-bottom: 12px;
}
.admin-tools h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.admin-settings-grid {
  display: grid;
  gap: 12px;
}
.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: auto;
  font-size: 0.9rem;
}
.admin-check input {
  min-width: auto;
  min-height: auto;
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .admin-detail-hero {
    grid-template-columns: 1fr;
  }
  .admin-detail-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin modal & toast */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-modal[hidden] {
  display: none !important;
}
.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  animation: adminFadeIn 0.2s ease;
}
.admin-modal-dialog {
  position: relative;
  width: min(440px, 100%);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 24px 24px 20px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  animation: adminSlideUp 0.22s ease;
}
.admin-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.admin-modal-icon.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.admin-modal-dialog h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: #0f172a;
}
.admin-modal-dialog p {
  margin: 0 0 20px;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.admin-modal-actions .btn {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}
.admin-modal-actions .btn.secondary {
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
}
.admin-modal-actions .btn.secondary:hover {
  background: #f1f5f9;
}
.admin-modal-actions .btn.danger {
  color: #ffffff;
  background: #dc2626;
  border-color: #dc2626;
}
.admin-modal-actions .btn.danger:hover {
  background: #b91c1c;
}

.admin-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}
.admin-toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.92);
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.admin-toast.error {
  color: #fef2f2;
  background: rgba(220, 38, 38, 0.92);
  border-color: rgba(248, 113, 113, 0.5);
}
.admin-toast.info {
  color: #eff6ff;
  background: rgba(37, 99, 235, 0.92);
  border-color: rgba(96, 165, 250, 0.5);
}

.compact-table tr.row-removing {
  opacity: 0.35;
  transition: opacity 0.18s ease;
}

body.admin-modal-open {
  overflow: hidden;
}

@keyframes adminFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes adminSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Deploy banner (landing-web DeployBuildStampGuard 동일 UX) ── */
.rp-deploy-banner {
  position: fixed;
  z-index: 12000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.rp-deploy-banner[hidden] { display: none !important; }
.rp-deploy-banner-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 255, 0.45);
  background: rgba(18, 24, 38, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #e8edf5;
  font-family: "Sora", "Segoe UI", sans-serif;
}
.rp-deploy-banner-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}
.rp-deploy-banner-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.rp-deploy-banner-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.rp-deploy-banner-btn {
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.rp-deploy-banner-btn.is-primary {
  background: #3b82f6;
  color: #fff;
}
.rp-deploy-banner-btn.is-ghost {
  background: transparent;
  color: #9fb0d3;
}
.rp-deploy-banner-btn.is-ghost:hover { color: #fff; }

/* ── Shop UI polish ── */
body {
  font-family: "Sora", "Segoe UI", system-ui, sans-serif;
}
.brand, .brand-text, .hero h1, .shop-block-title, .page-title {
  font-family: "Outfit", "Sora", sans-serif;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(91,140,255,0.25), rgba(45,212,191,0.12));
  border: 1px solid rgba(91,140,255,0.35);
}
.brand-text span { color: var(--accent); }
.nav-ico { opacity: 0.7; margin-right: 0.25rem; }
.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.14);
  border: 1px solid rgba(79, 140, 255, 0.35);
  color: #c7d7ff;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-shop {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(28px, 5vw, 48px) 0 24px;
}
.hero-kicker {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.hero-aside {
  position: relative;
  min-height: 140px;
  display: grid;
  place-items: center;
}
.hero-orb {
  position: absolute;
  inset: 10% 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,255,0.35), transparent 70%);
  filter: blur(8px);
}
.hero-card {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(24,35,61,0.95), rgba(18,26,47,0.9));
  border: 1px solid rgba(91,140,255,0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  min-width: 160px;
}
.hero-card-ico { font-size: 1.2rem; color: #93c5fd; }
.hero-card strong { font-family: Outfit, Sora, sans-serif; }
.hero-card small { color: var(--muted); font-size: 0.78rem; }
.shop-head { margin-bottom: 0.75rem; }
.shop-head-note { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.88rem; }
.title-ico { margin-right: 0.25rem; opacity: 0.85; }
.section-head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(148,163,184,0.12);
}
.type-pill.type-pc {
  color: #86efac;
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
}
.summary-tag.provider-tag {
  color: #fde68a;
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.12);
}
.btn.buy-cta {
  min-width: 132px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(79,140,255,0.35);
}
.btn.is-loading { opacity: 0.7; pointer-events: none; }
.footer-brand { font-weight: 700; color: var(--text); }
.footer-sep { margin: 0 0.35rem; opacity: 0.5; }
@media (max-width: 800px) {
  .hero-shop { grid-template-columns: 1fr; }
  .hero-aside { display: none; }
}


/* ── Deploy banner (landing-web DeployBuildStampGuard UX) ── */
.rp-deploy-banner {
  position: fixed;
  z-index: 12000;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 1.5rem));
  pointer-events: none;
}
.rp-deploy-banner[hidden] { display: none !important; }
.rp-deploy-banner-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 170, 255, 0.45);
  background: rgba(18, 24, 38, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #e8edf5;
  font-family: "Sora", "Segoe UI", sans-serif;
}
.rp-deploy-banner-icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}
.rp-deploy-banner-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.rp-deploy-banner-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.rp-deploy-banner-btn {
  border: 0;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.rp-deploy-banner-btn.is-primary { background: #3b82f6; color: #fff; }
.rp-deploy-banner-btn.is-ghost { background: transparent; color: #9fb0d3; }
.rp-deploy-banner-btn.is-ghost:hover { color: #fff; }

body { font-family: "Sora", "Segoe UI", system-ui, sans-serif; }
.brand, .brand-text, .hero h1, .shop-block-title, .page-title {
  font-family: "Outfit", "Sora", sans-serif;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(91,140,255,0.25), rgba(45,212,191,0.12));
  border: 1px solid rgba(91,140,255,0.35);
}
.brand-text span { color: var(--accent); }
.nav-ico { opacity: 0.7; margin-right: 0.25rem; }
.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.14);
  border: 1px solid rgba(79, 140, 255, 0.35);
  color: #c7d7ff;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-shop {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(28px, 5vw, 48px) 0 24px;
}
.hero-kicker {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.hero-aside { position: relative; min-height: 140px; display: grid; place-items: center; }
.hero-orb {
  position: absolute;
  inset: 10% 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,255,0.35), transparent 70%);
  filter: blur(8px);
}
.hero-card {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(24,35,61,0.95), rgba(18,26,47,0.9));
  border: 1px solid rgba(91,140,255,0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  min-width: 160px;
}
.hero-card-ico { font-size: 1.2rem; color: #93c5fd; }
.hero-card strong { font-family: Outfit, Sora, sans-serif; }
.hero-card small { color: var(--muted); font-size: 0.78rem; }
.shop-head { margin-bottom: 0.75rem; }
.shop-head-note { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.88rem; }
.title-ico { margin-right: 0.25rem; opacity: 0.85; }
.section-head-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.type-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(148,163,184,0.12);
}
.type-pill.type-pc {
  color: #86efac;
  border-color: rgba(34,197,94,0.35);
  background: rgba(34,197,94,0.12);
}
.summary-tag.provider-tag {
  color: #fde68a;
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.12);
}
.btn.buy-cta {
  min-width: 132px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(79,140,255,0.35);
}
.btn.is-loading { opacity: 0.7; pointer-events: none; }
.footer-brand { font-weight: 700; color: var(--text); }
.footer-sep { margin: 0 0.35rem; opacity: 0.5; }
@media (max-width: 800px) {
  .hero-shop { grid-template-columns: 1fr; }
  .hero-aside { display: none; }
}

/* API guide */
.api-panel h3 { margin-top: 0; }
.api-key-box { display: grid; gap: 12px; margin-top: 10px; }
.api-key-meta { font-size: 0.9rem; color: var(--muted); }
.api-key-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.api-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.api-tab {
  border: 1px solid var(--line);
  background: var(--panel-2, rgba(255,255,255,0.04));
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
}
.api-tab.active, .api-tab:hover {
  color: var(--text);
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.12);
}
.api-code {
  margin: 0;
  padding: 16px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 600;
}
.api-panel h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}
.api-panel .meta {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.6;
}
.api-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.api-tab.active, .api-tab:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.site-doc h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.site-doc-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 500;
}
.site-doc-body h2, .site-doc-body h3 {
  color: #020617;
  font-weight: 800;
  margin-top: 1.4em;
}
.site-doc-body p, .site-doc-body li { color: #0f172a; }

/* ===== Shop light / Excel grid (high contrast) ===== */
.shop-v2.shop-light {
  --shop-bg: #f3f5f9;
  --shop-card: #ffffff;
  --shop-line: #cbd5e1;
  --shop-text: #020617;
  --shop-muted: #1e293b;
  --shop-accent: #1d4ed8;
  font-family: Sora, Outfit, "Segoe UI", sans-serif;
  color: var(--shop-text);
  background: #eceff3;
  min-height: 100vh;
}
.shop-light .container { width: min(1180px, 100%); }
.shop-light .topbar {
  background: #f7f8fa;
  border-bottom: 1px solid #c5ceda;
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.shop-light .brand-text {
  color: #020617;
  font-family: Outfit, Sora, sans-serif;
  font-weight: 800;
}
.shop-light .brand-text span { color: #1d4ed8; }
.shop-light .nav a, .shop-light .nav button {
  color: #0f172a;
  font-weight: 700;
}
.shop-light .nav a:hover, .shop-light .nav button:hover,
.shop-light .nav a.nav-active {
  color: #1d4ed8;
  background: #dbeafe;
}
.shop-light .site-notice-banner {
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  color: #f8fafc !important;
}
.shop-light .site-notice-banner .site-notice-text,
.shop-light .site-notice-banner span {
  color: #f8fafc !important;
  font-weight: 700;
}
.shop-light .site-notice-banner .site-notice-badge,
.shop-light .site-notice-banner strong {
  background: #2563eb;
  color: #ffffff !important;
}
.shop-light .site-notice-banner .site-notice-more,
.shop-light .site-notice-banner a {
  color: #93c5fd !important;
  font-weight: 800;
}
.shop-light .footer {
  color: #1e293b;
  border-top: 1px solid #cbd5e1;
  margin-top: 28px;
  padding-top: 18px;
}
.shop-light .footer a { color: #0f172a !important; font-weight: 800; }
.shop-light .footer-brand { color: #020617; }
.shop-light .footer-limits,
.shop-light .footer-fairuse,
.shop-light .footer-meta { color: #0f172a; }
.shop-light .meta { color: #1e293b !important; font-weight: 600; }
.shop-light .panel {
  background: #f7f8fa;
  border: 1px solid #c5ceda;
  color: #020617;
}
.shop-light .msg.error { color: #991b1b; font-weight: 700; }
.shop-light .msg.ok {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
  font-weight: 700;
}
.shop-light .user-chip {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
  font-weight: 700;
}
.shop-type-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.shop-type-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.shop-type-tab.active {
  background: #12203a;
  color: #fff;
  border-color: #12203a;
}
.shop-type-tab .tab-count {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.dyn-set-form {
  display: grid;
  gap: 14px;
  padding: 8px 4px 18px;
}
.dyn-set-form label {
  display: grid;
  gap: 6px;
  max-width: 320px;
  font-weight: 700;
  color: #0f172a;
}
.dyn-set-form select,
.dyn-set-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
}
.shop-type-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.shop-type-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.shop-type-tab.active {
  background: #12203a;
  color: #fff;
  border-color: #12203a;
}
.shop-type-tab .tab-count {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.dyn-set-form {
  display: grid;
  gap: 14px;
  padding: 8px 4px 18px;
}
.dyn-set-form label {
  display: grid;
  gap: 6px;
  max-width: 320px;
  font-weight: 700;
  color: #0f172a;
}
.dyn-set-form select,
.dyn-set-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
}
.shop-hero {
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  gap: 16px;
  align-items: stretch;
  margin: 18px 0 16px;
}
.shop-hero-solo {
  grid-template-columns: 1fr;
}
.shop-hero-compact h1 {
  font-family: Outfit, Sora, sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  line-height: 1.2;
  margin: 10px 0 8px;
  letter-spacing: -0.03em;
  color: #020617;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #059669;
  background: #059669;
  color: #ffffff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.shop-hero-sub {
  color: #1e293b;
  max-width: 60ch;
  line-height: 1.65;
  margin: 0;
  font-weight: 600;
  font-size: .95rem;
}
.shop-stock-card {
  border: 2px solid #0f172a;
  background: #0f172a;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 10px 24px rgba(15,23,42,.18);
  min-width: 220px;
}
.shop-stock-card.compact { min-width: 220px; }
.shop-stock-card .stock-label {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
}
.shop-stock-card .stock-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.shop-stock-card strong {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-family: Outfit, Sora, sans-serif;
  line-height: 1;
  margin: 0;
  color: #fde047;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.shop-stock-card .stock-unit {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
}
.shop-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 14px;
  align-items: start;
}
.shop-grid-panel {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #94a3b8;
  background: #f7f8fa;
  box-shadow: 0 10px 28px rgba(15,23,42,.07);
  min-width: 0;
  width: 100%;
}
.shop-checkout-bar {
  position: sticky;
  top: 84px;
  border: 1px solid #94a3b8;
  border-radius: 14px;
  background: #f7f8fa;
  padding: 12px 12px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #020617;
  min-width: 0;
}
.shop-checkout-bar h3 {
  margin: 0 0 8px;
  font-family: Outfit, sans-serif;
  font-size: .95rem;
  color: #020617;
  font-weight: 800;
}
.checkout-bar-main { min-width: 0; }
.checkout-bar-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 220px;
}
/* legacy alias */
.shop-checkout-aside {
  position: static;
}
.excel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #94a3b8;
  background: #e2e8f0;
}
.excel-toolbar h3 { margin: 0; font-size: 1rem; color: #020617; font-weight: 800; }
.excel-toolbar .meta { color: #0f172a !important; font-weight: 700; }
.excel-toolbar-left, .excel-toolbar-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.excel-wrap {
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
}
.shop-light table.excel-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  min-width: 0 !important;
  font-size: .84rem;
}
.shop-light table.excel-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 9px 6px;
  background: #0f172a !important;
  border-bottom: 1px solid #0f172a;
  border-right: 0;
  color: #ffffff !important;
  font-weight: 800;
  white-space: nowrap;
}
.shop-light table.excel-grid td {
  padding: 6px;
  border-bottom: 1px solid #cbd5e1;
  border-right: 0;
  vertical-align: middle;
  background: #ffffff !important;
  color: #020617 !important;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 600;
  height: 42px;
}
.shop-light table.excel-grid tbody tr:nth-child(even) td { background: #f8fafc !important; }
.shop-light table.excel-grid tbody tr:hover td { background: #eff6ff !important; }
.shop-light table.excel-grid .empty-row td {
  text-align: center;
  color: #0f172a !important;
  padding: 36px 12px;
  font-weight: 700;
  font-size: .95rem;
  background: #ffffff !important;
  white-space: normal;
  height: auto;
}
.shop-light table.excel-grid .empty-row td strong { color: #1d4ed8; }
.shop-light table.excel-grid .col-num { width: 32px; color: #334155 !important; text-align: center; }
.shop-light table.excel-grid .col-ip { width: 42%; min-width: 188px; }
.shop-light table.excel-grid .col-plan { width: 12%; min-width: 88px; max-width: 110px; }
.shop-light table.excel-grid .col-days { width: 16%; min-width: 108px; max-width: 140px; }
.shop-light table.excel-grid .col-price {
  width: 12%;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #020617 !important;
  white-space: nowrap;
}
.shop-light table.excel-grid .col-act { width: 40px; text-align: center; }
.ip-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
}
.shop-light table.excel-grid .exit-ip {
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 9px;
  border-radius: 6px;
  background: #022c22;
  color: #ecfdf5;
  border: 1px solid #064e3b;
  font-size: .86rem;
  font-weight: 800;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
.shop-light table.excel-grid .ip-cell .btn {
  flex: 0 0 auto;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: .75rem;
  border-radius: 6px;
  white-space: nowrap;
}
.shop-light table.excel-grid .btn-icon-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #94a3b8;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.shop-light table.excel-grid .btn-icon-x:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}
.shop-light table.excel-grid select {
  width: 100%;
  max-width: 100%;
  height: 30px;
  background: #ffffff;
  color: #020617;
  border: 1px solid #64748b;
  border-radius: 6px;
  padding: 0 4px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
}
.shop-light table.excel-grid .col-plan select {
  min-width: 0;
}
.shop-light .btn {
  font-weight: 800;
}
.shop-light .btn.secondary {
  background: #ffffff;
  border: 1px solid #475569;
  color: #020617;
}
.shop-light .btn.secondary:hover { background: #e2e8f0; }
.shop-light .btn.buy-cta {
  background: #1d4ed8;
  color: #ffffff;
  border: 0;
  box-shadow: 0 10px 22px rgba(29,78,216,.22);
}
.shop-light .btn.buy-cta:hover { background: #1e40af; filter: none; }
.shop-checkout-bar .buy-cta {
  width: 100%;
  min-height: 46px;
  font-size: 1.05rem;
  margin-top: 2px;
}
.tax-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #64748b;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: .88rem;
  color: #020617;
  font-weight: 800;
}
.tax-check input { width: 16px; height: 16px; flex: 0 0 auto; }
.tax-hint { margin: 0; font-size: .75rem; color: #334155; font-weight: 600; }
.shop-checkout-bar .excel-totals .quote-row,
.shop-checkout-bar .excel-totals .quote-total {
  font-size: 0.82rem;
}
.shop-checkout-bar .excel-totals .quote-total strong {
  font-size: 1.1rem;
}
.shop-checkout-bar .buy-cta {
  min-height: 42px;
  font-size: 0.95rem;
}
.shop-light .excel-totals {
  display: flex
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}
.shop-light .quote-row,
.shop-light .quote-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #020617;
  font-weight: 700;
  min-width: 88px;
}
.shop-light .quote-row span,
.shop-light .quote-total span {
  color: #334155;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.shop-light .quote-row strong,
.shop-light .quote-total strong {
  color: #020617;
  font-weight: 900;
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.shop-light .quote-total {
  border: 2px solid #1d4ed8;
  background: #eff6ff;
  min-width: 120px;
}
.shop-light .quote-total strong {
  font-family: Outfit, sans-serif;
  color: #1d4ed8;
  font-size: 1.28rem;
}
.shop-light .assigned-list { list-style:none; padding:0 16px 16px; margin: 0; display:grid; gap:10px; }
.shop-light .assigned-list li {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between;
  padding: 12px; border-radius: 12px; border: 1px solid #94a3b8; background: #f8fafc;
  color: #020617; font-weight: 700;
}
.checkout-result { padding: 0 16px 16px; color: #020617; }
@media (max-width: 980px) {
  .shop-hero { grid-template-columns: 1fr; }
  .shop-workspace {
    grid-template-columns: 1fr;
  }
  .shop-checkout-bar {
    position: static;
    grid-template-columns: 1fr;
  }
  .checkout-bar-actions { min-width: 0; }
  .shop-stock-card {
    justify-content: space-between;
  }
}

/* ===== Orders page ===== */
.orders-hero h1 { color: #020617; font-weight: 800; }
.orders-hero p { color: #1e293b; font-weight: 600; font-size: 1rem; }
.orders-panel { padding: 20px; }
.orders-panel .section-head {
  margin-bottom: 14px;
  align-items: center;
}
.orders-panel .section-head h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #020617;
}
.orders-summary {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #e8edf5;
  border: 1px solid #c5ceda;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.92rem;
}
.orders-table-wrap {
  overflow-x: auto;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  background: #f7f8fa;
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.92rem;
  min-width: 920px;
}
.orders-table thead th {
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  text-align: left;
  padding: 12px 10px;
  white-space: nowrap;
  border-bottom: 0;
}
.orders-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #020617;
  font-weight: 600;
  vertical-align: middle;
  background: #fff;
}
.orders-table tbody tr:nth-child(even) td { background: #f8fafc; }
.orders-table .summary-tr td,
.orders-table .purchase-stat {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  font-weight: 700;
}
.orders-table .empty-cell {
  text-align: center;
  padding: 28px 12px;
  color: #0f172a;
  font-weight: 700;
}
.order-product { font-weight: 800; color: #020617; }
.order-sub { margin-top: 2px; font-size: 0.8rem; color: #334155; font-weight: 600; }
.exit-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 7px;
  background: #065f46;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
}
.orders-table .action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.purchase-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
}
.filter-check input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #1d4ed8;
  flex-shrink: 0;
}
.filter-check span {
  display: inline-block;
  line-height: 1.2;
}
.brand-text { font-weight: 800; color: var(--text); }
.brand-text span { color: var(--accent); }
.nav a.nav-active {
  color: var(--accent);
  background: #dbeafe;
  font-weight: 800;
}

/* ===== Site-wide UI unify v19 =====
   전 페이지 폰트·볼드·헤더 톤 통일 · 잔여 표기 축소 · +5행 제거 */
:root {
  --font-body: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", "Sora", sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --title-size: 1.35rem;
  --nav-size: 0.9rem;
}

html:not(.admin-page) body,
body.site-light,
body.shop-light {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  color: #0f172a;
  background: #eceff3;
  -webkit-font-smoothing: antialiased;
}

body.site-light .topbar,
body.shop-light .topbar,
body:not(.admin-page) .topbar {
  background: rgba(247, 248, 250, 0.96);
  border-bottom: 1px solid #c5ceda;
}

.brand,
.brand-text {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
body:not(.admin-page) .brand-text { color: #0f172a; }
body:not(.admin-page) .brand-text span { color: #1d4ed8; }

body:not(.admin-page) .nav a,
body:not(.admin-page) .nav button {
  font-family: var(--font-body);
  font-size: var(--nav-size);
  font-weight: var(--fw-medium);
  color: #334155;
  padding: 6px 10px;
  min-height: 36px;
  border-radius: 8px;
}
body:not(.admin-page) .nav a:hover,
body:not(.admin-page) .nav button:hover {
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}
body:not(.admin-page) .nav a.nav-active {
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: var(--fw-semibold);
}

/* 페이지 제목 · 로그인/주문/API 동일 스케일 (관리자 제외) */
body:not(.admin-page) .hero h1,
body:not(.admin-page) .page-title,
body:not(.admin-page) .shop-hero h1,
body:not(.admin-page) .shop-hero-compact h1,
body:not(.admin-page) .orders-hero h1,
body:not(.admin-page) main.hero > h1 {
  font-family: var(--font-display);
  font-size: var(--title-size);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #0f172a;
}
body:not(.admin-page) .hero p,
body:not(.admin-page) .page-desc,
body:not(.admin-page) .shop-hero-sub,
body:not(.admin-page) .orders-hero p,
body:not(.admin-page) main.hero > .meta,
body:not(.admin-page) main.hero > p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: var(--fw-regular);
  color: #475569;
  line-height: 1.55;
  max-width: 56ch;
}

.hero-kicker,
.shop-hero .hero-kicker {
  display: none !important;
}

.shop-hero-solo {
  display: block;
  grid-template-columns: none;
  margin: 20px 0 14px;
}
.shop-hero-solo h1 { margin: 8px 0 6px; }

/* 잔여: 큰 카드 폐기 → 툴바 인라인 */
.shop-stock-card { display: none !important; }
.stock-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--fw-medium);
  line-height: 1.2;
  white-space: nowrap;
}
.stock-inline strong {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.excel-toolbar h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  color: #0f172a;
}
.excel-toolbar .meta {
  font-weight: var(--fw-medium) !important;
  color: #64748b !important;
  font-size: 0.82rem;
}

.btn,
button.btn {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  letter-spacing: 0;
}
.btn.buy-cta {
  font-weight: var(--fw-semibold);
}

body:not(.admin-page) .panel > h3,
body:not(.admin-page) .section-head h3,
body:not(.admin-page) .shop-checkout-bar h3,
body:not(.admin-page) .orders-panel .section-head h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  color: #0f172a;
}

.form.panel {
  max-width: 420px;
  background: #fff;
  border: 1px solid #c5ceda;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}
.form.panel label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--fw-medium);
  color: #334155;
}
.form.panel input,
.form.panel select,
.form.panel textarea {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: 0.95rem;
}
.form.panel .btn {
  width: 100%;
  justify-content: center;
}

.msg {
  font-weight: var(--fw-medium);
}
.user-chip {
  font-weight: var(--fw-medium);
  font-size: 0.8rem;
}
.footer a,
.footer-brand,
.footer-meta {
  font-family: var(--font-body);
  font-weight: var(--fw-medium) !important;
}
.shop-light .footer a { font-weight: var(--fw-medium) !important; }
.shop-light .meta { font-weight: var(--fw-regular) !important; }
.shop-light .nav a,
.shop-light .nav button {
  font-weight: var(--fw-medium);
}
.shop-light .brand-text {
  font-weight: var(--fw-bold);
}
.shop-light .quote-row span,
.shop-light .quote-total span {
  font-weight: var(--fw-medium);
}
.shop-light .quote-row strong,
.shop-light .quote-total strong {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
}
.shop-light .quote-total strong {
  font-size: 1.1rem;
}
.excel-grid th {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: 0.8rem;
}

main.hero {
  padding: 28px 0 24px;
}
@media (max-width: 640px) {
  .stock-inline { margin-left: 0; }
  .excel-toolbar-left { width: 100%; }
}

/* ===== Admin light contrast SSOT =====
   관리자도 밝은 UI · 대비 강제 */
.admin-page,
.admin-page * {
  scrollbar-color: #94a3b8 #e2e8f0;
}
.admin-page {
  color: #0f172a !important;
  background: #eceff3 !important;
}
.admin-page .brand,
.admin-page .brand-text {
  color: #0f172a !important;
}
.admin-page .brand span,
.admin-page .brand-text span {
  color: #1d4ed8 !important;
}
.admin-page .nav a,
.admin-page .nav button,
.admin-page #btn-logout {
  color: #334155 !important;
  background: transparent !important;
}
.admin-page .nav a:hover,
.admin-page .nav button:hover,
.admin-page #btn-logout:hover {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
}
.admin-page h1,
.admin-page h2,
.admin-page h3,
.admin-page h4,
.admin-page .hero h1,
.admin-page main.hero > h1,
.admin-page .panel > h3,
.admin-page .section-head h3,
.admin-page .admin-overview-head h3,
.admin-page .overview-card h4,
.admin-page .admin-tab,
.admin-page .stat .n {
  color: #0f172a !important;
}
.admin-page .meta,
.admin-page main.hero > .meta,
.admin-page main.hero > p,
.admin-page label,
.admin-page .muted,
.admin-page .empty-cell,
.admin-page .stat .l,
.admin-page .pager-meta {
  color: #334155 !important;
}
.admin-page .admin-tab.active {
  color: #1e3a8a !important;
}
.admin-page td,
.admin-page tbody td,
.admin-page .compact-table td,
.admin-page .overview-card,
.admin-page .panel,
.admin-page .admin-tools,
.admin-page .admin-table-panel,
.admin-page .admin-user-detail {
  color: #0f172a !important;
}
.admin-page .panel,
.admin-page .admin-tools,
.admin-page .admin-table-panel,
.admin-page .admin-user-detail,
.admin-page .admin-overview,
.admin-page .overview-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}
.admin-page code {
  color: #1e3a8a !important;
  background: #dbeafe !important;
}
.admin-page input,
.admin-page select,
.admin-page textarea {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}
.admin-page input::placeholder,
.admin-page textarea::placeholder {
  color: #64748b !important;
}
.admin-page tr:hover td {
  background: #eff6ff !important;
}
.admin-page .btn.secondary {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}
/* 관리자 확인 팝업: 흰 배경 + 진한 글자 (어두운 다이얼로그 잔재 방지) */
.admin-page .admin-modal-dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22) !important;
}
.admin-page .admin-modal-dialog h4 {
  color: #0f172a !important;
}
.admin-page .admin-modal-dialog p {
  color: #334155 !important;
}
.admin-page .admin-modal-icon {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}
.admin-page .admin-modal-icon.danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}
.admin-page .admin-modal-actions .btn {
  color: #ffffff !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
}
.admin-page .admin-modal-actions .btn.secondary {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}
.admin-page .admin-modal-actions .btn.danger {
  color: #ffffff !important;
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

/* Admin list search(상단) + pager(하단) — 10/page, 검색 버튼으로만 조회 */
.admin-page .admin-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 12px;
}
.admin-page .admin-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 320px;
  min-width: 0;
}
.admin-page .admin-search-input {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 420px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff !important;
  color: #0f172a !important;
}
.admin-page .admin-list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 4px;
  padding: 12px 8px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 8px 8px;
}
.admin-page .pager-meta {
  color: #334155;
  font-size: 0.8rem;
  white-space: nowrap;
}
.admin-page .pager-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.admin-page .pager-btns .btn.small {
  min-width: 34px;
  padding: 4px 8px !important;
}
.admin-page .pager-btns .btn.small:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Admin nodes excel grid — no H-scroll, tight rows */
.admin-page .nodes-policy-bar,
.admin-page .nodes-modem-bar {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}
.admin-page .modem-bar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-page .modem-bar-label {
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 4px;
}
.admin-page .modem-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1.2;
}
.admin-page .modem-chip strong {
  color: #1d4ed8;
  margin-left: 2px;
}
.admin-page .modem-chip.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}
.admin-page .modem-chip.policy-dynamic.active {
  border-color: #d97706;
  background: #fef3c7;
  color: #92400e;
}
.admin-page .modem-chip.policy-fixed.active {
  border-color: #64748b;
  background: #e2e8f0;
  color: #0f172a;
}
.admin-page .modem-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1e3a8a;
  font-weight: 700;
}
.admin-page .excel-admin-grid {
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
}
.admin-page .admin-table-panel,
.admin-page #tab-panel-body,
.admin-page .table-wrap.fit-width.excel-admin-grid {
  width: 100%;
  max-width: 100%;
}
.admin-page table.admin-excel {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.admin-page table.admin-excel th,
.admin-page table.admin-excel td {
  padding: 7px 8px !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}
.admin-page table.admin-excel th {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  font-size: 0.75rem;
  font-weight: 700;
}
/* id | 모뎀 | VLAN | 슬롯 | 출구IP | 고정/유동 | 공급자 | 구매자 | 상태 | 공유 | 공유량 | 신호 | 관리 */
.admin-page table.admin-excel th:nth-child(1),
.admin-page table.admin-excel td:nth-child(1) { width: 4%; }
.admin-page table.admin-excel th:nth-child(2),
.admin-page table.admin-excel td:nth-child(2) { width: 5%; }
.admin-page table.admin-excel th:nth-child(3),
.admin-page table.admin-excel td:nth-child(3) { width: 4%; }
.admin-page table.admin-excel th:nth-child(4),
.admin-page table.admin-excel td:nth-child(4) { width: 6%; }
.admin-page table.admin-excel th:nth-child(5),
.admin-page table.admin-excel td:nth-child(5) { width: 12%; }
.admin-page table.admin-excel th:nth-child(6),
.admin-page table.admin-excel td:nth-child(6) { width: 11%; } /* 주거용고정/유동 */
.admin-page table.admin-excel th:nth-child(7),
.admin-page table.admin-excel td:nth-child(7) { width: 8%; }
.admin-page table.admin-excel th:nth-child(8),
.admin-page table.admin-excel td:nth-child(8) { width: 8%; }
.admin-page table.admin-excel th:nth-child(9),
.admin-page table.admin-excel td:nth-child(9) { width: 6%; }
.admin-page table.admin-excel th:nth-child(10),
.admin-page table.admin-excel td:nth-child(10) { width: 5%; }
.admin-page table.admin-excel th:nth-child(11),
.admin-page table.admin-excel td:nth-child(11) { width: 7%; }
.admin-page table.admin-excel th:nth-child(12),
.admin-page table.admin-excel td:nth-child(12) { width: 8%; }
.admin-page table.admin-excel th:nth-child(13),
.admin-page table.admin-excel td:nth-child(13) { width: 16%; } /* 관리 */
.admin-page table.admin-excel td {
  color: #0f172a !important;
  background: #ffffff !important;
}
.admin-page table.admin-excel tbody tr:nth-child(even) td {
  background: #f8fafc !important;
}
.admin-page table.admin-excel .ip-mono {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 4px;
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap !important;
  letter-spacing: 0;
}
.admin-page table.admin-excel .col-act,
.admin-page table.admin-excel td.action-cell {
  text-align: left;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip;
}
.admin-page table.admin-excel .node-act-btns {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
}
.admin-page table.admin-excel .node-act-btns .btn.small {
  padding: 5px 10px !important;
  font-size: 0.75rem !important;
  line-height: 1.2;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  overflow: visible !important;
}
.admin-page table.admin-excel .col-policy {
  overflow: visible !important;
  text-overflow: clip !important;
}
.admin-page table.admin-excel .col-policy .btn {
  padding: 5px 8px !important;
  font-size: 0.72rem !important;
  line-height: 1.2;
  white-space: nowrap !important;
  width: 100%;
  max-width: 118px;
}
.admin-page table.admin-excel .btn.btn-policy-on {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fcd34d !important;
  font-weight: 700;
}
.admin-page table.admin-excel .btn.btn-policy-off {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}
.admin-page table.admin-excel .btn-icon-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.admin-page table.admin-excel .btn-icon-x:hover {
  color: #b91c1c;
  border-color: #ef4444;
  background: #fef2f2;
}
.admin-page .admin-table-panel {
  overflow: hidden;
}
.admin-page .admin-table-panel .table-wrap.fit-width {
  overflow-x: hidden;
}

/* ===== Site-wide light contrast cleanup =====
   밝은 배경에 연한 글자(#86efac/#93c5fd/#94a3b8 등) 남는 곳 교정 */
body.site-light .ip-highlight,
body.shop-light .ip-highlight,
body.site-light .ok-tag,
body.shop-light .ok-tag,
body.site-light .purchase-stat .ok,
body.shop-light .purchase-stat .ok,
body.site-light .summary-tag.ip-tag,
body.shop-light .summary-tag.ip-tag {
  color: #047857 !important;
}
body.site-light .purchase-stat .bad,
body.shop-light .purchase-stat .bad {
  color: #b91c1c !important;
}
body.site-light .highlight-tip,
body.shop-light .highlight-tip,
body.site-light .warn,
body.shop-light .warn {
  color: #b45309 !important;
}
body.site-light .kv-grid .k,
body.shop-light .kv-grid .k {
  background: #f1f5f9 !important;
  color: #334155 !important;
}
body.site-light .kv-grid .v,
body.shop-light .kv-grid .v {
  background: #ffffff !important;
  color: #0f172a !important;
}
body.site-light .cat-count,
body.shop-light .cat-count {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
body.site-light .ip-tabs .cat-count.empty,
body.shop-light .ip-tabs .cat-count.empty {
  color: #64748b !important;
  background: #f1f5f9 !important;
}
body.site-light .shop-step-arrow,
body.shop-light .shop-step-arrow,
body.site-light .product-option-gb,
body.shop-light .product-option-gb,
body.site-light .product-option-name,
body.shop-light .product-option-name {
  color: #334155 !important;
}
body.site-light .summary-tag,
body.shop-light .summary-tag {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
body.site-light code:not(pre code),
body.shop-light code:not(pre code) {
  background: #e2e8f0;
  color: #0f172a;
}
body.site-light .row-disabled td,
body.shop-light .row-owned td,
body.shop-light .row-sold td {
  color: #475569 !important;
}
/* 코드 블록은 다크 유지(가독성) — 본문 텍스트만 밝은 대비 */
body.site-light .usage-code pre,
body.site-light #usage-python-sample,
body.shop-light .usage-code pre {
  background: #0f172a;
  color: #e2e8f0;
}

/* —— purchase success / download / soft buy button —— */
.purchase-success {
  margin: 12px 0 18px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #86efac;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 55%, #eff6ff 100%);
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.12);
  animation: purchasePop 0.45s ease-out;
}
.purchase-success[hidden] { display: none !important; }
.purchase-success h2 {
  margin: 0 0 8px;
  font-family: Outfit, sans-serif;
  font-size: 1.35rem;
  color: #14532d;
}
.purchase-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
@keyframes purchasePop {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.btn.is-soft-disabled {
  opacity: 0.72;
  filter: grayscale(0.15);
}
.btn.pulse-hint {
  animation: pulseHint 0.8s ease-in-out 2;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
@keyframes pulseHint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.download-hero h1 { margin-bottom: 6px; }
.download-panel { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.download-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.download-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.download-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}
.download-meta code { font-size: 0.75rem; word-break: break-all; }
.download-points {
  margin: 0;
  padding-left: 1.1rem;
  color: #334155;
  line-height: 1.55;
}
.tax-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tax-fields input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
}
