/* ===========================================================
   Re Player 部署文档 · 样式表
   纯手写 CSS，无框架、无外部依赖（不请求任何 CDN 资源）
   =========================================================== */

/* ---------- 主题变量 ---------- */
:root {
  --brand: #f6821f;          /* Cloudflare 橙 */
  --brand-soft: rgba(246, 130, 31, 0.12);
  --accent: #2f7fd1;         /* 项目蓝 */
  --accent-soft: rgba(47, 127, 209, 0.12);

  --bg: #f5f7fa;
  --bg-grad: radial-gradient(1200px 600px at 12% -8%, #fff3e4 0%, transparent 60%),
             radial-gradient(900px 500px at 92% 4%, #e8f2fd 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e9eef5;
  --text: #10161f;
  --muted: #5c6b7d;
  --border: #e3e9f0;
  --border-strong: #d3dbe5;
  --code-bg: #0f1720;
  --code-text: #e6edf3;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.07), 0 12px 32px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 264px;
  --content-w: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
          "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Cascadia Mono", "Liberation Mono", monospace;
  --ok: #1a9d64;
  --warn: #c07800;
  --danger: #d1453b;
  --info: #2f7fd1;
}

html[data-theme="dark"] {
  --brand: #ffa04d;
  --brand-soft: rgba(255, 160, 77, 0.14);
  --accent: #79b8ff;
  --accent-soft: rgba(121, 184, 255, 0.14);

  --bg: #0b0f16;
  --bg-grad: radial-gradient(1100px 560px at 10% -10%, rgba(246, 130, 31, 0.16) 0%, transparent 60%),
             radial-gradient(900px 520px at 94% 0%, rgba(47, 127, 209, 0.18) 0%, transparent 58%);
  --surface: #131a24;
  --surface-2: #182130;
  --surface-3: #1e2938;
  --text: #e8eef6;
  --muted: #97a6b8;
  --border: #26313f;
  --border-strong: #33404f;
  --code-bg: #0a0e14;
  --code-text: #e6edf3;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --ok: #3ecf8e;
  --warn: #e2a336;
  --danger: #ff7b72;
  --info: #79b8ff;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-grad);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
img { max-width: 100%; }
code, pre, kbd { font-family: var(--mono); }
.wrap { width: min(100% - 40px, var(--content-w)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { font-size: 16px; letter-spacing: 0.01em; }
.brand-text em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 6px; font-size: 14px; }
.header-nav { display: flex; gap: 4px; margin-left: auto; }
.header-nav a {
  color: var(--muted); font-size: 14.5px; padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.header-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--muted); cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }
.progress { height: 3px; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .12s linear; }

/* ---------- Hero ---------- */
.hero { padding: 46px 0 10px; }
.hero-card {
  position: relative; overflow: hidden;
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--border); border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.hero-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.hero-card::before {
  content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--brand-soft), transparent 62%);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand);
}
.hero h1 { margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 46px); }
.lede { margin: 0 0 20px; max-width: 74ch; color: var(--muted); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--muted);
}
.chip b { color: var(--text); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.chip.blue .dot { background: var(--accent); }
.chip.green .dot { background: var(--ok); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.btn-primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(120deg, var(--brand), #e5741a);
  box-shadow: 0 6px 18px rgba(246, 130, 31, 0.3);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(246, 130, 31, 0.36); }
.hero-note { margin: 18px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- 布局 ---------- */
.layout {
  display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 40px; align-items: start; padding: 34px 0 70px;
}
.sidebar { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.sidebar h2 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted);
}
.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  font-size: 14.5px; color: var(--muted); border-left: 2px solid transparent;
  transition: color .16s, border-color .16s;
}
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.sidebar-foot {
  margin-top: 18px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; color: var(--muted); box-shadow: var(--shadow-sm);
}
.sidebar-foot strong { display: block; color: var(--text); font-size: 13.5px; margin-bottom: 4px; }

/* ---------- 正文 ---------- */
.article { min-width: 0; }
.article > section { scroll-margin-top: 92px; padding-bottom: 12px; }
.article h2 {
  display: flex; align-items: center; gap: 12px;
  margin: 54px 0 18px; padding-bottom: 12px;
  font-size: clamp(22px, 2.6vw, 28px);
  border-bottom: 1px solid var(--border);
}
.article h2:first-child { margin-top: 0; }
.article h2 .num {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  font-size: 15px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.article h3 { margin: 34px 0 12px; font-size: 18.5px; }
.article h4 { margin: 24px 0 8px; font-size: 16px; color: var(--muted); }
.article p { margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; }
.article li { margin: 6px 0; }
.article li::marker { color: var(--brand); }
.article strong { font-weight: 700; }
.article kbd {
  padding: 2px 7px; font-size: 12.5px; border-radius: 6px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px;
  background: var(--surface-2); color: var(--text);
}
.article :not(pre) > code {
  padding: 2px 6px; font-size: 0.9em; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
}

/* ---------- 卡片 / 网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  padding: 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3, .card h4 { margin: 0 0 8px; font-size: 16.5px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card .card-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px;
  border-radius: 11px; background: var(--brand-soft); color: var(--brand);
}
.card.blue .card-icon { background: var(--accent-soft); color: var(--accent); }
.card .card-icon svg { width: 20px; height: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); text-align: center;
}
.stat span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stat strong { display: block; margin-top: 6px; font-size: 20px; color: var(--brand); }

/* ---------- 提示框 ---------- */
.callout {
  position: relative; margin: 0 0 20px; padding: 15px 18px 15px 48px;
  border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm);
  background: var(--surface); font-size: 15px;
}
.callout p:last-child { margin-bottom: 0; }
.callout .callout-icon { position: absolute; left: 15px; top: 14px; width: 20px; height: 20px; }
.callout strong.tag {
  display: inline-block; margin-right: 8px; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
}
.callout.note { border-left-color: var(--info); background: color-mix(in srgb, var(--info) 7%, var(--surface)); }
.callout.note .callout-icon, .callout.note strong.tag { color: var(--info); }
.callout.tip { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.callout.tip .callout-icon, .callout.tip strong.tag { color: var(--ok); }
.callout.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.callout.warn .callout-icon, .callout.warn strong.tag { color: var(--warn); }
.callout.danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.callout.danger .callout-icon, .callout.danger strong.tag { color: var(--danger); }

/* ---------- 步骤 ---------- */
.steps { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: step; }
.steps > li {
  position: relative; margin: 0 0 14px; padding: 16px 18px 16px 62px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 16px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), #e5741a);
}
.steps > li > strong:first-child, .steps > li > b:first-child { display: block; margin-bottom: 4px; }
.steps > li p:last-child { margin-bottom: 0; }
.steps > li .sub { color: var(--muted); font-size: 14.5px; }

/* ---------- 代码块 ---------- */
.code {
  position: relative; margin: 0 0 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--code-bg); overflow: hidden;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: #9fb0c4; font-size: 12.5px; letter-spacing: 0.04em;
}
.code-head .dots { display: inline-flex; gap: 5px; }
.code-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.code-head .dots i:nth-child(2) { background: #febc2e; }
.code-head .dots i:nth-child(3) { background: #28c840; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12.5px; font-family: var(--font);
  color: #cfdbe8; background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; cursor: pointer;
  transition: background .16s, color .16s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.copy-btn.done { color: #3ecf8e; border-color: rgba(62, 207, 142, 0.5); }
.code pre {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  color: var(--code-text); font-size: 13.6px; line-height: 1.7; tab-size: 2;
}
.code pre code { background: none; border: 0; padding: 0; color: inherit; }
.code .cm { color: #7d8fa3; }        /* 注释 */
.code .ck { color: #ffa657; }        /* 关键字/变量名 */
.code .cs { color: #a5d6ff; }        /* 字符串 */
.code .cf { color: #d2a8ff; }        /* 命令/函数 */

/* ---------- 表格 ---------- */
.table-wrap {
  margin: 0 0 22px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; background: var(--surface); box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14.6px; }
thead th {
  padding: 12px 14px; text-align: left; white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
  font-size: 12.5px; letter-spacing: 0.07em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td code { white-space: nowrap; }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--muted); }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.badge.recommend { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge.limited { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); }
.badge.off { color: var(--muted); background: var(--surface-3); }

/* ---------- FAQ ---------- */
.faq { margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary {
  padding: 15px 18px; cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; align-items: center; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s;
}
.faq[open] summary::after { transform: rotate(225deg); }
.faq summary:hover { background: var(--surface-2); }
.faq .faq-body { padding: 0 18px 16px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--border); padding-top: 14px; }
.faq .faq-body p:last-child { margin-bottom: 0; }
.faq[open] { border-color: var(--border-strong); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface); padding: 34px 0 46px; margin-top: 20px;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(160px, 1fr)); gap: 26px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; font-size: 14.5px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; }
.footer-brand svg { width: 26px; height: 26px; }
.footer-note { color: var(--muted); font-size: 14px; max-width: 52ch; }
.footer-bottom {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  color: var(--muted); font-size: 13.5px;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, color .18s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--brand); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 滚动淡入 ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar {
    position: fixed; inset: 62px 0 auto 0; z-index: 45;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 20px;
    box-shadow: var(--shadow-md);
  }
  .sidebar.open { max-height: 70vh; overflow-y: auto; padding: 16px 20px 22px; }
  .nav-toggle { display: inline-grid; }
  .header-nav { display: none; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 28px); }
  .header-nav { display: none; }
  .hero { padding-top: 30px; }
  .steps > li { padding-left: 54px; }
  .steps > li::before { left: 14px; }
  .article h2 .num { width: 30px; height: 30px; font-size: 14px; }
  tbody td, thead th { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .sidebar, .to-top, .copy-btn, .hero-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .layout { display: block; }
  .code { border: 1px solid #ccc; }
  .code pre { background: #f6f6f6; color: #111; }
}
/* ---------- 顶栏小号按钮 / 演示入口 ---------- */
.btn-sm { padding: 7px 13px; font-size: 14px; border-radius: 9px; }
.btn-demo {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  background: var(--brand-soft); color: var(--brand);
}
.btn-demo:hover { background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
@media (max-width: 1080px) {
  .header-actions .btn-sm { display: none; }
}
/* ---------- 主题按钮图标切换 ---------- */
#theme-toggle .i-moon { display: none; }
html[data-theme="dark"] #theme-toggle .i-sun { display: none; }
html[data-theme="dark"] #theme-toggle .i-moon { display: block; }

/* ---------- 淡入动画：默认可见，仅在脚本可用时启用 ---------- */
.reveal { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
html.anim .reveal { opacity: 0; transform: translateY(14px); }
html.anim .reveal.in { opacity: 1; transform: none; }

/* ===========================================================
   多语言：顶栏语言切换 / 语言选择页
   =========================================================== */

/* ---------- 顶栏语言切换 ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2);
}
.lang-switch a {
  display: inline-block; padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--muted);
  transition: color .16s, background .16s;
}
.lang-switch a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.lang-switch a[aria-current="page"] {
  color: var(--brand); background: var(--surface); box-shadow: var(--shadow-sm);
}

/* ---------- 语言选择页（index.html） ---------- */
.picker { padding: clamp(34px, 8vh, 88px) 0 72px; }
.picker .hero-card { max-width: 780px; margin-inline: auto; text-align: center; }
.picker h1 { margin: 0 0 10px; font-size: clamp(23px, 3.2vw, 32px); }
.picker h1 .sep { margin: 0 8px; font-weight: 400; color: var(--border-strong); }

.picker-status {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 0 0 26px; font-size: 13.5px; line-height: 1.6; color: var(--muted);
}
.picker-status.failed { color: var(--warn); }
.spin {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 手动选择模式（?ask=1）下不再显示“识别中” */
html[data-ask="1"] #picker-status { display: none; }

.choices { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.choice {
  flex: 1 1 190px; max-width: 240px; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 17px 14px 15px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface-2); color: var(--text);
  transition: transform .16s, box-shadow .16s, border-color .16s, background .16s;
}
.choice:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--border-strong); background: var(--surface); text-decoration: none;
}
.choice:focus-visible { border-color: var(--brand); }
.choice-code {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.choice-name { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.choice-sub { font-size: 12.5px; color: var(--muted); }

.picker-notes { max-width: 64ch; margin: 26px auto 0; }
.picker-notes p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.picker-notes p:last-child { margin-bottom: 0; }
.picker-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

@media (max-width: 720px) {
  .picker { padding: 26px 0 54px; }
  .picker .hero-card { padding: 24px 18px; }
  .choices { gap: 9px; }
  .choice { flex: 1 1 100%; max-width: none; padding: 13px 14px 12px; }
  .choice-name { font-size: 16px; }
  .picker-status { font-size: 12.5px; margin-bottom: 20px; }
}
/* 窄屏优先保住语言切换器，隐藏品牌后缀文字 */
@media (max-width: 720px) {
  .brand-text em { display: none; }
  .lang-switch a { padding: 4px 8px; font-size: 12.5px; }
}
/* 减少动态效果时不要转圈（覆盖文件前部的全局动画禁用规则） */
@media (prefers-reduced-motion: reduce) {
  .spin { animation: none !important; }
}
/* ---------- 顶栏紧凑化：给语言切换器腾出位置，按钮不折行 ---------- */
.btn { white-space: nowrap; }
@media (min-width: 1081px) {
  .header-inner { gap: 14px; }
  .header-nav { gap: 2px; }
  .header-nav a { padding: 7px 9px; }
  .lang-switch a { padding: 4px 7px; }
}
/* ---------- 品牌区：宁可省略，也不折行 ---------- */
.brand { min-width: 0; }
.brand-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1081px) {
  .header-inner { gap: 12px; }
  .header-nav { gap: 0; }
}
/* 中等宽度：品牌只留 “Re Player”，把位置让给语言切换器与演示入口 */
@media (max-width: 1279px) {
  .brand-text em { display: none; }
}
/* 窄屏：只留站点图标 */
@media (max-width: 480px) {
  .brand-text { display: none; }
}