/* R54: compact mobile card grids and a readable quote comparison. */
body[data-mobile-layout] .vr-compare {
  background:#edf3f7;
  color:#17344f;
  border-block:1px solid #d8e3eb;
}
body[data-mobile-layout] .vr-compare::before { display:none; }
body[data-mobile-layout] .vr-compare-layout { gap:48px; align-items:start; }
body[data-mobile-layout] .vr-compare-layout > div { min-width:0; }
body[data-mobile-layout] .vr-compare h2 { color:#17344f; font-size:clamp(28px,3vw,38px); line-height:1.18; }
body[data-mobile-layout] .vr-compare p { color:#3d566a; font-size:15px; line-height:1.75; margin:17px 0; }
body[data-mobile-layout] .vr-compare .vr-large-icon { background:#fff; color:#8b6a39; border-color:#d5e0e9; margin-bottom:16px; width:46px; height:46px; }
body[data-mobile-layout] .vr-compare .vr-volume { color:#36536a; font-size:14px; background:#fff; border-left:3px solid #a5804e; padding:12px 14px; margin:18px 0 22px; border-radius:0 4px 4px 0; }
body[data-mobile-layout] .vr-compare .btn { background:#173f5f; border-color:#173f5f; color:#fff; min-height:48px; font-size:14px; }
body[data-mobile-layout] .vr-compare .btn:hover { background:#102f49; border-color:#102f49; }
body[data-mobile-layout] .vr-quote-paper { border:1px solid #cad9e4; box-shadow:none; padding:24px; border-radius:6px; }
body[data-mobile-layout] .vr-quote-paper h3 { color:#17344f; font-size:17px; }
body[data-mobile-layout] .vr-quote-paper ul { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0 0; }
body[data-mobile-layout] .vr-quote-paper li,
body[data-mobile-layout] .vr-quote-paper li:last-child { min-width:0; border:1px solid #dce5ec; padding:12px; background:#f5f8fa; border-radius:4px; gap:8px; line-height:1.5; font-size:14px; }
body[data-mobile-layout] .vr-quote-paper li .vr-icon { flex:none; color:#7c633f; }

@media(max-width:760px) {
  /* Repeated choices and cards use two columns. Main copy and contact fields keep their readable width. */
  body[data-mobile-layout] main :is(
    .visual-industry-grid,.r39-home-box-grid,.shape-grid,.grid-2,.grid-3,.industry-grid,
    .tile-list,.option-grid,.route-grid,.material-grid,.finish-options,
    .mf-grid,.mf-material-grid,.mf-finish-grid,.real-work-grid,.guide-grid,
    .vr-format-grid,.vr-price-grid,.stock-grid,.dp-spec-list,.dp-benefit-grid,
    .dp-service-grid,.dp-factory-grid,.r45-cards,.r49-bag-options,.r48-insert-grid,
    .factory-photo-grid,.factory-video-grid.portrait-grid,.service-steps,
    .check-grid,.feature-strip,.selling-points,.shipping-summary,.r47-related,
    .lt-choice-grid,.lt-real-grid,.lt-quote-grid,.lt-time-grid,.lt53-product-grid
  ),
  body[data-mobile-layout] main .vr-case-grid:not(.vr-count-1):not([data-visible-count="1"]) {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px 12px;
    overflow:visible;
    scroll-snap-type:none;
    align-items:stretch;
  }
  body[data-mobile-layout] main :is(
    .visual-industry-grid,.r39-home-box-grid,.shape-grid,.grid-2,.grid-3,.industry-grid,
    .tile-list,.option-grid,.route-grid,.material-grid,.finish-options,.guide-grid,
    .vr-format-grid,.vr-price-grid,.stock-grid,.dp-spec-list,.dp-benefit-grid,
    .dp-service-grid,.dp-factory-grid,.r45-cards,.r49-bag-options,.r48-insert-grid,
    .factory-photo-grid,.factory-video-grid.portrait-grid,.service-steps,.feature-strip,
    .selling-points,.shipping-summary,.r47-related,.vr-case-grid,.lt53-product-grid
  ) > * { min-width:0; width:auto; max-width:100%; }

  body[data-mobile-layout] main :is(
    .visual-industry-card,.r39-home-box-card,.shape-card,.industry-card,.tile,
    .option-card,.route-card,.material-card,.notice-card,.guide-card,.stock-card,
    .dp-spec-item,.r48-insert-card,.r49-bag-option,.vr-format-card,.vr-case-card,
    .dp-factory-grid figure,.factory-photo-grid figure,.service-steps article,
    .feature-strip article,.selling-points article,.shipping-summary article
  ) :is(h3,h4,strong) { overflow-wrap:anywhere; hyphens:auto; }

  body[data-mobile-layout] main :is(
    .visual-industry-card,.r39-home-box-card,.shape-card,.industry-card,.tile,
    .option-card,.route-card,.material-card,.notice-card,.guide-card,.stock-card,
    .dp-spec-item,.r48-insert-card,.vr-format-card,.vr-case-card,
    .dp-factory-grid figure,.factory-photo-grid figure,.service-steps article,
    .feature-strip article,.selling-points article,.shipping-summary article
  ) :is(h3,h4) { font-size:15px; line-height:1.4; letter-spacing:0; }
  body[data-mobile-layout] main :is(
    .shape-card,.industry-card,.tile,.option-card,.route-card,.material-card,
    .notice-card,.guide-card,.stock-card,.dp-spec-item,.r48-insert-card,
    .vr-format-card,.dp-factory-grid figure,.factory-photo-grid figure,
    .service-steps article,.feature-strip article,.selling-points article,
    .shipping-summary article
  ) p { font-size:13px; line-height:1.6; }
  body[data-mobile-layout] main :is(
    .shape-card,.industry-card,.route-card,.notice-card,.guide-card,
    .r39-home-box-card,.vr-format-card
  ) .text-link { font-size:12px; line-height:1.5; min-height:40px; overflow-wrap:anywhere; }

  body[data-mobile-layout] .visual-industry-card { border:1px solid #d8e2ea; background:#fff; }
  body[data-mobile-layout] .visual-industry-card img { aspect-ratio:4/3; object-fit:contain!important; }
  body[data-mobile-layout] .visual-industry-card > div { padding:12px 10px 6px; gap:8px; }
  body[data-mobile-layout] .visual-industry-card h3 { min-height:2.8em; margin:0; }
  body[data-mobile-layout] .visual-industry-card span { font-size:12px; white-space:normal; }
  body[data-mobile-layout] .visual-industry-card > svg { margin:4px 10px 10px; }
  body[data-mobile-layout] .lt-moq-badge { font-size:10px; padding:4px 6px; letter-spacing:.3px; }

  body[data-mobile-layout] .catalog-images > .shape-card { row-gap:10px; }
  body[data-mobile-layout] .shape-card .media { aspect-ratio:4/3; }
  body[data-mobile-layout] .shape-card small { font-size:10px; letter-spacing:.2px; }
  body[data-mobile-layout] .vr-card-price strong { font-size:21px; }
  body[data-mobile-layout] .vr-card-price small { font-size:11px; line-height:1.5; }
  body[data-mobile-layout] .vr-format-copy,
  body[data-mobile-layout] :is(.notice-card,.guide-card,.selling-points article,.shipping-summary article,.option-card,.route-card,.material-card) { padding:14px 12px; }
  body[data-mobile-layout] .vr-format-copy > p { margin-bottom:14px; min-height:0; }
  body[data-mobile-layout] .vr-format-copy h3 { margin-top:10px; }
  body[data-mobile-layout] .vr-format-price { gap:5px; }
  body[data-mobile-layout] .vr-format-price strong { font-size:20px; }
  body[data-mobile-layout] .vr-format-price :is(small,span) { font-size:11px; line-height:1.5; }

  body[data-mobile-layout] .vr-case-caption { padding-top:10px; }
  body[data-mobile-layout] .vr-case-caption h3 { margin-bottom:6px; }
  body[data-mobile-layout] .vr-tags { gap:4px 7px; }
  body[data-mobile-layout] .vr-tags span { font-size:11px; line-height:1.5; }
  body[data-mobile-layout] .vr-tags span + span { padding-left:7px; }
  body[data-mobile-layout] .vr-case-image > img { aspect-ratio:4/3; height:auto; object-fit:contain; }
  body[data-mobile-layout] .vr-case-play .vr-play-disc { width:42px; height:42px; }
  body[data-mobile-layout] .vr-price-grid { gap:0!important; }
  body[data-mobile-layout] .vr-price-grid > a { min-width:0; display:flex; flex-direction:column; align-items:flex-start; padding:16px 12px; gap:10px; border:0; border-right:1px solid #dce3e6; border-bottom:1px solid #dce3e6; }
  body[data-mobile-layout] .vr-price-grid > a:nth-child(2n) { border-right:0; }
  body[data-mobile-layout] .vr-price-grid > a > div { flex:initial; width:100%; min-width:0; }
  body[data-mobile-layout] .vr-price-grid .vr-price-symbol { display:none; }
  body[data-mobile-layout] .vr-price-grid .lt-moq-badge { order:initial; margin:0; position:static; }
  body[data-mobile-layout] .vr-price-grid h3 { font-size:14px; line-height:1.5; }
  body[data-mobile-layout] .vr-price-grid p strong { font-size:25px; }

  body[data-mobile-layout] .dp-spec-item { padding:13px 11px; }
  body[data-mobile-layout] .dp-spec-item .r45-spec-media { margin:-13px -11px 13px; }
  body[data-mobile-layout] .dp-spec-item .r45-spec-title { font-size:15px; line-height:1.4; align-items:flex-start; }
  body[data-mobile-layout] .dp-spec-item .r45-spec-title .vr-icon { width:16px; height:16px; margin-top:2px; }
  body[data-mobile-layout] .r45-spec-description > p { font-size:13px; line-height:1.6; }
  body[data-mobile-layout] .r45-spec-media figcaption { font-size:11px; line-height:1.5; }
  body[data-mobile-layout] .dp-factory-grid figcaption,
  body[data-mobile-layout] .factory-photo-grid figcaption { padding:10px 0 0; }
  body[data-mobile-layout] .r47-related a { white-space:normal; min-width:0; overflow-wrap:anywhere; }

  /* A short bottom bar avoids covering the right-hand column with floating buttons. */
  body[data-mobile-layout] { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
  body[data-mobile-layout] .contact-dock.mobile-bar { inset:auto 0 0 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; width:auto; max-width:none; padding:8px 8px max(8px,env(safe-area-inset-bottom)); border-top:1px solid #d6e2ea; background:#fffffff5; box-shadow:0 -3px 16px #17344f0d; pointer-events:auto; }
  body[data-mobile-layout] .contact-dock.mobile-bar > a { display:flex; align-items:center; justify-content:center; gap:5px; width:auto; height:44px; min-width:0; flex:initial; padding:7px 3px; border-radius:5px; box-shadow:none; }
  body[data-mobile-layout] .contact-dock.mobile-bar > a > span { position:static; width:auto; height:auto; margin:0; overflow:visible; clip-path:none; font-size:12px; line-height:1.25; white-space:normal; text-align:center; }
  body[data-mobile-layout] .contact-dock.mobile-bar .icon { width:17px; height:17px; }
  body[data-mobile-layout] .contact-dock.mobile-bar > a::after { display:none; }
  body[data-mobile-layout].contact-keyboard-open .contact-dock.mobile-bar { display:none; }

  /* Two compact thumbnail choices per row, retaining a readable image and label. */
  body[data-mobile-layout] .lt53-form .lt53-product-grid { gap:10px; }
  body[data-mobile-layout] .lt53-form .lt53-product { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; min-height:124px; padding:4px 6px 8px; }
  body[data-mobile-layout] .lt53-form .lt53-product img { width:80px!important; height:64px!important; max-width:calc(100% - 20px); margin:4px auto 6px; }
  body[data-mobile-layout] .lt53-form .lt53-product > span { padding:0 2px; min-height:38px; font-size:13px; line-height:1.45; text-align:center; justify-content:center; overflow-wrap:anywhere; hyphens:auto; }
  body[data-mobile-layout] .lt53-form .lt53-product input[type=checkbox] { top:7px; right:7px; transform:none; width:20px; height:20px; }

  body[data-mobile-layout] .vr-compare-layout { gap:24px; }
  body[data-mobile-layout] .vr-compare h2 { font-size:28px; }
  body[data-mobile-layout] .vr-compare p { font-size:14px; line-height:1.75; }
  body[data-mobile-layout] .vr-compare .btn { display:flex; align-items:center; justify-content:center; width:100%; }
  body[data-mobile-layout] .vr-quote-paper { padding:18px; }
  body[data-mobile-layout] .vr-quote-paper h3 { font-size:16px; }
  body[data-mobile-layout] .vr-quote-paper li,
  body[data-mobile-layout] .vr-quote-paper li:last-child { padding:10px 8px; font-size:13px; }
}

@media(max-width:430px) {
  body[data-mobile-layout] .site-header .header-row { grid-template-columns:100px minmax(0,1fr) 32px; gap:10px; min-height:66px; }
  body[data-mobile-layout] .site-header .logo { grid-column:1; grid-row:1; justify-self:start; min-width:0; max-width:100px; }
  body[data-mobile-layout] .site-header .logo b { font-size:22px; letter-spacing:3px; }
  body[data-mobile-layout] .site-header .logo span { font-size:8px; letter-spacing:2.4px; }
  body[data-mobile-layout] .site-header .header-contacts { grid-column:2; grid-row:1; justify-self:stretch; display:flex; justify-content:center; gap:0; min-width:0; }
  body[data-mobile-layout] .site-header .header-contacts > .contact-direct { display:none; }
  body[data-mobile-layout] .site-header .header-cta { width:100%; min-width:0; min-height:40px; white-space:normal; font-size:12px; line-height:1.25; padding:8px 10px; text-align:center; justify-content:center; }
  body[data-mobile-layout] .site-header .header-cta svg { width:14px; height:14px; flex:none; }
  body[data-mobile-layout] .site-header .mobile-menu { grid-column:3; grid-row:1; justify-self:end; width:32px; min-width:32px; }
}

/* Article tables use the article width rather than the legacy 620px minimum. */
body[data-mobile-layout] main :is(.legacy-article,.prose) table {
  display:table;
  min-width:0;
  width:100%;
  max-width:100%;
  table-layout:fixed;
}
body[data-mobile-layout] main :is(.legacy-article,.prose) :is(th,td) {
  overflow-wrap:anywhere;
  word-break:normal;
}
@media(max-width:760px) {
  body[data-mobile-layout] main :is(.legacy-article,.prose) :is(th,td) {
    padding:10px 8px;
    font-size:13px;
    line-height:1.6;
  }
}
