/* Authentication composition follows the approved portrait mockup.
   Track sizes use the browser's available height, including Android chrome. */
.auth-layout {
  --screen-height: min(100dvh, 960px);
  display: flex;
  justify-content: center;
  min-height: 100svh;
  max-width: none;
  background: #05071b;
}
.auth-layout .auth-art { display: none; }
.auth-layout .auth-side {
  width: min(100%, 460px);
  height: var(--screen-height);
  min-height: 0;
  padding: 0 5.7%;
  border: 0;
  display: block;
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 48% 28%, #10103b44, transparent 56%);
}
.auth-layout .auth-form {
  display: grid;
  grid-template-rows: 10% 27% 5% 3% 27% 5% 6% 5%;
  width: 100%;
  max-width: none;
  height: 100%;
  padding-top: calc(var(--screen-height) * .018);
  position: relative;
  z-index: 1;
}
.auth-layout .mobile-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-self: center;
  margin: 0;
  font-size: clamp(17px, 2.65svh, 24px);
  line-height: 1.1;
  letter-spacing: 3px;
  font-weight: 700;
}
.auth-layout .mobile-brand img {
  width: clamp(38px, 6.2svh, 61px);
  height: clamp(38px, 6.2svh, 61px);
}
.auth-layout .mobile-hero {
  display: block;
  width: calc(100% + 32px);
  height: 100%;
  max-height: none;
  margin: 0 -16px;
  object-fit: contain;
  mix-blend-mode: normal;
  transform: scale(1.08);
  /* Feather only the glow's outer edge; never crop the coin composition. */
  mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
}
.auth-layout .auth-form h1 {
  font-size: clamp(25px, 4.15svh, 38px);
  line-height: 1.12;
  letter-spacing: -.9px;
  text-align: center;
  align-self: center;
  margin: 0;
  white-space: nowrap;
}
.auth-layout .auth-form > .sub {
  font-size: clamp(12px, 1.95svh, 17px);
  line-height: 1.2;
  text-align: center;
  align-self: start;
  margin: 0;
  color: #aaa6d1;
}
.auth-layout #auth-form {
  display: grid;
  grid-template-rows: 30% 30% 15% 25%;
  min-height: 0;
  margin: 0;
  padding-top: calc(var(--screen-height) * .017);
  position: relative;
}
.auth-layout #auth-error:empty { display: none; }
.auth-layout #auth-error:not(:empty) {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  transform: translateY(-100%);
}
.auth-layout .error { font-size: 11px; padding: 7px 10px; margin: 0; }
.auth-layout .field {
  display: grid;
  grid-template-rows: 23% 66%;
  align-content: start;
  row-gap: 6%;
  min-height: 0;
  margin: 0;
}
.auth-layout .field > span {
  display: block;
  font-size: clamp(11px, 1.8svh, 15px);
  line-height: 1;
  margin: 0;
  align-self: center;
  font-weight: 600;
}
.auth-layout .input-wrap {
  min-height: 0;
  height: 100%;
  border: 1.2px solid #8a7fc5;
  border-radius: 10px;
  background: linear-gradient(110deg, #2422469c, #1a183b94);
}
.auth-layout .input-wrap input {
  min-height: 0;
  height: 100%;
  padding: 0 12px;
  font-size: clamp(11px, 1.9svh, 16px);
}
.auth-layout .input-wrap > .icon {
  width: clamp(17px, 2.8svh, 24px);
  height: clamp(17px, 2.8svh, 24px);
  margin-left: 14px;
  box-sizing: content-box;
  padding-right: 10px;
  border-right: 1px solid #8c81bf;
}
.auth-layout .eye { padding: 8px 12px; height: 100%; }
.auth-layout .eye .icon { width: 20px; height: 20px; }
.auth-layout .form-link {
  display: flex;
  align-items: start;
  justify-content: end;
  font-size: clamp(11px, 1.8svh, 15px);
  margin: 0;
}
.auth-layout .primary,
.auth-layout .secondary {
  height: 100%;
  min-height: 0;
  font-size: clamp(14px, 2.2svh, 19px);
  border-radius: 11px;
  font-weight: 700;
  padding: 0;
  box-shadow: none;
}
.auth-layout .primary { background: #00e5ec; }
.auth-layout .secondary { border: 1.5px solid #00e5ec; }
.auth-layout .divider {
  font-size: clamp(12px, 2svh, 17px);
  margin: 0;
  gap: 18px;
}
.auth-layout .divider:before, .auth-layout .divider:after { background: #8b80ba; }
.auth-layout .auth-footer {
  font-size: clamp(11px, 1.8svh, 15px);
  line-height: 1.3;
  align-self: end;
  text-align: center;
  margin: 0;
  white-space: nowrap;
}
.auth-waves {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 17%;
  object-fit: fill;
  opacity: .95;
}
/* Registration keeps the same composition, with more room for four fields. */
.auth-layout.register .auth-form { grid-template-rows: 9% 12% 5% 3% 53% 5%; }
.auth-layout.register .mobile-brand { font-size: clamp(16px, 2.4svh, 21px); }
.auth-layout.register .mobile-brand img { height: 5.1svh; width: 5.1svh; }
.auth-layout.register #auth-form {
  grid-template-rows: 17% 17% 22% 17% 14% 13%;
  padding-top: calc(var(--screen-height) * .012);
}
.auth-layout.register .field { grid-template-rows: 23% 65%; }
.auth-layout.register .field:has(.helper) { grid-template-rows: 18% 51% 18%; row-gap: 4%; }
.auth-layout.register .helper { font-size: 10px; margin: 0; align-self: center; }
.auth-layout.register .check {
  font-size: clamp(10px, 1.65svh, 13px);
  line-height: 1.4;
  margin: 0;
  align-self: center;
}
.auth-layout.register .check input { width: 15px; height: 15px; margin-top: 1px; }
@media (min-width: 651px) {
  .auth-layout .auth-side { padding: 0 26px; }
}
@media (max-width: 650px) {
  .auth-layout { max-width: none; }
  .auth-layout .auth-side { width: 100%; max-width: 460px; }
}
@media (max-width: 350px) {
  .auth-layout .auth-form h1 { font-size: 25px; }
  .auth-layout .auth-footer { font-size: 10.5px; }
}

/* Lock only authentication screens; the member dashboard keeps normal scrolling. */
html:has(.auth-layout),
body:has(.auth-layout) {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body:has(.auth-layout) { position: fixed; inset: 0; }
#app:has(.auth-layout) { width: 100%; height: 100%; overflow: clip; }
.auth-layout {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.auth-layout .auth-side { overflow: hidden; }
.auth-layout .auth-form > * { min-width: 0; }
.auth-layout .mobile-brand { grid-row: 1; }
.auth-layout .mobile-hero { grid-row: 2; }
.auth-layout h1 { grid-row: 3; }
.auth-layout .auth-form > .sub { grid-row: 4; }
.auth-layout #auth-form { grid-row: 5; }
.auth-layout .divider { grid-row: 6; }
.auth-layout .auth-form > .secondary { grid-row: 7; }
.auth-layout .auth-footer { grid-row: 8; white-space: normal; }
.auth-layout.register .auth-footer { grid-row: 6; }
/* Android resizes the layout viewport for the keyboard (see viewport meta).
   Short landscape/keyboard views give the space to the usable form. */
@media (max-height: 580px) {
  .auth-layout .mobile-brand, .auth-layout .mobile-hero { display: none; }
  .auth-layout .auth-form { grid-template-rows: 0 0 10% 5% 55% 7% 10% 8%; padding-top: 1dvh; }
  .auth-layout.register .auth-form { grid-template-rows: 0 0 9% 5% 76% 8%; }
  .auth-layout .auth-form h1 { font-size: 23px; }
  .auth-layout .auth-form > .sub { font-size: 11px; }
  .auth-layout #auth-form { padding-top: 1dvh; }
  .auth-layout .field > span { font-size: 11px; }
  .auth-layout .input-wrap input { font-size: 12px; }
  .auth-layout .primary, .auth-layout .secondary { font-size: 14px; }
  .auth-layout .auth-footer { font-size: 11px; }
  .auth-layout .auth-waves { height: 9%; opacity: .5; }
  .auth-layout.register .check { font-size: 10px; }
  .auth-layout.register .helper { font-size: 9px; }
}

/* Optional five-digit referral code fits the fixed registration composition. */
.auth-layout.register .auth-form{grid-template-rows:9% 8% 5% 3% 62% 5%}
.auth-layout.register #auth-form{grid-template-rows:15% 15% 19% 15% 11% 13% 12%}
@media(max-height:580px){.auth-layout.register .auth-form{grid-template-rows:0 0 9% 5% 76% 8%}}

/* Blend the actual media bounds, including narrow registration hero slots. */
.auth-layout .auth-hero{position:relative;pointer-events:none;overflow:visible;transform:none;mask-image:none;-webkit-mask-image:none;mix-blend-mode:screen}
.auth-layout .auth-hero img,.auth-layout .auth-hero video{position:absolute;inset:auto;left:50%;top:50%;width:auto;max-width:100%;height:100%;object-fit:contain;display:block;transform:translate(-50%,-50%);mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent),linear-gradient(to bottom,transparent,#000 9%,#000 94%,transparent);mask-composite:intersect;-webkit-mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent),linear-gradient(to bottom,transparent,#000 9%,#000 94%,transparent);-webkit-mask-composite:source-in}
.auth-layout .auth-hero video{opacity:0}.auth-layout .auth-hero.video-ready video{opacity:1}
