:root {
  --bg: #efe9dd;
  --panel: rgba(255, 251, 245, 0.92);
  --panel-strong: #fffdf8;
  --ink: #1f1a17;
  --muted: #625851;
  --line: rgba(71, 50, 35, 0.16);
  --accent: #b24d2a;
  --accent-deep: #8f3416;
  --teal: #205f58;
  --teal-soft: #d7ebe7;
  --gold: #e9b85c;
  --rose: #f5dfd4;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(58, 38, 21, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(233, 184, 92, 0.22), transparent 26%),
    radial-gradient(circle at right 15%, rgba(32, 95, 88, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f2e7, #eee6d9 42%, #e9e0d4 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

html[lang="zh-CN"] body,
html[lang="zh-CN"] button,
html[lang="zh-CN"] input,
html[lang="zh-CN"] select,
html[lang="zh-CN"] table {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}

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

.site-shell {
  width: min(1400px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 36px;
}

.topbar,
.hero-card,
.control-card,
.tabs-card,
.footer-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fffdf8;
  font: 700 22px/1 "Trebuchet MS", Arial, sans-serif;
}

.eyebrow,
.card-label {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font: 700 12px/1.2 "Trebuchet MS", Arial, sans-serif;
}

.brand-title,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
}

.brand-title {
  font-size: 28px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.7);
}

.lang-button {
  min-width: 62px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 700 12px/1 "Trebuchet MS", Arial, sans-serif;
}

.lang-button.active {
  background: var(--teal);
  color: #fffdf8;
}

.status-chip,
.card-note,
.section-meta {
  color: var(--muted);
  font: 700 11px/1.3 "Trebuchet MS", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.7);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.88fr;
  gap: 18px;
  margin-top: 18px;
}

.hero-card,
.control-card,
.tabs-card,
.footer-card {
  padding: 24px;
}

.hero-copy {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding-top: 24px;
  background:
    linear-gradient(135deg, rgba(255, 249, 239, 0.96), rgba(244, 236, 223, 0.94)),
    linear-gradient(180deg, rgba(32, 95, 88, 0.06), rgba(178, 77, 42, 0.03));
}

.hero-copy h2 {
  max-width: 520px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.06;
  text-wrap: balance;
}

.lede {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
  padding-top: 0;
}

.hero-point {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.82);
}

.hero-point strong {
  display: block;
  font-size: 16px;
  line-height: 1.15;
}

.hero-point span,
.microcopy,
.status-box,
.mini-list li,
.policy-list li,
.data-table td,
.listing-subtext,
.shop-stat span {
  color: var(--muted);
}

.hero-point span,
.microcopy,
.status-box,
.mini-list li,
.policy-list li,
.listing-subtext {
  line-height: 1.6;
}

.hero-point span {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
}

.setup-card {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 251, 244, 0.94));
}

.section-head,
.tabs-head,
.card-headline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.compact {
  margin-bottom: 18px;
}

.compact h2,
.section-head h2,
.tabs-head h2,
.footer-card h2 {
  font-size: 32px;
  line-height: 1.05;
}

.credentials-form,
.search-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font: 700 12px/1.2 "Trebuchet MS", Arial, sans-serif;
}

input,
select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 2px solid rgba(178, 77, 42, 0.18);
  border-color: var(--accent);
}

.button-row,
.search-actions,
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.tab-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.primary-button {
  border: 0;
  background: var(--accent);
  color: #fffdf8;
  font-weight: 700;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.ghost-button,
.tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.ghost-button:hover,
.ghost-button:focus-visible,
.tab-button:hover,
.tab-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(178, 77, 42, 0.42);
}

.tab-button.active {
  background: var(--teal);
  color: #fffdf8;
  border-color: transparent;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.search-form {
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  margin-top: 18px;
}

.field-span-2 {
  grid-column: span 2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric-card,
.insight-card,
.data-card,
.listing-card,
.shop-card,
.footer-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.65);
}

.metric-card {
  padding: 14px 12px;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font: 700 11px/1.3 "Trebuchet MS", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-box {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 16px;
}

.tab-panels {
  margin-top: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
}

.insight-card,
.data-card,
.listing-card,
.shop-card {
  padding: 18px;
}

.insight-card h3,
.data-card h3,
.listing-card h3,
.shop-card h3 {
  font-size: 24px;
  line-height: 1.1;
}

.insight-card.emphasis {
  background: linear-gradient(180deg, rgba(245, 223, 212, 0.74), rgba(255, 255, 255, 0.66));
}

.mini-list,
.policy-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.mini-list li,
.policy-list li {
  margin-top: 7px;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.board-grid,
.heatmap-grid,
.card-grid,
.shop-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

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

.keyword-tile,
.heat-tile,
.newcomer-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.keyword-tile header,
.newcomer-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.keyword-tile h4,
.newcomer-card h4,
.shop-card h4 {
  margin: 0;
  font-size: 20px;
}

.tile-score {
  min-width: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--teal), #16453f);
  color: #fffdf8;
  font: 700 26px/1 Georgia, "Times New Roman", serif;
}

.tile-meta,
.shop-stats,
.signal-row,
.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill,
.shop-stat,
.listing-pill {
  border-radius: 999px;
  padding: 6px 10px;
  background: #f6ebd6;
  color: #7d4a18;
  font: 700 12px/1.2 "Trebuchet MS", Arial, sans-serif;
}

.pill.cool,
.shop-stat.cool,
.listing-pill.cool {
  background: var(--teal-soft);
  color: var(--teal);
}

.heat-tile {
  min-height: 120px;
}

.heat-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.heat-level {
  height: 10px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
}

.heat-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font: 700 11px/1.3 "Trebuchet MS", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.newcomer-card p {
  margin: 12px 0 0;
}

.shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.shop-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--accent-deep);
  font: 700 13px/1 "Trebuchet MS", Arial, sans-serif;
}

.shop-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.shop-stat strong {
  color: var(--ink);
}

.results-list {
  display: grid;
  gap: 14px;
}

.listing-top {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
}

.score-badge {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--teal), #163d38);
  color: #fffdf8;
}

.score-badge strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.score-badge span {
  font: 700 10px/1.2 "Trebuchet MS", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.listing-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.listing-link {
  color: var(--accent);
  text-decoration: none;
  font: 700 12px/1.2 "Trebuchet MS", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.site-footer {
  padding: 18px 4px 0;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.hidden {
  display: none;
}

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

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

  .field-span-2,
  .search-actions {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 760px) {
  .site-shell {
    width: min(100%, calc(100% - 14px));
    padding-top: 8px;
  }

  .topbar,
  .hero-card,
  .control-card,
  .tabs-card,
  .footer-card {
    padding: 16px;
  }

  .topbar,
  .section-head,
  .tabs-head,
  .listing-bottom {
    flex-direction: column;
    align-items: start;
  }

  .hero-copy h2 {
    max-width: 100%;
    font-size: 32px;
  }

  .hero-points,
  .summary-grid,
  .board-grid,
  .heatmap-grid,
  .card-grid,
  .shop-grid,
  .search-form,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .listing-top {
    grid-template-columns: 1fr;
  }
}
