/* RetroGenY 说明网站。颜色和字体跟应用、商店图一致：宝蓝底、深海军蓝、橙色按键、米白卡片。 */
:root {
  --paper: #f7f6f2;
  --panel: #ecebf3;
  --ink: #0a1450;
  --mute: #4a5287;
  --line: #d9dbea;
  --blue: #1230e6;
  --navy: #0a1a8c;
  --deep: #050d4a;
  --orange: #ff5a14;
  --cream: #f5efe2;
  --link: #1230e6;
  --display: "Space Grotesk", "Noto Sans SC", sans-serif;
  --body: "Noto Sans SC", system-ui, sans-serif;
  /* 商店图背景上的细网格 */
  --grid: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 40px 40px,
          linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 40px 40px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #070d3c; --panel: #111a5a; --ink: #eef0ff; --mute: #a8afe0; --line: #232d78; --link: #9fb0ff;
  }
}
:root[data-theme="dark"] {
  --paper: #070d3c; --panel: #111a5a; --ink: #eef0ff; --mute: #a8afe0; --line: #232d78; --link: #9fb0ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.75 var(--body); }
a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
img { height: auto; }

/* 顶栏 */
.top { display: flex; align-items: center; gap: 24px; max-width: 1120px; margin: 0 auto; padding: 16px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 22px/1 var(--display); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { font-weight: 700; }
.brand span { color: var(--orange); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; font-size: 15px; }
.top nav a { color: var(--mute); text-decoration: none; }
.top nav a[aria-current="page"], .top nav a:hover { color: var(--ink); }
.lang { font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; color: var(--mute); text-decoration: none; white-space: nowrap; }
/* 首页顶栏压在蓝底上 */
.home .top-wrap { background: var(--grid), var(--blue); }
.home .top .brand, .home .top nav a[aria-current="page"], .home .top nav a:hover { color: #fff; }
.home .top nav a, .home .lang { color: #c9d1ff; }
.home .lang { border-color: rgba(255,255,255,.35); }

/* 首页：蓝色舞台 */
.stage { background: var(--grid), var(--blue); color: #fff; overflow: hidden; }
.hero {
  max-width: 1120px; margin: 0 auto; padding: 40px 20px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end;
}
.hero-copy { padding-bottom: 72px; align-self: center; }
.hero h1 { font: 700 clamp(40px, 5.4vw, 66px)/1.04 var(--display); margin: 0 0 20px; letter-spacing: -0.01em; }
.hero p { font-size: 19px; color: #d6dcff; margin: 0 0 28px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 14px; text-decoration: none; font: 700 17px/1.4 var(--display);
  background: var(--orange); color: #fff; box-shadow: 0 4px 0 #c43f05;
}
.btn.ghost { background: var(--cream); color: var(--deep); box-shadow: 0 4px 0 #cfc5ad; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.platforms li { border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: #c9d1ff; }
.platforms li b { color: #fff; }

/* 两台手机，一根联机线 */
.duo { position: relative; display: flex; justify-content: center; gap: 4%; padding-top: 70px; }
.duo img { width: 46%; max-width: 260px; display: block; filter: drop-shadow(0 18px 30px rgba(5,13,74,.45)); }
.duo img + img { margin-top: 48px; }
.duo .cable { position: absolute; left: 0; top: 0; width: 100%; height: 130px; pointer-events: none; }
.cable path { stroke: var(--orange); stroke-width: 6; fill: none; stroke-linecap: round; }
.cable circle { fill: var(--cream); }
@media (prefers-reduced-motion: no-preference) {
  .cable path { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 1.4s .4s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* 首页：一排截图 */
.shots { background: var(--deep); color: #fff; }
.shots-in { max-width: 1120px; margin: 0 auto; padding: 56px 20px 64px; }
.shots h2 { font: 700 30px/1.2 var(--display); margin: 0 0 6px; }
.shots > div > p { color: #b8c0f0; margin: 0 0 28px; }
.shot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.shot-row figure { margin: 0; }
.shot-row img { display: block; width: 100%; border-radius: 18px; }
.shot-row figcaption { margin-top: 12px; font-size: 15px; line-height: 1.55; color: #b8c0f0; }
.shot-row figcaption b { display: block; color: #fff; font: 700 17px/1.4 var(--display); }

.features {
  max-width: 1120px; margin: 0 auto; padding: 64px 20px 72px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px;
}
.features h2 { font: 700 24px/1.25 var(--display); margin: 0 0 8px; }
.features p { margin: 0; color: var(--mute); }
.features a { font-weight: 700; }

/* 文档页 */
.doc { max-width: 1120px; margin: 0 auto; padding: 24px 20px 80px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; }
.side { position: sticky; top: 20px; align-self: start; font-size: 15px; }
.side ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.side li a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--mute); text-decoration: none; }
.side li a[aria-current="page"] { color: var(--ink); border-left-color: var(--orange); font-weight: 700; }
.prose { max-width: 42rem; }
.prose h1 { font: 700 clamp(36px, 5vw, 50px)/1.1 var(--display); margin: 8px 0 18px; letter-spacing: -0.01em; }
.prose .lead { font-size: 19px; color: var(--mute); margin-top: 0; }
.prose h2 { font: 700 28px/1.25 var(--display); margin: 52px 0 10px; }
.prose h3 { font-size: 18px; margin: 30px 0 6px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 16px 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; }
.prose code { background: var(--panel); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.note { background: var(--cream); color: var(--deep); border-radius: 14px; padding: 14px 18px; margin: 20px 0; box-shadow: inset 4px 0 0 var(--orange); }
.note a { color: var(--deep); }
.aside { border-left: 3px solid var(--orange); padding: 2px 0 2px 16px; color: var(--mute); margin: 20px 0; }
.updated { color: var(--mute); font-size: 14px; }

/* 文档里的截图：放在蓝色小舞台上，和商店图一个样子 */
.fig { margin: 24px 0 8px; border-radius: 20px; background: var(--grid), var(--blue); padding: 22px 22px 0; overflow: hidden; }
.fig img { display: block; margin: 0 auto; }
.fig a { display: contents; }
.fig.pair a { display: block; width: min(310px, 48%); }
.fig.pair a img { width: 100%; }
.fig.phone img { width: min(330px, 84%); }
.fig.pair { display: flex; justify-content: center; gap: 12px; padding-left: 12px; padding-right: 12px; }
.fig.pair img { width: min(310px, 48%); margin: 0; }
.fig.wide { padding: 22px; }
.fig.wide img { width: 100%; }
.fig.art { padding: 28px 22px 22px; }
.fig + .cap, .fig .cap { font-size: 14px; color: var(--mute); margin: 8px 0 20px; }

footer { border-top: 1px solid var(--line); }
footer div { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--mute); }
footer a { color: var(--mute); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .hero-copy { padding-bottom: 8px; }
  .duo { padding-top: 56px; }
  .shot-row { grid-template-columns: repeat(4, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .shot-row li { scroll-snap-align: start; }
  .features { grid-template-columns: 1fr; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .side { position: static; }
  .side ol { display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; }
  .side li a { padding: 2px 0; border-left: 0; margin: 0; }
  .side li a[aria-current="page"] { border-bottom: 2px solid var(--orange); }
  .top { flex-wrap: wrap; }
  .top nav { margin-left: 0; order: 3; width: 100%; }
}
@media (min-width: 861px) and (max-width: 1060px) {
  .shot-row { grid-template-columns: repeat(2, minmax(0, 260px)); }
}

/* 代码块（扩展码的例子） */
.prose pre { background: var(--deep); color: #e4e8ff; border-radius: 14px; padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 12px 0 20px; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.prose td code { white-space: nowrap; }

/* 首页：三大功能 */
.big3-in { max-width: 1120px; margin: 0 auto; padding: 72px 20px 16px; }
.big3 h2 { font: 700 clamp(30px, 4vw, 42px)/1.15 var(--display); margin: 0 0 40px; letter-spacing: -0.01em; }
.big { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.big.flip .big-copy { order: 2; }
.big h3 { font: 700 clamp(24px, 3vw, 32px)/1.2 var(--display); margin: 0 0 12px; }
.big p { color: var(--mute); margin: 0 0 14px; font-size: 18px; }
.big ul { margin: 0 0 24px; padding-left: 1.2em; }
.big li { margin: 6px 0; }
.big li::marker { color: var(--orange); }
.big-pic { background: var(--grid), var(--blue); border-radius: 24px; padding: 32px 32px 0; display: flex; justify-content: center; overflow: hidden; }
.big-pic img { width: min(320px, 90%); display: block; }
.features .more-h { grid-column: 1 / -1; font-size: 30px; margin: 0; }
@media (max-width: 860px) {
  .big { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .big.flip .big-copy { order: 0; }
}
