/* Registration page aligned with the calm cash-out workspace. */
body:has(.register-page) {
  background: #f2f7f7 !important;
  color: #172326 !important;
  min-height: 100dvh;
}

body:has(.register-page) .shell {
  align-items: flex-start;
  background:
    radial-gradient(circle at 18% 10%, rgba(15, 143, 134, 0.07), transparent 34%),
    linear-gradient(135deg, #eef6f5 0%, #f7f9fa 58%, #edf3f4 100%) !important;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-height: calc(100dvh - 68px);
  padding: clamp(24px, 5vh, 52px) 20px calc(92px + env(safe-area-inset-bottom));
}

body:has(.register-page) .register-page {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid #dce6e7 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 54px rgba(38, 52, 58, 0.11) !important;
  color: #172326 !important;
  height: auto !important;
  margin: 0 auto !important;
  max-width: 640px !important;
  min-height: 0 !important;
  overflow: visible;
  padding: clamp(26px, 4vw, 38px) !important;
  width: 100%;
}

.register-page .register-brand {
  color: #0f8f86;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

body:has(.register-page) .register-page h1 {
  color: #172126 !important;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 8px;
}

body:has(.register-page) .register-page .auth-note {
  color: #5f7178 !important;
  font-size: 0.92rem;
  margin: 0 0 24px;
}

.register-progress {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  position: relative;
}

.register-progress::before {
  background: #dbe8e8;
  content: "";
  height: 2px;
  left: calc(25% + 18px);
  position: absolute;
  right: calc(25% + 18px);
  top: 19px;
}

.register-progress li {
  align-items: center;
  color: #71838a;
  display: flex;
  gap: 10px;
  min-width: 0;
  position: relative;
}

.register-progress li > span {
  align-items: center;
  background: #eef4f4;
  border: 1px solid #d2dfe0;
  border-radius: 50%;
  display: flex;
  flex: 0 0 38px;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
}

.register-progress li div { display: grid; gap: 2px; }
.register-progress li strong { color: #52666d; font-size: 0.82rem; }
.register-progress li small { color: #829299; font-size: 0.66rem; }
.register-progress li.is-active > span,
.register-progress li.is-complete > span { background: #0f8f86; border-color: #0f8f86; color: #fff; }
.register-progress li.is-active strong,
.register-progress li.is-complete strong { color: #0d756e; }

.register-step {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.register-step[hidden] { display: none !important; }

.register-step legend {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 0;
  width: 100%;
}

.register-step legend strong { color: #172326; font-size: 1rem; }
.register-step legend small { color: #73858b; font-size: 0.72rem; font-weight: 600; }

body:has(.register-page) .register-page label,
.register-phone-field > label {
  color: #42575e !important;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 8px;
  margin: 16px 0;
}

.register-label {
  align-items: center;
  display: flex;
  gap: 7px;
  justify-content: space-between;
}

.register-label em {
  color: #0d756e;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
}

.register-label em.is-optional { color: #75878d; }

body:has(.register-page) .register-page label small,
.register-phone-field label small {
  color: #74858b !important;
  font-size: 0.7rem;
  font-weight: 600;
}

body:has(.register-page) .register-page input,
body:has(.register-page) .register-page select,
body:has(.register-page) .register-page .country-trigger {
  background: #f7fafb !important;
  border: 1px solid #d3dfe1 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  color: #172326 !important;
  min-height: 50px;
}

body:has(.register-page) .register-page input::placeholder { color: #8a9a9f !important; opacity: 1; }

body:has(.register-page) .register-page input:focus,
body:has(.register-page) .register-page select:focus,
body:has(.register-page) .register-page .country-trigger:hover,
body:has(.register-page) .register-page .country-trigger:focus-visible {
  background: #fff !important;
  border-color: #0f8f86 !important;
  box-shadow: 0 0 0 3px rgba(15, 143, 134, 0.13) !important;
  outline: 0;
}

body:has(.register-page) .register-page input.is-invalid,
body:has(.register-page) .register-page select.is-invalid {
  border-color: #ba4b4b !important;
  box-shadow: 0 0 0 3px rgba(186, 75, 75, 0.1) !important;
}

.register-page .field-error {
  color: #a63f3f !important;
  display: block;
  min-height: 0;
}

.register-page .field-error:empty { display: none; }

body:has(.register-page) .register-page .country-menu {
  background: #fff !important;
  border-color: #cbdadb !important;
  box-shadow: 0 18px 44px rgba(38, 52, 58, 0.16) !important;
}

body:has(.register-page) .register-page .country-option:hover,
body:has(.register-page) .register-page .country-option:focus-visible,
body:has(.register-page) .register-page .country-option[aria-selected="true"] { background: #e8f5f3 !important; }

body:has(.register-page) .register-page .password-toggle,
body:has(.register-page) .register-page .password-toggle:hover,
body:has(.register-page) .register-page .password-toggle:focus-visible {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #60767c !important;
  transform: translateY(-50%);
}

.register-step-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.register-step-actions button {
  border-radius: 12px !important;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 50px;
  padding: 0 22px;
}

.register-step-actions:not(.is-final) .register-primary { width: 100%; }

body:has(.register-page) .register-primary {
  background: #0f8f86 !important;
  border: 1px solid #0f8f86 !important;
  box-shadow: 0 10px 22px rgba(15, 143, 134, 0.18) !important;
  color: #fff !important;
}

body:has(.register-page) .register-primary:hover,
body:has(.register-page) .register-primary:focus-visible { background: #0b756e !important; border-color: #0b756e !important; }

body:has(.register-page) .register-secondary {
  background: #fff !important;
  border: 1px solid #c7d8d9 !important;
  box-shadow: none !important;
  color: #4b6269 !important;
}

.register-login-link {
  color: #0d756e !important;
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
}

body:has(.register-page) .home-bottom-nav {
  background: rgba(236, 246, 245, 0.95) !important;
  border-top: 1px solid rgba(15, 143, 134, 0.16) !important;
  box-shadow: 0 -12px 34px rgba(38, 52, 58, 0.08) !important;
  backdrop-filter: blur(18px);
}

body:has(.register-page) .home-bottom-nav a,
body:has(.register-page) .home-bottom-nav button { color: #64777f !important; }
body:has(.register-page) .home-bottom-nav a.active,
body:has(.register-page) .home-bottom-nav a:hover,
body:has(.register-page) .home-bottom-nav button:hover { color: #0d756e !important; }

@media (max-width: 560px) {
  body:has(.register-page) .shell { padding: 14px 12px calc(86px + env(safe-area-inset-bottom)); }
  body:has(.register-page) .register-page { border-radius: 16px !important; padding: 22px 18px !important; }
  .register-progress { gap: 10px; }
  .register-progress li small { display: none; }
  .register-progress::before { left: calc(25% + 12px); right: calc(25% + 12px); }
  body:has(.register-page) .register-page .phone-field { grid-template-columns: 104px minmax(0, 1fr); }
  .register-step-actions.is-final { display: grid; grid-template-columns: 0.75fr 1.25fr; }
  .register-step-actions button { padding-inline: 12px; }
}

/* Registration and OTP feedback use the same calm teal language. */
body:has(.register-page) .game-modal-backdrop,
body:has(.otp-page) .game-modal-backdrop {
  background: rgba(31, 47, 51, 0.46) !important;
  backdrop-filter: blur(5px);
  padding: 20px;
}

body:has(.register-page) .game-modal,
body:has(.otp-page) .game-modal {
  background: #ffffff !important;
  border: 1px solid #d8e5e5 !important;
  border-radius: 20px !important;
  box-shadow: 0 26px 72px rgba(24, 43, 47, 0.24) !important;
  color: #172326 !important;
  max-width: 420px;
  padding: 30px !important;
  width: min(100%, 420px);
}

body:has(.register-page) .game-modal::before,
body:has(.otp-page) .game-modal::before {
  background: #0f8f86 !important;
  height: 4px;
}

body:has(.register-page) .game-modal-rank,
body:has(.otp-page) .game-modal-rank,
body:has(.register-page) .game-modal-rank.is-success,
body:has(.otp-page) .game-modal-rank.is-success {
  background: #e8f5f3 !important;
  border: 1px solid #b9deda !important;
  color: #0d756e !important;
  text-shadow: none !important;
}

body:has(.register-page) .game-modal-rank.is-success::after,
body:has(.otp-page) .game-modal-rank.is-success::after {
  border-color: rgba(15, 143, 134, 0.28) !important;
}

body:has(.register-page) .game-modal .game-modal-eyebrow,
body:has(.otp-page) .game-modal .game-modal-eyebrow {
  background: transparent !important;
  color: #0d756e !important;
  letter-spacing: 0.13em;
  padding: 0 !important;
}

body:has(.register-page) .game-modal h2,
body:has(.otp-page) .game-modal h2 { color: #172326 !important; }

body:has(.register-page) .game-modal p:not(.game-modal-eyebrow),
body:has(.otp-page) .game-modal p:not(.game-modal-eyebrow) {
  color: #5f7178 !important;
  line-height: 1.55;
}

body:has(.register-page) .game-modal button,
body:has(.otp-page) .game-modal button {
  background: #0f8f86 !important;
  border: 1px solid #0f8f86 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(15, 143, 134, 0.18) !important;
  color: #ffffff !important;
  min-height: 50px;
}

body:has(.register-page) .game-modal button:hover,
body:has(.register-page) .game-modal button:focus-visible,
body:has(.otp-page) .game-modal button:hover,
body:has(.otp-page) .game-modal button:focus-visible { background: #0b756e !important; }

body:has(.otp-page) {
  background: #f2f7f7 !important;
  color: #172326 !important;
  min-height: 100dvh;
}

body:has(.otp-page) .shell {
  align-items: center;
  background:
    radial-gradient(circle at 18% 10%, rgba(15, 143, 134, 0.07), transparent 34%),
    linear-gradient(135deg, #eef6f5 0%, #f7f9fa 58%, #edf3f4 100%) !important;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-height: calc(100dvh - 68px);
  padding: clamp(24px, 5vh, 52px) 20px calc(92px + env(safe-area-inset-bottom));
}

body:has(.otp-page) .otp-page {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid #dce6e7 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 54px rgba(38, 52, 58, 0.11) !important;
  color: #172326 !important;
  height: auto !important;
  margin: 0 auto !important;
  max-width: 520px !important;
  min-height: 0 !important;
  overflow: visible;
  padding: clamp(26px, 4vw, 38px) !important;
  width: 100%;
}

.otp-page .otp-progress {
  align-items: center;
  display: flex;
  gap: 11px;
  margin-bottom: 22px;
}

.otp-page .otp-progress > span {
  align-items: center;
  background: #0f8f86;
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: 0 0 38px;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
}

.otp-page .otp-progress div { display: grid; gap: 2px; }
.otp-page .otp-progress strong { color: #0d756e; font-size: 0.82rem; }
.otp-page .otp-progress small { color: #74858b; font-size: 0.68rem; font-weight: 700; }

body:has(.otp-page) .otp-page h1 {
  color: #172126 !important;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 8px;
}

body:has(.otp-page) .otp-page .auth-note { color: #5f7178 !important; margin-bottom: 22px; }
body:has(.otp-page) .otp-page label { color: #42575e !important; font-size: 0.82rem; font-weight: 800; gap: 8px; margin: 16px 0; }
body:has(.otp-page) .otp-page label small { color: #74858b !important; font-size: 0.7rem; font-weight: 600; }

body:has(.otp-page) .otp-page input {
  background: #f7fafb !important;
  border: 1px solid #d3dfe1 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  color: #172326 !important;
  min-height: 50px;
}

body:has(.otp-page) .otp-page input:focus {
  background: #fff !important;
  border-color: #0f8f86 !important;
  box-shadow: 0 0 0 3px rgba(15, 143, 134, 0.13) !important;
  outline: 0;
}

body:has(.otp-page) .otp-page input[readonly] { color: #5d7077 !important; }

.otp-page .otp-code-input {
  font-size: 1.45rem !important;
  font-weight: 900;
  letter-spacing: 0.45em;
  text-align: center;
}

.otp-page .otp-actions { display: grid; gap: 13px; margin-top: 24px; }
.otp-page .otp-actions button {
  background: #0f8f86 !important;
  border: 1px solid #0f8f86 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 22px rgba(15, 143, 134, 0.18) !important;
  color: #fff !important;
  font-weight: 900;
  min-height: 50px;
}
.otp-page .otp-actions button:hover,
.otp-page .otp-actions button:focus-visible { background: #0b756e !important; }
.otp-page .otp-actions a { color: #0d756e !important; font-size: 0.78rem; font-weight: 800; text-align: center; text-decoration: none; }

body:has(.otp-page) .home-bottom-nav {
  background: rgba(236, 246, 245, 0.95) !important;
  border-top: 1px solid rgba(15, 143, 134, 0.16) !important;
  box-shadow: 0 -12px 34px rgba(38, 52, 58, 0.08) !important;
  backdrop-filter: blur(18px);
}
body:has(.otp-page) .home-bottom-nav a,
body:has(.otp-page) .home-bottom-nav button { color: #64777f !important; }
body:has(.otp-page) .home-bottom-nav a.active,
body:has(.otp-page) .home-bottom-nav a:hover,
body:has(.otp-page) .home-bottom-nav button:hover { color: #0d756e !important; }

@media (max-width: 560px) {
  body:has(.register-page) .game-modal,
  body:has(.otp-page) .game-modal { border-radius: 16px !important; padding: 24px 20px !important; }
  body:has(.otp-page) .shell { align-items: flex-start; padding: 14px 12px calc(86px + env(safe-area-inset-bottom)); }
  body:has(.otp-page) .otp-page { border-radius: 16px !important; padding: 22px 18px !important; }
}
