.size-guide-entry-v31, .measure-sheet {
  margin: 12px 0; color: #161616; background: #f7f6f3;
  border: 1px solid #d8d6d1; border-radius: 10px; min-width: 0;
}
.size-guide-entry-v31[hidden] { display: none }
.size-guide-entry-v31 > summary, .measure-sheet > summary {
  min-height: 48px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
  list-style: none; cursor: pointer; font-size: 16px; font-weight: 600;
}
.size-guide-entry-v31 > summary::-webkit-details-marker, .measure-sheet > summary::-webkit-details-marker { display: none }
.size-guide-entry-v31 > summary::after, .measure-sheet > summary::after {
  content: ''; width: 9px; height: 9px; margin: 0 4px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg);
}
.size-guide-entry-v31[open] > summary::after, .measure-sheet[open] > summary::after { transform: rotate(225deg) }
.size-guide-entry-v31 small { display: none }
.size-guide-fallback-v31 { padding: 0 14px 14px }
.measure-sheet { width: 100%; box-sizing: border-box; scroll-margin-top: 5rem }
.measure-sheet[open] > summary { border-bottom: 1px solid #d8d6d1 }
.measure-content { padding: 10px clamp(8px, 2vw, 18px) 14px }
.measure-content [data-size-selection], .size-guide-shell-v31 [data-size-guide-context-title] {
  margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #43413d;
}
.measure-layout {
  display: grid; grid-template-columns: minmax(215px,.85fr) minmax(230px,1.15fr);
  gap: clamp(10px, 2vw, 24px); align-items: start; color: #161616;
}
.measure-layout > * { min-width: 0 }
.measure-visual { margin: 0; padding: 0 }
.measure-visual img { display: block; width: min(100%, 270px); height: auto; margin: auto }
.measure-table { width: 100%; min-width: 0; border-spacing: 0; table-layout: fixed; font-size: 14px; font-variant-numeric: tabular-nums }
.measure-table caption { padding: 4px 0 6px; text-align: left; font-size: 13px; font-weight: 500 }
.measure-table :is(th,td) { padding: 4px 1px; text-align: center; line-height: 1.35; border-bottom: 1px solid #d7d5d1 }
.measure-table thead { background: #e9e6df }
.measure-table th:first-child { width: 19% }
.measure-table thead th { font-size: clamp(12px, 3.3vw, 14px); font-weight: 600 }
.measure-note { margin: 8px 0 0; color: #504f4c; font-size: 12px; line-height: 1.4 }
.size-guide-dialog-v31 { color: #161616; background: #faf9f6; box-sizing: border-box; width: min(720px,calc(100vw - 16px)); max-width: none;
  max-height: calc(100dvh - 16px); padding: 0; margin: auto; border: 1px solid #bab7b0; border-radius: 12px; overflow-y: auto; }
.size-guide-dialog-v31::backdrop { background: rgb(0 0 0 / .6) }
.size-guide-shell-v31 { padding: clamp(12px, 3vw, 26px) }
.size-guide-heading-v31 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px }
.size-guide-heading-v31 h2 { font-size: clamp(21px,3vw,30px); line-height: 1.15; margin: 0 }
.size-guide-close-v31 { width: 44px; height: 44px; font-size: 25px; color: inherit; border: 0; background: transparent; cursor: pointer }
.size-guide-entry-v31 > summary:focus-visible, .measure-sheet > summary:focus-visible, .size-guide-close-v31:focus-visible { outline: 3px solid #a94600; outline-offset: 2px }
.measure-layout > [hidden] + div { grid-column: 1/-1 }
.measure-sheet, .size-guide-shell-v31 { container-type: inline-size }
@container (max-width: 520px) {
  .measure-layout { grid-template-columns: minmax(0,1fr); gap: 6px }
}
@media (max-width: 600px) {
  .measure-layout { grid-template-columns: minmax(0,1fr); gap: 6px }
  .measure-table :is(th,td) { padding-block: 3px }
  .measure-sheet { scroll-margin-top: 12px }
}

/* Let the sheet use part of the card’s side gutters on a narrow phone. */
@media (max-width: 400px) {
  .textile-options .measure-sheet {
    width: calc(100% + 32px);
    margin-inline: -16px;
  }
  .measure-content { padding-inline: 6px }
  .measure-table { table-layout: auto }
  .measure-table th:first-child { width: auto }
  .measure-table thead th { white-space: nowrap }
}
