:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #f6f2e8;
  --paper: #fffdf8;
  --paper-2: #f2f7f4;
  --ink: #1f2522;
  --muted: #6e756f;
  --line: #ddd7c8;
  --green: #236c57;
  --red: #b84e46;
  --blue: #315f82;
  --gold: #b3832e;
  --shadow: 0 18px 38px rgba(56, 48, 34, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(35,108,87,.10), transparent 34%),
    linear-gradient(180deg, rgba(184,78,70,.08), transparent 310px),
    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; }

.app-shell {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 18px;
  width: min(1500px, calc(100% - 28px));
  margin: 14px auto 0;
}
.side-nav {
  position: sticky;
  top: 14px;
  align-self: start;
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 1.16rem;
  font-weight: 950;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 7px 7px;
  background: linear-gradient(135deg, var(--green), var(--red));
}
.side-nav nav,.nav {
  display: flex;
  gap: 7px;
}
.side-nav nav { flex-direction: column; }
.side-nav nav a,.nav a,.pill,.side-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 900;
}
.side-nav nav a { justify-content: flex-start; }
.side-nav nav a.active,.side-nav nav a:hover,.nav a.active,.nav a:hover {
  color: var(--green);
  border-color: rgba(35,108,87,.24);
  background: rgba(35,108,87,.10);
}
.side-cta,.pill {
  color: #fff;
  background: var(--green);
}

.finder {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.search-desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr);
  gap: 18px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--paper), #f4f8f2);
  box-shadow: var(--shadow);
}
.search-desk h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}
.search-desk p,.section-head p,.tile-copy p,.page-title p,.detail-copy p,.footer p,.list-panel p,.nav-board p {
  color: var(--muted);
  line-height: 1.58;
}
.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.home-search input,.home-search button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  font-weight: 900;
}
.home-search input { min-width: 0; padding: 0 12px; background: transparent; color: var(--ink); }
.home-search button { padding: 0 18px; color: #fff; background: var(--red); }

.discovery-board {
  display: grid;
  grid-template-columns: minmax(310px, .95fr) minmax(300px, .9fr) minmax(260px, .68fr);
  gap: 12px;
  align-items: stretch;
}
.spotlight,.nav-board,.rank-board,.list-panel,.section,.page-title,.filters,.detail-copy,.detail-cover {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.spotlight {
  height: 330px;
  overflow: hidden;
}
.spotlight a {
  position: relative;
  display: block;
  height: 100%;
}
.spotlight a::after,.cover::after,.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.78));
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
}
.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.65rem, 3vw, 3rem);
  line-height: 1.05;
}
.hero-copy span { color: rgba(255,255,255,.92); font-weight: 950; }
.nav-board,.rank-board { padding: 16px; overflow: hidden; }
.nav-board-head {
  min-height: 126px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.nav-board h2,.rank-board h2,.list-panel h2 { margin-bottom: 10px; color: var(--green); font-size: 1.12rem; }
.channel-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}
.channel {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-2);
}
.channel img { height: 56px; 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; }

.quick-row {
  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: #e9e4d8;
}
.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; }

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 12px;
}
.list-panel { padding: 16px; }
.list-panel.accent { background: linear-gradient(135deg, rgba(49,95,130,.12), rgba(179,131,46,.10)), var(--paper); }
.label { margin-bottom: 8px; color: var(--red); font-weight: 950; }
.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;
}
.text-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  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(--green); font-style: normal; font-weight: 950; }

.section,.collection {
  width: 100%;
  margin: 0;
}
.section { padding: 16px; }
.collection {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.72);
}
.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(--green); font-weight: 950; }
.collection-grid,.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, 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(35,108,87,.36);
  box-shadow: 0 14px 28px rgba(56,48,34,.16);
}
.cover {
  position: relative;
  aspect-ratio: 3 / 4.05;
  overflow: hidden;
  background: #e9e4d8;
}
.cover span {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  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; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 62px;
  padding: 0 clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,248,.92);
  backdrop-filter: blur(18px);
}
.nav { justify-content: center; overflow-x: auto; white-space: nowrap; }
main { width: min(1320px, calc(100% - 36px)); margin: 16px auto 0; }
.page-title,.filters,.detail { margin-bottom: 16px; }
.page-title {
  padding: clamp(24px, 5vw, 48px);
  background: linear-gradient(135deg, rgba(35,108,87,.12), rgba(184,78,70,.08)), 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;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.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: #fbfaf4;
  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(--green); }

.detail {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0,1fr);
  gap: 16px;
  align-items: stretch;
}
.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(--green); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.badges span {
  padding: 7px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-weight: 950;
}

.footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(4, minmax(130px, .7fr));
  gap: 18px;
  width: min(1320px, calc(100% - 36px));
  margin: 16px auto 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(35,108,87,.10), rgba(184,78,70,.07)), var(--paper);
  box-shadow: var(--shadow);
}
.footer strong { display: block; margin-bottom: 8px; color: var(--green); 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(--green); }
.footer-copy {
  padding: 14px;
  border: 1px solid rgba(184,78,70,.36);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  background: #fff4ef;
}
.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: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .side-nav {
    position: relative;
    top: 0;
    min-height: auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
  }
  .side-nav nav { flex-direction: row; overflow-x: auto; white-space: nowrap; }
  .search-desk,.discovery-board,.dashboard,.detail { grid-template-columns: 1fr; }
  .spotlight { height: auto; aspect-ratio: 16 / 8; }
  .quick-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collection-grid,.mosaic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .app-shell,main,.footer { width: calc(100% - 24px); }
  .side-nav { grid-template-columns: 1fr; }
  .side-nav nav { justify-content: start; }
  .header { grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .nav { justify-content: start; }
  .search-desk { grid-template-columns: 1fr; padding: 16px; }
  .home-search { grid-template-columns: 1fr; }
  .spotlight { aspect-ratio: 16 / 10; }
  .channel-stack,.quick-row,.dashboard,.collection-grid,.mosaic-grid,.footer { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-cover { min-height: auto; aspect-ratio: 2 / 2.8; }
}
