/* ==========================================================================
   初声实验室 · 苹果官网风主题
   只由 index.html 加载，叠加在 style.css 之后；admin.html 不引用本文件。
   去掉 index.html 里对本文件的引用即可回到原先的外观。
   ========================================================================== */
:root {
  --ap-bg: #000;
  --ap-s1: #161617;
  --ap-s2: #1d1d1f;
  --ap-s3: #2c2c2e;
  --ap-s4: #3a3a3c;
  --ap-text: #f5f5f7;
  --ap-text-2: #a1a1a6;
  --ap-text-3: #6e6e73;
  --ap-line: rgba(255, 255, 255, 0.1);
  --ap-blue: #2997ff;
  --ap-blue-btn: #0071e3;
  --ap-gutter: 20px;
  --ap-ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

  --ios-bg-deep: #000;
  --ios-glass-bg: #1d1d1f;
  --ios-glass-card: #2c2c2e;
  --ios-glass-inner: #161617;
  --ios-border-light: rgba(255, 255, 255, 0.1);
  --ios-accent-pill: #3a3a3c;
  --ios-track-bg: #1d1d1f;
  --ios-blue: #2997ff;
  --text-main: #f5f5f7;
  --text-sub: #a1a1a6;
  --text-dim: #6e6e73;

  /* 系统字体优先：iOS 上是 SF / 苹方，安卓和桌面用各自的系统黑体，页面不再下载内置字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
}

/* ---------- 基础 ---------- */
html {
  padding-bottom: 0;
}
html, body {
  background-color: var(--ap-bg);
}
body {
  padding-bottom: 0;
  line-height: 1.4;
  /* style.css 给 html 和 body 都设了 overflow-x:hidden，body 因此成了滚动容器，
     顶部导航的 position:sticky 会失效；横向裁切交给 html 即可 */
  overflow: visible;
}
#bgTechCanvas {
  display: none;
}

/* 动态网格背景：竖线静止，横线向下缓慢流动（借降噪天梯首页的 .deco 做法） */
.ap-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 100%;
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 0%, rgba(0,0,0,.72) 56%, transparent 82%);
  mask-image: radial-gradient(ellipse 78% 68% at 50% 38%, #000 0%, rgba(0,0,0,.72) 56%, transparent 82%);
  opacity: .72;
}
.ap-grid-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -64px;
  bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .045) 0 1px,
    transparent 1px 64px
  );
  animation: ap-grid-fall 5.5s linear infinite;
  will-change: transform;
}
@keyframes ap-grid-fall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, 64px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ap-grid-bg::after { animation: none; }
}
:focus-visible {
  outline: 2px solid var(--ap-blue);
  outline-offset: 2px;
}

.view {
  position: relative;
  z-index: 1;
  max-width: 1024px;
  padding: 0 var(--ap-gutter) 32px;
  animation: apViewFade 0.28s ease;
}
@keyframes apViewFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
#view-welcome {
  max-width: none;
  padding: 0;
}
#view-devices,
#view-mode-detail {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.welcome-foot,
.verify-tip,
.spec-lbl,
.qr-disclaimer {
  font-weight: 400;
}

/* ---------- 顶部导航 ---------- */
.top-hud,
.ap-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  margin: 0 calc(50% - 50vw);
  padding: 0 max(var(--ap-gutter), calc(50vw - 512px + var(--ap-gutter)));
  background: rgba(22, 22, 23, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 0;
  border-bottom: 1px solid var(--ap-line);
  border-radius: 0;
}
.hud-logo,
.ap-nav-logo {
  display: block;
  width: auto;
  height: 19px;
  top: 0;
  opacity: 0.95;
  /* PNG 的有效像素区域偏上（底部有大块透明留白），
     以 18.3% 高度下移，让可见 logo 在 48px 导航里视觉居中。 */
  transform: translateY(18.3%);
}
.hud-brand {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ap-text);
}
#view-devices .hud-brand {
  font-size: 12px;
  font-weight: 400;
  color: var(--ap-text-2);
}
#detail-nav-title {
  flex: 1;
  text-align: center;
}
.hud-back-btn {
  flex: none;
  min-width: 76px;
  height: 44px;
  padding: 0;
  gap: 4px;
  justify-content: flex-start;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--ap-blue);
  font-size: 15px;
  font-weight: 400;
}
.hud-back-btn:hover {
  background: none;
  opacity: 0.8;
}
.hud-back-btn svg {
  flex: none;
  width: 9px;
  height: 15px;
}
.hud-spacer {
  flex: none;
  min-width: 76px;
}

/* ---------- 按钮 ---------- */
.zzz-btn-primary {
  height: 44px;
  padding: 0 24px;
  border-radius: 980px;
  background: var(--ap-blue-btn);
  box-shadow: none;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.zzz-btn-primary:hover {
  transform: none;
  background: #0077ed;
}
.zzz-btn-primary:active {
  transform: scale(0.98);
}
.zzz-btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}
.zzz-btn-primary-alt {
  background: transparent;
  color: var(--ap-blue);
  box-shadow: inset 0 0 0 1px var(--ap-blue);
}
.zzz-btn-primary-alt:hover {
  background: rgba(41, 151, 255, 0.12);
}
#btn-confirm-enter,
#btn-download-json,
#btn-download-qr {
  height: 52px;
  font-weight: 600;
}
#btn-download-json {
  background: var(--ap-blue-btn) !important;
  color: #fff !important;
  border: 0;
  box-shadow: none;
}
#btn-download-json:hover {
  transform: none;
  filter: none;
  background: #0077ed !important;
}
.sec-btn {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 980px;
  background: var(--ap-s3);
  color: var(--ap-text);
  font-size: 14px;
  font-weight: 500;
}
.sec-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
#btn-go-follow {
  background: var(--ap-blue-btn);
  color: #fff;
}

/* ---------- 视图 1：欢迎页 ---------- */
.ap-hero {
  padding: 44px 24px 0;
  text-align: center;
}
.ap-eyebrow {
  display: inline-block;
  font-size: 19px;
  font-weight: 600;
  background: var(--aura-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ap-hero-h1 {
  margin-top: 6px;
  font-size: clamp(36px, 11.8vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ap-text);
}
.ap-hero-sub {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ap-text-2);
}
.enter-split {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.enter-split .zzz-btn-primary {
  width: auto;
}
.ap-hero-visual {
  position: relative;
  height: 330px;
  margin-top: 6px;
  overflow: hidden;
}
.ap-hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.3), rgba(167, 139, 250, 0.16) 55%, transparent 78%);
  filter: blur(8px);
}
.ap-hero-curve {
  position: absolute;
  left: 0;
  top: 50px;
  width: 100%;
  height: 220px;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.45));
}
.ap-hero-product,
.ap-hero-product-back {
  position: absolute;
  width: auto;
  max-width: none;
  transform: translate(-50%, -50%);
}
.ap-hero-product {
  left: calc(50% - 58px);
  top: 56%;
  height: 200px;
  z-index: 2;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.7));
}
.ap-hero-product-back {
  left: calc(50% + 58px);
  top: 44.5%;
  height: 262px;
  z-index: 1;
  filter: brightness(0.88) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.55));
}
.ap-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ap-line);
}
.ap-stats div {
  text-align: center;
}
.ap-stats div + div {
  border-left: 1px solid var(--ap-line);
}
.ap-stats strong {
  display: block;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ap-stats span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ap-text-2);
}
.welcome-foot {
  margin: 0;
  padding: 18px 24px calc(22px + env(safe-area-inset-bottom));
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
  color: var(--ap-text-3);
}

/* ---------- 调音须知弹窗 ---------- */
.modal-mask {
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.modal-box {
  max-width: 480px;
  padding: 20px;
  background: #1c1c1e;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.modal-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ap-line);
}
.modal-head h3 {
  font-size: 20px;
  font-weight: 600;
}
.modal-close {
  flex: none;
  width: 30px;
  height: 30px;
  background: var(--ap-s3);
  color: var(--ap-text-2);
  line-height: 1;
}
.modal-body ul {
  gap: 12px;
  margin-bottom: 16px;
}
.modal-body li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ap-text-2);
}
.modal-body li strong,
.modal-body li b {
  color: var(--ap-text);
  font-weight: 600;
}
.modal-body li code {
  background: var(--ap-s3);
  color: var(--ap-text);
}
.modal-body li.guide-group {
  padding: 12px 14px;
  background: var(--ap-s2);
  border: 0;
  border-radius: 14px;
}
.modal-body ul.guide-sub li {
  font-size: 13px;
  color: var(--ap-text-2);
}
.modal-body ul.guide-sub li::marker {
  color: var(--ap-text-3);
}
.modal-verify {
  margin-bottom: 16px;
  background: var(--ap-s2);
  border: 0;
  border-radius: 16px;
}
.verify-row {
  font-size: 14px;
}
.badge-checking,
.badge-ok,
.badge-warn {
  border: 0;
  background: var(--ap-s3);
  font-weight: 500;
}
.badge-ok {
  color: #30d158;
  background: rgba(48, 209, 88, 0.16);
}
.badge-warn {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.16);
}
.verify-tip {
  color: var(--ap-text-3);
}

/* ---------- 视图 2：机型库 ---------- */
.ap-page-head {
  padding-top: 22px;
}
.ap-large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.ap-page-sub {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ap-text-2);
}
.search-bar-wrap {
  gap: 14px;
  margin: 16px 0;
}
.search-box {
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background-color: var(--ap-s2);
  color: var(--ap-text);
  font-size: 16px;
}
.search-box::placeholder {
  color: var(--ap-text-3);
}
.search-box:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.35);
}
#model-search-input {
  height: 40px;
  padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
  text-overflow: ellipsis;
}
.filter-tabs,
.tabs-scroll-bar {
  display: flex;
  align-self: stretch;
  gap: 8px;
  padding: 0;
  background: none;
  border-radius: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar {
  display: none;
}
.filter-btn,
.tab-pill {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 980px;
  background: var(--ap-s2);
  color: var(--ap-text-2);
  font-size: 14px;
  font-weight: 400;
}
.filter-btn.active,
.tab-pill.active {
  background: var(--ap-text);
  color: #000;
  font-weight: 600;
}

.device-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.brand-heading {
  margin: 8px 0 0;
  padding-top: 0;
}
.brand-heading-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ap-text-2);
}
.brand-heading-line {
  background: var(--ap-line);
}
.device-card {
  padding: 18px 12px 16px;
  background: var(--ap-s2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 22px;
  text-align: center;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.device-card:hover {
  transform: none;
  background: #232326;
}
.device-card.active {
  background: var(--ap-s2);
  box-shadow: inset 0 0 0 2px var(--ap-blue);
}
.device-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.device-icon-box,
.device-img-thumb {
  width: auto;
  max-width: 100%;
  height: 92px;
  margin-bottom: 12px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}
.device-card:hover .device-img-thumb {
  transform: none;
}
.device-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ap-text);
}
.device-sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ap-text-2);
}
.device-pills {
  justify-content: center;
  margin-top: 8px;
}
.device-pill {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--ap-blue);
}
.device-pill:first-child::after {
  content: " \203A";
}
.device-pill + .device-pill {
  display: none;
}

/* ---------- 调音选择：底部弹层 ---------- */
.drawer-panel,
.drawer-panel.is-open {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  width: 100%;
  max-width: 640px;
  max-height: 84vh;
  max-height: min(84dvh, 760px);
  margin: 0 auto;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #1c1c1e;
  border: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6);
  opacity: 1;
  pointer-events: auto;
}
.drawer-panel {
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.42s var(--ap-ease-sheet), visibility 0s linear 0.42s;
}
.drawer-panel.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.42s var(--ap-ease-sheet), visibility 0s;
}
.drawer-panel::before {
  content: "";
  display: block;
  width: 36px;
  height: 5px;
  margin: 0 auto 2px;
  border-radius: 3px;
  background: #48484a;
}
.ap-sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(0, 0, 0, 0.56);
  opacity: 0;
  visibility: hidden;
  touch-action: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.drawer-panel.is-open + .ap-sheet-scrim {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}
/* 弹层打开时把机型库整层抬到底部导航之上（导航 z-index 200，须知弹窗 300） */
body.sheet-open #view-devices {
  z-index: 260;
}
/* 列表较长时标题和关闭按钮留在弹层顶部 */
.ap-sheet-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 10px 20px 14px;
  background: #1c1c1e;
}
.ap-sheet-titles {
  flex: 1;
  min-width: 0;
}
.drawer-title {
  display: block;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
.ap-sheet-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ap-text-2);
}
.ap-sheet-sub:empty {
  display: none;
}
.drawer-title::before {
  display: none;
}
.ap-sheet-close {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--ap-s3);
  color: var(--ap-text-2);
  cursor: pointer;
}
.ap-sheet-close::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.ap-sheet-close svg {
  width: 11px;
  height: 11px;
}

.ladder-style-grid {
  display: block;
  /* 列表项内部带 z-index，隔离成独立层叠，避免滚动时盖到吸顶的标题区上 */
  isolation: isolate;
  margin-bottom: 16px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
}
.ladder-mode-card {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 66px;
  padding: 10px 12px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: background-color 0.2s ease;
}
.ladder-mode-card:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
}
.ladder-mode-card + .ladder-mode-card::before {
  content: "";
  position: absolute;
  left: 68px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--ap-line);
}
.ladder-mode-bg-img,
.ladder-mode-card:hover .ladder-mode-bg-img {
  position: static;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #000;
  object-fit: cover;
  opacity: 1;
  filter: none;
  transform: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.ladder-mode-info {
  flex: 1;
  min-width: 0;
  max-width: none;
  gap: 1px;
}
.ladder-mode-info h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ap-text);
}
.ladder-mode-info p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ap-text-2);
}
.ladder-mode-right {
  flex: none;
  width: auto;
  gap: 10px;
}
.ladder-badge-pill {
  padding: 3px 7px;
  border: 0;
  border-radius: 6px;
  background: rgba(41, 151, 255, 0.16) !important;
  box-shadow: none;
  color: var(--ap-blue) !important;
  font-size: 11px;
  font-weight: 600;
}
.ladder-mode-action,
.ladder-mode-card:hover .ladder-mode-action {
  flex: none;
  width: 8px;
  height: 13px;
  padding: 0;
  border-radius: 0;
  font-size: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath d='M1.5 1.5 6.5 6.5l-5 5' fill='none' stroke='%235a5a5e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 8px 13px;
}

.ir-accordion {
  background: var(--ap-s3);
  border: 0;
  border-radius: 16px;
}
.ir-accordion-header {
  gap: 12px;
  padding: 14px;
}
.ir-accordion-header::after {
  content: "";
  flex: none;
  width: 13px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 8'%3E%3Cpath d='M1.5 1.5 6.5 6.5l5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 13px 8px;
  transition: transform 0.2s ease;
}
.ir-accordion.open .ir-accordion-header::after {
  transform: rotate(180deg);
}
.ir-accordion-header h4 {
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}
.ir-accordion-header h4::before {
  flex: none;
  background: var(--aura-gradient);
}
.ir-accordion-body {
  padding: 0 14px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ap-text-2);
}
.ir-dl-btn {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 980px;
  background: var(--ap-s4);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 500;
}
.ir-dl-btn:hover {
  background: #48484a;
}

/* ---------- 视图 3：调音详情 ---------- */
.tabs-scroll-bar {
  margin: 0;
  padding-top: 14px;
}
.ap-detail-head {
  padding-top: 22px;
}
.ap-detail-h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.ap-detail-sub {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ap-text-2);
}
.panel-card {
  margin: 16px 0 0;
  padding: 16px;
  background: var(--ap-s2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 24px;
}
.panel-card-head {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 12px;
}
.panel-card-head h3 {
  font-size: 17px;
  font-weight: 600;
}
.ap-card-note {
  font-size: 12px;
  color: var(--ap-text-3);
}
.canvas-viewport {
  margin-bottom: 12px;
  background: var(--ap-s1);
  border: 0;
  border-radius: 16px;
}
.canvas-viewport.is-loading::before {
  background: rgba(22, 22, 23, 0.72);
  font-weight: 500;
}
.legend-bar {
  justify-content: flex-start;
  gap: 6px;
}
.legend-bar > span {
  min-height: 26px;
  padding: 3px 10px;
  border: 0;
  background: var(--ap-s3);
  color: var(--ap-text);
}
.legend-bar > span:hover {
  background: var(--ap-s4);
}
.legend-bar > span.legend-off {
  opacity: 1;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ap-line);
  color: var(--ap-text-3);
  text-decoration: none;
}
.legend-dot {
  width: 8px;
  height: 8px;
}
.dot-init {
  background: #8e8e93;
}
.dot-target,
.dot-fitted {
  box-shadow: none;
}
.specs-matrix-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 0;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
}
.spec-cell {
  padding: 8px 2px;
  background: var(--ap-s1);
  border: 0;
  border-radius: 12px;
  text-align: center;
}
.spec-val {
  font-size: 17px;
  font-weight: 600;
  color: var(--ap-text);
}
.spec-val small {
  margin-left: 1px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ap-text-2);
}
.spec-lbl {
  margin-top: 2px;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ap-text-2);
}

.ab-rack {
  gap: 0;
  margin-bottom: 16px;
  padding: 3px;
  background: #000;
  border-radius: 13px;
}
.ab-btn {
  height: 40px;
  padding: 0 10px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  color: var(--ap-text-2);
}
.ab-btn strong {
  font-size: 15px;
  font-weight: 600;
}
.ab-btn.active {
  background: linear-gradient(var(--ap-s4), var(--ap-s4)) padding-box, var(--aura-gradient) border-box;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  color: var(--ap-text);
}
.ab-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.player-dock-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-areas: "btn seek" "btn time";
  align-items: center;
  gap: 4px 14px;
  margin-top: 0;
}
.play-main-btn {
  position: relative;
  grid-area: btn;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  background: var(--ap-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 3.6v12.8a.8.8 0 0 0 1.2.7l10-6.4a.8.8 0 0 0 0-1.4l-10-6.4A.8.8 0 0 0 7 3.6z' transform='translate(-2 0)'/%3E%3C/svg%3E") no-repeat center / 20px 20px;
  color: transparent;
  font-size: 0;
}
.play-main-btn[data-state="playing"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='4' y='3' width='4.5' height='14' rx='1.2'/%3E%3Crect x='11.5' y='3' width='4.5' height='14' rx='1.2'/%3E%3C/svg%3E");
}
.play-main-btn:disabled,
.play-main-btn.is-loading-audio {
  background-color: var(--ap-s4);
  color: transparent;
  cursor: default;
  opacity: 0.6;
}
.play-main-btn[data-state="none"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M7 3.6v12.8a.8.8 0 0 0 1.2.7l10-6.4a.8.8 0 0 0 0-1.4l-10-6.4A.8.8 0 0 0 7 3.6z' transform='translate(-2 0)' fill='%238e8e93'/%3E%3C/svg%3E");
  opacity: 1;
}
.play-main-btn[data-state="loading"] {
  background-image: none;
  opacity: 1;
}
.play-main-btn[data-state="loading"]::after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: apSpin 0.8s linear infinite;
}
@keyframes apSpin {
  to { transform: rotate(360deg); }
}
.dock-seek-bar {
  --seek-fill: 0%;
  grid-area: seek;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
}
.dock-seek-bar:disabled {
  opacity: 0.5;
}
.dock-seek-bar::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, transparent var(--seek-fill), var(--ap-s4) var(--seek-fill)), var(--aura-gradient);
}
.dock-seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.dock-seek-bar::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--ap-s4);
}
.dock-seek-bar::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--aura-gradient);
}
.dock-seek-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.time-mono {
  grid-area: time;
  font-family: var(--font-sans);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ap-text-3);
}
.play-main-btn[data-state="loading"] ~ .time-mono,
.play-main-btn[data-state="none"] ~ .time-mono {
  font-size: 0;
}
.play-main-btn[data-state="loading"] ~ .time-mono::after,
.play-main-btn[data-state="none"] ~ .time-mono::after {
  font-size: 12px;
  color: var(--ap-text-2);
}
.play-main-btn[data-state="loading"] ~ .time-mono::after {
  content: "试听音频载入中…";
}
.play-main-btn[data-state="none"] ~ .time-mono::after {
  content: "暂无试听音频";
}

.download-rack {
  margin-top: 20px;
  padding: 0;
  background: transparent;
}
#android-qr-panel,
#android-eq-panel {
  padding: 16px;
  background: var(--ap-s2);
  border-radius: 24px;
}
.download-rack .search-box {
  background-color: var(--ap-s3);
}
.qr-name-row label {
  font-size: 13px;
  color: var(--ap-text-2);
}
.qr-img {
  border-radius: 16px;
}
.eq-param-img,
.eq-profile-card img {
  background: var(--ap-s1);
}
.eq-profile-card {
  background: var(--ap-s1);
  border-color: var(--ap-line);
  border-radius: 16px;
}
.eq-profile-note {
  background: var(--ap-s1);
  border: 0;
  border-radius: 14px;
}
.qr-disclaimer {
  background: rgba(255, 214, 10, 0.08);
  border: 0;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ap-text-2);
}
.qr-disclaimer strong {
  color: #ffd60a;
}

/* ---------- 底部导航 ---------- */
.ios-bottom-dock {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  height: auto;
  padding: 6px max(8px, calc(50vw - 260px)) calc(6px + env(safe-area-inset-bottom));
  transform: none;
  background: rgba(22, 22, 23, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 0;
  border-top: 1px solid var(--ap-line);
  border-radius: 0;
  box-shadow: none;
}
.ios-bottom-dock.dock-hidden {
  transform: translateY(100%);
}
.dock-tab-item {
  gap: 3px;
  height: 46px;
  color: var(--ap-text-3);
}
.dock-tab-item svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock-tab-item span {
  font-size: 10px;
}
.dock-tab-item.active {
  color: var(--ap-text);
}

/* 不支持背景模糊的内嵌浏览器里，导航改用接近不透明的底色，避免正文透出来 */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .top-hud,
  .ap-nav,
  .ios-bottom-dock {
    background: rgba(22, 22, 23, 0.97);
  }
}

/* ---------- 小屏 ---------- */
@media (max-width: 768px) {
  :root {
    --ap-gutter: 16px;
  }
  .view {
    padding: 0 var(--ap-gutter) 28px;
  }
  #view-welcome {
    padding: 0;
  }
  .top-hud {
    margin-bottom: 0;
    padding: 0 var(--ap-gutter);
    border-radius: 0;
  }
  .hud-brand {
    font-size: 15px;
  }
  .hud-logo {
    width: auto;
    top: 0;
  }
  .zzz-btn-primary {
    padding: 0 22px;
    font-size: 17px;
  }
  .play-main-btn {
    width: 54px;
    height: 54px;
  }
  .player-dock-row {
    gap: 4px 14px;
  }
}

/* ---------- 大屏 ---------- */
@media (min-width: 834px) {
  .ap-hero {
    padding-top: 60px;
  }
  .ap-eyebrow {
    font-size: 28px;
  }
  .ap-hero-h1 {
    font-size: clamp(64px, 6.1vw, 88px);
    line-height: 1.05;
    letter-spacing: -0.015em;
  }
  .ap-br-m {
    display: none;
  }
  .ap-hero-sub {
    margin-top: 18px;
    font-size: clamp(19px, 1.6vw, 23px);
    line-height: 1.4;
  }
  .enter-split {
    margin-top: 28px;
  }
  .ap-hero-visual {
    height: 430px;
    margin-top: 10px;
  }
  .ap-hero-glow {
    width: 860px;
    height: 540px;
  }
  .ap-hero-curve {
    top: 60px;
    height: 320px;
  }
  .ap-hero-product {
    left: calc(50% - 113px);
    top: 54%;
    height: 350px;
    filter: drop-shadow(0 30px 48px rgba(0, 0, 0, 0.7));
  }
  .ap-hero-product-back {
    left: calc(50% + 106px);
    top: 44.2%;
    height: 470px;
    filter: brightness(0.88) drop-shadow(0 28px 48px rgba(0, 0, 0, 0.55));
  }
  .ap-stats {
    width: 560px;
    margin: 0 auto;
  }
  .ap-stats strong {
    font-size: 40px;
  }
  .ap-stats span {
    font-size: 14px;
  }
  .ap-large-title {
    font-size: 48px;
  }
  .ap-detail-h1 {
    font-size: 44px;
  }
  .device-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
  }
  .device-icon-box,
  .device-img-thumb {
    height: 120px;
  }
  .panel-card {
    padding: 20px;
  }
}

/* ==========================================================================
   方案列表卡片：借鉴降噪天梯移动端的「暗色底图 + 正片叠底 + 悬停显色」
   只影响机型弹层里的 .ladder-mode-card，不动其他列表。
   ========================================================================== */
.ladder-mode-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 78px;
  padding: 12px;
  margin-bottom: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    var(--ap-s2);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  transition: transform .28s ease, border-color .28s ease,
              background .28s ease, box-shadow .28s ease;
}
.ladder-mode-card:last-child {
  margin-bottom: 0;
}
.ladder-mode-card + .ladder-mode-card::before {
  display: none;
}
.ladder-mode-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    var(--ap-s2) 0%,
    rgba(29,29,31,.94) 34%,
    rgba(29,29,31,.46) 68%,
    rgba(29,29,31,0) 100%);
}
.ladder-mode-bg-img,
.ladder-mode-card:hover .ladder-mode-bg-img {
  position: absolute;
  right: -10%;
  top: 50%;
  width: 60%;
  height: 168%;
  object-fit: contain;
  object-position: center center;
  opacity: .16;
  filter: grayscale(1) brightness(.5) contrast(1.2) blur(4px);
  transform: translateY(-50%) scale(1.12);
  mix-blend-mode: screen; /* 深色底图先去黑留亮，悬停再恢复原色 */
  -webkit-mask-image: radial-gradient(ellipse 72% 86% at 70% 50%, #000 38%, transparent 86%);
  mask-image: radial-gradient(ellipse 72% 86% at 70% 50%, #000 38%, transparent 86%);
  z-index: 0;
  transition: opacity .3s ease, filter .3s ease, transform .3s ease;
}
.ladder-mode-card:hover .ladder-mode-bg-img,
.ladder-mode-card:focus-visible .ladder-mode-bg-img {
  opacity: .66;
  filter: grayscale(0) brightness(1) contrast(1) blur(0);
  transform: translateY(-50%) scale(1.06);
  mix-blend-mode: normal;
}
.ladder-mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03)),
    var(--ap-s2);
  box-shadow: 0 14px 32px rgba(0,0,0,.28);
}
.ladder-mode-card:active {
  transform: scale(.995);
}
.ladder-mode-info {
  position: relative;
  z-index: 1;
  max-width: 70%;
  padding-left: 18px;
}
.ladder-mode-right {
  position: relative;
  z-index: 1;
}
@media (hover: none), (max-width: 768px) {
  .ladder-mode-bg-img {
    opacity: .2;
    filter: grayscale(1) brightness(.58) contrast(1.15) blur(2.5px);
  }
  .ladder-mode-card:active .ladder-mode-bg-img {
    opacity: .66;
    filter: grayscale(0) brightness(1) contrast(1) blur(0);
    transform: translateY(-50%) scale(1.06);
    mix-blend-mode: normal;
  }
  .ladder-mode-card:active {
    transform: scale(.995);
    border-color: rgba(255,255,255,.22);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ladder-mode-card,
  .ladder-mode-bg-img {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .drawer-panel,
  .drawer-panel.is-open,
  .ap-sheet-scrim,
  .drawer-panel.is-open + .ap-sheet-scrim {
    animation: none;
    transition: none;
  }
}
