:root {
  --brand: #ff6a00;
  --brand-2: #ff9a3d;
  --bg: #ffffff;
  --text: #1f2d3d;
  --muted: #5c6c7c;
  --card: #f8fafc;
  --border: #e5eaf0;
  --surface: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 20px color-mix(in oklab, #000 12%, transparent);
  --ring: color-mix(in oklab, var(--brand) 35%, var(--border));
  --ok: #2eb872;
  --warn: #f59e0b;
  --bad: #ef4444;
  --link: #0ea5e9;
  --space: 12px;
  --space-sm: 8px;
  --space-lg: 24px;
}
[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e9eef5;
  --muted: #b8c4d0;
  --card: #0f1c2e;
  --surface: #13233b;
  --border: #274260;
  --link: #58c7ff;
  --shadow: 0 12px 30px color-mix(in oklab, #000 50%, transparent);
  --ring: color-mix(in oklab, var(--brand) 45%, var(--border));
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html, body { height: 100% }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: var(--link); text-decoration: none }
a:hover { text-decoration: underline }
.container { max-width: 1080px; margin: 0 auto; padding: 24px }
.has-cta { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  z-index: 1000;
}
.brand {
  display: flex; gap: 12px; align-items: center;
}
.logo {
  width: 28px; height: 28px; border-radius: 6px; background: var(--brand);
}
.brand h1 { font-size: 18px; margin: 0 }
.nav {
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none }
.menu-toggle { display: none }
.menu-mask { position: fixed; inset: 0; background: rgba(12,18,32,.35); backdrop-filter: blur(6px); z-index: 49 }
.menu-panel { position: fixed; left: 50%; transform: translateX(-50%) translateY(24px); bottom: calc(16px + env(safe-area-inset-bottom, 0)); width: calc(100% - 24px); max-width: 680px; background: var(--surface); border: 1px solid var(--ring); border-radius: calc(var(--radius) + 4px); padding: var(--space); box-shadow: var(--shadow); z-index: 50; transition: transform .18s ease, opacity .18s ease; opacity: .0 }
.menu-panel.open { transform: translateX(-50%) translateY(0); opacity: 1 }
.menu-header { display:flex; align-items:center; justify-content:space-between; gap: var(--space-sm); margin-bottom: var(--space) }
.menu-title { font-weight: 700 }
.menu-list { display: grid; grid-template-columns: 1fr; gap: var(--space-sm) }
.menu-btn { display:flex; align-items:center; gap: var(--space); padding: 12px; border: 1px solid var(--ring); border-radius: 999px; background: var(--card); cursor: pointer }
.menu-btn:hover { box-shadow: var(--shadow) }
.menu-btn .icon { width: 28px; height: 28px; display:inline-flex; align-items:center; justify-content:center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 16px }
.btn {
  padding: 8px 14px; border: 1px solid var(--ring);
  border-radius: var(--radius); background: var(--card); color: var(--text);
  cursor: pointer; transition: all .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow) }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 40%, transparent) }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--ring); box-shadow: 0 6px 16px color-mix(in oklab, var(--brand) 35%, transparent) }
.btn.ghost { background: transparent }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--ring); background: var(--surface);
}
.badge.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, var(--border)); }
.badge.warn { color: var(--warn); border-color: color-mix(in oklab, var(--warn) 50%, var(--border)); }
.badge.info { color: var(--link) }
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch;
  padding: 24px 0;
}
.hero-card {
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; height: 100%;
}
.hero h2 { margin: 0 0 8px; font-size: 28px }
.hero p { margin: 0; color: var(--muted) }
.highlights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px;
}
.highlight { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--card); box-shadow: var(--shadow) }
.section { margin: 24px 0 }
.section h3 { margin: 0 0 12px; font-size: 20px }
.spec-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.spec-item {
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow)
}
.spec-key { font-weight: 600; color: var(--text) }
.muted { color: var(--muted) }
.perf-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.bar { height: 12px; background: var(--border); border-radius: 999px; overflow: hidden }
.bar > span { display: block; height: 100%; background: var(--brand) }
.card { background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow) }
.buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
.actions { display:flex; gap: var(--space); align-items: center; margin-top: var(--space) }
.gallery { display:flex; gap: var(--space); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -ms-overflow-style: none; scrollbar-width: none; cursor: grab }
.gallery::-webkit-scrollbar { display: none }
.gallery { --gallery-height: 320px; --overlap: 72px }
.figure { background: color-mix(in oklab, var(--surface) 90%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--ring); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow) }
.figure { flex: 0 0 auto; width: clamp(240px, 32vw, 420px); margin: 0; scroll-snap-align: start }
.figure img { width: 100%; height: auto; max-height: var(--gallery-height); display: block; object-fit: contain }
.gallery.dragging { cursor: grabbing }
.gallery img { -webkit-user-drag: none; user-select: none }
.gallery.stacked .figure + .figure { margin-left: calc(var(--overlap) * -1) }
.gallery.stacked .figure:hover { transform: translateY(-4px) scale(1.02); z-index: 2 }
.figure figcaption { padding: var(--space-sm) var(--space); font-size: 13px; color: var(--muted) }
.product-media { display:flex; flex-direction:column; gap:var(--space) }
.product-media .main-image { text-align:center; padding:var(--space); border-radius:calc(var(--radius) - 4px); background:transparent; display:flex; align-items:center; justify-content:center; flex: 1 }
.product-media .main-image img { width:100%; max-width:640px; height:auto; max-height:420px; border-radius:10px; object-fit:contain }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px) scale(.98) } to { opacity:1; transform:none } }
.reveal { opacity:0; transform: translateY(10px) scale(.98); transition: opacity .3s ease, transform .3s ease }
.reveal.visible { opacity:1; transform:none }
.thumbs { display:flex; gap:var(--space-sm); justify-content:center; flex-wrap:wrap }
.thumb { width:72px; height:72px; object-fit:cover; border-radius:8px; border:1px solid var(--border); cursor:pointer; opacity:0.9 }
.thumb.selected { border-color:var(--brand); box-shadow:0 6px 18px color-mix(in oklab, var(--brand) 20%, transparent); opacity:1 }
.media-wrap { display:flex; gap: var(--space); align-items:center }
.thumb-rail { display:flex; flex-direction:column; gap:var(--space-sm); align-items:center; max-height:420px; overflow:auto; padding-right:4px; scrollbar-width: none; -ms-overflow-style: none }
.thumb-rail::-webkit-scrollbar { display:none }
.thumb-rail .thumb { width:64px; height:64px }
.field { display: grid; gap: 8px }
.select, .input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text)
}
.price { font-size: 22px; font-weight: 700 }
.price-card { display:flex; align-items: baseline; justify-content: space-between; gap: var(--space); margin-top: var(--space); padding: calc(var(--space) + 4px); background: color-mix(in oklab, var(--surface) 94%, transparent); border: 1px solid var(--ring); border-radius: calc(var(--radius) + 2px); box-shadow: var(--shadow) }
.price-card .price-big { font-size: 36px; font-weight: 900; color: var(--brand) }
.price-card .sub { color: var(--muted) }
.selection-line { margin-top: 8px; font-size: 14px; color: var(--muted) }
.price-band { display:flex; align-items:center; gap: var(--space); margin-top: var(--space); padding: var(--space); background: color-mix(in oklab, var(--surface) 92%, transparent); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow) }
.price-band .price-big { font-size: 32px; font-weight: 800; color: var(--brand) }
.price-band .sub { color: var(--muted) }
.price-hero { display:flex; align-items:center; justify-content:space-between; gap: var(--space); margin-top: var(--space); padding: var(--space); background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow) }
.price-hero .amount { font-size: 26px; font-weight: 800; color: var(--text) }
.version-pills { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: var(--space-sm) }
.system-pills { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); grid-auto-rows: auto; gap: var(--space-sm) }
.version-pills .pill, .system-pills .pill { width: 100%; justify-content: center; display: inline-flex; align-items: center }
.choice-grid { display: grid; grid-template-columns: 1fr; gap: var(--space) }
.pill { padding: 6px 10px; border: 1px solid var(--ring); border-radius: 999px; background: var(--card); color: var(--text); cursor: pointer }
.pill:hover { box-shadow: var(--shadow) }
.pill.selected { border-color: var(--brand); box-shadow: var(--shadow); background: color-mix(in oklab, var(--card) 96%, transparent) }
.pill:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--brand) 45%, transparent) }
[data-theme="dark"] .pill { background: color-mix(in oklab, var(--surface) 78%, #ffffff 22%); border-color: color-mix(in oklab, #ffffff 26%, var(--ring)); }
[data-theme="dark"] .pill.selected { background: color-mix(in oklab, var(--brand) 18%, #ffffff 8%); border-color: var(--brand); color: var(--text) }

/* 详细参数表格样式 */
.spec-table { width: 100%; border-collapse: collapse }
.spec-table th, .spec-table td { padding: var(--space-sm) var(--space); border-bottom: 1px solid var(--border); vertical-align: top }
.spec-table th { width: 160px; font-weight: 700; color: var(--text) }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none }

/* 说明板块一排统计 */
.stats-row { display: flex; flex-wrap: nowrap; gap: var(--space); overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; padding: var(--space-sm) 0 }
.stats-row::-webkit-scrollbar { display: none }
.stat { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--ring); border-radius: 999px; background: var(--card); color: var(--text); box-shadow: var(--shadow); white-space: nowrap }
.stat .key { font-weight: 700 }
.stat .val { font-weight: 800; color: var(--brand) }
[data-theme="dark"] .stat { background: color-mix(in oklab, var(--surface) 80%, #ffffff 20%); border-color: color-mix(in oklab, #ffffff 26%, var(--ring)); }

.footer { margin-top: 24px; padding: 16px; border-top: 1px solid var(--border); color: var(--muted) }
main.container { background: radial-gradient(1200px 600px at 50% -100px, color-mix(in oklab, var(--brand) 6%, transparent), transparent) }
main.container { position: relative; z-index: 1 }

/* 背景墙（ROM 图片） */
.bg-wall { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: .22; filter: saturate(115%) contrast(96%); animation: wallTiltDrift 140s linear infinite alternate; transform-origin: 50% 50%; }
.bg-wall .row { display: flex; gap: 8px; padding: 8px 0; will-change: transform; animation: wallSlide var(--wall-speed, 120s) linear infinite alternate; }
.bg-wall .row:nth-child(2) { animation-duration: 140s }
.bg-wall .row:nth-child(3) { animation-duration: 160s }
.bg-wall .tile { flex: 0 0 auto; width: 220px; height: 160px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.14) }
.bg-wall .tile img { width: 100%; height: 100%; object-fit: cover; display: block }
@keyframes wallSlide { from { transform: translateX(0) } to { transform: translateX(-50%) } }
[data-theme="dark"] .bg-wall { opacity: .28 }
@media (prefers-reduced-motion: reduce) { .bg-wall .row { animation: none } }
@keyframes wallTiltDrift {
  0% { transform: rotate(-6deg) translate3d(0, -3%, 0) scale(1.18); }
  100% { transform: rotate(-6deg) translate3d(-10%, 6%, 0) scale(1.18); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important } }
main.container { background: radial-gradient(1200px 600px at 50% -100px, color-mix(in oklab, var(--brand) 6%, transparent), transparent) }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .perf-bars { grid-template-columns: 1fr; }
  .buy-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .choice-grid { grid-template-columns: 1fr }
  .version-pills { grid-template-columns: repeat(3, minmax(98px, 1fr)) }
  .system-pills { grid-template-columns: repeat(2, minmax(120px, 1fr)) }
}
@media (max-width: 600px) {
  .product-info h2 { font-size: 22px }
  .price-hero { flex-direction: column; align-items: flex-start }
  .gallery { gap: 12px }
  .gallery { --gallery-height: 220px; --overlap: 40px }
  .media-wrap { flex-direction: column }
  .thumb-rail { flex-direction: row; max-height: none; overflow-x: auto }
  .thumb { width: 56px; height: 56px }
  .product-media .main-image img { max-height: 320px }
  
  .brand h1 { font-size: 16px }
  .nav .btn { padding: 6px 10px; font-size: 13px; white-space: nowrap }
  .actions { flex-direction: column; align-items: stretch }
  .actions .btn { width: 100% }
  .nav { display: none }
  .menu-toggle { display: inline-flex }
  .brand .badge { display: none }
  .menu-grid { grid-template-columns: 1fr }
}
@media (max-width: 480px) {
  .btn { padding: 8px 12px }
  .version-pills { gap: 6px }
  .pill { padding: 6px 8px }
  .thumb { width: 48px; height: 48px }
}