:root {
  --background: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --text: #1f2933;
  --muted: #74808c;
  --line: #e2e7eb;
  --brand: #ff841a;
  --brand-dark: #8b4304;
  --brand-soft: #fff2e5;
  --blue: #2d67c8;
  --blue-soft: #edf4ff;
  --positive: #13845f;
  --negative: #d34a4a;
  --warning: #a96b00;
  --shadow: 0 14px 42px rgba(28, 39, 49, 0.08);
  --radius-lg: 20px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(45, 103, 200, 0.18);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.site-header {
  min-height: 154px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 193, 123, 0.28), transparent 30%),
    linear-gradient(135deg, #2b3540 0%, #1f2933 58%, #34414d 100%);
}

.header-inner,
.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border-radius: 17px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 155, 66, 0.38);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(255, 126, 31, 0.08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.0);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.beta-badge {
  padding: 5px 9px;
  color: #ffe8d4;
  background: rgba(255, 132, 26, 0.14);
  border: 1px solid rgba(255, 181, 115, 0.26);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.page-shell {
  margin-top: -62px;
  padding-bottom: 52px;
}

.surface-card,
.search-card,
.state-card {
  background: var(--surface);
  border: 1px solid rgba(224, 230, 235, 0.95);
  box-shadow: var(--shadow);
}

.search-card {
  padding: 23px;
  border-radius: var(--radius-lg);
}

.search-copy h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.24;
  letter-spacing: -0.045em;
}

.search-copy p,
.section-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.section-kicker,
.control-label,
.summary-label,
.item-eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.015em;
}

.search-box {
  position: relative;
  margin-top: 18px;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: #84909a;
  font-size: 19px;
}

.search-box input {
  width: 100%;
  padding: 15px 16px 15px 46px;
  color: var(--text);
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
}

.search-box input:focus {
  background: #fff;
  border-color: #f1a15d;
  box-shadow: 0 0 0 4px rgba(255, 132, 26, 0.09);
}

.item-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.item-result-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 11px;
  color: #4f5b66;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.item-result-button:hover {
  border-color: #f1b47d;
}

.item-result-button.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: #ffb36e;
}

.item-result-thumb {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  background: #f5f7f9;
  border-radius: 7px;
}

.item-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-empty,
.state-card {
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.state-card {
  margin-top: 14px;
  padding: 48px 20px;
  border-radius: var(--radius-lg);
}

.error {
  color: var(--negative);
}

.detail {
  margin-top: 14px;
}

.item-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.item-main {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.item-image {
  display: grid;
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  place-items: center;
  overflow: hidden;
  color: var(--brand-dark);
  background: linear-gradient(145deg, #fff7ef, #ffe6ce);
  border: 1px solid #ffdbc0;
  border-radius: 18px;
  font-size: 28px;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-copy {
  min-width: 0;
}

.item-copy h2 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-guide {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.freshness-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.freshness-chip {
  padding: 5px 8px;
  color: #5b6671;
  background: #f1f4f6;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.freshness-chip.warning {
  color: var(--warning);
  background: #fff4d8;
}

.world-control {
  flex: 0 0 auto;
}

.world-control .control-label {
  display: block;
  margin-bottom: 7px;
  text-align: right;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  background: #eff2f4;
  border-radius: 11px;
}

.segment {
  padding: 8px 11px;
  color: #6d7782;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.segment.active {
  color: #25303a;
  background: #fff;
  box-shadow: 0 2px 7px rgba(28, 40, 52, 0.1);
}

.equipment-panel,
.content-card {
  margin-top: 14px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-title-row.compact {
  align-items: center;
}

.section-title-row h3,
.filter-heading-row h4 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.text-button,
.secondary-button,
.load-more-button {
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}

.text-button {
  padding: 8px 10px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 0;
  border-radius: 9px;
}

.secondary-button {
  padding: 9px 12px;
  color: #5e6873;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.group-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.group-card {
  min-width: 0;
  padding: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.15s ease;
}

.group-card:hover {
  border-color: #f4ad6c;
  transform: translateY(-1px);
}

.group-card.active {
  background: var(--brand-soft);
  border-color: #ffa652;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, 0.08);
}

.group-card-title {
  display: block;
  color: #303b46;
  font-size: 13px;
  font-weight: 850;
}

.group-card-subtitle {
  display: block;
  min-height: 32px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.group-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.group-card-meta strong {
  color: #8a4203;
  font-size: 17px;
}

.group-card-meta span {
  color: var(--muted);
  font-size: 11px;
}

.filter-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.filter-heading-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.filter-grid label span,
.sort-control span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.filter-grid select,
.sort-control select {
  width: 100%;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 32px;
  margin-top: 13px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: #6c420f;
  background: #fff8ee;
  border: 1px solid #ffe0bc;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.filter-chip button {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  padding: 0;
  color: #8d5b20;
  background: rgba(255, 132, 26, 0.11);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.no-filter-chip {
  color: var(--muted);
  font-size: 11px;
  line-height: 32px;
}

.price-summary {
  display: grid;
  grid-template-columns: minmax(270px, 1.08fr) minmax(0, 2fr);
  gap: 14px;
  margin-top: 14px;
}

.price-hero-card,
.metric-card {
  border-radius: var(--radius-md);
}

.price-hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 152px;
  padding: 22px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 179, 109, 0.28), transparent 38%),
    #fff;
}

.latest-price {
  margin-top: 5px;
  color: #202a34;
  font-size: clamp(30px, 4.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.latest-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}

.metric-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.metric-card strong {
  margin-top: 7px;
  color: #27323d;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.metric-card small {
  margin-top: 7px;
  color: #929ca5;
  font-size: 10px;
  line-height: 1.45;
}

.chart-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.switch-control input {
  accent-color: var(--brand);
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 292px;
  margin-top: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 138, 31, 0.035), transparent 64%);
  border: 1px solid #edf0f3;
  border-radius: 14px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 292px;
}

.chart-empty,
.sales-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.chart-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 240px;
  padding: 9px 10px;
  color: #fff;
  background: rgba(27, 35, 43, 0.94);
  border-radius: 9px;
  pointer-events: none;
  font-size: 10px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(18, 25, 31, 0.24);
}

.trades-heading {
  align-items: flex-start;
}

.count-badge {
  padding: 5px 9px;
  color: #5f6973;
  background: #f1f4f6;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.trade-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.sort-control {
  width: min(220px, 100%);
}

.sales-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.sale-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.sale-main {
  display: grid;
  grid-template-columns: minmax(150px, 0.68fr) minmax(0, 1.5fr) auto;
  gap: 17px;
  align-items: start;
  padding: 16px;
}

.sale-price {
  color: #1f2a34;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.sale-delta {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.sale-delta.up {
  color: var(--negative);
  background: #fff0f0;
}

.sale-delta.down {
  color: var(--positive);
  background: #eaf8f2;
}

.sale-delta.neutral {
  color: #66717b;
  background: #f0f3f5;
}

.sale-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.sale-badges,
.influence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sale-badge,
.world-badge,
.influence-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.sale-badge {
  color: #47525d;
  background: #f0f3f6;
}

.sale-badge.potential {
  color: #7a3e00;
  background: #fff0df;
}

.sale-badge.additional {
  color: #244fa7;
  background: #edf3ff;
}

.world-badge.reference {
  color: #6c3605;
  background: #ffe9d2;
}

.world-badge.other {
  color: #53616e;
  background: #eef1f4;
}

.influence-chips {
  margin-top: 9px;
}

.influence-chip {
  color: #6b4b11;
  background: #fff6d9;
  border: 1px solid #ffe7a5;
}

.option-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.option-block {
  min-width: 0;
  padding: 10px 11px;
  background: var(--surface-2);
  border-radius: 11px;
}

.option-title {
  color: #6d7781;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.option-lines {
  display: grid;
  gap: 3px;
  margin-top: 6px;
}

.option-line {
  overflow: hidden;
  color: #303b45;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-line.empty {
  color: #a0a8af;
}

.sale-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.detail-toggle {
  padding: 7px 9px;
  color: #54606b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
}

.sale-details {
  padding: 0 16px 16px;
}

.detail-loading {
  padding: 13px;
  color: var(--muted);
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.detail-item {
  min-width: 0;
}

.detail-item.wide {
  grid-column: 1 / -1;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.detail-item strong,
.detail-item p {
  display: block;
  margin: 4px 0 0;
  color: #3f4a55;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.compare-header,
.compare-row {
  display: grid;
  grid-template-columns: 115px 115px 125px minmax(150px, 1fr) minmax(160px, 1.15fr) minmax(150px, 1fr) 60px;
  gap: 10px;
  align-items: start;
}

.compare-header {
  padding: 10px 13px;
  color: var(--muted);
  background: #f5f7f8;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 9px;
  font-weight: 900;
}

.compare-sort-button,
.compare-static-header {
  min-width: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.compare-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  cursor: pointer;
}

.compare-sort-button b {
  color: #9aa3ab;
  font-size: 10px;
}

.compare-sort-button:hover,
.compare-sort-button.active {
  color: #245db4;
}

.compare-sort-button.active b {
  color: #245db4;
}

.compare-sort-button:focus-visible {
  outline: 2px solid rgba(45, 103, 200, 0.35);
  outline-offset: 3px;
  border-radius: 4px;
}

.compare-row {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 10px;
}

.compare-cell {
  min-width: 0;
  color: #35404a;
  line-height: 1.45;
}

.compare-cell strong {
  display: block;
  color: #202a33;
  font-size: 14px;
}

.compare-cell .muted {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.compare-lines {
  display: grid;
  gap: 2px;
}

.compare-lines span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-more-button {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  color: #53606b;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.site-footer {
  padding: 24px 16px 34px;
  color: #8c96a0;
  text-align: center;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .group-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-summary {
    grid-template-columns: 1fr;
  }

  .sale-main {
    grid-template-columns: minmax(135px, 0.6fr) minmax(0, 1.4fr);
  }

  .sale-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .compare-header {
    display: none;
  }

  .compare-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .header-inner,
  .page-shell {
    width: min(100% - 20px, 1120px);
  }

  .header-inner {
    padding-top: 15px;
  }

  .page-shell {
    margin-top: -58px;
  }

  .search-card,
  .item-overview,
  .equipment-panel,
  .content-card {
    border-radius: 16px;
  }

  .search-card,
  .equipment-panel,
  .content-card {
    padding: 16px;
  }

  .item-results {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .item-result-button {
    flex: 0 0 auto;
  }

  .item-overview {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .world-control,
  .world-control .control-label {
    width: 100%;
    text-align: left;
  }

  .world-control .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .group-cards {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .group-card {
    flex: 0 0 245px;
  }

  .filter-heading-row,
  .section-title-row,
  .trade-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .chart-controls {
    justify-content: flex-start;
  }

  .chart-controls .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .trade-toolbar .segmented-control {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .sort-control {
    width: 100%;
  }

  .sale-main {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .option-summary-grid {
    grid-template-columns: 1fr;
  }

  .sale-side {
    grid-column: auto;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .brand-copy small,
  .beta-badge {
    display: none;
  }

  .search-copy p {
    font-size: 11px;
  }

  .item-main {
    align-items: flex-start;
  }

  .item-image {
    width: 58px;
    height: 58px;
  }

  .filter-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-card:last-child {
    grid-column: auto;
  }
}


/* v4.1 */
.sort-control select {
  min-width: 220px;
}

@media (max-width: 700px) {
  .sort-control select {
    min-width: 0;
  }
}


/* v5 상세 옵션 검색 */
.group-selection-notice {
  margin: 9px 0 0;
  color: #8a6b42;
  font-size: 10px;
  line-height: 1.5;
}

.advanced-search-shell {
  margin-top: 17px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}

.advanced-search-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  color: #24313d;
  background: linear-gradient(135deg, #fff8ef, #fff);
  border: 1px solid #ffd7ad;
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
}

.advanced-search-toggle span {
  display: grid;
  gap: 3px;
}

.advanced-search-toggle strong {
  font-size: 14px;
}

.advanced-search-toggle small {
  color: #8a7057;
  font-size: 10px;
}

.advanced-search-toggle b {
  color: #9b500c;
  font-size: 11px;
}

.advanced-search-panel {
  margin-top: 10px;
  padding: 17px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.advanced-search-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.advanced-search-heading h4 {
  margin: 3px 0 0;
  font-size: 17px;
}

.advanced-search-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.search-scope-note {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #64717d;
  background: #eef2f5;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
}

.smart-query-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 14px;
}

.smart-query-box textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 13px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d9e0e5;
  border-radius: 12px;
  line-height: 1.55;
}

.smart-query-box textarea:focus {
  border-color: #f0a45d;
  outline: 3px solid rgba(255, 132, 26, 0.11);
}

.primary-search-button {
  align-self: stretch;
  min-width: 104px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(145deg, #ff931f, #f7790d);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.query-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.query-preset-row button {
  padding: 6px 8px;
  color: #6a4b28;
  background: #fff7ed;
  border: 1px solid #ffe0bd;
  border-radius: 999px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.parsed-condition-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 38px;
  margin-top: 12px;
  padding: 10px;
  background: #fff;
  border: 1px dashed #dce2e7;
  border-radius: 12px;
}

.smart-condition-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  color: #29528c;
  background: #eef5ff;
  border: 1px solid #d7e6ff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
}

.smart-condition-chip button {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  padding: 0;
  color: #426ba1;
  background: #dceaff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.smart-condition-chip.error-chip {
  color: #a54a40;
  background: #fff1ef;
  border-color: #ffd8d2;
}

.smart-preview-empty {
  align-self: center;
  color: #99a2aa;
  font-size: 10px;
}

.smart-search-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.smart-search-settings fieldset {
  min-width: 0;
  margin: 0;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.smart-search-settings legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.smart-search-settings small {
  display: block;
  margin-top: 7px;
  color: #8d979f;
  font-size: 9px;
  line-height: 1.4;
}

.smart-search-settings select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.switch-control.prominent {
  color: #35434f;
  font-size: 10px;
}

.condition-builder {
  margin-top: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.condition-builder summary {
  padding: 11px 12px;
  cursor: pointer;
  color: #51606d;
  font-size: 10px;
  font-weight: 850;
}

.condition-builder-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.2fr 0.9fr 0.75fr 0.75fr auto;
  gap: 7px;
  align-items: end;
  padding: 0 11px 11px;
}

.condition-builder-grid label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.condition-builder-grid select,
.condition-builder-grid input {
  width: 100%;
  padding: 9px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.builder-add-button {
  min-height: 37px;
  white-space: nowrap;
}

.advanced-search-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.smart-search-status {
  margin: 0;
  color: #68747f;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.smart-search-status strong {
  color: #265aa9;
}

.smart-search-status span {
  display: block;
  margin-top: 2px;
}

@media (max-width: 860px) {
  .smart-search-settings {
    grid-template-columns: 1fr;
  }

  .condition-builder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-add-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .advanced-search-heading,
  .advanced-search-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-scope-note {
    align-self: flex-start;
  }

  .smart-query-box {
    grid-template-columns: 1fr;
  }

  .primary-search-button {
    min-height: 42px;
  }

  .condition-builder-grid {
    grid-template-columns: 1fr;
  }

  .builder-add-button {
    grid-column: auto;
  }

  .smart-search-status {
    text-align: left;
  }
}


/* v5.1: 클릭형 상세검색 */
.visual-condition-picker {
  display: grid;
  gap: 12px;
}

.picker-step {
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.picker-step-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.picker-step-heading > div {
  display: grid;
  gap: 2px;
}

.picker-step-heading strong {
  font-size: 14px;
}

.picker-step-heading small,
.selected-search-heading small {
  color: var(--muted);
  font-size: 11px;
}

.picker-step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  color: #ffffff;
  background: #2d67c8;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.picker-section-row,
.picker-option-buttons,
.picker-value-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.picker-section,
.picker-option,
.picker-value-presets button {
  min-height: 38px;
  padding: 8px 13px;
  color: #4d5964;
  background: #f6f8fa;
  border: 1px solid #dfe5ea;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.picker-section:hover,
.picker-option:hover,
.picker-value-presets button:hover {
  color: #245db4;
  border-color: #9db8e8;
}

.picker-section.active,
.picker-option.active {
  color: #174f9f;
  background: #edf4ff;
  border-color: #7fa6e5;
  box-shadow: inset 0 0 0 1px rgba(45, 103, 200, 0.12);
}

.picker-option-buttons {
  max-height: 152px;
  overflow: auto;
  padding-right: 3px;
}

.picker-value-panel {
  background: #f8fbff;
  border-color: #cdddf5;
}

.picker-value-presets button {
  color: #174f9f;
  background: #ffffff;
  border-color: #b9cdea;
}

.picker-value-presets .presence-preset {
  color: #5e6872;
  border-style: dashed;
}

.picker-custom-row {
  display: grid;
  grid-template-columns: 130px minmax(110px, 1fr) 110px auto;
  gap: 8px;
  margin-top: 12px;
}

.picker-custom-row select,
.picker-custom-row input {
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
}

.selected-search-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

.manual-query-details {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.manual-query-details summary {
  color: #59646e;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.manual-query-details > p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.manual-query-details .smart-query-box {
  margin-top: 0;
}

@media (max-width: 700px) {
  .picker-step {
    padding: 13px;
  }

  .picker-section-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picker-section {
    width: 100%;
  }

  .picker-option,
  .picker-value-presets button {
    flex: 1 0 calc(33.333% - 7px);
    min-width: 82px;
  }

  .picker-custom-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .picker-custom-row .secondary-button {
    grid-column: 1 / -1;
  }

  .selected-search-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .picker-option,
  .picker-value-presets button {
    flex-basis: calc(50% - 7px);
  }
}


/* V6.0 공개 테스트: 요청, 최신성, 운영 피드백 */
.community-card{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px;
}
.community-card h2{margin:4px 0 7px;font-size:20px}
.community-card p{margin:0;color:var(--muted);line-height:1.6}
.community-actions{display:flex;gap:9px;flex-wrap:wrap}
.primary-request-button{
  border:0;
  border-radius:10px;
  padding:11px 15px;
  background:#1f6f4a;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.primary-request-button:disabled{opacity:.55;cursor:wait}
.result-empty-action{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.result-empty-action button{
  border:1px solid #b9c9bf;
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  cursor:pointer;
}
.freshness-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:9px}
.freshness-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  background:#edf7f1;
  color:#226343;
  font-size:12px;
  font-weight:800;
}
.freshness-detail{font-size:12px;color:var(--muted)}
.feedback-modal[hidden]{display:none}
.feedback-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:18px}
.feedback-backdrop{position:absolute;inset:0;background:rgba(20,29,24,.55)}
.feedback-dialog{
  position:relative;
  width:min(560px,100%);
  max-height:calc(100vh - 36px);
  overflow:auto;
  background:#fff;
  border-radius:16px;
  box-shadow:0 24px 70px rgba(0,0,0,.25);
  padding:22px;
}
.feedback-heading{display:flex;justify-content:space-between;gap:12px;align-items:start;margin-bottom:18px}
.feedback-heading h2{margin:4px 0 0}
.feedback-close{border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer}
.feedback-dialog form{display:grid;gap:14px}
.feedback-dialog label{display:grid;gap:6px;font-weight:800;font-size:13px}
.feedback-dialog input,.feedback-dialog select,.feedback-dialog textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid #cfd8d2;
  border-radius:10px;
  padding:10px 11px;
  font:inherit;
}
.feedback-dialog textarea{resize:vertical}
.feedback-actions{display:flex;justify-content:flex-end;gap:8px}
.feedback-status{min-height:20px;color:#1f6f4a;font-size:13px}
.feedback-honeypot{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important}
.modal-open{overflow:hidden}
.admin-link{color:inherit;font-size:11px;opacity:.65}
@media(max-width:700px){
  .community-card{align-items:stretch;flex-direction:column}
  .community-actions>*{flex:1}
}
