:root {
  color-scheme: light;
  --page: #fafaf8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --radius: 24px;
  --nav-bg: rgba(250, 250, 248, 0.85);
  --nav-text: #1a1a1a;
  --nav-muted: #6b6b6b;
  --nav-accent: #2563eb;
  --nav-hover: #f0f0eb;
  --nav-line: #d4d4d4;
  --nav-blur: 12px;
}

[data-theme="cool"] {
  color-scheme: dark;
  --page: #101114;
  --surface: rgba(22, 22, 22, 0.82);
  --surface-solid: #161616;
  --text: #f5f5f5;
  --muted: #a0a0a0;
  --line: #2a2a2a;
  --accent: #ff6b35;
  --accent-soft: rgba(255, 107, 53, 0.14);
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.28);
  --nav-bg: rgba(10, 10, 10, 0.9);
  --nav-text: #f5f5f5;
  --nav-muted: #a0a0a0;
  --nav-accent: #ff6b35;
  --nav-hover: #1a1a1a;
  --nav-line: #2a2a2a;
  --nav-blur: 20px;
}

* { box-sizing: border-box; }

html { background: var(--page); scroll-behavior: smooth; }

body.visual-world,
.world-gallery-page {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.world-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--nav-line);
  background: var(--nav-bg);
  backdrop-filter: blur(var(--nav-blur));
}

.world-subnav__inner,
.world-main,
.world-footer__inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.world-nav {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 32px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.world-brand { flex-shrink: 0; color: var(--nav-text); font-size: 16px; font-weight: 700; letter-spacing: .05em; text-decoration: none; }
.world-links { display: flex; align-items: center; gap: 4px; }
.world-links a { position: relative; padding: 6px 12px; border-radius: 6px; color: var(--nav-muted); font-size: 14px; text-decoration: none; transition: color 160ms ease, background-color 160ms ease; }
.world-links a[aria-current="page"] { color: var(--nav-accent); background: var(--nav-hover); }
.world-links a[aria-current="page"]::after { content: ""; position: absolute; width: 16px; height: 2px; left: 50%; bottom: 0; transform: translateX(-50%); border-radius: 999px; background: var(--nav-accent); }
.world-nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.world-theme {
  min-height: 34px;
  padding-inline: 12px;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--nav-text);
  background: var(--nav-hover);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.world-theme:active { transform: scale(.97); }
.world-menu { display: none; position: relative; }
.world-menu summary { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--nav-text); background: var(--nav-hover); cursor: pointer; list-style: none; }
.world-menu summary::-webkit-details-marker { display: none; }
.world-menu__panel { position: absolute; top: 40px; right: 0; width: 180px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow); }
.world-menu__panel a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; }
.world-menu__panel a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.world-subnav {
  position: sticky;
  top: 56px;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
}

.world-subnav__inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.world-subnav__inner::-webkit-scrollbar { display: none; }
.world-subnav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 120ms ease;
}
.world-subnav a[aria-current="page"] { color: var(--text); background: var(--surface-solid); box-shadow: 0 1px 5px rgba(0,0,0,.06); }
.world-subnav a:active { transform: scale(.97); }

.world-main { padding-block: 76px 96px; }
.world-eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.world-hero { max-width: 760px; margin-bottom: 56px; }
.world-hero h1 { margin: 0; font-size: clamp(44px, 8vw, 84px); line-height: .98; letter-spacing: -.055em; }
.world-hero p { max-width: 660px; margin: 24px 0 0; color: var(--muted); font-size: clamp(18px, 2.3vw, 23px); line-height: 1.55; letter-spacing: -.015em; }

.world-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.world-card {
  grid-column: span 6;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  text-decoration: none;
  isolation: isolate;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease, border-color 160ms ease;
}
.world-card:first-child { grid-column: span 12; min-height: 540px; }
.world-card__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.world-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.72)); }
.world-card__body { position: absolute; inset: auto 0 0; z-index: 2; padding: clamp(24px, 4vw, 42px); color: #fff; }
.world-card__body--dark { color: var(--text); }
.world-card__body h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.035em; }
.world-card__body p { max-width: 600px; margin: 10px 0 0; color: inherit; opacity: .78; font-size: 16px; line-height: 1.6; }
.world-card__action { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: inherit; font-size: 14px; font-weight: 700; }

.world-card--skill { background: #ebe9e4; }
.world-card--gear { background: #dfe4e7; }
[data-theme="cool"] .world-card--skill { background: #23221f; }
[data-theme="cool"] .world-card--gear { background: #20252a; }
.world-card__gear-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.world-card__skill-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.world-card__shade--gear { background: linear-gradient(180deg, rgba(0,0,0,0) 34%, rgba(4,12,28,.78) 100%); }
.world-art {
  position: absolute;
  inset: 24px 24px 160px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7a59 0 33%, #f4d35e 33% 64%, #1f6feb 64%);
  box-shadow: 0 22px 36px rgba(0,0,0,.12);
}
.world-art::after { content: "Aa"; position: absolute; right: 24px; bottom: 16px; color: white; font-size: 72px; font-weight: 800; letter-spacing: -.08em; }
.world-camera {
  position: absolute;
  width: min(260px, 65%);
  aspect-ratio: 1.45;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 24px;
  background: #2a2a2d;
  box-shadow: 0 24px 50px rgba(0,0,0,.23);
}
.world-camera::before { content: ""; position: absolute; width: 42%; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 12px solid #5d6268; border-radius: 50%; background: #12151a; box-shadow: inset 0 0 0 8px #202b35; }
.world-camera::after { content: ""; position: absolute; width: 28%; height: 14%; top: -9%; left: 12%; border-radius: 8px 8px 0 0; background: #353539; }

.world-section { margin-top: 64px; }
.world-section h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.035em; }
.world-section > p { max-width: 680px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.world-empty { margin-top: 24px; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-solid); }
.world-empty strong { font-size: 19px; }
.world-empty p { margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.world-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.world-field { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); }
.world-field span { display: block; color: var(--accent); font-size: 12px; font-weight: 700; }
.world-field strong { display: block; margin-top: 7px; font-size: 15px; }

.gear-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 28px;
}
.gear-toolbar__note { margin: 0; color: var(--muted); font-size: 14px; }
.gear-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gear-filter {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-solid);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.gear-filter[aria-pressed="true"] { color: #fff; border-color: var(--accent); background: var(--accent); }
.gear-filter:active { transform: scale(.97); }

.gear-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.gear-card {
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-solid);
  box-shadow: 0 10px 32px rgba(0,0,0,.055);
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease, border-color 160ms ease;
}
.gear-card[hidden] { display: none; }
.gear-card--sold { opacity: .72; }
.gear-media-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}
.gear-media-link::after {
  content: "查看详情";
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  color: #fff;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  background: rgba(14,16,20,.58);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.gear-media-link:hover::after,
.gear-media-link:focus-visible::after { opacity: 1; transform: translateY(0); }
.gear-media-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gear-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f2f3f5; }
[data-theme="cool"] .gear-media { background: #242529; }
.gear-media img { position: absolute; inset: 0; width: 100%; height: 100%; margin: auto; object-fit: contain; padding: 24px; transform: translateY(var(--gear-lift, 0)); transition: transform 360ms cubic-bezier(.2,.8,.2,1); }
.gear-media--scene img { padding: 0; }
.gear-media img:is(
  [src$="tamron-28-200.webp"],
  [src$="viltrox-85-f2.png"],
  [src$="fujinon-xc15-45.png"],
  [src$="viltrox-56-f17-xf.webp"],
  [src$="dji-osmo-nano.png"],
  [src$="iphone-17-pro.png"],
  [src$="dji-mic-mini.png"],
  [src$="dji-pocket-4p.webp"],
  [src$="viltrox-16-f18.png"],
  [src$="sony-55-f18.webp"],
  [src$="dji-pocket-3.png"],
  [src$="viltrox-28-f45.png"]
) { --gear-lift: -10px; }
.gear-media img:is([src$="sony-55-f18.webp"], [src$="fujinon-xc15-45.png"]) { width: 72%; height: 72%; }
.gear-state { display: inline-flex; width: fit-content; margin-top: 12px; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(29,29,31,.78); font-size: 12px; font-weight: 700; }
.gear-state--current { background: rgba(37,99,235,.88); }
.gear-state--deciding { background: rgba(158,92,0,.88); }
.gear-state--sold { background: rgba(91,91,96,.82); }
.gear-body { padding: 20px; }
.gear-brandline { display: flex; align-items: baseline; justify-content: flex-start; }
.gear-brand { margin: 0; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .045em; }
.gear-wordmark { display: none; }
.gear-body h3 { margin: 8px 0 0; min-height: 2.5em; font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
.gear-role { margin: 10px 0 0; min-height: 4.8em; color: var(--muted); font-size: 14px; line-height: 1.6; }
.gear-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 17px; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.gear-source-note { margin: 26px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

@media (hover: hover) and (pointer: fine) {
  .gear-filter:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
  .gear-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,.1); }
  .gear-card:hover .gear-media img { transform: translateY(var(--gear-lift, 0)) scale(1.025); }
  .gear-link:hover { text-decoration: underline; text-underline-offset: 3px; }
}

@media (hover: none) {
  .gear-media-link::after { opacity: .88; transform: none; }
}

.world-footer { border-top: 1px solid var(--line); }
.world-footer__inner { display: flex; justify-content: space-between; gap: 16px; padding-block: 28px; color: var(--muted); font-size: 13px; }

/* Existing Astro gallery: preserve its behavior, harmonize its surface and motion. */
.world-gallery-page { min-height: 100vh; }
.world-gallery-page .world-subnav { margin-top: 0; }
.world-gallery-page main {
  width: min(100%, 1120px);
  max-width: 1120px !important;
  margin-inline: auto;
}
.world-gallery-page main h1 { color: var(--text); letter-spacing: -.045em; }
.world-gallery-page main p { color: var(--muted); }
.world-gallery-page main > section > div:first-child { text-align: center; }
.world-gallery-page main > section > div:first-child p { color: var(--accent) !important; }
.world-gallery-page astro-island[component-url*="PhotographyWall"] > div > div:first-child > p { max-width: 720px; margin-inline: auto; text-align: center; }
.world-gallery-page main button { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 120ms ease !important; }
.world-gallery-page main button:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .world-links a:hover, .world-subnav a:hover { color: var(--text); }
  .world-theme:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  .world-card:hover { transform: translateY(-4px); box-shadow: 0 26px 68px rgba(0,0,0,.13); }
  .world-card:hover :is(.world-card__image, .world-card__gear-image, .world-card__skill-image) { transform: scale(1.025); }
}

@media (max-width: 760px) {
  .world-nav { padding-inline: 16px; }
  .world-subnav__inner, .world-main, .world-footer__inner { width: min(100% - 28px, 1120px); }
  .world-links { display: none; }
  .world-menu { display: block; }
  .world-theme [data-world-theme-label] { display: inline; }
  .world-main { padding-block: 52px 72px; }
  .world-hero { margin-bottom: 38px; }
  .world-card, .world-card:first-child { grid-column: span 12; min-height: 430px; }
  .world-fields { grid-template-columns: repeat(2, 1fr); }
  .gear-toolbar { align-items: flex-start; flex-direction: column; }
  .gear-card { grid-column: span 12; }
  .world-footer__inner { flex-direction: column; }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .gear-card { grid-column: span 6; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .world-header, .world-subnav { background: var(--page); backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(0,0,0,.28); }
  [data-theme="cool"] { --line: rgba(255,255,255,.34); }
}
