/* 星域导航 — 视觉变量与布局
   方向：暖纸底 + 深青绿品牌 + 琥珀点缀（避开紫白 / 奶油陶土 / 报章风） */

:root {
  --bg: #f3f0e8;
  --bg-2: #e7efe9;
  --ink: #14221f;
  --ink-soft: #3d524c;
  --muted: #6b7f78;
  --brand: #0f3d3a;
  --brand-2: #1a5c56;
  --accent: #c9851a;
  --accent-soft: #e8c547;
  --line: rgba(20, 34, 31, 0.12);
  --surface: rgba(255, 252, 245, 0.72);
  --surface-solid: #fffdf8;
  --shadow: 0 18px 40px rgba(15, 61, 58, 0.08);
  --radius: 14px;
  --font-brand: "Syne", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", sans-serif;
  --max: 1100px;
  --narrow: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

a {
  color: var(--brand-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(15, 61, 58, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(126, 200, 192, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(232, 197, 71, 0.22), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 55%, #ebe4d4 100%);
}

.bg-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(15, 61, 58, 0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2rem, var(--narrow));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(243, 240, 232, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--brand);
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
  animation: pulse-ring 3s ease-in-out infinite;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--brand);
  border-radius: 50%;
}

.brand-text {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--brand);
}

.header-stats {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-2);
  animation: blink 2s ease-in-out infinite;
}

@media (min-width: 720px) {
  .header-stats {
    display: inline-flex;
  }
}

/* Hero — 首屏单一构图 */
.hero {
  position: relative;
  min-height: min(88vh, 640px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0 3rem;
}

.hero-simple {
  min-height: auto;
  padding: 3.2rem 0 1.25rem;
  text-align: center;
}

.hero-simple .hero-inner {
  max-width: none;
  margin-inline: auto;
}

.hero-simple .hero-brand {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.hero-simple .hero-title {
  margin-bottom: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
  color: var(--brand);
  letter-spacing: -0.02em;
  animation: rise 0.9s ease both;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 500;
  color: var(--ink-soft);
  animation: rise 0.9s ease 0.12s both;
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 32rem;
  animation: rise 0.9s ease 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease 0.32s both;
}

.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  translate: 0 -50%;
  width: min(48vw, 420px);
  aspect-ratio: 1;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(15, 61, 58, 0.18);
  border-radius: 50%;
}

.orbit-1 {
  animation: spin 28s linear infinite;
  border-style: dashed;
}

.orbit-2 {
  inset: 18%;
  border-color: rgba(201, 133, 26, 0.35);
  animation: spin 18s linear infinite reverse;
}

.orbit-core {
  position: absolute;
  inset: 38%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), var(--brand));
  box-shadow: 0 0 40px rgba(232, 197, 71, 0.35);
  animation: float 6s ease-in-out infinite;
}

@media (max-width: 720px) {
  .hero-visual {
    opacity: 0.35;
    right: -20%;
    width: 70vw;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #f7f3ea;
}

.btn-primary:hover {
  background: var(--brand-2);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--brand);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.page-head {
  margin-bottom: 2.5rem;
}

.section-more {
  margin-top: 2rem;
}

/* Search */
.search-section {
  padding-top: 0;
  padding-bottom: 1rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.search-icon {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 0.45rem;
  height: 2px;
  background: var(--muted);
  right: -0.35rem;
  bottom: -0.15rem;
  rotate: 45deg;
}

#nav-search {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  outline: none;
}

/* Category tabs */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.cat-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cat-tab:hover,
.cat-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #f7f3ea;
}

.cat-block {
  margin-bottom: 2.75rem;
}

.cat-block.is-hidden {
  display: none;
}

.cat-block-head {
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}

.cat-block-head h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--brand);
}

.cat-block-head p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Nav grid — 交互入口，允许轻表面 */
.nav-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}

.nav-item.is-hidden {
  display: none;
}

.nav-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  height: 100%;
}

.nav-card:hover {
  border-color: rgba(15, 61, 58, 0.35);
  background: var(--surface-solid);
  transform: translateY(-2px);
  color: inherit;
}

.nav-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(15, 61, 58, 0.08);
  color: var(--brand);
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1rem;
}

.nav-title {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.nav-desc {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.tag {
  font-size: 0.72rem;
  color: var(--brand-2);
  background: rgba(26, 92, 86, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.nav-meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.nav-stat::after {
  content: " 次";
}

.empty-hint {
  color: var(--muted);
}

/* Timeline / changelog preview */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(15, 61, 58, 0.2);
}

.timeline-item {
  position: relative;
  padding: 0 0 1.75rem 1.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item time {
  font-size: 0.82rem;
  color: var(--muted);
}

.timeline-item .ver {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(15, 61, 58, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.timeline-item h3 {
  margin: 0.25rem 0;
  font-size: 1.05rem;
}

.timeline-item h3 a {
  text-decoration: none;
  color: var(--ink);
}

.timeline-item h3 a:hover {
  color: var(--brand);
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Detail */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  text-decoration: none;
}

.detail-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.detail-cat {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.detail-head h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--brand);
  line-height: 1.15;
}

.detail-desc {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.detail-stat {
  font-size: 0.88rem;
  color: var(--muted);
}

.detail-updated {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Prose */
.prose h1,
.prose h2,
.prose h3 {
  color: var(--brand);
  font-family: var(--font-brand);
  line-height: 1.3;
}

.prose h2 {
  margin-top: 1.8rem;
  font-size: 1.25rem;
}

.prose h3 {
  margin-top: 1.4rem;
  font-size: 1.08rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose blockquote {
  margin: 1rem 0;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(201, 133, 26, 0.08);
  color: var(--ink-soft);
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: #14221f;
  color: #e8f0ec;
  border-radius: 10px;
  font-size: 0.88rem;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}

.prose .md-table-wrap,
.md-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  -webkit-overflow-scrolling: touch;
}

.prose .md-table,
.md-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

.prose .md-table th,
.prose .md-table td,
.md-table th,
.md-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose .md-table th,
.md-table th {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand);
  background: rgba(15, 61, 58, 0.06);
  white-space: nowrap;
}

.prose .md-table td,
.md-table td {
  color: var(--ink-soft);
}

.prose .md-table td code,
.md-table td code {
  font-size: 0.84em;
  word-break: break-all;
}

.prose .md-table tbody tr:last-child td,
.md-table tbody tr:last-child td {
  border-bottom: 0;
}

.prose .md-table tbody tr:hover td,
.md-table tbody tr:hover td {
  background: rgba(15, 61, 58, 0.03);
}

@media (max-width: 640px) {
  .prose .md-table th,
  .prose .md-table td,
  .md-table th,
  .md-table td {
    padding: 0.5rem 0.65rem;
    font-size: 0.84rem;
  }
}

/* Changelog page */
.changelog-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.7);
}

.changelog-toc a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.changelog-toc a:hover {
  color: var(--brand);
  border-color: var(--line);
  background: #fff;
}

.changelog-toc .toc-ver {
  font-weight: 700;
  color: var(--brand);
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-entry {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
  animation: rise 0.6s ease both;
}

.changelog-entry:nth-child(2) { animation-delay: 0.05s; }
.changelog-entry:nth-child(3) { animation-delay: 0.1s; }
.changelog-entry:nth-child(4) { animation-delay: 0.15s; }

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.changelog-meta time {
  font-size: 0.85rem;
  color: var(--muted);
}

.ver {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(15, 61, 58, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.type-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid rgba(201, 133, 26, 0.4);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.type-badge[data-type="feature"] {
  color: var(--brand-2);
  border-color: rgba(26, 92, 86, 0.35);
  background: rgba(26, 92, 86, 0.06);
}

.type-badge[data-type="release"] {
  color: #8a4b12;
  border-color: rgba(201, 133, 26, 0.45);
  background: rgba(232, 197, 71, 0.16);
}

.type-badge[data-type="fix"],
.type-badge[data-type="update"] {
  color: var(--ink-soft);
  border-color: var(--line);
  background: rgba(20, 34, 31, 0.04);
}

.changelog-entry h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  color: var(--brand);
}

.changelog-summary {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(15, 61, 58, 0.04);
}

.footer-inner {
  display: grid;
  gap: 1.25rem;
}

.footer-brand strong {
  font-family: var(--font-brand);
  color: var(--brand);
  font-size: 1.1rem;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 28rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 197, 71, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(232, 197, 71, 0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* —— 全局搜索 —— */
.global-search {
  padding: 0.5rem 0 1.5rem;
  animation: rise 0.7s ease 0.15s both;
}

.global-search.is-compact {
  padding: 1.25rem 0 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.35);
}

.gs-engines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  justify-content: center;
}

.global-search.is-compact .gs-engines {
  justify-content: flex-start;
}

.gs-engine {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gs-engine:hover {
  color: var(--brand);
  border-color: var(--line);
}

.gs-engine.is-active {
  background: var(--brand);
  color: #f7f3ea;
  border-color: var(--brand);
}

.gs-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.55rem 0.55rem 1.1rem;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin-inline: auto;
}

.global-search.is-compact .gs-box {
  margin-inline: 0;
  max-width: none;
}

#gs-input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

.gs-submit {
  appearance: none;
  border: 0;
  background: var(--brand);
  color: #f7f3ea;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.gs-submit:hover {
  background: var(--brand-2);
}

.gs-meta {
  max-width: 720px;
  margin: 0.9rem auto 0;
  display: grid;
  gap: 0.55rem;
}

.global-search.is-compact .gs-meta {
  max-width: none;
  margin-top: 0.75rem;
}

.gs-hot,
.gs-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.gs-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.15rem;
}

.gs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.gs-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.8);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

a.gs-chip {
  display: inline-flex;
}

.gs-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.gs-chip.is-pinned {
  border-color: rgba(201, 133, 26, 0.45);
  color: var(--brand);
  background: rgba(232, 197, 71, 0.18);
}

.gs-clear-history {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.engine-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

/* —— 首页随机图展（yjk） —— */
.yjk-section {
  padding-top: 0.5rem;
}

.yjk-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.yjk-grid li {
  animation: rise 0.7s ease both;
  animation-delay: calc(0.08s * var(--i, 0));
}

.yjk-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-solid);
  aspect-ratio: 4 / 3;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.yjk-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 61, 58, 0.35);
  box-shadow: var(--shadow);
}

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

@media (max-width: 900px) {
  .yjk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .yjk-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
}

/* —— 分类卡片（首页） —— */
.cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 1.15rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 8.5rem;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.cat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 61, 58, 0.35);
  background: var(--surface-solid);
  color: inherit;
}

.cat-card-name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand);
}

.cat-card-desc {
  flex: 1;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.cat-card-meta {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

.cat-tabs-links .cat-tab {
  text-decoration: none;
  display: inline-flex;
}

.cat-tabs-links a.cat-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #f7f3ea;
}

.nav-cat-label {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.cat-block-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.cat-block-head h2 a {
  text-decoration: none;
  color: var(--brand);
}

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