/* 选配与加购（11-30 网页线，离线样子）：在 site.css、pages.css 之上只加这一页自己的东西。
   版式：01 选配（近白）左边选项、右边合计（电脑上跟着滚动停住）；02 填写信息（灰）；03 生成选配单（深色，生成后才出现）。
   选项一行一条，跟产品页「套件内容」同一种细线分隔；勾选框是 2px 方框（像素窗口的意思），选中填黑；价格用等宽字。
   手机：合计挪到底部一条固定栏，看得见填写信息或选配单时收起。 */

/* ---------- 补字 开始（tools/subset_extra_fonts.py 生成，别手改） ----------
   线上的字体子集里没有这几十个字，用同名字体家族 + unicode-range 叠一个只装缺字的小文件；别的字照旧用 site.css 里那份。 */
@font-face { font-family: 'XY Sans'; src: url('../fonts/xy-extra-sans.woff2?v=20261203b') format('woff2'); font-weight: 300 500; font-display: block; unicode-range: U+A5, U+1CE, U+2013, U+201D, U+2033, U+300B, U+300F-3011, U+4E14, U+4E3E, U+4E70, U+4E8C, U+4EC5, U+4ECD, U+4ED8, U+4EE4, U+4EEC, U+4EFD, U+4F69, U+4FDD, U+5145, U+514D, U+516D, U+517C, U+518C, U+5212, U+521A, U+5237, U+52A9, U+52FE, U+5370, U+53C9, U+53D6, U+542B-542C, U+5440, U+5458, U+54A8, U+5524, U+5747, U+574F, U+57FA, U+5851, U+589E, U+58C1, U+5929, U+5931, U+59CB, U+59D3, U+5B54, U+5B66, U+5B98, U+5B9D, U+5BC4, U+5BC6, U+5BDF, U+5C3E, U+5DF4, U+5E02, U+5E2E, U+5FC5, U+6025, U+606F, U+6263, U+627E-627F, U+62A4-62A5, U+62C5-62C6, U+635F, U+6454, U+6599, U+65E5, U+65EC, U+6635, U+66FF, U+671F, U+6743, U+6750, U+6811, U+6838, U+68C0, U+6B65, U+6C34, U+6C42, U+6C60, U+6D88, U+6E90, U+6EDA, U+6F06, U+6F2B, U+7070, U+70C1, U+7259, U+72AC, U+73AF, U+767B, U+76CA, U+76D2, U+76D6, U+76EE, U+7701, U+77E5, U+786E, U+78F7, U+79C1, U+7A9D, U+7ACB, U+7B97, U+7C98, U+7EB8, U+7EC8, U+7EDC, U+7EF4, U+7F3A, U+8017, U+804A, U+8102, U+81F3, U+827A, U+82F9, U+8303, U+8702, U+8865, U+886C, U+88C1-88C2, U+89C2, U+8BA2, U+8BCD, U+8BE5, U+8D25, U+8D27-8D28, U+8D39, U+8D60, U+8F93, U+8FD0, U+8FD4, U+9000, U+9020, U+903E, U+9178, U+91D1, U+949F, U+94C1, U+9501-9502, U+95EA, U+9664, U+9759, U+975E, U+989D, U+9AA4; }
@font-face { font-family: 'XY Pixel'; src: url('../fonts/xy-extra-pixel.woff2?v=20261203b') format('woff2'); font-display: block; unicode-range: U+A5, U+201D, U+300B, U+300F-3011, U+4E14, U+4E70, U+4EC5, U+4ED8, U+4EFD, U+514D, U+516D, U+518C, U+5237, U+5370, U+5458, U+54A8, U+574F, U+5929, U+59CB, U+59D3, U+5B98, U+5BC4, U+5C3E, U+5E02, U+5FC5, U+6263, U+627F, U+62A4-62A5, U+62C5, U+635F, U+6454, U+65EC, U+6635, U+66FF, U+6743, U+6750, U+6811, U+6838, U+6C34, U+6C42, U+6F06, U+7070, U+73AF, U+767B, U+76CA, U+7701, U+77E5, U+79C1, U+7C98, U+7EB8, U+7EC8, U+7F3A, U+804A, U+8102, U+827A, U+8303, U+8865, U+886C, U+88C1-88C2, U+8BA2, U+8D27-8D28, U+8D39, U+8D60, U+8FD0, U+8FD4, U+9020, U+903E, U+91D1, U+975E, U+989D; }
@font-face { font-family: 'XY Mono'; src: url('../fonts/xy-extra-pixel.woff2?v=20261203b') format('woff2'); size-adjust: 109.0909%; font-display: block; unicode-range: U+300B, U+300F-3011, U+4E14, U+4E70, U+4EC5, U+4ED8, U+4EFD, U+514D, U+516D, U+518C, U+5237, U+5370, U+5458, U+54A8, U+574F, U+5929, U+59CB, U+59D3, U+5B98, U+5BC4, U+5C3E, U+5E02, U+5FC5, U+6263, U+627F, U+62A4-62A5, U+62C5, U+635F, U+6454, U+65EC, U+6635, U+66FF, U+6743, U+6750, U+6811, U+6838, U+6C34, U+6C42, U+6F06, U+7070, U+73AF, U+767B, U+76CA, U+7701, U+77E5, U+79C1, U+7C98, U+7EB8, U+7EC8, U+7F3A, U+804A, U+8102, U+827A, U+8303, U+8865, U+886C, U+88C1-88C2, U+8BA2, U+8D27-8D28, U+8D39, U+8D60, U+8FD0, U+8FD4, U+9020, U+903E, U+91D1, U+975E, U+989D; }
/* ---------- 补字 结束 ---------- */

.opt-local { display: inline-block; padding: calc(4px * var(--u)) calc(10px * var(--u)); color: #333333; box-shadow: inset 0 0 0 1px #8a8a8a; }

/* ---------- 01 选配 ---------- */
.opt-main { grid-column: 1 / 8; min-width: 0; }
.opt-side { grid-column: 9 / 13; min-width: 0; }
.opt-grp { border: 0; margin: 0 0 calc(40px * var(--uf)); padding: 0; min-width: 0; }
.opt-grp:last-child { margin-bottom: 0; }
.opt-h { display: flex; align-items: baseline; gap: calc(12px * var(--u)); margin-bottom: calc(6px * var(--uf)); padding: 0; font-size: calc(19px * var(--uf)); line-height: 1.5; font-weight: 500; color: var(--ink); }
.opt-h .mono { color: var(--ink-3); }

.opt-row { position: relative; display: grid; grid-template-columns: calc(22px * var(--u)) minmax(0, 1fr) auto; column-gap: calc(16px * var(--u)); align-items: start;
  padding: calc(18px * var(--uf)) 0; border-top: 1px solid var(--line); cursor: pointer; }
.opt-grp > div > .opt-row:last-child, .opt-cust:last-child { border-bottom: 1px solid var(--line); }
.opt-cust > .opt-row { border-bottom: 0; }
.opt-fixed { cursor: default; }
.opt-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt-box { position: relative; width: calc(22px * var(--u)); height: calc(22px * var(--u)); margin-top: calc(3px * var(--uf)); background: #ffffff; box-shadow: inset 0 0 0 var(--ps) var(--ink); }
.opt-box::after { content: ""; position: absolute; inset: calc(6px * var(--u)); background: var(--ink); transform: scale(0); transition: transform var(--t-hover) var(--ease); }
input:checked + .opt-box::after, .opt-box.on::after { transform: none; }
/* 二选一（面罩）用圆框，跟可多选的方框分开 */
input[type=radio] + .opt-box, input[type=radio] + .opt-box::after { border-radius: 50%; }
.opt-box.on { box-shadow: inset 0 0 0 var(--ps) var(--ink-3); }
.opt-box.on::after { background: var(--ink-3); }
input:focus-visible + .opt-box { outline: 2px solid var(--ink); outline-offset: 3px; }
.opt-row:hover .opt-box:not(.on) { background: #eeeeee; }
.opt-t { min-width: 0; }
.opt-t b { display: block; font-weight: 500; color: var(--ink); font-size: calc(17px * var(--uf)); line-height: 1.55; }
.opt-t span { display: block; margin-top: 2px; color: var(--ink-body); font-size: calc(14px * var(--uf)); line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.opt-p { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: calc(3px * var(--uf)); font-size: calc(14px * var(--u)); line-height: 1.4; color: var(--ink); white-space: nowrap; }
.opt-p i { font-style: normal; }
.opt-p .draft { padding: 0 calc(5px * var(--u)); font-size: calc(11px * var(--u)); color: #4a4a4a; box-shadow: inset 0 0 0 1px #8a8a8a; }
.opt-p .tbd { color: #5c5c5c; }
.opt-p .lbl { font-size: calc(11px * var(--u)); color: #4a4a4a; }
/* 面罩：单独购买（只展示）、首批权益；两种面罩的区别说明（以后放照片和对比图，空着时是一行虚线框的说明） */
.opt-t .opt-solo { margin-top: calc(6px * var(--uf)); font-size: calc(13px * var(--uf)); color: #5c5c5c; }
.opt-t .opt-perk { margin-top: calc(10px * var(--uf)); padding: calc(10px * var(--u)) calc(12px * var(--u)); font-size: calc(13px * var(--uf)); line-height: 1.7; color: var(--ink-body); background: #f0f0f0; border-left: 2px solid var(--ink); }
.opt-perk em { display: block; margin-bottom: 2px; font-style: normal; font-weight: 500; color: var(--ink); }
.opt-compare { margin-top: calc(14px * var(--uf)); }
.opt-compare img { display: block; max-width: 100%; height: auto; }
.opt-compare.empty { padding: calc(14px * var(--u)) calc(16px * var(--u)); font-size: calc(13px * var(--uf)); color: #5c5c5c; border: 1px dashed #a3a3a3; }
/* 耳灯下面的首批赠送、发货说法；付款与发货（12-03）：跟选项同一种细线，左边小标题、右边说明，手机上叠成上下两行 */
.opt-info { margin-top: calc(14px * var(--uf)); padding: calc(12px * var(--u)) calc(14px * var(--u)); font-size: calc(13px * var(--uf)); line-height: 1.7; color: var(--ink-body); background: #f0f0f0; }
.opt-info p + p { margin-top: calc(8px * var(--uf)); }
.opt-info em { display: block; font-style: normal; font-weight: 500; color: var(--ink); }
.opt-pay { margin: 0; }
.opt-pay > div { display: grid; grid-template-columns: calc(110px * var(--u)) minmax(0, 1fr); column-gap: calc(16px * var(--u)); padding: calc(13px * var(--uf)) 0; border-top: 1px solid var(--line); }
.opt-pay > div:last-child { border-bottom: 1px solid var(--line); }
.opt-pay dt { font-weight: 500; color: var(--ink); font-size: calc(14px * var(--uf)); line-height: 1.65; }
.opt-pay dd { margin: 0; color: var(--ink-body); font-size: calc(14px * var(--uf)); line-height: 1.65; }
.opt-more { margin-top: calc(12px * var(--uf)); font-size: calc(14px * var(--uf)); line-height: 1.65; color: var(--ink-body); }
.opt-more a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.opt-cust-note { display: block; margin: 0 0 calc(18px * var(--uf)) calc(38px * var(--u)); }

/* 合计卡：白底 2px 框（像素窗口的小号），电脑上跟着滚动停在右边 */
.opt-sum { position: sticky; top: calc(24px * var(--uf)); padding: calc(22px * var(--u)) calc(22px * var(--u)) calc(24px * var(--u)); background: #ffffff; box-shadow: inset 0 0 0 var(--ps) var(--ink); }
.opt-sum-h { color: var(--ink-3); }
.opt-lines { list-style: none; margin: calc(12px * var(--u)) 0 0; padding: 0; }
.opt-lines li { display: flex; justify-content: space-between; gap: 12px; padding: calc(6px * var(--u)) 0; font-size: calc(14px * var(--uf)); line-height: 1.5; color: var(--ink-body); border-bottom: 1px dashed #c8c8c8; }
.opt-lines li .mono { font-size: calc(13px * var(--u)); color: var(--ink); white-space: nowrap; }
.opt-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: calc(14px * var(--u)); font-weight: 500; }
.opt-total b { font-family: 'XY Mono', monospace; font-weight: 400; font-size: calc(30px * var(--u)); line-height: 1.2; letter-spacing: .02em; }
.opt-notes { margin-top: calc(10px * var(--u)); font-size: calc(13px * var(--uf)); line-height: 1.65; color: #5c5c5c; }
.opt-notes:empty { display: none; }
.opt-next { margin-top: calc(18px * var(--u)); }

/* ---------- 02 填写信息 ---------- */
.opt-form { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(18px * var(--uf)) var(--G); }
.opt-form-lead, .fld-wide, .opt-go { grid-column: 1 / -1; }
.opt-form-lead { color: var(--ink-body); font-size: calc(14px * var(--uf)); }
.opt-form em, .fld-l em { font-style: normal; color: #b3261e; }
.fld { display: block; min-width: 0; }
.fld-l { display: block; margin-bottom: 6px; font-size: calc(14px * var(--uf)); color: var(--ink); }
.fld input, .fld textarea { display: block; width: 100%; min-height: 48px; padding: 11px 14px; font: 16px/1.5 'XY Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif; color: var(--ink);
  background: #ffffff; border: 0; border-radius: 0; box-shadow: inset 0 0 0 1px #8a8a8a; outline: 0; resize: vertical; -webkit-appearance: none; appearance: none; }
.fld input:focus, .fld textarea:focus { box-shadow: inset 0 0 0 var(--ps) var(--ink); }
.fld input::placeholder, .fld textarea::placeholder { color: #8a8a8a; }
.fld-e { display: block; min-height: 0; font-size: 13px; line-height: 1.5; color: #b3261e; }
.fld.bad input, .fld.bad textarea { box-shadow: inset 0 0 0 var(--ps) #b3261e; }
.fld.bad .fld-e { margin-top: 6px; }
.opt-keep { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }   /* 记住以上信息（12-03）：跟选项同一种方框 */
.opt-go { margin-top: calc(8px * var(--uf)); }

/* ---------- 03 选配单（深色） ---------- */
.opt-out { grid-column: 1 / -1; min-width: 0; }
.opt-out-lead { max-width: 40em; color: #c8c8c8; }
.opt-out-btns { display: flex; flex-wrap: wrap; gap: calc(16px * var(--u)); margin-top: calc(24px * var(--uf)); }
.opt-out-hint { margin-top: calc(14px * var(--u)); color: #a8a8a8; }
.opt-out-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(24px * var(--uf)) var(--G); margin-top: calc(28px * var(--uf)); align-items: start; }
.opt-text { margin: 0; padding: calc(20px * var(--u)); max-height: 70vh; overflow: auto; font: 13px/1.75 'XY Mono', ui-monospace, Consolas, monospace; color: #e8e8e8; white-space: pre-wrap; word-break: break-all;
  background: #16171a; box-shadow: inset 0 0 0 1px #3a3c40; user-select: text; -webkit-user-select: text; }
.opt-img { margin: 0; scroll-margin-top: calc(80px * var(--u)); }
.opt-img figcaption { display: none; padding: 12px 16px; background: #fff; color: #111; font-weight: 500; text-align: center; }   /* 手机上才出：网页的下载进不了相册，要长按 */
#result.touch .opt-img figcaption { display: block; }
.opt-img img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 1px #3a3c40; }
#result.stale .opt-out-grid { opacity: .35; }
#result.stale .opt-out-btns { opacity: .35; pointer-events: none; }
#result.stale .opt-out-hint { color: #ffb030; }

/* ---------- 手机底栏 ---------- */
.opt-bar { display: none; }

@media (max-width: 1100px) {
  .opt-main { grid-column: 1 / 9; }
  .opt-side { grid-column: 9 / 13; }
  .opt-form { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .opt-main, .opt-side, .opt-form { grid-column: 1 / -1; }
  .opt-side { margin-top: calc(40px * var(--uf)); }
  .opt-sum { position: static; }
  .opt-form { grid-template-columns: minmax(0, 1fr); }
  .opt-out-grid { grid-template-columns: minmax(0, 1fr); }
  .opt-text { max-height: none; }
  .opt-row { column-gap: 14px; }
  .opt-cust-note { margin-left: 36px; }
  .opt-pay > div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .opt-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px var(--M) calc(12px + env(safe-area-inset-bottom));
    color: #f0f0f0; background: #0e0f10; box-shadow: 0 -1px 0 #3a3c40; transition: transform var(--t-hover) var(--ease); }
  .opt-bar .mono { color: #a8a8a8; }
  .opt-bar b { font-family: 'XY Mono', monospace; font-weight: 400; font-size: 22px; letter-spacing: .02em; }
  .opt-bar a { margin-left: auto; padding: 8px 16px; font-size: 15px; color: #0e0f10; background: #f0f0f0; }
  .opt-bar.away { transform: translateY(110%); }
  body { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .opt-box::after, .opt-bar { transition: none; }
}
