:root {
  color-scheme: dark;
  --bg: #070b10;
  --panel: rgba(16, 22, 30, 0.86);
  --panel-strong: rgba(20, 27, 37, 0.94);
  --line: rgba(164, 255, 42, 0.18);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #eef4ef;
  --muted: #97a1ad;
  --accent: #a6ff2a;
  --accent-strong: #88da11;
  --yellow: #ffd84d;
  --danger: #ff6678;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(166, 255, 42, 0.13), transparent 30rem),
    radial-gradient(circle at 86% 14%, rgba(33, 119, 255, 0.10), transparent 34rem),
    linear-gradient(180deg, #090e18 0%, #070b10 58%, #05070a 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 72%);
  opacity: 0.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

kbd {
  display: inline-flex;
  align-items: center;
  min-width: 1.9em;
  justify-content: center;
  padding: 0.12rem 0.42rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.55rem;
  color: #eaf2ed;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.ambient,
.grain {
  position: fixed;
  pointer-events: none;
  z-index: -1;
}

.ambient {
  width: 36rem;
  height: 36rem;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.32;
}

.ambient-one {
  top: -14rem;
  left: -10rem;
  background: rgba(166, 255, 42, 0.26);
}

.ambient-two {
  right: -16rem;
  bottom: 2rem;
  background: rgba(62, 132, 255, 0.18);
}

.grain {
  inset: 0;
  opacity: 0.13;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 11, 16, 0.76);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  letter-spacing: 0.18em;
}

.brand img {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 28px rgba(166, 255, 42, 0.18);
}

.brand b {
  display: block;
  font-size: 0.95rem;
}

.brand small {
  display: block;
  margin-top: 0.14rem;
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 900;
}

.top-actions,
.actions,
.result-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.58rem 0.82rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
}

.status-chip i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
}

.status-chip.offline i {
  background: var(--danger);
  box-shadow: 0 0 16px rgba(255, 102, 120, 0.6);
}

.status-chip.online {
  border-color: rgba(166, 255, 42, 0.25);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

main {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 5rem;
}

.hero {
  display: grid;
  gap: 1.7rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 84% 26%, rgba(166, 255, 42, 0.12), transparent 16rem),
    linear-gradient(135deg, rgba(16, 22, 30, 0.92), rgba(8, 12, 18, 0.82));
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow span,
.eyebrow i {
  width: 1.7rem;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(166, 255, 42, 0.5);
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.hero h1 em {
  color: rgba(238, 244, 239, 0.68);
  font-style: normal;
}

.hero p {
  max-width: 780px;
  margin: 0;
  color: #bdc5ce;
  font-size: 1.02rem;
  line-height: 1.85;
}

.hero-compact {
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.4fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.hero-compact h1 {
  margin-top: 0.6rem;
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-compact p {
  margin-top: 0.95rem;
  max-width: 34rem;
}

.hero-compact .search-shell,
.hero-compact .recent-searches,
.hero-compact .notice {
  grid-column: 2;
}

.hero-compact .notice {
  margin-top: -0.45rem;
}

.search-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.75rem;
  align-items: stretch;
}

.search-input-wrap,
.field input,
.field textarea,
.filter-bar input,
.filter-bar select,
.search-shell select {
  border: 1px solid var(--line-soft);
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-input-wrap:focus-within,
.field input:focus,
.field textarea:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-shell select:focus {
  border-color: rgba(166, 255, 42, 0.8);
  box-shadow: 0 0 0 4px rgba(166, 255, 42, 0.12);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.4rem;
  padding: 0 1rem;
  border-radius: 999px;
}

.search-input-wrap svg,
.location-filter svg,
.button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.search-input-wrap input {
  width: 100%;
  border: 0;
  color: inherit;
  background: transparent;
  outline: 0;
}

.search-shell select {
  min-width: 8.8rem;
  padding: 0 1rem;
  border-radius: 999px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  padding: 0 1.15rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 800;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.button:hover,
.text-button:hover {
  transform: translateY(-1px);
  border-color: rgba(166, 255, 42, 0.5);
}

.button-primary {
  border-color: transparent;
  color: #111807;
  background: var(--accent);
  box-shadow: 0 14px 34px rgba(166, 255, 42, 0.22);
}

.button-primary:hover {
  background: #b6ff45;
}

.button-ghost {
  background: transparent;
}

.recent-searches {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-height: 2.35rem;
}

.chip {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  transition: all 0.16s ease;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(166, 255, 42, 0.5);
}

.workflow-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.panel,
.dashboard,
.welcome article {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.panel {
  padding: 1.2rem;
}

.panel-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.panel h2,
.dashboard h2,
.welcome h3 {
  margin: 0;
}

.panel p,
.steps,
.hint,
.result-meta {
  color: var(--muted);
  line-height: 1.75;
}

.step {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 1rem;
  color: #111807;
  background: var(--accent);
  font-weight: 950;
}

.steps {
  margin: 0;
  padding-left: 1.35rem;
}

.steps li + li {
  margin-top: 0.75rem;
}

.hint {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px dashed rgba(166, 255, 42, 0.25);
  border-radius: 1rem;
  background: rgba(166, 255, 42, 0.045);
}

.field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.field span {
  color: var(--muted);
  font-size: 0.82rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.notice {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.notice.error {
  color: #ffd1d7;
}

.dashboard {
  margin-top: 1rem;
  padding: 1.2rem;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.dashboard h2 {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
}

.dashboard h2 b {
  color: var(--accent);
  font-size: 0.72em;
}

.filter-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.price-filter,
.location-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.price-filter input,
.location-filter input,
.filter-bar select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.price-filter input {
  width: 5rem;
}

.location-filter input {
  width: 100%;
}

.filter-bar select {
  min-height: 3rem;
  padding: 0 0.9rem;
  border-radius: 999px;
}

.text-button {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  min-height: 3rem;
  padding: 0 0.95rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 1.3rem;
  background: var(--panel-strong);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 255, 42, 0.38);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

.product-card.is-reading-detail {
  border-color: rgba(166, 255, 42, 0.72);
  box-shadow: 0 0 0 1px rgba(166, 255, 42, 0.24), 0 24px 60px rgba(0, 0, 0, 0.46);
}

.product-card.is-reading-detail .image-wrap::after {
  content: "正在读取详情";
  position: absolute;
  inset: auto 0.75rem 0.75rem 0.75rem;
  z-index: 3;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
  color: #101807;
  background: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 12px 32px rgba(166, 255, 42, 0.24);
}

.product-link {
  display: grid;
  min-height: 100%;
}

.image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.18;
  background: rgba(255, 255, 255, 0.045);
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.new-badge,
.image-fallback {
  position: absolute;
  inset: auto 0.75rem 0.75rem auto;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: #111807;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.image-fallback {
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.07);
}

.card-body {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
}

.card-body h3 {
  margin: 0;
  min-height: 3.1em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.98rem;
  line-height: 1.55;
}

.booth-match {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  margin: 0 0.85rem 0.9rem;
  padding: 0.62rem;
  border: 1px solid rgba(166, 255, 42, 0.26);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(166, 255, 42, 0.12), rgba(255, 255, 255, 0.035));
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.booth-match:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 255, 42, 0.55);
  background: linear-gradient(135deg, rgba(166, 255, 42, 0.18), rgba(255, 255, 255, 0.055));
}

.booth-match img,
.booth-match-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.78rem;
  object-fit: cover;
  background: rgba(166, 255, 42, 0.13);
}

.booth-match-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 950;
}

.booth-match span {
  min-width: 0;
}

.booth-match small {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.booth-match b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #f4f8ef;
  font-size: 0.78rem;
  line-height: 1.35;
}

.booth-match em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.22rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  line-height: 1.38;
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 0.18rem;
  color: var(--accent);
}

.card-price strong {
  font-size: 1.4rem;
  letter-spacing: -0.04em;
}

.price-note {
  margin-left: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.empty-state,
.empty {
  display: grid;
  place-items: center;
  min-height: 13rem;
  padding: 2rem;
  border: 1px dashed rgba(166, 255, 42, 0.24);
  border-radius: 1.4rem;
  color: var(--muted);
  text-align: center;
}

.empty-state span {
  font-size: 2.6rem;
}

.welcome {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.welcome article {
  display: flex;
  gap: 1rem;
  padding: 1.1rem;
}

.feature-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 1rem;
  color: #111807;
  font-weight: 950;
  flex: 0 0 auto;
}

.feature-icon.yellow {
  background: var(--yellow);
}

.feature-icon.mint {
  background: var(--accent);
}

.feature-icon.coral {
  background: #ff8c67;
}

.welcome p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: grid;
  gap: 0.75rem;
  width: min(360px, calc(100vw - 2rem));
}

.toast {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  background: rgba(16, 22, 30, 0.95);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.18s ease both;
}

.toast strong {
  display: block;
  margin-bottom: 0.2rem;
}

.toast span {
  color: var(--muted);
  font-size: 0.9rem;
}

.toast.error {
  border-color: rgba(255, 102, 120, 0.35);
}

.catalog-page {
  width: min(1380px, calc(100% - clamp(1rem, 6vw, 8rem)));
  padding-top: clamp(2.4rem, 5vw, 4.6rem);
}

.catalog-section {
  display: grid;
  gap: 1.25rem;
}

.catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 0.25rem;
}

.catalog-header h1 {
  margin: 0.32rem 0 0;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.catalog-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.controls-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(160px, 190px) minmax(120px, 140px) auto auto;
  gap: 0.75rem;
  align-items: stretch;
}

.catalog-search-field,
.catalog-control,
.xianyu-filter-row .price-filter,
.xianyu-filter-row .location-filter {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.catalog-search-field:focus-within,
.catalog-control:focus-within,
.xianyu-filter-row .price-filter:focus-within,
.xianyu-filter-row .location-filter:focus-within {
  border-color: rgba(166, 255, 42, 0.85);
  box-shadow: 0 0 0 4px rgba(166, 255, 42, 0.10);
  background: rgba(255, 255, 255, 0.065);
}

.catalog-search-field {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.8rem;
  padding: 0 1.05rem;
  border-radius: 1.15rem;
}

.catalog-search-field svg,
.search-mode-note svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.catalog-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-height: 3.8rem;
  padding: 0 0.95rem;
  border-radius: 1.15rem;
}

.catalog-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.catalog-control select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-weight: 800;
}

.catalog-control.compact {
  grid-template-columns: 1fr;
  gap: 0.08rem;
}

.quick-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.quick-searches {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.quick-searches > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.booth-match-button {
  min-height: 2.65rem;
  white-space: nowrap;
}

.search-mode-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 3.4rem;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(70, 177, 255, 0.22);
  border-radius: 1.1rem;
  background: rgba(9, 20, 29, 0.72);
}

.search-mode-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-mode-note a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #dce6ed;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.search-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(70, 177, 255, 0.38);
  border-radius: 999px;
  color: #87d9ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.search-mode-badge i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.xianyu-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(240px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.category-strip-wrap {
  position: relative;
  overflow: hidden;
}

.category-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.35rem;
  scrollbar-width: thin;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 128px;
  padding: 0.75rem 0.92rem;
  border: 1px solid var(--line-soft);
  border-radius: 1.05rem;
  color: #dfe8e2;
  background: rgba(255, 255, 255, 0.035);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 255, 42, 0.34);
}

.category-pill.active {
  border-color: rgba(166, 255, 42, 0.72);
  background: rgba(166, 255, 42, 0.11);
}

.category-pill b,
.category-pill small {
  display: block;
}

.category-pill b {
  font-size: 0.88rem;
}

.category-pill small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.category-orb {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  color: var(--accent);
  background: rgba(166, 255, 42, 0.12);
  font-weight: 950;
}

.category-orb.pink {
  color: #ff8fc9;
  background: rgba(255, 143, 201, 0.12);
}

.category-orb.cyan {
  color: #7bdcff;
  background: rgba(123, 220, 255, 0.12);
}

.category-orb.purple {
  color: #bba4ff;
  background: rgba(187, 164, 255, 0.12);
}

.category-orb.amber {
  color: #ffcd69;
  background: rgba(255, 205, 105, 0.12);
}

.category-orb.teal {
  color: #62e5ce;
  background: rgba(98, 229, 206, 0.12);
}

.strip-fade {
  position: absolute;
  inset: 0 0 0 auto;
  width: 4rem;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(7, 11, 16, 0.9));
}

.catalog-results {
  margin-top: 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compact-heading {
  align-items: center;
  margin-bottom: 1rem;
}

.compact-heading h2 {
  font-size: 1.05rem;
  letter-spacing: 0;
}

.compact-heading h2 span {
  color: var(--muted);
  font-weight: 700;
}

.compact-heading h2 b {
  color: var(--text);
}

.xianyu-catalog .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.05rem;
}

.xianyu-catalog .product-card {
  border-radius: 1.15rem;
  background:
    linear-gradient(180deg, rgba(17, 24, 34, 0.98), rgba(12, 17, 24, 0.98));
}

.xianyu-catalog .image-wrap {
  aspect-ratio: 1.15;
}

.card-category-badge {
  position: absolute;
  inset: 0.72rem auto auto 0.72rem;
  max-width: calc(100% - 4.8rem);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  color: #f2f8ef;
  background: rgba(12, 17, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 980px) {
  .topbar,
  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-compact {
    grid-template-columns: 1fr;
  }

  .hero-compact .search-shell,
  .hero-compact .recent-searches,
  .hero-compact .notice {
    grid-column: auto;
  }

  .search-shell,
  .controls-shell,
  .xianyu-filter-row,
  .workflow-grid,
  .filter-bar,
  .welcome {
    grid-template-columns: 1fr;
  }

  .catalog-header,
  .quick-tools,
  .search-mode-note {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

@media (max-width: 620px) {
  main {
    width: min(100% - 1rem, 1240px);
    padding-top: 1rem;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 18vw, 4.7rem);
  }

  .hero-compact h1 {
    font-size: clamp(2.4rem, 14vw, 4rem);
  }

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

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

  .catalog-page {
    width: min(100% - 1rem, 1240px);
  }

  .xianyu-catalog .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .category-pill {
    min-width: 112px;
  }

  .top-actions {
    width: 100%;
  }
}

.admin-locked main {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.admin-lock {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 6, 10, 0.68);
  backdrop-filter: blur(18px);
}

.admin-lock-card {
  width: min(560px, 100%);
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid rgba(166, 255, 42, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 16% 0%, rgba(166, 255, 42, 0.15), transparent 18rem),
    rgba(15, 21, 30, 0.96);
  box-shadow: var(--shadow);
}

.admin-lock-card img {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

.admin-lock-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
}

.admin-lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.admin-lock-error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 102, 120, 0.25);
  border-radius: 16px;
  color: #ffc3cb;
  background: rgba(255, 102, 120, 0.08);
}

.admin-lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.xianyu-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(18px);
  animation: xianyu-modal-fade 0.16s ease both;
}

.xianyu-modal-backdrop.is-closing {
  animation: xianyu-modal-fade-out 0.14s ease both;
}

.xianyu-preview-modal {
  position: relative;
  width: min(980px, calc(100vw - 2rem));
  max-height: min(860px, calc(100vh - 2rem));
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(166, 255, 42, 0.26);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(13, 20, 30, 0.98), rgba(9, 13, 20, 0.98)),
    var(--panel-strong);
  box-shadow: 0 38px 120px rgba(0, 0, 0, 0.62);
  animation: xianyu-modal-pop 0.18s cubic-bezier(.2, .9, .2, 1) both;
}

.xianyu-preview-media {
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(166, 255, 42, 0.08), transparent 18rem),
    #080d15;
}

.xianyu-preview-media img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  display: block;
}

.xianyu-preview-info {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: auto;
}

.xianyu-preview-info h2 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.xianyu-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.xianyu-preview-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #dbe5de;
  background: rgba(255, 255, 255, 0.045);
}

.xianyu-preview-actions {
  display: flex;
  gap: 0.7rem;
  margin: 1rem 0 1.2rem;
}

.xianyu-preview-actions .button {
  width: 100%;
  justify-content: center;
}

.preview-match-block {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(166, 255, 42, 0.18);
  border-radius: 20px;
  background: rgba(166, 255, 42, 0.045);
}

.preview-match-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.preview-booth-match {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(4, 8, 13, 0.62);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.preview-booth-match + .preview-booth-match {
  margin-top: 0.65rem;
}

.preview-booth-match:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 255, 42, 0.38);
  background: rgba(166, 255, 42, 0.08);
}

.preview-booth-match img,
.preview-booth-thumb {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.preview-booth-thumb,
.preview-image-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.preview-booth-match b {
  display: block;
  overflow: hidden;
  color: #f2f8f3;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-booth-match small {
  display: block;
  margin-top: 0.25rem;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-booth-match em {
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.preview-booth-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.preview-image-fallback {
  width: 100%;
  min-height: 420px;
  color: var(--muted);
}

.modal-close-button {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #f5faf6;
  background: rgba(10, 15, 22, 0.76);
}

.modal-close-button:hover {
  border-color: rgba(166, 255, 42, 0.42);
  background: rgba(166, 255, 42, 0.12);
}

@keyframes xianyu-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes xianyu-modal-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes xianyu-modal-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  .xianyu-preview-modal {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .xianyu-preview-media,
  .xianyu-preview-media img,
  .preview-image-fallback {
    min-height: 280px;
    max-height: 52vh;
  }

  .preview-booth-match {
    grid-template-columns: 4rem minmax(0, 1fr);
  }

  .preview-booth-match em {
    display: none;
  }
}
