/* AI Try-On (/try-on), the web twin of the customer app's Try On.

   The view is a React island (customer/tryon-island). Its palette is the
   app's PhotoTryOnTheme: mint, periwinkle and violet, soft action tints with
   near-black labels, and a deep night stage while the AI works. Everything
   is scoped under .rl-tryon (the page) and .rl-tryon-layer (overlays on
   <body>). */

.rl-tryon,
.rl-tryon-layer {
  --tg-mint: #8ff7d2;
  --tg-peri: #93a2f7;
  --tg-violet: #a98bf0;
  --tg-ink: #141c2b;
  --tg-gradient: linear-gradient(135deg, #8ff7d2 0%, #93a2f7 50%, #a98bf0 100%);
  --tg-action: linear-gradient(135deg, #adf6dd 0%, #b7c0f9 52%, #c8b2f5 100%);
  --tg-surface: linear-gradient(135deg, rgba(143, 247, 210, 0.12) 0%, rgba(169, 139, 240, 0.07) 50%, rgba(255, 255, 255, 0) 100%);
  --tg-label: #16151b;
  --tg-secondary: #6b6874;
  --tg-fill: #f1f0f4;
  --tg-line: rgba(22, 21, 27, 0.1);
  --tg-accent: #7a52dd;
  --tg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tg-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: var(--tg-font);
  -webkit-font-smoothing: antialiased;
}

/* The site animates every button's transform with a CSS transition; motion
   drives these frame by frame, so transitions stay off transform here. */
.rl-tryon :is(button, a, input),
.rl-tryon-layer :is(button, a, input) {
  min-height: 0;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.rl-tryon :is(button, a, [role="slider"], input):focus-visible,
.rl-tryon-layer :is(button, a, [role="slider"], input):focus-visible {
  outline: 3px solid var(--tg-accent);
  outline-offset: 2px;
}

.rl-tryon button:disabled,
.rl-tryon-layer button:disabled {
  cursor: default;
  opacity: 1;
}

.rl-tryon :where(h1, h2, h3, p, figure, ol, ul),
.rl-tryon-layer :where(h1, h2, h3, p, figure, ol, ul) {
  margin: 0;
}

.rl-tryon-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Page frame ---------- */

body.tryon-studio-mode {
  overflow: hidden;
}

body.tryon-studio-mode .customer-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.tryon-studio-mode .customer-footer {
  display: none;
}

body.tryon-studio-mode .customer-shell > .page-wrap {
  width: min(1440px, calc(100% - 40px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 12px 0 20px;
  overflow: hidden;
}

.rl-tryon-host {
  position: relative;
  height: 100%;
  min-height: 0;
}

.rl-tryon-boot {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  height: 100%;
  min-height: 320px;
  border-radius: 30px;
  background: var(--tg-surface, linear-gradient(135deg, rgba(143, 247, 210, 0.12), rgba(169, 139, 240, 0.07))), #fff;
  color: #6b6874;
  font-size: 14px;
}

.rl-tryon-boot > span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#8ff7d2, #93a2f7, #a98bf0, #e6a8f2, #8ff7d2);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: rl-tryon-spin 1.1s linear infinite;
}

.rl-tryon-boot.is-error h1 {
  font-size: 20px;
  color: #16151b;
}

.rl-tryon {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--tg-label);
  background: #fff;
}

.rl-tryon::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 410px;
  background: var(--tg-surface);
  pointer-events: none;
  z-index: -1;
}

.rl-tryon.is-wide {
  border: 1px solid rgba(22, 21, 27, 0.07);
  border-radius: 30px;
  box-shadow: 0 30px 70px -40px rgba(66, 48, 140, 0.35), 0 2px 6px rgba(22, 21, 27, 0.04);
}

.rl-tryon-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rl-tryon-screen.is-wide {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
}

.rl-tryon-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(143, 247, 210, 0.3), rgba(143, 247, 210, 0) 58%),
    radial-gradient(110% 90% at 100% 100%, rgba(169, 139, 240, 0.26), rgba(169, 139, 240, 0) 58%),
    linear-gradient(160deg, #f7f6fc 0%, #eef0fb 100%);
  border-right: 1px solid rgba(22, 21, 27, 0.06);
}

.rl-tryon-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.rl-tryon-screen.is-wide > .rl-tryon-panel {
  padding: 26px 32px 28px;
}

/* ---------- Buttons ---------- */

.rl-tryon-action,
.rl-tryon-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 54px !important;
  padding: 0 22px;
  border-radius: 19px;
  font: 700 16px/1.1 var(--tg-font);
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}

.rl-tryon-action {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--tg-action);
  color: var(--tg-label);
  box-shadow: 0 5px 14px rgba(145, 107, 232, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* A slow sheen crosses the primary action on hover. */
.rl-tryon-action::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  transform: translateX(-30%) skewX(-18deg);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

@media (hover: hover) {
  .rl-tryon-action:not(:disabled):hover {
    box-shadow: 0 12px 28px -6px rgba(145, 107, 232, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    filter: saturate(1.12);
  }

  .rl-tryon-action:not(:disabled):hover::after {
    opacity: 1;
    animation: rl-tryon-sheen 1.1s var(--tg-ease) both;
  }
}

.rl-tryon-action:disabled {
  border-color: transparent;
  background: var(--tg-fill);
  color: #8e8b96;
  box-shadow: none;
}

.rl-tryon-action.is-done:disabled {
  background: var(--tg-action);
  color: var(--tg-label);
  box-shadow: none;
  opacity: 0.92;
}

.rl-tryon-action.is-trailing-icon {
  flex-direction: row-reverse;
}

.rl-tryon-action > svg,
.rl-tryon-secondary > svg {
  flex: none;
}

.rl-tryon-secondary {
  border: 1.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--tg-gradient) border-box;
  color: var(--tg-label);
  box-shadow: 0 1px 2px rgba(22, 21, 27, 0.04);
}

@media (hover: hover) {
  .rl-tryon-secondary:not(:disabled):hover {
    box-shadow: 0 10px 24px -10px rgba(145, 107, 232, 0.45);
  }
}

.rl-tryon-secondary:disabled {
  opacity: 0.5;
}

.rl-tryon-icon-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--tg-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tg-label);
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-icon-button:not(:disabled):hover {
    background: var(--tg-fill);
  }
}

.rl-tryon-icon-button:disabled {
  opacity: 0.4;
}

.rl-tryon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px !important;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--tg-accent);
  font: 650 15px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-text-button.is-centered {
  justify-self: center;
  width: 100%;
}

.rl-tryon-text-button:disabled {
  opacity: 0.45;
}

.rl-tryon-library-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--tg-fill);
  color: var(--tg-label);
  font: 650 13px var(--tg-font);
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-library-pill:hover {
    background: #e7e5ee;
  }
}

.rl-tryon-spinner {
  width: 18px;
  height: 18px;
  flex: none;
  border: 2.2px solid rgba(22, 21, 27, 0.16);
  border-top-color: var(--tg-label);
  border-radius: 50%;
  animation: rl-tryon-spin 0.8s linear infinite;
}

.rl-tryon-spinner.is-large {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.rl-tryon-spinner.is-light {
  border-color: rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
}

/* ---------- Start ---------- */

.rl-tryon-start:not(.is-wide) {
  padding: 4px 20px 18px;
  text-align: center;
}

.rl-tryon-start-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 6px;
  text-align: left;
}

.rl-tryon-start-header h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rl-tryon-start-showcase {
  flex: 1 1 auto;
  min-height: 190px;
  max-height: 330px;
  margin: 4px 0 10px;
}

.rl-tryon-start-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.rl-tryon .rl-tryon-title {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.rl-tryon .rl-tryon-lede {
  max-width: 360px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tg-secondary);
}

.rl-tryon-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px !important;
  padding: 0;
  list-style: none;
}

.rl-tryon-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 650;
}

.rl-tryon-step-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tg-action);
  color: var(--tg-label);
}

.rl-tryon-steps-chevron {
  color: rgba(107, 104, 116, 0.6);
}

.rl-tryon-start-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.rl-tryon-drop-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--tg-secondary);
  font-size: 13px;
}

.rl-tryon-privacy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  min-height: 40px !important;
  color: var(--tg-secondary);
  font-size: 13px;
  font-weight: 650;
}

@media (hover: hover) {
  .rl-tryon-privacy:hover {
    color: var(--tg-label);
  }
}

.rl-tryon-start.is-wide .rl-tryon-start-stage {
  display: grid;
  place-items: center;
}

.rl-tryon-start.is-wide .rl-tryon-showcase {
  width: 100%;
  height: min(80%, 600px);
}

.rl-tryon-start-panel {
  justify-content: center;
}

.rl-tryon-screen.is-wide > .rl-tryon-start-panel {
  padding: 40px clamp(32px, 4vw, 64px);
}

.rl-tryon-brandline {
  position: absolute;
  top: 26px;
  left: clamp(32px, 4vw, 64px);
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rl-tryon-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(22, 21, 27, 0.08), 0 6px 16px -10px rgba(145, 107, 232, 0.5);
  font-size: 13px;
  font-weight: 700;
}

.rl-tryon-eyebrow svg {
  color: #8f6fea;
}

.rl-tryon-start.is-wide .rl-tryon-start-copy {
  justify-items: start;
  gap: 14px;
  max-width: 470px;
}

.rl-tryon-start.is-wide .rl-tryon-title {
  font-size: clamp(36px, 3.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.rl-tryon-start.is-wide .rl-tryon-lede {
  max-width: 440px;
  font-size: 17px;
}

.rl-tryon-start.is-wide .rl-tryon-steps {
  justify-content: flex-start;
  margin-top: 6px !important;
}

.rl-tryon-start.is-wide .rl-tryon-start-actions {
  max-width: 400px;
  margin-top: 34px;
  padding-top: 0;
}

/* The hand of cards. */
.rl-tryon-showcase {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.rl-tryon-showcase-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--tg-gradient);
  filter: blur(50px);
  opacity: 0.38;
  pointer-events: none;
}

.rl-tryon-showcase-float {
  position: absolute;
  inset: 0;
}

.rl-tryon-showcase.is-moving .rl-tryon-showcase-float {
  animation: rl-tryon-float 3s ease-in-out infinite alternate;
}

.rl-tryon-showcase-card {
  position: absolute;
  left: 50%;
  top: 50%;
  overflow: hidden;
  border-radius: 28px;
  background: #e9e7ef;
  box-shadow: 0 16px 34px -12px rgba(22, 21, 27, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.75);
  will-change: transform;
}

.rl-tryon-showcase-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.rl-tryon-showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.rl-tryon-showcase-card figcaption {
  position: absolute;
  left: 50%;
  bottom: 12px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--tg-label);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Editor ---------- */

.rl-tryon-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 14px;
}

.rl-tryon-screen.is-wide .rl-tryon-bar {
  padding: 0 0 18px;
}

.rl-tryon-bar-title {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.rl-tryon .rl-tryon-bar-title h2 {
  overflow: hidden;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rl-tryon-step-marks {
  display: flex;
  gap: 4px;
}

.rl-tryon-step-marks i {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: var(--tg-gradient);
}

.rl-tryon-step-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.rl-tryon-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rl-tryon-controls {
  display: grid;
  gap: 8px;
  padding: 0 20px 8px;
}

.rl-tryon-screen.is-wide .rl-tryon-controls {
  padding: 0 0 8px;
}

.rl-tryon-filters {
  display: grid;
  gap: 6px;
  overflow: hidden;
}

.rl-tryon-segmented {
  display: flex;
  gap: 4px;
  padding: 2px;
  border-radius: 13px;
  background: rgba(241, 240, 244, 0.85);
}

.rl-tryon-segmented button {
  position: relative;
  flex: 1 1 0;
  min-height: 34px !important;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--tg-secondary);
  font: 500 14px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-segmented button::before {
  content: "";
  position: absolute;
  inset: -5px 0;
}

.rl-tryon-segmented button.is-selected {
  color: var(--tg-label);
  font-weight: 650;
}

.rl-tryon-segment-pill {
  position: absolute;
  inset: 0;
  border: 1.5px solid transparent;
  border-radius: 11px;
  background: var(--tg-surface) padding-box, linear-gradient(#fff, #fff) padding-box, var(--tg-gradient) border-box;
  box-shadow: 0 2px 8px rgba(22, 21, 27, 0.06);
}

.rl-tryon-segment-label {
  position: relative;
}

.rl-tryon-segmented button:disabled {
  opacity: 0.55;
}

.rl-tryon-chips {
  display: flex;
  gap: 8px;
  margin: 0 -20px;
  padding: 4px 20px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rl-tryon-screen.is-wide .rl-tryon-chips {
  flex-wrap: wrap;
  margin: 0;
  padding: 4px 0 2px;
}

.rl-tryon-chips::-webkit-scrollbar {
  display: none;
}

.rl-tryon-chips button {
  flex: none;
  height: 34px;
  padding: 0 15px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6) padding-box;
  box-shadow: inset 0 0 0 1px rgba(22, 21, 27, 0.07);
  color: var(--tg-secondary);
  font: 650 12px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-chips button.is-selected {
  background: linear-gradient(#fff, #fff) padding-box, var(--tg-gradient) border-box;
  box-shadow: 0 2px 8px rgba(22, 21, 27, 0.05);
  color: var(--tg-label);
}

.rl-tryon-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 20px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 21, 27, 0.18) transparent;
}

.rl-tryon-screen.is-wide .rl-tryon-scroll {
  margin: 0 -12px;
  padding: 10px 12px 16px;
}

.rl-tryon-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rl-tryon-screen.is-wide .rl-tryon-style-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1360px) {
  .rl-tryon-screen.is-wide .rl-tryon-style-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rl-tryon-style-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 3px;
  border: 2.5px solid transparent;
  border-radius: 21px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(#fff, #fff) border-box;
  box-shadow: 0 0 0 1px rgba(22, 21, 27, 0.07);
  color: var(--tg-label);
  text-align: center;
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-style-card:not(:disabled):hover {
    box-shadow: 0 0 0 1px rgba(22, 21, 27, 0.07), 0 14px 26px -16px rgba(66, 48, 140, 0.45);
  }

  .rl-tryon-style-card:not(:disabled):hover .rl-tryon-style-art img:not(.is-original) {
    transform: scale(1.045);
  }
}

.rl-tryon-style-card.is-selected {
  background: var(--tg-surface) padding-box, linear-gradient(#fff, #fff) padding-box, var(--tg-gradient) border-box;
  box-shadow: 0 8px 20px -8px rgba(169, 139, 240, 0.4);
}

.rl-tryon-style-card:disabled {
  opacity: 0.6;
}

.rl-tryon-style-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 15px;
  background: var(--tg-fill);
}

.rl-tryon-style-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--tg-ease);
  user-select: none;
}

.rl-tryon-style-art img.is-original {
  object-fit: contain;
}

.rl-tryon-style-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tg-mint);
  color: var(--tg-ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.rl-tryon-style-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 8px 4px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.rl-tryon-reference-drop {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  min-height: 300px !important;
  padding: 28px;
  border: 1.5px dashed #b6a4f3;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(143, 247, 210, 0.1), rgba(169, 139, 240, 0.08)), #fff;
  color: var(--tg-label);
  text-align: center;
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-reference-drop:not(:disabled):hover {
    border-color: #9278ec;
    box-shadow: 0 16px 34px -20px rgba(145, 107, 232, 0.6);
  }
}

.rl-tryon-reference-drop strong {
  font-size: 17px;
  font-weight: 700;
}

.rl-tryon-reference-drop small {
  max-width: 280px;
  color: var(--tg-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.rl-tryon-gradient-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: var(--tg-action);
  color: var(--tg-label);
  box-shadow: 0 12px 26px -12px rgba(145, 107, 232, 0.7);
}

.rl-tryon-reference figure {
  height: min(350px, 46vh);
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 26px;
  background: linear-gradient(var(--tg-fill), var(--tg-fill)) padding-box, var(--tg-gradient) border-box;
}

.rl-tryon-reference img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rl-tryon-reference-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.rl-tryon-reference-row strong {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 650;
}

.rl-tryon-error {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--tg-fill);
}

.rl-tryon-error strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 650;
}

.rl-tryon-error p {
  color: var(--tg-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.rl-tryon-error button {
  justify-self: start;
  min-height: 34px !important;
  padding: 0;
  border: 0;
  background: none;
  color: var(--tg-accent);
  font: 650 15px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-step-message {
  padding: 0 20px;
}

.rl-tryon-step-message .rl-tryon-error {
  margin: 0 0 4px;
}

.rl-tryon-screen.is-wide .rl-tryon-step-message {
  padding: 0;
}

.rl-tryon-footer {
  display: grid;
  gap: 6px;
  padding: 10px 20px 20px;
  background: rgba(255, 255, 255, 0.97);
}

.rl-tryon-screen.is-wide .rl-tryon-footer {
  padding: 18px 0 0;
  background: transparent;
}

html[data-tryon-immersive] .rl-tryon-footer {
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* The color step. */
.rl-tryon-color {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 14px;
  min-height: 0;
  padding: 0 20px 16px;
  overflow-y: auto;
}

.rl-tryon-screen.is-wide .rl-tryon-color {
  padding: 0 0 12px;
}

.rl-tryon-spectrum {
  position: relative;
  flex: none;
  height: 112px;
  border-radius: 18px;
  background:
    linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0)),
    linear-gradient(to right, #f00 0%, #ff8000 8.33%, #ff0 16.67%, #80ff00 25%, #0f0 33.33%, #00ff80 41.67%, #0ff 50%, #0080ff 58.33%, #00f 66.67%, #8000ff 75%, #f0f 83.33%, #ff0080 91.67%, #f00 100%);
  cursor: crosshair;
  touch-action: none;
}

@media (max-height: 760px) {
  .rl-tryon:not(.is-wide) .rl-tryon-spectrum {
    height: 64px;
  }
}

.rl-tryon-spectrum.is-disabled {
  opacity: 0.6;
  cursor: default;
}

.rl-tryon-spectrum-shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #000;
  pointer-events: none;
}

.rl-tryon-spectrum-thumb {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 50%;
  translate: -50% -50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.rl-tryon-brightness {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--tg-secondary);
}

.rl-tryon-brightness input {
  flex: 1 1 auto;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.rl-tryon-brightness input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #000, var(--rl-track, #a97545));
}

.rl-tryon-brightness input::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #000, var(--rl-track, #a97545));
}

.rl-tryon-brightness input::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rl-thumb, #a97545);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  -webkit-appearance: none;
  appearance: none;
}

.rl-tryon-brightness input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rl-thumb, #a97545);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
}

.rl-tryon-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rl-tryon-color-row strong {
  font-size: 15px;
  font-weight: 650;
}

.rl-tryon-original-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(#fff, #fff) border-box;
  box-shadow: 0 0 0 1px rgba(22, 21, 27, 0.08);
  color: var(--tg-label);
  font: 650 12px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-original-chip.is-selected {
  background: linear-gradient(#fff, #fff) padding-box, var(--tg-gradient) border-box;
  box-shadow: none;
}

.rl-tryon-swatch {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 170px;
  border-radius: 28px;
  background-color: var(--tg-fill);
}

.rl-tryon-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: var(--tg-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.rl-tryon-swatch.is-keep {
  background-image: var(--tg-surface);
}

.rl-tryon-swatch.is-dark {
  color: #000;
}

.rl-tryon-swatch.is-light {
  color: #fff;
}

.rl-tryon-swatch-original {
  position: absolute;
  top: calc(50% - 70px);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.rl-tryon-hex {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 500 29px/1 ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

.rl-tryon-hex > span {
  opacity: 0.65;
}

.rl-tryon-hex input {
  width: 6.6ch;
  padding: 6px 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}

.rl-tryon-hex input::placeholder {
  color: currentColor;
  opacity: 0.35;
}

.rl-tryon-hex input:focus {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.rl-tryon-hex button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.rl-tryon-hex button:disabled {
  opacity: 0.35;
}

.rl-tryon-hex-error {
  position: absolute;
  top: calc(50% + 32px);
  font-size: 12px;
}

/* The customer's photo beside the controls. */
.rl-tryon-photo-stage {
  display: block;
}

.rl-tryon-photo-box {
  position: absolute;
  inset: 44px 48px 96px;
  display: grid;
  place-items: center;
}

.rl-tryon-photo-frame {
  position: relative;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 70px -34px rgba(46, 33, 89, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.rl-tryon-photo-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
  user-select: none;
}

.rl-tryon-glass-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--tg-label);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.rl-tryon-glass-chip.is-color {
  top: auto;
  bottom: 14px;
  font-variant-numeric: tabular-nums;
}

.rl-tryon-glass-chip i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.rl-tryon-reference-inset {
  position: absolute;
  right: -26px;
  bottom: 30px;
  width: clamp(96px, 32%, 180px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 36px -14px rgba(22, 21, 27, 0.5);
}

.rl-tryon-reference-inset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-tryon-reference-inset small {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
}

.rl-tryon-stage-button {
  position: absolute;
  left: 50%;
  bottom: 30px;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px -12px rgba(22, 21, 27, 0.3);
  color: var(--tg-label);
  font: 650 14px var(--tg-font);
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-stage-button:not(:disabled):hover {
    background: #fff;
  }
}

.rl-tryon-stage-button:disabled {
  opacity: 0.5;
}

/* ---------- Result ---------- */

.rl-tryon-result-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
}

.rl-tryon-compare-box {
  position: absolute;
  inset: 0 20px;
  display: grid;
  place-items: center;
}

.rl-tryon-result-stage .rl-tryon-compare-box {
  inset: 36px 40px;
}

.rl-tryon-compare {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 70px -34px rgba(46, 33, 89, 0.55);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.rl-tryon-compare::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--tg-gradient);
  opacity: 0.55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.rl-tryon-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.rl-tryon-compare-original {
  background: #fff;
}

.rl-tryon-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.rl-tryon-compare-handle {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 44px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22), inset 0 0 0 1.5px rgba(169, 139, 240, 0.55);
  color: var(--tg-ink);
  pointer-events: none;
}

.rl-tryon-compare-label {
  position: absolute;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
}

.rl-tryon-compare-label.is-left {
  left: 12px;
}

.rl-tryon-compare-label.is-right {
  right: 12px;
}

.rl-tryon-result-details {
  display: grid;
  gap: 12px;
  padding: 14px 20px 0;
}

.rl-tryon-screen.is-wide .rl-tryon-result-details {
  flex: 1 1 auto;
  align-content: start;
  padding: 4px 0 0;
}

.rl-tryon-result-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--tg-secondary);
  font-size: 13px;
}

.rl-tryon-result-hint svg {
  color: #8f6fea;
}

.rl-tryon-applied {
  display: flex;
  gap: 8px;
}

.rl-tryon-applied-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}

.rl-tryon-applied-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--tg-gradient);
  opacity: 0.45;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.rl-tryon-applied-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--tg-secondary);
  font-size: 12px;
  font-weight: 500;
}

.rl-tryon-applied-card span svg {
  color: var(--tg-violet);
}

.rl-tryon-applied-card span i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--tg-line);
}

.rl-tryon-applied-card strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.rl-tryon-applied-card strong.is-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.rl-tryon-saved-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tg-secondary);
  font-size: 13px;
}

.rl-tryon-saved-note span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tg-action);
  color: var(--tg-label);
}

.rl-tryon:not(.is-wide) .rl-tryon-result-footer .rl-tryon-text-button {
  order: -1;
}

/* ---------- Drop, paste ---------- */

.rl-tryon-drop {
  position: absolute;
  inset: 10px;
  z-index: 30;
  display: grid;
  place-items: center;
  border: 2px dashed #a98bf0;
  border-radius: 26px;
  background: rgba(247, 246, 252, 0.84);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.rl-tryon-drop span {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #5236b3;
  font-size: 17px;
  font-weight: 700;
}

/* ---------- Generation stage ---------- */

@property --rl-tg-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.rl-tg {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #07080f;
  color: #fff;
}

.rl-tg-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rl-tg-pool {
  position: absolute;
  display: block;
  border-radius: 50%;
  will-change: transform;
}

.rl-tg-pool.p1 {
  left: -28vmax;
  top: -34vmax;
  width: 92vmax;
  height: 92vmax;
  background: radial-gradient(closest-side, rgba(43, 27, 99, 0.95), rgba(43, 27, 99, 0));
  animation: rl-tg-drift-a 20s ease-in-out infinite alternate;
}

.rl-tg-pool.p2 {
  right: -30vmax;
  top: -26vmax;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(closest-side, rgba(14, 26, 68, 0.95), rgba(14, 26, 68, 0));
  animation: rl-tg-drift-b 24s ease-in-out infinite alternate;
}

.rl-tg-pool.p3 {
  left: -30vmax;
  top: 18vh;
  width: 76vmax;
  height: 76vmax;
  background: radial-gradient(closest-side, rgba(15, 69, 82, 0.9), rgba(15, 69, 82, 0));
  animation: rl-tg-drift-c 30s ease-in-out infinite alternate;
}

.rl-tg-pool.p4 {
  left: calc(50% - 38vmax);
  top: calc(46% - 38vmax);
  width: 76vmax;
  height: 76vmax;
  background: radial-gradient(closest-side, rgba(60, 45, 147, 0.85), rgba(60, 45, 147, 0));
  animation: rl-tg-drift-d 40s ease-in-out infinite alternate;
}

.rl-tg-pool.p5 {
  right: -28vmax;
  top: 22vh;
  width: 72vmax;
  height: 72vmax;
  background: radial-gradient(closest-side, rgba(76, 31, 112, 0.9), rgba(76, 31, 112, 0));
  animation: rl-tg-drift-e 60s ease-in-out infinite alternate;
}

.rl-tg-pool.p6 {
  left: -24vmax;
  bottom: -36vmax;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(closest-side, rgba(10, 18, 48, 0.95), rgba(10, 18, 48, 0));
  animation: rl-tg-drift-b 24s ease-in-out infinite alternate-reverse;
}

.rl-tg-pool.p7 {
  left: calc(50% - 34vmax);
  bottom: -40vmax;
  width: 68vmax;
  height: 68vmax;
  background: radial-gradient(closest-side, rgba(26, 92, 92, 0.85), rgba(26, 92, 92, 0));
  animation: rl-tg-drift-c 30s ease-in-out infinite alternate-reverse;
}

.rl-tg-vignette {
  position: absolute;
  inset: 0;
  display: block;
  background: radial-gradient(ellipse at center, rgba(7, 8, 15, 0) 30%, rgba(7, 8, 15, 0.55) 80%);
}

.rl-tg-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 0 28px 60px;
}

.rl-tg-photo {
  position: relative;
  flex: none;
}

.rl-tg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rl-tg-halo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(44px);
  transform: scale(1.08);
}

.rl-tg-rim-blur {
  position: absolute;
  inset: -5px;
  filter: blur(18px);
  opacity: 0.72;
  animation: rl-tg-breathe 2s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}

.rl-tg-rim {
  position: absolute;
  display: block;
  background: conic-gradient(from var(--rl-tg-angle), #8ff7d2, #93a2f7, #a98bf0, #e6a8f2, #8ff7d2);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rl-tg-turn 6s linear infinite;
}

.rl-tg-rim.is-wide {
  inset: 0;
  padding: 10px;
  border-radius: 31px;
}

.rl-tg-rim.is-crisp {
  inset: -1px;
  padding: 2px;
  border-radius: 27px;
  opacity: 0.95;
  transition: inset 0.3s var(--tg-ease), padding 0.3s var(--tg-ease);
}

.rl-tg.is-sealed .rl-tg-rim.is-crisp,
.rl-tg.is-filled .rl-tg-rim.is-crisp {
  inset: -1.5px;
  padding: 3px;
}

.rl-tg.is-sealed .rl-tg-rim-blur,
.rl-tg.is-filled .rl-tg-rim-blur {
  opacity: 1;
  animation: none;
  transition: opacity 0.3s;
}

.rl-tg-source {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  object-fit: cover;
  user-select: none;
}

.rl-tg-scan {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 26px;
  transition: opacity 0.35s ease;
}

.rl-tg-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  animation: rl-tg-scan 2s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}

.rl-tg-wash {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: block;
  height: max(56px, calc(var(--rl-tg-h, 400px) * 0.44));
  translate: 0 -50%;
  background: linear-gradient(to bottom, rgba(147, 162, 247, 0), rgba(147, 162, 247, 0.16), rgba(147, 162, 247, 0));
}

.rl-tg-band {
  position: absolute;
  top: calc(50% - 54px);
  left: 0;
  right: 0;
  height: 108px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.07) 17%, rgba(0, 0, 0, 0.3) 28%, rgba(0, 0, 0, 0.75) 39%, #000 50%, rgba(0, 0, 0, 0.75) 61%, rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0.07) 83%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.07) 17%, rgba(0, 0, 0, 0.3) 28%, rgba(0, 0, 0, 0.75) 39%, #000 50%, rgba(0, 0, 0, 0.75) 61%, rgba(0, 0, 0, 0.3) 72%, rgba(0, 0, 0, 0.07) 83%, transparent 100%);
}

/* Moves against the track, so the lattice stays fixed to the photo while the beam lights it. */
.rl-tg-dots {
  position: absolute;
  top: calc(54px - var(--rl-tg-h, 400px) / 2);
  left: 0;
  right: 0;
  display: block;
  height: var(--rl-tg-h, 400px);
  background-image: radial-gradient(circle at 7.5px 7.5px, rgba(255, 255, 255, 0.72) 1.1px, rgba(255, 255, 255, 0) 1.7px);
  background-size: 15px 15px;
  animation: rl-tg-counter 2s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}

.rl-tg-beam {
  position: absolute;
  top: 53px;
  left: 0;
  right: 0;
  display: block;
  height: 2px;
  background: linear-gradient(90deg, rgba(143, 247, 210, 0.35), rgba(255, 255, 255, 0.95), rgba(143, 247, 210, 0.35));
  box-shadow: 0 0 14px 2px rgba(143, 247, 210, 0.38);
}

.rl-tg-edge {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 26px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.rl-tg-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.rl-tg-sparkle {
  position: absolute;
  translate: -50% -50%;
  color: #fff;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(143, 247, 210, 0.9));
  animation: rl-tg-twinkle 2.4s linear infinite;
}

.rl-tg.is-sealed .rl-tg-scan,
.rl-tg.is-filled .rl-tg-scan,
.rl-tg.is-sealed .rl-tg-sparkles,
.rl-tg.is-filled .rl-tg-sparkles {
  opacity: 0;
}

.rl-tg-orb {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
}

.rl-tg-orb i {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.rl-tg-orb-glow {
  inset: 0;
  background: conic-gradient(#8ff7d2, #93a2f7, #a98bf0, #e6a8f2, #8ff7d2);
  opacity: 0.75;
  filter: blur(14px);
  animation: rl-tg-spin 3s linear infinite, rl-tg-orb-breathe 2s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
  transition: opacity 0.3s;
}

.rl-tg-orb-sphere {
  inset: 11px;
  background: conic-gradient(#8ff7d2, #93a2f7, #a98bf0, #e6a8f2, #8ff7d2);
  animation: rl-tg-spin-back 4.29s linear infinite;
}

.rl-tg-orb-light {
  inset: 11px;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 26px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.rl-tg-orb-fill {
  inset: 11px;
  background: #fff;
  opacity: 0;
  scale: 0.001;
  transition: scale 0.36s cubic-bezier(0.34, 1.5, 0.64, 1), opacity 0.2s ease;
}

.rl-tg.is-filled .rl-tg-orb-fill {
  opacity: 1;
  scale: 1;
}

.rl-tg.is-filled .rl-tg-orb-glow {
  opacity: 0.35;
}

.rl-tg-caption {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 64px;
  text-align: center;
}

.rl-tg .rl-tg-caption h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.rl-tg-line {
  position: relative;
  min-height: 22px;
}

.rl-tg-line p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.rl-tg-cancel {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  translate: -50% 0;
  min-height: 46px !important;
  padding: 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font: 600 15px var(--tg-font);
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tg-cancel:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.2);
  }
}

.rl-tg.is-still *,
.rl-tg.is-still {
  animation: none !important;
}

.rl-tg.is-still .rl-tg-scan,
.rl-tg.is-still .rl-tg-sparkles {
  display: none;
}

/* The mark that becomes Save. */
.rl-tryon-hero {
  position: fixed;
  z-index: 2147483000;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--tg-action);
  box-shadow: 0 5px 14px rgba(145, 107, 232, 0.16);
  color: var(--tg-label);
  pointer-events: none;
}

.rl-tryon-hero-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50.5% -51.5%;
  overflow: visible;
}

.rl-tryon-hero-glyph path {
  fill: none;
  stroke: var(--tg-label);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rl-tryon-hero-label {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  opacity: 0;
  font: 700 16px/1.1 var(--tg-font);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- Camera (the app's camera-first Try On) ---------- */

.rl-tryon[data-screen="camera"] {
  background: #000;
}

.rl-tryon.is-wide[data-screen="camera"] {
  border-color: rgba(0, 0, 0, 0.6);
}

.rl-tryon[data-screen="camera"]::before {
  display: none;
}

.rl-tryon-screen.rl-tryon-camera-screen {
  display: block;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.rl-tryon-cam-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b0c12;
}

.rl-tryon-cam-view video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.35s ease;
}

.rl-tryon-cam-view video.is-mirrored {
  transform: scaleX(-1);
}

.rl-tryon-cam-switch {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  perspective: 1200px;
  pointer-events: none;
}

.rl-tryon-cam-switch canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rl-tryon-cam-switch .is-backing {
  filter: blur(26px) saturate(1.1);
  transform: scale(1.12);
}

.rl-tryon-cam-switch .is-front {
  backface-visibility: hidden;
  transform-origin: 50% 50%;
}

.rl-tryon-cam-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  overflow: visible;
  pointer-events: none;
}

.rl-tryon-cam-guide path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.rl-tryon-cam-guide .is-shadow {
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 2.75px;
}

.rl-tryon-cam-guide .is-line {
  stroke-width: 1.5px;
}

.rl-tryon-cam-shade {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.rl-tryon-cam-waking {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 180px;
  height: 180px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(147, 162, 247, 0.32), rgba(147, 162, 247, 0));
  animation: rl-tryon-wake 1.6s ease-in-out infinite alternate;
}

.rl-tryon-cam-issue {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  padding: 90px 30px 170px;
  color: #fff;
  text-align: center;
}

.rl-tryon-cam-issue p {
  max-width: 340px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  line-height: 1.5;
}

.rl-tryon-cam-choose {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 650 15px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-cam-choose .rl-tryon-spinner {
  border-color: rgba(0, 0, 0, 0.18);
  border-top-color: #000;
}

.rl-tryon-cam-retry {
  min-height: 36px !important;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.72);
  font: 600 14px var(--tg-font);
  cursor: pointer;
}

.rl-tryon-cam-flash {
  position: absolute;
  inset: 0;
  display: block;
  background: #fff;
  pointer-events: none;
}

.rl-tryon-cam-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 18px 20px;
}

.rl-tryon-cam-top .rl-tryon-quota {
  grid-column: 1 / -1;
  justify-self: start;
}

.rl-tryon .rl-tryon-cam-top h2 {
  color: #fff;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.rl-tryon-quota {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 600;
}

.rl-tryon-quota svg {
  color: var(--tg-mint);
}

.rl-tryon-quota.is-empty {
  background: rgba(0, 0, 0, 0.5);
  color: #ffd9d4;
}

.rl-tryon-cam-library {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  font: 650 13px var(--tg-font);
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-cam-library:hover {
    background: rgba(0, 0, 0, 0.4);
  }
}

.rl-tryon-cam-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 20px 22px;
}

.rl-tryon-cam-notice {
  max-width: 360px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.rl-tryon-cam-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 430px);
  height: 82px;
  padding: 0 15px;
}

.rl-tryon-cam-side {
  display: grid;
  place-items: center;
  width: 51px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: #fff;
  cursor: pointer;
}

@media (hover: hover) {
  .rl-tryon-cam-side:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.12);
  }
}

.rl-tryon-cam-side:disabled {
  opacity: 0.4;
}

.rl-tryon-shutter {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  padding: 0;
  translate: -50% -50%;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.rl-tryon-shutter i {
  display: block;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  border-radius: 50%;
  background: #fff;
  transition: width 0.15s ease, height 0.15s ease;
}

.rl-tryon-shutter.is-capturing i {
  width: calc(100% - 22px);
  height: calc(100% - 22px);
}

.rl-tryon-shutter:disabled {
  opacity: 0.4;
}

.rl-tryon-cam-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.rl-tryon-gate-note {
  color: var(--tg-secondary);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.rl-tryon-start.is-wide .rl-tryon-gate-note {
  max-width: 400px;
  text-align: left;
}

.rl-tryon-start.is-wide .rl-tryon-privacy {
  justify-self: start;
}

.rl-tryon-quota-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--tg-secondary);
  font-size: 12px;
  font-weight: 500;
}

.rl-tryon-quota-line svg {
  color: #8f6fea;
}

.rl-tryon-quota-line.is-empty {
  color: #b3261e;
}

.rl-tryon-quota-line.is-start {
  justify-content: flex-start;
}

/* ---------- Sheets ---------- */

.rl-tryon-sheet {
  width: min(440px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 28px;
  background: #fff;
  color: var(--tg-label);
  box-shadow: 0 40px 90px -24px rgba(22, 21, 27, 0.4);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.4s var(--tg-ease), overlay 0.4s allow-discrete, display 0.4s allow-discrete;
}

.rl-tryon-sheet[open] {
  opacity: 1;
  transform: none;
}

@starting-style {
  .rl-tryon-sheet[open] {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

.rl-tryon-sheet::backdrop {
  background: rgba(14, 13, 18, 0);
  transition: background-color 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}

.rl-tryon-sheet[open]::backdrop {
  background: rgba(14, 13, 18, 0.45);
}

@starting-style {
  .rl-tryon-sheet[open]::backdrop {
    background: rgba(14, 13, 18, 0);
  }
}

.rl-tryon-sheet-body {
  display: grid;
  gap: 14px;
  padding: 18px 24px 24px;
}

.rl-tryon-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-right: -8px;
  color: var(--tg-secondary);
  font-size: 14px;
  font-weight: 650;
}

.rl-tryon-consent-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 2px 0;
  text-align: center;
}

.rl-tryon-consent-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: var(--tg-action);
  box-shadow: 0 12px 26px -12px rgba(145, 107, 232, 0.7);
  color: var(--tg-label);
}

.rl-tryon-consent-badge.is-warning {
  background: #fff1ee;
  box-shadow: none;
  color: #c8372d;
}

.rl-tryon-sheet .rl-tryon-consent-hero h2 {
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.rl-tryon-sheet p {
  font-size: 15px;
  line-height: 1.5;
}

.rl-tryon-sheet p.is-muted {
  color: var(--tg-secondary);
  font-size: 14px;
}

.rl-tryon-sheet .is-centered {
  text-align: center;
}

.rl-tryon-privacy.is-inline {
  justify-self: start;
  min-height: 30px !important;
  color: var(--tg-accent);
}

.rl-tryon-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 0 14px 0 16px;
  border-radius: 16px;
  background: var(--tg-fill);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.rl-tryon-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rl-tryon-switch i {
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.24);
  transition: background 0.25s ease;
}

.rl-tryon-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.32s var(--tg-ease);
}

.rl-tryon-switch input:checked + i {
  background: linear-gradient(135deg, #6fdcb5, #8292f0 55%, #9a79ec);
}

.rl-tryon-switch input:checked + i::after {
  transform: translateX(20px);
}

.rl-tryon-switch input:focus-visible + i {
  outline: 3px solid var(--tg-accent);
  outline-offset: 2px;
}

.rl-tryon-sheet .rl-tryon-sheet-footnote {
  color: var(--tg-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.rl-tryon-sheet .rl-tryon-consent-minor {
  padding: 14px;
  border-radius: 14px;
  background: var(--tg-fill);
  font-size: 14px;
}

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  body.customer-mode.tryon-studio-mode:not(.me-workspace-mode) .customer-shell > .page-wrap,
  body.customer-mode.tryon-studio-mode:not(.me-workspace-mode) .customer-shell > .page-wrap:has(+ .mobile-tabbar + .customer-footer) {
    width: 100%;
    padding: 0 0 calc(var(--mobile-nav-height, 72px) + env(safe-area-inset-bottom));
  }

  html[data-tryon-immersive] body.customer-mode.tryon-studio-mode:not(.me-workspace-mode) .customer-shell > .page-wrap,
  html[data-tryon-immersive] body.customer-mode.tryon-studio-mode:not(.me-workspace-mode) .customer-shell > .page-wrap:has(+ .mobile-tabbar + .customer-footer) {
    padding-bottom: 0;
  }

  html[data-tryon-immersive] .customer-shell .mobile-tabbar {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }

  .rl-tryon-boot {
    border-radius: 0;
  }

  .rl-tryon-cam-top {
    padding: 12px 16px;
  }

  .rl-tryon-cam-bottom {
    padding-bottom: 14px;
  }

  .rl-tryon-sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100dvh - 24px);
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
    transform: translateY(100%);
  }

  .rl-tryon-sheet[open] {
    transform: none;
  }

  @starting-style {
    .rl-tryon-sheet[open] {
      transform: translateY(100%);
    }
  }

  .rl-tryon-sheet-body {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* ---------- Motion ---------- */

@keyframes rl-tryon-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rl-tryon-float {
  from {
    transform: translateY(-5px);
  }
  to {
    transform: translateY(5px);
  }
}

@keyframes rl-tryon-sheen {
  from {
    transform: translateX(-30%) skewX(-18deg);
  }
  to {
    transform: translateX(420%) skewX(-18deg);
  }
}

@keyframes rl-tryon-wake {
  from {
    opacity: 0.35;
    scale: 0.9;
  }
  to {
    opacity: 1;
    scale: 1.08;
  }
}

@keyframes rl-tg-turn {
  to {
    --rl-tg-angle: 360deg;
  }
}

@keyframes rl-tg-spin {
  to {
    rotate: 360deg;
  }
}

@keyframes rl-tg-spin-back {
  to {
    rotate: -360deg;
  }
}

@keyframes rl-tg-orb-breathe {
  from {
    scale: 0.92;
  }
  to {
    scale: 1.04;
  }
}

@keyframes rl-tg-breathe {
  from {
    opacity: 0.55;
  }
  to {
    opacity: 0.9;
  }
}

@keyframes rl-tg-scan {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: translateY(50%);
  }
}

@keyframes rl-tg-counter {
  from {
    transform: translateY(50%);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes rl-tg-twinkle {
  0% { opacity: 0; transform: scale(0.35) rotate(0deg); }
  12.5% { opacity: 0.06; transform: scale(0.39) rotate(2deg); }
  25% { opacity: 0.35; transform: scale(0.58) rotate(14deg); }
  37.5% { opacity: 0.79; transform: scale(0.86) rotate(32deg); }
  50% { opacity: 1; transform: scale(1) rotate(40deg); }
  62.5% { opacity: 0.79; transform: scale(0.86) rotate(32deg); }
  75% { opacity: 0.35; transform: scale(0.58) rotate(14deg); }
  87.5% { opacity: 0.06; transform: scale(0.39) rotate(2deg); }
  100% { opacity: 0; transform: scale(0.35) rotate(0deg); }
}

@keyframes rl-tg-drift-a {
  from { transform: translate3d(-6vmax, -3vmax, 0) scale(1); }
  to { transform: translate3d(10vmax, 6vmax, 0) scale(1.08); }
}

@keyframes rl-tg-drift-b {
  from { transform: translate3d(5vmax, -4vmax, 0) scale(1.05); }
  to { transform: translate3d(-9vmax, 7vmax, 0) scale(0.96); }
}

@keyframes rl-tg-drift-c {
  from { transform: translate3d(-4vmax, 6vmax, 0) scale(0.98); }
  to { transform: translate3d(9vmax, -6vmax, 0) scale(1.06); }
}

@keyframes rl-tg-drift-d {
  from { transform: translate3d(-8vmax, -5vmax, 0) scale(1); }
  to { transform: translate3d(8vmax, 6vmax, 0) scale(1.1); }
}

@keyframes rl-tg-drift-e {
  from { transform: translate3d(6vmax, 5vmax, 0) scale(1.04); }
  to { transform: translate3d(-8vmax, -7vmax, 0) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .rl-tryon *,
  .rl-tryon-layer *,
  .rl-tryon-showcase-float {
    animation: none !important;
  }

  .rl-tg-scan,
  .rl-tg-sparkles {
    display: none;
  }

  .rl-tryon-sheet,
  .rl-tryon-sheet::backdrop {
    transition: none;
  }
}

.rl-tryon-action-glyph {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
}
