:root {
  color-scheme: dark;
  --bg: #10161c;
  --panel: #171f28;
  --line: #354351;
  --white: #f3f6f9;
  --muted: #bac6d3;
  --ice: #a5ebf7;
  --ink: #101d24;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--white);
  background: var(--bg);
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
.shell { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.topbar, .footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { min-height: 78px; }
.wordmark { font: 900 italic 2rem/1 Arial, sans-serif; letter-spacing: -.075em; }
.topbar nav { display: flex; gap: clamp(20px, 4vw, 42px); color: var(--muted); }
.topbar nav a:hover, .footer a:hover { color: var(--ice); }

.hero { position: relative; display: grid; min-height: clamp(440px, 48vw, 556px); align-items: center; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #090d13; }
.hero img { position: absolute; z-index: -2; inset: 0 0 0 auto; width: 67%; height: 100%; object-fit: cover; object-position: center; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#090d13 27%,rgba(9,13,19,.89) 35%,rgba(9,13,19,.12) 53%,transparent 67%); pointer-events: none; }
.hero-copy { padding: 46px clamp(32px, 6%, 70px); }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--ice); font-weight: 700; letter-spacing: .14em; }
.eyebrow span { width: 23px; height: 2px; background: currentColor; }
h1 { font-size: clamp(3rem, 8vw, 6.1rem); font-weight: 900; line-height: 1; letter-spacing: -.06em; margin-top: 23px; }
h1 span { display: block; margin-top: 13px; font-size: .69em; color: var(--ice); letter-spacing: -.045em; }
.hero-description { color: var(--muted); margin: 27px 0 24px; line-height: 1.75; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 9px 19px; border: 1px solid transparent; border-radius: 8px; font-weight: 720; text-align: center; }
.primary { color: var(--ink); background: var(--ice); }
.primary:hover:not(:disabled) { background: #c9f6fd; }
.secondary { color: var(--white); border-color: var(--line); background: transparent; }
.secondary:hover { border-color: var(--ice); }

.order-section, .parts-section { padding-top: clamp(46px, 6vw, 74px); scroll-margin-top: 12px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 19px; }
.section-heading h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.045em; }
.section-heading p, .pay-note, #copy-status { color: var(--muted); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, 365px); align-items: start; gap: 18px; }
.products { display: grid; padding: 0; margin: 0; border: 0; gap: 10px; }
.products legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.product, .custom-card, .summary, .parts-grid li { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; }
.product { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; padding: 10px 13px; gap: 14px; min-height: 91px; }
.product.selected { border-color: #5b8494; }
.product img { width: 74px; height: 57px; object-fit: contain; border-radius: 6px; background: #0d131b; }
.product:first-of-type img { object-fit: cover; }
.product h3 { font-size: 1rem; line-height: 1.35; }
.product p { margin-top: 4px; color: var(--ice); font-weight: 750; font-variant-numeric: tabular-nums; }
.quantity { display: grid; grid-template-columns: 40px 29px 40px; align-items: center; background: #0e151d; border: 1px solid var(--line); border-radius: 6px; }
.quantity button, .quantity input { width: 100%; height: 42px; background: transparent; color: var(--white); border: 0; text-align: center; padding: 0; }
.quantity button { font-size: 1.25rem; }
.quantity button:hover:not(:disabled) { color: var(--ice); background: #253442; }
.custom-card { margin-top: 10px; padding: 12px 16px; }
.custom-choice { display: flex; align-items: center; gap: 10px; min-height: 31px; cursor: pointer; }
.custom-choice input { width: 19px; height: 19px; margin: 0; accent-color: var(--ice); }
.custom-fee { margin-left: 12px; color: var(--ice); font-weight: 750; }
#custom-fields, #manual-copy { margin-top: 10px; }
textarea { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; color: var(--white); background: #0d141c; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.summary { padding: 18px; }
.summary h3 { font-size: 1.22rem; }
.summary ul { padding: 0; margin: 13px 0 12px; list-style: none; }
.summary li, .total { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; }
.summary li { color: var(--muted); margin-top: 5px; }
.summary li span + span, .total output { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.total { border-top: 1px solid var(--line); padding: 9px 0 11px; }
.total output { color: var(--ice); font-size: 1.65rem; font-weight: 800; }
.summary .button { width: 100%; }
.pay-note { margin: 9px 0; font-size: .9rem; }
#copy-status { font-size: .9rem; margin-top: 7px; }
#copy-status:empty { display: none; }

.parts-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.parts-grid li { display: grid; justify-items: center; padding: 10px 6px; }
.parts-grid img { width: 100%; height: auto; aspect-ratio: 2; object-fit: contain; }
.parts-grid span { padding: 3px 0; }
.footer { margin-top: 54px; min-height: 86px; border-top: 1px solid var(--line); color: var(--muted); }
.footer .wordmark { color: var(--white); font-size: 1.6rem; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .topbar { min-height: 64px; }
  .hero { min-height: 0; display: flex; flex-direction: column; align-items: stretch; border-radius: 16px; }
  .hero-copy { padding: 25px 23px 0; }
  .hero img { position: relative; order: 2; width: 100%; height: auto; margin-top: -23px; aspect-ratio: 1.43; object-position: center 51%; }
  .hero::after { display: none; }
  .hero-copy { position: relative; z-index: 1; }
  h1 { margin-top: 15px; font-size: clamp(2.7rem, 10vw, 4.6rem); }
  h1 span { margin-top: 8px; }
  .hero-description { margin: 16px 0 13px; }
  .order-grid { grid-template-columns: 1fr; }
  .parts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .product { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; padding-inline: 8px; }
  .product img { width: 48px; height: 46px; }
  .quantity { grid-template-columns: 36px 25px 36px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
