@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("./assets/fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  --product-frame-gray: #d0d0d0;
  --product-frame-stroke: #a8a8a8;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #e9e9e9;
  font-family: "Montserrat", Arial, sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.phone {
  width: 390px;
  max-width: 100vw;
  height: min(980px, calc(100vh - 40px));
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

.frame-stage {
  position: relative;
  width: 390px;
  min-height: 980px;
  transform-origin: top left;
}

.frame-image {
  display: block;
  width: 390px;
  height: auto;
  min-height: 980px;
}

.processing-spinner-overlay {
  position: absolute;
  left: 100px;
  top: 304px;
  width: 190px;
  height: 190px;
  z-index: 4;
  pointer-events: none;
  background: #fff;
}

.processing-spinner-overlay::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: url("./assets/components/processing-spinner-green.png") center / contain no-repeat;
  animation: processing-spin 2.4s linear infinite, processing-flicker 1.8s steps(6, end) infinite;
}

@keyframes processing-spin {
  to { transform: rotate(360deg); }
}

@keyframes processing-flicker {
  0% { opacity: 0.42; }
  18% { opacity: 1; }
  36% { opacity: 0.62; }
  54% { opacity: 0.88; }
  72% { opacity: 0.48; }
  100% { opacity: 0.96; }
}

.hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 7;
}

.hotspot:focus-visible {
  outline: 3px solid #66c7cc;
  outline-offset: 2px;
}

.home {
  left: 16px;
  top: 8px;
  width: 48px;
  height: 48px;
}

.thanks-home {
  left: 16px;
  top: 905px;
  width: 72px;
  height: 72px;
}

.filter {
  left: 24px;
  top: 872px;
  width: 70px;
  height: 70px;
}

.refresh {
  left: 126px;
  top: 872px;
  width: 138px;
  height: 58px;
}

.settings {
  left: 312px;
  top: 864px;
  width: 64px;
  height: 72px;
}

.nav-formal {
  left: 14px;
  top: 934px;
  width: 64px;
  height: 46px;
}

.nav-casual {
  left: 92px;
  top: 934px;
  width: 70px;
  height: 46px;
}

.nav-business {
  left: 172px;
  top: 934px;
  width: 70px;
  height: 46px;
}

.nav-comfort {
  left: 250px;
  top: 934px;
  width: 70px;
  height: 46px;
}

.nav-profile {
  left: 330px;
  top: 934px;
  width: 52px;
  height: 46px;
}

.profile-bottom {
  left: 335px;
  top: 925px;
  width: 45px;
  height: 45px;
}

.back {
  left: 0;
  top: 910px;
  width: 72px;
  height: 70px;
}

.play {
  left: 166px;
  top: 900px;
  width: 72px;
  height: 80px;
}

.like-zone,
.dislike-zone {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  z-index: 8;
}

.like-0 { left: 132px; top: 132px; }
.dislike-0 { left: 132px; top: 306px; }
.like-1 { left: 322px; top: 132px; }
.dislike-1 { left: 322px; top: 306px; }
.like-2 { left: 132px; top: 372px; }
.dislike-2 { left: 132px; top: 546px; }
.like-3 { left: 322px; top: 372px; }
.dislike-3 { left: 322px; top: 546px; }
.like-4 { left: 132px; top: 613px; }
.dislike-4 { left: 132px; top: 787px; }
.like-5 { left: 322px; top: 613px; }
.dislike-5 { left: 322px; top: 787px; }

.replacement-card {
  position: absolute;
  width: 170px;
  height: 226px;
  overflow: visible;
  background: transparent;
  z-index: 3;
  pointer-events: none;
}

.replacement-0 { left: 16px; top: 128px; }
.replacement-1 { left: 206px; top: 128px; }
.replacement-2 { left: 16px; top: 368px; }
.replacement-3 { left: 206px; top: 368px; }
.replacement-4 { left: 16px; top: 609px; }
.replacement-5 { left: 206px; top: 609px; }

.replacement-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  display: block;
}

.replacement-product-card {
  position: relative;
  width: 170px;
  height: 226px;
  display: grid;
  place-items: center;
  border: 1px solid #9f9f9f;
  border-radius: 24px;
  background: var(--product-frame-gray);
  overflow: hidden;
}

.replacement-product-image {
  width: 148px;
  height: 198px;
  object-fit: contain;
  display: block;
}

.replacement-like-icon,
.replacement-dislike-icon {
  position: absolute;
  right: 4px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #53b9bf;
}

.replacement-like-icon {
  top: 12px;
}

.replacement-dislike-icon {
  bottom: 12px;
}

.replacement-like-icon img,
.replacement-dislike-icon img {
  width: 32px;
  height: 32px;
  display: block;
}

.toast {
  position: absolute;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  z-index: 6;
  min-width: 190px;
  padding: 13px 18px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.profile-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  font-family: "Montserrat", Arial, sans-serif;
  color: #000;
}

.profile-measurement-saved {
  position: absolute;
  left: 88px;
  top: 305px;
  width: 214px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
}

.profile-saved-section {
  position: absolute;
  left: 0;
  top: 343px;
  width: 390px;
  min-height: 306px;
  padding: 0 0 18px;
  background: #fff;
  text-align: center;
  pointer-events: auto;
}

.profile-saved-section h2 {
  margin: 5px 0 9px;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.profile-saved-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 0 16px 12px;
  scrollbar-width: thin;
}

.profile-saved-tile {
  position: relative;
  flex: 0 0 170px;
  width: 170px;
  scroll-snap-align: start;
}

.profile-saved-card {
  position: relative;
  width: 170px;
  height: 226px;
  overflow: visible;
  background: transparent;
}

.profile-saved-card > img,
.profile-crop-card,
.profile-product-card {
  width: 170px;
  height: 226px;
  display: block;
}

.profile-saved-card > img {
  object-fit: contain;
  border-radius: 24px;
}

.profile-saved-card.is-default > img {
  width: 170px;
  height: 226px;
  object-fit: contain;
}

.profile-crop-card {
  background-repeat: no-repeat;
  background-size: 390px auto;
  border-radius: 24px;
}

.profile-product-card {
  display: grid;
  place-items: center;
  border: 1px solid var(--product-frame-stroke);
  border-radius: 24px;
  background: var(--product-frame-gray);
  overflow: hidden;
}

.profile-product-card img {
  width: 148px;
  height: 198px;
  object-fit: contain;
  display: block;
}

.profile-checkout-button {
  position: absolute;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #53b9bf;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  cursor: pointer;
  z-index: 4;
}

.profile-checkout-button {
  right: 12px;
  top: 12px;
}

.profile-remove-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
}

.profile-saved-card.is-default .profile-remove-button {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #53b9bf;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.profile-saved-card.is-default .profile-remove-button::before {
  content: "";
  width: 40px;
  height: 40px;
  display: block;
  background: url("./assets/components/dislike-clean.svg") center / contain no-repeat;
}

.profile-checkout-button img {
  width: 22px;
  height: 21px;
}

.profile-saved-card:hover .profile-checkout-button,
.profile-saved-card:focus-within .profile-checkout-button,
.profile-saved-card.is-default:hover .profile-remove-button,
.profile-saved-card.is-default:focus-within .profile-remove-button {
  opacity: 1;
  transform: translateY(0);
}

.profile-saved-card.is-saved .profile-checkout-button,
.profile-saved-card.is-saved .profile-remove-button {
  width: 58px;
  height: 58px;
  opacity: 0;
  transform: none;
}

.profile-saved-card.is-saved .profile-checkout-button {
  right: 0;
  top: 0;
  background: #53b9bf;
}

.profile-saved-card.is-saved .profile-remove-button {
  right: -1px;
  bottom: -1px;
  background: transparent;
  opacity: 1;
}

.profile-saved-card.is-saved .profile-checkout-button img {
  display: block;
  width: 28px;
  height: 27px;
}

.profile-saved-card.is-saved:hover .profile-checkout-button,
.profile-saved-card.is-saved:focus-within .profile-checkout-button {
  opacity: 1;
}

.profile-checkout-button:focus-visible,
.profile-remove-button:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
  opacity: 1;
  transform: translateY(0);
}

.profile-stars {
  width: 170px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #000;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.profile-bio-reflow {
  position: absolute;
  left: 0;
  top: 640px;
  width: 390px;
  min-height: 230px;
  padding: 49px 38px 0;
  background: #fff;
  text-align: center;
  pointer-events: none;
}

.profile-bio-reflow h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.profile-bio-reflow p {
  margin: 0;
  font-size: 15px;
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: 0;
}

.checkout-match-overlay {
  position: absolute;
  left: 63px;
  top: 193px;
  width: 264px;
  height: 353px;
  display: grid;
  place-items: center;
  border-radius: 39px;
  background: var(--product-frame-gray);
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.checkout-match-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='264' height='353' viewBox='0 0 264 353'%3E%3Crect x='0.75' y='0.75' width='262.5' height='351.5' rx='38.25' ry='38.25' fill='none' stroke='%23a8a8a8' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.checkout-match-overlay.is-thanks {
  left: 69px;
  top: 257px;
}

.checkout-match-image,
.checkout-garment-crop {
  width: 264px;
  height: 353px;
  display: block;
  border-radius: 39px;
}

.checkout-product-image {
  position: relative;
  z-index: 1;
  width: 228px;
  height: 305px;
  display: block;
  object-fit: contain;
}

.checkout-native-crop {
  display: block;
  background-repeat: no-repeat;
}

.checkout-match-image {
  object-fit: cover;
}

.checkout-garment-crop {
  background-repeat: no-repeat;
}

.checkout-small-checkboxes {
  position: absolute;
  left: 49px;
  top: 654px;
  z-index: 5;
  display: grid;
  gap: 34px;
  pointer-events: none;
}

.checkout-small-checkboxes::before {
  content: "";
  position: absolute;
  left: -2px;
  top: -16px;
  width: 54px;
  height: 214px;
  background: #fff;
  z-index: -1;
}

.checkout-small-checkboxes span {
  width: 34px;
  height: 34px;
  display: block;
  background: #fff;
  border: 3px solid #000;
  box-shadow: -8px 0 0 8px #fff;
}

.checkout-small-checkboxes span.is-checked {
  background: #000;
}

.confirm-purchase-button {
  position: absolute;
  left: 54px;
  top: 865px;
  z-index: 6;
  width: 282px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: #53b9bf;
  color: #000;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.confirm-purchase-button img {
  width: 28px;
  height: 27px;
}

.confirm-purchase-button:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.menu-pick {
  left: 60px;
  top: 590px;
  width: 270px;
  height: 54px;
}

.menu-measure {
  left: 26px;
  top: 665px;
  width: 338px;
  height: 56px;
}

.menu-profile {
  left: 86px;
  top: 740px;
  width: 218px;
  height: 56px;
}

.view-occasion {
  min-height: 980px;
  overflow: hidden;
}

.view-occasion .frame-image {
  width: 390px;
  height: auto;
  min-height: 980px;
  transform: scale(1.161);
  transform-origin: top center;
}

.occasion-casual {
  left: 0;
  top: 0;
  width: 390px;
  height: 245px;
}

.occasion-business {
  left: 0;
  top: 245px;
  width: 390px;
  height: 245px;
}

.occasion-comfort {
  left: 0;
  top: 490px;
  width: 390px;
  height: 245px;
}

.occasion-formal {
  left: 0;
  top: 735px;
  width: 390px;
  height: 245px;
}

.filter-measure {
  left: 22px;
  top: 178px;
  width: 346px;
  height: 52px;
}

.filter-category {
  left: 55px;
  top: 320px;
  width: 280px;
  height: 52px;
}

.filter-occasion {
  left: 60px;
  top: 536px;
  width: 270px;
  height: 52px;
}

.filter-reset {
  left: 58px;
  top: 606px;
  width: 274px;
  height: 52px;
}

.filter-profile {
  left: 70px;
  top: 682px;
  width: 250px;
  height: 52px;
}

.filter-back {
  left: 26px;
  top: 792px;
  width: 74px;
  height: 78px;
}

.filter-settings {
  left: 302px;
  top: 792px;
  width: 72px;
  height: 78px;
}

.measure-main {
  left: 25px;
  top: 205px;
  width: 340px;
  height: 365px;
}

.setting-profile {
  left: 100px;
  top: 710px;
  width: 190px;
  height: 60px;
}

.settings-payment {
  left: 52px;
  top: 390px;
  width: 286px;
  height: 56px;
}

.checkout-payment {
  left: 46px;
  top: 642px;
  width: 306px;
  height: 58px;
}

.checkout-email {
  left: 46px;
  top: 710px;
  width: 306px;
  height: 58px;
}

.checkout-ship {
  left: 46px;
  top: 778px;
  width: 306px;
  height: 58px;
}

.measure-added {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.measure-line-added {
  position: absolute;
  height: 4px;
  background: #000;
  transform-origin: left center;
}

.measure-dot-added {
  position: absolute;
  width: 33px;
  height: 33px;
  transform: translate(-50%, -50%);
}

.measure-dot-added.is-small {
  width: 26px;
  height: 26px;
}

.measure-text-added {
  position: absolute;
  color: #000;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
}

.shoulder-line {
  left: 101px;
  top: 222px;
  width: 188px;
  height: 3px;
}

.shoulder-dot-left {
  left: 101px;
  top: 222px;
}

.shoulder-dot-right {
  left: 289px;
  top: 222px;
}

.shoulder-text {
  left: 173px;
  top: 194px;
  font-size: 20px;
}

.sleeve-line {
  left: 318px;
  top: 307px;
  width: 43px;
}

.sleeve-dot-left {
  left: 318px;
  top: 307px;
}

.sleeve-dot-right {
  left: 361px;
  top: 307px;
}

.sleeve-text {
  left: 334px;
  top: 282px;
  font-size: 12px;
}

.result-screen {
  min-height: 980px;
  padding: 72px 28px 32px;
  background: #fff;
  text-align: center;
  color: #000;
}

.result-title {
  margin: 0 0 28px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 54px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow:
    -1px -1px 0 #000,
    0 -1px 0 #000,
    1px -1px 0 #000,
    -1px 0 0 #000,
    1px 0 0 #000,
    -1px 1px 0 #000,
    0 1px 0 #000,
    1px 1px 0 #000;
}

.result-shirt {
  width: 238px;
  height: 204px;
  object-fit: contain;
  margin: 0 auto 8px;
  display: block;
}

.result-screen h2 {
  margin: 8px 0 4px;
  font-size: 27px;
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
}

.result-confidence {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 500;
}

.measurement-card {
  display: grid;
  gap: 10px;
  margin: 0 auto;
  width: 315px;
}

.measurement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  border: 2px solid #9b9b9b;
  border-radius: 22px;
  background: #f4f4f4;
  text-align: left;
}

.measurement-row span {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
}

.measurement-row strong {
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #66c7cc;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
}

.result-note {
  margin: 22px auto 20px;
  max-width: 320px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 500;
  text-transform: uppercase;
}

.result-actions {
  display: grid;
  gap: 12px;
  width: 280px;
  margin: 0 auto;
}

.result-actions button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: #66c7cc;
  color: #000;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.result-actions button:first-child {
  background: #000;
  color: #fff;
}

.result-save {
  left: 55px;
  top: 740px;
  width: 280px;
  height: 58px;
}

.result-shop {
  left: 55px;
  top: 806px;
  width: 280px;
  height: 58px;
}

.payment-screen {
  min-height: 980px;
  padding: 72px 28px 32px;
  background: #fff;
  color: #000;
  text-align: center;
}

.payment-title {
  display: grid;
  gap: 0;
  margin: 0 0 42px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    -1px -1px 0 #000,
    0 -1px 0 #000,
    1px -1px 0 #000,
    -1px 0 0 #000,
    1px 0 0 #000,
    -1px 1px 0 #000,
    0 1px 0 #000,
    1px 1px 0 #000;
}

.payment-list {
  display: grid;
  gap: 14px;
}

.payment-card,
.payment-option,
.default-row {
  width: 100%;
  min-height: 68px;
  border: 2px solid #9b9b9b;
  border-radius: 24px;
  background: #f5f5f5;
}

.payment-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  text-align: left;
}

.payment-card p {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
}

.payment-card strong {
  font-size: 23px;
  font-weight: 600;
}

.payment-card > span {
  min-width: 64px;
  padding: 9px 11px;
  border-radius: 999px;
  background: #66c7cc;
  font-size: 14px;
  font-weight: 700;
}

.secondary-card {
  background: #fff;
}

.payment-option {
  cursor: pointer;
  color: #000;
  font-size: 20px;
  font-weight: 500;
}

.default-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 0 18px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
}

.default-box {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 3px solid #000;
  background: #fff;
}

.default-box.checked {
  background: #000;
  box-shadow: inset 0 0 0 7px #fff;
}

.payment-back-button {
  position: absolute;
  left: 18px;
  bottom: 22px;
  width: 70px;
  height: 70px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.payment-back-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-default {
  left: 28px;
  top: 728px;
  width: 334px;
  height: 72px;
}

.payment-add {
  left: 28px;
  top: 372px;
  width: 334px;
  height: 68px;
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
    place-items: start center;
  }

  .phone {
    width: 390px;
    max-width: 100vw;
    height: 100vh;
    box-shadow: none;
  }
}
