/* Shared palette and type. Page-specific geometry stays beside its component. */
@font-face {
  font-family: "Digital Numbers";
  src: url("./assets/digital-numbers-regular.ttf?v=061234f7c2cb") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Just Display Serif HK";
  src: url("./assets/noto-serif-hk-ui.woff2?v=061234f7c2cb") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Just Display Sans HK";
  src: url("./assets/noto-sans-hk-ui.woff2?v=061234f7c2cb") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Just Display Sans SC";
  src: url("./assets/noto-sans-sc-ui.woff2?v=061234f7c2cb") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Just Display Serif SC";
  src: url("./assets/noto-serif-sc-ui.woff2?v=061234f7c2cb") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root {
  view-transition-name: none;
  --page-width: 1664px;
  --page-gutter: clamp(24px, 7vw, 112px);
  --page-top: 100px;
  --footer-padding: 16px;
  --footer-height: calc(37px + 2 * var(--footer-padding) + env(safe-area-inset-bottom));
  --preview-height: clamp(360px, 54svh, 460px);
  --brand-width: clamp(169px, 18vw, 240px);
  --font-sans: -apple-system, system-ui, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  --color-ink: #000000;
  --color-muted: #626d78;
  --color-subtle: #8b949e;
  --color-surface: #fff;
  --color-canvas: #edeef0;
  --color-border: #d3d9de;
  --color-border-soft: #dce0e4;
  --color-scrollbar: #a3a3a333;
  --silver-finish: linear-gradient(135deg, #dfe1e3, #c8cbce 55%, #d8dbdd);
  --silver-edge: #0000000c;
  --silver-highlight: #ffffff40;
  --text-label: 14px;
  --text-body: 16px;
  --text-section: 24px;
  --text-display: clamp(32px, 5vw, 60px);
  --weight-regular: 400;
  --weight-strong: 700;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --control-height: 44px;

  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  font-synthesis: none;
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-surface);
}

/* Base elements and keyboard access. */
* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-underline-offset: 5px;
}
button, input, select {
  font: inherit;
  color: inherit;
}
button:disabled, input:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 5px;
}
/* Reveal simulator actions only when reached by keyboard focus. */
.visually-hidden, .screen-keyboard:not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  z-index: 2;
  padding: var(--space-3);
  background: var(--color-surface);
}
.skip-link:focus {
  top: var(--space-3);
}
/* Every page shares the same content boundaries. */
main {
  flex: 1;
  width: 100%;
  max-width: var(--page-width);
  padding-inline: var(--page-gutter);
  margin: 0 auto;
}

.site-footer {
  padding: var(--footer-padding) var(--page-gutter) calc(var(--footer-padding) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border-soft);
  color: var(--color-muted);
  font-size: var(--text-label);
  text-align: center;
}

.footer-display {
  display: inline-grid;
  place-items: center;
  vertical-align: top;
  min-height: 36px;
  max-width: 100%;
  padding: 2px 12px;
  color: var(--color-ink);
  font: var(--weight-regular) clamp(14px, 4vw, 19px)/1.25 "Just Display Serif HK", "Songti TC", "Noto Serif CJK TC", serif;
}
:root:lang(zh-Hans) .footer-display {
  font-family: "Just Display Serif SC", "Songti SC", "Noto Serif CJK SC", serif;
}
:root:lang(en) .footer-display { font-size: 12px; line-height: 16px; }

.footer-display canvas {
  display: block;
  width: var(--footer-art-width);
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}
@media (max-width: 767px) {
  .footer-display { font-size: 12px; }
  .footer-display canvas { width: calc(var(--footer-art-width) * 0.8); }
}
@media (forced-colors: none) {
  .footer-display-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}
@media (forced-colors: active) {
  .footer-display canvas { display: none; }
}

body:has(.purchase-page:not([hidden])) .site-footer {
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

/* Shared text links and quiet actions. */
.detail-top a,
.preview-actions a,
.preview-modes button:not([hidden]),
.screen-actions button {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--text-label);
  text-decoration: none;
}
.detail-top a:hover,
.preview-actions a:hover {
  color: var(--color-ink);
}

/* Same language switch across website pages; independent of device preferences. */
#sign-in { flex-shrink: 0; min-height: var(--control-height); white-space: nowrap; }
.site-language { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; }
.site-language button, .list-nav .site-language button {
  min-width: 32px;
  min-height: var(--control-height);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  cursor: pointer;
}
.site-language button[aria-pressed="true"] { color: var(--color-ink); font-weight: var(--weight-strong); }

/* Native modal keeps focus/escape behavior; inputs are never used as credentials. */
.sign-in-dialog {
  width: min(400px, calc(100vw - 2 * var(--page-gutter)));
  max-height: calc(100svh - 48px);
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 12px 60px #00000012;
}
.sign-in-dialog::backdrop { background: #00000026; }
.sign-in-header, .sign-in-modes { display: flex; align-items: center; }
.sign-in-header { justify-content: space-between; margin-bottom: var(--space-4); }
.sign-in-modes { gap: var(--space-4); }
.sign-in-dialog button {
  min-height: var(--control-height);
  border: 0;
  background: transparent;
  cursor: pointer;
}
.sign-in-modes button {
  padding: 0;
  color: var(--color-muted);
  font-size: var(--text-section);
  font-weight: var(--weight-regular);
}
.sign-in-modes button[aria-pressed="true"] { color: var(--color-ink); font-weight: var(--weight-strong); }
.sign-in-close { display: grid; place-items: center; width: var(--control-height); padding: 0; }
.sign-in-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.sign-in-field { display: grid; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--text-label); }
.sign-in-field input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  font-size: var(--text-body);
}
.sign-in-dialog .sign-in-submit {
  width: 100%;
  margin-top: var(--space-5);
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-surface);
  font-weight: var(--weight-strong);
}
#sign-in-notice { margin: var(--space-4) 0 0; color: var(--color-muted); font-size: var(--text-label); }
.list-nav button:enabled { min-height: var(--control-height); cursor: pointer; }

/* Stable page geometry when navigating between short and scrolling pages. */
html::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-thumb {
  border-radius: 9999px;
  background: var(--color-scrollbar);
}
/* Generated missing-glyph supplements; shipped base font bytes remain frozen. */
@font-face { font-family: "Just Display Serif HK"; src: url("./assets/noto-serif-hk-ui-extra.woff2?v=061234f7c2cb") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+300C, U+300D, U+4E88, U+540B, U+5957, U+5BBD, U+5BEC, U+5BF8, U+5DE6, U+5E45, U+63C0, U+64CA, U+672B, U+687F, U+6BD4, U+6ED1, U+7747, U+8C03, U+8FB9, U+8FD8, U+9010, U+9084, U+FF0B; }
@font-face { font-family: "Just Display Serif SC"; src: url("./assets/noto-serif-sc-ui-extra.woff2?v=061234f7c2cb") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+300C, U+300D, U+4E88, U+540B, U+5957, U+5BBD, U+5BEC, U+5BF8, U+5DE6, U+5E45, U+63C0, U+64CA, U+672B, U+687F, U+6BD4, U+6ED1, U+7747, U+8C03, U+8FB9, U+8FD8, U+9010, U+9084, U+FF0B; }
@font-face { font-family: "Just Display Sans HK"; src: url("./assets/noto-sans-hk-ui-extra.woff2?v=061234f7c2cb") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+300C, U+300D, U+4E88, U+540B, U+5957, U+5BBD, U+5BEC, U+5BF8, U+5DE6, U+5E45, U+63C0, U+64CA, U+672B, U+687F, U+6BD4, U+6ED1, U+7747, U+8C03, U+8FB9, U+8FD8, U+9010, U+9084, U+FF0B; }
@font-face { font-family: "Just Display Sans SC"; src: url("./assets/noto-sans-sc-ui-extra.woff2?v=061234f7c2cb") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; unicode-range: U+300C, U+300D, U+4E88, U+540B, U+5957, U+5BBD, U+5BEC, U+5BF8, U+5DE6, U+5E45, U+63C0, U+64CA, U+672B, U+687F, U+6BD4, U+6ED1, U+7747, U+8C03, U+8FB9, U+8FD8, U+9010, U+9084, U+FF0B; }
/* Collection: measured against NextBusHK beta/store; artwork stays front-facing. */
.list-mode {
  --collection-gap: 28px;
  --device-width: 68vw;
  --media-height: clamp(192px, 42vw, 288px);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
}
.list-header {
  position: relative;
  z-index: 2;
  padding: var(--page-top) 0 0;
}
.list-header-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 auto;
}
.list-brand {
  display: block;
  width: var(--brand-width);
  flex-shrink: 0;
  text-decoration: none;
}
.brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
  /* Align the ink: the Figma SVG has 13.305/169 of its width as left padding. */
  transform: translateX(calc(-100% * 13.305 / 169));
}
.list-header h1 {
  margin: 32px 0 0;
  font-size: var(--text-display);
  font-weight: var(--weight-strong);
  line-height: 1.04;
  letter-spacing: normal;
}
.list-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--color-muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: 1.18;
}
#product-nav {
  flex-flow: column nowrap;
  align-items: flex-start;
  gap: 0;
}
.list-nav a, .list-nav button {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
}
.list-nav a:hover {
  color: var(--color-ink);
}
.device-gallery {
  display: flex;
  gap: var(--collection-gap);
  padding: 32px 0 clamp(24px, 5svh, 56px);
  margin: 0 auto;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.device-gallery::-webkit-scrollbar {
  display: none;
}
.device-list {
  display: flex;
  flex: 0 0 auto;
  gap: var(--collection-gap);
  padding: 0;
  margin: 0;
  list-style: none;
}
.nano-preview {
  flex: 0 0 var(--device-width);
  width: var(--device-width);
  scroll-snap-align: center;
}
.device-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.device-link:focus-visible {
  outline-offset: 8px;
}
.nano-preview figure {
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  height: 100%;
  margin: 0;
  text-align: center;
}
.device-media {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: var(--media-height);
  overflow: hidden;
}
.nano-poster {
  position: relative;
  display: block;
  width: min(86vw, 928px, calc(var(--media-height) * 1728 / 608));
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}
.nano-poster > img {
  display: block;
  width: 100%;
  height: auto;
}
.catalog-screen {
  position: absolute;
  left: 4.513889%;
  top: 12.171053%;
  width: 90.972222%;
  height: 75.657895%;
  pointer-events: none;
}
.catalog-screen-outgoing {
  opacity: 0;
}
.device-gallery figcaption {
  display: none;
  margin: 0;
  font-size: var(--text-body);
  line-height: 1.16;
}
.device-title {
  margin: 0;
  font-size: inherit;
  font-weight: var(--weight-strong);
}
.device-meta {
  margin: 4px 0 0;
  font-size: inherit;
  font-weight: var(--weight-regular);
}
.add-device-preview {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  align-self: start;
  flex: 0 0 var(--device-width);
  width: var(--device-width);
  height: var(--media-height);
  scroll-snap-align: center;
}
.add-device-preview button {
  width: min(100%, 86vw, 928px, calc(var(--media-height) * 1728 / 608));
  aspect-ratio: 1728 / 608;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  background: transparent;
  color: var(--color-subtle);
  font: inherit;
  font-size: var(--text-body);
  white-space: nowrap;
}
.gallery-controls {
  display: none;
}
@media (min-width: 640px) {
  .list-mode {
    --collection-gap: 32px;
  }
  .list-header h1 {
    margin-top: 36px;
  }
}
@media (min-width: 1024px) {
  .list-mode {
    --collection-gap: 50px;
    --device-width: min(86vw, 928px);
    --media-height: clamp(288px, 42vh, 384px);
  }
  .list-header {
    padding-top: clamp(72px, 9vh, 144px);
  }
  .list-header h1 {
    margin-top: 24px;
  }
  .list-nav {
    position: absolute;
    top: 0;
    right: 0;
    gap: 6px;
    margin: 0;
    font-size: var(--text-label);
    line-height: 1.12;
  }
  #product-nav { align-items: flex-end; }
  .device-gallery {
    padding-top: 32px;
    padding-bottom: 40px;
  }
  .nano-preview figure {
    grid-template-rows: 1fr auto;
    align-items: end;
    min-height: 44svh;
    text-align: left;
  }
  .device-gallery figcaption {
    display: block;
    margin-top: 56px;
  }
  .demo-mode .nano-preview figure {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
  }
  .demo-mode .gallery-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .gallery-controls button {
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: var(--color-muted);
  }
  .gallery-controls svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
  }
}

/* Shared subpage navigation: one arrow, position and touch target. */
.detail-top {
  position: fixed;
  inset: 24px 20px auto;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--control-height) 1fr;
  align-items: center;
  column-gap: var(--space-4);
}
.detail-top .detail-brand { width: 156px; }
.detail-top .detail-menu { justify-self: end; }
.detail-menu {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.detail-menu #sign-in {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: var(--text-label);
}
.detail-top a {
  padding: 0;
}
#detail-back {
  justify-content: flex-start;
  width: var(--control-height);
  height: var(--control-height);
  color: var(--color-muted);
}
.detail-top svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#detail-back svg {
  /* Align the arrow stroke with the content edge. */
  transform: translateX(calc(-100% * 5 / 32));
}
@media (min-width: 768px) {
  #device-detail { --page-top: 168px; }
}
@media (max-width: 1023px) {
  .detail-top .detail-brand { justify-self: end; }
  .detail-brand .brand-wordmark {
    /* Align the SVG ink with the right edge of the menu. */
    transform: translateX(calc(100% * 16.055 / 169));
  }
}
@media (min-width: 1024px) {
  #device-detail { --page-top: 120px; }
  .detail-top {
    inset-inline: max(var(--page-gutter), calc((100% - var(--page-width)) / 2 + var(--page-gutter)));
    grid-template-columns: var(--control-height) auto 1fr;
  }
  .detail-top .detail-brand { width: 192px; }
  .detail-menu { grid-column: auto; }
}

/* Product introduction: the reference's two-column composition. */
.product-mode .product-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-content: center;
  align-items: start;
  column-gap: clamp(48px, 10vw, 128px);
  min-height: calc(100svh - var(--footer-height));
  padding: var(--page-top) 0 52px;
  margin: auto;
}
.product-copy {
  align-self: end;
}
.product-copy h1 {
  margin: 0;
  font-size: var(--text-display);
  font-weight: var(--weight-strong);
  line-height: 1.02;
  letter-spacing: normal;
  white-space: nowrap;
}
.product-tagline {
  margin: 16px 0 0;
  font-size: var(--text-section);
  line-height: 1.16;
}
.product-finish {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: var(--space-5) 0 0;
}
.product-summary {
  display: grid;
  gap: 4px;
  margin: var(--space-4) 0 0;
  font-size: var(--text-body);
  line-height: 1.35;
}
.product-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  margin-top: 44px;
  border-radius: 999px;
  font-size: var(--text-body);
  line-height: 1;
  text-decoration: none;
  transition: transform 250ms ease-out;
}
.product-cta:hover {
  transform: scale(1.03);
}
.product-mode #preview-panel {
  min-width: 0;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.product-mode .device-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(280px, 52vh, 480px);
}
#product-poster {
  display: none;
}
.product-mode #product-poster {
  display: block;
  width: 100%;
}
.product-mode #nano-viewer, .product-mode #preview-fallback {
  display: none;
}
.not-found {
  padding-top: 20vh;
}
.list-mode .nano-poster, .product-mode .device-stage, .detail-mode .device-stage {
  view-transition-name: nano-device;
}
::view-transition, ::view-transition-group(*), ::view-transition-image-pair(*),
::view-transition-old(*), ::view-transition-new(*) {
  pointer-events: none;
}
::view-transition-group(nano-device) {
  animation-duration: 750ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
::view-transition-old(nano-device), ::view-transition-new(nano-device) {
  height: 100%;
  object-fit: contain;
}
.detail-mode .product-layout {
  padding-top: var(--page-top);
}

.product-cta, .preview-purchase .preview-buy {
  color: #ff7959;
  font-weight: var(--weight-strong);
  background: radial-gradient(circle, #4a3026 0.55px, transparent 0.8px) 0 0 / 3px 3px, #10100c;
}
/* Solid letters stay legible while a warm highlight sweeps across them. */
@media (forced-colors: none) {
  @supports (background-clip: text) {
    .led-button-label {
      color: transparent;
      background: linear-gradient(105deg, #ff7959 35%, #fff2d0 48%, #ff7959 61%) 140% 0 / 240% 100%;
      background-clip: text;
      animation: led-letter-sweep 3.6s ease-in-out infinite;
    }
  }
}
@keyframes led-letter-sweep {
  0%, 15% { background-position: 140% 0; }
  75%, 100% { background-position: -140% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .led-button-label { animation: none; }
}


.purchase-page {
  max-width: 1040px;
  margin-inline: auto;
  padding-block: var(--page-top) 24px;
}

.purchase-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(24px, 6vw, 72px);
  padding-block: 28px 48px;
}

.purchase-intro h1 { margin: 0; font-size: var(--text-display); font-weight: var(--weight-strong); line-height: 1.1; }
#purchase-poster { width: 100%; margin-top: 32px; }
.order-product-info {
  display: grid;
  gap: 12px;
  margin-block-end: 28px;
}
.order-product-info p {
  margin: 0;
  color: var(--color-muted);
}
.order-product-info [data-order-price] {
  color: var(--color-ink);
  font-size: var(--text-section);
  font-weight: var(--weight-strong);
  line-height: 1.15;
}
.order-availability {
  display: grid;
  gap: 6px;
  padding-block-end: 16px;
  border-block-end: 1px solid var(--color-border-soft);
  font-size: var(--text-label);
}
.order-availability-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}
.order-availability .order-dispatch {
  color: var(--color-ink);
  font-size: var(--text-body);
  font-weight: var(--weight-strong);
}

.mini-order fieldset { margin-bottom: 28px; }
.mini-order fieldset:has(+ .purchase-section) { margin-bottom: 8px; }
.mini-order fieldset + .purchase-section { padding-block-start: 16px; }
.mini-order legend { margin-bottom: 12px; font-size: var(--text-body); font-weight: var(--weight-strong); }
.order-step { width: 22px; height: 14px; fill: currentColor; vertical-align: -1px; shape-rendering: crispEdges; }
.order-colour {
  display: grid;
  position: relative;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.order-colour input { position: absolute; opacity: 0; }
.silver-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #b9bec3;
}
.order-colour input:checked + .silver-swatch { outline: 1px solid var(--color-ink); outline-offset: 4px; }
.order-colour input:focus-visible + .silver-swatch { outline-width: 2px; outline-offset: 7px; }
.order-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-block: 8px;
  cursor: pointer;
}
.order-option:not(:last-child) { border-bottom: 1px solid var(--color-border-soft); }
.order-option input { margin: 0; accent-color: var(--color-ink); }
.order-option :is([data-order-price], .order-option-price) { margin-inline-start: auto; white-space: nowrap; color: var(--color-muted); }
.mini-order .purchase-section h2 { font-size: var(--text-body); }
.mini-order .purchase-section p { color: var(--color-muted); font-size: var(--text-label); }
.order-summary div { display: flex; justify-content: space-between; gap: 12px; padding-block: 8px; }
.order-summary dd { margin: 0; white-space: nowrap; }
.order-summary .order-total { border-top: 1px solid var(--color-border); font-weight: var(--weight-strong); }
.order-bar {
  position: fixed;
  z-index: 3;
  inset: auto 0 0;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.order-bar-inner {
  max-width: 1040px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-bar-inner [role="status"] { display: grid; gap: 2px; font-size: var(--text-label); }
.order-bar-inner strong { font-size: var(--text-section); font-weight: var(--weight-strong); }
.order-bar .product-cta { margin: 0; border: 0; min-height: 44px; white-space: nowrap; }
.order-bar .product-cta:disabled { opacity: .6; transform: none; }

.purchase-section {
  border-top: 1px solid var(--color-border);
  padding-block: 24px;
}

.purchase-section h2 { margin: 0 0 16px; font-size: var(--text-section); font-weight: var(--weight-strong); }

@media (max-width: 767px) {
  .purchase-page { padding-block-start: 8px; }
  .purchase-intro { grid-template-columns: 1fr; gap: 24px; padding-block-start: 12px; }
  #purchase-poster { margin-top: 22px; }
  .order-availability { padding-block-end: 0; border-block-end: 0; }
}

.mini-app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px clamp(20px, 4vw, 48px);
}
.mini-app-grid img { display: block; width: 100%; height: auto; }
.mini-app-grid h3 { margin: 12px 0 4px; font-size: var(--text-body); }
.mini-app-grid p, .mini-settings-list p { margin: 0; color: var(--color-muted); }
.mini-app-note { margin: 20px 0 0; font-size: var(--text-label); color: var(--color-muted); }
.mini-settings-list { margin: 0; }
.mini-settings-list > div { padding-block: 14px; }
.mini-settings-list > div:not(:last-child) { border-bottom: 1px solid var(--color-border-soft); }
.mini-settings-list dt { font-weight: var(--weight-strong); }
.mini-settings-list dd { margin: 4px 0 0; }
.mini-settings-list p + p { margin-top: 8px; }

.purchase-spec-note {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: var(--text-label);
}
.mini-font-samples { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 8px; font-weight: var(--weight-strong); }
.mini-font-serif { font-family: "Just Display Serif HK", serif; }
.mini-font-sans { font-family: "Just Display Sans HK", sans-serif; }

@media (max-width: 767px) {
  .mini-app-grid { grid-template-columns: 1fr; }
}

.purchase-faq details + details { border-top: 1px solid var(--color-border-soft); }
.purchase-faq summary {
  padding-block: 12px;
  cursor: pointer;
  font-weight: var(--weight-strong);
}
.purchase-faq p {
  margin: 0 0 14px;
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .purchase-faq, #mini-settings-title + .mini-settings-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 5vw, 56px);
    align-items: start;
  }
  .purchase-faq details:nth-child(2) { border-top: 0; }
  #mini-settings-title + .mini-settings-list { align-items: stretch; }
  #mini-settings-title + .mini-settings-list > div { border-bottom: 0; }
  #mini-settings-title + .mini-settings-list > div:nth-child(n + 3) {
    border-top: 1px solid var(--color-border-soft);
  }
}
@media (max-width: 767px) {
  :root {
    --page-gutter: calc(100vw / 7);
    --page-top: 48px;
  }
  .list-mode {
    --media-height: calc(var(--device-width) * 608 / 1728);
    --collection-gap: 24px;
  }
  .list-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    margin-top: 8px;
    font-size: var(--text-label);
    line-height: 1.4;
  }
  .list-nav > a, .list-nav > button {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-height);
  }
  .list-mode #devices-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - var(--footer-height));
    padding-block: 24px;
  }
  .list-mode .list-header {
    padding-top: 0;
  }
  #product-nav {
    margin-top: 16px;
  }
  .site-language {
    gap: 0;
    margin-inline: calc(-1 * var(--space-2));
  }
  .site-language button, .list-nav .site-language button {
    padding-inline: var(--space-2);
  }
  .list-header h1 {
    margin-top: 16px;
  }
  .device-gallery {
    padding: 36px 0 0;
  }
  .nano-preview figure {
    height: auto;
  }
  #device-detail {
    --preview-height: calc(100vw * 608 / 1728 + 32px);
    display: flex;
    flex-direction: column;
    padding-bottom: var(--space-5);
  }
  .product-mode #device-detail, .detail-mode #device-detail {
    min-height: calc(100svh - var(--footer-height));
  }
  .detail-top {
    position: relative;
    inset: auto;
    padding-top: 16px;
    margin-bottom: 8px;
  }
  .product-mode .product-layout, .detail-mode .product-layout {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    gap: 0;
    padding: 0;
    margin: 0;
  }
  #preview-panel {
    display: grid;
    flex: 1;
    grid-template-rows: auto auto;
    align-content: center;
  }
  #preview-panel .device-stage {
    align-self: center;
    width: auto;
    margin-block: var(--space-4) var(--space-5);
    margin-inline: calc(16px - var(--page-gutter));
  }
  #preview-panel .device-stage:has(model-viewer[data-mode="rotate"]) {
    height: min(100vw, 60dvh);
  }
  .product-copy {
    align-self: stretch;
  }
  .product-mode .product-layout {
    padding-block-start: var(--space-4);
  }
  .product-mode #preview-panel {
    display: block;
    flex: none;
    align-self: stretch;
    margin-block: auto;
  }
  .product-mode #preview-panel .device-stage {
    height: var(--preview-height);
    margin-block: clamp(var(--space-2), 1.25dvh, var(--space-4));
  }
  .product-finish {
    margin-top: 0;
  }
  .product-summary {
    color: var(--color-muted);
  }
  .product-cta {
    min-height: var(--control-height);
    margin-top: 20px;
  }
  .detail-mode #preview-panel .device-stage { margin-block-end: 0; }
  .detail-mode #simulator-controls {
    gap: 8px;
  }
  .detail-mode .preview-purchase { margin-block-start: 32px; }
  .detail-mode .settings-sections {
    margin-block: var(--space-5) 0;
  }
}


@media (max-width: 767px) and (max-height: 620px) {
  .product-mode #device-detail { --preview-height: calc(100vw * 608 / 1728); }
  .product-mode .product-layout { padding-block-start: 0; }
  .product-mode .product-summary { margin-block-start: 8px; }
  .product-mode .product-cta { margin-block-start: 12px; padding-inline: 14px; }
}

@media (min-width: 768px) and (max-height: 760px) {
  .list-mode { --media-height: clamp(180px, 33svh, 260px); }
  .list-header { padding-block-start: clamp(32px, 7svh, 56px); }
  .device-gallery { padding-block: 20px 24px; }
  .nano-preview figure { min-height: 0; }
  .device-gallery figcaption { margin-top: 28px; }
  .product-mode .product-layout { column-gap: clamp(32px, 6vw, 88px); padding-block-end: 24px; }
  .detail-mode .product-layout { --preview-height: clamp(200px, 39svh, 320px); }
  .detail-mode #simulator-controls .preview-purchase { margin-block-start: 16px; }
}

@media (min-width: 768px) and (max-width: 1023px) and (max-height: 760px) {
  .product-mode #device-detail, .detail-mode #device-detail { --page-top: 132px; }
  .product-mode .product-cta { margin-block-start: 24px; }
}
/* The model and its shadow share the page's white surface. */
.detail-mode {
  min-height: 100svh;
}
.device-stage {
  position: relative;
  width: 100%;
  height: var(--preview-height);
}
.detail-mode .device-stage {
  background: var(--color-surface);
}
#simulator-controls {
  display: grid;
  gap: var(--space-3);
  width: min(100%, 400px);
  margin-inline: auto;
}
#simulator-controls > fieldset {
  margin: 0;
}
#hk-photo-settings {
  justify-self: center;
}
.photo-trigger, .photo-dialog-actions button, .photo-close {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
}
.photo-trigger {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: var(--color-canvas);
}
.photo-dialog {
  box-sizing: border-box;
  width: min(420px, calc(100% - 32px));
  padding: 20px;
  border: 0;
  border-radius: 20px;
  color: var(--color-ink);
  background: var(--color-surface);
  box-shadow: 0 16px 64px #0003;
}
#hk-photo-preview {
  display: block;
  width: 100%;
  max-height: 42dvh;
  object-fit: contain;
  background: #10100c;
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
}
#hk-photo-position { display: block; width: 100%; margin: 8px 0 16px; }
#hk-photo-editor label { display: block; margin-top: 8px; font-size: var(--text-label); }
.photo-dialog::backdrop { background: #0005; }
.photo-dialog header, .photo-dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.photo-dialog header { justify-content: space-between; }
.photo-dialog h2 { margin: 0; font-size: var(--text-body); }
.photo-dialog p { margin: 8px 0 20px; color: var(--color-muted); font-size: var(--text-label); }
.photo-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-canvas);
  font-size: var(--text-section);
}
.photo-dialog-actions { flex-wrap: wrap; }
.photo-dialog-actions button {
  min-height: 44px;
  padding: .5rem .85rem;
  border-radius: 10px;
  background: var(--color-canvas);
}
#hk-photo-view, #hk-photo-view[hidden] + #hk-photo-choose, #hk-photo-apply {
  background: var(--color-ink);
  color: var(--color-surface);
}
.photo-dialog-actions button:disabled { opacity: .45; cursor: default; }
@media (max-width: 600px) {
  .photo-dialog {
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  --poster-color: transparent;
}
#nano-viewer::part(default-progress-bar) {
  display: none;
}
#preview-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
model-viewer[data-mode="operate"] {
  cursor: pointer;
  touch-action: pan-y pinch-zoom;
}
.preview-modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
}
.preview-modes button {
  white-space: nowrap;
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  color: var(--color-muted);
  font-weight: var(--weight-regular);
}
.preview-modes button[aria-pressed="true"] {
  color: var(--color-ink);
  font-weight: var(--weight-strong);
}
.preview-modes button:enabled, .screen-actions button:enabled {
  cursor: pointer;
}
.preview-status, .preview-help {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-label);
  line-height: 1.5;
  text-align: center;
}
.preview-actions {
  display: contents;
}
.preview-actions a {
  justify-self: center;
  padding: var(--space-2);
}
.screen-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.screen-actions button {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
}
.screen-actions button[aria-pressed="true"] {
  box-shadow: inset 0 -2px var(--color-ink);
}
.screen-actions button:disabled {
  color: var(--color-subtle);
}
/* Price and HK LED purchase button below the public simulator. */
.preview-purchase {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 40px);
  padding: 8px 8px 8px 24px;
  border-radius: 999px;
  background: var(--color-canvas);
}
.demo-mode .preview-purchase { display: none; }
.preview-price { color: var(--color-ink); font-weight: var(--weight-strong); }
.preview-buy {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  opacity: 1;
}

/* Native settings disclosures; no separate legacy settings theme. */
.settings-sections {
  margin: var(--space-6) 0 64px;
}
.settings-sections details {
  border-bottom: 1px solid var(--color-border);
}
.settings-sections summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: var(--space-4) 0;
  list-style: none;
  cursor: pointer;
  font-size: var(--text-body);
}
summary::-webkit-details-marker {
  display: none;
}
.settings-sections summary > span:first-child {
  color: var(--color-muted);
  font-size: var(--text-label);
}
.summary-mark {
  margin-left: auto;
  margin-right: 5px;
  font-size: var(--text-section);
  line-height: 1;
}
details[open] .summary-mark {
  transform: rotate(45deg);
}
.section-help {
  margin: 0 0 var(--space-4);
  color: var(--color-muted);
  font-size: var(--text-label);
}
.specs {
  margin: 0 0 26px;
}
.specs > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--control-height);
  padding-block: 6px;
  border-top: 1px solid var(--color-border-soft);
  font-size: var(--text-label);
}
.specs dt, .specs dd {
  margin: 0;
}
.specs dd {
  color: var(--color-muted);
}
fieldset {
  min-width: 0;
  padding: 0;
  margin: 0 0 var(--space-5);
  border: 0;
}

/* Responsive geometry and motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .product-cta {
    transition: none;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) {
    animation: none;
  }
}

@media (min-width: 768px) {
  .detail-mode #simulator-controls { margin-block-start: 8px; }
  .detail-mode .preview-purchase { margin-block-start: 40px; }
}

/* Retained internal 1:1 preview. Its public control is hidden. */
/* Calibrated screen preview preserves physical size instead of fitting to the viewport. */
.actual-size-dialog[open] {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border: 0;
  color: #f4f4f4;
  background: #080808;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}
.actual-size-dialog::backdrop { background: #080808; }
.actual-size-dialog header { position: sticky; top: 0; z-index: 1; flex-shrink: 0; background: #080808; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.actual-size-dialog h2 { margin: 0; font-size: var(--text-body); font-weight: var(--weight-strong); }
.actual-size-dialog button { min-height: 44px; border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }
#actual-size-close { width: 44px; padding: 0; font-size: var(--text-section); color: #fff; background: #292929; }
.actual-size-stage { display: flex; flex: 1; min-height: 100px; overflow: auto; }
#actual-size-wrapper { position: relative; flex: none; margin: auto; }
#actual-size-face { position: absolute; left: 50%; top: 50%; transform-origin: center; touch-action: none; }
#actual-size-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
#actual-size-controls { position: absolute; inset: 0; }
#actual-size-controls button { position: absolute; padding: 0; min-height: 0; border-radius: 0; background: transparent; }
#actual-size-controls button:focus-visible { outline: 2px solid #ffb668; outline-offset: -2px; }
.actual-size-dialog footer { max-width: 680px; width: 100%; align-self: center; font-size: var(--text-label); line-height: 1.5; }
.actual-size-dialog p { margin: 0 0 6px; }
#actual-size-status { font-size: var(--text-label); font-weight: var(--weight-strong); color: #fff; }
#actual-size-turn { background: #fff; color: #111; margin-top: 12px; min-width: 140px; }
@media (max-height: 450px) {
  .actual-size-dialog[open] { padding-block: 8px; gap: 8px; }
}

.order-summary dd del { margin-inline-end: 0.5em; color: var(--color-muted); }

.purchase-dimensions { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto 24px; }

.order-confirmation {
  max-width: 40rem;
  margin-inline: auto;
  padding: clamp(32px, 8vw, 96px) 20px;
  overflow-wrap: anywhere;
}
.order-confirmation h1 { margin-block: 32px 16px; }
.order-confirmation p { line-height: 1.6; }
.order-confirmation #confirmation-order {
  padding-block: 16px;
  border-block: 1px solid #d6dce1;
}
.order-confirmation > a:last-child { display: inline-block; margin-top: 20px; }
