[hidden] {
  display: none !important;
}

.app-shell[hidden] {
  display: none !important;
}

.auth-gate {
  --auth-bg: #061015;
  --auth-surface: #0b171d;
  --auth-surface-strong: #0f1d24;
  --auth-border: rgba(174, 222, 231, .13);
  --auth-ink: #f4fafc;
  --auth-muted: #8fa4ac;
  --auth-cyan: #23d7e4;
  --auth-cyan-bright: #55edf5;
  --auth-orange: #ff970f;
  min-height: 100svh;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(35, 215, 228, .10), transparent 24rem),
    radial-gradient(circle at 86% 92%, rgba(255, 151, 15, .07), transparent 26rem),
    var(--auth-bg);
  overflow: hidden;
  isolation: isolate;
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.auth-topbar,
.auth-footer {
  width: min(100% - 64px, 1320px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-topbar {
  min-height: 92px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.auth-logo {
  display: block;
  width: 176px;
  height: auto;
}

.auth-topbar-note,
.auth-footer {
  color: #60767e;
  font: 9px/1.2 "Press Start 2P", ui-monospace, monospace;
  letter-spacing: .05em;
}

.auth-stage {
  width: min(100% - 64px, 1320px);
  min-height: 0;
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: rgba(8, 20, 26, .76);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .38);
  overflow: hidden;
}

.auth-visual {
  position: relative;
  min-height: 610px;
  display: grid;
  align-content: end;
  padding: clamp(44px, 5vw, 72px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 67% 34%, rgba(35, 215, 228, .19), transparent 22%),
    linear-gradient(145deg, rgba(14, 34, 42, .95), rgba(5, 14, 18, .80));
}

.auth-visual::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -210px;
  bottom: -280px;
  z-index: -1;
  border: 68px solid rgba(35, 215, 228, .06);
  border-radius: 50%;
}

.auth-coin-scene {
  position: absolute;
  width: min(44vw, 520px);
  aspect-ratio: 1;
  right: clamp(-18px, 1.5vw, 32px);
  top: clamp(-12px, 0vw, 10px);
}

.auth-coin-scene::before {
  content: "";
  position: absolute;
  width: 270px;
  aspect-ratio: 1;
  left: 50%;
  top: 49%;
  translate: -50% -50%;
  border-radius: 50%;
  background: rgba(35, 215, 228, .18);
  filter: blur(54px);
}

.auth-hero-coin {
  position: absolute;
  width: clamp(170px, 18vw, 255px);
  left: 50%;
  top: 49%;
  translate: -50% -50%;
  filter: drop-shadow(0 30px 42px rgba(0, 0, 0, .55));
  animation: auth-float 5.4s ease-in-out infinite;
}

.auth-orbit {
  position: absolute;
  left: 50%;
  top: 49%;
  translate: -50% -50%;
  border: 1px solid rgba(35, 215, 228, .22);
  border-radius: 50%;
}

.auth-orbit-one {
  width: 92%;
  aspect-ratio: 1;
}

.auth-orbit-two {
  width: 70%;
  aspect-ratio: 1;
  border-style: dashed;
  animation: auth-spin 28s linear infinite;
}

.auth-pixel {
  position: absolute;
  width: 14px;
  aspect-ratio: 1;
  background: var(--auth-orange);
  box-shadow: 14px 0 var(--auth-orange), 0 14px var(--auth-orange);
}

.auth-pixel-one {
  left: 12%;
  top: 34%;
  rotate: 18deg;
}

.auth-pixel-two {
  right: 10%;
  bottom: 21%;
  scale: .65;
  rotate: -12deg;
  background: var(--auth-cyan);
  box-shadow: 14px 0 var(--auth-cyan), 0 14px var(--auth-cyan);
}

.auth-message {
  position: relative;
  max-width: 610px;
  z-index: 2;
}

.auth-message > span,
.auth-heading > span {
  display: block;
  margin-bottom: 14px;
  color: var(--auth-cyan);
  font: 9px/1.3 "Press Start 2P", ui-monospace, monospace;
  letter-spacing: .07em;
}

.auth-message strong {
  display: block;
  font: 850 clamp(40px, 4.15vw, 66px)/.98 Inter, system-ui, sans-serif;
  letter-spacing: -.055em;
}

.auth-message p {
  max-width: 470px;
  margin: 22px 0 0;
  color: #a5b8bf;
  font: 550 clamp(15px, 1.25vw, 18px)/1.55 Inter, system-ui, sans-serif;
}

.auth-feature-list {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 32px;
  color: #9bb0b7;
  font: 11px/1.25 "Press Start 2P", ui-monospace, monospace;
  letter-spacing: .035em;
}

.auth-feature-list i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: var(--auth-orange);
  rotate: 45deg;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(30px, 4vw, 64px);
  background: rgba(11, 23, 29, .96);
  border-left: 1px solid var(--auth-border);
}

.auth-card {
  width: min(100%, 430px);
}

.auth-loading {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 17px;
  color: var(--auth-muted);
  font: 750 14px/1 Inter, system-ui, sans-serif;
}

.auth-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #1c3038;
  border-top-color: var(--auth-cyan);
  border-radius: 50%;
  animation: auth-spin .8s linear infinite;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  margin-bottom: 35px;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 14px;
  background: #071218;
}

.auth-tabs button {
  min-height: 43px;
  border: 0;
  border-radius: 10px;
  color: #70868e;
  background: transparent;
  font: 800 13px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.auth-tabs button:hover {
  color: #d7e5e9;
}

.auth-tabs button.is-active {
  color: #041015;
  background: var(--auth-cyan);
  box-shadow: 0 8px 22px rgba(35, 215, 228, .17);
}

.auth-heading h1 {
  margin: 0;
  color: var(--auth-ink);
  font: 850 clamp(32px, 3vw, 42px)/1.05 Inter, system-ui, sans-serif;
  letter-spacing: -.045em;
}

.auth-heading p {
  margin: 12px 0 28px;
  color: var(--auth-muted);
  font: 540 14px/1.5 Inter, system-ui, sans-serif;
}

.auth-status {
  margin: 0 0 18px;
  padding: 14px 15px;
  border: 1px solid rgba(35, 215, 228, .28);
  border-radius: 12px;
  color: #b9f5f8;
  background: rgba(35, 215, 228, .08);
}

.auth-status strong {
  display: block;
  color: var(--auth-ink);
  font: 800 14px/1.3 Inter, system-ui, sans-serif;
}

.auth-status p {
  margin: 6px 0 0;
  color: #9bb1b9;
  font: 550 12px/1.5 Inter, system-ui, sans-serif;
}

.auth-status button {
  margin: 11px 0 0;
  padding: 0;
  border: 0;
  color: var(--auth-cyan-bright);
  background: transparent;
  font: 750 12px/1.4 Inter, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-status button:disabled { opacity: .55; cursor: wait; }

.auth-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.auth-form label {
  margin-top: 8px;
  color: #c7d6db;
  font: 750 12px/1.2 Inter, system-ui, sans-serif;
}

.auth-form input {
  width: 100%;
  min-height: 51px;
  box-sizing: border-box;
  border: 1px solid #263a43;
  border-radius: 12px;
  padding: 0 15px;
  color: var(--auth-ink);
  background: #0b181e;
  outline: none;
  font: 600 16px/1 Inter, system-ui, sans-serif;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-form input::placeholder {
  color: #536870;
}

.auth-form input:hover {
  border-color: #38515a;
}

.auth-form input:focus {
  border-color: var(--auth-cyan);
  background: #0d1c23;
  box-shadow: 0 0 0 4px rgba(35, 215, 228, .09);
}

.auth-invite-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
}

.auth-invite-field > span {
  display: grid;
  place-items: center;
  border: 1px solid #2a414b;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  color: var(--auth-cyan-bright);
  background: #0b1820;
  font: 850 15px/1 Inter, system-ui, sans-serif;
}

.auth-invite-field input {
  border-radius: 0 12px 12px 0;
}

.auth-invite-field input[readonly] {
  color: #b8cbd1;
  background: #132229;
  cursor: not-allowed;
}

.auth-invite-status {
  margin-top: -3px;
  color: #71868e;
  font: 600 11px/1.4 Inter, system-ui, sans-serif;
}

.auth-invite-status.is-valid { color: #55d6a1; }
.auth-invite-status.is-invalid { color: #ff8c82; }

.auth-password-field {
  position: relative;
}

.auth-password-field input {
  padding-right: 94px;
}

.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  translate: 0 -50%;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  color: #789099;
  background: transparent;
  font: 750 11px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}

.auth-password-toggle:hover {
  color: var(--auth-cyan-bright);
}

.auth-submit {
  min-height: 53px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 0 19px;
  border: 0;
  border-radius: 12px;
  color: #041015;
  background: var(--auth-cyan);
  cursor: pointer;
  font: 900 15px/1 Inter, system-ui, sans-serif;
  box-shadow: 0 14px 30px rgba(35, 215, 228, .13);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.auth-submit:hover {
  background: var(--auth-cyan-bright);
  box-shadow: 0 17px 34px rgba(35, 215, 228, .18);
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: .55;
  cursor: wait;
  transform: none;
}

.auth-submit b {
  font: 500 22px/1 Inter, system-ui, sans-serif;
}

.auth-terms {
  margin-top: 7px;
  color: #71868e;
  font: 550 11px/1.55 Inter, system-ui, sans-serif;
  text-align: center;
}

.auth-terms a {
  color: #9eeff4;
  text-decoration: underline;
  text-decoration-color: rgba(85, 237, 245, .42);
  text-underline-offset: 3px;
  transition: color .18s ease, text-decoration-color .18s ease;
}

.auth-terms a:hover,
.auth-terms a:focus-visible {
  color: var(--auth-cyan-bright);
  text-decoration-color: currentColor;
}

.auth-error {
  margin-top: 15px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 103, 103, .30);
  border-radius: 10px;
  color: #ffb0b0;
  background: rgba(255, 80, 80, .08);
  font: 700 12px/1.45 Inter, system-ui, sans-serif;
}

.auth-footer {
  min-height: 58px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

@keyframes auth-spin {
  to { rotate: 360deg; }
}

@keyframes auth-float {
  50% { translate: -50% calc(-50% - 10px); }
}

@media (max-height: 780px) and (min-width: 981px) {
  .auth-topbar { min-height: 72px; }
  .auth-stage { margin-block: 20px; }
  .auth-visual { min-height: 540px; }
  .auth-panel { padding-block: 28px; }
  .auth-message strong { font-size: clamp(38px, 3.6vw, 55px); }
  .auth-coin-scene { top: -26px; scale: .82; transform-origin: top right; }
  .auth-tabs { margin-bottom: 25px; }
  .auth-heading p { margin-bottom: 20px; }
  .auth-form input { min-height: 47px; }
  .auth-submit { min-height: 49px; margin-top: 12px; }
  .auth-footer { min-height: 46px; }
}

@media (max-width: 1100px) {
  .auth-stage {
    grid-template-columns: minmax(0, .9fr) minmax(410px, 1.1fr);
  }

  .auth-message strong {
    font-size: clamp(38px, 4.2vw, 52px);
  }

  .auth-coin-scene {
    right: -72px;
  }
}

@media (max-width: 980px) {
  .auth-gate {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-topbar,
  .auth-footer,
  .auth-stage {
    width: min(100% - 40px, 620px);
  }

  .auth-topbar {
    min-height: 78px;
  }

  .auth-topbar-note {
    display: none;
  }

  .auth-logo {
    width: 156px;
  }

  .auth-stage {
    display: block;
    margin: 24px auto;
    border-radius: 22px;
  }

  .auth-visual {
    min-height: auto;
    display: block;
    padding: 27px 32px 0;
    background: linear-gradient(150deg, rgba(14, 34, 42, .90), rgba(11, 23, 29, .96));
  }

  .auth-coin-scene,
  .auth-feature-list,
  .auth-visual::after {
    display: none;
  }

  .auth-message > span {
    margin-bottom: 9px;
  }

  .auth-message strong {
    font-size: 29px;
    line-height: 1.03;
  }

  .auth-message p {
    margin-top: 10px;
    font-size: 13px;
  }

  .auth-panel {
    padding: 28px 32px 34px;
    border-left: 0;
  }

  .auth-card {
    width: 100%;
  }

  .auth-loading {
    min-height: 330px;
  }
}

@media (max-width: 540px) {
  .auth-gate {
    display: block;
    min-height: 100svh;
  }

  .auth-topbar,
  .auth-stage,
  .auth-footer {
    width: calc(100% - 28px);
  }

  .auth-topbar {
    min-height: 72px;
  }

  .auth-logo {
    width: 145px;
  }

  .auth-stage {
    margin: 14px auto 18px;
    border-radius: 18px;
    box-shadow: 0 24px 58px rgba(0, 0, 0, .34);
  }

  .auth-visual {
    padding: 23px 22px 0;
  }

  .auth-message strong {
    font-size: 25px;
  }

  .auth-message p {
    display: none;
  }

  .auth-panel {
    padding: 24px 22px 28px;
  }

  .auth-tabs {
    margin-bottom: 27px;
  }

  .auth-heading h1 {
    font-size: 29px;
  }

  .auth-heading p {
    margin-bottom: 22px;
  }

  .auth-form input {
    min-height: 50px;
    font-size: 16px;
  }

  .auth-submit {
    min-height: 52px;
  }

  .auth-footer {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-hero-coin,
  .auth-orbit-two,
  .auth-spinner {
    animation: none;
  }
}

.agreement-page {
  min-height: 100svh;
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(35, 215, 228, .11), transparent 24rem),
    var(--auth-bg);
}

.agreement-shell {
  width: min(100% - 40px, 900px);
  margin-inline: auto;
  padding: 32px 0 64px;
}

.agreement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.agreement-back {
  color: #a9bec5;
  font: 750 13px/1 Inter, system-ui, sans-serif;
  text-decoration: none;
}

.agreement-back:hover,
.agreement-back:focus-visible {
  color: var(--auth-cyan-bright);
}

.agreement-card {
  margin-top: 32px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  background: rgba(11, 23, 29, .94);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .3);
}

.agreement-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--auth-cyan);
  font: 9px/1.35 "Press Start 2P", ui-monospace, monospace;
}

.agreement-card h1 {
  margin: 0;
  font: 850 clamp(32px, 6vw, 52px)/1.05 Inter, system-ui, sans-serif;
  letter-spacing: -.045em;
}

.agreement-status {
  margin: 18px 0 32px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 151, 15, .3);
  border-radius: 12px;
  color: #ffd39a;
  background: rgba(255, 151, 15, .08);
  font: 650 13px/1.55 Inter, system-ui, sans-serif;
}

.agreement-card h2 {
  margin: 30px 0 10px;
  color: #eaf4f6;
  font: 800 20px/1.25 Inter, system-ui, sans-serif;
}

.agreement-card p,
.agreement-card li {
  color: #9eb1b8;
  font: 540 15px/1.7 Inter, system-ui, sans-serif;
}

.agreement-card ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.agreement-card a {
  color: var(--auth-cyan-bright);
}

@media (max-width: 540px) {
  .agreement-shell {
    width: calc(100% - 28px);
    padding-top: 22px;
  }

  .agreement-header {
    padding-bottom: 20px;
  }

  .agreement-header .auth-logo {
    width: 136px;
  }

  .agreement-card {
    margin-top: 20px;
    border-radius: 18px;
  }
}
