.size-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.size-guide-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.size-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 31, 0.52);
  backdrop-filter: blur(2px);
}

.size-guide-modal__dialog {
  position: relative;
  width: min(1040px, calc(100vw - 96px));
  max-width: 100%;
  max-height: min(76vh, calc(100vh - 36px));
  max-height: min(76dvh, calc(100dvh - 36px));
  min-height: 0;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(15, 28, 45, 0.18);
  background: #fbfcfd;
  box-shadow: 0 22px 54px rgba(4, 12, 24, 0.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.size-guide-modal__header {
  position: relative;
  display: block;
  padding: 28px 32px 0;
}

.size-guide-modal__title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #0f1c2d;
  border-bottom: 1px solid rgba(15, 28, 45, 0.16);
  padding-bottom: 14px;
  line-height: 1.35;
}

.size-guide-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 1px solid rgba(15, 28, 45, 0.16);
  background: transparent;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font: 20px/1 Arial, sans-serif;
  cursor: pointer;
  padding: 0;
  color: #0f1c2d;
}

.size-guide-modal__close:hover {
  background: #edf1f4;
}

.size-guide-modal__close:focus-visible {
  background: #edf1f4;
  outline: 2px solid #2b4a66;
  outline-offset: 2px;
}

.size-guide-modal__content {
  padding: 0 32px 32px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.size-guide-content {
  display: grid;
  gap: 12px;
}

.size-guide-block {
  min-width: 0;
  margin: 0 0 16px;
  border: 1px solid #e0e5e9;
  border-radius: 6px;
  background: #ffffff;
  padding: 16px;
}

.size-guide-block:last-child {
  margin-bottom: 0;
}

.size-guide-block__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #12243a;
  line-height: 1.4;
}

.size-guide-table-wrap {
  overflow: auto;
  border: 1px solid #d8dee4;
  border-radius: 5px;
  background: #ffffff;
}

.size-guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.size-guide-table th,
.size-guide-table td {
  border: 1px solid #e2e6ea;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.4;
}

.size-guide-table th {
  background: #17283a;
  color: #f8fafc;
  font-weight: 600;
  letter-spacing: 0;
}

.size-guide-table td {
  color: #303b46;
}

.size-guide-table tr:nth-child(even) td {
  background: #f7f8f9;
}

.size-guide-table tr:hover td {
  background: #eff3f5;
}

.size-guide-remark__item {
  margin-bottom: 12px;
  border-top: 1px solid #e6eaed;
  padding: 12px 0 0;
}

.size-guide-remark__item:last-child {
  margin-bottom: 0;
}

.size-guide-remark__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #12243a;
}

.size-guide-remark__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.58;
  color: #4b5661;
}

.size-guide-extra-content {
  margin-top: 2px;
}

.size-guide-extra-content__group {
  margin-bottom: 12px;
  padding: 12px 0 0;
  border-top: 1px solid #e6eaed;
}

.size-guide-extra-content__group:last-child {
  margin-bottom: 0;
}

.size-guide-extra-content__group-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #34485d;
}

.size-guide-extra-content__name {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #142b45;
}

.size-guide-extra-content ul {
  margin: 0;
  padding-left: 18px;
}

.size-guide-extra-content li {
  margin-bottom: 4px;
  line-height: 1.45;
}

.size-guide-extra-content li:last-child {
  margin-bottom: 0;
}

.size-guide-empty {
  margin: 0;
  padding: 24px 18px;
  text-align: center;
  border: 1px dashed #c7d0d8;
  border-radius: 6px;
  color: #17304a;
  background: #ffffff;
}

[data-size-guide-container] {
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms ease, visibility 0s linear 0s;
}

[data-size-guide-container].size-guide-container--unavailable {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

body.size-guide-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .size-guide-modal,
  [data-size-guide-container],
  [data-size-guide-container].size-guide-container--unavailable {
    transition: none;
  }
}

@media (max-width: 767px) {
  .size-guide-modal {
    padding: 8px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .size-guide-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 8px;
  }

  .size-guide-modal__header {
    padding: 16px 48px 0 16px;
  }

  .size-guide-modal__title {
    margin: 0 0 12px;
    font-size: 15px;
    letter-spacing: 0;
    padding-bottom: 8px;
  }

  .size-guide-modal__close {
    top: 10px;
    right: 10px;
  }

  .size-guide-modal__content {
    padding: 0 10px 10px;
  }

  .size-guide-block {
    padding: 12px;
  }

  .size-guide-block__title {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .size-guide-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }

  .size-guide-modal .size-guide-table tbody tr > :first-child {
    position: sticky;
    left: 0;
    background: #ffffff;
    color: #12243a;
    z-index: 1;
  }

  .size-guide-modal .size-guide-table tbody tr:nth-child(even) > :first-child {
    background: #f7f8f9;
  }

  .size-guide-modal .size-guide-table tbody tr:hover > :first-child {
    background: #eff3f5;
  }

  .size-guide-modal .size-guide-table thead tr > :first-child {
    position: sticky;
    left: 0;
    background: #17283a;
    color: #f8fafc;
    z-index: 2;
  }

  .size-guide-table th,
  .size-guide-table td {
    padding: 6px 4px;
    font-size: clamp(10px, 2.8vw, 12px);
    line-height: 1.3;
  }
}
