/* ==========================================================================
   方舆像素 (Fangyu Pixel) — Product Homepage & App Store Compliance Stylesheet
   Tokens faithfully derived from apple/PixelCore/PixelTheme.swift
   ========================================================================== */

:root {
  /* Core surfaces */
  --bg: #15181D;
  --screen-bg: #1A1D23;
  --panel: #22262E;
  --panel-2: #2C313A;
  --well: #0F1115;
  --well-line: #2A2F38;
  --edge: #0B0C0F;
  --rule: #3A404B;
  --sep: #1D2128;

  /* Ink */
  --ink: #F4EFE2;
  --ink-2: #C3C8D1;
  --ink-3: #9198A5;

  /* Block materials */
  --stone: #5A6170;
  --stone-hi: #8B93A3;
  --stone-lo: #363B46;

  --grass: #4A8A35;
  --grass-hi: #7CC056;
  --grass-lo: #28501D;
  --grass-wash: #1F2A1A;

  --gold: #D9A93A;
  --gold-hi: #F4D27A;
  --gold-lo: #7C5C17;
  --gold-ink: #2A1D05;
  --gold-wash: #2A2412;

  --water: #3A76B5;
  --water-hi: #6FA6DF;
  --water-lo: #1F4670;
  --water-wash: #162638;

  --red: #B3443A;
  --red-hi: #E07462;
  --red-lo: #66221B;
  --red-wash: #2E1512;

  /* Typography */
  --font-display: "Pixelify Sans", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --font-num: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", "Noto Sans SC", "Yu Gothic", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Metrics */
  --edge-w: 3px;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
  --shadow-sm: 4px 4px 0 rgba(0, 0, 0, 0.42);
  --max-w: 1160px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(244, 239, 226, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 226, 0.028) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--water-hi);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--well);
  border: 1px solid var(--well-line);
  padding: 2px 6px;
  color: var(--gold-hi);
  overflow-wrap: anywhere;
}

/* Language-tuned display typography */
html[data-lang="zh"] {
  --font-display: "ZCOOL QingKe HuangYou", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

html[data-lang="ja"] {
  --font-display: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

html[data-lang="ko"] {
  --font-display: "Pixelify Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}

html[data-lang="en"] .hero-title,
html[data-lang="de"] .hero-title,
html[data-lang="pt"] .hero-title,
html[data-lang="es"] .hero-title,
html[data-lang="en"] .sec-title,
html[data-lang="de"] .sec-title,
html[data-lang="pt"] .sec-title,
html[data-lang="es"] .sec-title,
html[data-lang="en"] .doc-hero h1,
html[data-lang="de"] .doc-hero h1,
html[data-lang="pt"] .doc-hero h1,
html[data-lang="es"] .doc-hero h1 {
  font-weight: 700;
  letter-spacing: 0.02em;
}

html[data-lang="ja"] .hero-title,
html[data-lang="ko"] .hero-title,
html[data-lang="ja"] .sec-title,
html[data-lang="ko"] .sec-title,
html[data-lang="ja"] .doc-hero h1,
html[data-lang="ko"] .doc-hero h1,
html[data-lang="ja"] .doc-section h2,
html[data-lang="ko"] .doc-section h2 {
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* Layout container */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
}

.wrap-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px));
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--edge);
  box-shadow: 0 3px 0 rgba(58, 64, 75, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none !important;
  flex-shrink: 0;
}

.brand-icon {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--edge);
}

.brand-sub {
  font-family: var(--font-num);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 11px;
  border: 2px solid transparent;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--edge);
  text-decoration: none;
}

.lang-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 2px solid var(--edge);
  background: var(--well);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.lang-select-wrap::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--grass-hi);
  margin-left: 9px;
  flex-shrink: 0;
  pointer-events: none;
}

.lang-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 8px;
  font-size: 11px;
  color: var(--ink-2);
  pointer-events: none;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 24px 6px 8px;
  cursor: pointer;
  line-height: 1.2;
}

.lang-select:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lang-select option {
  background: #1A1D23;
  color: #F4EFE2;
}

/* ==========================================================================
   Pixel UI Primitives (Panels, Buttons, Badges, Wells)
   ========================================================================== */
.px-panel {
  background: var(--panel);
  border: var(--edge-w) solid var(--edge);
  box-shadow:
    inset 3px 3px 0 var(--panel-2),
    inset -3px -3px 0 #181B21,
    var(--shadow);
  padding: 24px;
}

.px-panel-flat {
  background: var(--panel);
  border: var(--edge-w) solid var(--edge);
  box-shadow:
    inset 2px 2px 0 var(--panel-2),
    inset -2px -2px 0 #181B21;
  padding: 20px;
}

.px-panel-gold {
  background: var(--gold-wash);
  border: var(--edge-w) solid var(--gold-lo);
  box-shadow:
    inset 2px 2px 0 rgba(244, 210, 122, 0.2),
    inset -2px -2px 0 rgba(11, 12, 15, 0.5),
    var(--shadow);
  padding: 24px;
}

.px-well {
  background: var(--well);
  border: var(--edge-w) solid var(--edge);
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.55);
  padding: 16px;
}

.px-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 15px;
  border: var(--edge-w) solid var(--edge);
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.08s ease, filter 0.1s ease;
  user-select: none;
  white-space: nowrap;
}

.px-btn:hover {
  filter: brightness(1.08);
}

.px-btn:active {
  transform: translate(2px, 2px);
}

.px-btn-primary {
  background: var(--grass);
  color: var(--ink);
  box-shadow:
    inset 3px 3px 0 var(--grass-hi),
    inset -3px -3px 0 var(--grass-lo),
    var(--shadow-sm);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.px-btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow:
    inset 3px 3px 0 var(--gold-hi),
    inset -3px -3px 0 var(--gold-lo),
    var(--shadow-sm);
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

.px-btn-stone {
  background: var(--stone);
  color: var(--ink);
  box-shadow:
    inset 3px 3px 0 var(--stone-hi),
    inset -3px -3px 0 var(--stone-lo),
    var(--shadow-sm);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.px-btn-water {
  background: var(--water);
  color: var(--ink);
  box-shadow:
    inset 3px 3px 0 var(--water-hi),
    inset -3px -3px 0 var(--water-lo),
    var(--shadow-sm);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.px-btn-sm {
  font-size: 13px;
  padding: 7px 12px;
  box-shadow:
    inset 2px 2px 0 var(--stone-hi),
    inset -2px -2px 0 var(--stone-lo);
}

.px-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border: 2px solid var(--edge);
  background: var(--well);
  color: var(--ink-2);
  white-space: nowrap;
}

.px-badge .dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex-shrink: 0;
}

.px-badge-green {
  background: var(--grass-wash);
  border-color: var(--grass-lo);
  color: var(--grass-hi);
}

.px-badge-gold {
  background: var(--gold-wash);
  border-color: var(--gold-lo);
  color: var(--gold-hi);
}

.px-badge-water {
  background: var(--water-wash);
  border-color: var(--water-lo);
  color: var(--water-hi);
}

/* ==========================================================================
   Hero Section (Dusk Pixel Sky Bands + Interactive Voxel Diorama)
   ========================================================================== */
.hero {
  position: relative;
  padding-block: 52px 64px;
  background:
    linear-gradient(
      180deg,
      #1B2435 0%,
      #1B2435 16%,
      #223049 16%,
      #223049 32%,
      #2C3D5A 32%,
      #2C3D5A 48%,
      #3B4E6B 48%,
      #3B4E6B 62%,
      #4A5872 62%,
      #4A5872 74%,
      #242B38 74%,
      #15181D 100%
    );
  border-bottom: 3px solid var(--edge);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 12, 15, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 12, 15, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-brand-row > div {
  min-width: 0;
}

.hero-brand-row .px-badge {
  white-space: normal;
  line-height: 1.35;
}

.hero-app-icon {
  width: 82px;
  height: 82px;
  image-rendering: pixelated;
  filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.48));
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.2vw, 76px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: 5px 5px 0 var(--edge);
}

.hero-title-en {
  font-family: var(--font-num);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-tagline {
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  text-shadow: 2px 2px 0 rgba(11, 12, 15, 0.85);
}

.hero-lede {
  font-size: 15.5px;
  color: #DDE2E8;
  max-width: 52ch;
  text-shadow: 1px 1px 0 rgba(11, 12, 15, 0.65);
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.hero-note {
  font-size: 13px;
  color: #C3C8D1;
  border-left: 3px solid var(--gold);
  padding-left: 12px;
  background: rgba(15, 17, 21, 0.45);
  padding-block: 7px;
  padding-right: 12px;
}

/* Interactive Diorama Widget */
.diorama-shell {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(21, 24, 29, 0.92);
}

.diorama-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.diorama-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: var(--well);
  border: 3px solid var(--edge);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.diorama-canvas-wrap:active {
  cursor: grabbing;
}

.diorama-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.diorama-hud-tl,
.diorama-hud-bl,
.diorama-hud-br {
  position: absolute;
  pointer-events: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(15, 17, 21, 0.84);
  border: 2px solid var(--edge);
  padding: 4px 9px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.diorama-hud-tl { top: 10px; left: 10px; }
.diorama-hud-bl { bottom: 10px; left: 10px; color: var(--gold-hi); }
.diorama-hud-br { bottom: 10px; right: 10px; color: var(--grass-hi); }

.diorama-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.seg-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  min-width: 54px;
}

.seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  border: 2px solid var(--edge);
  background: var(--well);
}

.seg-btn {
  appearance: none;
  border: 0;
  border-right: 2px solid var(--edge);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}

.seg-btn:last-child {
  border-right: 0;
}

.seg-btn:hover {
  background: var(--panel);
  color: var(--ink);
}

.seg-btn.is-on {
  background: var(--grass);
  color: var(--ink);
  box-shadow: inset 2px 2px 0 var(--grass-hi), inset -2px -2px 0 var(--grass-lo);
}

.seg-btn.is-on-gold {
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: inset 2px 2px 0 var(--gold-hi), inset -2px -2px 0 var(--gold-lo);
}

.seg-btn.is-on-water {
  background: var(--water);
  color: var(--ink);
  box-shadow: inset 2px 2px 0 var(--water-hi), inset -2px -2px 0 var(--water-lo);
}

/* ==========================================================================
   Stats Ribbon
   ========================================================================== */
.stats-strip {
  background: var(--screen-bg);
  border-bottom: 3px solid var(--edge);
  padding-block: 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-item {
  border-left: 3px solid var(--rule);
  padding-left: 14px;
}

.stat-num {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-hi);
  line-height: 1.15;
}

.stat-label {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.sec {
  padding-block: 68px;
  border-bottom: 3px solid var(--sep);
}

.sec-alt {
  background: rgba(26, 29, 35, 0.72);
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 34px;
  max-width: 680px;
}

.sec-eyebrow {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-hi);
}

.sec-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 var(--edge);
}

.sec-desc {
  font-size: 15.5px;
  color: var(--ink-2);
}

/* 4-Step Flow */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.step-shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--well);
  overflow: hidden;
}

.step-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

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

.step-shot .step-num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  font-size: 16px;
  padding: 3px 9px;
  background: rgba(15, 17, 21, 0.88);
  border: 2px solid var(--edge);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

.step-body {
  padding: 16px 18px 18px;
  border-top: 3px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.step-num {
  font-family: var(--font-num);
  font-size: 28px;
  font-weight: 700;
  color: var(--grass-hi);
  line-height: 1;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.step-card p {
  font-size: 14px;
  color: var(--ink-2);
}

/* Visual Showcase Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--well);
  overflow: hidden;
}

.gallery-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

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

.gallery-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}

.gallery-body {
  padding: 18px 20px 20px;
  border-top: 3px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.gallery-body h3 {
  font-size: 17px;
  font-weight: 700;
}

.gallery-body p {
  font-size: 14px;
  color: var(--ink-2);
}

/* Feature Bento Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feat-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.feat-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--well);
  overflow: hidden;
}

.feat-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

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

.feat-body {
  padding: 18px 20px 20px;
  border-top: 3px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.feat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--well);
  border: 3px solid var(--edge);
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-hi);
  flex-shrink: 0;
}

.feat-card h3 {
  font-size: 17.5px;
  font-weight: 700;
}

.feat-card p {
  font-size: 14.5px;
  color: var(--ink-2);
}

.feat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.feat-tags span {
  font-size: 12px;
  color: var(--ink-2);
  background: var(--well);
  border: 1px solid var(--well-line);
  padding: 2px 8px;
}

/* Export Formats Grid */
.export-hero-shot {
  padding: 0;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--well);
}

.export-hero-shot img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.export-hero-shot:hover img {
  transform: scale(1.012);
}

.exports-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.export-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}

.export-ext {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 700;
  color: var(--water-hi);
}

.export-card h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.export-card p {
  font-size: 13.5px;
  color: var(--ink-2);
}

/* Apple Ecosystem Platforms */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.plat-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.plat-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  background: var(--well);
  overflow: hidden;
}

.plat-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

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

.plat-body {
  padding: 18px 20px 20px;
  border-top: 3px solid var(--edge);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plat-req {
  font-family: var(--font-num);
  font-size: 13px;
  color: var(--water-hi);
}

/* Pixel Image Lightbox */
.fy-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fy-lightbox.is-open {
  display: flex;
}

.fy-lightbox-box {
  position: relative;
  max-width: min(1280px, 94vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 3px solid var(--edge);
  box-shadow: inset 2px 2px 0 var(--panel-2), 0 24px 64px rgba(0, 0, 0, 0.72);
}

.fy-lightbox-img {
  display: block;
  max-width: min(1274px, calc(94vw - 6px));
  max-height: calc(90vh - 56px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--well);
}

.fy-lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-top: 3px solid var(--edge);
  background: var(--screen-bg);
}

.fy-lightbox-cap {
  font-size: 13.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fy-lightbox-close {
  flex-shrink: 0;
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--stone);
  color: var(--ink);
  border: 2px solid var(--edge);
  cursor: pointer;
}

.fy-lightbox-close:hover {
  filter: brightness(1.12);
}

.plat-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-2);
}

.plat-list li {
  padding-left: 16px;
  position: relative;
}

.plat-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--grass-hi);
}

/* Landmarks Chips */
.landmark-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landmark-chip {
  font-size: 13.5px;
  background: var(--panel);
  border: 2px solid var(--edge);
  box-shadow: inset 2px 2px 0 var(--panel-2);
  padding: 6px 12px;
  color: var(--ink);
}

.landmark-chip small {
  color: var(--ink-3);
  margin-left: 6px;
  font-size: 12px;
}

/* Pricing / Fangyu Pro Section */
.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 24px;
  align-items: start;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.plan-card-featured {
  background: var(--gold-wash);
  border-color: var(--gold);
  box-shadow:
    inset 3px 3px 0 rgba(244, 210, 122, 0.22),
    inset -3px -3px 0 rgba(11, 12, 15, 0.6),
    var(--shadow);
}

.plan-price {
  font-family: var(--font-num);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.plan-card-featured .plan-price {
  color: var(--gold-hi);
}

.plan-price-sub {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--ink-3);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14.5px;
}

.check-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-2);
}

.check-mark {
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--grass-hi);
  flex-shrink: 0;
  line-height: 1.5;
}

.check-mark-gold {
  color: var(--gold-hi);
}

.disclosure-box {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-3);
}

/* App Store Review / Compliance Bar */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card h3 {
  font-size: 16.5px;
  font-weight: 700;
}

.review-card p {
  font-size: 14px;
  color: var(--ink-2);
}

.review-card .px-btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ==========================================================================
   Subpages (Privacy, Support, Terms)
   ========================================================================== */
.doc-hero {
  padding-block: 44px 36px;
  background: linear-gradient(180deg, #1E283A 0%, #15181D 100%);
  border-bottom: 3px solid var(--edge);
}

.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 3px 3px 0 var(--edge);
  margin-top: 10px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.doc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.doc-body {
  padding-block: 44px 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.doc-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-section h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule);
}

.doc-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-hi);
  margin-top: 6px;
}

.doc-section p,
.doc-section li {
  color: var(--ink-2);
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-list li {
  padding-left: 18px;
  position: relative;
}

.doc-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.doc-list strong {
  color: var(--ink);
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 540px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 11px 14px;
  border: 2px solid var(--edge);
  vertical-align: top;
}

.data-table th {
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 700;
}

.data-table td {
  background: var(--well);
  color: var(--ink-2);
}

.faq-item {
  border-bottom: 2px solid var(--sep);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.faq-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.faq-item h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}

.notice-pre {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  background: var(--well);
  border: 2px solid var(--edge);
  padding: 16px;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre-wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--well);
  border-top: 3px solid var(--edge);
  padding-block: 42px 54px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--sep);
}

.footer-brand {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 130px;
}

.footer-col h4 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 3px;
}

.footer-col a {
  color: var(--ink-2);
  font-size: 13.5px;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.65;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid,
  .pricing-layout {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .exports-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid,
  .features-grid,
  .platforms-grid,
  .review-grid,
  .plan-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding-block: 10px 8px;
  }

  .brand-sub {
    display: none;
  }

  .nav-links {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--sep);
  }

  .nav-links a {
    font-size: 13px;
    padding: 4px 8px;
  }

  .lang-select-wrap {
    margin-left: auto;
  }

  .hero {
    padding-block: 32px 44px;
  }

  .hero-app-icon {
    width: 64px;
    height: 64px;
  }

  .steps-grid,
  .exports-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .px-panel {
    padding: 18px;
  }

  .px-panel.gallery-card,
  .px-panel.feat-card,
  .px-panel.plat-card,
  .px-panel.export-hero-shot {
    padding: 0;
  }

  .diorama-hud-br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .gallery-img-wrap img {
    transition: none;
  }
}
