/* 选配页按小程序横屏画布 844x390 等比缩放。网页居中留边，小程序铺满 WebView。 */
@font-face {
  font-family: "remixicon";
  src: url("./assets/vendor/remixicon/remixicon.woff2") format("woff2");
  font-display: block;
}
:root {
  --选配金: #c5914f;
  --选配墨: #292725;
  --画布宽: 844;
  --画布高: 390;
  --底栏占位: 36%;
  --确认栏高: 48%;
  --安全左: env(safe-area-inset-left, 0px);
  --安全右: env(safe-area-inset-right, 0px);
  --安全上: env(safe-area-inset-top, 0px);
  --安全下: env(safe-area-inset-bottom, 0px);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--选配墨);
  background: #161412;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; letter-spacing: 0; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #161412; }
button, input, select { font: inherit; color: inherit; }
button { padding: 0; cursor: pointer; border: 0; touch-action: manipulation; }
button:focus-visible, [role="button"]:focus-visible { outline: 2px solid #986321; outline-offset: -2px; }
button:disabled { cursor: default; opacity: .4; }
button:active:not(:disabled) { filter: brightness(.96); }
img { display: block; }
[hidden], .home-screen, .submit-success-screen { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.selection-icon { display: inline-block; flex: none; font-family: "remixicon"; font-style: normal; font-weight: 400; line-height: 1; }
.icon-back::before { content: "\ea60"; }
.icon-close::before { content: "\eb99"; }
.icon-front::before { content: "\f2f5"; }
.icon-side::before { content: "\ee1d"; }
.icon-detail::before { content: "\f0d1"; }
.icon-picker-toggle::before { content: "\ea4e"; }

.app-shell { position: relative; width: 100%; height: var(--app-viewport-height, 100dvh); overflow: hidden; }
.app-shell.is-home { background: #fff; }
.app-shell:not(.is-home) {
  display: grid;
  place-items: center;
  background: #161412;
}

#app {
  --选配画布宽: min(100%, calc(var(--app-viewport-height, 100dvh) * 844 / 390));
  grid-area: 1 / 1;
  position: relative;
  width: var(--选配画布宽);
  aspect-ratio: 844 / 390;
  height: auto;
  max-height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #111;
  container-type: size;
  container-name: 选配画布;
}
html.is-wxapp-webview .app-shell:not(.is-home) { display: block; background: #111; }
html.is-wxapp-webview #app {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}

.media-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; cursor: zoom-in; }
.media-stage > img, .image-overlay-stack, .image-overlay-stack > img,
.view-switch-snapshot, .view-switch-snapshot > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  user-select: none; -webkit-user-drag: none;
}
.image-overlay-stack { z-index: 2; pointer-events: none; }
.scene-base-image, .preview-base-image { z-index: 1; }
.scene-overlay-image, .preview-overlay-image { display: none; }
.scene-image, .preview-image { opacity: 0; }
.scene-image.is-ready, .preview-image.is-ready { opacity: 1; }
.is-empty { visibility: hidden; }
.png-reveal-clone, .png-reveal-previous { pointer-events: none; }
.view-switch-snapshot { z-index: 8; pointer-events: none; opacity: 1; transition: opacity 320ms ease; }
.view-switch-snapshot.is-leaving { opacity: 0; }
.media-stage.is-loading::after { content: ""; position: absolute; z-index: 10; top: 0; left: 0; width: 100%; height: 2px; background: var(--选配金); animation: 图片加载 1s ease-in-out infinite; }
@keyframes 图片加载 { 50% { opacity: .2; } }

#app .main-grid { position: absolute; inset: 0; }
#app .effect-panel { position: absolute; inset: 0; }
#app .preview-stage {
  position: absolute;
  inset: 0;
  background: #111;
}
#app .preview-stage > img,
#app .preview-stage .image-overlay-stack > img,
#app .preview-stage .view-switch-snapshot,
#app .preview-stage .view-switch-snapshot > img {
  object-fit: cover;
  object-position: center;
}
#app .effect-caption, #app .effect-panel > .section-heading, #app .panel-corner,
#app .brand-title, #app .house-label, #app .disclaimer { display: none; }

#app > .topbar {
  position: absolute; z-index: 6;
  top: 3.6cqh; left: 1.6cqw;
  display: flex; align-items: center; gap: 1.1cqw;
  pointer-events: none;
}
#app .home-back-button {
  order: -1; width: 7.2cqh; height: 7.2cqh;
  display: grid; place-items: center;
  border-radius: 50%; color: var(--选配金); background: #fff;
  box-shadow: 0 0.6cqh 2cqh #00000018;
  pointer-events: auto;
}
#app .home-back-button .selection-icon { font-size: 3.8cqh; }
#app .home-back-icon { display: none; }
#app .house-control { width: 24cqw; min-width: 0; max-width: none; pointer-events: auto; }
#app .house-tabs {
  height: 7.2cqh; padding: 0.6cqh;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5cqw; border-radius: 999px; background: #fffffff2;
}
#app .house-tab { min-width: 0; border-radius: 999px; background: #fff; font-size: 2.8cqh; font-weight: 600; }
#app .house-tab.is-active { background: var(--选配金); color: white; }

#app .bird-panel {
  position: absolute; z-index: 5;
  top: 3.6cqh; right: 1.5cqw;
  width: 21.6cqw; min-width: 0; max-width: none; height: auto;
  display: grid; grid-template-rows: auto auto;
  gap: 1cqh; padding: 1cqw;
  border-radius: 1.6cqw; background: var(--鸟瞰卡片色, #efefee);
  overflow: hidden; box-shadow: 0 1.2cqh 3cqh #00000024;
}
#app .bird-panel > .section-heading { display: none; }
#app .bird-panel > .section-heading span { display: none; }
#app .bird-panel > .section-heading strong { font-size: 2.2cqh; font-weight: 700; line-height: 1; }
#app .scene-stage {
  grid-row: 1; width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: var(--鸟瞰卡片色, #f3f2ef); border-radius: 1.1cqw;
}
#app .bird-tabs {
  grid-row: 2; height: 4.6cqh;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5cqw;
}
#app .bird-tab {
  display: flex; align-items: center; justify-content: center;
  min-width: 0; min-height: 0; height: 100%;
  border-radius: 999px; background: #f6f4f0;
  font-size: 2.1cqh; font-weight: 600; line-height: 1;
}
#app .bird-tab.is-active { background: var(--选配金); color: white; }

#app .view-tabs {
  position: absolute; z-index: 5;
  top: auto; right: 1.5cqw; bottom: calc(var(--底栏占位) + 2.4cqh);
  width: 21.6cqw; min-width: 0; height: 5.4cqh; padding: 0.5cqh;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #fffffff2; border-radius: 999px;
  box-shadow: 0 0.8cqh 2cqh #00000018;
  transition: bottom 320ms cubic-bezier(.22, 1, .36, 1);
}
#app.is-picker-hidden .view-tabs { bottom: 14.4cqh; }
#app .view-tab {
  display: flex; align-items: center; justify-content: center;
  gap: 0.4cqw; min-width: 0; background: transparent;
  border-right: 1px solid #efeae3; font-size: 2.2cqh; font-weight: 600;
}
#app .view-tab:last-child { border: 0; }
#app .view-tab .selection-icon { font-size: 2.5cqh; color: #b69a75; }
#app .view-tab.is-active { background: var(--选配金); color: white; border-radius: 999px; }
#app .view-tab.is-active .selection-icon { color: white; }

#app > .bottom-panel {
  position: absolute; z-index: 6;
  left: 1.4cqw; right: 1.4cqw; bottom: 2.2cqh;
  height: calc(var(--底栏占位) - 3.2cqh);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 1cqh 1.7cqw 1.4cqh;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 2.2cqw;
  box-shadow: 0 1cqh 2.8cqh #00000018;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 320ms cubic-bezier(.22, 1, .36, 1);
}
#app.is-picker-hidden > .bottom-panel {
  transform: translateY(calc(100% - 10.4cqh));
}
#app .bottom-toolbar {
  position: absolute; top: 1cqh; right: 1.5cqw; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end;
  width: auto; min-width: 0; pointer-events: none;
}
#app .bottom-heading { display: none; }
#app .picker-toggle {
  pointer-events: auto; flex: none; height: 6.8cqh; padding: 0 1.3cqw;
  display: inline-flex; align-items: center; gap: 0.4cqw;
  border-radius: 999px; background: #f6f3ee; color: #7a7268;
  font-size: 2.3cqh; font-weight: 600;
}
#app .picker-toggle .selection-icon { font-size: 2.9cqh; transition: transform 280ms ease; }
#app.is-picker-hidden .picker-toggle .selection-icon { transform: rotate(180deg); }
#app .bottom-heading {
  display: flex; align-items: baseline; gap: 1cqw;
  min-width: 0; color: #2b2724;
}
#app .bottom-heading strong { font-size: 2.8cqh; font-weight: 700; line-height: 1.15; white-space: nowrap; }
#app .bottom-heading span {
  display: inline; color: #9a938a; font-size: 2cqh; font-weight: 400; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#app .bottom-heading em { display: none; }
#app .content-switcher, #pointCards { min-width: 0; min-height: 0; }
#pointCards {
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  gap: 1.1cqh; width: 100%; height: 100%;
}
#app .point-tabs {
  display: flex; width: calc(100% - 8.6cqw); min-width: 0; height: 6.8cqh;
  align-items: center; gap: 0.5cqw;
  overflow: hidden; scrollbar-width: none;
}
#app .point-tabs::before {
  content: "颜色 / 款式选择";
  flex: none;
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0 0.55cqw 0 0.15cqw;
  color: #2b2724;
  font-size: 2.55cqh;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
#app .point-tabs::-webkit-scrollbar { display: none; }
#app .point-card {
  flex: 1 1 0; min-width: 0; height: 100%;
  padding: 0 0.7cqw;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid #eeeae4; border-radius: 999px; background: #fff;
  box-shadow: 0 0.3cqh 0.8cqh #00000008; cursor: pointer;
}
#app .point-card:nth-of-type(1) {
  flex: 1.38 1 0;
  padding: 0 0.95cqw;
}
#app .point-card-header {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-width: 0;
}
#app .point-card h3 {
  display: flex; align-items: center; justify-content: center; gap: 0.32cqw;
  min-width: 0; margin: 0; white-space: nowrap;
  font-size: 2.55cqh; line-height: 1; font-weight: 700;
}
#app .point-number {
  flex: none; display: inline-grid; place-items: center;
  width: 3.5cqh; height: 3.5cqh; border-radius: 50%;
  background: #d8b78d; color: #fff; font-size: 2.15cqh; font-weight: 700;
}
#app .point-card.is-active { color: #fff; border-color: var(--选配金); background: var(--选配金); }
#app .point-card.is-active .point-number { background: #fff; color: var(--选配金); }
#app .desktop-active-styles {
  width: calc(100% - 22cqw); height: 100%; min-height: 0;
  margin: 0; display: flex; justify-content: flex-start; align-items: end;
  overflow: hidden;
}
#app .mobile-style-list {
  display: flex; justify-content: flex-start; align-items: flex-end;
  gap: 1cqw; width: 100%; max-width: 100%; height: 100%;
  overflow: hidden;
}
#app .style-pill {
  display: grid; grid-template-rows: minmax(0, 1fr) 2.1cqh;
  justify-items: center; align-content: stretch;
  gap: 0.4cqh; width: 14.5cqw; max-width: 32%; height: 100%;
  flex: 0 1 auto; min-width: 0; border: 0; background: none;
}
#app .style-thumb {
  position: relative; width: 100%; height: auto; max-height: 100%;
  aspect-ratio: 16 / 9; min-height: 0; overflow: hidden;
  border: 1px solid #e6dfd7; border-radius: 1cqw;
}
#app .style-thumb img { width: 100%; height: 100%; object-fit: cover; }
#app .style-pill.is-active .style-thumb { border: 2px solid var(--选配金); }
#app .style-pill.is-active .style-thumb::after {
  content: "\eb7b"; font-family: "remixicon";
  position: absolute; right: 0; bottom: 0;
  width: 3.2cqw; height: 2.6cqh;
  display: grid; place-items: center;
  border-radius: 0.8cqw 0 0 0; font-size: 2cqh;
  background: var(--选配金); color: white;
}
#app .style-pill strong {
  display: block; width: 100%; align-self: start;
  font-size: 2cqh; font-weight: 600; line-height: 1.1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center;
}
#app .style-price, #app .active-style-section-head, #app .mobile-active-title, #app .current-style, #app .style-pills { display: none; }
#app .checkout-panel {
  position: absolute; right: 1.7cqw; bottom: 2.2cqh;
  width: 18.5cqw; height: 7.6cqh;
}
#app .confirm-button {
  width: 100%; height: 100%;
  border-radius: 1.1cqw;
  background: linear-gradient(110deg, #c99758, #cf9c5a);
  color: white; font-size: 2.6cqh; font-weight: 600;
  box-shadow: 0 0.8cqh 2cqh #c5914f24;
}

body.is-submit-open #app > .bottom-panel { visibility: visible; pointer-events: none; transform: translateY(110%); }
body.is-submit-open #app .bird-panel { width: 21.6cqw; }

.app-shell:not(.is-home) > #submitModal {
  grid-area: 1 / 1;
  position: relative;
  inset: auto;
  align-self: end;
  justify-self: center;
  z-index: 20;
  width: min(97.2%, calc(var(--app-viewport-height, 100dvh) * 844 / 390 * 0.972));
  height: calc(min(100%, var(--app-viewport-height, 100dvh)) * 0.48);
  max-height: 52%;
  margin: 0 0 1.2% 0;
  padding: 1.2% 1.4% 1.1%;
  border: 0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px #00000018;
  overflow: hidden;
}
html.is-wxapp-webview .app-shell:not(.is-home) > #submitModal {
  position: absolute;
  left: 1.4%;
  right: 1.4%;
  bottom: 2.2%;
  width: auto;
  height: 48%;
  max-height: none;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .view-switch-snapshot { transition: none; }
  .media-stage.is-loading::after { animation: none; }
  #app > .bottom-panel, #app .picker-toggle .selection-icon, #app .view-tabs, #submitModal { transition: none; }
}
