:root {
  --bg: #f9fafb;
  --bg-soft: #f3f4f6;
  --panel: #ffffff;
  --panel-soft: #fcfcfd;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --muted-soft: #9ca3af;
  --accent: #d97706;
  --accent-strong: #b45309;
  --accent-soft: #fff7ed;
  --danger-soft: #fef2f2;
  --danger-text: #b91c1c;
  --ok-soft: #ecfdf5;
  --ok-text: #047857;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfbfc 0%, #f9fafb 16%, #f3f4f6 100%);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.page { padding: 32px 0 72px; }
.page > * + * { margin-top: 22px; }

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 74px;
}

.brand-wrap { display: flex; flex-direction: column; gap: 2px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.menu {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: 180ms ease;
}
.menu a.is-active,
.menu a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.hero,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111827 0%, #1f2937 54%, #111827 100%);
  color: #f9fafb;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}
.hero-dark::before,
.hero-dark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.55;
}
.hero-dark::before {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -20px;
  background: rgba(251, 191, 36, 0.34);
}
.hero-dark::after {
  width: 280px;
  height: 280px;
  left: -80px;
  bottom: -140px;
  background: rgba(59, 130, 246, 0.18);
}
.hero-dark > * { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-dark .eyebrow { color: #fcd34d; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 3.2rem); line-height: 1.08; letter-spacing: -0.04em; }
h2 { font-size: 1.2rem; line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: 1rem; line-height: 1.3; }

.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 22px; }
.stack-xl > * + * { margin-top: 28px; }

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.grid-two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}
.section-head .muted { max-width: 720px; }

.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; line-height: 1.65; }
.price { font-size: clamp(1.6rem, 2vw, 2.3rem); font-weight: 900; letter-spacing: -0.03em; }
.price-inline { font-size: 1rem; font-weight: 800; color: var(--text); }
.kicker { color: var(--muted-soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  transition: 180ms ease;
}
.btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.btn-primary:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #111827;
}
.btn-secondary {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--muted);
}
.btn-danger {
  background: #fff;
  border-color: #fecaca;
  color: var(--danger-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.badge-warn { background: var(--danger-soft); color: var(--danger-text); }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }
.badge-pending { background: #fff7ed; color: #c2410c; }

.auth-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 28px;
}
.auth-card .muted { font-size: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.inline-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}
.inline-form input,
.inline-form select {
  max-width: 280px;
  margin-top: 0;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters .btn.is-active,
.filters a.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-thumb,
.media-thumb {
  position: relative;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-soft);
  text-align: center;
  padding: 18px;
  font-size: 13px;
}

.product-card h2,
.product-card h3 { font-size: 1.02rem; }
.product-card .muted {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.product-card .actions { margin-top: auto; }

.split-hero {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
}

.panel-soft {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.stat-card strong {
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}
.stat-card-accent {
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  border-color: #fcd34d;
}
.stat-card-dark {
  background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
  border-color: #111827;
  color: #fff;
}
.stat-card-dark .muted,
.stat-card-dark .kicker { color: #d1d5db; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: #f9fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
tbody tr:hover { background: #fcfcfd; }

.detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.list-card {
  padding: 0;
  overflow: hidden;
}
.list-card > .list-head,
.list-card > .list-body {
  padding: 18px 20px;
}
.list-card > .list-head {
  border-bottom: 1px solid var(--line);
  background: #fcfcfd;
}

.inset-card {
  background: #fcfcfd;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}
.alert-ok { background: var(--ok-soft); color: var(--ok-text); }
.alert-warn { background: var(--danger-soft); color: var(--danger-text); }

.audit-block { padding: 8px 0; }
.audit-line { font-size: 13px; line-height: 1.65; }
.audit-raw summary { cursor: pointer; color: var(--muted); }
.audit-raw pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #fcfcfd;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.pagination { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.empty-state {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
}

.hide-mobile { display: initial; }

@media (max-width: 1024px) {
  .split-hero { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container { width: min(100%, calc(100% - 24px)); }
  .nav {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
  }
  .menu { gap: 8px; }
  .menu a { padding: 9px 12px; font-size: 13px; }
  .page { padding: 20px 0 56px; }
  .hero,
  .card { padding: 18px; border-radius: 18px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .table-wrap { margin: 0 -2px; }
  table { min-width: 640px; }
  .hide-mobile { display: none; }
}

.theme-buyer {
  background:
    radial-gradient(circle at top center, rgba(217, 119, 6, 0.14), transparent 22%),
    linear-gradient(180deg, #050505 0%, #0b0b0c 20%, #111214 100%);
  color: #f5f5f4;
}

.theme-buyer .page {
  padding-top: 40px;
  padding-bottom: 80px;
}

.buyer-storefront,
.buyer-detail,
.buyer-auth-shell {
  color: #f5f5f4;
}

.buyer-overline {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #c59048;
}

.buyer-hero,
.buyer-detail-shell,
.buyer-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  padding: 38px;
  border: 1px solid rgba(180, 131, 67, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(12, 12, 13, 0.95), rgba(19, 19, 20, 0.92)),
    radial-gradient(circle at top right, rgba(197, 144, 72, 0.12), transparent 22%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.buyer-hero h1,
.buyer-detail h1,
.buyer-auth-shell h1 {
  color: #f8f5ed;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.buyer-hero-text,
.buyer-auth-copy p,
.buyer-detail-desc,
.buyer-detail-note p,
.buyer-hero-note p {
  color: rgba(245, 245, 244, 0.72);
  font-size: 15px;
  line-height: 1.8;
}

.buyer-hero-panel,
.buyer-detail-pricebox,
.buyer-detail-note,
.buyer-auth-card {
  border: 1px solid rgba(197, 144, 72, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  padding: 24px;
}

.buyer-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.buyer-hero-stat span,
.buyer-hero-stat small,
.buyer-filter-meta span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 10px;
  color: rgba(245, 245, 244, 0.48);
}
.buyer-hero-stat strong {
  display: block;
  font-size: 4rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #f6d08c;
  margin: 8px 0;
}

.buyer-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0 6px;
}
.buyer-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.buyer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(180, 131, 67, 0.22);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 245, 244, 0.8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.buyer-chip.is-active,
.buyer-chip:hover {
  border-color: rgba(246, 208, 140, 0.58);
  color: #0b0b0b;
  background: linear-gradient(180deg, #f0d39d 0%, #c59048 100%);
}

.buyer-filter-meta { text-align: right; }
.buyer-filter-meta strong {
  display: block;
  color: #f6e8c5;
  font-size: 1rem;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

.buyer-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.buyer-product-card {
  border: 1px solid rgba(180, 131, 67, 0.14);
  background: linear-gradient(180deg, rgba(16,16,17,0.96), rgba(10,10,10,0.96));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
}
.buyer-product-media {
  position: relative;
  display: block;
  padding: 14px;
}
.buyer-product-label {
  position: absolute;
  left: 26px;
  top: 26px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #f6d08c;
}
.buyer-product-heart {
  position: absolute;
  right: 24px;
  top: 20px;
  z-index: 2;
  font-size: 20px;
  color: rgba(255,255,255,0.78);
}
.buyer-product-thumb {
  min-height: 330px;
  border-radius: 18px;
  border: 1px solid rgba(197, 144, 72, 0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    radial-gradient(circle at top, rgba(197,144,72,0.12), transparent 34%),
    #121212;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,245,244,0.54);
  text-align: center;
  padding: 20px;
  font-size: 12px;
}
.buyer-product-body { padding: 0 18px 18px; }
.buyer-product-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245,245,244,0.42);
}
.buyer-product-body h2 {
  margin-top: 10px;
  font-size: 1.1rem;
  color: #faf7f1;
}
.buyer-product-desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245,245,244,0.62);
  min-height: 44px;
}
.buyer-product-footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}
.buyer-product-price {
  color: #f3e3bf;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.buyer-product-sub {
  font-size: 11px;
  color: rgba(245,245,244,0.4);
  text-transform: lowercase;
}
.buyer-product-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.buyer-empty {
  padding: 52px 24px;
  border-radius: 24px;
  border: 1px dashed rgba(197, 144, 72, 0.3);
  background: rgba(255,255,255,0.02);
  text-align: center;
}
.buyer-empty h2 { margin: 12px 0 8px; color: #f8f5ed; }
.buyer-empty p:last-child { color: rgba(245,245,244,0.68); }

.buyer-detail-breadcrumb {
  color: rgba(245,245,244,0.46);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.buyer-detail-breadcrumb strong { color: #f3e3bf; }
.buyer-detail-media { position: relative; }
.buyer-detail-thumb {
  min-height: 560px;
  border-radius: 22px;
  border: 1px solid rgba(197, 144, 72, 0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    radial-gradient(circle at top, rgba(197,144,72,0.12), transparent 34%),
    #121212;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,245,244,0.56);
  padding: 24px;
  text-align: center;
}
.buyer-detail-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.buyer-detail-price {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #f6d08c;
}
.buyer-detail-meta {
  color: rgba(245,245,244,0.68);
  font-size: 14px;
}
.buyer-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.buyer-auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.buyer-auth-card {
  color: #f5f5f4;
}
.buyer-auth-card label { color: rgba(245,245,244,0.82); }
.buyer-auth-card input {
  background: rgba(255,255,255,0.04);
  border-color: rgba(197,144,72,0.18);
  color: #fff;
}
.buyer-auth-card input::placeholder { color: rgba(245,245,244,0.34); }

.theme-buyer .btn {
  border-color: rgba(180, 131, 67, 0.24);
  background: rgba(255,255,255,0.02);
  color: #f5f5f4;
}
.theme-buyer .btn-primary {
  background: linear-gradient(180deg, #f0d39d 0%, #c59048 100%);
  border-color: #c59048;
  color: #0b0b0b;
}
.theme-buyer .btn-primary:hover {
  background: linear-gradient(180deg, #f7deaf 0%, #d49e53 100%);
  border-color: #d49e53;
  color: #090909;
}
.theme-buyer .btn-secondary {
  background: transparent;
  border-color: rgba(180, 131, 67, 0.28);
  color: #f0dec0;
}

.theme-buyer .alert-warn {
  background: rgba(127, 29, 29, 0.32);
  color: #fecaca;
}
.theme-buyer .alert-ok {
  background: rgba(6, 95, 70, 0.34);
  color: #bbf7d0;
}

@media (max-width: 1024px) {
}

@media (max-width: 768px) {
  .buyer-filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .buyer-hero,
  .buyer-detail-shell,
  .buyer-auth-shell {
    grid-template-columns: 1fr;
    padding: 24px 18px;
    gap: 22px;
  }
  .buyer-hero h1,
  .buyer-detail h1,
  .buyer-auth-shell h1 {
    font-size: 2.5rem;
  }
  .buyer-product-grid { grid-template-columns: 1fr; }
  .buyer-product-thumb { min-height: 280px; }
  .buyer-detail-thumb { min-height: 360px; }
  .buyer-filter-meta { text-align: left; }
}
