/* ==========================================================================
   Material try-on v2 · 板材试戴器 · 2026-10-26 (r54)
   --------------------------------------------------------------------------
   用户 7 条批注全部指向这块，按第 7 条「整体重新设计」处理：

   1. 结构：框架图独占一块（放大），控制区在图下方 —— 不再左右分栏硬塞
   2. 框架切换：移到图下方，做成缩略选择条（直观看到每种形状）
   3. 分组精简：12 族收成 6 个代表性分组（用户要「几个代表性的就行」）
   4. 换色：改用「替换原 path 的 fill」，不再用 clipPath
      —— clipPath 的多个 subpath 是并集，evenodd 挖孔会失效（原 bug）

   布局：
     ┌────────────────────────────────────────┐
     │  大框架预览（居中，放大）                │
     │  ┌────┐ ┌────┐ ┌────┐ ┌────┐ ┌────┐   │  <- 框架缩略条（图下）
     ├────────────────────────────────────────┤
     │  材质分组 chips                          │
     │  色号网格（点击即换）                     │
     └────────────────────────────────────────┘
   ========================================================================== */

.mtry {
    --mtry-line: rgba(255, 255, 255, .14);
    --mtry-line-2: rgba(255, 255, 255, .26);
    --mtry-ink: #eef1e7;
    display: block;
    margin-top: 30px;
}

/* ---------------------------------------------------- 舞台：独占一行 */

.mtry-stage-wrap {
    position: relative;
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--mtry-line);
    padding: 22px 22px 16px;
    margin-bottom: 26px;
}

.mtry-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 12px;
    overflow: hidden;
    background:
        radial-gradient(70% 70% at 50% 38%, #fdfcf8 0%, #f0ece1 62%, #e6e1d4 100%);
}

.mtry-stage svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* 框体投影，增加实物感 */
#mtry-frame-g {
    filter: drop-shadow(0 14px 26px rgba(20, 28, 24, .22));
}

/* ---------------------------------------------------- 框架缩略条（图下方） */

.mtry-frames {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.mtry-frame-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 10px 6px 9px;
    border-radius: 9px;
    border: 1px solid var(--mtry-line);
    background: rgba(255, 255, 255, .04);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.mtry-frame-btn:hover {
    background: rgba(255, 255, 255, .1);
    border-color: var(--mtry-line-2);
    transform: translateY(-2px);
}
.mtry-frame-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, .16);
    border-color: var(--mtry-ink);
}

.mtry-frame-btn svg {
    width: 100%;
    height: 34px;
    display: block;
}
.mtry-frame-btn svg path {
    fill: #cfd6c8;
    transition: fill .2s ease;
}
.mtry-frame-btn[aria-pressed="true"] svg path {
    fill: var(--mtry-ink);
}

.mtry-frame-btn span {
    font-size: 10.5px;
    letter-spacing: .03em;
    color: rgba(238, 241, 231, .62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.mtry-frame-btn[aria-pressed="true"] span {
    color: var(--mtry-ink);
    font-weight: 500;
}

/* ---------------------------------------------------- 图下信息条 */

.mtry-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--mtry-line);
    flex-wrap: wrap;
}

.mtry-caption-left {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.mtry-caption-left img {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid var(--mtry-line-2);
    flex: 0 0 auto;
}
.mtry-caption-left div { line-height: 1.35; min-width: 0; }
.mtry-caption-left b {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mtry-ink);
    font-variant-numeric: tabular-nums;
}
.mtry-caption-left small {
    display: block;
    font-size: 11px;
    color: rgba(238, 241, 231, .58);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mtry-caption-right {
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(238, 241, 231, .5);
    white-space: nowrap;
}

/* ---------------------------------------------------- 分组 chips */

.mtry-panel { display: block; }

.mtry-label {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(238, 241, 231, .5);
    margin: 0 0 11px;
}

.mtry-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 22px;
}

.mtry-cats button {
    font: inherit;
    font-size: 12px;
    line-height: 1;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--mtry-line);
    background: rgba(255, 255, 255, .05);
    color: var(--mtry-ink);
    cursor: pointer;
    opacity: .82;
    transition: background .18s ease, opacity .18s ease, border-color .18s ease;
}
.mtry-cats button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .13);
}
.mtry-cats button[aria-pressed="true"] {
    background: var(--mtry-ink);
    border-color: var(--mtry-ink);
    color: #16201b;
    opacity: 1;
    font-weight: 500;
}
.mtry-cats button i {
    font-style: normal;
    opacity: .5;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}
.mtry-cats button[aria-pressed="true"] i { opacity: .62; }

/* ---------------------------------------------------- 色号网格 */

.mtry-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
}


.mtry-note {
    margin: 18px 0 0;
    font-size: 11px;
    line-height: 1.6;
    color: rgba(238, 241, 231, .55);
    max-width: 62ch;
}

/* ---------------------------------------------------- 响应式 */

@media (max-width: 760px) {
    .mtry-stage-wrap { padding: 14px 14px 12px; }
    .mtry-stage { aspect-ratio: 16 / 9; }
    .mtry-frame-btn svg { height: 26px; }
    .mtry-frame-btn span { font-size: 9.5px; }
    .mtry-swatches { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
    .mtry-cats button { font-size: 11px; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .mtry-swatch, .mtry-frame-btn, .mtry-cats button { transition: none !important; }
    .mtry-swatch:hover, .mtry-frame-btn:hover { transform: none; }
}

/* ==========================================================================
   标题区修正（2026-10-26 r55）
   --------------------------------------------------------------------------
   问题：mh-head 从旧版继承了窄栏 grid，标题被挤成 4 行、左侧留大片空白，
        整个试戴器被推到右边（用户批注「很挤」「应该跟右边结合」）。

   修法：mh-head 改成「标题 + 说明」两栏但比例更宽，
        mtry 占满整行宽度（不再被 head 挤到右边）。
   ========================================================================== */

#mh-material-heading,
.mh-materials .mh-head h2 {
    font-size: clamp(30px, 3.4vw, 46px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.025em !important;
    white-space: nowrap;
}

/* 不再让 h2 内部换行（HTML 里仍有 <br>，这里用 display 控制） */
.mh-materials .mh-head h2 br {
    display: none;
}

/* head 两栏：标题窄、说明宽 */
.mh-materials .mh-head {
    display: grid !important;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) !important;
    gap: 32px 48px !important;
    align-items: end !important;
    margin-bottom: 34px !important;
}
.mh-materials .mh-head > div:first-child {
    min-width: 0;
}
.mh-materials .mh-head-side {
    padding-top: 0 !important;
}
.mh-materials .mh-head-side p {
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    max-width: 52ch;
}

/* 试戴器占满整行，不被 head 影响 */
.mh-materials .mtry {
    width: 100% !important;
    margin-top: 0 !important;
}

@media (max-width: 900px) {
    .mh-materials .mh-head {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .mh-materials .mh-head h2 {
        white-space: normal;
        font-size: clamp(26px, 7vw, 34px) !important;
    }
    .mh-materials .mh-head h2 br { display: inline; }
}

/* ==========================================================================
   父容器布局修正（2026-10-26 r56）★ 关键
   --------------------------------------------------------------------------
   根因：factory-r8.css 里 `.r8-material-editorial` 是
        grid-template-columns: 1fr 1.45fr  —— 旧版「左标题 / 右图」两栏。
        我的 .mh-head 和 .mtry 作为它的两个 grid 子项，被切成了左右两半，
        所以标题挤在左窄栏（4 行）、试戴器挤在右栏。

   修法：把 .mh-materials 改成单列 block，内部自己控制布局。
        这属于「批注7 整块重做」的必要部分 —— 不改父容器就拿不到整行宽度。
   ========================================================================== */

.mh-materials.r8-material-editorial,
section.mh-materials {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    overflow: visible !important;
}

/* 标题区：真正的两栏，且占满整行 */
.mh-materials .mh-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 28px 56px !important;
    align-items: end !important;
    margin-bottom: 36px !important;
    width: 100% !important;
}

.mh-materials .mh-head h2 {
    font-size: clamp(32px, 3.6vw, 50px) !important;
    line-height: 1.04 !important;
    letter-spacing: -.028em !important;
    margin: 8px 0 0 !important;
    white-space: normal !important;
}
.mh-materials .mh-head h2 br { display: none !important; }

.mh-materials .mh-head-side {
    padding-top: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mh-materials .mh-head-side p {
    font-size: 14px !important;
    line-height: 1.68 !important;
    max-width: 56ch;
    margin: 0 !important;
}
.mh-materials .mh-head-link { align-self: flex-start; }

/* 试戴器占满整行 */
.mh-materials .mtry {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

/* 舞台可以更宽 */
.mh-materials .mtry-stage-wrap {
    width: 100% !important;
}

@media (max-width: 900px) {
    .mh-materials .mh-head {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .mh-materials .mh-head h2 {
        font-size: clamp(26px, 7.4vw, 36px) !important;
    }
}

/* ==========================================================================
   最终视觉微调（2026-10-26 r57）
   --------------------------------------------------------------------------
   1. 舞台顶部留白多：降 aspect-ratio，让框更饱满
   2. note 文字与色号网格重叠：加 margin-top
   3. 色号网格在宽屏下可以多排一些
   ========================================================================== */

.mtry-stage {
    aspect-ratio: 21 / 10;
}

.mtry-note {
    margin-top: 22px !important;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.mtry-swatches {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important;
}

/* 框架缩略条：更紧凑 */
.mtry-frames {
    gap: 7px !important;
    margin-top: 12px !important;
}
.mtry-frame-btn {
    padding: 9px 5px 8px !important;
}
.mtry-frame-btn svg {
    height: 30px !important;
}

@media (max-width: 760px) {
    .mtry-stage { aspect-ratio: 16 / 9; }
    .mtry-swatches { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)) !important; }
}

/* ==========================================================================
   左右两栏布局（2026-10-26 r58）★ 用户明确要求
   --------------------------------------------------------------------------
   用户批注：
     「我让你做成左右响应式布局，不是让你做成上下响应式布局」
     「这个占右边一半」（.mtry-panel）
     「这个占左边一半」（.mtry-stage-wrap）

   所以 .mtry 必须是 1fr / 1fr 两栏：
       左：框架预览 + 框架切换条 + 信息条
       右：分组 chips + 色号网格

   上一版我改成了 display:block 上下堆叠，方向错了。这里改回 grid 两栏。
   父容器（.mh-materials）保持 block —— 那是对的，标题区需要整行宽度。
   ========================================================================== */

.mh-materials .mtry {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;   /* 左一半 / 右一半 */
    gap: 32px 40px !important;
    align-items: start !important;
    width: 100% !important;
    margin: 0 !important;
}

/* 左栏：框架预览（sticky，滚动时跟随） */
.mh-materials .mtry-stage-wrap {
    width: 100% !important;
    position: sticky !important;
    top: 24px !important;
}

/* 左栏舞台：因为是半宽，改回 2:1 以保证框的比例不变形 */
.mh-materials .mtry-stage {
    aspect-ratio: 2 / 1 !important;
}

/* 右栏：选择区 */
.mh-materials .mtry-panel {
    width: 100% !important;
    min-width: 0 !important;
}

/* 右栏色号网格：半宽下每行少放几个 */
.mh-materials .mtry-swatches {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)) !important;
}

/* 右栏 note 不需要顶部分隔线（在右栏内部） */
.mh-materials .mtry-note {
    margin-top: 18px !important;
    padding-top: 0 !important;
    border-top: 0 !important;
}

/* 平板：仍保持左右，但收窄间距 */
@media (max-width: 1100px) {
    .mh-materials .mtry { gap: 26px 28px !important; }
    .mh-materials .mtry-swatches {
        grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important;
    }
    .mh-materials .mtry-frame-btn svg { height: 26px !important; }
    .mh-materials .mtry-frame-btn span { font-size: 9.5px !important; }
}

/* 手机：此时才允许堆叠（左右放不下两个 340px） */
@media (max-width: 760px) {
    .mh-materials .mtry {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    .mh-materials .mtry-stage-wrap {
        position: relative !important;
        top: 0 !important;
    }
    .mh-materials .mtry-stage { aspect-ratio: 16 / 9 !important; }
    .mh-materials .mtry-swatches {
        grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)) !important;
    }
}

/* ==========================================================================
   左右两栏对齐微调（2026-10-26 r59）
   --------------------------------------------------------------------------
   右栏（.mtry-panel）从 SECTION 顶部开始，而左栏（.mtry）在标题区之后，
   导致右栏的 MATERIAL FAMILY 比左栏框架图高出一截、顶到标题区右侧。

   修法：给右栏加 padding-top，让它与左侧框架图顶部对齐。
   ========================================================================== */

/* 右栏顶部对齐左栏舞台 */
.mh-materials .mtry-panel {
    padding-top: 22px !important;
}

/* 右栏第一个 label 不要额外上边距 */
.mh-materials .mtry-panel > .mtry-label:first-child {
    margin-top: 0 !important;
}

/* 两栏顶部对齐更精确：让 stage-wrap 与 panel 内容起点一致 */
@media (max-width: 760px) {
    .mh-materials .mtry-panel { padding-top: 0 !important; }
}

/* ==========================================================================
   三条批注处理（2026-10-26 r60）
   --------------------------------------------------------------------------
   批注1 说明文字挪到下面
     -> .mh-head 改为单栏（只留 eyebrow + h2）
     -> 说明与链接移到 .mtry 之后的 .mtry-foot

   批注2 色号展示「太廉价低级」
     -> 原设计：白底卡片 + 底部半透明白色条压住色号，像商品缩略图
     -> 新设计：无边框、纯图 + 图下独立编号，像实体色卡册
        图片本身大一点、圆角更小、hover 轻微上浮 + 细描边
        编号用等宽、小字、低对比，不抢图

   批注3 框架太小
     -> 根因：viewBox 1600x800 里框架只占 80% x 42~59%，
        上下留了大量空白（bbox y 167..641）
     -> HTML 已把 viewBox 裁到 160 167 1280 474
     -> CSS 配合：舞台比例改成 bbox 比例 1280:474 ≈ 2.7:1
   ========================================================================== */

/* ---- 批注1：标题区单栏 ---- */

.mh-materials .mh-head {
    display: block !important;
    margin-bottom: 30px !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.mh-materials .mh-head h2 {
    font-size: clamp(32px, 3.6vw, 50px) !important;
    line-height: 1.04 !important;
    letter-spacing: -.028em !important;
    margin: 6px 0 0 !important;
    max-width: 22ch;
}

/* ---- 批注1：底部说明区 ---- */

.mtry-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px 48px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    flex-wrap: wrap;
}
.mtry-foot p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(238, 241, 231, .62);
    max-width: 68ch;
}
.mtry-foot .mh-head-link {
    flex: 0 0 auto;
    color: #eef1e7;
    font-size: 13px;
}

/* ---- 批注3：舞台比例跟随裁剪后的 viewBox ---- */

.mh-materials .mtry-stage {
    aspect-ratio: 1280 / 474 !important;   /* ≈ 2.70 : 1，框架占满不再留白 */
}

/* ---- 批注2：色号卡重做 ---- */

.mh-materials .mtry-swatches {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
    gap: 16px 14px !important;
}

/* 注意：不能用 all:unset —— 它会把 browser 默认的 button 行为也清掉，
   而且 !important 规则仍在，反而更难控。这里显式重置需要的属性。 */
.mh-materials .mtry-swatch {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
    display: block;
    width: 100%;
    cursor: pointer;
    text-align: center;
}

/* 图片容器：方形、细描边、无白底条 */
.mtry-swatch-img {
    display: block;
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: #e8e4d9;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
    transition: box-shadow .22s ease, transform .22s ease;
}
.mtry-swatch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* hover：只加深描边 + 极轻上浮，不再整块跳 */
.mtry-swatch:hover .mtry-swatch-img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
    transform: translateY(-2px);
}

/* 选中：清晰的双层描边，不加白框 */
.mtry-swatch[aria-pressed="true"] .mtry-swatch-img {
    box-shadow:
        0 0 0 1px #16201b,
        0 0 0 3px #eef1e7;
}

/* 编号在图下方，小字等宽，低对比 */
.mtry-swatch-code {
    display: block;
    margin-top: 7px;
    font-size: 9.5px;
    line-height: 1.2;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    color: rgba(238, 241, 231, .48);
    transition: color .2s ease;
}
.mtry-swatch:hover .mtry-swatch-code { color: rgba(238, 241, 231, .78); }
.mtry-swatch[aria-pressed="true"] .mtry-swatch-code {
    color: #eef1e7;
    font-weight: 600;
}

@media (max-width: 1100px) {
    .mh-materials .mtry-swatches {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)) !important;
        gap: 14px 12px !important;
    }
}

@media (max-width: 760px) {
    .mh-materials .mtry-stage { aspect-ratio: 1280 / 474 !important; }
    .mh-materials .mtry-swatches {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important;
        gap: 13px 11px !important;
    }
    .mtry-foot { flex-direction: column; gap: 14px; }
    .mh-materials .mh-head h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .mtry-swatch-img { transition: none !important; }
    .mtry-swatch:hover .mtry-swatch-img { transform: none; }
}

/* ==========================================================================
   色号卡结构修正（2026-10-26 r61）
   --------------------------------------------------------------------------
   r60 用 all:unset 重置，副作用太大（display 等被清、旧规则仍 !important）。
   这里用显式覆盖把结构固定下来：
     button.mtry-swatch
       > span.mtry-swatch-img > img
       > span.mtry-swatch-code
   ========================================================================== */

.mh-materials button.mtry-swatch:not([hidden]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font: inherit !important;
    color: inherit !important;
    box-sizing: border-box !important;
    text-align: center !important;
    cursor: pointer !important;
    position: relative !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
}

/* 图片容器 */
.mh-materials button.mtry-swatch > .mtry-swatch-img {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    background: #e8e4d9 !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14) !important;
    transition: box-shadow .22s ease, transform .22s ease !important;
}

.mh-materials button.mtry-swatch > .mtry-swatch-img > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* 编号 */
.mh-materials button.mtry-swatch > .mtry-swatch-code {
    display: block !important;
    position: static !important;
    margin-top: 7px !important;
    padding: 0 !important;
    background: none !important;
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    letter-spacing: .04em !important;
    font-variant-numeric: tabular-nums !important;
    color: rgba(238, 241, 231, .48) !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    transition: color .2s ease !important;
}

.mh-materials button.mtry-swatch:hover > .mtry-swatch-img {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) !important;
    transform: translateY(-2px) !important;
}
.mh-materials button.mtry-swatch:hover > .mtry-swatch-code {
    color: rgba(238, 241, 231, .78) !important;
}

.mh-materials button.mtry-swatch[aria-pressed="true"] > .mtry-swatch-img {
    box-shadow:
        0 0 0 1px #16201b,
        0 0 0 3px #eef1e7 !important;
}
.mh-materials button.mtry-swatch[aria-pressed="true"] > .mtry-swatch-code {
    color: #eef1e7 !important;
    font-weight: 600 !important;
}

/* 色号网格：确保可见 */
.mh-materials .mtry-swatches {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)) !important;
    gap: 18px 14px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 框架：viewBox 已裁到 bbox 并集，这里确保 svg 铺满且不裁切 */
.mh-materials .mtry-stage svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    padding: 0 !important;
}

/* pattern 现在按 viewBox 坐标系（160,167,1280,474） */

/* [hidden] 必须生效（上面的 display:block !important 会盖掉它） */
.mh-materials button.mtry-swatch[hidden],
.mh-materials button.mtry-swatch[style*="display: none"] {
    display: none !important;
}
