@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500;700&family=SUIT:wght@400;500;600&display=swap");

html[data-theme="dark"] {
  --bg: #20242b;
  --surface: #272d36;
  --surface-soft: #313843;
  --ink: #f4f6f9;
  --muted: #b8c0cb;
  --line: #404956;
  --line-soft: #4d5867;
  --accent: #f4f6f9;
  --accent-ink: #11161d;
  --section-title-size: 20px;
}

* { box-sizing: border-box; }

body {
  color: var(--ink);
  font-family: "SUIT", "Noto Sans KR", sans-serif;
  font-weight: 400;
  background: var(--bg);
}

a {
  color: inherit;
}

.topbar {
  border-bottom-color: transparent !important;
  background: rgba(23, 27, 33, 0.92) !important;
}

.brand {
  color: var(--ink) !important;
  font-weight: 600 !important;
}

.brand-badge {
  background: var(--accent) !important;
  color: #1a1f26 !important;
}

.top-search {
  flex: 0 1 360px;
  min-width: 220px;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0 auto;
  transition: max-width 220ms ease, flex-basis 220ms ease, width 220ms ease;
}

.top-search:focus-within {
  flex-basis: 540px;
  max-width: 560px;
}

.tabs {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 8px !important;
  align-items: center;
}

.tabs .tab {
  padding: 0 !important;
  font-size: 13px;
}

.menu a,
.links a,
.tabs .tab,
.btn,
.sort-btn,
.top-search button,
button {
  border: 0 !important;
  background: transparent !important;
  color: #c6d0dd !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 2px 0 !important;
  transition: color 140ms ease, text-shadow 180ms ease, opacity 140ms ease !important;
}

.menu a:hover,
.links a:hover,
.tabs .tab:hover,
.btn:hover,
.sort-btn:hover,
.top-search button:hover,
button:hover,
.menu a:focus-visible,
.links a:focus-visible,
.tabs .tab:focus-visible,
.btn:focus-visible,
.sort-btn:focus-visible,
.top-search button:focus-visible,
button:focus-visible {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 18px rgba(255, 255, 255, 0.35) !important;
  outline: none !important;
}

/* Preserve category sidebar hierarchy spacing and styles on marketplace/empty-category view */
.category-sidebar-panel .category-row {
  border-radius: 10px !important;
  padding: 7px 8px !important;
  gap: 8px !important;
  text-align: left !important;
  background: transparent !important;
}

.category-sidebar-panel .category-row.level-1 {
  padding-left: 4px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
}

.category-sidebar-panel .category-row.level-2 {
  padding-left: 20px !important;
  font-size: 12px !important;
}

.category-sidebar-panel .category-row.level-3 {
  padding-left: 36px !important;
  font-size: 12px !important;
}

.category-sidebar-panel .category-row:hover,
.category-sidebar-panel .category-row.is-active {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

.tab.active {
  color: #ffffff !important;
  text-decoration: none !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 18px rgba(255, 255, 255, 0.35) !important;
}

.tab-sep {
  color: rgba(206, 216, 228, 0.45);
  user-select: none;
}

.wrap,
.layout,
.split,
.grid {
  color: var(--ink);
}

.panel,
.card,
.top,
.tabs,
.filter-panel,
.form-panel,
.meta-panel,
.summary-panel,
.status-panel,
.review,
details,
.proposal,
.item,
.stat {
  border: 0 !important;
  background: var(--surface) !important;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22) !important;
}

.card {
  background: var(--surface-soft) !important;
}

.crumb,
p,
small,
label,
.panel-head p,
.group label,
.field label,
.meta,
.delivery,
.review .top,
details p {
  color: var(--muted) !important;
  font-weight: 400 !important;
}

h1,
h2,
h3,
h4,
h5,
summary,
.title,
.price,
.rating,
strong {
  color: var(--ink);
  font-weight: 400 !important;
}

/* Keep section-like headings visually consistent with "추천 서비스" size. */
.panel-head h2,
.result-head h2,
.filter-panel h1,
.hero h1,
.side-panel h2,
.block h2,
.order-box h3 {
  font-size: var(--section-title-size) !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

input,
select,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #171c23 !important;
  font-family: "SUIT", "Noto Sans KR", sans-serif !important;
  font-weight: 400 !important;
}

button,
.btn {
  font-size: 13px !important;
}

.btn-main,
.primary,
.top-search button,
.sort-btn.active,
.btn.active,
button.active {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.55), 0 0 18px rgba(255, 255, 255, 0.35) !important;
}

.btn-sub,
.soft,
.ok,
.warn {
  color: #c6d0dd !important;
}

.hero,
.hero-thumb,
.cta {
  border: 0 !important;
}

.success {
  border: 0 !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

pre {
  border: 0 !important;
  background: #13171d !important;
  color: #dce3ea !important;
}
