/*
 * App sign-up section ("Đăng ký thẻ thành viên trên ứng dụng ALADDIN"), module app-signup (app/Modules/AppSignup).
 * A panel with the text and store buttons, an illustrated phone playing the Aladdin Rewards app (App Store page, sign-up,
 * details, "Ưu đãi của tôi") and the 4 steps beside it; on phones the steps are a row of cards slid sideways.
 *
 * Brand look = the --as-* tokens below, set per website in config/app-signup.php ("theme"), printed on the section as
 * inline custom properties; nothing of a brand is written in this file. The app's own colours (--as-app-*, the App
 * Store's blue and greys) are the same for every brand: they are the Aladdin app's. Breakpoints: 1199 / 767 px.
 * Modifiers: --corner-cut | --corner-round | --corner-square, --steps-diamond | --steps-circle, --breakout.
 */
.as-signup {
  /* Brand tokens (defaults: TIAN LONG) */
  --as-panel-from: #ce3d27;
  --as-panel-to: #9d2523;
  --as-pattern: none;
  --as-pattern-size: 147px;
  --as-accent: #f2a222;
  --as-accent-light: #ffc75a;
  --as-accent-ink: #9d2523;
  --as-step-bg: #a42a20;
  --as-shade: #460a06;
  --as-text: #fff4e3;
  --as-font-title: Impact, 'Arial Narrow', sans-serif;
  --as-font-body: Arial, sans-serif;
  --as-title-size: 42px;
  --as-title-leading: 1.25;
  --as-cut: 28px;
  --as-radius: 24px;
  --as-space-top: 150px;
  --as-max-width: 1180px;
  --as-gutter: 40px;
  --as-step-duration: 4600ms;
  /* The Aladdin app (same for every brand) */
  --as-app-orange: #f26b0f;
  --as-app-orange-dark: #d84a06;
  --as-app-green: #004a32;
  --as-app-ink: #241306;
  --as-app-muted: #8b8f98;
  --as-app-ui: system-ui, -apple-system, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  position: relative;
  z-index: 1;
  margin-top: var(--as-space-top);
}

.as-signup *,
.as-signup *::before,
.as-signup *::after {
  box-sizing: border-box;
}

.as-signup__container {
  position: relative;
  width: min(var(--as-max-width), calc(100% - 2 * var(--as-gutter)));
  margin-inline: auto;
}

.as-signup__frame {
  position: relative;
}

.as-signup__panel::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--as-accent) 55%, transparent);
  pointer-events: none;
  clip-path: polygon(calc(var(--as-cut) - 4px) 0, calc(100% - var(--as-cut) + 4px) 0, 100% calc(var(--as-cut) - 4px), 100% calc(100% - var(--as-cut) + 4px), calc(100% - var(--as-cut) + 4px) 100%, calc(var(--as-cut) - 4px) 100%, 0 calc(100% - var(--as-cut) + 4px), 0 calc(var(--as-cut) - 4px));
}

.as-signup__panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 300px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 56px;
  color: var(--as-text);
}

.as-signup__panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    var(--as-pattern) 0 0 / var(--as-pattern-size) var(--as-pattern-size) repeat,
    linear-gradient(160deg, var(--as-panel-from) 0%, var(--as-panel-to) 100%);
  clip-path: polygon(var(--as-cut) 0, calc(100% - var(--as-cut)) 0, 100% var(--as-cut), 100% calc(100% - var(--as-cut)), calc(100% - var(--as-cut)) 100%, var(--as-cut) 100%, 0 calc(100% - var(--as-cut)), 0 var(--as-cut));
}

.as-signup__title {
  margin: 0 0 18px;
  color: var(--as-text);
  font: 400 var(--as-title-size)/var(--as-title-leading) var(--as-font-title);
  letter-spacing: -0.3px;
  text-transform: uppercase;
}

.as-signup__title em {
  color: var(--as-accent);
  font-style: normal;
}

.as-signup__text {
  max-width: 400px;
  margin: 0 0 26px;
  color: color-mix(in srgb, var(--as-text) 86%, transparent);
  font-size: 17px;
  line-height: 1.6;
}

.as-signup__text b {
  color: var(--as-text);
}

.as-signup__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.as-signup__badge {
  display: block;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.as-signup__badge:hover {
  transform: translateY(-2px);
}

.as-signup__badge:focus-visible {
  outline: 2px solid var(--as-accent);
  outline-offset: 3px;
}

.as-signup__badge img {
  display: block;
  width: auto;
  height: 46px;
}

/* The phone: breaks out of the panel's top on wide screens. */
.as-signup__stage {
  position: relative;
  z-index: 1; /* over the gold line */
  align-self: stretch;
  min-height: 440px;
}

.as-signup__phone {
  position: absolute;
  top: -118px;
  left: 50%;
  width: 276px;
  height: 568px;
  padding: 6px;
  border-radius: 44px;
  background: #1a1311;
  box-shadow: 0 0 0 2px #3b2b25, 0 34px 60px -18px rgba(40, 10, 0, 0.6), 0 10px 22px rgba(40, 10, 0, 0.25);
  transform: translateX(-50%) rotate(-3deg);
}

/* One type scale for every screen of the phone (an iPhone's sizes at the mockup's width), so no part reads larger or
   smaller than the rest: titles, bar titles and buttons, field values, text, small print, labels. */
.as-signup__screen {
  --as-fs-title: 16px;
  --as-fs-head: 13px;
  --as-fs-body: 13px;
  --as-fs-text: 11px;
  --as-fs-small: 10px;
  --as-fs-tiny: 8.5px;
  --as-fs-num: 16px;
  --as-fs-otp: 17px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #fff;
  color: var(--as-app-ink);
  font-family: var(--as-app-ui);
}

.as-signup__screen p {
  margin: 0;
}

.as-signup__island {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 9;
  width: 72px;
  height: 21px;
  margin-left: -36px;
  border-radius: 11px;
  background: #1a1311;
}

.as-signup__statusbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  padding: 14px 26px 0;
  font: 600 12px/1 var(--as-app-ui);
}

.as-signup__scr {
  position: absolute;
  inset: 0;
  padding: 50px 16px 16px;
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.as-signup__scr.is-on {
  opacity: 1;
  transform: none;
  transition-delay: 0.18s;
}

.as-signup__scr.is-out {
  opacity: 0;
  transform: translateX(-28px);
  transition-duration: 0.2s, 0.3s;
}

.as-signup__tap {
  position: absolute;
  z-index: 7;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(36, 19, 6, 0.22);
  opacity: 0;
  pointer-events: none;
}

.as-signup__tap.is-go {
  animation: as-signup-tap 0.7s ease forwards;
}

@keyframes as-signup-tap {
  0% { opacity: 0; transform: scale(1.5); }
  30% { opacity: 1; transform: scale(1); }
  60% { opacity: 1; transform: scale(0.82); }
  100% { opacity: 0; transform: scale(1.3); }
}

.as-signup__caret {
  display: none;
  width: 1.5px;
  height: 1.05em;
  margin-left: -7px; /* against the text, inside the field's 8 px gap */
  background: var(--as-app-orange);
  animation: as-signup-blink 1s steps(1) infinite;
}

.as-signup__field.is-focus .as-signup__caret {
  display: inline-block;
}

@keyframes as-signup-blink {
  50% { opacity: 0; }
}

/* 1. The app's page in the App Store app: back link, icon + name + subtitle + NHẬN / share, the info strip (cut by the
   screen's right edge, as it scrolls in the store), the screenshots (the third cut likewise). NHẬN: a
   waiting spinner, then the download ring with its stop square filling, then MỞ. */
.as-signup__scr--store {
  padding: 46px 0 0 14px;
  overflow: hidden;
  font-family: -apple-system, 'SF Pro Text', system-ui, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.as-signup__store-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 12px !important;
  color: #007aff;
  font-size: var(--as-fs-head);
  letter-spacing: -0.2px;
}

.as-signup__store-nav svg {
  width: 9px;
  height: 15px;
}

.as-signup__store-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding-right: 14px;
}

.as-signup__store-icon {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.16);
}

.as-signup__store-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 2px;
}

.as-signup__store-name {
  color: #000;
  font-size: var(--as-fs-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.as-signup__store-sub {
  margin-top: 2px !important;
  overflow: hidden;
  color: #8a8a8e;
  font-size: var(--as-fs-text);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.as-signup__store-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.as-signup__get {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 68px;
  height: 28px;
  padding: 0 14px;
  border-radius: 14px;
  background: #007aff;
  color: #fff;
  font-size: var(--as-fs-head);
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background-color 0.25s;
}

.as-signup__get-label {
  transition: opacity 0.2s;
}

/* The ring: one 24 px circle in the middle of the button (the button's box, wider than high, is never turned). */
.as-signup__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  opacity: 0;
  fill: none;
}

.as-signup__ring-track {
  stroke: #e3e3e8;
  stroke-width: 2.4;
}

.as-signup__ring-bar {
  stroke: #007aff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 62.84;
  stroke-dashoffset: 62.84;
  transform: rotate(-90deg);
  transform-origin: 12px 12px;
}

.as-signup__ring-stop {
  fill: #007aff;
  opacity: 0;
}

.as-signup__get.is-wait,
.as-signup__get.is-progress {
  background: transparent;
  transition: none;
}

.as-signup__get.is-wait .as-signup__get-label,
.as-signup__get.is-progress .as-signup__get-label {
  opacity: 0;
}

.as-signup__get.is-wait .as-signup__ring,
.as-signup__get.is-progress .as-signup__ring {
  opacity: 1;
}

.as-signup__get.is-wait .as-signup__ring {
  animation: as-signup-spin 0.9s linear infinite;
}

.as-signup__get.is-wait .as-signup__ring-track {
  stroke: transparent;
}

.as-signup__get.is-wait .as-signup__ring-bar {
  stroke: #c7c7cc;
  stroke-dashoffset: 46;
}

.as-signup__get.is-progress .as-signup__ring-bar {
  animation: as-signup-download 1.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

.as-signup__get.is-progress .as-signup__ring-stop {
  opacity: 1;
}

@keyframes as-signup-spin {
  to { transform: rotate(360deg); }
}

@keyframes as-signup-download {
  to { stroke-dashoffset: 0; }
}

.as-signup__share {
  width: 17px;
  height: 21px;
  color: #007aff;
}

.as-signup__store-info {
  display: flex;
  margin: 14px 0 0;
  padding: 10px 0 9px;
  border-top: 0.5px solid #d8d8dc;
  border-bottom: 0.5px solid #d8d8dc;
  white-space: nowrap;
}

.as-signup__store-info > div {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 86px;
  color: #8a8a8e;
  font-size: var(--as-fs-small);
  line-height: 1.2;
}

.as-signup__store-info > div + div {
  border-left: 0.5px solid #d8d8dc;
}

.as-signup__store-info small {
  font-size: var(--as-fs-tiny);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.as-signup__store-info b {
  margin: 3px 0 2px;
  color: #6e6e73;
  font-size: var(--as-fs-num);
  font-weight: 700;
  line-height: 1.05;
}

.as-signup__store-info span {
  font-size: var(--as-fs-small);
}

.as-signup__dev {
  width: 20px;
  height: 20px;
  margin: 2px 0 1px;
  color: #6e6e73;
}

/* Rating stars: grey ones under, dark ones over them cut at the rating (4.3 of 5). */
.as-signup__stars {
  position: relative;
  display: block;
  color: #d1d1d6;
  font-size: var(--as-fs-tiny) !important;
  letter-spacing: 1px;
  line-height: 1;
}

.as-signup__stars::before {
  content: '★★★★★';
}

.as-signup__stars::after {
  content: '★★★★★';
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--as-rating, 0) / 5 * 100%);
  overflow: hidden;
  color: #8a8a8e;
  white-space: nowrap;
}

.as-signup__store-shots {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.as-signup__store-shots img {
  display: block;
  flex: none;
  width: 104px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

/* 2–4. The app's screens */
.as-signup__logo {
  display: block;
  width: 118px;
  height: 84px;
  margin: 4px auto 6px;
  object-fit: cover; /* the icon's white margin cropped top and bottom */
}

.as-signup__h {
  font-size: var(--as-fs-title);
  font-weight: 700;
  text-align: center;
}

.as-signup__sub {
  margin: 5px 0 16px !important;
  color: var(--as-app-muted);
  font-size: var(--as-fs-text);
  line-height: 1.4;
  text-align: center;
}

.as-signup__label {
  margin: 12px 0 6px !important;
  color: #6c6258;
  font-size: var(--as-fs-text);
  font-weight: 600;
}

.as-signup__field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid #e7e2dc;
  border-radius: 12px;
  font-size: var(--as-fs-body);
  font-weight: 600;
  transition: border-color 0.3s;
}

.as-signup__field.is-focus {
  border-color: var(--as-app-orange);
}

.as-signup__field small {
  padding-right: 8px;
  border-right: 1px solid #e7e2dc;
  color: var(--as-app-muted);
  font-size: var(--as-fs-body);
  font-weight: 600;
}

.as-signup__field .is-placeholder {
  color: #c2bdb6;
  font-weight: 400;
}

.as-signup__btn {
  display: grid;
  place-items: center;
  height: 44px;
  margin-top: 16px;
  border-radius: 12px;
  background: var(--as-app-orange);
  color: #fff;
  font-size: var(--as-fs-head);
  font-weight: 700;
  transition: transform 0.15s, background-color 0.2s;
}

.as-signup__btn.is-press {
  background: var(--as-app-orange-dark);
  transform: scale(0.96);
}

.as-signup__login,
.as-signup__otp-screen {
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.as-signup__otp-screen {
  position: absolute;
  inset: 50px 16px 16px;
  opacity: 0;
  transform: translateX(30px);
}

.as-signup__scr.is-otp .as-signup__login {
  opacity: 0;
  transform: translateX(-30px);
}

.as-signup__scr.is-otp .as-signup__otp-screen {
  opacity: 1;
  transform: none;
}

.as-signup__otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.as-signup__otp span {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1.5px solid #e7e2dc;
  border-radius: 10px;
  font-size: var(--as-fs-otp);
  font-weight: 700;
}

.as-signup__otp span.is-in {
  border-color: var(--as-app-orange);
  animation: as-signup-pop 0.25s ease;
}

@keyframes as-signup-pop {
  50% { transform: scale(1.12); }
}

.as-signup__ok {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px !important;
  color: #1d8a4f;
  font-size: var(--as-fs-text);
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}

.as-signup__ok svg {
  width: 18px;
  height: 18px;
}

.as-signup__resend {
  margin-top: 12px !important;
  color: var(--as-app-muted);
  font-size: var(--as-fs-small);
  text-align: center;
}

.as-signup__resend b {
  color: var(--as-app-orange);
}

.as-signup__bar {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  margin: 2px 0 14px !important;
  font-size: var(--as-fs-head);
  font-weight: 700;
  text-align: center;
}

.as-signup__bar i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--as-app-orange);
}

.as-signup__bar i::before {
  content: '';
  width: 6px;
  height: 6px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: translateX(1px) rotate(45deg);
}

.as-signup__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: #fbe6d6;
  color: var(--as-app-orange);
}

.as-signup__avatar svg {
  width: 30px;
  height: 30px;
}

.as-signup__cal {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--as-app-muted);
}

.as-signup__gift {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px !important;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fff3ea;
  color: #8a4a1a;
  font-size: var(--as-fs-text);
  line-height: 1.35;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
}

.as-signup__gift svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--as-app-orange);
}

.as-signup__brands {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.as-signup__brands span {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: #f3f3f3;
  color: #6b6b6b;
  font-size: var(--as-fs-small);
  font-weight: 600;
}

.as-signup__brands .is-on {
  background: #fff;
  box-shadow: 0 0 0 1.5px var(--as-app-orange);
  color: var(--as-app-ink);
}

.as-signup__brands img {
  width: 20px;
  height: 20px;
}

.as-signup__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 -16px 10px;
  border-bottom: 1px solid #ececec;
  color: #b5b5b5;
  font-size: var(--as-fs-text);
  font-weight: 700;
  text-align: center;
}

.as-signup__tabs span {
  padding: 8px 0;
}

.as-signup__tabs .is-on {
  box-shadow: inset 0 -2px 0 var(--as-app-green);
  color: var(--as-app-green);
}

.as-signup__toast {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 10px !important;
  padding: 8px 10px;
  border-radius: 10px;
  background: #e8f5ee;
  color: #155f3e;
  font-size: var(--as-fs-small);
  font-weight: 600;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.4s;
}

.as-signup__toast svg {
  flex: none;
  width: 15px;
  height: 15px;
}

.as-signup__voucher {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #eee, 0 6px 14px -10px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.as-signup__voucher-stub {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--as-app-green);
  color: #fff;
}

.as-signup__voucher-stub::after {
  content: '';
  position: absolute;
  top: 0;
  right: -5px;
  bottom: 0;
  width: 10px;
  background: radial-gradient(circle at 5px 6px, #fff 3px, transparent 3.5px) 0 0 / 10px 12px repeat-y;
}

.as-signup__voucher-stub svg {
  width: 22px;
  height: 22px;
}

.as-signup__voucher-body {
  display: block;
  padding: 9px 10px 9px 12px;
  font-size: var(--as-fs-small);
  line-height: 1.35;
}

.as-signup__voucher-body b {
  display: block;
  font-size: var(--as-fs-text);
}

.as-signup__voucher-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--as-app-muted);
}

.as-signup__use {
  padding: 4px 10px;
  border-radius: 11px;
  background: var(--as-app-orange);
  color: #fff;
  font-size: var(--as-fs-small);
  font-weight: 700;
}

/* The end state of a screen: shown at once without the script (or with reduced motion), else reached by the steps. */
.as-signup__ok.is-on,
.as-signup__gift.is-on,
.as-signup__toast.is-on,
.as-signup__voucher.is-on {
  opacity: 1;
  transform: none;
}

/* Steps: the lit one plays on the phone, its line fills meanwhile; each is a button to jump to its screen. */
.as-signup__steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.as-signup__steps::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 21px;
  border-left: 2px dotted color-mix(in srgb, var(--as-accent) 55%, transparent);
}

.as-signup__step-btn {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.4s;
}

.as-signup__step-btn:hover,
.as-signup__step.is-on .as-signup__step-btn {
  opacity: 1;
}

.as-signup__step-btn:focus-visible {
  outline: 2px solid var(--as-accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.as-signup__num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding-bottom: 3px; /* the figures sit 1.5 px low in their line box (measured): lifted to the diamond's centre */
  color: var(--as-accent);
  font: 700 17px/1 var(--as-font-body);
  font-variant-numeric: tabular-nums;
  transition: color 0.35s;
}

/* A rounded diamond edged with the accent; lit: filled with it, a soft halo, the figure in --as-accent-ink. */
.as-signup__num::before {
  content: '';
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1.5px solid color-mix(in srgb, var(--as-accent) 85%, transparent);
  border-radius: 7px;
  background: var(--as-step-bg);
  transform: rotate(45deg);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.as-signup__step.is-on .as-signup__num {
  color: var(--as-accent-ink);
}

.as-signup__step.is-on .as-signup__num::before {
  border-color: var(--as-accent-light);
  background: linear-gradient(135deg, var(--as-accent-light) 0%, var(--as-accent) 100%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--as-accent) 20%, transparent), 0 6px 14px -4px rgba(60, 10, 0, 0.45);
  transform: rotate(45deg) scale(1.1);
}

.as-signup__step-title {
  display: block;
  margin-top: 4px;
  color: var(--as-text);
  font: 700 18px/1.3 var(--as-font-body);
}

.as-signup__step-desc {
  display: block;
  margin-top: 4px;
  color: color-mix(in srgb, var(--as-text) 80%, transparent);
  font-size: 15px;
  line-height: 1.5;
}

.as-signup__progress {
  display: block;
  height: 2px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 2px;
  background: color-mix(in srgb, var(--as-text) 14%, transparent);
}

.as-signup__progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--as-accent);
}

.as-signup.is-playing .as-signup__step.is-on .as-signup__progress i {
  animation: as-signup-fill var(--as-step-duration) linear forwards;
}

.as-signup.is-paused .as-signup__progress i {
  animation-play-state: paused !important;
}

@keyframes as-signup-fill {
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .as-signup__scr,
  .as-signup__login,
  .as-signup__otp-screen,
  .as-signup__voucher,
  .as-signup__gift,
  .as-signup__ok,
  .as-signup__toast {
    transition: none;
  }

  .as-signup__progress {
    display: none;
  }
}


/* Tablets: the text across the top, the phone (inside the panel) and the steps side by side under it. Phones: text,
   phone (smaller), steps (cards slid sideways), then the store buttons. */
@media (max-width: 1199px) {
  .as-signup {
    --as-space-top: 0px; /* the section above already ends with its own space */
    --as-gutter: 32px;
  }

  .as-signup__panel {
    grid-template-columns: 290px minmax(0, 1fr);
    grid-template-areas: 'copy copy' 'stage steps';
    gap: 36px 44px;
    padding: 52px 48px;
  }

  .as-signup__copy {
    grid-area: copy;
  }

  .as-signup__stage {
    grid-area: stage;
    min-height: 590px;
  }

  .as-signup__steps {
    grid-area: steps;
  }

  .as-signup__phone {
    top: 0;
    transform: translateX(-50%) rotate(-2deg);
  }

  .as-signup__text {
    max-width: 560px;
  }
}

@media (max-width: 767px) {
  .as-signup {
    --as-cut: 18px;
    --as-radius: 18px;
    --as-space-top: 0px; /* the section above already ends with its own space */
    --as-gutter: 20px;
  }

  .as-signup__panel::after {
    inset: 8px;
  }

  .as-signup__panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'copy' 'stage' 'steps';
    gap: 20px;
    padding: 30px 20px 24px;
  }

  /* Text and store buttons centred. */
  .as-signup__copy {
    text-align: center;
  }

  .as-signup__title {
    margin-bottom: 12px;
    font-size: 30px;
  }

  .as-signup__text {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.55;
  }

  .as-signup__text {
    margin-inline: auto;
  }

  /* The store buttons right under the text. */
  .as-signup__badges {
    justify-content: center;
    gap: 10px;
  }

  .as-signup__badge img {
    height: 40px;
  }

  /* The phone faces the reader (no tilt), smaller. */
  .as-signup__stage {
    min-height: 0;
    height: 404px;
  }

  .as-signup__phone {
    transform: translateX(-50%) scale(0.7);
    transform-origin: top center;
  }

  /* The steps: a row of cards slid sideways (snapping one by one, the next one peeking), out to the panel's edges.
     The lit card follows the phone; sliding to a card plays its screen (app-signup.js). */
  .as-signup__steps {
    display: flex;
    gap: 12px;
    margin: 0 -20px;
    padding: 4px 20px 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .as-signup__steps::-webkit-scrollbar {
    display: none;
  }

  .as-signup__steps::before {
    display: none;
  }

  .as-signup__step {
    flex: 0 0 80%;
    scroll-snap-align: start;
  }

  /* A card: the number beside its title (short cards). */
  .as-signup__step-btn {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    height: 100%;
    padding: 12px 14px 12px 10px;
    border: 1px solid color-mix(in srgb, var(--as-accent) 22%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--as-shade) 26%, transparent);
    opacity: 0.72;
    transition: opacity 0.35s, border-color 0.35s, background-color 0.35s;
  }

  .as-signup__step.is-on .as-signup__step-btn {
    border-color: color-mix(in srgb, var(--as-accent) 70%, transparent);
    background: color-mix(in srgb, var(--as-shade) 40%, transparent);
  }

  .as-signup__num {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .as-signup__num::before {
    inset: 6px;
    border-radius: 6px;
  }

  .as-signup__step-title {
    margin-top: 7px;
    font-size: 15px;
  }

  .as-signup__step-desc {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .as-signup__progress {
    margin-top: 10px;
  }
}

/* Corners of the panel: cut (chamfered, default), round, square. */
.as-signup--corner-round .as-signup__panel::before,
.as-signup--corner-round .as-signup__panel::after,
.as-signup--corner-square .as-signup__panel::before,
.as-signup--corner-square .as-signup__panel::after {
  clip-path: none;
}

.as-signup--corner-round .as-signup__panel::before {
  border-radius: var(--as-radius);
}

.as-signup--corner-round .as-signup__panel::after {
  border-radius: calc(var(--as-radius) - 8px);
}

/* Step numbers in circles instead of diamonds. */
.as-signup--steps-circle .as-signup__num::before {
  border-radius: 50%;
  transform: none;
}

.as-signup--steps-circle .as-signup__step.is-on .as-signup__num::before {
  transform: scale(1.1);
}

/* Without --breakout the phone stays inside the panel on wide screens too. */
@media (min-width: 1200px) {
  .as-signup:not(.as-signup--breakout) {
    --as-space-top: 96px;
  }

  .as-signup:not(.as-signup--breakout) .as-signup__stage {
    min-height: 590px;
  }

  .as-signup:not(.as-signup--breakout) .as-signup__phone {
    top: 0;
  }
}
