:root {
  color-scheme: dark;
  --page: #101412;
  --panel: #181e1b;
  --panel-hover: #1e2823;
  --border: #2b3630;
  --text: #edf4ef;
  --muted: #a4b1a8;
  --accent: #a7e9bd;
  --accent-ink: #102317;
  --radius: 14px;
  --header-height: 74px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  background: var(--page);
  color: var(--text);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 26px);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }

.shell { width: min(1224px, calc(100% - 96px)); margin-inline: auto; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(16 20 18 / 95%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #242d27;
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: calc(var(--header-height) - 1px);
  gap: 18px;
}
.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font: 760 1.05rem/1 system-ui, sans-serif;
  letter-spacing: .055em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #304c3b;
  border-radius: 9px;
  background: #1b2e22;
  color: var(--accent);
}
.brand-mark .icon { width: 21px; height: 21px; stroke-width: 0; }
.brand-domain { color: var(--accent); }
.primary-nav { display: flex; align-self: stretch; gap: clamp(20px, 3.2vw, 45px); }
.primary-nav a {
  position: relative;
  display: grid;
  place-items: center;
  white-space: nowrap;
  color: var(--muted);
  font-size: .90625rem;
  font-weight: 600;
  transition: color .18s ease;
}
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--accent); }
.primary-nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.search-trigger {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: .875rem;
}
.search-trigger:hover { color: var(--text); border-color: #4b6253; }
kbd {
  padding: 3px 5px;
  border: 1px solid #3b483f;
  border-radius: 4px;
  color: #c1cdc4;
  font: 600 .6875rem/1.1 ui-monospace, monospace;
  white-space: nowrap;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(390px, 37vw, 510px);
  margin-top: 30px;
  padding: clamp(32px, 5.3vw, 78px);
  overflow: hidden;
  border: 1px solid #354a40;
  border-radius: 18px;
  background: #14251f url("./assets/hero.webp") center 53% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(8 17 14 / 90%) 0%, rgb(8 17 14 / 68%) 31%, rgb(8 17 14 / 19%) 65%, rgb(8 17 14 / 4%) 100%),
    linear-gradient(0deg, rgb(6 12 10 / 32%), transparent 42%);
}
.hero-content { max-width: 525px; }
.hero h1 {
  font-size: clamp(3.05rem, 5.55vw, 5.3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.065em;
  color: #f5faf6;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  max-width: 29em;
  margin-top: 19px;
  color: #d5e0d8;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.78;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 27px; }
.button {
  display: inline-flex;
  min-height: 42px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .90625rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.hero .button { min-height: 46px; padding-inline: 17px; }
.button-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button-primary:hover { background: #c1f6d2; border-color: #c1f6d2; }
.button-quiet { color: var(--text); background: #202a24; border-color: #36473c; }
.button-quiet:hover { background: #2b3a30; border-color: #719481; }
.hero .button-quiet { background: rgb(20 32 26 / 68%); border-color: #6a8172; }
.hero .button-quiet:hover { background: #283d31; border-color: var(--accent); }

.collection { margin-top: 58px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  margin-bottom: 19px;
}
.section-heading { display: flex; align-items: center; gap: 14px; }
.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #2e4738;
  border-radius: 11px;
  background: #1a2c22;
  color: var(--accent);
  font-size: 1.22rem;
}
.section-heading h2 { font-size: clamp(1.42rem, 2.55vw, 1.9rem); font-weight: 760; letter-spacing: -.035em; line-height: 1.18; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #151b17;
}
.filter-button {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}
.filter-button:hover { color: var(--text); }
.filter-button[aria-pressed="true"] { border-color: #385443; background: #24392b; color: #c1f0ce; }

.mod-grid, .gallery-grid, .link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mod-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.mod-visual { position: relative; background: #202f27; }
.mod-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(8 16 12 / 26%), transparent 52%);
  pointer-events: none;
}
.mod-visual img { aspect-ratio: 2.09; object-fit: cover; }
.tag-row { position: absolute; z-index: 1; display: flex; gap: 6px; top: 11px; left: 11px; }
.tag {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid #54715e;
  border-radius: 5px;
  background: #172b21;
  color: #d1f2d9;
  font-size: .75rem;
  font-weight: 650;
}
.tag-demo { background: #322c20; border-color: #675a3b; color: #f2dcac; }
.mod-body { display: flex; flex: 1; flex-direction: column; padding: 17px; }
.mod-body h3 { font-size: 1.12rem; line-height: 1.35; overflow-wrap: anywhere; }
.mod-body p { margin: 7px 0 14px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.mod-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.mod-foot .button { min-height: 36px; padding: 5px 9px; font-size: .875rem; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: .8125rem; }
.mod-meta span + span::before { content: "·"; margin-right: 10px; color: #9cb2a5; }

.gallery-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #202f27;
  text-align: left;
}
.gallery-card img { aspect-ratio: 1.62; object-fit: cover; transition: transform .35s ease; }
.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgb(7 12 10 / 93%) 0%, rgb(7 12 10 / 53%) 26%, transparent 62%);
  pointer-events: none;
}
.gallery-card:hover { border-color: #739381; }
.gallery-card:hover img { transform: scale(1.045); }
.gallery-info { position: absolute; z-index: 2; inset: auto 44px 13px 14px; display: grid; gap: 3px; }
.gallery-name { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.gallery-category { color: #d0dad3; font-size: .8125rem; }
.gallery-expand {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 13px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #688574;
  border-radius: 7px;
  background: #192821;
  color: var(--text);
}
.gallery-card:hover .gallery-expand { color: var(--accent); }

.link-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
  transition: background-color .18s ease, border-color .18s ease;
}
.link-card:hover { background: var(--panel-hover); border-color: #536d5c; }
.link-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: #27372d; color: var(--accent); }
.link-card h3 { margin-top: 1px; font-size: 1rem; line-height: 1.35; overflow-wrap: anywhere; }
.link-card p { margin-top: 4px; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.link-external { color: var(--muted); width: .875rem; height: .875rem; margin-top: 4px; }
.link-card:hover .link-external { color: var(--accent); }
.empty-state { grid-column: 1 / -1; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); }
.noscript { margin-top: 24px; }

.site-footer { margin-top: 65px; border-top: 1px solid #27302a; }
.footer-inner { display: flex; min-height: 97px; align-items: center; justify-content: space-between; gap: 20px 30px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 11px 25px; color: var(--muted); font-size: .875rem; }
.footer-inner nav a:hover { color: var(--accent); }
.footer-inner small { color: var(--muted); font-size: .8125rem; white-space: nowrap; }

dialog {
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #465b4c;
  border-radius: 14px;
  background: #181e1b;
  color: var(--text);
  box-shadow: 0 18px 70px rgb(0 0 0 / 54%);
}
dialog::backdrop { background: rgb(4 10 7 / 75%); backdrop-filter: blur(5px); }
.search-dialog { width: min(560px, calc(100% - 32px)); padding: 19px; margin: min(15vh, 140px) auto auto; }
.search-head, .lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-head h2 { font-size: 1.2rem; }
.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #202a24;
  color: var(--text);
}
.icon-button:hover { color: var(--accent); border-color: #63846f; background: #2b3a30; }
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding-inline: 12px;
  border: 1px solid #4f6556;
  border-radius: 8px;
  background: #101713;
  color: var(--muted);
}
.search-field:focus-within { border-color: var(--accent); }
.search-field input { width: 100%; min-height: 45px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-field input::placeholder { color: var(--muted); }
.search-status { color: var(--muted); margin: 13px 0 3px; font-size: .875rem; }
.search-results { margin: 0; padding: 0; list-style: none; }
.search-result { display: flex; justify-content: space-between; gap: 12px; margin-top: 5px; padding: 11px; border-radius: 6px; overflow-wrap: anywhere; }
.search-result span { flex: 0 0 auto; color: var(--muted); font-size: .875rem; }
.search-result:hover, .search-result:focus-visible { background: #25362c; }

.lightbox { width: min(1000px, calc(100% - 32px)); padding: 14px; }
.lightbox-head { margin-bottom: 12px; color: var(--muted); font-size: .875rem; }
.lightbox-figure img { max-height: min(65dvh, 690px); width: 100%; object-fit: contain; background: #0c100e; border-radius: 8px; }
.lightbox-figure figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.lightbox-figure h2 { font-size: 1.15rem; }
.lightbox-figure p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.lightbox-controls { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .button { gap: 6px; }
  .mod-body { padding: 14px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { gap: 12px; }
  .primary-nav { gap: 19px; }
  .search-trigger kbd { display: none; }
  .search-trigger { padding: 0 10px; }
  .hero { margin-top: 19px; background-position: 59% center; }
  .collection { margin-top: 43px; }
  .mod-grid, .gallery-grid, .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .footer-inner { padding: 21px 0; flex-wrap: wrap; }
}

@media (max-width: 570px) {
  :root { --header-height: 94px; }
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: 48px 44px;
    gap: 0;
  }
  .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 9px; }
  .primary-nav a { padding-inline: 5px; }
  .search-trigger { grid-column: 2; grid-row: 1; min-height: 34px; }
  .brand-mark { width: 30px; height: 30px; }
  .hero {
    min-height: 370px;
    padding: 32px 23px;
    border-radius: 14px;
    align-items: end;
    background-position: 64% center;
  }
  .hero::before { background: linear-gradient(0deg, rgb(8 17 14 / 94%) 0%, rgb(8 17 14 / 67%) 43%, rgb(8 17 14 / 17%) 100%); }
  .hero h1 { font-size: clamp(2.6rem, 10.6vw, 3.8rem); }
  .hero p { margin-top: 12px; }
  .hero-actions { margin-top: 17px; }
  .hero .button { min-height: 42px; padding-inline: 11px; }
  .section-head { margin-bottom: 14px; }
  .section-heading { gap: 11px; }
  .section-icon { width: 39px; height: 39px; }
  .mod-grid, .link-grid { grid-template-columns: 1fr; }
  .gallery-card img { aspect-ratio: 1.15; }
  .gallery-info { inset: auto 9px 10px; }
  .gallery-name { font-size: .9375rem; }
  .gallery-expand { display: none; }
  .site-footer { margin-top: 44px; }
  .footer-inner { gap: 16px; }
  .footer-inner nav { flex-basis: 100%; order: 2; }
}

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