/* ============================================================================
   TrailNote｜徒步笔记 —— 全站样式
   自然清新的户外风：森林绿主色、柔和留白、克制的阴影与圆角。
   移动端优先，支持浅色 / 深色模式（[data-theme] 由 JS 与内联脚本设置）。
   ========================================================================== */

/* ---------------------------------------------------------------- 设计变量 */
:root {
  --brand-50: #eef7ef;
  --brand-100: #dcefdd;
  --brand-200: #b9dfbc;
  --brand-400: #5aa860;
  --brand: #2e7d32;
  --brand-600: #276b2b;
  --brand-700: #1b5e20;
  --brand-900: #0f3313;
  --accent: #f0a03c;
  --accent-soft: #fdf1de;

  --bg: #f6faf6;
  --bg-deep: #eef4ee;
  --surface: #ffffff;
  --surface-2: #f2f7f2;
  --surface-3: #e9f1ea;
  --ink: #15241a;
  --ink-2: #40544a;
  --ink-3: #6d8177;
  --line: #dde7de;
  --line-strong: #c8d7ca;
  --shadow-1: 0 1px 2px rgba(17, 40, 24, 0.05), 0 10px 28px -18px rgba(17, 40, 24, 0.28);
  --shadow-2: 0 2px 6px rgba(17, 40, 24, 0.06), 0 22px 48px -22px rgba(17, 40, 24, 0.34);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);

  --level-easy: #3f9d54;
  --level-mid: #d9822b;
  --level-hard: #c4463a;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-full: 999px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  --container: 1200px;
  --prose: 44rem;
  --header-h: 68px;

  --font: system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC',
    sans-serif;
  --font-num: 'SF Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme='dark'] {
  --brand-50: #16281d;
  --brand-100: #1c3423;
  --brand-200: #28492f;
  --brand-400: #6fbb76;
  --brand: #4f9e57;
  --brand-600: #63b26b;
  --brand-700: #7cc383;
  --brand-900: #dff0e0;
  --accent: #f0ab55;
  --accent-soft: #33281a;

  --bg: #0c1310;
  --bg-deep: #0a100d;
  --surface: #131e19;
  --surface-2: #182521;
  --surface-3: #1e2e28;
  --ink: #e8f1ea;
  --ink-2: #b5c7bb;
  --ink-3: #8ba095;
  --line: #253429;
  --line-strong: #34463a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 30px -20px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.45), 0 26px 54px -24px rgba(0, 0, 0, 0.8);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  --level-easy: #57b56c;
  --level-mid: #e39a45;
  --level-hard: #dd6152;
}

/* ------------------------------------------------------------------ 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

a:hover {
  color: var(--brand-700);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

figure {
  margin: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s6) 0;
}

::selection {
  background: var(--brand-200);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- 布局容器 */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s5);
}

.container--narrow {
  max-width: 880px;
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section--tight {
  padding-block: clamp(32px, 4vw, 56px);
}

.section--alt {
  background: var(--bg-deep);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: clamp(24px, 3vw, 40px);
}

.section-head__text {
  max-width: 62ch;
}

.section-head h2 {
  margin-top: var(--s1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.eyebrow .icon {
  width: 16px;
  height: 16px;
}

.lead {
  margin: var(--s3) 0 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.3vw, 1.075rem);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 600;
  white-space: nowrap;
}

.link-more .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.link-more:hover .icon {
  transform: translateX(4px);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -80px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* 阅读进度条 */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-400), var(--brand), var(--accent));
  z-index: 120;
  transition: width 0.1s linear;
}

/* -------------------------------------------------------------------- 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-1);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s4);
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  padding-block: var(--s2);
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.06rem;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--ink-3);
  letter-spacing: 0.28em;
}

.nav-list {
  display: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  color: var(--ink-2);
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-700);
}

/* 导航项里的箭头只在移动端抽屉里显示 */
.nav-link .icon {
  display: none;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow-inset);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-toggle:hover,
.nav-toggle:hover {
  color: var(--brand-700);
  border-color: var(--brand-200);
  transform: translateY(-1px);
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon,
[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}

[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-foot {
  display: none;
}

/* 移动端抽屉导航 */
@media (max-width: 899px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    padding: var(--s4) var(--s5) var(--s6);
    display: grid;
    gap: var(--s1);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 0.32s var(--ease), visibility 0.32s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav-list {
    display: grid;
    gap: 2px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 1.06rem;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link .icon {
    display: block;
    width: 18px;
    height: 18px;
    color: var(--ink-3);
  }

  .nav-foot {
    display: grid;
    gap: var(--s2);
    padding-top: var(--s3);
    color: var(--ink-3);
    font-size: 0.9rem;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(9, 20, 13, 0.42);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
    align-items: center;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: var(--s5);
  }

  .nav-toggle,
  .nav-backdrop {
    display: none;
  }
}

/* -------------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  font-size: 0.98rem;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:hover {
  background: var(--brand-600);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn--ghost {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  color: var(--ink);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--brand-200);
  color: var(--brand-700);
}

.btn--outline {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: none;
}

.btn--outline:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-700);
  box-shadow: none;
}

.btn--lg {
  padding: 15px 28px;
  font-size: 1.02rem;
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

/* -------------------------------------------------------------------- 首屏 */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 82vh, 780px);
  padding-block: clamp(64px, 12vh, 120px) clamp(40px, 8vh, 72px);
  color: #fff;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(9, 22, 14, 0.52) 0%, rgba(9, 22, 14, 0.24) 38%, rgba(8, 18, 12, 0.78) 100%),
    radial-gradient(120% 80% at 15% 100%, rgba(20, 60, 30, 0.5), transparent 60%);
}

.hero__inner {
  width: 100%;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 7px 15px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(12, 28, 18, 0.34);
  backdrop-filter: blur(6px);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #eaf6ec;
}

.hero__eyebrow .icon {
  width: 16px;
  height: 16px;
}

.hero h1 {
  margin: var(--s5) 0 0;
  max-width: 18ch;
  color: #fff;
  text-shadow: 0 3px 32px rgba(6, 18, 10, 0.45);
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  letter-spacing: -0.02em;
}

.hero__sub {
  margin: var(--s4) 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(32px, 5vw, 56px);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero__fact {
  padding: var(--s4) var(--s5);
  background: rgba(10, 24, 15, 0.3);
}

.hero__fact b {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.hero__fact span {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.76);
}

@media (min-width: 720px) {
  .hero__facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 子页面小型头图 */
.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(56px, 10vw, 104px) clamp(36px, 6vw, 64px);
  color: #fff;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 20, 13, 0.62), rgba(8, 20, 13, 0.72));
}

.page-hero h1 {
  color: #fff;
  margin-top: var(--s3);
  max-width: 24ch;
}

.page-hero__lead {
  margin: var(--s4) 0 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.76);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.page-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}

/* -------------------------------------------------------------- 标签与药丸 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.pill .icon {
  width: 14px;
  height: 14px;
}

.pill--easy {
  background: color-mix(in srgb, var(--level-easy) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--level-easy) 40%, transparent);
  color: var(--level-easy);
}

.pill--mid {
  background: color-mix(in srgb, var(--level-mid) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--level-mid) 40%, transparent);
  color: var(--level-mid);
}

.pill--hard {
  background: color-mix(in srgb, var(--level-hard) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--level-hard) 40%, transparent);
  color: var(--level-hard);
}

.pill--glass {
  background: rgba(10, 24, 15, 0.42);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f2f8f3;
  backdrop-filter: blur(8px);
}

.pill--accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

/* ------------------------------------------------------------------ 卡片栅格 */
.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-inset);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--brand-200);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.045);
}

.card-media__tags {
  position: absolute;
  left: var(--s3);
  top: var(--s3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s5);
  flex: 1;
}

.card-title {
  font-size: 1.16rem;
  line-height: 1.4;
}

.card-title a {
  color: inherit;
}

.card-title a:hover {
  color: var(--brand-700);
}

.card-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s4);
  font-size: 0.85rem;
  color: var(--ink-3);
}

.meta-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meta-list .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-400);
}

.card-foot {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  font-size: 0.86rem;
  color: var(--ink-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-600);
}

.tag::before {
  content: '#';
  opacity: 0.6;
}

/* 游记卡片 */
.note-card .card-media {
  aspect-ratio: 3 / 2;
}

.note-card__date {
  font-family: var(--font-num);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* -------------------------------------------------------------------- 筛选 */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
  box-shadow: var(--shadow-inset);
  display: grid;
  gap: var(--s4);
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
}

.filter-row__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 84px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ink-3);
}

.filter-row__label .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-400);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--brand-200);
  color: var(--brand-700);
  background: var(--brand-50);
}

.chip[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-1);
}

.chip small {
  opacity: 0.7;
  font-weight: 500;
  margin-left: 4px;
}

.filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  font-size: 0.9rem;
  color: var(--ink-3);
  border-top: 1px dashed var(--line);
  padding-top: var(--s4);
}

.empty-state {
  display: none;
  text-align: center;
  padding: clamp(40px, 8vw, 72px) var(--s5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-3);
  background: var(--surface);
}

.empty-state.is-visible {
  display: block;
}

/* 被筛选隐藏的卡片 */
[data-filter-item].is-filtered-out {
  display: none;
}

.gallery figure.is-current {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.empty-state .icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--s3);
  color: var(--brand-400);
}

/* ------------------------------------------------------------------ 详情页 */
.detail-layout {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

@media (min-width: 1000px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

.detail-main {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  min-width: 0;
}

.detail-aside {
  display: grid;
  gap: var(--s5);
}

@media (min-width: 1000px) {
  .detail-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow-inset);
}

.panel--brand {
  background: linear-gradient(160deg, var(--brand-50), var(--surface) 70%);
  border-color: var(--brand-100);
}

.panel__title {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s4);
}

.panel__title .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.block-title {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.block-title__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
}

.block-title__icon .icon {
  width: 20px;
  height: 20px;
}

.block-title h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
}

.block-title p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.facts {
  display: grid;
  gap: var(--s1);
}

.fact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.fact:last-child {
  border-bottom: 0;
}

.fact dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  white-space: nowrap;
}

.fact dt .icon {
  width: 17px;
  height: 17px;
  color: var(--brand-400);
}

.fact dd {
  margin: 0;
  text-align: right;
  font-weight: 650;
  color: var(--ink);
}

.detail-lead {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--ink-2);
  margin: 0;
}

.highlight-list {
  display: grid;
  gap: var(--s3);
}

.highlight-list li {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-400);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--ink-2);
}

.highlight-list .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
  margin-top: 3px;
}

/* 图集 */
.gallery {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: zoom-in;
}

.gallery figure:first-child {
  grid-column: 1 / -1;
}

.gallery figure:first-child img {
  aspect-ratio: 16 / 9;
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.gallery figcaption {
  padding: var(--s3) var(--s4);
  font-size: 0.86rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  display: flex;
  gap: var(--s2);
  align-items: center;
}

.gallery figcaption .icon {
  width: 15px;
  height: 15px;
  color: var(--brand-400);
  flex: none;
}

/* 风险提示 */
.risk-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.risk {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-inset);
}

.risk__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  background: color-mix(in srgb, var(--level-hard) 14%, var(--surface));
  color: var(--level-hard);
}

.risk__icon .icon {
  width: 18px;
  height: 18px;
}

.risk h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.risk p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* 装备清单（详情页/装备页共用） */
.gear-list {
  display: grid;
  gap: var(--s3);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .gear-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gear-item {
  display: flex;
  gap: var(--s4);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.gear-item:hover {
  border-color: var(--brand-200);
  transform: translateY(-2px);
}

.gear-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--brand-50), var(--surface-2));
  border: 1px solid var(--brand-100);
  color: var(--brand-600);
}

.gear-item__icon .icon {
  width: 24px;
  height: 24px;
}

.gear-item h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}

.gear-item p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.gear-item__spec {
  font-family: var(--font-num);
  font-size: 0.76rem;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-weight: 500;
}

.gear-item__label {
  display: inline-block;
  margin-right: 6px;
  font-weight: 650;
  color: var(--brand-600);
}

/* 行程时间线 */
.timeline {
  display: grid;
  gap: var(--s4);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s4);
  padding-bottom: var(--s4);
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 46px;
  bottom: -6px;
  width: 2px;
  background: linear-gradient(var(--brand-200), transparent);
}

.timeline li:last-child::before {
  display: none;
}

.timeline__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-1);
  position: relative;
  z-index: 1;
}

.timeline h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.timeline p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.93rem;
}

/* 静态地图 */
.map-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.map-figure img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
}

.map-figure figcaption {
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-3);
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
}

.map-figure figcaption .icon {
  width: 18px;
  height: 18px;
  color: var(--brand-400);
  flex: none;
  margin-top: 3px;
}

/* 补给提示 */
.supply-list {
  display: grid;
  gap: var(--s3);
}

.supply-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--ink-2);
}

.supply-list b {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.supply-list .icon {
  width: 19px;
  height: 19px;
  color: var(--brand);
  margin-top: 4px;
}

/* 翻页 */
.pager {
  display: grid;
  gap: var(--s3);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .pager {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pager a:hover {
  border-color: var(--brand-200);
  transform: translateY(-2px);
}

.pager span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.pager strong {
  font-size: 1rem;
}

.pager .is-next {
  text-align: right;
  align-items: flex-end;
}

/* ------------------------------------------------------------------ 文章正文 */
.prose {
  max-width: var(--prose);
  font-size: 1.02rem;
  color: var(--ink-2);
}

.prose > * + * {
  margin-top: var(--s4);
}

.prose h2 {
  margin-top: var(--s7);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2::before {
  content: '';
  display: block;
  width: 42px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
  margin-bottom: var(--s3);
}

.prose p {
  margin: 0;
  line-height: 1.95;
}

.prose blockquote {
  margin: 0;
  padding: var(--s4) var(--s5);
  border-left: 4px solid var(--brand-400);
  background: var(--brand-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-size: 1.02rem;
}

.prose figure {
  margin: var(--s6) 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.prose figure img {
  width: 100%;
  aspect-ratio: 14 / 9;
  object-fit: cover;
}

.prose figcaption {
  padding: var(--s3) var(--s4);
  font-size: 0.86rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
}

.prose ul {
  display: grid;
  gap: var(--s2);
}

.prose ul li {
  position: relative;
  padding-left: 26px;
  line-height: 1.85;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-400);
}

.prose hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: var(--s7) 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  margin-top: var(--s4);
  font-size: 0.88rem;
  color: var(--ink-3);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-400);
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: clamp(24px, 4vw, 40px);
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ------------------------------------------------------------------ 装备页 */
.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-block: var(--s3);
}

.cat-nav__list {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: var(--s5);
  max-width: var(--container);
  margin-inline: auto;
}

.cat-nav__list::-webkit-scrollbar {
  display: none;
}

.cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 8px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}

.cat-nav a:hover,
.cat-nav a.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.cat-nav .icon {
  width: 17px;
  height: 17px;
}

.cat-section {
  scroll-margin-top: calc(var(--header-h) + 72px);
}

.cat-section + .cat-section {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.cat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.cat-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--brand), var(--brand-400));
  color: #fff;
  box-shadow: var(--shadow-1);
}

.cat-head__icon .icon {
  width: 26px;
  height: 26px;
}

.cat-head h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

.cat-head p {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 0.92rem;
  max-width: 68ch;
}

.principles {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.principle {
  padding: var(--s5);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.principle .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
  margin-bottom: var(--s3);
}

.principle h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.principle p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 关于页 */
.profile {
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}

@media (min-width: 900px) {
  .profile {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s6) var(--s5);
  text-align: center;
  box-shadow: var(--shadow-inset);
}

.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto var(--s4);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--brand), var(--brand-400));
  color: #fff;
  font-size: 2.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-1);
}

.profile-card h2 {
  font-size: 1.3rem;
}

.profile-card p {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}

.stat {
  padding: var(--s3);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.stat b {
  display: block;
  font-size: 1.2rem;
  color: var(--brand-700);
}

.stat span {
  font-size: 0.8rem;
  color: var(--ink-3);
}

.note-list {
  display: grid;
  gap: var(--s3);
}

.note-list li {
  display: flex;
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.note-list .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex: none;
  margin-top: 3px;
}

.note-list b {
  display: block;
  margin-bottom: 4px;
}

.note-list p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.steps li {
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-family: var(--font-num);
  font-size: 0.9rem;
  margin-bottom: var(--s3);
}

.steps h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5) var(--s6);
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--brand-50), var(--surface) 72%);
  border: 1px solid var(--brand-100);
}

.contact-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.contact-card code {
  font-family: var(--font-num);
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-700);
}

/* ------------------------------------------------------------------ 404 页 */
.error-page {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-block: clamp(48px, 9vw, 96px);
}

@media (min-width: 900px) {
  .error-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.error-page__art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.error-code {
  font-family: var(--font-num);
  font-size: clamp(3.6rem, 12vw, 6.5rem);
  line-height: 1;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.04em;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}

/* -------------------------------------------------------------------- 页脚 */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 64px) var(--s5);
}

.footer-grid {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.footer-brand strong {
  font-size: 1.05rem;
}

.footer-about {
  color: var(--ink-3);
  font-size: 0.9rem;
  max-width: 46ch;
}

.footer-col h3 {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s3);
}

.footer-col ul {
  display: grid;
  gap: var(--s2);
}

.footer-col a,
.footer-col span {
  color: var(--ink-2);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--brand-700);
}

.footer-bottom {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.footer-bottom p {
  margin: 0;
}

/* 备案号：按工信部要求页脚展示，并链接到备案系统 */
.footer-icp {
  font-size: 0.82rem;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.footer-icp a {
  color: var(--ink-3);
}

.footer-icp a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(6, 14, 9, 0.9);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: grid;
  gap: var(--s3);
  margin: 0;
}

.lightbox__figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface);
}

.lightbox__figure figcaption {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.05);
}

.lightbox__close {
  top: clamp(12px, 3vw, 28px);
  right: clamp(12px, 3vw, 28px);
}

.lightbox__nav--prev {
  left: clamp(8px, 3vw, 28px);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: clamp(8px, 3vw, 28px);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__counter {
  position: absolute;
  bottom: clamp(12px, 3vw, 28px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-num);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

/* -------------------------------------------------------------- 动效与节奏 */
/* 仅在 JS 可用时才做入场动画：禁用脚本或脚本失败时内容必须可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------------------------------------------------- 打印 */
@media print {
  .site-header,
  .site-footer,
  .hero__actions,
  .filters,
  .lightbox,
  .progress,
  .cat-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .panel {
    box-shadow: none;
    border-color: #ccc;
  }
}

/* ============================================================================
   商品相关（列表卡片 / 商品详情 / 尺码表 / 场景）
   ========================================================================== */

/* -------------------------------------------------------------- 商品卡片 */
.product-card .card-media {
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
}

.product-card .card-media img {
  object-fit: cover;
}

.product-card .card-body {
  gap: var(--s2);
  padding: var(--s4) var(--s5) var(--s5);
}

.product-card .card-title {
  font-size: 1.02rem;
  line-height: 1.45;
}

.product-card .card-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  flex-wrap: wrap;
}

.price {
  font-family: var(--font-num);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.price small {
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 5px;
}

.price--lg {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--surface-3);
  color: var(--ink-2);
}

.badge--new {
  background: var(--brand);
  color: #fff;
}

.badge--hot {
  background: var(--level-hard);
  color: #fff;
}

.badge--limited {
  background: color-mix(in srgb, var(--accent) 82%, var(--ink));
  color: #fff;
}

.badge--restock {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}

.swatches {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  box-shadow: 0 0 0 2px var(--surface) inset;
}

.swatch--sm {
  width: 11px;
  height: 11px;
}

/* ------------------------------------------------------------- 品类入口 */
.cat-tiles {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 720px) {
  .cat-tiles {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.cat-tile {
  display: grid;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.cat-tile:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-1);
}

.cat-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.cat-tile strong {
  font-size: 0.94rem;
}

.cat-tile span {
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- 商品详情页 */
.pdp {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

@media (min-width: 1000px) {
  .pdp {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  }
}

.pdp-gallery {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdp-gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: zoom-in;
}

.pdp-gallery figure:first-child {
  grid-column: 1 / -1;
}

.pdp-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.pdp-gallery figure:hover img {
  transform: scale(1.03);
}

.pdp-gallery figcaption {
  padding: 10px var(--s4);
  font-size: 0.82rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.pdp-panel {
  display: grid;
  gap: var(--s4);
  align-content: start;
}

@media (min-width: 1000px) {
  .pdp-panel {
    position: sticky;
    top: calc(var(--header-h) + 20px);
  }
}

.pdp-title {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.25;
}

.pdp-sub {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
}

.opt-group {
  display: grid;
  gap: var(--s2);
}

.opt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.opt-label span {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.color-opts,
.size-opts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.color-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
  font-size: 0.86rem;
  color: var(--ink-2);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.color-opt .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  flex: none;
}

.color-opt:hover {
  border-color: var(--brand-200);
  background: var(--brand-50);
  color: var(--brand-700);
}

.color-opt[aria-pressed='true'] {
  border-color: var(--brand);
  background: var(--brand-50);
  color: var(--brand-700);
}

.size-opt {
  min-width: 54px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-family: var(--font-num);
}

.size-opt[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.buy-box {
  display: grid;
  gap: var(--s3);
  padding: var(--s5);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--brand-50), var(--surface) 75%);
}

.buy-box h3 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.buy-box h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.buy-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.buy-steps {
  display: grid;
  gap: 8px;
  counter-reset: buy;
}

.buy-steps li {
  position: relative;
  padding-left: 28px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.buy-steps li::before {
  counter-increment: buy;
  content: counter(buy);
  position: absolute;
  left: 0;
  top: 1px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
}

.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
  font-size: 0.92rem;
}

.email-line code {
  font-family: var(--font-num);
  font-size: 0.95rem;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--brand-700);
}

.pdp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  font-size: 0.86rem;
  color: var(--ink-3);
}

.pdp-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pdp-meta .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-400);
}

/* 参数表 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.spec-table th {
  width: 30%;
  text-align: left;
  font-weight: 600;
  color: var(--ink-3);
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}

.spec-table td {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 0;
}

/* 尺码表 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
  font-size: 0.9rem;
}

.size-table caption {
  caption-side: top;
  text-align: left;
  padding: var(--s3) var(--s4);
  font-size: 0.84rem;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}

.size-table th,
.size-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-num);
}

.size-table thead th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.size-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.size-table tbody th {
  font-weight: 700;
  color: var(--brand-700);
}

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

/* --------------------------------------------------------------- 场景卡片 */
.look-card {
  display: grid;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.look-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.look-card:hover img {
  transform: scale(1.03);
}

.look-card__body {
  display: grid;
  gap: var(--s2);
  padding: var(--s5);
}

.look-card__place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.look-card__place .icon {
  width: 15px;
  height: 15px;
  color: var(--brand-400);
}

.look-card h3 {
  font-size: 1.12rem;
}

.look-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.look-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s1);
}

.look-products a {
  padding: 5px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.78rem;
  color: var(--ink-2);
}

.look-products a:hover {
  border-color: var(--brand-200);
  color: var(--brand-700);
}

/* ------------------------------------------------------------- 首页横幅条 */
.brand-strip {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .brand-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.brand-strip__item {
  display: flex;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.brand-strip__item .icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
  flex: none;
  margin-top: 3px;
}

.brand-strip__item b {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 3px;
}

.brand-strip__item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* 图文块（技术页） */
.split-block {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 900px) {
  .split-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split-block--reverse > :first-child {
    order: 2;
  }
}

.split-block figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.split-block img {
  width: 100%;
  object-fit: cover;
}

/* 浅色背景上的面包屑（商品详情页顶部） */
.breadcrumb {
  color: var(--ink-3);
}

.breadcrumb a {
  color: var(--ink-2);
}

.page-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.8);
}

.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.92);
}

.page-hero .breadcrumb a:hover {
  color: #fff;
}
