:root {
  /* ---------- 背景与表面 ---------- */
  --bg-1: #071d2d;
  --bg-2: #0c1f2d;
  --surface-1: rgba(12, 23, 35, 0.78);
  --surface-2: rgba(16, 30, 45, 0.72);
  --surface-3: rgba(22, 38, 56, 0.82);
  --panel: rgba(12, 23, 35, 0.78);
  --panel-strong: rgba(18, 31, 45, 0.94);
  --card: rgba(19, 32, 47, 0.9);
  --card-soft: rgba(13, 28, 39, 0.7);

  /* ---------- 边框 ---------- */
  --border: rgba(151, 178, 208, 0.22);
  --border-soft: rgba(151, 178, 208, 0.13);
  --border-strong: rgba(151, 178, 208, 0.36);

  /* ---------- 文字 ---------- */
  --text: #edf7ff;
  --text-strong: #ffffff;
  --muted: #b4c9dd;
  --faint: #8ea7bf;

  /* ---------- 品牌与强调 ---------- */
  --brand: #38c7b0;
  --brand-dark: #2aa494;
  --brand-soft: rgba(79, 224, 194, 0.12);
  --green: #4fe0c2;
  --green-strong: #6ce7ff;
  --accent: #6ce7ff;
  --purple: #d789ff;
  --gold: #f5bf73;
  --ok: #4ade80;
  --warn: #f5bf73;
  --err: #fca5a5;

  /* ---------- 语义底色 ---------- */
  --ok-soft: rgba(74, 222, 128, 0.1);
  --warn-soft: rgba(245, 191, 115, 0.12);
  --err-soft: rgba(252, 165, 165, 0.12);
  --info-soft: rgba(108, 231, 255, 0.1);

  /* ---------- 形状与阴影 ---------- */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.26);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);

  /* ---------- 布局 ---------- */
  /* 窄屏用较窄的左栏，宽屏再放宽；断点见文件末尾的媒体查询 */
  --rail-w: 232px;
  /* 站点导航条（唯一吸顶头部）的高度；由 shell.ts 实测回写 */
  --nav-h: 54px;
  /* 吸顶头部总高度：左栏吸顶位置、锚点滚动偏移都用它 */
  --header-h: var(--nav-h);
  --content-max: 1240px;
  --measure: 76ch;

  /* ---------- 排版 ---------- */
  --lh-prose: 1.9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(93, 233, 214, 0.2),
      transparent 30%
    ),
    radial-gradient(
      circle at top right,
      rgba(216, 116, 255, 0.2),
      transparent 28%
    ),
    linear-gradient(180deg, var(--bg-1) 0%, #081b2d 28%, #06151d 100%);
  color: var(--text);
}

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

button,
a {
  font: inherit;
}

.container {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(3, 13, 24, 0.54);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(151, 178, 208, 0.18);
}

.topbar-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, #6ce7ff, #38c7b0);
  color: #04141b;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(108, 231, 255, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(236, 245, 255, 0.8);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: #e8fef8;
  background: rgba(110, 231, 209, 0.1);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 209, 0.18);
}

.header-cta {
  border: 1px solid rgba(200, 220, 245, 0.3);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.page {
  padding: 28px 0 40px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 26px;
  align-items: center;
  padding: 34px 18px 20px;
}

.hero-copy {
  padding-left: 10px;
}

.eyebrow {
  margin: 0 0 22px;
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 231, 209, 0.3);
  background: rgba(110, 231, 209, 0.08);
  color: #a4f3e2;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.1rem);
  line-height: 0.93;
  letter-spacing: -0.07em;
  font-weight: 900;
  color: #edf9ff;
}

.subhead {
  margin: 22px 0 0;
  font-size: 1.06rem;
  line-height: 1.8;
  color: rgba(226, 239, 255, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #54e4c6, #74d9ff);
  color: #071d2d;
  box-shadow: 0 14px 34px rgba(84, 228, 198, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(196, 214, 239, 0.2);
}

.hero-visual {
  position: relative;
  padding: 18px;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(5, 17, 27, 0.8),
    rgba(14, 29, 40, 0.72)
  );
  border: 1px solid rgba(175, 202, 234, 0.16);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 10% 16% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(146, 233, 255, 0.5),
    transparent 68%
  );
  filter: blur(20px);
}

.hero-visual img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(165, 198, 234, 0.14);
  background: rgba(5, 17, 27, 0.54);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
  padding-top: 8px;
}

.feature-card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(18, 31, 45, 0.96),
    rgba(11, 22, 31, 0.88)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px 18px 16px;
  min-height: 300px;
  box-shadow: var(--shadow);
}

.feature-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(110, 231, 209, 0.1);
  color: #96f0e4;
  font-weight: 800;
  border: 1px solid rgba(110, 231, 209, 0.25);
}

.feature-card h3 {
  margin: 14px 0 8px;
  font-size: 1.05rem;
  line-height: 1.4;
  color: #edf7ff;
}

.feature-card p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--muted);
}

.mini-visual {
  margin-top: 18px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(8, 18, 28, 0.8);
  border: 1px solid rgba(158, 181, 210, 0.15);
}

.workflow-panel {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: 28px;
  padding: 20px 6px 0;
}

.workflow-copy,
.workflow-aside {
  background: linear-gradient(
    180deg,
    rgba(14, 27, 39, 0.9),
    rgba(9, 18, 26, 0.86)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.workflow-copy {
  padding: 26px 24px;
}

.workflow-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3vw, 2.6rem);
  letter-spacing: -0.05em;
}

.workflow-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: #e1efff;
}

.workflow-steps span {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(159, 192, 228, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.workflow-aside {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.aside-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(159, 192, 228, 0.2);
  border-radius: 18px;
  padding: 18px;
}

.aside-block h3 {
  margin: 0 0 10px;
  color: #eef9ff;
  font-size: 1.05rem;
}

.aside-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.aside-thumb {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  border: 1px solid rgba(159, 192, 228, 0.2);
  background:
    linear-gradient(
      135deg,
      rgba(108, 231, 255, 0.12),
      rgba(216, 137, 255, 0.12)
    ),
    url("/assets/image/musicdoll-hero-scene.svg") center/cover no-repeat;
}

.instrument-panel {
  margin-top: 26px;
  padding: 20px 14px 10px;
  border-radius: 24px;
  background: rgba(9, 18, 29, 0.78);
  border: 1px solid rgba(159, 192, 228, 0.2);
  box-shadow: var(--shadow);
}

.instrument-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.instrument-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  letter-spacing: -0.05em;
}

.instrument-nav {
  display: inline-flex;
  gap: 8px;
}

.instrument-nav button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(167, 198, 230, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

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

.instrument-card {
  background: linear-gradient(
    180deg,
    rgba(17, 30, 43, 0.95),
    rgba(11, 22, 33, 0.9)
  );
  border: 1px solid rgba(159, 192, 228, 0.18);
  border-radius: 18px;
  padding: 10px;
  transition: 0.2s ease;
}

.instrument-card.active {
  border-color: rgba(110, 231, 209, 0.35);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 209, 0.2);
}

.quickstart-page {
  padding-top: 24px;
}

.quickstart-hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  align-items: center;
  padding: 18px 12px 8px;
}

.quickstart-copy {
  padding: 12px 4px 10px;
}

.quickstart-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.5rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 900;
  color: #edf9ff;
}

.quickstart-copy .subhead {
  max-width: 620px;
  margin-top: 18px;
}

.quickstart-visual {
  position: relative;
  padding: 18px;
  border-radius: 30px;
  background: linear-gradient(
    180deg,
    rgba(5, 17, 27, 0.8),
    rgba(14, 29, 40, 0.74)
  );
  border: 1px solid rgba(175, 202, 234, 0.16);
  box-shadow: var(--shadow);
}

.quickstart-visual::before {
  content: "";
  position: absolute;
  inset: 18% 14% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(146, 233, 255, 0.45),
    transparent 68%
  );
  filter: blur(22px);
}

.quickstart-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(165, 198, 234, 0.14);
  background: rgba(5, 17, 27, 0.54);
}

.steps-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.step-card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(18, 31, 45, 0.96),
    rgba(11, 22, 31, 0.9)
  );
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px 18px 18px;
  min-height: 200px;
  box-shadow: var(--shadow);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 12px;
  background: rgba(110, 231, 209, 0.1);
  border: 1px solid rgba(110, 231, 209, 0.25);
  color: #96f0e4;
}

.step-card h3 {
  margin: 18px 0 12px;
  font-size: 1.16rem;
  line-height: 1.4;
  color: #edf7ff;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.instrument-card-body {
  padding: 12px 8px 8px;
}

.instrument-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 1rem;
  color: #edf7ff;
}

.instrument-card-head strong {
  font-weight: 800;
}

.instrument-emoji {
  font-size: 1.2rem;
}

.instrument-card p {
  margin: 12px 6px 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}

.instrument-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 14px auto 0;
  padding: 10px 16px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(196, 214, 239, 0.2);
  color: #edf7ff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}

.instrument-card a:hover {
  border-color: rgba(110, 231, 209, 0.3);
  color: #a4f3e2;
}

.footer {
  padding: 18px 0 30px;
  color: rgba(223, 237, 255, 0.72);
}

.footer .container {
  border-top: 1px solid rgba(159, 192, 228, 0.16);
  padding-top: 18px;
}

.products-page {
  padding-top: 22px;
}

.products-hero {
  background: linear-gradient(
    180deg,
    rgba(14, 27, 39, 0.9),
    rgba(9, 18, 26, 0.86)
  );
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
}

.products-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.products-hero .subhead {
  margin-top: 18px;
}

.products-hero-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.products-hero-tags .tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(159, 192, 228, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  color: #d9ebff;
  background: rgba(255, 255, 255, 0.03);
}

.products-hero-tags .tag.free {
  border-color: rgba(84, 228, 198, 0.36);
  color: #9cf5e2;
  background: rgba(84, 228, 198, 0.1);
}

.products-list {
  margin-top: 26px;
  padding: 10px 0 4px;
}

.products-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.products-list-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.products-list-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.product-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(159, 192, 228, 0.2);
  background: linear-gradient(
    180deg,
    rgba(17, 30, 43, 0.95),
    rgba(11, 22, 33, 0.9)
  );
  box-shadow: var(--shadow);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.product-row:hover {
  border-color: rgba(110, 231, 209, 0.26);
}

.product-row.active {
  border-color: rgba(110, 231, 209, 0.5);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(110, 231, 209, 0.2);
  transform: translateY(-2px);
}

.product-row.is-reverse .row-copy {
  order: 2;
}

.product-row.is-reverse .row-visual {
  order: 1;
}

.row-copy {
  display: flex;
  flex-direction: column;
  padding: 6px 4px;
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.row-head h3 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.row-badge.free {
  background: rgba(84, 228, 198, 0.15);
  border: 1px solid rgba(84, 228, 198, 0.4);
  color: #a7f7e9;
}

.row-badge.dev {
  background: rgba(216, 137, 255, 0.14);
  border: 1px solid rgba(216, 137, 255, 0.36);
  color: #f0cbff;
}

.row-tagline {
  margin: 14px 0 0;
  font-size: 1.02rem;
  color: #e7f4ff;
  line-height: 1.7;
}

.row-note {
  margin: 10px 0 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.row-actions .btn {
  padding: 11px 16px;
  font-size: 0.86rem;
}

.row-visual {
  border-radius: 18px;
  border: 1px solid rgba(171, 200, 231, 0.14);
  overflow: hidden;
  position: relative;
  min-height: 210px;
}

.row-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.row-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-visual.visual-midi::before {
  background: linear-gradient(
    140deg,
    rgba(93, 233, 214, 0.28),
    rgba(10, 24, 40, 0.2)
  );
}

.row-visual.visual-scene::before {
  background: linear-gradient(
    140deg,
    rgba(126, 233, 255, 0.22),
    rgba(10, 24, 40, 0.22)
  );
}

.row-visual.visual-kf::before {
  background: linear-gradient(
    140deg,
    rgba(216, 137, 255, 0.22),
    rgba(10, 24, 40, 0.22)
  );
}

.row-visual.visual-custom::before {
  background: linear-gradient(
    140deg,
    rgba(245, 191, 115, 0.22),
    rgba(10, 24, 40, 0.24)
  );
}

.instrument-thumb {
  height: 150px;
  border-radius: 14px;
  border: 1px solid rgba(171, 200, 231, 0.14);
  background-size: cover;
  background-position: center;
}

.instrument-card p {
  margin: 12px 6px 0;
  text-align: center;
  font-size: 1rem;
  color: #edf7ff;
}

.piano {
  background:
    linear-gradient(180deg, rgba(93, 233, 214, 0.18), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 25%,
      rgba(126, 233, 255, 0.42),
      transparent 30%
    ),
    #0d1e2e;
}

.guitar {
  background:
    linear-gradient(180deg, rgba(126, 233, 255, 0.12), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 22%,
      rgba(216, 137, 255, 0.32),
      transparent 28%
    ),
    #101f30;
}

.strings {
  background:
    linear-gradient(180deg, rgba(216, 137, 255, 0.1), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 24%,
      rgba(76, 224, 185, 0.3),
      transparent 30%
    ),
    #0e1d2e;
}

.accordion {
  background:
    linear-gradient(180deg, rgba(76, 224, 185, 0.08), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 22%,
      rgba(245, 191, 115, 0.32),
      transparent 28%
    ),
    #0d1d2d;
}

/* 七款乐器各自的缩略图配色（与 shared/products.ts 的产品一一对应） */

.drums {
  background:
    linear-gradient(180deg, rgba(245, 191, 115, 0.14), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 24%,
      rgba(252, 165, 165, 0.3),
      transparent 30%
    ),
    #101d2c;
}

.zheng {
  background:
    linear-gradient(180deg, rgba(216, 137, 255, 0.12), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 22%,
      rgba(245, 191, 115, 0.28),
      transparent 30%
    ),
    #0f1e2e;
}

.harp {
  background:
    linear-gradient(180deg, rgba(126, 233, 255, 0.14), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 20%,
      rgba(126, 233, 255, 0.34),
      transparent 30%
    ),
    #0c1c2c;
}

.wind {
  background:
    linear-gradient(180deg, rgba(76, 224, 185, 0.12), rgba(15, 35, 51, 0.8)),
    radial-gradient(
      circle at 50% 26%,
      rgba(216, 137, 255, 0.26),
      transparent 28%
    ),
    #0e1f2f;
}

/* 首页「七款乐器」：列数自适应，整张卡片可点并链接到该乐器的 Quick Start */

.instrument-list {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.instrument-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.instrument-card:hover {
  border-color: rgba(110, 231, 209, 0.45);
  transform: translateY(-2px);
}

.instrument-card p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.instrument-cta {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
}

@media (max-width: 980px) {
  .hero-panel,
  .workflow-panel,
  .feature-grid,
  .quickstart-hero,
  .steps-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .instrument-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .product-row,
  .product-row.is-reverse {
    grid-template-columns: 1fr;
  }

  .product-row.is-reverse .row-copy,
  .product-row.is-reverse .row-visual {
    order: initial;
  }

  .products-list-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    justify-content: center;
    padding: 12px 0;
  }

  .brand {
    font-size: 1.5rem;
  }

  .nav {
    justify-content: center;
  }

  .feature-grid,
  .instrument-list {
    grid-template-columns: 1fr;
  }

  .steps-panel {
    grid-template-columns: 1fr;
  }

  .header-cta {
    display: none;
  }

  .hero-panel {
    padding-top: 18px;
  }

  .hero-copy h1 {
    line-height: 1;
  }
}

.feature-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.media-placeholder {
  width: 100%;
  border: 1px dashed #9ac7b8;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(245, 158, 11, 0.1)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.44),
      rgba(255, 255, 255, 0.44) 10px,
      rgba(255, 255, 255, 0.24) 10px,
      rgba(255, 255, 255, 0.24) 20px
    );
  color: #2c5f53;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.media-placeholder.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.media-placeholder.ratio-3-2 {
  aspect-ratio: 3 / 2;
}

.media-placeholder.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.video-embed {
  width: 100%;
  border: 1px solid #cde2da;
  border-radius: 12px;
  overflow: hidden;
  background: #e7f2ee;
  margin-top: 10px;
}

.video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
}

.video-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, #6ce7ff, #38c7b0);
  color: #04141b;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(56, 199, 176, 0.22);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(56, 199, 176, 0.32);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
  font-weight: 700;
}

.btn.secondary:hover {
  background: rgba(79, 224, 194, 0.14);
  border-color: rgba(79, 224, 194, 0.45);
  color: #eafff9;
}

.btn.link {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--green);
  box-shadow: none;
  font-weight: 700;
}

.btn.link:hover {
  background: rgba(79, 224, 194, 0.1);
  border-style: solid;
  filter: none;
}

.btn-block {
  width: 100%;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.step {
  border-radius: 999px;
  padding: 5px 13px;
  background: var(--brand-soft);
  color: #c9fff1;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid rgba(79, 224, 194, 0.28);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-2);
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(6, 18, 28, 0.72);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(108, 231, 255, 0.6);
  outline-offset: 1px;
  border-color: rgba(108, 231, 255, 0.5);
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.products,
.channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.product-item,
.channel-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-2);
  color: var(--text);
  transition:
    border-color 0.16s,
    box-shadow 0.16s,
    background 0.16s;
  cursor: pointer;
}

.product-item:hover,
.channel-item:hover {
  border-color: rgba(79, 224, 194, 0.45);
  background: rgba(79, 224, 194, 0.07);
}

.product-item.selected,
.channel-item.selected {
  border-color: var(--brand);
  background: rgba(79, 224, 194, 0.1);
  box-shadow: 0 0 0 3px rgba(79, 224, 194, 0.18);
}

.product-item .p-emoji {
  font-size: 1.5rem;
}
.product-item .p-name {
  font-weight: 700;
}
.product-item .p-price {
  color: var(--muted);
  font-size: 0.88rem;
}

.msg {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 0.92rem;
  display: none;
  line-height: 1.7;
}

.msg.show {
  display: block;
}
.msg.error {
  background: var(--err-soft);
  color: #ffd9d9;
  border: 1px solid rgba(252, 165, 165, 0.34);
}
.msg.info {
  background: var(--info-soft);
  color: #d6f6ff;
  border: 1px solid rgba(108, 231, 255, 0.3);
}
.msg.ok {
  background: var(--ok-soft);
  color: #d6ffe6;
  border: 1px solid rgba(74, 222, 128, 0.32);
}

.license-box {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.02rem;
  background: #0b1f26;
  color: #d8fff4;
  border: 1px solid rgba(79, 224, 194, 0.28);
  border-radius: var(--radius-sm);
  padding: 16px;
  word-break: break-all;
  user-select: all;
  margin: 12px 0;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.order-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-2);
}

.order-item .o-no {
  font-weight: 700;
}
.order-item .o-status {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

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

.reveal {
  animation: fadeInUp 420ms ease both;
}

.reveal:nth-child(2) {
  animation-delay: 60ms;
}
.reveal:nth-child(3) {
  animation-delay: 120ms;
}
.reveal:nth-child(4) {
  animation-delay: 180ms;
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding: 20px;
  }

  .card {
    padding: 18px;
  }
}

/* =====================================================================
   Theme v2 —— 统一外壳（左栏导航）+ 组件补全 + Markdown 式正文排版
   ---------------------------------------------------------------------
   背景：原样式表只覆盖了首页落地页（.hero-panel / .feature-card /
   .instrument-card），而产品页、手册页、教程页所用的 .card / .chip /
   .grid / .sub / .table 等类**完全没有规则**，且一段历史浅色组件规则与
   深色主题冲突（白底白字）。本节负责：
     1) 全站基础（选中色、滚动条、键盘焦点、跳过链接）
     2) 左栏导航外壳（站点导航 + 本页大纲 + 移动端抽屉）
     3) 组件补全（card / chip / grid / sub / muted / lang-btn / pager …）
     4) 正文排版（类 Markdown 的标题层级、列表、引用、行内代码）
     5) 表格（.table 与 .tut-table 统一为「看得出来是表格」的样式）
     6) 教程页与 TOC 在左栏中的适配
   ===================================================================== */

/* ---------- 1. 全站基础 ---------- */

::selection {
  background: rgba(79, 224, 194, 0.32);
  color: #ffffff;
}

html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid rgba(108, 231, 255, 0.65);
  outline-offset: 2px;
  border-radius: 6px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(151, 178, 208, 0.3) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(151, 178, 208, 0.26);
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(151, 178, 208, 0.46);
  background-clip: content-box;
}

.skip-link {
  position: fixed;
  left: 14px;
  top: -70px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #6ce7ff, #38c7b0);
  color: #04141b;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 14px;
}

/* ---------- 2. 旧顶栏（仅管理后台仍在使用） ---------- */

/* 站点前台已取消顶栏：品牌与导航统一放到 .site-navbar 里。
   下面的规则只为 /admin/ 页面保留（它有 data-no-rail，不接入站点外壳）。
   注意：min-height 必须是**静态值**，不能写成 var(--nav-h) —— 该变量由
   shell.ts 从导航条实测高度反写，若元素自身高度又依赖它，会形成
   「写变量 → 变高 → 再测量 → 再写变量」的自增长死循环。 */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(4, 14, 24, 0.8);
  border-bottom: 1px solid var(--border);
  z-index: 40;
}

.topbar-inner {
  min-height: 68px;
  gap: 14px;
}

.topbar .brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.topbar .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 0.92rem;
}

.rail-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.rail-toggle:hover {
  background: rgba(79, 224, 194, 0.13);
  border-color: rgba(79, 224, 194, 0.42);
}

.rail-toggle svg {
  display: block;
}

/* ---------- 3. 站点导航条（唯一吸顶头部） ---------- */

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 38;
  background: rgba(5, 16, 26, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.site-navbar-inner {
  width: min(var(--content-max), calc(100% - 32px));
  margin: 0 auto;
  /* min-height 必须是静态值：写 var(--nav-h) 会与 JS 测量形成增长死循环 */
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 品牌（原顶栏里的「MusicDoll 系列软件」搬到这里） */
.site-navbar .brand {
  flex: 0 0 auto;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
  text-decoration: none;
  margin-right: 6px;
}

.site-navbar .brand:hover {
  color: #d9fff5;
}

/* 导航项：横向排列；窄屏时本条自身横向滚动，不换行、不增高。
   对 :link / :visited / :active 全部显式给色，避免浏览器默认蓝字与
   「访问过」变色。 */

.site-navbar .nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.site-navbar .nav::-webkit-scrollbar {
  display: none;
}

.site-navbar .nav a,
.site-navbar .nav a:link,
.site-navbar .nav a:visited,
.site-navbar .nav button {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.14s ease,
    color 0.14s ease,
    border-color 0.14s ease;
}

.site-navbar .nav a:hover,
.site-navbar .nav a:focus-visible,
.site-navbar .nav a:active,
.site-navbar .nav button:hover {
  color: #ffffff;
  background: rgba(79, 224, 194, 0.12);
}

.site-navbar .nav a.active,
.site-navbar .nav a.active:link,
.site-navbar .nav a.active:visited {
  color: #ffffff;
  background: rgba(79, 224, 194, 0.16);
  border-color: rgba(79, 224, 194, 0.38);
  font-weight: 800;
}

/* 语言切换推到最右 */
.site-navbar .nav .lang-btn {
  margin-left: auto;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* ---------- 4. 左侧「本页大纲」列 ---------- */

/* 左栏宽度随视口放宽：窄屏窄、宽屏宽，保证正文仍有足够阅读宽度 */
@media (min-width: 640px) {
  :root {
    --rail-w: 208px;
  }
}

@media (min-width: 1024px) {
  :root {
    --rail-w: 258px;
  }
}

@media (min-width: 1400px) {
  :root {
    --rail-w: 292px;
  }
}

.site-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 12px 14px;
  background: linear-gradient(
    180deg,
    rgba(9, 22, 34, 0.94),
    rgba(6, 17, 27, 0.9)
  );
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.rail-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 0 0 auto;
}

.rail-block-toc {
  flex: 1 1 auto;
  min-height: 0;
}

.rail-heading {
  margin: 2px 10px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.rail-sep {
  height: 1px;
  margin: 4px 10px;
  background: var(--border);
  flex: 0 0 auto;
}

.rail-backdrop {
  display: none;
}

/* 仅手机宽度：左栏变抽屉（640px 以上一律保持常驻左栏） */

@media (max-width: 639px) {
  .rail-toggle {
    display: inline-flex;
  }

  .site-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(86vw, 320px);
    z-index: 120;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    border-right: 1px solid var(--border-strong);
    padding-top: 16px;
  }

  body.rail-open .site-rail {
    transform: none;
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.6);
  }

  body.rail-open {
    overflow: hidden;
  }

  .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(2, 8, 14, 0.62);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.rail-open .rail-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 640px 以上：左栏与正文并排，两者同时可见 */

@media (min-width: 640px) {
  body.has-rail {
    display: grid;
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    align-content: start;
  }

  body.has-rail > .site-navbar {
    grid-area: 1 / 1 / 2 / 3;
    /* 让导航条的内容容器与第二列（正文）严格对齐 */
    padding-left: var(--rail-w);
  }

  body.has-rail > .site-rail {
    grid-area: 2 / 1 / 4 / 2;
    position: sticky;
    top: var(--header-h);
    max-height: calc(100vh - var(--header-h));
    align-self: start;
  }

  body.has-rail > main {
    grid-area: 2 / 2 / 3 / 3;
    min-width: 0;
  }

  body.has-rail > .footer {
    grid-area: 3 / 2 / 4 / 3;
  }
}

/* ---------- 4. 组件补全（此前完全没有规则的一批类） ---------- */

.card {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(21, 35, 51, 0.88),
    rgba(13, 25, 37, 0.92)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 34px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.hero {
  background:
    radial-gradient(
      120% 140% at 12% -10%,
      rgba(79, 224, 194, 0.14),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(24, 41, 59, 0.92), rgba(13, 25, 37, 0.94));
  border-color: var(--border-strong);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  white-space: nowrap;
}

.chip.free {
  background: var(--ok-soft);
  border-color: rgba(74, 222, 128, 0.34);
  color: #c9ffdd;
}

.chip.paid {
  background: var(--warn-soft);
  border-color: rgba(245, 191, 115, 0.36);
  color: #ffe3b8;
}

.chip.advanced {
  background: rgba(215, 137, 255, 0.13);
  border-color: rgba(215, 137, 255, 0.32);
  color: #f0d3ff;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sub,
.subhead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.sub {
  max-width: 200ch;
  margin: 0 0 6px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 8px;
}

.lang-btn {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.lang-btn:hover {
  background: rgba(79, 224, 194, 0.14);
  border-color: rgba(79, 224, 194, 0.45);
  color: #eafff9;
}

.feature-card {
  background: linear-gradient(
    180deg,
    rgba(20, 34, 50, 0.9),
    rgba(12, 24, 36, 0.94)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pager {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.tabs button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.tabs button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.tabs button.active {
  background: var(--brand-soft);
  border-color: rgba(79, 224, 194, 0.3);
  color: #eafff9;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ---------- 5. 正文排版：类 Markdown 的标题层级与节奏 ---------- */

.card h1,
.card h2,
.card h3,
.card h4,
.tut-content h1,
.tut-content h2,
.tut-content h3,
.tut-content h4 {
  color: var(--text-strong);
  line-height: 1.35;
  font-weight: 800;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.card h1,
.tut-content h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 0.55em;
  letter-spacing: -0.01em;
}

/* h2：左侧渐变竖条 + 底部细线，一眼就是「大标题」 */
.card h2,
.tut-content h2 {
  position: relative;
  font-size: clamp(1.24rem, 1.9vw, 1.5rem);
  margin: 2.1em 0 0.85em;
  padding: 0 0 0.5em 16px;
  border-bottom: 1px solid var(--border);
}

.card h2::before,
.tut-content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  bottom: 0.72em;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

/* h3：菱形强调点 + 品牌色，一眼就是「小标题」 */
.card h3,
.tut-content h3 {
  position: relative;
  font-size: 1.08rem;
  margin: 1.9em 0 0.6em;
  padding-left: 16px;
  color: var(--green);
}

.card h3::before,
.tut-content h3::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.46em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 10px rgba(79, 224, 194, 0.55);
  transform: rotate(45deg);
}

.card h4,
.tut-content h4 {
  font-size: 0.98rem;
  margin: 1.5em 0 0.5em;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.card > :first-child,
.tut-section:first-child > h2,
.tut-subsection:first-child > h3 {
  margin-top: 0;
}

/* 锚点：鼠标悬停标题时出现「#」 */
.h-anchor {
  margin-left: 10px;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

h1:hover .h-anchor,
h2:hover .h-anchor,
h3:hover .h-anchor,
.h-anchor:focus-visible {
  opacity: 0.75;
}

/* 段落与列表 */
.card p,
.tut-content p {
  margin: 0 0 1.05em;
  line-height: var(--lh-prose);
  color: rgba(237, 247, 255, 0.93);
  max-width: 84ch;
}

.card ul,
.card ol,
.tut-content ul,
.tut-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.45em;
  line-height: var(--lh-prose);
  color: rgba(237, 247, 255, 0.93);
  max-width: 84ch;
}

.card li,
.tut-content li {
  margin: 0.45em 0;
  padding-left: 0.15em;
}

.card li::marker,
.tut-content li::marker {
  color: var(--brand);
  font-weight: 800;
}

.card ul ul,
.card ol ol,
.card ul ol,
.card ol ul,
.tut-content ul ul,
.tut-content ol ol {
  margin: 0.45em 0 0.25em;
}

/* 链接、强调、行内代码 */
.card a,
.tut-content a {
  color: var(--green-strong);
  text-decoration: underline;
  text-decoration-color: rgba(108, 231, 255, 0.35);
  text-underline-offset: 3px;
  transition:
    color 0.14s ease,
    text-decoration-color 0.14s ease;
}

.card a:hover,
.tut-content a:hover {
  color: #d9f7ff;
  text-decoration-color: currentColor;
}

.card strong,
.tut-content strong {
  color: var(--text-strong);
  font-weight: 800;
}

.card hr,
.tut-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.2em 0;
}

.card blockquote,
.tut-content blockquote {
  margin: 0 0 1.3em;
  padding: 0.9em 1.15em;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(79, 224, 194, 0.07);
  color: var(--muted);
}

/* 界面控件名（内容里用反引号包裹） */
.ui-ref,
.card code,
.tut-content code {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid rgba(110, 231, 209, 0.34);
  background: rgba(110, 231, 209, 0.1);
  color: #c9fff1;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- 6. 表格：一眼能看出是表格 ---------- */

.table,
.tut-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(9, 21, 32, 0.6);
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tut-table {
  min-width: 620px;
}

.card .table {
  margin: 0 0 1.3em;
}

.table th,
.tut-table th {
  background: linear-gradient(
    180deg,
    rgba(79, 224, 194, 0.2),
    rgba(79, 224, 194, 0.09)
  );
  color: var(--text-strong);
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-strong);
  vertical-align: middle;
  white-space: nowrap;
}

.table td,
.tut-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  line-height: 1.75;
  color: rgba(237, 247, 255, 0.92);
}

.table tbody tr:nth-child(even) td,
.tut-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

.table tbody tr:hover td,
.tut-table tbody tr:hover td {
  background: rgba(79, 224, 194, 0.07);
}

.table tbody tr:last-child td,
.tut-table tbody tr:last-child td {
  border-bottom: none;
}

.table td:first-child,
.tut-table td:first-child {
  color: var(--text-strong);
  font-weight: 600;
}

.table-wrap,
.tut-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.3em;
  border-radius: var(--radius);
}

.tut-table-wrap {
  border: none;
}

.tut-table-wrap .tut-table {
  margin: 0;
}

/* ---------- 7. 媒体：占位块与播放器（深色化） ---------- */

.media-placeholder {
  border: 1px dashed rgba(79, 224, 194, 0.4);
  border-radius: var(--radius);
  background:
    linear-gradient(
      135deg,
      rgba(79, 224, 194, 0.09),
      rgba(215, 137, 255, 0.07)
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035),
      rgba(255, 255, 255, 0.035) 10px,
      rgba(255, 255, 255, 0.012) 10px,
      rgba(255, 255, 255, 0.012) 20px
    );
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: none;
}

.video-embed {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #04101a;
  box-shadow: var(--shadow-sm);
}

/* ---------- 8. 教程页骨架 ---------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0 16px;
  font-size: 0.86rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--green);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .crumb-sep {
  opacity: 0.45;
}

.tut-hero {
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.tut-hero h1 {
  margin: 6px 0 12px;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.16;
  color: var(--text-strong);
  letter-spacing: -0.015em;
}

.tut-hero .subhead {
  max-width: 82ch;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.9;
}

/* 正文单栏（目录已移入左栏） */
.tut-layout {
  display: block;
}

.tut-layout.toc-empty {
  display: block;
}

.tut-content {
  max-width: min(84ch, 100%);
  min-width: 0;
  font-size: clamp(1rem, 0.97rem + 0.12vw, 1.08rem);
  letter-spacing: 0.012em;
}

.tut-content > * {
  text-wrap: pretty;
}

.tut-content > :last-child {
  margin-bottom: 0;
}

.tut-section + .tut-section {
  margin-top: 48px;
  padding-top: 38px;
  border-top: 1px solid var(--border);
}

.tut-note {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.75;
}

/* 提示框 */
.tut-callout {
  position: relative;
  margin: 0 0 1.4em;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(79, 224, 194, 0.06);
}

.tut-callout.tone-tip {
  border-left-color: var(--green-strong);
  background: var(--info-soft);
}

.tut-callout.tone-warn {
  border-left-color: var(--gold);
  background: var(--warn-soft);
}

.tut-callout-tag {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.tut-callout.tone-warn .tut-callout-tag {
  color: var(--gold);
}

.tut-callout.tone-tip .tut-callout-tag {
  color: var(--green-strong);
}

.tut-callout p {
  margin: 0;
  line-height: 1.8;
  color: rgba(237, 247, 255, 0.93);
  max-width: 80ch;
}

/* 步骤卡 */
.tut-steps {
  list-style: none;
  margin: 0 0 1.4em;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 84ch;
}

.tut-step {
  display: flex;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin: 0;
  padding-left: 17px;
}

.tut-step-no {
  flex: none;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6ce7ff, #38c7b0);
  color: #04141b;
  font-weight: 900;
  font-size: 0.85rem;
}

.tut-step-body strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-strong);
}

.tut-step-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* 图与截图占位 */
.tut-figure {
  margin: 0 0 1.6em;
}

.tut-figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.tut-figure figcaption {
  margin-top: 9px;
  font-size: 0.85rem;
  color: var(--faint);
  line-height: 1.7;
  padding-left: 2px;
}

.tut-figure.is-placeholder .media-placeholder {
  flex-direction: column;
  gap: 9px;
  text-align: left;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 24px;
}

.tut-ph-badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(79, 224, 194, 0.14);
  border: 1px solid rgba(79, 224, 194, 0.36);
  color: #b9ffee;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tut-ph-text {
  font-weight: 600;
  line-height: 1.75;
  max-width: 80ch;
  color: var(--muted);
}

.media-placeholder.ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* ---------- 9. 左栏里的「本页大纲」 ---------- */

.site-rail .toc-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  position: static;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.site-rail .toc-progress {
  height: 3px;
  margin: 0 10px 10px;
  border-radius: 999px;
  background: rgba(151, 178, 208, 0.16);
  flex: 0 0 auto;
}

.site-rail .toc-head {
  padding: 0 10px 8px;
  border-bottom: none;
  flex: 0 0 auto;
}

.site-rail .toc-head > span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.site-rail .toc-toggle {
  display: none !important;
}

.site-rail .toc-scroll {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 14px;
}

.site-rail .toc-top {
  display: none;
  flex: 0 0 auto;
  margin: 8px 6px 0;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.site-rail .toc-top:hover {
  background: rgba(79, 224, 194, 0.13);
  color: #eafff9;
}

.site-rail .toc-panel.has-scrolled .toc-top {
  display: block;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list-sub {
  margin: 2px 0 6px;
  padding-left: 11px;
  border-left: 1px solid var(--border-soft);
}

.toc-item {
  margin: 0;
}

.toc-link,
.toc-link:link,
.toc-link:visited {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  color: #e8f1fb;
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.55;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.toc-level-3 > .toc-link {
  font-size: 0.87rem;
  padding: 6px 10px;
  opacity: 0.9;
}

/* 教程正文单独微调：仅优化阅读节奏，不改配色 */
.tut-content h2 {
  margin: 2.35em 0 0.95em;
  line-height: 1.3;
}

.tut-content h3 {
  margin: 2.05em 0 0.72em;
  line-height: 1.45;
}

.tut-content h4 {
  margin: 1.65em 0 0.58em;
  line-height: 1.55;
}

.tut-content h2 + p,
.tut-content h3 + p,
.tut-content h4 + p {
  margin-top: 0.18em;
}

.tut-content p {
  margin: 0 0 1.22em;
}

.tut-content ul,
.tut-content ol {
  margin: 0 0 1.35em;
  padding-left: 1.5em;
}

.tut-content li {
  margin: 0.5em 0;
}

.toc-link:hover,
.toc-link:focus-visible,
.toc-link:active {
  color: #ffffff;
  background: rgba(79, 224, 194, 0.1);
}

.toc-item.is-active > .toc-link,
.toc-item.is-active > .toc-link:link,
.toc-item.is-active > .toc-link:visited {
  color: #ffffff;
  background: rgba(79, 224, 194, 0.16);
  box-shadow: inset 2px 0 0 var(--brand);
  font-weight: 800;
}

/* 其余链接场景：显式给 :visited 上色，避免浏览器默认的「访问过」变色 */

.breadcrumb a:link,
.breadcrumb a:visited,
.footer a:link,
.footer a:visited {
  color: var(--green);
  text-decoration: none;
}

.card a:link,
.card a:visited,
.tut-content a:link,
.tut-content a:visited {
  color: var(--green-strong);
}

.card a:hover,
.tut-content a:hover,
.breadcrumb a:hover,
.footer a:hover {
  color: #ffffff;
}

/* ---------- 10. 页尾上下篇 ---------- */

.tut-pager {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.tut-pager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.tut-pager-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.tut-pager-link.next {
  text-align: right;
  align-items: flex-end;
}

.tut-pager-link:hover {
  border-color: rgba(79, 224, 194, 0.45);
  background: rgba(79, 224, 194, 0.08);
  transform: translateY(-1px);
}

.tut-pager-link.is-empty {
  border: 1px dashed var(--border-soft);
  background: transparent;
}

.tut-pager-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.tut-pager-title {
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-strong);
}

.tut-pager-cross {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}

.tut-pager-cross:hover {
  text-decoration: underline;
}

.tut-section-video .video-embed {
  margin-top: 6px;
  max-width: 900px;
}

/* ---------- 11. 响应式与打印 ---------- */

@media (max-width: 640px) {
  .card {
    border-radius: var(--radius);
  }

  .tut-pager-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tut-pager-link.next {
    text-align: left;
    align-items: flex-start;
  }

  .tut-figure.is-placeholder .media-placeholder {
    padding: 16px;
  }

  .card h2,
  .tut-content h2 {
    margin-top: 1.7em;
  }
}

@media print {
  .topbar,
  .site-navbar,
  .site-rail,
  .rail-backdrop,
  .tut-pager,
  .breadcrumb {
    display: none !important;
  }

  body.has-rail {
    display: block;
  }

  .card {
    border-color: #999;
    box-shadow: none;
    background: #fff;
    color: #000;
  }
}

/* ---------- 12. 插件手册首页（平台选择） ---------- */

/* 平台卡片里的乐器快捷入口：两列紧凑列表 */
.hub-link-list {
  margin: 6px 0 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 18px;
  font-size: 0.84rem;
  line-height: 1.95;
}

.hub-link-list li {
  break-inside: avoid;
}

.hub-link-list a:link,
.hub-link-list a:visited {
  color: var(--muted);
  text-decoration: none;
}

.hub-link-list a:hover,
.hub-link-list a:active {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .hub-link-list {
    columns: 1;
  }
}

/* ---------- 展示合集页：视频链接列表（只外链，不内嵌播放器） ---------- */

.video-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.video-link {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-2);
  margin: 0;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.video-link:hover {
  border-color: rgba(79, 224, 194, 0.4);
  background: rgba(79, 224, 194, 0.06);
}

.video-link-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-strong);
  text-decoration: none;
}

.video-link-title::after {
  content: "↗";
  font-size: 0.82em;
  opacity: 0.7;
}

.video-link-title:hover {
  color: #d9fff5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-link-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 80ch;
}

.video-link-meta {
  margin-top: 9px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip.pending {
  background: var(--warn-soft);
  border-color: rgba(245, 191, 115, 0.38);
  color: #ffe3b8;
}

/* 展示合集：中文版条目上的「YouTube 入口」（同一条视频在另一个平台的副本） */
.video-link-alt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.16s ease,
    border-color 0.16s ease;
}

.video-link-alt:hover {
  color: #d9fff5;
  border-color: rgba(79, 224, 194, 0.4);
}

/* 首页「展示合集」入口卡 */
.gallery-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
}

.gallery-link .aside-thumb {
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}

.gallery-link:hover .aside-thumb {
  border-color: rgba(79, 224, 194, 0.45);
  transform: translateY(-2px);
}

.gallery-link-cta {
  display: block;
  margin-top: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--green);
  text-align: center;
}

/* ---------- 13. 右下角悬浮截图窗口（插件手册页 / 产品界面说明页） ---------- */
/*
 * 面板截图形态差别很大（竖长条 / 横向对话框 / Rust 端软件的宽窗口）：
 * 正文不插长图，改为固定悬浮窗口，随滚动换成该正文区块对应的那张图。
 * 窗口尺寸按**当前截图的整图比例**定（见 screenshot-viewer.ts）。
 *
 * 尺寸策略（2026-09-25 作者反馈后放宽）：Rust 端软件截图是小字界面，缩太小看不清，
 * 所以允许悬浮窗做大到接近满屏、**盖住正文一部分** —— 影响阅读时读者点右上角 ✕ 收起。
 * 这里的 max-width 只是「不让 JS 算出的宽度被外层兜底样式截断」的保险，
 * 真正生效的上限在 screenshot-viewer.ts 的 VIEWPORT_MAX_W / VIEWPORT_MAX_VH。
 */
.shot-viewer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  /* 宽度由 JS 按当前截图的整图比例写在内层 .shot-body 上，这里只兜底 */
  max-width: calc(100vw - 36px);
  font-size: 0.78rem;
  color: var(--text);
}

.shot-viewer[hidden] {
  display: none !important;
}

/* 收起态：只留一个小按钮 */
.shot-fab {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(79, 224, 194, 0.35);
  background: var(--panel-strong);
  color: var(--text-strong);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.shot-fab:hover {
  border-color: rgba(79, 224, 194, 0.7);
  color: var(--green);
}

.shot-fab-icon {
  font-size: 1rem;
  line-height: 1;
}

.shot-viewer.is-collapsed .shot-fab {
  display: inline-flex;
}

.shot-viewer.is-collapsed .shot-shell {
  display: none;
}

.shot-shell {
  display: none;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid rgba(120, 160, 200, 0.22);
  background: var(--panel-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.shot-viewer.is-visible .shot-shell {
  display: flex;
}

.shot-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px 11px;
  border-bottom: 1px solid rgba(120, 160, 200, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.shot-head-title {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-lang,
.shot-icon-btn {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 160, 200, 0.3);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  line-height: 1.2;
  cursor: pointer;
}

/* 「放大 / 还原」按钮：和语言开关、✕ 并排放在标题栏右侧 */
.shot-max-btn {
  white-space: nowrap;
}

.shot-max-btn[aria-pressed="true"] {
  border-color: rgba(79, 224, 194, 0.75);
  background: var(--brand-soft);
  color: var(--green);
  font-weight: 700;
}

.shot-lang:hover,
.shot-icon-btn:hover {
  border-color: rgba(79, 224, 194, 0.6);
  color: var(--green);
}

.shot-tabs {
  display: flex;
  gap: 4px;
  padding: 7px 8px 0;
}

.shot-tab {
  flex: 1 1 0;
  padding: 5px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 160, 200, 0.25);
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.shot-tab.is-active {
  border-color: rgba(79, 224, 194, 0.75);
  background: var(--brand-soft);
  color: var(--green);
  font-weight: 700;
}

/*
 * 图窗尺寸由 screenshot-viewer.ts 按**当前截图的整图比例**算出后写在
 * .shot-body 的行内样式上（横图宽、竖图高、方图方），这里只负责留白与裁切。
 *
 * 注意：曾经在这里给「当前区块」描过一圈高亮框（外加 9999px 的 box-shadow 压暗四周），
 * 因为滚动跟随不可能每次都刚好对准用户正在读的那一块，压暗 + 亮框反而显得忽明忽暗、
 * 像在闪。现在整张图统一亮度，只有画面位置在平滑移动。
 */
.shot-body {
  padding: 8px;
}

.shot-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  background: #0a1119;
  overflow: hidden;
}

/*
 * 放大档：图片按原生像素（1:1）渲染，可能超出图窗，这时图窗可滚动查看细节。
 * 默认档是「缩放适应」，图片尺寸 == 图窗，不会有滚动条。
 */
.shot-viewport.is-native {
  overflow: auto;
  overscroll-behavior: contain;
}

.shot-img {
  display: block;
  max-width: none;
  transform-origin: 0 0;
  transition: transform 0.28s ease;
  image-rendering: -webkit-optimize-contrast;
  will-change: transform;
}

/* 面板截图是深色 Blender / Unreal 界面，背景保持深色即可，不做额外调色 */
.shot-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px 9px;
}

.shot-caption {
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-hint {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 窄屏（左栏也已折叠为抽屉）不再悬浮截图，避免挡住正文 */
@media (max-width: 900px) {
  .shot-viewer {
    display: none !important;
  }
}

/*
 * 宽屏时给正文留出悬浮窗的高度：只有真的挂了悬浮窗的页面才有这段空白
 * （shot-viewer 由 pages.ts 在正文渲染后插入，没挂的页面选择器不匹配）。
 */
@media (min-width: 901px) {
  body:has(.shot-viewer) .tut-pager {
    padding-bottom: 380px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shot-img {
    transition: none;
  }
}

/* 打印时不需要悬浮窗 */
@media print {
  .shot-viewer {
    display: none !important;
  }
}
