:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --text: #1a1f2e;
  --text-2: #4b5563;
  --muted: #8b9089;
  --border: #e6e2d9;
  --border-2: #d9d4c9;
  --primary: #1e3a5f;
  --primary-2: #2a4d75;
  --primary-soft: rgba(30, 58, 95, 0.08);
  --accent: #c9a227;
  --accent-2: #b08d1c;
  --accent-soft: rgba(201, 162, 39, 0.12);
  --danger: #b91c1c;
  --success: #0f766e;
  --shadow: 0 1px 3px rgba(26, 31, 46, 0.05), 0 8px 24px rgba(26, 31, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 31, 46, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --maxw: 1280px;
  --header-h: 68px;
  --subnav-h: 116px;
  --pad: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: transparent; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-img {
  height: 34px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.logo-tagline {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: none; /* 默认隐藏（小屏挤压），>=880px 显示 */
}
.logo-tagline b {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 9.5px;
}
@media (min-width: 880px) {
  .logo-tagline { display: block; }
}

.top-search {
  flex: 1;
  max-width: 560px;
  height: 42px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 16px;
  transition: border-color .2s, box-shadow .2s;
}
.top-search:focus-within {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}
.top-search .icon {
  width: 18px; height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}
.top-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0 10px;
  font-size: 14px;
  color: var(--text);
}
.top-search input::placeholder { color: var(--muted); }
.search-clear {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, background .2s;
}
.search-clear.visible { opacity: 1; pointer-events: auto; }
.search-clear:hover { background: var(--border); }
.search-clear .icon { width: 14px; height: 14px; }
.top-search kbd {
  display: none;
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--border-2);
  border-radius: 5px;
  color: var(--muted);
  margin-left: 4px;
}
@media (min-width: 900px) { .top-search kbd { display: inline-block; } }

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  transition: color .2s, background .2s;
}
.btn-text:hover { color: var(--primary); background: var(--primary-soft); }
.btn-primary {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 9px 16px;
  border-radius: var(--radius-xs);
  box-shadow: 0 1px 2px rgba(30,58,95,.12);
  transition: transform .15s, background .2s, box-shadow .2s;
}
.btn-primary:hover { background: var(--primary-2); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-2);
  background: var(--surface);
  transition: background .2s;
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-on { color: var(--primary) !important; border-color: var(--primary) !important; background: var(--primary-soft) !important; font-weight: 600; }

/* Hero */
.hero {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(247,245,240,.98) 0%, rgba(247,245,240,.86) 40%, rgba(247,245,240,.45) 62%, rgba(247,245,240,0) 76%);
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--pad) 56px;
  position: relative;
  z-index: 2;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 20px;
}
.hero-kicker::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
}
.hero-title {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 500;
  line-height: 1.18;
  color: var(--text);
  margin: 0 0 20px;
  max-width: 760px;
}
.hero-title em, .hero-title i, .hero-title span.hl {
  font-style: normal;
  color: var(--primary-2);
}
.hero-lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 620px;
  margin: 0 0 32px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
}
.stat b {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}
.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 55%;
}
@media (max-width: 900px) {
  .hero-visual img { object-position: 60% 55%; }
}
@media (max-width: 720px) {
  .hero::before { background: linear-gradient(180deg, rgba(247,245,240,.97) 0%, rgba(247,245,240,.78) 52%, rgba(247,245,240,.35) 80%, rgba(247,245,240,0) 100%); }
  .hero-visual img { object-position: 58% 40%; }
}

/* Subnav */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 0 10px;
}
.subnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.dimbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.dim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.dim .icon { width: 15px; height: 15px; }
.dim:hover { border-color: var(--border-2); background: var(--surface-2); }
.dim.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(30,58,95,.18);
}
.dim.active .icon { color: #fff; }
.dim[data-dim="all"] { padding: 0 18px; }
.dim-more { margin-left: auto; }
.dim-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 0;
}
.active-tags:empty { display: none; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid rgba(201,162,39,.25);
  border-radius: 999px;
}
.tag-chip button {
  display: grid; place-items: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  color: var(--accent-2);
}
.tag-chip button:hover { background: rgba(201,162,39,.2); }
.tag-chip .icon { width: 10px; height: 10px; }

/* 筛选弹窗内：维度切换条 + 已选条件条 */
.filter-dims {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.filter-dims button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.filter-dims button .icon { width: 14px; height: 14px; }
.filter-dims button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.filter-dims button:hover:not(.active) { border-color: var(--accent-2); }
.filter-activetags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  min-height: 0;
  border-bottom: 1px dashed var(--border);
}
.filter-activetags:empty { display: none; }
.filter-activetags .tag-chip { background: var(--accent-soft); }

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
#resultCount {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
}
.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.sort-wrap .icon { width: 14px; height: 14px; color: var(--muted); }
.sort-wrap select {
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

/* Results */
.results {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--pad) 80px;
}
.rhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.rhead h3 { font-size: 18px; font-weight: 600; margin: 0; }
.rhead p { margin: 0; font-size: 13px; color: var(--muted); }

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  animation: cardIn .45s var(--ease) both;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: var(--cat, var(--primary));
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.flag {
  display: inline-flex;
  width: 22px; height: 15px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  vertical-align: middle;
  flex-shrink: 0;
}
.flag svg { display: block; width: 100%; height: 100%; }
.card-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}
.card-deadline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
}
.card-deadline.urgent { color: var(--danger); background: rgba(185,28,28,.08); }
.card-deadline.soon { color: var(--accent-2); background: var(--accent-soft); }
.card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 8px;
  color: var(--text);
}
.card-buyer {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.card-budget {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.card-cta .icon { width: 14px; height: 14px; }
.card:hover .card-cta { text-decoration: underline; }

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-2);
}
.empty h3 { font-size: 20px; margin: 0 0 10px; color: var(--text); }
.empty p { font-size: 14px; color: var(--muted); margin: 0 0 20px; }

/* Sheets */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: none;
  flex-direction: column;
  animation: sheetOut .2s var(--ease) both;
}
.sheet.open {
  display: flex;
  animation: sheetIn .35s var(--ease) both;
}
.sheet-bar {
  flex-shrink: 0;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--pad);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.sheet-bar h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  flex: 1;
}
.sheet-back, .sheet-close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  transition: background .2s;
}
.sheet-back:hover, .sheet-close:hover { background: var(--surface-2); }
.sheet-back .icon, .sheet-close .icon { width: 18px; height: 18px; }
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px var(--pad) 100px;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.sheet-foot {
  flex-shrink: 0;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--pad);
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(26,31,46,.06);
  z-index: 101;
}
.sheet-foot .btn-primary { min-width: 160px; justify-content: center; }

/* Filter body */
.filter-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.filter-help-link {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}
.filter-help-link:hover { color: var(--primary-2); }
.filter-section {
  margin-bottom: 28px;
}
.filter-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-section h4 .icon { width: 16px; height: 16px; color: var(--primary); }

.dim-body-dl .dl-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dl-radio {
  position: relative;
}
.dl-radio input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.dl-radio span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.dl-radio input:checked + span {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.dl-radio input:disabled + span {
  opacity: .45;
  cursor: not-allowed;
}
.dl-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.dl-custom label { font-size: 13px; color: var(--text-2); }
.dl-custom input[type="date"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: 13px;
}

.opt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.opt-row:hover { background: var(--surface-2); border-color: var(--border-2); }
.opt-row.zero { opacity: .45; }
.opt-row input {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.opt-row .opt-label {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}
.opt-row.zero .opt-label { color: var(--muted); }
.opt-row .opt-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.category-search {
  width: 100%;
  max-width: 420px;
  height: 38px;
  padding: 0 14px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font-size: 13px;
  outline: none;
}
.category-search:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }

.cat-domain {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.cat-domain-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.cat-domain-head .icon { width: 16px; height: 16px; transition: transform .2s; }
.cat-domain.open .cat-domain-head .icon { transform: rotate(180deg); }
.cat-domain-body { display: none; padding: 12px 16px; }
.cat-domain.open .cat-domain-body { display: block; }
.cat-big {
  margin-bottom: 16px;
}
.cat-big-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.cat-small-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

/* Detail */
.detail-bar { padding-right: var(--pad); }
.sheet-bar-actions { display: flex; gap: 8px; }
.detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 980px) {
  .detail-body { grid-template-columns: 1fr; }
}
.detail-main { min-width: 0; }
.detail-rail {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.detail-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.detail-block h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-block h4 .icon { width: 16px; height: 16px; }
.detail-block p, .detail-block li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.detail-block ul { list-style: disc; padding-left: 18px; }
.detail-block ul li { margin-bottom: 6px; }
.help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.help-toc a {
  font-size: 12.5px;
  color: var(--primary);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  transition: all .15s ease;
}
.help-toc a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.meta-item dt {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.meta-item dd {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  margin: 0;
}
.rail-countdown {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.rail-countdown b {
  display: block;
  font-size: 42px;
  color: var(--primary);
  line-height: 1;
}
.rail-countdown span { font-size: 13px; color: var(--muted); }
.rail-actions { display: flex; flex-direction: column; gap: 10px; }
.rail-actions .btn-primary { width: 100%; justify-content: center; }
.rail-actions .btn-ghost { width: 100%; justify-content: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Animations */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheetOut {
  to { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 900px) {
  :root { --pad: 18px; }
  .top-inner { gap: 12px; }
  .logo-img { height: 30px; }
  .top-search { margin: 0; }
  .top-actions .btn-text { display: none; }
  .hero-inner { padding: 44px var(--pad) 40px; }
  .hero-visual { display: none; }
  .hero-stats { gap: 24px; }
  .stat b { font-size: 28px; }
  .dim { padding: 0 12px; height: 34px; font-size: 12px; }
  .dim .icon { display: none; }
  .result-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .grid { grid-template-columns: 1fr; }
  .sheet-bar { height: 58px; padding: 0 var(--pad); }
  .sheet-body { padding-bottom: 100px; }
  .detail-body { display: block; }
  .detail-rail { position: static; margin-top: 18px; }
}

@media (max-width: 560px) {
  .dimbar { gap: 8px; }
  .dim { padding: 0 10px; height: 32px; font-size: 12px; }
  .card { padding: 18px; }
  .card h3 { font-size: 15px; }
  .opt-list, .cat-small-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== 可点击标签（卡片上） ===== */
.tag-clickable {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: .18s;
  font-family: var(--sans);
}
.tag-clickable:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.tag-clickable:active { transform: translateY(0); }

/* ===== 虚拟标书团队 5 阶段协作面板 ===== */
.tw-panel {
  margin-top: 4px;
}
.tw-emps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.tw-emp {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 6px 8px;
  text-align: center;
  background: var(--surface);
  transition: .25s;
  position: relative;
}
.tw-emp[data-state="进行中"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px oklch(95% 0.028 245 / .4);
}
.tw-emp[data-state="已完成"] {
  border-color: oklch(75% 0.10 158);
  background: oklch(97% 0.03 158);
}
.tw-emp[data-state="失败"] {
  border-color: oklch(75% 0.12 27);
  background: oklch(97% 0.03 27);
}
.tw-avatar {
  width: 30px; height: 30px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.tw-emp[data-state="进行中"] .tw-avatar {
  background: var(--primary);
  animation: pulse 1.4s ease-in-out infinite;
}
.tw-emp[data-state="已完成"] .tw-avatar { background: oklch(48% 0.10 158); }
.tw-emp[data-state="失败"] .tw-avatar { background: oklch(48% 0.15 27); }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }
.tw-name { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.tw-task { font-size: 10.5px; color: var(--muted); line-height: 1.4; min-height: 28px; }
.tw-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
}
.tw-emp[data-state="进行中"] .tw-status { background: var(--primary); color: #fff; }
.tw-emp[data-state="已完成"] .tw-status { background: oklch(48% 0.10 158); color: #fff; }
.tw-emp[data-state="失败"] .tw-status { background: oklch(48% 0.15 27); color: #fff; }

.tw-bar {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.tw-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), oklch(48% 0.10 158));
  width: 0%;
  transition: width .35s ease;
}

.tw-log {
  max-height: 160px;
  overflow-y: auto;
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  margin-bottom: 12px;
}
.tw-log-line { color: var(--ink-soft); }
.tw-log-time {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  margin-right: 6px;
}

.tw-result-inner {
  border: 1px solid oklch(75% 0.10 158);
  background: oklch(97% 0.03 158);
  border-radius: 10px;
  padding: 14px 16px;
}
.tw-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.tw-result-actions .btn-primary,
.tw-result-actions .btn-ghost {
  font-size: 13px;
  padding: 8px 14px;
}

/* Bid Workspace */
.bid-workspace-body { padding-top: 28px; }
.bid-workspace {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
.bid-ws-main { min-width: 0; }
.bid-ws-side {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.bid-ws-side h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
}
.bid-ws-side .meta-item { margin-bottom: 10px; }
.ws-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.ws-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.ws-card h3 .step-num {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}
.ws-input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}
.ws-input-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 10px;
  line-height: 1.5;
}
.ws-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-2);
  border-radius: 10px;
  font-size: 15px;
  background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s;
}
.ws-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  background: var(--surface);
}
.ws-upload {
  border: 2px dashed var(--border-2);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.ws-upload:hover, .ws-upload.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.ws-upload-icon {
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  color: var(--primary);
}
.ws-upload-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.ws-upload-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.ws-file-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ws-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.ws-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-2);
}
.ws-checklist li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ws-checklist li::before {
  content: "○";
  color: var(--muted);
}
.ws-checklist li.ok::before { content: "●"; color: var(--success); }
.ws-confirm-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.ws-confirm-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.ws-confirm-btn:not(:disabled):hover { background: var(--primary-2); }
.ws-confirm-btn:not(:disabled):active { transform: translateY(1px); }
.ws-run { margin-top: 8px; }
.ws-run .tw-log { max-height: 220px; }
.ws-guest-banner {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 16px;
}

@media (max-width: 960px) {
  .bid-workspace { grid-template-columns: 1fr; }
  .bid-ws-side { position: static; }
}
@media (max-width: 540px) {
  .tw-emps { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .tw-name { font-size: 11px; }
  .tw-task { display: none; }
  .tw-avatar { width: 26px; height: 26px; font-size: 12px; }
  .ws-checklist { grid-template-columns: 1fr; }
  .ws-upload { padding: 24px 16px; }
}
