.size-guide-modal {
  margin-bottom: 1.25rem;
}

.size-guide-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  background: rgba(26, 107, 107, 0.12);
  border: 1px solid rgba(42, 138, 138, 0.55);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.size-guide-trigger:hover {
  background: rgba(26, 107, 107, 0.26);
  border-color: var(--teal-light);
  color: var(--white);
}

.size-guide-trigger:focus-visible,
.size-guide-close:focus-visible,
.size-guide-full-link:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.size-guide-dialog {
  width: min(680px, calc(100vw - 2rem));
  max-width: 680px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid rgba(42, 138, 138, 0.55);
  border-radius: 6px;
  background: var(--navy-mid);
  color: var(--white);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.size-guide-dialog::backdrop {
  background: rgba(1, 7, 14, 0.78);
  backdrop-filter: blur(3px);
}

.size-guide-dialog[open] {
  animation: sizeGuideDialogIn 0.2s ease-out;
}

@keyframes sizeGuideDialogIn {
  from { opacity: 0; transform: translateY(0.75rem) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.size-guide-dialog-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
}

.size-guide-dialog-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.size-guide-kicker,
.size-guide-section-label {
  display: block;
  color: rgba(232, 99, 58, 0.85);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.size-guide-dialog h2 {
  margin-top: 0.4rem;
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
}

.size-guide-dialog h3 {
  margin-top: 0.35rem;
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}

.size-guide-dialog h4 {
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
}

#size-guide-description {
  max-width: 510px;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
  line-height: 1.6;
}

.size-guide-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -0.35rem -0.35rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.size-guide-close:hover {
  border-color: var(--coral);
  background: rgba(232, 99, 58, 0.1);
  color: var(--white);
}

.size-guide-dialog-content {
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem 1.75rem 1.75rem;
  overscroll-behavior: contain;
}

.size-guide-section-heading {
  margin-bottom: 0.75rem;
}

.size-guide-note {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
}

.size-guide-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.size-guide-group {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s, background 0.2s;
}

.size-guide-group.is-active {
  border-color: rgba(42, 138, 138, 0.85);
  background: rgba(26, 107, 107, 0.14);
}

.size-guide-group.is-active h4 {
  color: var(--teal-light);
}

.size-guide-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  list-style: none;
}

.size-guide-group li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 3px;
}

.size-guide-size {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
}

.size-guide-available {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.size-guide-fit {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.size-guide-fit-section + .size-guide-fit-section {
  margin-top: 1.35rem;
}

.size-guide-fit-section p {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  line-height: 1.65;
}

.size-guide-table-wrap {
  overflow-x: auto;
  margin-top: 0.9rem;
}

.size-guide-table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.size-guide-table th {
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(232, 99, 58, 0.85);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.size-guide-table td {
  padding: 0.55rem 0.7rem 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.size-guide-table tr:last-child td { border-bottom: none; }

.size-guide-full-link {
  display: inline-block;
  margin-top: 1.75rem;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.size-guide-full-link:hover { color: var(--white); }

@media (max-width: 600px) {
  .size-guide-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .size-guide-dialog-panel {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .size-guide-dialog-header {
    padding: 1.25rem 1.25rem 1rem;
  }

  .size-guide-dialog h2 { font-size: 1.7rem; }

  .size-guide-dialog-content { padding: 1.25rem; }

  .size-guide-groups { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .size-guide-dialog[open] { animation: none; }
  .size-guide-trigger,
  .size-guide-close,
  .size-guide-group { transition: none; }
}
