/* Shared account surfaces, with the lobby's lime accent. */
[data-member][hidden],
[data-guest][hidden],
.account-dialog [hidden] {
  display: none !important;
}
.site-header {
  background: #202923f7;
  border-bottom: 1px solid #60705c66;
  box-shadow: 0 5px 24px #0003;
  backdrop-filter: blur(20px);
}
.footer-nav.mobile-nav {
  background: #252f27f7;
  border-color: #7b8f695c;
  box-shadow:
    0 12px 40px #0008,
    inset 0 1px #e7ffd21a;
}
.footer-nav button {
  color: #bbc7b2;
}
.footer-nav button.active {
  background: #c3fa4c13;
}
.header-actions {
  margin-left: auto;
}
.site-header #sound-toggle {
  display: none;
}
.profile-trigger {
  border-color: #93a77d69;
  background: #303e2d;
  color: #d9f7bc;
}
.guest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.guest-actions button {
  min-height: 43px;
  padding: 10px 17px;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}
.signin-trigger {
  border: 1px solid #8e9e7b66;
  color: #e4edda;
}
.signup-trigger {
  background: #c3fa4c;
  color: #142008;
  box-shadow: 0 3px 18px #c3fa4c10;
}
.wallet-trigger {
  min-height: 46px;
  padding: 7px 13px;
  gap: 9px;
}
.wallet-trigger strong {
  font-size: 16px;
}
.wallet-trigger small {
  font-size: 8px;
}
.account-dialog {
  width: min(480px, calc(100vw - 32px));
  max-width: 480px;
  max-height: calc(100dvh - 40px);
  padding: 0;
  margin: auto;
  color: #eef3e8;
  border: 1px solid #52663b;
  border-radius: 22px;
  background: radial-gradient(ellipse at 100% 0%, #34431f80, transparent 55%), #11190f;
  box-shadow: 0 35px 120px #000c;
  overflow: hidden;
  font-family: inherit;
  animation: account-enter 0.25s ease-out;
}
.account-dialog[open] {
  display: flex;
  flex-direction: column;
}
.account-dialog::backdrop {
  background: #030803c9;
  backdrop-filter: blur(9px);
}
.account-dialog button,
.account-dialog input,
.account-dialog select {
  font-family: inherit;
}
.account-dialog button {
  cursor: pointer;
}
.account-dialog button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.account-dialog h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 7px 0 0;
  line-height: 1.2;
}
.account-dialog h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
.account-dialog .eyebrow {
  font-size: 8px;
  letter-spacing: 1.7px;
}
.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 15px;
  gap: 10px;
  flex-shrink: 0;
}
.account-close {
  width: 42px;
  height: 42px;
  border: 1px solid #a3b58222;
  background: #ffffff05;
  border-radius: 50%;
  font-size: 29px;
  line-height: 1;
  color: #c3ceb5;
  flex-shrink: 0;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 19px;
  min-width: 0;
}
.profile-identity > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.profile-identity strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.profile-identity small {
  font-size: 10px;
  color: #98a58a;
}
.profile-identity > span:first-child {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #1a2809;
  background: linear-gradient(135deg, #dbff99, #9bc531);
  font-weight: 850;
  font-size: 23px;
  flex-shrink: 0;
}
.account-status {
  margin-left: auto;
  font-size: 8px;
  color: #bdcf9c;
  border: 1px solid #70894644;
  border-radius: 6px;
  padding: 5px;
  letter-spacing: 1px;
}
.account-tabs {
  display: flex;
  padding: 0 18px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  flex-shrink: 0;
  border-bottom: 1px solid #52663b55;
  background: #080e0750;
}
.account-tabs button {
  white-space: nowrap;
  min-height: 46px;
  padding: 9px 11px;
  color: #a5b198;
  font-size: 11px;
  border-bottom: 2px solid transparent;
  font-weight: 650;
}
.account-tabs button[aria-selected='true'] {
  color: #c3fa4c;
  border-bottom-color: #c3fa4c;
  background: linear-gradient(0deg, #c3fa4c0c, transparent);
}
.account-content {
  padding: 19px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  min-height: 0;
}
.account-dialog :focus-visible {
  outline: 2px solid #c3fa4c;
  outline-offset: 3px;
}
.profile-total {
  display: grid;
  gap: 5px;
  background: linear-gradient(120deg, #34491f, #1d2d14);
  border: 1px solid #637e3b6b;
  border-radius: 15px;
  padding: 17px;
}
.profile-total > span {
  font-size: 11px;
  color: #c3d1b1;
}
.profile-total strong {
  font-size: 34px;
  letter-spacing: -1px;
}
.profile-total small {
  font-size: 9px;
  color: #a5b98e;
}
.profile-balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
}
.profile-balances > div {
  padding: 12px;
  border: 1px solid #53613b55;
  background: #070c0840;
  border-radius: 11px;
  display: grid;
  gap: 5px;
}
.profile-balances span {
  font-size: 10px;
  color: #aebc9e;
}
.profile-balances strong {
  font-size: 20px;
  letter-spacing: -0.5px;
}
.account-primary,
.account-secondary {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 43px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.account-primary {
  background: #c3fa4c;
  color: #182407;
  border: 1px solid #c3fa4c;
}
.account-primary > span {
  margin-left: auto;
}
.account-secondary {
  border: 1px solid #72845059;
  background: #28351d66;
  color: #d5e2c5;
}
.account-text {
  min-height: 36px;
  font-size: 11px;
  color: #bdd18f;
  text-align: left;
}
.profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}
.profile-section-heading h3 {
  margin-bottom: 12px;
}
.profile-section-heading button {
  font-size: 10px;
  min-height: 30px;
  color: #bddd86;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.profile-stats > div {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 1px solid #52633c44;
  border-radius: 10px;
  background: #ffffff03;
}
.profile-stats strong {
  font-size: 23px;
}
.profile-stats small {
  font-size: 10px;
  color: #b1bba5;
}
.stat-win strong {
  color: #c3fa4c;
}
.stat-loss strong {
  color: #ff9691;
}
.stat-draw strong {
  color: #cfb7ff;
}
.verification-summary {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #52643b55;
  border-radius: 12px;
  background: #172210;
}
.verification-summary > span:first-child {
  display: grid;
  gap: 5px;
}
.verification-summary strong {
  font-size: 12px;
}
.verification-summary small {
  font-size: 10px;
  line-height: 1.5;
  color: #a3b68d;
}
.verification-summary > span:last-child {
  color: #c3fa4c;
}
.account-note {
  font-size: 11px;
  line-height: 1.65;
  color: #a1af92;
  margin: 0 0 14px;
}
.account-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 10px;
}
.account-form label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: #c4d0b6;
  min-width: 0;
}
.account-form input,
.history-filter select {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #5b704044;
  background: #080f06;
  color: #f0f6e9;
  border-radius: 9px;
  outline: none;
  font-size: 14px;
}
.account-form input:focus,
.history-filter select:focus {
  border-color: #b9e659;
}
.account-form input[readonly] {
  color: #a8b697;
  background: #1d2818;
}
.form-wide {
  grid-column: 1/-1;
}
.single-column {
  grid-template-columns: 1fr;
}
.form-wide.account-note {
  margin: 0;
}
.contact-checks {
  display: flex;
  gap: 8px;
  margin: 0 0 15px;
  flex-wrap: wrap;
}
.contact-checks > span {
  color: #c6dfa7;
  font-size: 10px;
  padding: 7px 9px;
  border: 1px solid #849d4d44;
  border-radius: 6px;
  background: #b8df5510;
}
.document-card {
  padding: 13px;
  border: 1px solid #5f75414d;
  border-radius: 12px;
  margin-bottom: 10px;
  background: #1d29144d;
}
.document-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.document-title > span {
  font-size: 27px;
  color: #bbd293;
}
.document-title > div {
  display: grid;
  gap: 5px;
}
.document-title strong {
  font-size: 12px;
}
.document-title small {
  color: #9bab8a;
  font-size: 10px;
}
.document-filename {
  font-size: 11px;
  line-height: 1.5;
  color: #b5c69e;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.document-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.document-actions .account-secondary {
  width: auto;
  flex: 1;
  font-size: 10px;
  padding: 8px;
  white-space: nowrap;
  min-height: 40px;
}
.file-choice {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.file-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.file-choice:focus-within {
  outline: 2px solid #c3fa4c;
  outline-offset: 2px;
}
.document-actions .account-text {
  width: 100%;
  color: #d9aca3;
}
.history-filter {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 10px 0 16px;
  font-size: 11px;
  color: #a9b997;
}
.history-filter select {
  font-size: 12px;
  width: auto;
  flex: 1;
}
.history-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid #53623b55;
}
.history-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.history-copy strong {
  font-size: 12px;
  line-height: 1.45;
}
.history-copy small {
  color: #8d9d7e;
  font-size: 9px;
}
.history-copy p {
  font-size: 10px;
  line-height: 1.6;
  color: #afbd9c;
  margin: 0;
  overflow-wrap: anywhere;
}
.history-amount {
  white-space: nowrap;
  font-size: 12px;
  color: #d9ecbd;
  font-variant-numeric: tabular-nums;
}
.result-pill {
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 10px;
  white-space: nowrap;
}
.result-pill.win {
  color: #c3fa4c;
  background: #86af3f19;
}
.result-pill.loss {
  color: #ffa69a;
  background: #c66b591c;
}
.result-pill.draw {
  color: #d6beff;
  background: #b390ec1b;
}
.history-empty {
  padding: 26px 12px;
  text-align: center;
  border: 1px dashed #60744266;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: #a2b18f;
}
.history-more {
  margin-top: 12px;
}
.account-feedback {
  min-height: 0;
  font-size: 11px;
  line-height: 1.7;
  color: #d4e8b5;
  margin: 13px 0 0;
}
.account-feedback:empty {
  display: none;
}
.account-feedback.error {
  color: #ffb5a6;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0 18px;
  border-bottom: 1px solid #5c714344;
}
.setting-row > div {
  display: grid;
  gap: 6px;
}
.setting-row strong {
  font-size: 12px;
}
.setting-row small {
  font-size: 10px;
  color: #9ead8d;
}
.setting-row .icon-button {
  width: 44px;
  height: 44px;
  position: relative;
}
.password-settings {
  margin: 18px 0;
}
.password-settings summary {
  font-size: 13px;
  cursor: pointer;
  min-height: 36px;
}
.password-settings form {
  margin-top: 10px;
}
.signout-button {
  color: #e6d1c5;
}
.profile-money-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-dialog {
  max-width: 420px;
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  --auth-padding: 23px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.auth-dialog .account-heading {
  padding: 0 0 10px;
}
.auth-dialog h2 {
  font-size: 27px;
}
.auth-intro {
  font-size: 12px;
  color: #abbc97;
  line-height: 1.7;
  margin: 0 0 20px;
}
.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: #080e07;
  border: 1px solid #506b334d;
  border-radius: 11px;
  gap: 4px;
  margin-bottom: 22px;
}
.auth-mode-tabs button {
  min-height: 40px;
  border-radius: 8px;
  font-size: 12px;
  color: #9ead8a;
  font-weight: 700;
}
.auth-mode-tabs button[aria-selected='true'] {
  background: #304222;
  color: #dcf6be;
}
.auth-switch {
  width: 100%;
  text-align: center;
  margin-top: 12px;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  padding-right: 43px;
}
.password-reveal {
  position: absolute;
  right: 0;
  top: 0;
  width: 43px;
  height: 43px;
  color: #b5c7a0;
  font-size: 18px;
}
.auth-demo-note {
  border-top: 1px solid #52683844;
  margin-top: 18px;
  padding-top: 14px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.auth-demo-note p {
  font-size: 9px;
  color: #9caf87;
  line-height: 1.7;
  margin: 0;
}
.auth-demo-note .demo-badge {
  margin: 0;
  flex-shrink: 0;
}
.verification-steps {
  display: flex;
  gap: 15px;
  font-size: 10px;
  margin: 0 0 16px;
}
.verification-steps span {
  color: #91a27b;
}
.verification-steps b {
  color: #c3fa4c;
}
.otp-card {
  padding: 13px;
  background: #202d1666;
  border: 1px solid #566e3b55;
  border-radius: 12px;
  margin-bottom: 12px;
}
.otp-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.otp-heading strong {
  font-size: 13px;
}
.otp-status {
  font-size: 9px;
  color: #b5c89e;
}
.otp-status.complete {
  color: #c3fa4c;
}
.otp-card p {
  font-size: 11px;
  color: #a6b895;
  overflow-wrap: anywhere;
  margin: 7px 0 12px;
}
.otp-form {
  display: flex;
  gap: 8px;
}
.otp-form input {
  min-width: 0;
  width: 100%;
  background: #081004;
  border: 1px solid #69814766;
  border-radius: 8px;
  color: #efffda;
  padding: 10px;
  font: inherit;
  font-size: 18px;
  letter-spacing: 4px;
}
.otp-form .account-secondary {
  width: auto;
  font-size: 11px;
  flex-shrink: 0;
  padding: 10px;
}
.otp-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}
.otp-tools button {
  font-size: 10px;
}
.demo-code {
  display: block;
  color: #c3fa4c;
  font-size: 12px;
  padding-top: 7px;
  letter-spacing: 1px;
}
.wallet-chips-only .wallet-funding,
.wallet-funding-only .wallet-convert {
  display: none;
}
.wallet-chips-only .balance-grid small {
  display: none;
}
.wallet-compact-note {
  font-size: 10px;
  line-height: 1.6;
  color: #a8b995;
  margin: 9px 0;
}
@media (min-width: 601px) {
  #wallet-dialog {
    width: min(400px, calc(100vw - 40px));
    padding: 18px;
    max-height: calc(100dvh - 40px);
  }
  #wallet-dialog .money-heading h2 {
    font-size: 22px;
  }
  #wallet-dialog .balance-grid strong {
    font-size: 20px;
  }
  #wallet-dialog .wallet-section {
    margin-top: 12px;
  }
  #wallet-dialog .demo-note {
    font-size: 10px;
    margin: 9px 0;
  }
  #wallet-dialog .amount-conversion {
    padding: 12px;
  }
  .conversion-chip {
    min-height: 85px;
  }
  .conversion-chip img {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 600px) {
  .site-header {
    gap: 8px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .icon-button {
    width: 38px;
    height: 44px;
  }
  .wallet-trigger {
    padding: 7px 9px;
    min-height: 44px;
  }
  .wallet-trigger strong {
    font-size: 14px;
  }
  .wallet-trigger small {
    font-size: 7px;
  }
  .guest-actions {
    gap: 5px;
  }
  .guest-actions button {
    font-size: 11px;
    padding: 10px 12px;
    min-height: 44px;
  }
  .account-dialog {
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }
  .account-heading {
    padding: 18px 17px 14px;
  }
  .account-dialog h2 {
    font-size: 23px;
  }
  .profile-identity {
    padding: 0 17px 16px;
  }
  .account-tabs {
    padding: 0 10px;
  }
  .account-tabs button {
    font-size: 11px;
    min-height: 46px;
  }
  .account-content {
    padding: 17px;
  }
  .account-form input,
  .history-filter select {
    font-size: 16px;
    min-height: 44px;
  }
  .account-primary,
  .account-secondary {
    min-height: 44px;
  }
  .account-close {
    width: 44px;
    height: 44px;
  }
  .profile-total strong {
    font-size: 31px;
  }
  .profile-balances strong {
    font-size: 19px;
  }
  .account-form {
    gap: 12px 8px;
  }
  .account-form label {
    font-size: 11px;
  }
  .auth-dialog {
    --auth-padding: 19px 17px;
  }
  .auth-dialog .account-heading {
    padding: 0 0 12px;
  }
  .auth-dialog h2 {
    font-size: 25px;
  }
  .auth-dialog .account-form {
    gap: 13px;
  }
  .history-amount {
    font-size: 11px;
  }
  .profile-money-actions .account-primary,
  .profile-money-actions .account-secondary {
    font-size: 11px;
    padding: 10px;
  }
  .document-actions .account-secondary {
    font-size: 10px;
    min-height: 44px;
  }
  .otp-tools button {
    min-height: 44px;
  }
  .auth-demo-note p {
    font-size: 10px;
  }
  .conversion-chip {
    min-height: 91px;
  }
  .footer-nav.mobile-nav {
    background: #252f27fa;
  }
  .auth-mode-tabs button {
    min-height: 44px;
  }
}
@media (max-width: 360px) {
  .guest-actions button {
    font-size: 10px;
    padding: 10px;
  }
  .site-header .brand {
    font-size: 14px;
    gap: 5px;
  }
  .is-signed-in .site-header .brand > span:last-child {
    display: none;
  }
  .account-form:not(.single-column) {
    grid-template-columns: 1fr;
  }
  .profile-balances strong {
    font-size: 17px;
  }
  .history-row {
    gap: 7px;
  }
  .account-tabs button {
    padding: 10px;
  }
  .conversion-chip img {
    width: 43px;
    height: 43px;
  }
  .conversion-chip {
    min-height: 84px;
  }
  .otp-form input {
    letter-spacing: 2px;
  }
  .otp-form .account-secondary {
    font-size: 10px;
    padding: 8px;
  }
}
@keyframes account-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .account-dialog {
    animation: none;
  }
}

/* Light sweeps stay inside the compact wallet and never block interaction. */
#wallet-dialog {
  isolation: isolate;
  position: relative;
  background:
    radial-gradient(ellipse at 90% 0%, #40532688, transparent 55%),
    linear-gradient(155deg, #192212, #0d150c);
  box-shadow:
    0 24px 100px #000b,
    0 0 40px #a9d3530b,
    inset 0 1px #e9ffc625;
}
#wallet-dialog:before {
  content: '';
  position: absolute;
  left: 5%;
  top: 0;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4ff8b, transparent);
  box-shadow: 0 0 17px #c3fa4c80;
  pointer-events: none;
}
#wallet-dialog .money-heading {
  position: relative;
  overflow: hidden;
  padding-bottom: 4px;
}
#wallet-dialog .money-heading:after {
  content: '✦';
  position: absolute;
  right: 64px;
  top: 16px;
  color: #c3fa4c;
  font-size: 21px;
  opacity: 0.55;
  pointer-events: none;
  animation: wallet-star 3.5s ease-in-out infinite;
}
#wallet-dialog .balance-grid > div {
  position: relative;
  overflow: hidden;
  background: linear-gradient(130deg, #2e421d, #182610);
  box-shadow: inset 0 1px #deffac13;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
#wallet-dialog .balance-grid > div:nth-child(2) {
  background: linear-gradient(130deg, #263122, #101b10);
}
#wallet-dialog .balance-grid > div:after {
  content: '';
  position: absolute;
  inset: -100% -70%;
  background: linear-gradient(115deg, transparent 45%, #d6ff9510 50%, transparent 55%);
  pointer-events: none;
  animation: wallet-glow 7s ease-in-out infinite;
}
#wallet-dialog .balance-grid > div:nth-child(2):after {
  animation-delay: 1.1s;
}
#wallet-dialog .amount-conversion {
  background: linear-gradient(130deg, #26391960, #0c160a);
  border-color: #7c994744;
  box-shadow: inset 0 1px #e2ffc011;
}
#wallet-dialog #convert-chips {
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 24px #b9f14c20;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
#wallet-dialog #convert-chips:not(:disabled):hover {
  box-shadow: 0 5px 28px #b9f14c4a;
  transform: translateY(-1px);
}
#wallet-dialog #convert-chips:after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-110%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, #ffffff69, transparent);
  pointer-events: none;
  animation: wallet-button-glint 5s ease-in-out infinite;
}
#wallet-dialog #convert-chips:disabled:after {
  animation: none;
}
.wallet-trigger {
  box-shadow:
    inset 0 1px #e4ffa020,
    0 0 18px #c3fa4c08;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.wallet-trigger:hover {
  border-color: #c3fa4c99;
  box-shadow: 0 0 24px #c3fa4c1f;
}
@keyframes wallet-glow {
  0%,
  30% {
    transform: translateX(-30%);
  }
  75%,
  100% {
    transform: translateX(30%);
  }
}
@keyframes wallet-star {
  0%,
  100% {
    transform: scale(0.8) rotate(-12deg);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.1) rotate(12deg);
    opacity: 0.85;
  }
}
@keyframes wallet-button-glint {
  0%,
  65% {
    transform: translateX(-110%) skewX(-18deg);
  }
  90%,
  100% {
    transform: translateX(110%) skewX(-18deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  #wallet-dialog *,
  #wallet-dialog *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Dimensional account artwork is decorative and uses the existing SVG chip set. */
.auth-dialog[open] {
  display: block;
}
.auth-dialog {
  background:
    radial-gradient(ellipse at 92% 4%, #64783255, transparent 48%),
    radial-gradient(ellipse at 5% 90%, #22395855, transparent 55%), #10190e;
  box-shadow:
    0 35px 120px #000d,
    0 0 45px #bff55712,
    inset 0 1px #e6ffc938;
  isolation: isolate;
}
.auth-stage {
  height: 64px;
  position: relative;
  margin: 0 0 10px;
  perspective: 550px;
  pointer-events: none;
  isolation: isolate;
}
.stage-coin {
  position: absolute;
  top: 0;
  left: 50%;
  filter: drop-shadow(0 12px 8px #0009);
  transform-style: preserve-3d;
  z-index: 3;
}
.stage-coin img {
  display: block;
  filter: drop-shadow(0 2px 0 #9ca780) drop-shadow(0 3px 0 #14250a);
}
.coin-center {
  margin-left: -36px;
  transform: translateY(-7px) rotateX(35deg) rotateZ(-17deg);
  animation: coin-center-float 4.6s ease-in-out infinite;
}
.coin-left {
  margin-left: -105px;
  top: 11px;
  transform: rotateX(42deg) rotateY(-22deg) rotateZ(-25deg);
  animation: coin-side-float 5s ease-in-out infinite;
}
.coin-right {
  margin-left: 51px;
  top: 7px;
  transform: rotateX(40deg) rotateY(24deg) rotateZ(25deg);
  animation: coin-side-float 5.2s ease-in-out -2s infinite;
}
.stage-floor {
  position: absolute;
  width: 210px;
  height: 20px;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, #bff85638, transparent 70%);
  filter: blur(6px);
}
.stage-orbit {
  position: absolute;
  left: 50%;
  top: 17px;
  width: 265px;
  height: 43px;
  margin-left: -132px;
  border: 1px solid #b4e36c33;
  border-top-color: #dfffab77;
  border-radius: 50%;
  transform: rotate(-8deg);
  animation: orbit-breathe 5s ease-in-out infinite;
}
.orbit-offset {
  width: 210px;
  margin-left: -105px;
  transform: rotate(9deg);
  opacity: 0.45;
  animation-delay: -2s;
}
.stage-spark {
  position: absolute;
  color: #ccff85;
  left: 10%;
  top: 10px;
  font-size: 13px;
  animation: wallet-star 3.5s ease-in-out infinite;
}
.spark-two {
  left: auto;
  right: 11%;
  top: 35px;
  animation-delay: -1.5s;
  font-size: 18px;
}
.auth-dialog .account-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #b9f33d, #d3ff70, #b7ec49);
  box-shadow:
    0 5px 0 #41611a,
    0 10px 25px #a1d14322;
  transform: translateY(-2px);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.auth-dialog .account-primary:not(:disabled):hover {
  transform: translateY(-4px);
  box-shadow:
    0 7px 0 #41611a,
    0 12px 30px #a1d14338;
}
.auth-dialog .account-primary:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #41611a,
    0 4px 14px #a1d14322;
}
.auth-dialog .account-primary:after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-110%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, #fff7, transparent);
  animation: wallet-button-glint 6s ease-in-out infinite;
  pointer-events: none;
}
.auth-dialog .account-primary:disabled:after {
  animation: none;
}
.auth-dialog .account-form input {
  box-shadow:
    inset 0 2px 7px #0005,
    0 1px #d2e7b009;
  transition:
    box-shadow 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.auth-dialog .account-form input:focus {
  border-color: #c3fa4c;
  background: #15220c;
  box-shadow:
    0 0 0 3px #c3fa4c10,
    0 0 20px #b9ef4412,
    inset 0 2px 5px #0003;
}
.auth-mode-tabs {
  box-shadow: inset 0 3px 8px #0004;
}
.auth-mode-tabs button[aria-selected='true'] {
  box-shadow:
    0 3px 6px #0006,
    inset 0 1px #dbffb526;
  background: linear-gradient(135deg, #415a28, #293e1e);
}
.profile-identity > span:first-child {
  box-shadow:
    0 3px 0 #607d24,
    0 7px 0 #283f0d,
    0 12px 20px #0005;
  transform: perspective(300px) rotateY(-9deg) rotateZ(-4deg);
}
.profile-total {
  box-shadow:
    inset 0 1px #e3ffb424,
    0 5px 0 #0b1209,
    0 10px 20px #0003;
  position: relative;
  overflow: hidden;
}
.profile-money-actions {
  margin-top: 20px;
  gap: 12px;
}
.profile-money-note {
  margin-top: 14px;
  line-height: 1.8;
}
#profile-reserved:not([hidden]) {
  margin-top: 18px;
  margin-bottom: 0;
}
.is-playtest .profile-identity small {
  color: #b6c99f;
}
@media (max-width: 380px) {
  .profile-money-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
.profile-total:after {
  content: '';
  position: absolute;
  inset: -100% -70%;
  background: linear-gradient(115deg, transparent 45%, #d6ff9512 50%, transparent 55%);
  animation: wallet-glow 7s ease-in-out infinite;
  pointer-events: none;
}
.profile-stats > div {
  box-shadow:
    inset 0 1px #dcf8ba10,
    0 3px 0 #081005;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.profile-stats > div:hover {
  transform: translateY(-3px);
  border-color: #9fca5466;
}
.site-header:after {
  content: '';
  position: absolute;
  height: 1px;
  left: 20%;
  right: 20%;
  bottom: -1px;
  background: linear-gradient(90deg, transparent, #c3fa4c66, transparent);
  pointer-events: none;
}
.site-header .brand-mark {
  transition:
    transform 0.3s,
    filter 0.3s;
}
.site-header .brand:hover .brand-mark {
  transform: perspective(300px) rotateY(-15deg) rotateZ(-6deg);
  filter: drop-shadow(0 5px 8px #c3fa4c44);
}
.footer-nav button {
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.footer-nav button.active {
  box-shadow:
    inset 0 1px #dbffab17,
    0 3px 6px #0002;
}
.footer-nav button:hover svg {
  filter: drop-shadow(0 0 6px #c3fa4c55);
}
@keyframes coin-center-float {
  0%,
  100% {
    transform: translateY(-7px) rotateX(35deg) rotateZ(-17deg);
  }
  50% {
    transform: translateY(-13px) rotateX(23deg) rotateZ(-4deg);
  }
}
@keyframes coin-side-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
    rotate: 0 0 1 7deg;
  }
}
@keyframes orbit-breathe {
  0%,
  100% {
    opacity: 0.35;
    scale: 0.95;
  }
  50% {
    opacity: 0.8;
    scale: 1.04;
  }
}
@media (max-width: 600px) {
  .auth-stage {
    height: 51px;
    margin-bottom: 12px;
    scale: 0.88;
  }
  .auth-dialog .auth-intro {
    font-size: 11px;
    margin-bottom: 14px;
  }
  .auth-dialog .auth-mode-tabs {
    margin-bottom: 16px;
  }
  .auth-dialog .account-form {
    gap: 11px;
  }
  .auth-dialog .account-form input {
    min-height: 44px;
  }
  .auth-dialog .account-heading {
    padding-bottom: 14px;
  }
  .auth-dialog .account-primary {
    min-height: 44px;
  }
  .stage-coin {
    animation-duration: 6s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-stage *,
  .profile-total:after,
  .auth-dialog .account-primary:after {
    animation: none !important;
  }
  .auth-dialog .account-primary,
  .auth-dialog input,
  .profile-stats > div,
  .footer-nav button,
  .site-header .brand-mark {
    transition: none !important;
  }
}
body.motion-off .auth-stage *,
body.motion-off .profile-total:after,
body.motion-off .auth-dialog .account-primary:after {
  animation: none !important;
}
body.page-hidden .auth-stage *,
body.page-hidden #wallet-dialog *:after,
body.page-hidden .profile-total:after {
  animation-play-state: paused;
}

/* The moving row must retain its natural width inside the desktop flex container.
   A trailing gap makes its two repeated halves equal for a seamless -50% loop. */
.ticker-track {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-inline-end: 41px;
}
.ticker-track > span,
.ticker-track > b {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .ticker-track {
    padding-inline-end: 34px;
  }
}
@media (min-width: 901px) {
  .ticker {
    height: 92px;
    min-height: 92px;
    display: flex;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 40px;
    background: linear-gradient(90deg, #a5ce4b04, #a5ce4b0a, #a5ce4b04);
    border-color: #799e3a33;
  }
  .ticker-track {
    padding: 22px 52px 22px 0;
    gap: 52px;
  }
  .ticker span {
    font-size: 15px;
    letter-spacing: 3.3px;
    line-height: 1.25;
  }
  .ticker-track b {
    font-size: 28px;
    line-height: 1;
    text-shadow: 0 0 15px #c3fa4c40;
  }
}
#profile-sound-setting #sound-toggle {
  width: 46px;
  height: 44px;
  flex-shrink: 0;
}
.balance-grid.single-chip-balance {
  grid-template-columns: 1fr;
}
#wallet-dialog .wallet-section[hidden] {
  display: none;
}
#wallet-dialog .single-chip-balance > div {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#wallet-dialog .single-chip-balance strong {
  font-size: 25px;
  white-space: nowrap;
}
#wallet-dialog .wallet-section-title #withdraw-all {
  font-size: 10px;
  margin: 0;
  padding: 6px 0;
  min-height: 36px;
}
#wallet-back-profile {
  display: block;
  margin: 4px auto 0;
  min-height: 44px;
}
.topup-form input {
  min-width: 0;
}
@media (max-width: 360px) {
  .site-header .header-actions .icon-button {
    width: 44px;
    min-width: 44px;
  }
}

/* Keep one navigation landmark. On mobile, blur belongs to a background layer
   so it cannot make the fixed bottom menu relative to the header. */
.site-header {
  background: transparent;
  backdrop-filter: none;
  isolation: isolate;
}
.site-header:before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #202923f7;
  backdrop-filter: blur(20px);
  pointer-events: none;
}
@media (min-width: 901px) {
  :root {
    --header: 82px;
  }
  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 720px) auto;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
  }
  .site-header .brand,
  .site-header .header-actions {
    min-width: 0;
  }
  .site-header .header-actions {
    gap: 8px;
    white-space: nowrap;
  }
  .site-header .footer-nav {
    position: static;
    inset: auto;
    transform: none;
    width: 100%;
    height: 62px;
    min-width: 0;
    margin: 0;
    padding: 0;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }
  .site-header .footer-nav button {
    min-height: 52px;
    padding: 7px 5px;
    gap: 7px;
    font-size: 11px;
    white-space: nowrap;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #a9b7a4;
    transition: color 0.2s;
  }
  .site-header .footer-nav button:hover,
  .site-header .footer-nav button.active {
    background: transparent;
    box-shadow: none;
    color: var(--lime);
  }
  .site-header .footer-nav button:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: -3px;
    border-radius: 6px;
  }
  .site-header .footer-nav button svg {
    width: 22px;
    height: 22px;
  }
  .site-header .footer-nav button:before {
    content: '';
    position: absolute;
    top: auto;
    bottom: 0;
    left: calc(50% - 16px);
    width: 32px;
    height: 2px;
    border-radius: 2px;
    background: var(--lime);
    opacity: 0;
    transform: scaleX(0.4);
    transition:
      opacity 0.2s,
      transform 0.2s;
  }
  .site-header .footer-nav button.active:before {
    opacity: 1;
    transform: scaleX(1);
    box-shadow: 0 0 12px #c3fa4c55;
  }
  .site-header .footer-nav button.active svg {
    transform: none;
    filter: drop-shadow(0 0 6px #c3fa4c30);
  }
  main,
  #main {
    padding-bottom: 32px;
  }
}
@media (min-width: 901px) and (max-width: 1199px) {
  :root {
    --header: 140px;
  }
  html {
    scroll-padding-top: 160px;
  }
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: 54px 62px;
    padding: 8px 20px;
    gap: 7px 20px;
  }
  .site-header .footer-nav {
    grid-column: 1/-1;
    grid-row: 2;
    max-width: 720px;
    justify-self: center;
  }
  .site-header .header-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Provider choices belong to the selected sign-in / registration panel. */
.auth-provider-options {
  margin-bottom: 17px;
}
.auth-provider-title {
  margin: 0 0 10px;
  text-align: center;
  color: #cfddbf;
  font-size: 11px;
  letter-spacing: 0.3px;
}
.social-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  perspective: 700px;
}
.social-signin {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #e3e9dc;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #e9eee4);
  color: #172016;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 4px 0 #616e5555,
    0 8px 18px #0003;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.social-signin:not(:disabled):hover {
  transform: translateY(-3px) rotateX(5deg);
  box-shadow:
    0 7px 0 #616e5555,
    0 12px 28px #b7f84720;
  border-color: #cfff87;
}
.social-signin:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #616e5555;
}
.social-signin:after {
  content: '';
  position: absolute;
  inset: -50% -70%;
  background: linear-gradient(110deg, transparent 43%, #fff5 50%, transparent 57%);
  transform: translateX(-70%);
  pointer-events: none;
}
.social-signin:not(:disabled):hover:after {
  animation: auth-provider-glint 0.7s ease-out both;
}
.social-label {
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1.3;
}
.social-label > span {
  font-size: 10px;
  font-weight: 550;
}
.social-label strong {
  font-size: 16px;
  letter-spacing: 0.1px;
}
.auth-method-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 21px;
  color: #b1c29e;
  font-size: 10px;
  text-align: center;
  line-height: 1.5;
}
.auth-method-divider:before,
.auth-method-divider:after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8db25b70);
}
.auth-method-divider:after {
  transform: rotate(180deg);
}
.social-signin:focus-visible {
  outline: 2px solid #c1ff47;
  outline-offset: 3px;
}
.social-signin:disabled {
  opacity: 0.55;
  transform: none;
  cursor: default;
}
.social-signin svg {
  width: 24px;
  height: 26px;
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}
.social-signin .google-mark {
  width: 26px;
  height: 26px;
}
.apple-signin {
  background: linear-gradient(135deg, #303830, #111712);
  color: #fff;
  border-color: #728169;
  box-shadow:
    0 4px 0 #050b05,
    0 8px 18px #0004,
    inset 0 1px #ffffff1a;
}
.apple-signin:not(:disabled):hover {
  box-shadow:
    0 7px 0 #050b05,
    0 12px 28px #b7f84720;
}
.identity-notice {
  padding: 15px 16px;
  background: linear-gradient(130deg, #25331d, #121d14);
  border: 1px solid #425532;
  border-radius: 14px;
  margin: 16px 0;
  line-height: 1.55;
}
.identity-notice strong {
  color: #d2f5a2;
  font-size: 14px;
}
.identity-notice p {
  color: #b8c5ab;
  font-size: 13px;
  margin: 8px 0;
}
.identity-notice .account-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.identity-notice input {
  min-width: 0;
}
.account-form .link-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.link-confirm input {
  width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #b9f84c;
}
#verification-refresh {
  margin-top: 10px;
  width: 100%;
}
/* Decorative layers stay behind every control, including the verification cards. */
html:has(.auth-dialog[open]),
body:has(.auth-dialog[open]) {
  overflow: hidden;
}
.auth-dialog {
  background:
    radial-gradient(ellipse at 100% 0%, #18383e66, transparent 45%),
    linear-gradient(155deg, #080f1c, #0b141e 55%, #100e20);
  border-color: #83d8c25c;
  box-shadow:
    0 35px 120px #000e,
    0 0 80px #2adbb31c,
    inset 0 1px #d8fff740;
  scrollbar-width: thin;
  scrollbar-color: #587d78 #0b1420;
}
.auth-dialog::backdrop {
  background-color: #030711dd;
  background-image:
    radial-gradient(ellipse at 15% 30%, #24d2b632, transparent 44%),
    radial-gradient(ellipse at 85% 75%, #8b5deb30, transparent 42%),
    linear-gradient(125deg, transparent 35%, #d0b65a0f 48%, transparent 61%);
  background-size:
    135% 145%,
    140% 130%,
    170% 170%;
  backdrop-filter: blur(8px);
  animation: auth-sky-drift 18s ease-in-out infinite alternate;
}
.auth-shell {
  position: relative;
  isolation: isolate;
  padding: var(--auth-padding);
  border-radius: inherit;
}
.auth-shell > :not(.auth-fx) {
  position: relative;
  z-index: 1;
}
.auth-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  contain: paint;
  background:
    radial-gradient(ellipse at 85% 15%, #39edc137, transparent 38%),
    radial-gradient(ellipse at 12% 90%, #9970f932, transparent 44%);
}
.auth-nebula {
  position: absolute;
  width: 340px;
  height: 380px;
  border-radius: 50%;
  filter: blur(28px);
  animation: auth-nebula-drift 13s ease-in-out infinite alternate;
}
.nebula-emerald {
  top: -190px;
  right: -180px;
  background: radial-gradient(ellipse, #29d9aa80, #13a98d26 50%, transparent 72%);
}
.nebula-violet {
  left: -230px;
  bottom: -70px;
  background: radial-gradient(ellipse, #8b67fa66, #3835b92b 50%, transparent 72%);
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}
.auth-aurora {
  position: absolute;
  border-radius: 50%;
  width: 520px;
  height: calc(100% + 100px);
  min-height: 720px;
  top: -170px;
  left: -380px;
  border: 1px solid #a1ffecb3;
  box-shadow:
    18px 0 22px #33edc28c,
    42px 0 46px #26ceb652,
    inset -9px 0 18px #69ffd67a;
  transform: rotate(34deg);
  animation: auth-aurora-flow 12s ease-in-out infinite alternate;
}
.aurora-two {
  width: 540px;
  height: calc(100% + 160px);
  top: 60px;
  left: auto;
  right: -450px;
  border-color: #d8c5ffb3;
  box-shadow:
    -16px 0 25px #ad7fff8c,
    -42px 0 50px #8157d74a,
    inset 9px 0 20px #b19aff6b;
  transform: rotate(30deg);
  animation-delay: -6s;
  animation-duration: 16s;
}
.auth-celestial {
  position: absolute;
  left: 50%;
  top: 182px;
  width: 430px;
  height: 430px;
  transform: translate(-50%, -50%);
  opacity: 0.7;
}
.celestial-ring {
  position: absolute;
  inset: 0;
  border: 1px solid #d9c57b28;
  border-radius: 50%;
  background: conic-gradient(
    from 40deg,
    transparent 0% 34%,
    #e9ce7455 41%,
    transparent 47% 83%,
    #74f6df55 90%,
    transparent 96%
  );
  mask: radial-gradient(transparent calc(50% - 2px), #000 calc(50% - 1px));
  animation: auth-orbit-turn 30s linear infinite;
}
.celestial-ring:after {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffedb2;
  box-shadow: 0 0 14px 4px #f2ce7b88;
}
.ring-inner {
  inset: 30px;
  border: 1px dashed #a9efd72b;
  animation-direction: reverse;
  animation-duration: 42s;
}
.celestial-core {
  position: absolute;
  inset: 75px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #36e6c313, transparent 66%);
}
.auth-star {
  position: absolute;
  left: var(--spark-x);
  top: var(--spark-y);
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #dcfff5;
  box-shadow: 0 0 7px 1px #72f0dc70;
  opacity: 0.5;
  animation: auth-star-drift var(--spark-duration) ease-in-out var(--spark-delay) infinite alternate;
}
.auth-star.star-bright {
  width: 3px;
  height: 3px;
  background: #ffe3a1;
  box-shadow: 0 0 10px 2px #e8c57b60;
}
.star-bright:after {
  content: '';
  position: absolute;
  width: 11px;
  height: 11px;
  left: -4px;
  top: -4px;
  background: #ffe7b6a6;
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
}
.auth-meteor {
  position: absolute;
  top: 8%;
  left: 35%;
  width: 120px;
  height: 1px;
  transform: rotate(130deg);
  transform-origin: left center;
  background: linear-gradient(90deg, #fff0c4, transparent);
  box-shadow: 0 0 8px #d2fadd66;
  opacity: 0;
  animation: auth-meteor-fall 11s ease-in-out infinite;
}
.meteor-two {
  top: 48%;
  left: 100%;
  width: 90px;
  animation-delay: -6s;
  animation-duration: 15s;
}
.auth-dialog:after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #81ffe0, #ffe0a2, transparent);
  box-shadow: 0 0 18px #69e8c9;
  pointer-events: none;
  z-index: 2;
  animation: auth-edge-glow 6s ease-in-out infinite alternate;
}
.auth-dialog .account-heading h2 {
  color: #f1f8f5;
  text-shadow: 0 2px 18px #050b18;
}
.auth-dialog .auth-intro {
  margin-bottom: 14px;
  color: #bdcec9;
}
.auth-dialog .auth-mode-tabs {
  margin-bottom: 17px;
  background: #071019d9;
  border-color: #91c5bf33;
}
.auth-dialog .auth-mode-tabs button[aria-selected='true'] {
  background: linear-gradient(130deg, #315c49, #1b3b35);
  color: #e0ffdc;
}
.auth-dialog .account-form label {
  color: #d4e0dc;
}
.auth-dialog .account-form input,
.auth-dialog .otp-form input {
  background: #050d18e8;
  border-color: #80b7b450;
  color: #f0f8f6;
}
.auth-dialog .account-form input:focus,
.auth-dialog .otp-form input:focus {
  outline: none;
  border-color: #83e4c6;
  box-shadow:
    0 0 0 3px #4bd5af1c,
    0 0 20px #4bd5af15;
}
.auth-dialog .otp-card {
  background: linear-gradient(125deg, #12232be8, #0b1424eb);
  border-color: #84cabc3b;
  box-shadow:
    inset 0 1px #d4fff50b,
    0 8px 20px #0002;
}
.auth-dialog .account-note,
.auth-dialog .otp-card p {
  color: #b1c3c3;
}
.auth-dialog .otp-status:not(.complete),
.auth-dialog .verification-steps span {
  color: #adbdc7;
}
.auth-dialog .account-secondary {
  background: #152832e6;
  border-color: #91c6b850;
  color: #d7e9df;
}
.auth-dialog .stage-orbit {
  border-color: #d4c6884d;
  border-top-color: #f4d98e9c;
}
.auth-dialog [role='tabpanel']:not([hidden]) {
  animation: auth-panel-reveal 0.3s ease-out;
}
.account-dialog .apple-signin:disabled {
  background: linear-gradient(135deg, #202a35, #151d29);
  border-color: #8594a94d;
  box-shadow: inset 0 1px #ffffff0d;
  opacity: 1;
  cursor: not-allowed;
  color: #aeb7c5;
}
.apple-signin:disabled:after {
  display: none;
}
.apple-signin:disabled svg {
  opacity: 0.6;
}
.social-label .provider-coming-soon {
  font-size: 9px;
  line-height: 1.3;
  color: #d2d8e1;
  font-weight: 500;
  margin-top: 3px;
}
@keyframes auth-sky-drift {
  from {
    background-position:
      0% 0%,
      100% 100%,
      0% 50%;
  }
  to {
    background-position:
      65% 45%,
      40% 20%,
      100% 50%;
  }
}
@keyframes auth-nebula-drift {
  to {
    transform: translate(-35px, 70px) scale(1.15);
  }
}
@keyframes auth-aurora-flow {
  to {
    transform: translate(35px, 35px) rotate(43deg) scale(0.93);
    opacity: 0.88;
  }
}
@keyframes auth-orbit-turn {
  to {
    transform: rotate(360deg);
  }
}
@keyframes auth-star-drift {
  from {
    opacity: 0.25;
    transform: translateY(8px);
  }
  to {
    opacity: 0.9;
    transform: translateY(-12px);
  }
}
@keyframes auth-meteor-fall {
  0%,
  76%,
  100% {
    opacity: 0;
    transform: translate(45px, -55px) rotate(130deg);
  }
  80% {
    opacity: 0.8;
  }
  90%,
  99% {
    opacity: 0;
    transform: translate(-190px, 225px) rotate(130deg);
  }
}
@keyframes auth-edge-glow {
  from {
    opacity: 0.5;
    transform: scaleX(0.75);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}
@keyframes auth-provider-glint {
  to {
    transform: translateX(70%);
  }
}
@keyframes auth-panel-reveal {
  from {
    opacity: 0.5;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 420px) {
  .social-actions {
    gap: 10px;
  }
  .social-signin {
    min-height: 70px;
    padding: 10px 8px;
    gap: 9px;
  }
  .social-label strong {
    font-size: 15px;
  }
  .social-signin svg,
  .social-signin .google-mark {
    width: 23px;
    height: 24px;
  }
  .auth-provider-options {
    margin-bottom: 15px;
  }
  .auth-provider-title {
    font-size: 10px;
  }
  .auth-method-divider {
    gap: 8px;
    font-size: 9px;
  }
  .auth-nebula {
    filter: blur(22px);
  }
  .auth-celestial {
    width: 390px;
    height: 390px;
  }
}
@media (min-width: 768px) {
  .auth-dialog {
    max-width: 370px;
    width: 370px;
    --auth-padding: 19px 20px;
    border-radius: 18px;
  }
  .auth-dialog h2 {
    font-size: 23px;
  }
  .auth-dialog .account-close {
    width: 36px;
    height: 36px;
    font-size: 25px;
  }
  .auth-dialog .account-heading {
    padding-bottom: 7px;
  }
  .auth-dialog .auth-stage {
    height: 49px;
    margin-bottom: 5px;
    scale: 0.82;
  }
  .auth-dialog .auth-intro {
    font-size: 11px;
    margin-bottom: 11px;
  }
  .auth-dialog .auth-mode-tabs {
    margin-bottom: 12px;
    padding: 3px;
  }
  .auth-dialog .auth-mode-tabs button {
    min-height: 33px;
    font-size: 11px;
  }
  .auth-dialog .auth-provider-title {
    margin-bottom: 8px;
    font-size: 10px;
  }
  .auth-dialog .social-signin {
    min-height: 59px;
    padding: 8px 10px;
    gap: 10px;
  }
  .auth-dialog .social-label strong {
    font-size: 15px;
  }
  .auth-dialog .auth-method-divider {
    margin-top: 15px;
  }
  .auth-dialog .auth-provider-options {
    margin-bottom: 13px;
  }
  .auth-dialog .account-form {
    gap: 10px;
  }
  .auth-dialog .account-form label {
    gap: 5px;
  }
  .auth-dialog #signup-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .auth-dialog #signup-form > .account-note,
  .auth-dialog #signup-form > .account-primary {
    grid-column: 1/-1;
  }
  .auth-dialog #signup-form > .account-note {
    margin-bottom: 0;
  }
  .auth-dialog .account-form input {
    min-height: 38px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 13px;
  }
  .auth-dialog .password-reveal {
    height: 38px;
  }
  .auth-dialog .account-primary {
    min-height: 39px;
    padding: 10px 12px;
    font-size: 11px;
  }
  .auth-dialog .account-note {
    font-size: 10px;
    margin-bottom: 11px;
  }
  .auth-dialog .verification-steps {
    margin-bottom: 12px;
  }
  .auth-dialog .otp-card {
    padding: 11px;
    margin-bottom: 10px;
  }
  .auth-dialog .otp-card p {
    margin: 6px 0 9px;
  }
  .auth-dialog .otp-form input {
    padding: 9px;
    font-size: 16px;
  }
  .auth-dialog .otp-form .account-secondary {
    min-height: 38px;
    padding: 8px;
  }
  .auth-dialog .otp-tools button {
    min-height: 31px;
    padding: 7px;
  }
  .auth-dialog .auth-switch {
    margin-top: 8px;
  }
  .auth-dialog .account-feedback {
    margin-top: 10px;
  }
  .auth-dialog .auth-celestial {
    width: 380px;
    height: 380px;
    top: 160px;
  }
}
/* On phones, keep the chips and full decoration; scroll the form when needed. */
@media (max-width: 767px) {
  .auth-dialog {
    width: min(390px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    --auth-padding: 19px 17px;
    border-radius: 18px;
  }
  .auth-dialog h2 {
    font-size: 25px;
  }
  .auth-dialog .account-heading {
    padding-bottom: 13px;
  }
  .auth-dialog .account-close {
    width: 42px;
    height: 42px;
    font-size: 28px;
  }
  .auth-dialog .auth-stage {
    display: block;
    height: 66px;
    scale: 0.94;
    margin: 3px 0 13px;
  }
  .auth-dialog .auth-intro {
    display: block;
    font-size: 11px;
    margin-bottom: 16px;
  }
  .auth-dialog .auth-mode-tabs {
    margin-bottom: 16px;
    padding: 4px;
  }
  .auth-dialog .auth-mode-tabs button {
    min-height: 42px;
    font-size: 12px;
  }
  .auth-dialog .auth-provider-title {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .auth-dialog .social-signin {
    min-height: 66px;
    padding: 9px 10px;
    gap: 10px;
  }
  .auth-dialog .auth-provider-options {
    margin-bottom: 16px;
  }
  .auth-dialog .auth-method-divider {
    margin-top: 16px;
  }
  .auth-dialog .account-form {
    gap: 13px;
  }
  .auth-dialog .account-form label {
    gap: 6px;
    font-size: 11px;
  }
  .auth-dialog .account-form input {
    min-height: 44px;
    font-size: 16px;
  }
  .auth-dialog .password-reveal {
    height: 44px;
  }
  .auth-dialog .account-primary {
    min-height: 44px;
    padding: 12px;
    font-size: 12px;
  }
  .auth-dialog .account-note {
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 13px;
  }
  .auth-dialog .account-form .account-note {
    margin-bottom: 0;
  }
  .auth-dialog .verification-steps {
    margin-bottom: 14px;
    font-size: 10px;
    gap: 13px;
  }
  .auth-dialog .otp-card {
    padding: 13px;
    margin-bottom: 13px;
  }
  .auth-dialog .otp-card p {
    font-size: 12px;
    margin: 8px 0 12px;
  }
  .auth-dialog .otp-form input {
    padding: 10px;
    font-size: 17px;
  }
  .auth-dialog .otp-form .account-secondary {
    min-height: 44px;
    padding: 9px;
    font-size: 10px;
  }
  .auth-dialog .otp-tools button {
    min-height: 44px;
    padding: 9px;
  }
  .auth-dialog .auth-switch {
    margin-top: 10px;
    font-size: 11px;
  }
  .auth-dialog .account-feedback {
    margin-top: 12px;
    font-size: 11px;
  }
  .auth-dialog .auth-celestial {
    width: 390px;
    height: 390px;
    top: 180px;
    opacity: 0.9;
  }
  .auth-dialog .nebula-emerald {
    right: -135px;
    background: radial-gradient(ellipse, #36f3c7a6, #18bfb047 50%, transparent 72%);
  }
  .auth-dialog .nebula-violet {
    left: -165px;
    bottom: -50px;
    background: radial-gradient(ellipse, #aa83ff8c, #5443ce45 50%, transparent 72%);
  }
  .auth-dialog .auth-aurora {
    width: 135%;
    left: -101%;
    top: -100px;
    border-color: #a4ffead9;
    box-shadow:
      18px 0 24px #46f7cead,
      40px 0 45px #26ceb66b,
      inset -9px 0 18px #69ffd68c;
  }
  .auth-dialog .aurora-two {
    width: 145%;
    left: auto;
    right: -118%;
    top: 95px;
    border-color: #dec8ffcc;
    box-shadow:
      -18px 0 27px #b28affad,
      -43px 0 52px #986ce15c,
      inset 9px 0 20px #c0aaff80;
  }
}
@media (max-width: 360px) {
  .auth-dialog {
    --auth-padding: 17px 14px;
  }
  .auth-dialog h2 {
    font-size: 23px;
  }
  .auth-dialog .auth-stage {
    scale: 0.88;
  }
  .auth-dialog .social-signin {
    gap: 8px;
    padding-inline: 8px;
  }
  .auth-dialog .otp-form input {
    font-size: 16px;
    letter-spacing: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-dialog::backdrop,
  .auth-dialog:after,
  .auth-fx *,
  .auth-fx *:after,
  .social-signin:after,
  .auth-dialog [role='tabpanel'] {
    animation: none !important;
  }
  .social-signin {
    transition: none;
  }
  .social-signin:hover {
    transform: none;
  }
  .auth-star {
    opacity: 0.6;
  }
}
body.motion-off .auth-dialog::backdrop,
body.motion-off .auth-dialog:after,
body.motion-off .auth-fx *,
body.motion-off .auth-fx *:after,
body.motion-off .auth-dialog [role='tabpanel'],
body.motion-off .social-signin:after {
  animation: none !important;
}
body.page-hidden .auth-dialog::backdrop,
body.page-hidden .auth-dialog:after,
body.page-hidden .auth-dialog *,
body.page-hidden .auth-dialog *:after {
  animation-play-state: paused !important;
}
