.size-guide {
  width: min(740px, calc(100% - 24px));
  max-width: calc(100% - 24px);
  max-height: calc(100svh - 24px);
  margin: auto;
  padding: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}
.size-guide h2 {
  clear: both;
  font-size: clamp(20px, 5vw, 28px);
}
.size-guide .close {
  float: right;
  min-height: 44px;
}
.size-guide-unit {
  display: flex;
  gap: 12px;
  align-items: center;
}
.size-guide-unit select {
  width: 90px;
  min-height: 44px;
  font-size: 16px;
}
.size-guide-table {
  width: 100%;
  table-layout: fixed;
}
.size-guide-table th,
.size-guide-table td {
  overflow-wrap: anywhere;
  padding: 10px;
}
.size-guide-table small {
  display: block;
  font-size: 11px;
  font-weight: normal;
}
.product-size-field {
  min-width: 0;
}
.product-size-field label {
  display: block;
}
.product-size-field #size-guide {
  margin-top: 8px;
}
/* The Guide still receives focus after closing. Only its returned pointer
   focus loses the ring; the latest keyboard interaction retains a fine cue. */
#size-guide[data-guide-focus="pointer"]:focus {
  outline: none;
}
#size-guide[data-guide-focus="keyboard"]:focus {
  outline: 1px solid var(--studio-focus, var(--storefront-focus, #b4b6af));
  outline-offset: 3px;
}
.studio-size-group {
  display: flex;
  gap: 6px;
  align-items: end;
  min-width: 0;
}
.studio-page .studio-header {
  grid-template-columns: 56px minmax(0, 1fr) 126px;
  gap: 8px;
}
.studio-page #studio-size {
  width: 58px;
  padding-left: 4px;
  padding-right: 0;
}
.studio-page .size-guide .close {
  width: auto;
  margin: 0;
}
.studio-size-group .studio-size-label {
  min-width: 0;
  flex: 1;
}
.studio-size-group #size-guide {
  min-height: 44px;
  padding: 4px 6px;
  font-size: 11px;
  line-height: 16px;
  width: 62px;
  flex-shrink: 0;
  white-space: normal;
}
@media (max-width: 600px) {
  .size-guide {
    padding: 14px;
  }
  .size-guide-table {
    display: block;
  }
  .size-guide-table caption,
  .size-guide-table tbody {
    display: block;
  }
  .size-guide-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .size-guide-table tr {
    display: block;
    border: 1px solid #555;
    margin: 10px 0;
  }
  .size-guide-table th[scope="row"] {
    display: block;
    text-align: left;
    background: #252626;
  }
  .size-guide-table td {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 10px;
    align-items: center;
    text-align: right;
  }
  .size-guide-table td::before {
    content: attr(data-label);
    text-align: left;
  }
  .size-guide-table td span {
    white-space: nowrap;
  }
  .studio-size-group .studio-size-label select {
    width: 58px;
    padding-left: 4px;
    padding-right: 0;
    font-size: 16px;
  }
}
