/* Build Your Box (麦麦配箱), /build-your-box/. Owner: 麦麦前端. Ported from the approved prototype (STRATEGY_AND_PLANS/麦麦原型, boss 11/16).
   Every class starts with mm- and every token lives on .mm, so nothing here touches the rest of the site. */
.mm {
  --bg: #F3F6FA; --surface: #FFFFFF; --ink: #172D49; --ink-2: #41556F; --line: #D5DEEA;
  --blue: #174DE3; --blue-ink: #FFFFFF; --sky: #DCEBFF; --citrine: #E8F26A; --citrine-ink: #172D49;
  --kraft: #DDB173; --kraft-2: #C79852; --kraft-in: #8C6233; --kraft-text: #4E3212; --good: #17845A; --warn: #B4620B;
  --shadow: 0 10px 30px rgba(23,45,73,.12);
  --r-lg: 24px; --r-md: 16px; --r-sm: 10px; --mm-top: 64px;
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: var(--fs-body, 16px); line-height: 1.5; overflow-x: clip; -webkit-tap-highlight-color: transparent;
}
.mm [hidden] { display: none !important; }
.page-maimai .contact-rail { display: none; }
html.mm-locked { overflow: hidden; }

:where(.mm) * { box-sizing: border-box; }
:where(.mm) h1, :where(.mm) h2, :where(.mm) h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
:where(.mm) p { margin: 0; }
:where(.mm) button { font: inherit; color: inherit; cursor: pointer; }
:where(.mm) button:disabled { cursor: not-allowed; }
:where(.mm) :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.mm-wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.mm-mono { font-family: var(--mono); }
.mm-num { font-variant-numeric: tabular-nums; }
/* 按钮 */
.mm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: var(--fs-body, 16px); text-decoration: none; transition: transform .15s, background .15s; }
.mm-btn:active:not(:disabled) { transform: scale(.97); }
.mm-btn-primary { background: var(--blue); color: var(--blue-ink); }
.mm-btn-primary:disabled { background: var(--line); color: var(--ink-2); }
.mm-btn-ghost { background: none; border: 1.5px solid var(--line); color: var(--ink); }
.mm-btn-citrine { background: var(--citrine); color: var(--citrine-ink); }
.mm-btn-sm { padding: 8px 14px; font-size: var(--fs-small, 14px); }
.mm-btn-block { width: 100%; }
.mm-link { background: none; border: 0; color: var(--blue); font-weight: 700; padding: 0; }
/* 纸箱 */
.mm-carton { position: relative; width: 100%; aspect-ratio: 1.25; max-width: 100%; container-type: inline-size; }
.mm-carton .mm-flap { position: absolute; top: 10%; width: 50%; height: 12%; background: var(--kraft-2); border: 2px solid var(--kraft-text); transition: transform .7s cubic-bezier(.5,1.6,.5,1); z-index: 3; }
.mm-carton .mm-flap.mm-l { left: 0; transform-origin: 0 100%; transform: rotate(-24deg); border-radius: 6px 0 0 6px; }
.mm-carton .mm-flap.mm-r { right: 0; transform-origin: 100% 100%; transform: rotate(24deg); border-radius: 0 6px 6px 0; }
.mm-carton .mm-body { position: absolute; left: 0; right: 0; top: 22%; bottom: 0; display: flex; flex-direction: column; border: 2px solid var(--kraft-text); border-radius: 6px; overflow: hidden; background: var(--kraft); }
.mm-carton .mm-inner { position: relative; flex: 1; margin: 7px 7px 0; background: var(--kraft-in); border-radius: 4px 4px 0 0; overflow: hidden; }
.mm-carton .mm-strata { position: absolute; inset: 0; display: flex; flex-direction: column-reverse; }
.mm-carton .mm-stratum { flex: none; height: 0; transition: height .55s cubic-bezier(.3,1.3,.5,1); position: relative; border-top: 2px solid rgba(255,255,255,.35); }
.mm-carton .mm-stratum::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 6px, transparent 6px 12px); }
.mm-carton .mm-mk { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(255,255,255,.55); z-index: 2; pointer-events: none; }
.mm-carton .mm-mk span { position: absolute; right: 4px; top: -15px; font: 600 var(--fs-label, 12px)/1 var(--mono); color: rgba(255,255,255,.85); }
.mm-carton .mm-lip { flex: none; height: 26%; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; color: var(--kraft-text); font: 600 clamp(7px, 3.7cqi, 13px)/1.2 var(--mono); white-space: nowrap; letter-spacing: .04em; border-top: 2px solid var(--kraft-text); }
.mm-carton .mm-lip .mm-arrows { font-size: 1.2em; letter-spacing: -.1em; }
.mm-carton .mm-lip b { font-weight: 600; }
.mm-carton .mm-tape { position: absolute; left: 44%; width: 12%; top: 22%; height: 0; background: var(--citrine); opacity: .92; z-index: 4; transition: height .4s .55s ease-out; border-left: 1px solid rgba(0,0,0,.12); border-right: 1px solid rgba(0,0,0,.12); }
.mm-carton .mm-stamp { position: absolute; left: 50%; top: 52%; z-index: 5; transform: translate(-50%,-50%) rotate(-10deg) scale(1.35); opacity: 0; font: 900 clamp(13px, 8cqi, 24px)/1 var(--display); letter-spacing: .08em; color: var(--good); border: 3px solid var(--good); border-radius: 10px; padding: 6px 12px; background: var(--surface); white-space: nowrap; transition: opacity .25s 1s, transform .35s 1s cubic-bezier(.3,1.6,.5,1); }
.mm-carton.mm-full .mm-flap.mm-l, .mm-carton.mm-full .mm-flap.mm-r { transform: rotate(0deg); }
.mm-carton.mm-full .mm-flap { top: 22%; height: 12%; }
.mm-carton.mm-full .mm-tape { height: 12%; top: 22%; }
.mm-carton.mm-full .mm-stamp { opacity: 1; transform: translate(-50%,-50%) rotate(-10deg) scale(1); }
.mm-carton.mm-full .mm-flap { transition: transform .7s cubic-bezier(.5,1.6,.5,1), top 0s .7s, height 0s .7s; }
.mm-carton.mm-wiggle { animation: mm-wiggle .5s; }
.mm-carton.mm-bump { animation: mm-bump .35s; }
@keyframes mm-wiggle { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-3deg) } 50% { transform: rotate(2.5deg) } 75% { transform: rotate(-1.5deg) } }
@keyframes mm-bump { 0%,100% { transform: scale(1) } 40% { transform: scale(1.06, .95) } }
.mm-carton.mm-plain .mm-flap, .mm-carton.mm-plain .mm-tape, .mm-carton.mm-plain .mm-stamp, .mm-carton.mm-plain .mm-lip span { display: none; }
.mm-carton.mm-plain .mm-lip { height: 18%; }
/* 进度 */
.mm-count { display: flex; align-items: baseline; gap: 6px; font-family: var(--display); }
.mm-count .mm-n { font-size: var(--fs-h1, 44px); font-weight: 900; line-height: 1; }
.mm-count .mm-of { font-size: var(--fs-h3, 20px); font-weight: 800; color: var(--ink-2); }
.mm-need { font-weight: 700; font-size: var(--fs-small, 14px); color: var(--warn); }
.mm-need.mm-ok { color: var(--good); }
.mm-bar { position: relative; height: 12px; border-radius: 999px; background: var(--sky); overflow: visible; }
.mm-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--blue); transition: width .5s cubic-bezier(.3,1.3,.5,1); }
.mm-bar.mm-ok i { background: var(--good); }
.mm-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--surface); text-decoration: none; }
.mm-ticks { display: flex; justify-content: space-between; font: 500 var(--fs-label, 12px)/1 var(--mono); color: var(--ink-2); margin-top: 5px; }
/* 徽章 */
.mm-cats-row { display: grid; grid-template-columns: repeat(9, minmax(0,1fr)); gap: 4px; }
.mm-cdot { width: 100%; max-width: 30px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed var(--line); color: var(--ink-2); transition: background .3s, color .3s, transform .3s; }
.mm-cdot svg { width: 15px; height: 15px; }
.mm-cdot.mm-on { border: 0; color: #fff; }
.mm-cdot.mm-pop, .mm-badge.mm-pop { animation: mm-pop .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes mm-pop { 0% { transform: scale(.4) } 100% { transform: scale(1) } }
.mm-badges { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.mm-badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 4px; border-radius: var(--r-sm); border: 1.5px dashed var(--line); color: var(--ink-2); font-size: var(--fs-label, 12px); line-height: 1.2; }
.mm-badge b { font-family: var(--display); font-size: var(--fs-label, 12px); font-weight: 800; }
.mm-badge .mm-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--surface); }
.mm-badge .mm-ic svg { width: 15px; height: 15px; }
.mm-badge.mm-on { border: 0; background: var(--citrine); color: var(--citrine-ink); }
.mm-badge.mm-on .mm-ic { background: var(--citrine-ink); color: var(--citrine); }
/* 首页 */
.mm-hero { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 40px; align-items: center; padding-block: 48px 32px; }
.mm-eyebrow { font: 600 var(--fs-label, 12px)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.mm-hero h1 { font-size: var(--fs-display, clamp(38px, 6vw, 68px)); font-weight: 900; margin-top: 14px; }
.mm-hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--citrine) 62%); }
.mm-hero .mm-lead { margin-top: 16px; font-size: var(--fs-h3, 20px); color: var(--ink-2); max-width: 34em; }
.mm-hero .mm-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mm-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mm-facts span { font-size: var(--fs-small, 14px); font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.mm-hero-visual { position: relative; padding: 20px 18px 10px; }
.mm-hero-visual .mm-carton { max-width: 420px; margin: 0 auto; }
.mm-hero-visual .mm-float { position: absolute; right: 2%; bottom: -6px; background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-md); padding: 10px 14px; font-family: var(--display); font-weight: 900; font-size: var(--fs-h2, 30px); }
.mm-hero-visual .mm-float small { display: block; font: 600 var(--fs-label, 12px)/1.2 var(--mono); color: var(--ink-2); letter-spacing: .06em; }
.mm-how { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; padding-block: 8px 36px; }
.mm-how li { list-style: none; background: var(--surface); border-radius: var(--r-md); padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.mm-how ol { display: contents; }
.mm-how .mm-k { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--blue); display: grid; place-items: center; font: 900 var(--fs-body, 16px)/1 var(--display); }
.mm-how h3 { font-size: var(--fs-h3, 20px); }
.mm-how p { color: var(--ink-2); font-size: var(--fs-small, 14px); margin-top: 4px; }
.mm-sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 20px; margin-bottom: 16px; }
.mm-sec-head h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.mm-sec-head p { color: var(--ink-2); }
.mm-starters { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; padding-bottom: 56px; }
.mm-starter { background: var(--surface); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.mm-collage { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; border-radius: var(--r-md); overflow: hidden; }
.mm-collage img, .mm-collage .mm-ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.mm-starter h3 { font-size: var(--fs-h3, 20px); font-weight: 900; }
.mm-starter .mm-who { color: var(--ink-2); font-size: var(--fs-small, 14px); }
.mm-mix { display: flex; flex-wrap: wrap; gap: 5px; }
.mm-mix span { font-size: var(--fs-label, 12px); font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--bg); display: inline-flex; align-items: center; gap: 5px; }
.mm-mix span i { width: 8px; height: 8px; border-radius: 50%; }
.mm-starter .mm-btn { margin-top: auto; }
/* 点菜 */
.mm-build { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; padding-block: 20px 40px; align-items: start; }
.mm-build-main, .mm-review > div, .mm-form-wrap > div { min-width: 0; }
.mm-rail { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 57px); z-index: 20; background: var(--bg); padding-block: 8px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
.mm-rail::-webkit-scrollbar { display: none; }
.mm-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px 7px 8px; font-weight: 700; font-size: var(--fs-small, 14px); white-space: nowrap; transition: border-color .2s; }
.mm-chip .mm-ci { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.mm-chip .mm-ci svg { width: 15px; height: 15px; }
.mm-chip .mm-q { font: 600 var(--fs-label, 12px)/1 var(--mono); padding: 3px 6px; border-radius: 999px; background: var(--citrine); color: var(--citrine-ink); }
.mm-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.mm-chip[aria-pressed="true"] .mm-ci { background: rgba(255,255,255,.15); }
.mm-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 14px 0 14px; }
.mm-cat-head h2 { font-size: var(--fs-h2, 30px); font-weight: 900; }
.mm-cat-head p { color: var(--ink-2); font-size: var(--fs-small, 14px); }
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.mm-card { position: relative; text-align: left; background: var(--surface); border: 1.5px solid transparent; border-radius: var(--r-md); padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .2s, box-shadow .2s; }
.mm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mm-card.mm-in { border-color: var(--good); }
.mm-card .mm-pic { position: relative; aspect-ratio: 1; background: #F3EBDD; }
.mm-card .mm-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-ph { display: grid; place-items: center; background: var(--sky); color: var(--blue); position: relative; }
.mm-ph svg { width: 42%; height: 42%; }
.mm-ph em { position: absolute; bottom: 8px; left: 8px; font: 600 var(--fs-label, 12px)/1 var(--mono); font-style: normal; background: var(--surface); color: var(--ink-2); padding: 4px 6px; border-radius: 6px; }
.mm-card .mm-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mm-card .mm-nm { font-weight: 700; font-size: var(--fs-small, 14px); line-height: 1.3; padding-right: 36px; }
.mm-card .mm-sub { font-size: var(--fs-label, 12px); color: var(--ink-2); }
.mm-card .mm-code { font: 500 var(--fs-label, 12px)/1 var(--mono); color: var(--ink-2); }
.mm-card .mm-plus { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); display: grid; place-items: center; font-size: var(--fs-h2, 30px); font-weight: 700; line-height: 1; box-shadow: 0 4px 10px rgba(23,77,227,.3); }
.mm-card.mm-in .mm-plus { background: var(--good); }
.mm-card .mm-got { position: absolute; left: 8px; top: 8px; background: var(--good); color: #fff; font: 600 var(--fs-label, 12px)/1 var(--mono); padding: 6px 8px; border-radius: 999px; }
.mm-build .mm-panel { max-height: calc(100vh - 88px); overflow: auto; overscroll-behavior: contain; }
.mm-panel { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); background: var(--surface); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.mm-panel h3 { font-size: var(--fs-h3, 20px); font-weight: 900; display: flex; justify-content: space-between; align-items: baseline; }
.mm-panel h3 small { font: 500 var(--fs-label, 12px)/1 var(--mono); color: var(--ink-2); }
.mm-panel .mm-carton { max-width: 220px; margin: 14px auto 0; }
.mm-small-print { font-size: var(--fs-label, 12px); color: var(--ink-2); line-height: 1.45; }
.mm-lbl { font: 600 var(--fs-label, 12px)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 7px; }
/* 手机底栏 */
.mm-mbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(23,45,73,.1); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.mm-mbar .mm-row { display: flex; align-items: center; gap: 12px; }
.mm-mbar .mm-mini { width: 58px; flex: none; }
.mm-mbar .mm-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mm-mbar .mm-mid b { font-family: var(--display); font-weight: 900; font-size: var(--fs-h3, 20px); }
.mm-mbar .mm-mid b span { color: var(--ink-2); font-size: var(--fs-small, 14px); }
.mm-mbar .mm-bar { height: 8px; }
/* 看箱子 */
.mm-review { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; padding-block: 20px 48px; align-items: start; }
.mm-review h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; margin: 8px 0 18px; }
.mm-grp { margin-bottom: 22px; }
.mm-grp-h { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; font-size: var(--fs-h3, 20px); margin-bottom: 10px; }
.mm-grp-h i { width: 12px; height: 12px; border-radius: 4px; }
.mm-grp-h small { font: 500 var(--fs-label, 12px)/1 var(--mono); color: var(--ink-2); }
.mm-line { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; gap: 12px; align-items: start; background: var(--surface); border-radius: var(--r-md); padding: 12px; margin-bottom: 8px; }
.mm-line .mm-th { width: 72px; height: 72px; border-radius: var(--r-sm); overflow: hidden; }
.mm-line .mm-th img, .mm-line .mm-th .mm-ph { width: 100%; height: 100%; object-fit: cover; display: grid; }
.mm-line .mm-nm { font-weight: 700; }
.mm-line .mm-sub { font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-line .mm-sizes { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 2; grid-row: 2; }
.mm-line .mm-tot { grid-column: 3; grid-row: 1 / span 2; }
.mm-mstep { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-size: var(--fs-small, 14px); }
.mm-mstep span { padding: 0 8px; font-weight: 700; }
.mm-mstep button { border: 0; background: var(--bg); width: 28px; height: 28px; font-weight: 700; }
.mm-mstep output { min-width: 26px; text-align: center; font: 600 var(--fs-small, 14px)/1 var(--mono); }
.mm-line .mm-tot { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mm-line .mm-tot b { font: 600 var(--fs-body, 16px)/1 var(--mono); white-space: nowrap; }
.mm-line .mm-acts { display: flex; gap: 12px; font-size: var(--fs-small, 14px); }
.mm-del { background: none; border: 0; color: var(--ink-2); padding: 0; font-weight: 600; text-decoration: underline; }
.mm-empty { background: var(--surface); border-radius: var(--r-lg); padding: 36px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink-2); }
.mm-helper-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-ask { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-small, 14px); color: var(--ink-2); background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; }
.mm-ask b { color: var(--ink); }
/* 表单 */
.mm-form-wrap { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px; padding-block: 20px 56px; align-items: start; }
.mm form.mm-f { background: var(--surface); border-radius: var(--r-lg); padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.mm-fld { display: flex; flex-direction: column; gap: 6px; }
.mm-fld.mm-wide { grid-column: 1 / -1; }
.mm-fld label, .mm-fld legend { font-weight: 700; font-size: var(--fs-small, 14px); }
.mm-fld label small, .mm-fld legend small { color: var(--ink-2); font-weight: 500; }
.mm-fld input, .mm-fld select, .mm-fld textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; width: 100%; }
.mm-fld textarea { min-height: 84px; resize: vertical; }
.mm-fld .mm-err { color: var(--warn); font-size: var(--fs-label, 12px); font-weight: 600; }
.mm fieldset.mm-fld { border: 0; padding: 0; margin: 0; }
.mm-opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; cursor: pointer; }
.mm-opt input { width: auto; margin-top: 3px; accent-color: var(--blue); }
.mm-opt:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.mm-opt span small { display: block; color: var(--ink-2); font-size: var(--fs-small, 14px); }
/* 完成 */
.mm-done { max-width: 760px; margin: 0 auto; padding-block: 40px 64px; display: flex; flex-direction: column; gap: 22px; }
.mm-done .mm-carton { max-width: 280px; margin: 0 auto; }
.mm-done h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; text-align: center; }
.mm-done .mm-lead { text-align: center; color: var(--ink-2); font-size: var(--fs-h3, 20px); max-width: 36em; margin: 0 auto; }
.mm-ref { text-align: center; font: 600 var(--fs-small, 14px)/1 var(--mono); color: var(--ink-2); letter-spacing: .06em; }
.mm-next { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.mm-next div { background: var(--surface); border-radius: var(--r-md); padding: 14px; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-next b { display: block; color: var(--ink); font-family: var(--display); font-size: var(--fs-body, 16px); margin-bottom: 4px; }
.mm-listbox { background: var(--surface); border-radius: var(--r-md); padding: 16px; }
.mm-listbox pre { margin: 10px 0 0; white-space: pre-wrap; font: 500 var(--fs-label, 12px)/1.55 var(--mono); color: var(--ink-2); max-height: 260px; overflow: auto; }
/* 弹层 */
.mm-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(13,22,38,.5); display: grid; place-items: center; padding: 20px; animation: mm-fade .2s; }
@keyframes mm-fade { from { opacity: 0 } }
.mm-sheet { position: relative; background: var(--surface); border-radius: var(--r-lg); width: min(860px, 100%); max-height: calc(100% - 20px); overflow: auto; box-shadow: var(--shadow); animation: mm-rise .28s cubic-bezier(.3,1.3,.5,1); }
@keyframes mm-rise { from { transform: translateY(30px); opacity: 0 } }
.mm-sheet .mm-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); font-size: var(--fs-h3, 20px); z-index: 2; }
.mm-pick { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.mm-pick .mm-pic { background: #F3EBDD; min-height: 100%; }
.mm-pick .mm-pic img, .mm-pick .mm-pic .mm-ph { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; display: grid; }
.mm-pick .mm-body { padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mm-pick h2 { font-size: var(--fs-h2, 30px); font-weight: 900; padding-right: 36px; }
.mm-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-sw { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: var(--fs-small, 14px); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.mm-sw[aria-pressed="true"] { border-color: var(--blue); background: var(--sky); }
.mm-sw small { font: 600 var(--fs-label, 12px)/1 var(--mono); background: var(--good); color: #fff; padding: 2px 5px; border-radius: 999px; }
.mm-as-pic { font-size: var(--fs-small, 14px); color: var(--ink-2); background: var(--bg); padding: 8px 12px; border-radius: var(--r-sm); }
.mm-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mm-step { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 6px 6px 6px 12px; transition: border-color .2s, background .2s; }
.mm-step.mm-has { border-color: var(--blue); background: var(--sky); }
.mm-step b { font-size: var(--fs-small, 14px); line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.mm-step .mm-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.mm-step button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--surface); font-size: var(--fs-h3, 20px); font-weight: 700; }
.mm-step input { width: 40px; text-align: center; border: 0; background: transparent; font: 600 var(--fs-body, 16px)/1 var(--mono); color: var(--ink); -moz-appearance: textfield; }
.mm-step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mm-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-quick button { border: 1.5px dashed var(--line); background: none; border-radius: 999px; padding: 5px 11px; font-weight: 700; font-size: var(--fs-small, 14px); color: var(--ink); }
.mm-pick-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
.mm-pick-foot .mm-t { font-family: var(--display); font-weight: 900; font-size: var(--fs-h3, 20px); }
.mm-pick-foot .mm-t small { display: block; font: 500 var(--fs-label, 12px)/1.3 var(--body); color: var(--ink-2); }
.mm-dlg { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.mm-dlg h2 { font-size: var(--fs-h2, 30px); font-weight: 900; padding-right: 36px; }
.mm-dlg .mm-lead { color: var(--ink-2); }
.mm-sug { display: flex; flex-direction: column; gap: 8px; }
.mm-sug .mm-line { margin: 0; background: var(--bg); grid-template-columns: 56px minmax(0,1fr) auto; }
.mm-sug .mm-line .mm-th { width: 56px; height: 56px; }
.mm-dlg .mm-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.mm-msheet { width: min(420px, 100%); }
.mm-msheet .mm-panel { position: static; box-shadow: none; }
@keyframes mm-slide { from { transform: translateX(40px); opacity: 0 } }
/* 提示条 */
.mm-toasts { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.mm-toast { background: var(--ink); color: var(--surface); border-radius: 999px; padding: 10px 16px; font-weight: 700; font-size: var(--fs-small, 14px); box-shadow: var(--shadow); animation: mm-rise .3s cubic-bezier(.3,1.4,.5,1); display: flex; align-items: center; gap: 8px; }
.mm-toast.mm-badge-t { background: var(--citrine); color: var(--citrine-ink); }
.mm-fx { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.mm-flyer { position: fixed; z-index: 96; border-radius: 12px; object-fit: cover; pointer-events: none; box-shadow: var(--shadow); }
/* v2：对齐产品方案 v1 和任务书 */
.mm-card .mm-add { position: absolute; right: 10px; bottom: 10px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--blue); color: var(--blue-ink); display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: var(--fs-small, 14px); box-shadow: 0 4px 10px rgba(23,77,227,.3); }
.mm-card.mm-in .mm-add { background: var(--good); }
.mm-card .mm-nm { padding-right: 0; }
.mm-card .mm-meta { padding-bottom: 54px; }
.mm-chip.mm-more { border-style: dashed; color: var(--ink-2); }
.mm-stamps { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; background: var(--bg); border-radius: var(--r-md); padding: 10px 8px 8px; }
.mm-stamp { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: var(--fs-label, 12px); font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.1; min-width: 0; }
.mm-stamp .mm-ring { width: 100%; max-width: 34px; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--line); transition: transform .3s; }
.mm-stamp .mm-ring svg { width: 55%; height: 55%; }
.mm-stamp.mm-on .mm-ring { border: 2.5px solid var(--sc); color: var(--sc); background: var(--surface); transform: rotate(-12deg); box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3.5px var(--sc); }
.mm-stamp.mm-on { color: var(--ink); }
.mm-stamp.mm-pop .mm-ring { animation: mm-stampdown .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes mm-stampdown { 0% { transform: scale(2.2) rotate(-30deg); opacity: 0 } 100% { transform: scale(1) rotate(-12deg); opacity: 1 } }
.mm-stamps .mm-missing { grid-column: 1 / -1; font-size: var(--fs-label, 12px); color: var(--ink-2); margin-top: 4px; text-align: center; }
.mm-badges { grid-template-columns: repeat(3, minmax(0,1fr)); }
.mm-gift { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1.5px dashed var(--blue); font-size: var(--fs-small, 14px); font-weight: 600; max-width: 34em; }
.mm-gift svg { width: 22px; height: 22px; flex: none; color: var(--blue); }
.mm-sumrow { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.mm-sumrow div { background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; }
.mm-sumrow b { display: block; font: 900 var(--fs-h2, 30px)/1 var(--display); }
.mm-sumrow span { font-size: var(--fs-label, 12px); color: var(--ink-2); }
.mm-stock-note { font-size: var(--fs-small, 14px); color: var(--ink-2); margin: 4px 0 14px; }
.mm-list-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mm-next { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mm-next div { position: relative; }
.mm-next i { font: 600 var(--fs-label, 12px)/1 var(--mono); font-style: normal; color: var(--blue); display: block; margin-bottom: 6px; letter-spacing: .08em; }
.mm-extras { background: var(--citrine); color: var(--citrine-ink); border-radius: var(--r-md); padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.mm-extras svg { width: 26px; height: 26px; flex: none; }
.mm-done-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.mm-city { margin-top: 8px; }
.mm-poster { background: var(--surface); color: var(--ink); border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; max-width: 380px; margin: 0 auto; }
.mm-poster .mm-ph-top { background: var(--blue); color: #fff; padding: 16px 18px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mm-poster .mm-ph-top b { font: 900 var(--fs-h3, 20px)/1.1 var(--display); letter-spacing: .03em; }
.mm-poster .mm-ph-top small { display: block; font: 600 var(--fs-label, 12px)/1.3 var(--mono); opacity: .85; margin-top: 4px; }
.mm-poster .mm-ph-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.mm-poster .mm-bars { display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.mm-poster .mm-rows { display: grid; gap: 4px; font-size: var(--fs-small, 14px); }
.mm-poster .mm-rows div { display: flex; justify-content: space-between; gap: 8px; }
.mm-poster .mm-rows i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.mm-poster .mm-foot { display: flex; gap: 12px; align-items: center; border-top: 1px dashed var(--line); padding-top: 12px; font-size: var(--fs-label, 12px); color: var(--ink-2); }
.mm-poster .mm-qr { width: 74px; height: 74px; flex: none; background: #fff; padding: 4px; border-radius: 6px; }
.mm-poster-note { font-size: var(--fs-small, 14px); color: var(--warn); background: var(--bg); border-radius: var(--r-sm); padding: 8px 12px; }
/* v5：AI 装饰素材（assets/，清单见 assets/素材清单.md）和动效 */
.mm-cat-ic { width: 100%; height: 100%; object-fit: contain; display: block; }
.mm-chip .mm-ci { background: transparent; width: 30px; height: 30px; }
.mm-chip[aria-pressed="true"] .mm-ci { background: rgba(255,255,255,.92); border-radius: 50%; padding: 2px; }
.mm-cat-head { align-items: center; }
.mm-cat-head .mm-big { width: 46px; height: 46px; flex: none; }
.mm-stamp .mm-ring img { width: 80%; height: 80%; object-fit: contain; filter: grayscale(1); opacity: .32; transition: filter .3s, opacity .3s; }
.mm-stamp.mm-on .mm-ring img { filter: none; opacity: 1; }
.mm-badge .mm-bimg { width: 46px; height: 46px; object-fit: contain; filter: grayscale(1); opacity: .35; transition: filter .4s, opacity .4s; }
.mm-badge.mm-on .mm-bimg { filter: none; opacity: 1; }
.mm-badge.mm-pop .mm-bimg { animation: mm-badgepop .9s cubic-bezier(.3,1.8,.5,1); }
.mm-badge.mm-on { background: var(--sky); color: var(--ink); }
@keyframes mm-badgepop { 0% { transform: scale(.2) rotate(-40deg) } 60% { transform: scale(1.3) rotate(10deg) } 100% { transform: scale(1) rotate(0) } }
.mm-hero-visual { padding: 0; }
.mm-hero-visual .mm-hero-img { width: 100%; max-width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.mm-hero-visual .mm-float { right: 4%; bottom: -14px; }
.mm-hero-visual .mm-say { position: absolute; left: -10px; top: 14%; max-width: 46%; background: var(--surface); color: var(--ink); border-radius: 18px 18px 18px 4px; padding: 10px 14px; font: 800 var(--fs-body, 16px)/1.3 var(--display); box-shadow: var(--shadow); animation: mm-rise .6s .3s cubic-bezier(.3,1.5,.5,1) both; }
.mm-how .mm-ill { width: 72px; height: 72px; object-fit: contain; flex: none; }
.mm-how h3 small { color: var(--blue); font: 600 var(--fs-label, 12px)/1 var(--mono); display: block; margin-bottom: 4px; letter-spacing: .08em; }
.mm-box-stage { position: relative; display: block; width: 100%; background: none; border: 0; padding: 0; }
.mm-box-stage .mm-buddy { position: absolute; right: -6px; bottom: 0; width: 34%; max-width: 92px; z-index: 6; pointer-events: none; transform-origin: 50% 100%; filter: drop-shadow(0 4px 6px rgba(23,45,73,.18)); }
.mm-box-stage .mm-buddy.mm-hop { animation: mm-hop .6s ease-out 3; }
@keyframes mm-hop { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-22%) scaleY(1.04) } 70% { transform: translateY(0) scaleY(.94) } }
.mm-dlg { position: relative; }
.mm-dlg .mm-ill { position: absolute; right: 58px; top: 8px; width: 86px; pointer-events: none; }
.mm-dlg .mm-ill + h2, .mm-dlg .mm-ill + h2 + .mm-lead { padding-right: 130px; }
.mm-empty .mm-ill { width: 180px; }
.mm-done-art { position: relative; width: min(300px, 80%); margin: 0 auto; background: url(/assets/maimai-ui/pattern.webp) center / 220px; border-radius: 50%; padding: 6%; }
.mm-earned { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.mm-earned div { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 800 var(--fs-small, 14px)/1.2 var(--display); }
.mm-earned img { width: 56px; height: 56px; object-fit: contain; animation: mm-badgepop .9s cubic-bezier(.3,1.8,.5,1) both; }
.mm-earned div:nth-child(2) img { animation-delay: .15s; }
.mm-earned div:nth-child(3) img { animation-delay: .3s; }
.mm-done-art img { width: 100%; display: block; animation: mm-rise .6s cubic-bezier(.3,1.5,.5,1); }
.mm-view-enter > * { animation: mm-viewin .32s cubic-bezier(.2,.8,.3,1) both; }
@keyframes mm-viewin { from { opacity: 0; transform: translateY(14px) } }
.mm-plus-n { position: fixed; z-index: 97; pointer-events: none; font: 900 var(--fs-h3, 20px)/1 var(--display); color: var(--good); text-shadow: 0 1px 0 var(--surface), 0 0 6px var(--surface); }
@keyframes mm-celebin { 0% { opacity: 0; transform: translateY(80px) scale(.6) } 18% { opacity: 1; transform: translateY(-10px) scale(1.04) } 28% { transform: translateY(0) scale(1) } 82% { opacity: 1; transform: translateY(0) scale(1) } 100% { opacity: 0; transform: translateY(-30px) scale(.95) } }
/* v6：起订逻辑（100 件起订、不设上限）——每满 100 件麦麦推来新箱子，里程碑徽章 */
.mm-box-stage .mm-stack { position: absolute; left: -6px; bottom: 0; z-index: 5; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; width: 26%; max-width: 64px; }
.mm-box-stage .mm-stack .mm-mini { width: 100%; }
.mm-box-stage .mm-stack .mm-more { font: 800 var(--fs-label, 12px)/1 var(--display); background: var(--citrine); color: var(--citrine-ink); border-radius: 999px; padding: 3px 7px; margin-bottom: 2px; }
.mm-carton.mm-arrive { animation: mm-arrive .8s cubic-bezier(.3,1.3,.5,1); }
@keyframes mm-arrive { from { transform: translateX(80%) rotate(8deg); opacity: 0 } }
.mm-badges.mm-ms { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mm-badges.mm-ms .mm-bimg { height: 40px; }
.mm-panel .mm-badge { padding: 6px 3px; }
.mm-panel .mm-badge .mm-bimg { width: 38px; height: 38px; }
.mm-panel .mm-badges.mm-ms .mm-badge span { display: none; }
.mm-need small { display: block; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
/* v7：8 档里程碑（老板 11/15：100、300、500、800、1000、5000、10000、超过 10000），每档一枚徽章、一套动作 */
.mm-badges.mm-ms { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mm-box-stage .mm-stack .mm-pile { width: 135%; max-width: none; margin-left: 10%; filter: drop-shadow(0 4px 6px rgba(23,45,73,.18)); }
/* 1000 档和最后一档的表情图里麦麦自己戴着皇冠，徽章照常放在右上角 */
@keyframes mm-halo { from { transform: scale(.9); opacity: .7 } to { transform: scale(1.1); opacity: 1 } }
.mm-fx-hop { animation: mm-fxhop .7s ease-out 2; }
.mm-fx-wag { animation: mm-fxwag .32s ease-in-out 5; transform-origin: 50% 90%; }
.mm-fx-hop2 { animation: mm-fxhop2 .8s ease-out 2; }
.mm-fx-spin { animation: mm-fxspin 1s cubic-bezier(.4,0,.2,1) 1; }
.mm-fx-crown { animation: mm-fxhop .7s ease-out 2; filter: drop-shadow(0 0 18px rgba(232,242,106,.9)); }
.mm-fx-jump { animation: mm-fxjump 1.1s cubic-bezier(.3,1.4,.5,1) 1; }
.mm-fx-fireworks { animation: mm-fxjump 1.1s cubic-bezier(.3,1.4,.5,1) 1, mm-fxwag .3s 1.1s ease-in-out 3; }
.mm-fx-legend { animation: mm-fxspin 1s cubic-bezier(.4,0,.2,1) 1, mm-fxjump 1.1s 1s cubic-bezier(.3,1.4,.5,1) 1; filter: drop-shadow(0 0 22px rgba(232,242,106,1)); }
@keyframes mm-fxhop { 0%,100% { transform: translateY(0) } 40% { transform: translateY(-14%) } 70% { transform: translateY(0) scaleY(.95) } }
@keyframes mm-fxwag { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-7deg) } 75% { transform: rotate(7deg) } }
@keyframes mm-fxhop2 { 0%,100% { transform: translateY(0) } 30% { transform: translateY(-24%) scale(1.05) } 55% { transform: translateY(0) scaleY(.93) } 75% { transform: translateY(-10%) } }
@keyframes mm-fxspin { from { transform: rotateY(0) } to { transform: rotateY(360deg) } }
@keyframes mm-fxjump { 0% { transform: translateY(0) scale(1) } 35% { transform: translateY(-30%) scale(1.15) rotate(-6deg) } 70% { transform: translateY(0) scale(.96) } 100% { transform: translateY(0) scale(1) } }
@media (max-width: 960px) {
.mm-build, .mm-review, .mm-form-wrap { grid-template-columns: minmax(0,1fr); }
.mm-build .mm-panel { display: none; }
.mm-mbar.mm-show { display: block; }
.mm-has-mbar { padding-bottom: 96px; }
.mm-toasts.mm-lift { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.mm-review aside .mm-panel, .mm-form-wrap aside .mm-panel { position: static; }
.mm-starters { grid-template-columns: minmax(0,1fr); max-width: 520px; }
}
@media (max-width: 760px) {
.mm-hero { grid-template-columns: minmax(0,1fr); padding-block: 24px 20px; gap: 16px; }
.mm-hero-visual { order: -1; width: 100%; max-width: 280px; margin: 8px auto 0; padding: 0; }
.mm-hero-visual .mm-float { display: none; }
.mm-hero-visual .mm-say { left: 8px; top: 8px; font-size: var(--fs-small, 14px); padding: 8px 11px; }
.mm-step { padding-left: 9px; }
.mm-step b { font-size: var(--fs-small, 14px); }
.mm-step button { width: 28px; }
.mm-step input { width: 34px; }
.mm-hero .mm-lead { font-size: var(--fs-body, 16px); }
.mm-how, .mm-next { grid-template-columns: minmax(0,1fr); }
.mm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.mm-card .mm-nm { font-size: var(--fs-small, 14px); }
.mm-scrim { padding: 0; place-items: end stretch; }
.mm-sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92%; width: 100%; }
.mm-pick { grid-template-columns: minmax(0,1fr); }
.mm-pick .mm-pic { max-height: 230px; overflow: hidden; }
.mm-pick .mm-pic img { aspect-ratio: auto; height: 230px; }
.mm-pick-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.mm form.mm-f { grid-template-columns: minmax(0,1fr); padding: 16px; }
.mm-line { grid-template-columns: 56px minmax(0,1fr); }
.mm-line .mm-th { width: 56px; height: 56px; }
.mm-line .mm-sizes { grid-column: 1 / -1; grid-row: auto; }
.mm-line .mm-tot { grid-column: 1 / -1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; }
.mm-cat-head h2 { font-size: var(--fs-h2, 30px); }
}
@media (max-width: 960px) {
.mm-next { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) {
.mm-btn, .mm-btn-sm, .mm-chip { min-height: 44px; }
.mm-steps { grid-template-columns: minmax(0,1fr); }
.mm-step button { width: 44px; height: 44px; }
.mm-step input { width: 46px; }
.mm-mstep button { width: 40px; height: 40px; }
.mm-card .mm-add { min-height: 40px; }
.mm-sheet .mm-x { width: 44px; height: 44px; }
.mm-next { grid-template-columns: minmax(0,1fr); }
.mm-sumrow b { font-size: var(--fs-h2, 30px); }
.mm-gift { font-size: var(--fs-small, 14px); }
.mm-toasts, .mm-toasts.mm-lift { top: calc(env(safe-area-inset-top, 0px) + 66px); bottom: auto; }
.mm-toast { font-size: var(--fs-small, 14px); padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) {
.mm *, .mm *::before, .mm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Production: sticky parts sit under the site header (--mm-top is measured by maimai.js). */
.mm-rail { top: var(--mm-top); }
.mm-panel { top: calc(var(--mm-top) + 16px); }
.mm-build .mm-panel { max-height: calc(100vh - var(--mm-top) - 32px); }
.mm-home { padding-bottom: 48px; }
.mm-home .mm-how { list-style: none; margin: 0; padding: 8px 0 36px; }
.mm-how h2 { font-size: var(--fs-h3, 20px); }
.mm-how h2 small { color: var(--blue); font: 600 var(--fs-label, 12px)/1 var(--mono); display: block; margin-bottom: 4px; letter-spacing: .08em; }
.mm-cat-head h1 { font-size: var(--fs-h2, 30px); font-weight: 900; }
.mm-panel-h { font-size: var(--fs-h3, 20px); font-weight: 900; }
.mm-panel-acts { display: flex; flex-direction: column; gap: 8px; }
.mm-card { font: inherit; color: inherit; }
.mm-card .mm-pic, .mm-card .mm-meta { display: flex; }
.mm-card .mm-pic { display: block; }
.mm-card .mm-meta { flex-direction: column; }
.mm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mm-stamp { position: relative; }
.mm-line-name { min-width: 0; }
.mm-line.mm-flag { box-shadow: inset 0 0 0 2px var(--warn); }
.mm-flag-t { color: var(--warn); }
.mm-alert { background: #FFF4E5; color: #6B3A00; border: 1.5px solid var(--warn); border-radius: var(--r-sm); padding: 10px 14px; font-weight: 600; font-size: var(--fs-small, 14px); margin: 0 0 14px; }
.mm-grp-h { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 900; font-size: var(--fs-h3, 20px); margin: 0 0 10px; }
.mm-grp-ic { width: 28px; height: 28px; flex: none; }
.mm-mini-btn { width: 58px; flex: none; background: none; border: 0; padding: 0; }
.mm-mbar .mm-mid b span { color: inherit; font-size: inherit; }
.mm-mbar .mm-mid b .mm-of { color: var(--ink-2); font-size: var(--fs-small, 14px); }
.mm-form-h { font-size: clamp(26px, 4vw, 36px); font-weight: 900; margin: 8px 0 16px; }
.mm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 6px; }
.mm-city { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mm-city label { font-weight: 700; font-size: var(--fs-small, 14px); }
.mm-city input { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; width: 100%; }
.mm-fld [aria-invalid="true"] { border-color: var(--warn); }
.mm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mm-f { position: relative; }
.mm-f .mm-small-print { margin-top: 6px; }
.mm-f .mm-small-print a { color: var(--blue); }
.mm-ref b { color: var(--ink); }
.mm-next { list-style: none; margin: 0; padding: 0; }
.mm-next li { background: var(--surface); border-radius: var(--r-md); padding: 14px; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-next li b { display: block; color: var(--ink); font-family: var(--display); font-size: var(--fs-body, 16px); margin-bottom: 4px; }
.mm-listbox-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.mm-listbox-h h2 { font-size: var(--fs-h3, 20px); }
.mm-pick-code { font-size: var(--fs-label, 12px); color: var(--ink-2); }
.mm-spec { margin-top: 6px; color: var(--ink-2); font-weight: 600; }
.mm-sw i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.mm-pic.mm-gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.mm-pic.mm-gal img { flex: 0 0 100%; scroll-snap-align: start; }
.mm-sheet-md { width: min(620px, 100%); }
.mm-sheet-sm { width: min(460px, 100%); }
.mm-flyer-ic { box-shadow: none; object-fit: contain; }
.mm-noscript { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; }
.mm-hero h1 { font-size: var(--fs-display, clamp(36px, 5.6vw, 64px)); font-weight: 900; margin-top: 14px; }
@media (max-width: 760px) {
  .mm-toasts, .mm-toasts.mm-lift { top: calc(var(--mm-top) + 10px); bottom: auto; }
  .mm-cat-head h1 { font-size: var(--fs-h2, 30px); }
}
.mm-next li .mm-when { display: block; color: var(--blue); font-weight: 700; margin-bottom: 4px; }

/* Offer (L9 11/16): third entry tag with its Terms link, the expandable terms, the 500-pcs line under the milestones. */
.mm-facts .mm-fact-offer { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; background: var(--citrine); border-color: var(--citrine); color: var(--citrine-ink); }
.mm-fact-offer b { font-weight: 700; }
.mm-fact-offer i { font-style: normal; white-space: pre; }
.mm-fact-offer a, .mm-small-print a[data-act="terms"] { color: inherit; font-weight: 700; text-decoration: underline; }
.mm-small-print a[data-act="terms"] { color: var(--blue); }
.mm-terms { background: var(--surface); border-radius: var(--r-md); padding: 14px 18px; margin: 0 0 36px; }
.mm-terms summary { font-family: var(--display); font-weight: 900; font-size: var(--fs-h3, 20px); cursor: pointer; }
.mm-terms p, .mm-terms-dlg p { margin-top: 10px; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-ms-note { margin-top: 8px; font-size: var(--fs-small, 14px); color: var(--ink); }

/* Brand-label note for catalogue styles marked labelled (B 11/17). */
.mm-label-note { margin-top: 8px; font-size: var(--fs-small, 14px); color: var(--ink-2); background: var(--bg); border-radius: var(--r-sm); padding: 8px 12px; }

/* Loading cards while the catalogue loads (B 11/17): same size as real cards and shelves, so the layout does not jump. */
.mm-skel { background: var(--surface); }
.mm-card.mm-skel .mm-pic, .mm-skel .mm-meta i, .mm-chip.mm-skel, .mm-skel-h, .mm-skel-panel { background: linear-gradient(90deg, #E8EDF4 0%, #F4F7FB 50%, #E8EDF4 100%) 0 0 / 200% 100%; animation: mm-shimmer 1.4s linear infinite; }
.mm-card.mm-skel { pointer-events: none; }
.mm-card.mm-skel .mm-pic { display: block; aspect-ratio: 1; }
.mm-skel .mm-meta i { display: block; height: 12px; border-radius: 6px; }
.mm-skel .mm-meta i:nth-child(1) { width: 40%; }
.mm-skel .mm-meta i:nth-child(2) { width: 85%; margin-top: 6px; }
.mm-skel .mm-meta i:nth-child(3) { width: 55%; margin-top: 6px; }
.mm-chip.mm-skel { width: 120px; height: 44px; border: 0; }
.mm-skel-h { display: block; width: 220px; height: 34px; border-radius: 8px; }
.mm-skel-panel { min-height: 520px; }
@keyframes mm-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .mm-skel, .mm-skel * { animation: none !important; } }
/* Shelf heading keeps one fixed height (icon row; on phones the count on its own line), so loading cards and real
   cards line up whatever the shelf name or language. The tap hint is left out on phones. */
.mm-cat-head { flex-wrap: nowrap; }
.mm-cat-head h1, .mm-cat-head p { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-cat-head h1 { flex: none; max-width: 60%; }
.mm-cat-head p { flex: 1 1 0; }
.mm-cat-head .mm-big.mm-skel { border-radius: 50%; }
.mm-skel-t { display: inline-block; width: 160px; border-radius: 6px; background: linear-gradient(90deg, #E8EDF4 0%, #F4F7FB 50%, #E8EDF4 100%) 0 0 / 200% 100%; animation: mm-shimmer 1.4s linear infinite; }
.mm-cat-head p .mm-skel-t { width: 260px; max-width: 100%; }
@media (max-width: 760px) {
  .mm-cat-head { flex-wrap: wrap; }
  .mm-cat-head h1 { max-width: calc(100% - 60px); }
  .mm-cat-head p { flex: 0 0 100%; }
  .mm-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mm-skel-t { animation: none; } }
/* Portrait photos must not stretch the square image box (a flex item grows to its content by default). */
.mm-card .mm-pic { min-height: 0; overflow: hidden; }

/* Maimai stays (麦麦形象打磨 11/14). Milestone card: no backdrop, never over the + Add buttons. Desktop: placed over the
   box panel by maimai.js; phone: above the bottom bar, at most half the screen. */
.mm-celebrate { position: fixed; z-index: 60; right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); max-height: 50vh; overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 18px 48px rgba(23,45,73,.28); border: 2px solid var(--citrine); padding: 16px 16px 14px; display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 12px; align-items: center; animation: mm-rise .35s cubic-bezier(.3,1.4,.5,1) both; }
.mm-celeb-x { position: absolute; right: 8px; top: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); font-size: var(--fs-h3, 20px); line-height: 1; }
.mm-celeb-art { position: relative; }
.mm-celeb-art .mm-mascot { width: 112px; display: block; filter: drop-shadow(0 8px 14px rgba(23,45,73,.22)); }
.mm-celeb-art .mm-tb { position: absolute; right: -10px; top: -8px; width: 52px; filter: drop-shadow(0 6px 10px rgba(23,45,73,.3)); animation: mm-badgepop .9s .2s cubic-bezier(.3,1.8,.5,1) both; }
.mm-celeb-art.mm-legend::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(232,242,106,.75), rgba(111,149,255,.35) 45%, transparent 70%); animation: mm-halo 1.2s ease-in-out infinite alternate; z-index: -1; }
.mm-celeb-body { min-width: 0; padding-right: 26px; }
.mm-celeb-body b { display: block; font: 900 var(--fs-h3, 20px)/1.2 var(--display); }
.mm-celeb-body p { margin-top: 6px; font-size: var(--fs-small, 14px); color: var(--ink-2); }
.mm-celeb-note { color: var(--ink) !important; font-weight: 600; }
.mm-celeb-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 960px) {
  .mm-celebrate { left: 12px; right: 12px; width: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); grid-template-columns: 92px minmax(0,1fr); }
  .mm-celeb-art .mm-mascot { width: 92px; }
}
/* Earned milestone badges are buttons that replay their card. */
.mm-badges button.mm-badge { font: inherit; color: inherit; width: 100%; cursor: pointer; }
.mm-badges button.mm-badge:hover { box-shadow: 0 0 0 2px var(--blue); }
/* Speech bubble over the box (and one line above the phone bar). */
.mm-say { position: relative; margin: 2px 0 -4px; background: var(--sky); color: var(--ink); border-radius: 14px 14px 14px 4px; padding: 8px 12px; font-size: var(--fs-small, 14px); font-weight: 600; line-height: 1.35; }
.mm-say-link { border: 0; background: none; padding: 0; color: var(--blue); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mm-mbar-say { margin: 0 0 8px; padding: 6px 10px; border-radius: 12px; }
/* Phone bar: the progress line and the empty-shelf link each get one line, so the link is never cut off. */
.mm-mbar-say .mm-say-line, .mm-mbar-say .mm-say-link { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.mm-done-say { align-self: center; max-width: 30em; margin: -8px auto 0; text-align: center; border-radius: 14px; }
.mm-avatar { width: 40px; height: 40px; flex: none; object-fit: contain; }
/* Small reactions: a hop for added goods, a head tilt for removed ones (none with reduced motion). */
.mm-react-hop { animation: mm-react-hop .45s ease-out; }
.mm-react-tilt { animation: mm-react-tilt .7s ease-in-out; transform-origin: 50% 90%; }
@keyframes mm-react-hop { 40% { transform: translateY(-12%); } }
@keyframes mm-react-tilt { 30%, 70% { transform: rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) { .mm-celebrate, .mm-celeb-art *, .mm-react-hop, .mm-react-tilt { animation: none !important; } }
/* Phone: a compact card (small Maimai, the title says it all). */
@media (max-width: 960px) {
  .mm-celebrate { grid-template-columns: 68px minmax(0,1fr); gap: 10px; padding: 10px 12px; }
  .mm-celeb-art .mm-mascot { width: 68px; }
  .mm-celeb-art .mm-tb { width: 34px; right: -6px; top: -4px; }
  .mm-celeb-x { width: 32px; height: 32px; right: 6px; top: 6px; }
  .mm-celeb-body b { font-size: var(--fs-body, 16px); }
  .mm-celeb-body > p:not(.mm-celeb-note) { display: none; }
  .mm-celeb-acts { margin-top: 8px; }
  /* The page keeps room for the bar below the last row (its height is measured by maimai.js). */
  .mm-has-mbar { padding-bottom: calc(var(--mm-mbar-h, 144px) + 16px); }
  .mm-celebrate { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
}
/* Phone: the card sits inside the bottom bar in place of the bubble line, so it never covers + Add (product 11/17). */
.mm-mbar .mm-celebrate { position: relative; z-index: auto; left: auto; right: auto; bottom: auto; width: auto; max-height: none; overflow: visible; margin: 0 0 8px; padding: 8px; grid-template-columns: 38px minmax(0,1fr); gap: 8px; border-radius: 14px; box-shadow: none; }
.mm-mbar .mm-celeb-art .mm-mascot { width: 38px; filter: none; }
/* Narrow enough that both buttons share one row on a 375 px phone in all three languages (Russian is the longest). */
.mm-mbar .mm-celeb-acts .mm-btn { padding-left: 9px; padding-right: 9px; }
.mm-mbar .mm-celeb-art .mm-tb { width: 22px; right: -6px; top: -4px; }
.mm-mbar .mm-celeb-x { width: 28px; height: 28px; right: 6px; top: 6px; font-size: var(--fs-body, 16px); }
.mm-mbar .mm-celeb-body { padding-right: 0; }
.mm-mbar .mm-celeb-body b { font-size: var(--fs-body, 16px); padding-right: 30px; }
.mm-mbar .mm-celeb-note { margin-top: 2px; font-size: var(--fs-label, 12px); }
.mm-mbar .mm-celeb-acts { margin-top: 6px; gap: 6px; }
.mm-mbar.mm-celeb-on .mm-mbar-say { display: none; }
/* A notice a style must carry (L9, e.g. XC-703): plain text under the name, normal size, not a badge. */
.mm-notice { margin-top: 6px; font-size: var(--fs-body, 16px); color: var(--ink); line-height: 1.45; }
