:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #f4f1eb;
  --paper: #fffaf1;
  --paper-2: #f9f5ea;
  --ink: #202225;
  --muted: #71706b;
  --line: #ded2bd;
  --red: #b94137;
  --blue: #295c72;
  --green: #31705e;
  --gold: #b58836;
  --shadow: 0 18px 34px rgba(54, 41, 24, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(185,65,55,.10), transparent 300px),
    linear-gradient(90deg, rgba(41,92,114,.08), transparent 42%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1,h2,h3,p { margin-top: 0; }
button,input,select { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 66px;
  padding: 0 clamp(16px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,250,241,.92);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 950;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 7px 50% 50% 7px;
  background: linear-gradient(135deg, var(--red), var(--blue));
}
.nav {
  display: flex;
  justify-content: center;
  gap: 7px;
  overflow-x: auto;
  white-space: nowrap;
}
.nav a,.top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
}
.nav a.active,.nav a:hover {
  color: var(--red);
  border-color: rgba(185,65,55,.25);
  background: rgba(185,65,55,.10);
}
.top-action {
  color: #fff;
  background: var(--blue);
}

main {
  display: grid;
  gap: 14px;
  width: min(1400px, calc(100% - 32px));
  margin: 16px auto 0;
}
.editorial {
  display: grid;
  grid-template-columns: minmax(270px, .82fr) minmax(300px, 1.1fr) minmax(280px, .86fr) minmax(240px, .68fr);
  gap: 12px;
  align-items: start;
}
.search-card,.feature-card,.brief-card,.rank-card,.list-panel,.note-panel,.collection,.section,.page-title,.filters,.detail-cover,.detail-copy {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.search-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  height: 342px;
  padding: 18px;
  overflow: hidden;
}
.search-card h1 {
  margin-bottom: 10px;
  max-width: 6.2em;
  font-size: clamp(1.65rem, 3.2vw, 3rem);
  line-height: 1.02;
  letter-spacing: 0;
}
.search-card p,.section-head p,.tile-copy p,.page-title p,.detail-copy p,.footer p,.brief-card p,.note-panel p {
  color: var(--muted);
  line-height: 1.58;
}
.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.home-search input,.home-search button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
}
.home-search input { min-width: 0; padding: 0 12px; background: transparent; }
.home-search button { padding: 0 17px; color: #fff; background: var(--red); }
.feature-card {
  height: 342px;
  overflow: hidden;
}
.feature-card a {
  position: relative;
  display: block;
  height: 100%;
}
.feature-card a::after,.cover::after,.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.80));
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
}
.hero-copy p {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 5px;
  color: #fff;
  background: var(--red);
  font-weight: 950;
}
.hero-copy h1 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.8rem, 3vw, 3.3rem);
  line-height: 1.02;
}
.hero-copy span { color: rgba(255,255,255,.92); font-weight: 950; }
.brief-card,.rank-card { height: 342px; overflow: hidden; padding: 16px; }
.brief-card h2,.rank-card h2,.list-panel h2 { margin-bottom: 10px; color: var(--blue); font-size: 1.1rem; }
.label { margin-bottom: 8px; color: var(--red); font-weight: 950; }
.channel-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.channel {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 64px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
}
.channel img { height: 52px; border-radius: 5px; }
.channel b,.channel small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel b { font-size: .86rem; }
.channel small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.text-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 33px;
  border-top: 1px solid var(--line);
}
.text-link span { color: var(--red); font-weight: 950; }
.text-link b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-link em { color: var(--blue); font-style: normal; font-weight: 950; }

.quick-lane {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.strip-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 78px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.strip-art { height: 62px; overflow: hidden; border-radius: 6px; background: #e6dccc; }
.strip-copy b,.strip-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.strip-copy b { margin-bottom: 4px; font-size: .86rem; line-height: 1.28; }
.strip-copy small { color: var(--muted); font-size: .72rem; line-height: 1.35; }

.split-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  gap: 12px;
}
.list-panel,.note-panel,.collection,.section { padding: 16px; }
.note-panel {
  background: linear-gradient(135deg, rgba(41,92,114,.12), rgba(181,136,54,.12)), var(--paper);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 15px;
  border-radius: 6px;
  color: #fff;
  background: var(--red);
  font-weight: 950;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 3px; font-size: 1.2rem; }
.section-head a,#resultCount { color: var(--red); font-weight: 950; }
.collection-grid,.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  gap: 10px;
}
.tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(185,65,55,.36);
  box-shadow: 0 14px 28px rgba(54,41,24,.16);
}
.cover {
  position: relative;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
  background: #e6dccc;
}
.cover span {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--blue);
  font-size: .72rem;
  font-weight: 950;
}
.tile-copy { padding: 9px; }
.tile-copy h3 {
  margin-bottom: 5px;
  min-height: 2.42em;
  font-size: .9rem;
  line-height: 1.21;
}
.tile-copy p {
  margin-bottom: 7px;
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
}
.tile-copy b { color: var(--red); }
.tile-copy em { font-style: normal; }

.page-title {
  padding: clamp(24px, 5vw, 48px);
  background: linear-gradient(135deg, rgba(185,65,55,.10), rgba(41,92,114,.10)), var(--paper);
}
.page-title h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; }
.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}
.search-form { display: flex; gap: 8px; }
.search-form input,.search-form button,.filter-buttons button,.filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf1;
  color: var(--ink);
  font-weight: 900;
}
.search-form input { width: 100%; padding: 0 14px; }
.search-form button,.filter-buttons button,.filters select { padding: 0 13px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form button,.filter-buttons button:hover { color: #fff; background: var(--blue); }

.detail {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0,1fr);
  gap: 16px;
}
.detail-cover {
  position: relative;
  min-height: 470px;
  overflow: hidden;
}
.detail-copy { padding: clamp(24px, 5vw, 50px); }
.detail-copy h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1; }
.origin { font-weight: 950; color: var(--blue); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.badges span {
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 950;
}

.footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(130px, .75fr));
  gap: 18px;
  width: min(1400px, calc(100% - 32px));
  margin: 16px auto 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  box-shadow: var(--shadow);
}
.footer strong { display: block; margin-bottom: 8px; color: var(--red); font-size: 1.18rem; }
.footer h3 { margin-bottom: 9px; font-size: .95rem; }
.footer a { display: block; margin: 7px 0; color: var(--muted); }
.footer a:hover { color: var(--red); }
.footer-copy {
  padding: 14px;
  border: 1px solid rgba(185,65,55,.34);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: #fff0e9;
}
.footer-copy h3 { color: var(--red); }
.footer-copy p { margin-bottom: 6px; color: var(--ink); font-weight: 850; }
.footer-copy p:first-of-type { font-weight: 950; }
.image-missing { outline: 2px solid var(--red); }

@media (max-width: 1240px) {
  .editorial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-card,.brief-card,.rank-card,.search-card { height: auto; min-height: 300px; }
  .feature-card { aspect-ratio: 16 / 9; }
  .quick-lane { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collection-grid,.mosaic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split-board,.detail { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .nav { justify-content: start; }
  main,.footer { width: calc(100% - 24px); }
  .editorial,.quick-lane,.collection-grid,.mosaic-grid,.footer { grid-template-columns: 1fr; }
  .home-search { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-cover { min-height: auto; aspect-ratio: 2 / 2.8; }
}
