.ciel-tryon-button {
  position: absolute;
  top: clamp(1.25rem, 4vw, 3rem);
  left: clamp(1.25rem, 5vw, 4.75rem);
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: clamp(5rem, 8vw, 8.5rem);
  aspect-ratio: 1;
  border: 1px solid rgba(22, 20, 18, 0.7);
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.42);
  color: #161412;
  font: 600 0.62rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.ciel-tryon-button:hover {
  background: #161412;
  color: #fbf8f2;
  transform: scale(1.03);
}

.ciel-tryon-button__mark {
  font-family: Fraunces, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.55rem);
  font-weight: 300;
  letter-spacing: 0;
}

.ciel-tryon-button__text {
  max-width: 4.5rem;
  text-align: center;
  line-height: 1.2;
}

[data-ciel-tryon-root] {
  position: absolute;
  inset: 0 auto auto 0;
  pointer-events: none;
}

[data-ciel-tryon-root] .ciel-tryon-button,
[data-ciel-tryon-root] .ciel-tryon-modal {
  pointer-events: auto;
}

.product-information,
[data-testid="product-information-details"] {
  position: relative;
}

.ciel-tryon-submit {
  width: 100%;
  min-height: 3.25rem;
  border: 1px solid #161412;
  background: transparent;
  color: #161412;
  font: 600 0.72rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

.ciel-tryon-submit:hover {
  background: #161412;
  color: #fbf8f2;
}

@media (max-width: 749px) {
  .ciel-tryon-button {
    top: 1rem;
    left: 1rem;
    width: 4.5rem;
  }

  .ciel-tryon-button__text {
    display: none;
  }
}

.ciel-tryon-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  border: 0;
  padding: 0;
  background: #fbf8f2;
  color: #161412;
  overflow: auto;
}

.ciel-tryon-modal::backdrop {
  background: rgba(10, 10, 10, 0.44);
  backdrop-filter: blur(8px);
}

.ciel-tryon-panel {
  position: relative;
  display: grid;
  gap: 0.95rem;
  padding: clamp(1.25rem, 4vw, 2rem);
}

.ciel-tryon-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.ciel-tryon-eyebrow {
  margin: 0;
  font: 600 0.68rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ciel-tryon-panel h3 {
  margin: 0;
  font-family: Fraunces, serif;
  font-weight: 300;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  line-height: 0.98;
}

.ciel-tryon-upload {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid rgba(22, 20, 18, 0.16);
  background: #fff;
}

.ciel-tryon-upload small {
  color: rgba(22, 20, 18, 0.62);
  font: 400 0.78rem/1.4 Inter, system-ui, sans-serif;
}

.ciel-tryon-result {
  width: 100%;
  display: block;
  background: #fff;
}

.ciel-tryon-result-wrap[hidden],
.ciel-tryon-result[hidden] {
  display: none !important;
}

.ciel-tryon-status {
  min-height: 1.2em;
  margin: 0;
  font: 400 0.8rem/1.5 Inter, system-ui, sans-serif;
}

@media (max-width: 749px) {
  .ciel-tryon-modal {
    width: calc(100vw - 24px);
    max-width: none;
    max-height: calc(100dvh - 96px);
    margin: auto;
  }

  .ciel-tryon-panel {
    gap: 0.8rem;
    padding: 1.1rem;
  }

  .ciel-tryon-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 2.6rem;
    height: 2.6rem;
    background: #161412;
    color: #fbf8f2;
    font-size: 1rem;
  }

  .ciel-tryon-eyebrow {
    max-width: calc(100% - 3.2rem);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .ciel-tryon-panel h3 {
    max-width: calc(100% - 1rem);
    font-size: clamp(1.55rem, 8vw, 2rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .ciel-tryon-upload {
    padding: 0.85rem;
  }

  .ciel-tryon-upload input {
    max-width: 100%;
    font-size: 0.85rem;
  }

  .ciel-tryon-submit {
    min-height: 3rem;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }
}
