/* ============================================================
   style.css — Apple 全产品历史博物馆
   双主题 · 液态玻璃 · 动效
   ============================================================ */

:root {
  --bg-primary: #F5F5F7;
  --bg-secondary: #E8E8ED;
  --bg-tertiary: #FFFFFF;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-muted: #86868B;

  --card-bg: rgba(255, 255, 255, 0.55);
  --card-bg-solid: rgba(255, 255, 255, 0.78);
  --card-border: rgba(255, 255, 255, 0.6);
  --card-border-strong: rgba(0, 0, 0, 0.08);

  --highlight-silver: #D4D4D8;
  --highlight-silver-2: #C0C0C8;
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --accent-soft: rgba(0, 113, 227, 0.12);

  --spot-glow: rgba(0, 113, 227, 0.10);
  --spot-sheen: rgba(255, 255, 255, 0.55);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.08);

  --glass-blur: 22px;
  --nav-bg: rgba(245, 245, 247, 0.72);

  --hero-1: rgba(0, 113, 227, 0.22);
  --hero-2: rgba(192, 192, 200, 0.45);
  --hero-3: rgba(212, 212, 216, 0.5);
  --hero-4: rgba(255, 255, 255, 0.6);

  --modal-bg: rgba(20, 20, 22, 0.55);

  --brand-mark: rgba(0, 0, 0, 0.045);
  --brand-line: rgba(0, 0, 0, 0.07);

  --radius: 20px;
  --radius-sm: 14px;
  --nav-height: 64px;
}

[data-theme="dark"] {
  --bg-primary: #0A0A0C;
  --bg-secondary: #1C1C1E;
  --bg-tertiary: #2C2C2E;
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1A6;
  --text-muted: #86868B;

  --card-bg: rgba(28, 28, 30, 0.55);
  --card-bg-solid: rgba(28, 28, 30, 0.82);
  --card-border: rgba(255, 255, 255, 0.05);
  --card-border-strong: rgba(255, 255, 255, 0.10);

  --highlight-silver: #3A3A3C;
  --highlight-silver-2: #48484A;
  --accent: #2997FF;
  --accent-hover: #47A5FF;
  --accent-soft: rgba(41, 151, 255, 0.16);

  --spot-glow: rgba(41, 151, 255, 0.14);
  --spot-sheen: rgba(255, 255, 255, 0.14);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5);

  --nav-bg: rgba(10, 10, 12, 0.7);

  --hero-1: rgba(104, 112, 126, 0.32);
  --hero-2: rgba(84, 84, 88, 0.55);
  --hero-3: rgba(58, 58, 60, 0.6);
  --hero-4: rgba(20, 20, 22, 0.6);

  --modal-bg: rgba(0, 0, 0, 0.6);

  --brand-mark: rgba(255, 255, 255, 0.05);
  --brand-line: rgba(255, 255, 255, 0.08);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-width: 1200px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s ease, color 0.5s ease;
}

html.theme-switching, html.theme-switching *,
html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease,
    box-shadow 0.5s ease, fill 0.5s ease, stroke 0.5s ease !important;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
canvas { display: block; }

::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--highlight-silver-2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.glass, [data-glass] {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border-strong);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.24, 1),
    box-shadow 0.45s ease, border-color 0.45s ease, background-color 0.5s ease;
}

.glass::after, [data-glass]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg,
    var(--spot-sheen) 0%, transparent 32%,
    transparent 62%, var(--spot-sheen) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}

.glass::before, [data-glass]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%),
    var(--spot-glow), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.glass:hover, [data-glass]:hover { border-color: var(--card-border); }
.glass:hover::before, [data-glass]:hover::before { opacity: 1; }

.glass > *, [data-glass] > * { position: relative; z-index: 1; }

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle,
    var(--spot-glow) 0%, transparent 62%);
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  will-change: transform;
  transition: opacity 0.4s ease;
}
.cursor-glow.is-hidden { opacity: 0; }

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 1.5px solid var(--highlight-silver-2);
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.4s ease, width 0.2s ease, height 0.2s ease;
}

.site-disclaimer {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 30px;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  background: linear-gradient(90deg, transparent 0%, var(--accent-soft) 18%, var(--accent-soft) 82%, transparent 100%);
  border-bottom: 1px solid var(--card-border-strong);
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, transform 0.35s ease;
}
.site-disclaimer.scrolled { transform: translateY(-100%); }
.site-disclaimer::before, .site-disclaimer::after {
  content: "·";
  margin: 0 12px;
  color: var(--accent);
  font-weight: 700;
}

.brand-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.brand-logo {
  position: absolute;
  right: -150px;
  top: 54%;
  transform: translateY(-50%);
  width: 740px;
  height: auto;
  fill: var(--brand-mark);
  transition: fill 0.5s ease;
}
.brand-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--brand-line);
  transition: border-color 0.5s ease;
}
.ring-a { width: 860px; height: 860px; left: -400px; top: 10%; }
.ring-b { width: 560px; height: 560px; left: -190px; top: -9%; }
.ring-c { width: 1050px; height: 1050px; right: -480px; bottom: -32%; }

main, .site-footer { position: relative; z-index: 1; }

.site-nav {
  position: fixed;
  top: 30px; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease, top 0.35s ease;
}
.site-nav.scrolled {
  top: 0;
  border-bottom-color: var(--card-border-strong);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }
.apple-logo { width: 20px; height: auto; fill: var(--text-primary); transition: fill 0.5s ease; }

.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.3s ease, background-color 0.3s ease, color 0.5s ease;
}
.nav-links a:hover { color: var(--text-primary); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent); }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-primary);
  background: var(--accent-soft);
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.5s ease;
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.06); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sun, .icon-moon { transition: opacity 0.4s ease, transform 0.4s ease; }
[data-theme="light"] .icon-moon { opacity: 0.35; transform: scale(0.7); }
[data-theme="dark"] .icon-sun { opacity: 0.35; transform: scale(0.7); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px + 30px) 40px 120px;
}

.hero-bg {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(46% 60% at 18% 22%, var(--hero-1), transparent 58%),
    radial-gradient(38% 48% at 82% 30%, var(--hero-2), transparent 55%),
    radial-gradient(52% 66% at 60% 78%, var(--hero-3), transparent 60%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-size: 180% 180%;
  animation: heroFlow 20s ease-in-out infinite;
  transition: background-color 0.5s ease;
}
@keyframes heroFlow {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

.hero-content { max-width: 920px; }
.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 26px;
  animation: fadeUp 0.9s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.hero-title {
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 22px;
  background: linear-gradient(180deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.9s 0.1s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.hero-sub {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 44px;
  animation: fadeUp 0.9s 0.2s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; animation: fadeUp 0.9s 0.3s cubic-bezier(0.22, 0.8, 0.24, 1) both; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.24, 1), box-shadow 0.3s ease,
    background-color 0.3s ease, color 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px var(--accent-soft); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--card-bg); border: 1px solid var(--card-border-strong); color: var(--text-primary); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.scroll-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}
.scroll-hint svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; animation: bounce 1.8s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.section { max-width: 1440px; margin: 0 auto; padding: 110px 48px 30px; }
section[id] { scroll-margin-top: 116px; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-title {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-desc { font-size: 18px; color: var(--text-secondary); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.category-card {
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.24, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
.category-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), var(--spot-glow), transparent 42%);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.category-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--card-border); }
.category-card:hover::before { opacity: 1; }
.category-card > * { position: relative; z-index: 1; }

.category-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
  transition: transform 0.4s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.category-card:hover .category-icon { transform: scale(1.08) rotate(-4deg); }
.category-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.category-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.category-years { font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.category-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 18px; }
.category-count {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-tab {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-secondary);
  background: var(--card-bg);
  border: 1px solid var(--card-border-strong);
  transition: all 0.3s ease;
}
.filter-tab:hover { color: var(--text-primary); border-color: var(--highlight-silver-2); }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  perspective: 1200px;
}

.product-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px 24px;
  height: 240px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateY(0) rotateX(0) rotateY(0) scale(1);
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.24, 1), box-shadow 0.45s ease,
    border-color 0.45s ease, opacity 0.6s ease;
  will-change: transform;
}
.product-card::before {
  content: "";
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), var(--spot-glow), transparent 44%);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none; z-index: 1;
}
.product-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, var(--spot-sheen) 0%, transparent 34%, transparent 64%, var(--spot-sheen) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none; opacity: 0.5;
}
.product-card:hover {
  transform: translateY(-10px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--card-border);
}
.product-card:hover::before { opacity: 1; }
.product-card > * { position: relative; z-index: 2; }

.entering {
  opacity: 0 !important;
  transform: translateY(44px) scale(0.95) !important;
}

.product-visual {
  flex: 0 0 46%;
  height: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  margin-bottom: 0;
  border-radius: 14px;
  background: radial-gradient(120% 120% at 50% 20%, var(--bg-tertiary), transparent 70%);
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1);
}
.product-card:hover .product-visual { transform: scale(1.05); }
.product-visual svg { width: auto; height: 100%; max-height: 100%; filter: drop-shadow(0 16px 24px rgba(0,0,0,0.12)); }
.product-visual-photo img {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0,0,0,0.28));
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 100%;
}
.product-name { font-size: 21px; font-weight: 700; margin-bottom: 0; line-height: 1.22; }
.product-year { font-size: 14px; color: var(--accent); font-weight: 600; margin-bottom: 0; }
.product-summary {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}
.product-colors { display: flex; gap: 7px; align-items: center; margin-top: auto; }
.color-dot {
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--card-border-strong);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
}
.color-dot.concept { border-style: dashed; }

.products-empty { text-align: center; padding: 60px; color: var(--text-muted); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 40px;
}
.stat-card {
  text-align: center;
  padding: 34px 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.chart-card { padding: 26px 26px 20px; }
.chart-card-wide { grid-column: span 2; }
.chart-title { font-size: 16.5px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }
.chart-wrap { position: relative; height: 320px; }
.chart-card:not(.chart-card-wide) .chart-wrap { height: 320px; }
.chart-card-wide .chart-wrap { height: 360px; }

.data-source { text-align: center; margin-top: 40px; font-size: 13px; color: var(--text-muted); }

.chart-fallback { margin-top: 30px; }
.chart-fallback h3 { font-size: 18px; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--card-border-strong); background: var(--card-bg-solid); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-scroll th, .table-scroll td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--card-border-strong); }
.table-scroll th { background: var(--accent-soft); color: var(--text-primary); font-weight: 600; text-align: left; }
.table-scroll th:first-child, .table-scroll td:first-child { text-align: left; }
.table-scroll tr:last-child td { border-bottom: none; }

.privacy-hero {
  padding: 40px 44px;
  margin-bottom: 26px;
  text-align: center;
}
.privacy-hero h3 { font-size: 30px; font-weight: 700; margin-bottom: 12px; }
.privacy-hero p { font-size: 16px; color: var(--text-secondary); max-width: 820px; margin: 0 auto; }

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.privacy-card { padding: 30px 28px; }
.privacy-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.privacy-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.privacy-card h4 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.privacy-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.privacy-card li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 70px 40px 50px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--card-border-strong);
  margin-top: 40px;
}
.footer-note { font-size: 12.5px; margin-top: 8px; opacity: 0.75; }

/* ============================================================
   产品详情弹窗
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 30px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal.open { visibility: visible; opacity: 1; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modal-dialog {
  position: relative;
  width: min(1280px, 96vw);
  height: min(860px, 92vh);
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border-strong);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px) rotateX(8deg) scale(0.92);
  transition: transform 0.55s cubic-bezier(0.34, 1.3, 0.5, 1), opacity 0.5s ease;
}
.modal.open .modal-dialog {
  opacity: 1;
  transform: translateY(0) rotateX(0) scale(1);
}

.modal-dialog::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--spot-sheen), transparent 40%, transparent 60%, var(--spot-sheen));
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.modal.open .modal-dialog::before {
  animation: glassFlash 0.9s ease both;
}
@keyframes glassFlash {
  0% { opacity: 0; }
  25% { opacity: 0.9; }
  100% { opacity: 0; }
}

.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border-strong);
  display: grid; place-items: center;
  z-index: 10;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.modal-close:hover { transform: rotate(90deg) scale(1.06); background: var(--accent); color: #fff; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.modal-body {
  display: flex;
  height: 100%;
}

.modal-view-toggle {
  position: relative;
  flex-shrink: 0;
  align-self: flex-end;
  margin: 12px 16px 0 0;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 999px;
  border: 1px solid var(--card-border-strong);
  background: var(--card-bg-solid);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  color: var(--text-muted);
}
.modal-view-toggle button {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.modal-view-toggle button:hover { color: var(--text-primary); }
.modal-view-toggle button.active {
  background: var(--highlight-silver-2);
  color: var(--text-primary);
  font-weight: 600;
}
.view-toggle-sep { opacity: 0.4; }

.modal-viewer {
  flex: 0 0 55%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 40%, var(--bg-secondary), transparent 75%);
}
.viewer-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
  perspective: 1400px;
}
.viewer-hint {
  flex-shrink: 0;
  align-self: center;
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--card-bg-solid);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border-strong);
  pointer-events: none;
}
.css-device {
  position: relative;
  width: 60%;
  height: 74%;
  transform-style: preserve-3d;
  cursor: grab;
  will-change: transform;
}
.css-device.dragging { cursor: grabbing; }
.device-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.device-face.front { transform: translateZ(4px); }
.device-face.back { transform: rotateY(180deg) translateZ(4px); filter: brightness(0.86) saturate(0.9); }
.css-device svg { width: 100%; height: 100%; }

.viewer-stage canvas { border-radius: 12px; touch-action: none; }
.three-fallback-note {
  position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-muted);
}

.photo-device {
  position: relative;
  width: 88%;
  height: 94%;
  cursor: default;
  will-change: transform;
}
.photo-device img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
  user-select: none;
  -webkit-user-drag: none;
}

.modal-info {
  flex: 0 0 45%;
  border-left: 1px solid var(--card-border-strong);
  background: var(--bg-tertiary);
}
.info-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 44px 38px 48px;
  scrollbar-width: thin;
}
.info-category {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.info-name { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.info-year { font-size: 15px; color: var(--text-muted); margin: 6px 0 10px; }
.info-slogan {
  font-size: 17px;
  font-style: italic;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  margin-bottom: 18px;
}
.info-summary { font-size: 15px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 22px; }

.info-block { margin-bottom: 24px; }
.info-block h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.info-highlights { display: flex; flex-wrap: wrap; gap: 8px; }
.info-highlights li {
  font-size: 13px;
  color: var(--text-primary);
  background: var(--accent-soft);
  padding: 6px 13px;
  border-radius: 999px;
}
.info-history { font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; }

.variant-row { display: flex; flex-wrap: wrap; gap: 10px; }
.variant-item {
  min-width: 112px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--accent-soft);
  border: 1px solid var(--card-border-strong);
  color: var(--text-primary);
  text-align: left;
}
.variant-item strong { display: block; font-weight: 650; }
.variant-item small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }

.color-row { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 14px; }
.color-swatch {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--card-border-strong);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.3, 0.5, 1), box-shadow 0.25s ease;
}
.color-swatch:hover { transform: scale(1.14); }
.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), inset 0 2px 4px rgba(0,0,0,0.2);
}
.color-swatch.concept { border-style: dashed; }
.color-swatch .swatch-label {
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.color-swatch:hover .swatch-label, .color-swatch.active .swatch-label { opacity: 1; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table tr { border-bottom: 1px solid var(--card-border-strong); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th {
  text-align: left;
  width: 34%;
  padding: 10px 8px;
  color: var(--text-muted);
  font-weight: 500;
  vertical-align: top;
}
.spec-table td { padding: 10px 8px; color: var(--text-primary); }

.viewer-stage.glossy::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: glossSweep 0.9s ease;
  pointer-events: none;
  border-radius: 12px;
}
@keyframes glossSweep {
  from { background-position: 120% 0; }
  to { background-position: -20% 0; }
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border-strong);
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 0.8, 0.24, 1);
  z-index: 300;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.7s cubic-bezier(0.22, 0.8, 0.24, 1), transform 0.7s cubic-bezier(0.22, 0.8, 0.24, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .cursor-glow, .cursor-dot { display: none; }
}

@media (max-width: 1279px) {
  body { min-width: 0; }
  .categories-grid, .products-grid { grid-template-columns: repeat(3, 1fr); }
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .categories-grid, .products-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card-wide { grid-column: span 1; }
  .modal-body { flex-direction: column; }
  .modal-viewer { flex: 0 0 46%; }
  .modal-info { flex: 1 1 auto; }
}


.brand-logo-sm {
  right: auto;
  left: -130px;
  top: 8%;
  width: 460px;
  opacity: 0.7;
}
.brand-slogan {
  position: absolute;
  left: 8%;
  bottom: 7%;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-mark);
  transform: rotate(-90deg);
  transform-origin: left bottom;
  white-space: nowrap;
}
.ring-d { width: 500px; height: 500px; right: 6%; top: -12%; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-border-strong);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px;
  color: var(--text-muted);
  transition: border-color 0.3s ease, background-color 0.5s ease;
}
.lang-toggle:hover { border-color: var(--highlight-silver-2); }
.lang-toggle span { cursor: pointer; transition: color 0.25s ease; }
.lang-toggle span:hover { color: var(--text-primary); }
.lang-toggle span.active { color: var(--accent); font-weight: 700; }
.lang-toggle i { opacity: 0.4; font-style: normal; }

.sources-section { padding-bottom: 30px; }
.sources-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
.sources-list li {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sources-list a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sources-list a:hover { color: var(--accent); }
.sources-list span { opacity: 0.75; }


@media (max-width: 600px) {
  .brand-logo-sm { left: -210px; width: 370px; }
  .brand-slogan { display: none; }
  .lang-toggle { margin-right: 7px; padding: 6px 10px; }
  .sources-list { justify-content: flex-start; gap: 9px; }
  .sources-list li { width: 100%; font-size: 11px; }
}

/* Desktop navigation stays centered regardless of utility controls. */
@media (min-width: 900px) {
  .nav-inner { position: relative; }
  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .lang-toggle { margin-left: auto; }
}

/* Low-contrast product silhouettes enrich the museum background. */
.product-motif {
  position: absolute;
  color: var(--brand-mark);
  opacity: 0.62;
  transition: color 0.5s ease;
}
.product-motif, .product-motif *, .product-motif::before, .product-motif::after {
  box-sizing: border-box;
}
.product-motif::before, .product-motif::after,
.product-motif i, .product-motif b, .product-motif em {
  content: '';
  position: absolute;
  display: block;
  border: 1.5px solid currentColor;
}
.motif-iphone {
  width: 142px;
  height: 286px;
  right: 12%;
  top: 18%;
  transform: rotate(17deg);
}
.motif-iphone::before {
  inset: 0;
  border-radius: 22px;
  background: color-mix(in srgb, var(--brand-mark) 16%, transparent);
}
.motif-iphone i { left: 30%; right: 30%; top: 12px; height: 4px; border-width: 0 0 1px; border-radius: 99px; }
.motif-iphone b { width: 38px; height: 38px; top: 18px; right: 16px; border-radius: 13px; }
.motif-iphone em { width: 9px; height: 9px; top: 27px; right: 25px; border-radius: 50%; background: currentColor; }
.motif-mac {
  width: 360px;
  height: 228px;
  left: 7%;
  top: 48%;
  transform: rotate(-11deg);
}
.motif-mac::before { inset: 0 0 28px; border-radius: 12px; background: color-mix(in srgb, var(--brand-mark) 11%, transparent); }
.motif-mac::after { width: 122%; height: 15px; left: -11%; bottom: 0; border-radius: 3px 3px 12px 12px; }
.motif-mac i { width: 22px; height: 22px; top: 84px; left: calc(50% - 11px); border-radius: 50%; opacity: 0.65; }
.motif-watch {
  width: 120px;
  height: 250px;
  right: 38%;
  bottom: -28px;
  transform: rotate(-23deg);
}
.motif-watch::before { width: 72px; height: 230px; left: 24px; top: 10px; border-radius: 30px; }
.motif-watch i { width: 112px; height: 130px; left: 4px; top: 60px; border-radius: 32px; background: color-mix(in srgb, var(--brand-mark) 12%, transparent); }
.motif-watch b { width: 10px; height: 30px; left: -2px; top: 111px; border-radius: 8px; }
.motif-airpods {
  width: 180px;
  height: 170px;
  right: -28px;
  bottom: 31%;
  transform: rotate(14deg);
}
.motif-airpods::before { width: 67px; height: 78px; left: 18px; top: 4px; border-radius: 42px 42px 30px 30px; }
.motif-airpods::after { width: 67px; height: 78px; right: 18px; top: 4px; border-radius: 42px 42px 30px 30px; }
.motif-airpods i { width: 21px; height: 92px; left: 42px; top: 64px; border-radius: 0 0 18px 18px; }
.motif-airpods b { width: 21px; height: 92px; right: 42px; top: 64px; border-radius: 0 0 18px 18px; }
.motif-ipod {
  width: 165px;
  height: 252px;
  left: 30%;
  bottom: 7%;
  transform: rotate(18deg);
}
.motif-ipod::before { inset: 0; border-radius: 18px; background: color-mix(in srgb, var(--brand-mark) 10%, transparent); }
.motif-ipod i { height: 55px; left: 18px; right: 18px; top: 16px; border-radius: 6px; }
.motif-ipod b { width: 77px; height: 77px; border-radius: 50%; left: calc(50% - 38.5px); bottom: 27px; }

@media (max-width: 899px) {
  .product-motif { opacity: 0.4; }
  .motif-mac, .motif-airpods, .motif-ipod { display: none; }
  .motif-iphone { right: -36px; top: 19%; transform: rotate(16deg) scale(0.72); }
  .motif-watch { right: 26%; bottom: -65px; transform: rotate(-22deg) scale(0.7); }
}

/* Authentication and protected sections */
.nav-actions { display: flex; align-items: center; margin-left: auto; }
.auth-trigger {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px;
  border: 1px solid var(--card-border-strong); border-radius: 999px; color: var(--text-secondary);
  background: var(--card-bg); font-size: 12.5px; white-space: nowrap;
}
.auth-trigger:hover { color: var(--text-primary); border-color: var(--highlight-silver-2); }
.auth-trigger-icon { color: var(--accent); font-size: 9px; }
.auth-modal { position: fixed; inset: 0; z-index: 230; display: grid; place-items: center; padding: 24px; visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility .25s ease; }
.auth-modal.open { visibility: visible; opacity: 1; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.52); backdrop-filter: blur(12px); }
.auth-dialog { position: relative; width: min(430px, 100%); max-height: min(680px, 92vh); overflow: auto; padding: 32px; border-radius: 8px; background: var(--card-bg-solid); border: 1px solid var(--card-border-strong); box-shadow: var(--shadow-lg); }
.auth-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; font-size: 25px; color: var(--text-secondary); }
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-right: 32px; }
.auth-brand svg { width: 32px; height: 42px; fill: var(--text-primary); flex: 0 0 auto; }
.auth-brand h2 { font-size: 24px; line-height: 1.15; }
.auth-brand p { margin-top: 5px; color: var(--text-muted); font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border-bottom: 1px solid var(--card-border-strong); }
.auth-tabs button { min-height: 42px; color: var(--text-muted); border-bottom: 2px solid transparent; }
.auth-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 13px; }
.auth-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--card-border-strong); border-radius: 6px; color: var(--text-primary); background: var(--bg-secondary); outline: none; font-size: 16px; }
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-error { min-height: 19px; color: #d83a3a; font-size: 13px; }
.auth-submit, .logout-btn, .admin-users-btn { min-height: 44px; border-radius: 6px; font-weight: 650; }
.auth-submit { background: var(--accent); color: white; }
.auth-submit:disabled { opacity: .55; }
.account-panel { text-align: center; }
.account-avatar { width: 58px; height: 58px; margin: 8px auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: white; font-size: 22px; font-weight: 700; }
.account-panel strong { display: block; font-size: 18px; }
.role-badge { display: inline-block; margin: 9px 0 22px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; }
.admin-users-btn { width: 100%; margin-bottom: 10px; border: 1px solid var(--card-border-strong); color: var(--text-primary); }
.logout-btn { width: 100%; background: var(--bg-secondary); color: var(--text-secondary); }
.admin-users { margin: 0 0 12px; max-height: 210px; overflow: auto; text-align: left; border: 1px solid var(--card-border-strong); border-radius: 6px; }
.admin-users > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 10px 12px; border-bottom: 1px solid var(--card-border-strong); font-size: 12px; }
.admin-users > div:last-child { border-bottom: 0; }
.admin-users b { color: var(--accent); font-weight: 600; }
.admin-users small { grid-column: 1 / -1; color: var(--text-muted); }
.auth-locked { position: relative; min-height: 420px; overflow: hidden; }
.auth-locked > :not(.section-head):not(.auth-gate) { visibility: hidden; }
.auth-gate { position: absolute; z-index: 8; inset: 115px 20px 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-top: 1px solid var(--card-border-strong); border-bottom: 1px solid var(--card-border-strong); background: color-mix(in srgb, var(--bg-primary) 86%, transparent); }
.auth-gate-mark { width: 38px; height: 38px; margin-bottom: 15px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.auth-gate h3 { font-size: 20px; }
.auth-gate p { margin: 7px 0 18px; color: var(--text-muted); font-size: 13px; }
.auth-gate button { min-height: 42px; padding: 0 20px; border-radius: 6px; background: var(--accent); color: white; font-weight: 650; }

/* Touch devices use a stable, motion-free glass treatment. */
.touch-ui [data-glass] { transform: none !important; }
.touch-ui [data-glass]::before, .touch-ui [data-glass]::after { display: none !important; }
.touch-ui .product-card:hover, .touch-ui .category-card:hover { transform: none !important; }

@media (max-width: 899px) {
  body { padding-bottom: 62px; }
  .site-disclaimer { font-size: 10.5px; height: 28px; line-height: 1.2; text-align: center; }
  .site-disclaimer::before, .site-disclaimer::after { display: none; }
  .site-nav { top: 28px; height: 54px; }
  .nav-inner { padding: 0 14px; gap: 8px; }
  .nav-logo { margin-right: auto; }
  .nav-actions { margin-left: 0; }
  .auth-trigger { height: 34px; padding: 0 10px; }
  .lang-toggle { height: 34px; margin: 0 4px 0 0; }
  .theme-toggle { width: 36px; height: 36px; }
  .nav-links { position: fixed; left: 0; right: 0; bottom: 0; z-index: 160; height: 60px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--nav-bg); border-top: 1px solid var(--card-border-strong); backdrop-filter: blur(14px); }
  .nav-links a { display: grid; place-items: center; padding: 0 4px; border-radius: 0; font-size: 11px; text-align: center; }
  .hero { min-height: calc(100svh - 60px); padding: 112px 20px 94px; }
  .hero-title { font-size: 44px; line-height: 1.08; }
  .hero-sub { font-size: 17px; line-height: 1.5; }
  .hero-actions { flex-direction: column; width: min(280px, 100%); margin: 0 auto; }
  .section { padding: 74px 18px; }
  .section-title { font-size: 34px; }
  .section-desc { font-size: 15px; }
  .categories-grid, .products-grid, .privacy-grid, .stats-row { grid-template-columns: 1fr; }
  .product-card { min-height: 210px; height: auto; }
  .timeline-shell { margin-left: -18px; margin-right: -18px; border-left: 0; border-right: 0; border-radius: 0; }
  .timeline-btn { display: none; }
  .modal { padding: 0; }
  .modal-dialog { width: 100%; height: 100svh; max-height: none; border-radius: 0; }
  .modal-body { height: 100%; }
  .modal-viewer { flex: 0 0 43%; min-height: 310px; }
  .modal-info { min-height: 0; }
  .modal-close { top: 10px; right: 10px; }
  .info-scroll { padding: 24px 20px 92px; }
  .filter-tabs { overflow-x: auto; justify-content: flex-start; padding-bottom: 5px; scrollbar-width: none; }
  .filter-tab { flex: 0 0 auto; }
  .chart-card { min-height: 380px; }
  .sources-list li { align-items: flex-start; flex-direction: column; gap: 2px; }
  .auth-modal { padding: 0; align-items: end; }
  .auth-dialog { width: 100%; max-height: 92svh; border-radius: 8px 8px 0 0; padding: 27px 20px calc(24px + env(safe-area-inset-bottom)); }
  .auth-locked { min-height: 360px; }
  .auth-gate { inset: 105px 0 10px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 38px; }
  .nav-actions { gap: 2px; }
  .auth-trigger span:last-child { max-width: 66px; overflow: hidden; text-overflow: ellipsis; }
  .product-card { flex-direction: column; }
  .product-visual { width: 100%; min-height: 180px; }
  .product-info { width: 100%; padding: 12px 16px 18px; }
  .modal-view-toggle { top: 12px; left: 12px; }
}

.password-change { margin: 0 0 12px; text-align: left; border: 1px solid var(--card-border-strong); border-radius: 6px; }
.password-change summary { padding: 11px 13px; cursor: pointer; color: var(--text-secondary); font-size: 13px; }
.password-change form { display: grid; gap: 9px; padding: 0 12px 12px; }
.password-change input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--card-border-strong); border-radius: 5px; background: var(--bg-secondary); color: var(--text-primary); }
.password-change button { min-height: 40px; border-radius: 5px; background: var(--accent); color: #fff; font-weight: 650; }

/* One continuous historical axis with direct node labels. */
.timeline-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 12px 0;
  overflow: visible;
}
.timeline-track {
  position: relative;
  display: block;
  padding: 22px 0;
}
.timeline-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent 0, var(--brand-line) 24px, var(--brand-line) calc(100% - 24px), transparent 100%);
}
.timeline-item {
  position: relative;
  width: 50%;
  min-height: 126px;
  padding: 0 54px 36px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: right;
}
.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 36px 54px;
  text-align: left;
}
.timeline-item::before {
  content: '';
  position: absolute;
  top: 5px;
  right: -8px;
  left: auto;
  width: 16px;
  height: 16px;
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.timeline-item:nth-child(even)::before {
  right: auto;
  left: -8px;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 8px;
  left: auto;
  width: 34px;
  height: 1px;
  background: var(--brand-line);
}
.timeline-item:nth-child(even)::after {
  right: auto;
  left: 8px;
}
.timeline-year { font-size: 25px; line-height: 1.1; font-weight: 700; color: var(--accent); }
.timeline-title { font-size: 17px; font-weight: 650; margin: 5px 0 6px; }
.timeline-desc { max-width: 390px; margin-left: auto; font-size: 13.5px; color: var(--text-secondary); line-height: 1.58; }
.timeline-item:nth-child(even) .timeline-desc { margin-left: 0; margin-right: auto; }
.timeline-item:last-child { min-height: 70px; padding-bottom: 0; }

@media (max-width: 899px) {
  .timeline-shell { margin: 0; padding: 4px 0; }
  .timeline-track { padding: 12px 0 12px 28px; }
  .timeline-track::before { left: 8px; transform: none; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    min-height: 0;
    margin-left: 0;
    padding: 0 0 38px 34px;
    text-align: left;
  }
  .timeline-item::before,
  .timeline-item:nth-child(even)::before {
    top: 4px;
    left: -27px;
    right: auto;
    width: 14px;
    height: 14px;
    border-width: 3px;
  }
  .timeline-item::after,
  .timeline-item:nth-child(even)::after {
    top: 10px;
    left: -10px;
    right: auto;
    width: 25px;
  }
  .timeline-year { font-size: 22px; }
  .timeline-title { font-size: 16px; }
  .timeline-desc,
  .timeline-item:nth-child(even) .timeline-desc { max-width: none; margin: 0; font-size: 13px; }
  .timeline-item:last-child { padding-bottom: 0; }
}

.turnstile-slot { width: 100%; min-height: 65px; overflow: hidden; }
.turnstile-slot iframe { max-width: 100%; }
@media (max-width: 420px) {
  .turnstile-slot { transform-origin: left center; }
}
