@import url("https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:wght@500;600;700;800;900&display=swap");

:root {
  --access-blue: #0076fe;
  --access-ink: #05090f;
  --access-white: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--access-blue);
}

body {
  min-width: 320px;
  color: var(--access-white);
  font-family: "Nunito", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
a {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.access-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    max(20px, env(safe-area-inset-top))
    clamp(20px, 4vw, 58px)
    max(20px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--access-blue);
  isolation: isolate;
}

.access-screen::before,
.access-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.access-screen::before {
  top: -38vw;
  right: -22vw;
  width: min(76vw, 920px);
  aspect-ratio: 1;
  box-shadow: 0 0 0 9vw rgba(255, 255, 255, 0.025);
}

.access-screen::after {
  bottom: -330px;
  left: -270px;
  width: 560px;
  height: 560px;
  box-shadow: 0 0 0 90px rgba(255, 255, 255, 0.02);
}

.access-topbar,
.access-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.access-topbar a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.access-topbar a span {
  font-size: 1.25rem;
  line-height: 1;
}

.access-topbar p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.access-topbar p i {
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  animation: accessPulse 1.6s ease-in-out infinite;
}

.access-main {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  padding: clamp(46px, 7vh, 82px) 0;
  text-align: center;
}

.access-view {
  width: 100%;
  animation: accessViewIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.access-view[hidden] {
  display: none !important;
}

.access-avatar {
  position: relative;
  width: clamp(104px, 14vw, 138px);
  height: clamp(104px, 14vw, 138px);
  display: grid;
  place-items: center;
  margin: 0 auto clamp(24px, 4vh, 38px);
  border: 4px solid var(--access-ink);
  border-radius: 30%;
  background: #fff;
  box-shadow: 9px 10px 0 var(--access-ink);
  transform: rotate(-3deg);
}

.access-avatar img {
  width: 92%;
  height: 92%;
  display: block;
  object-fit: contain;
}

.access-avatar span {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 3px solid var(--access-ink);
  border-radius: 50%;
  color: var(--access-ink);
  background: #ffc928;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 4px 5px 0 var(--access-ink);
}

.access-avatar--approved {
  background: #ffc928;
}

.access-eyebrow {
  margin: 0 0 12px;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.access-view h1 {
  margin: 0;
  font-family: "Lilita One", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.76;
}

.access-intro {
  max-width: 430px;
  margin: clamp(22px, 3vh, 30px) auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.96rem, 1.4vw, 1.08rem);
  font-weight: 700;
  line-height: 1.5;
}

.access-code-form,
.access-wallet-form {
  width: min(100%, 510px);
  margin: clamp(30px, 4vh, 44px) auto 0;
}

.access-dots {
  display: flex;
  justify-content: center;
  gap: clamp(9px, 2vw, 16px);
  margin: 0 auto 20px;
  padding: 8px;
  border: 0;
  background: transparent;
}

.access-dots i {
  width: clamp(15px, 3.5vw, 21px);
  height: clamp(15px, 3.5vw, 21px);
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  transition: background-color 160ms ease, transform 160ms ease;
}

.access-dots i.is-filled {
  background: #fff;
  transform: scale(0.78);
}

.access-code-form input,
.access-wallet-form input {
  width: 100%;
  height: 60px;
  padding: 0 20px;
  border: 3px solid var(--access-ink);
  border-radius: 18px;
  color: var(--access-ink);
  background: #fff;
  box-shadow: 6px 7px 0 var(--access-ink);
  font-size: 1rem;
  font-weight: 900;
  outline: none;
}

.access-code-form input {
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.access-code-form input:focus,
.access-wallet-form input:focus {
  box-shadow: 6px 7px 0 var(--access-ink), 0 0 0 5px rgba(255, 255, 255, 0.28);
}

.access-primary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  padding: 12px 18px 10px;
  border: 3px solid var(--access-ink);
  border-radius: 18px;
  color: #fff;
  background: var(--access-ink);
  box-shadow: 6px 7px 0 rgba(255, 255, 255, 0.92);
  font-family: "Lilita One", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.025em;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.access-feedback {
  min-height: 19px;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.access-feedback.is-error {
  color: #fff2a4;
}

.access-feedback.is-success {
  color: #fff;
}

.access-code-form.is-rejected {
  animation: accessReject 380ms ease;
}

.access-wallet-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: left;
}

.access-wallet-form input {
  font-size: 0.9rem;
}

.access-list-view {
  position: relative;
}

.access-reset {
  position: absolute;
  top: -26px;
  left: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.access-preview-note {
  max-width: 510px;
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.5;
}

.access-footer {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.55rem;
}

@media (hover: hover) and (pointer: fine) {
  .access-topbar a:hover,
  .access-reset:hover {
    opacity: 0.7;
  }

  .access-primary-button:hover {
    color: var(--access-ink);
    background: #ffc928;
    transform: translateY(-3px);
  }
}

@keyframes accessPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes accessViewIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes accessReject {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}

@media (max-width: 600px) {
  .access-screen {
    padding-right: 18px;
    padding-left: 18px;
  }

  .access-topbar p {
    font-size: 0.52rem;
  }

  .access-main {
    padding: 42px 0;
  }

  .access-view h1 {
    font-size: clamp(3.7rem, 18vw, 5.2rem);
  }

  .access-footer span:last-child {
    display: none;
  }

  .access-reset {
    top: -18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-topbar p i,
  .access-view,
  .access-code-form.is-rejected {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

/* Phone-first finish: safe areas, zero horizontal drift and stable access states. */
@media (max-width: 600px) {
  html,
  body,
  .access-screen {
    width: 100%;
    overflow-x: hidden;
  }

  .access-screen {
    min-height: 100svh;
    padding:
      max(12px, env(safe-area-inset-top))
      14px
      max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .access-topbar {
    min-height: 42px;
    justify-content: flex-start;
  }

  .access-topbar a {
    min-height: 42px;
    margin-left: 0;
    padding: 8px 12px;
  }

  .access-stagebar {
    width: min(100%, 300px);
    margin-top: 12px;
  }

  .access-stagebar::before {
    right: 16.5%;
    left: 16.5%;
  }

  .access-stagebar li {
    gap: 6px;
  }

  .access-main {
    width: 100%;
    min-height: 0;
    padding: 24px 0 18px;
  }

  .access-view {
    width: 100%;
  }

  .access-avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 21px;
    border-width: 3px;
    box-shadow: 7px 8px 0 var(--access-ink);
  }

  .access-view h1 {
    max-width: 100%;
    font-size: clamp(3.05rem, 15.8vw, 4.35rem);
    line-height: 0.79;
  }

  .access-eyebrow {
    margin-bottom: 12px;
    font-size: 0.59rem;
  }

  .access-code-form,
  .access-wallet-form {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    border-radius: 20px;
  }

  .access-dots {
    gap: clamp(7px, 2.5vw, 11px);
    margin-bottom: 8px;
  }

  .access-dots i {
    width: clamp(13px, 4.1vw, 17px);
    height: clamp(13px, 4.1vw, 17px);
  }

  .access-code-form input,
  .access-wallet-form input {
    height: 56px;
    padding: 0 13px;
    border-radius: 15px;
    box-shadow: 5px 6px 0 var(--access-ink);
    font-size: 16px;
  }

  .access-code-form input {
    letter-spacing: 0.1em;
  }

  .access-primary-button,
  .access-home-button {
    width: 100%;
    min-height: 55px;
    border-radius: 15px;
  }

  .access-feedback {
    min-height: 17px;
    margin-top: 13px;
    font-size: 0.53rem;
    line-height: 1.4;
  }

  .access-wallet-proof {
    width: 100%;
    margin-top: 18px;
    padding: 11px 13px;
  }

  .access-wallet-proof strong {
    font-size: 0.72rem;
  }

  .access-success-mark {
    width: 96px;
    height: 96px;
    margin-bottom: 27px;
  }

  .access-success-mark span {
    font-size: 4.25rem;
  }

  .access-preview-note {
    max-width: 270px;
    margin-top: 14px;
    font-size: 0.47rem;
  }
}

@media (max-width: 380px) {
  .access-main {
    padding-top: 18px;
  }

  .access-view h1 {
    font-size: 3rem;
  }

  .access-code-form,
  .access-wallet-form {
    padding: 10px;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .access-stagebar {
    margin-top: 6px;
  }

  .access-main {
    padding-top: 13px;
    padding-bottom: 10px;
  }

  .access-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
  }

  .access-eyebrow {
    margin-bottom: 8px;
  }

  .access-view h1 {
    font-size: clamp(2.75rem, 14.3vw, 3.5rem);
  }

  .access-code-form,
  .access-wallet-form {
    margin-top: 14px;
  }

  .access-success-mark {
    width: 78px;
    height: 78px;
    margin-bottom: 21px;
  }
}

/* Refined lock-screen identity and wallet success moment. */
.access-screen {
  grid-template-rows: auto 1fr;
}

.access-topbar {
  grid-row: 1;
}

.access-main {
  grid-row: 2;
}

.access-wallet-transition {
  grid-row: 1 / -1;
}

.access-main {
  width: min(100%, 690px);
}

.access-avatar {
  width: clamp(112px, 14vw, 146px);
  height: clamp(112px, 14vw, 146px);
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.access-avatar::before {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
}

.access-avatar img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 4px solid var(--access-ink);
  border-radius: 50%;
  background: #70c8f3;
  box-shadow: 8px 9px 0 var(--access-ink);
  object-fit: cover;
}

.access-avatar--approved {
  background: transparent;
}

.access-avatar--approved::before {
  border-color: #ffc928;
  box-shadow: 0 0 0 7px rgba(255, 201, 40, 0.12);
}

.access-avatar--approved img {
  border-color: #ffc928;
  box-shadow: 8px 9px 0 var(--access-ink), 0 0 0 3px var(--access-ink);
}

.access-avatar span {
  right: -8px;
  bottom: -8px;
}

.access-code-form input,
.access-wallet-form input,
.access-primary-button {
  border-radius: 16px;
}

.access-primary-button:disabled {
  color: var(--access-ink);
  background: #ffc928;
  cursor: default;
}

.access-success-view {
  position: relative;
  display: grid;
  justify-items: center;
}

.access-success-mark {
  position: relative;
  z-index: 2;
  width: clamp(118px, 17vw, 154px);
  height: clamp(118px, 17vw, 154px);
  display: grid;
  place-items: center;
  margin: 0 auto clamp(28px, 4vh, 40px);
  border: 4px solid var(--access-ink);
  border-radius: 50%;
  color: var(--access-ink);
  background: #ffc928;
  box-shadow: 10px 11px 0 var(--access-ink), 0 0 0 10px rgba(255, 255, 255, 0.16);
  animation: accessSuccessPop 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.access-success-mark span {
  font-family: "Lilita One", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: clamp(4.5rem, 9vw, 7rem);
  line-height: 1;
  transform: translateY(-3px);
}

.access-success-burst {
  position: absolute;
  top: 30px;
  left: 50%;
  z-index: 1;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.access-success-burst i {
  --burst-x: 0px;
  --burst-y: -170px;
  --burst-rotate: 90deg;
  position: absolute;
  width: 11px;
  height: 28px;
  border: 2px solid var(--access-ink);
  border-radius: 4px;
  opacity: 0;
  background: #fff;
  animation: accessBurst 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.access-success-burst i:nth-child(2n) {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffc928;
}

.access-success-burst i:nth-child(1) { --burst-x: -180px; --burst-y: -90px; --burst-rotate: -100deg; }
.access-success-burst i:nth-child(2) { --burst-x: -138px; --burst-y: -170px; --burst-rotate: 70deg; animation-delay: 40ms; }
.access-success-burst i:nth-child(3) { --burst-x: -72px; --burst-y: -205px; --burst-rotate: -35deg; animation-delay: 100ms; }
.access-success-burst i:nth-child(4) { --burst-x: 0px; --burst-y: -218px; --burst-rotate: 100deg; animation-delay: 65ms; }
.access-success-burst i:nth-child(5) { --burst-x: 82px; --burst-y: -202px; --burst-rotate: -75deg; animation-delay: 125ms; }
.access-success-burst i:nth-child(6) { --burst-x: 154px; --burst-y: -158px; --burst-rotate: 55deg; animation-delay: 20ms; }
.access-success-burst i:nth-child(7) { --burst-x: 184px; --burst-y: -76px; --burst-rotate: -120deg; animation-delay: 90ms; }
.access-success-burst i:nth-child(8) { --burst-x: 178px; --burst-y: 34px; --burst-rotate: 80deg; animation-delay: 145ms; }
.access-success-burst i:nth-child(9) { --burst-x: 105px; --burst-y: 92px; --burst-rotate: -55deg; animation-delay: 70ms; }
.access-success-burst i:nth-child(10) { --burst-x: -104px; --burst-y: 92px; --burst-rotate: 115deg; animation-delay: 115ms; }
.access-success-burst i:nth-child(11) { --burst-x: -174px; --burst-y: 34px; --burst-rotate: -60deg; animation-delay: 50ms; }
.access-success-burst i:nth-child(12) { --burst-x: 38px; --burst-y: 112px; --burst-rotate: 130deg; animation-delay: 150ms; }

.access-home-button {
  width: min(100%, 510px);
  min-height: 58px;
  display: grid;
  place-items: center;
  margin-top: 34px;
  padding: 12px 18px 10px;
  border: 3px solid var(--access-ink);
  border-radius: 16px;
  color: var(--access-ink);
  background: #fff;
  box-shadow: 6px 7px 0 var(--access-ink);
  font-family: "Lilita One", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.025em;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .access-home-button:hover {
    background: #ffc928;
    transform: translateY(-3px);
  }
}

@keyframes accessSuccessPop {
  0% { opacity: 0; transform: scale(0.45) rotate(-10deg); }
  65% { opacity: 1; transform: scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes accessBurst {
  0% { opacity: 0; transform: translate(0, 85px) rotate(0deg) scale(0.4); }
  20% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--burst-x), var(--burst-y)) rotate(var(--burst-rotate)) scale(1); }
}

@media (max-width: 600px) {
  .access-success-burst {
    transform: scale(0.72);
  }

  .access-success-view h1 {
    font-size: clamp(4.2rem, 20vw, 5.7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-success-mark,
  .access-success-burst i {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

@media (min-width: 701px) and (max-height: 820px) {
  .access-screen {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .access-main {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .access-avatar {
    width: 94px;
    height: 94px;
    margin-bottom: 18px;
  }

  .access-avatar span {
    width: 34px;
    height: 34px;
  }

  .access-view h1 {
    font-size: clamp(4.4rem, 7vw, 5.4rem);
  }

  .access-intro {
    margin-top: 16px;
  }

  .access-code-form,
  .access-wallet-form {
    margin-top: 22px;
  }

  .access-dots {
    margin-bottom: 12px;
  }

  .access-success-mark {
    width: 104px;
    height: 104px;
    margin-bottom: 20px;
  }

  .access-success-mark span {
    font-size: 4.8rem;
  }

  .access-success-view .access-home-button {
    margin-top: 22px;
  }

  .access-preview-note {
    margin-top: 14px;
  }
}

/* Keep every access state centered without grid reflow between views. */
.access-screen {
  display: flex;
  flex-direction: column;
}

.access-main {
  width: min(100%, 690px);
  flex: 1 1 auto;
  align-self: auto;
  justify-self: auto;
  margin: 0 auto;
}

/* Staged access approval and full-screen wallet verification transition. */
.access-code-form.is-approved .access-dots i {
  border-color: var(--access-ink);
  background: #ffc928;
  animation: accessDotApproved 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.access-code-form.is-approved .access-dots i:nth-child(2) { animation-delay: 35ms; }
.access-code-form.is-approved .access-dots i:nth-child(3) { animation-delay: 70ms; }
.access-code-form.is-approved .access-dots i:nth-child(4) { animation-delay: 105ms; }
.access-code-form.is-approved .access-dots i:nth-child(5) { animation-delay: 140ms; }
.access-code-form.is-approved .access-dots i:nth-child(6) { animation-delay: 175ms; }
.access-code-form.is-approved .access-dots i:nth-child(7) { animation-delay: 210ms; }

.access-code-form.is-approved .access-primary-button {
  color: var(--access-ink);
  background: #ffc928;
}

.access-wallet-form {
  position: relative;
}

.access-wallet-form::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -12px;
  left: -12px;
  z-index: 4;
  height: 4px;
  opacity: 0;
  border-radius: 99px;
  background: #ffc928;
  box-shadow: 0 0 18px rgba(255, 201, 40, 0.9), 0 0 52px rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.access-screen.is-verifying-wallet .access-wallet-form::after {
  animation: accessWalletScan 820ms cubic-bezier(0.3, 0, 0.3, 1) infinite;
}

.access-screen.is-verifying-wallet .access-wallet-form input {
  box-shadow:
    6px 7px 0 var(--access-ink),
    0 0 0 6px rgba(255, 201, 40, 0.22),
    0 0 45px rgba(255, 255, 255, 0.22);
}

.access-screen.is-verifying-wallet .access-wallet-form .access-primary-button {
  color: var(--access-ink);
  background:
    linear-gradient(90deg, #ffc928 0 38%, #fff1a4 50%, #ffc928 62% 100%)
    0 0 / 220% 100%;
  animation: accessVerifyButton 760ms linear infinite;
}

.access-wallet-transition {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.access-wallet-transition span {
  width: 24vmax;
  aspect-ratio: 1;
  display: block;
  border: 5px solid var(--access-ink);
  border-radius: 50%;
  opacity: 0;
  background: #ffc928;
  box-shadow:
    0 0 0 3vmax #fff,
    0 0 0 6vmax var(--access-ink);
  transform: scale(0.05);
}

.access-screen.is-wallet-transitioning .access-wallet-transition {
  visibility: visible;
}

.access-screen.is-wallet-transitioning .access-wallet-transition span {
  animation: accessWalletWave 900ms cubic-bezier(0.3, 0, 0.2, 1) both;
}

.access-success-view .access-eyebrow,
.access-success-view h1,
.access-success-view .access-intro,
.access-success-view .access-home-button,
.access-success-view .access-preview-note {
  animation: accessSuccessCopy 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.access-success-view h1 { animation-delay: 70ms; }
.access-success-view .access-intro { animation-delay: 140ms; }
.access-success-view .access-home-button { animation-delay: 210ms; }
.access-success-view .access-preview-note { animation-delay: 280ms; }

.access-screen.is-success::before {
  animation: accessSuccessOrbit 9s linear infinite;
}

@keyframes accessDotApproved {
  0% { transform: scale(0.72); }
  65% { transform: scale(1.18); }
  100% { transform: scale(0.86); }
}

@keyframes accessWalletScan {
  0% { top: -8px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% + 10px); opacity: 0; }
}

@keyframes accessVerifyButton {
  to { background-position: -220% 0; }
}

@keyframes accessWalletWave {
  0% { opacity: 0; transform: scale(0.05); }
  16% { opacity: 1; }
  68% { opacity: 1; transform: scale(7); }
  100% { opacity: 0; transform: scale(10); }
}

@keyframes accessSuccessCopy {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes accessSuccessOrbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .access-code-form.is-approved .access-dots i,
  .access-screen.is-verifying-wallet .access-wallet-form::after,
  .access-screen.is-verifying-wallet .access-wallet-form .access-primary-button,
  .access-screen.is-wallet-transitioning .access-wallet-transition span,
  .access-success-view .access-eyebrow,
  .access-success-view h1,
  .access-success-view .access-intro,
  .access-success-view .access-home-button,
  .access-success-view .access-preview-note,
  .access-screen.is-success::before {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

/* CHONK Access OS — final standalone airdrop experience. */
.access-screen {
  --pointer-x: 50vw;
  --pointer-y: 46vh;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.13), transparent 20rem),
    linear-gradient(145deg, #087cff 0%, var(--access-blue) 48%, #0874ef 100%);
}

.access-screen::before {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 0 0 7vw rgba(255, 255, 255, 0.026),
    0 0 0 14vw rgba(255, 255, 255, 0.018);
}

.access-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.access-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at center, #000, transparent 72%);
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.access-ambient span {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(255, 255, 255, 0.036);
  font-family: "Lilita One", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: min(32vw, 440px);
  line-height: 0.7;
  letter-spacing: -0.065em;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-6deg);
  transition: color 600ms ease, transform 850ms cubic-bezier(0.22, 1, 0.36, 1);
}

.access-ambient i {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  opacity: 0.45;
  animation: accessAmbientFloat 7s ease-in-out infinite;
}

.access-ambient i:nth-of-type(1) { left: 9%; top: 24%; }
.access-ambient i:nth-of-type(2) { left: 17%; top: 76%; animation-delay: -4s; }
.access-ambient i:nth-of-type(3) { left: 82%; top: 18%; animation-delay: -2s; }
.access-ambient i:nth-of-type(4) { left: 91%; top: 68%; animation-delay: -5s; }
.access-ambient i:nth-of-type(5) { left: 72%; top: 88%; animation-delay: -3s; }
.access-ambient i:nth-of-type(6) { left: 31%; top: 12%; animation-delay: -6s; }

.access-topbar {
  min-height: 28px;
}

.access-topbar a,
.access-topbar p {
  position: relative;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 54, 135, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.access-topbar a {
  margin-left: -11px;
}

.access-topbar a:focus-visible,
.access-primary-button:focus-visible,
.access-home-button:focus-visible,
.access-dots:focus-visible {
  outline: 3px solid #ffc928;
  outline-offset: 4px;
}

.access-stagebar {
  position: relative;
  z-index: 5;
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: clamp(16px, 2.7vh, 26px) auto 0;
  padding: 0;
  list-style: none;
}

.access-stagebar::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 17%;
  left: 17%;
  z-index: -1;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.access-stagebar li {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  transition: color 300ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.access-stagebar li span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  color: #fff;
  background: var(--access-blue);
  font-size: 0.52rem;
  transition: color 300ms ease, border-color 300ms ease, background-color 300ms ease, box-shadow 300ms ease;
}

.access-stagebar li.is-current,
.access-stagebar li.is-complete {
  color: #fff;
}

.access-stagebar li.is-current {
  transform: translateY(-2px);
}

.access-stagebar li.is-current span {
  border-color: var(--access-ink);
  color: var(--access-ink);
  background: #ffc928;
  box-shadow: 3px 4px 0 var(--access-ink), 0 0 0 6px rgba(255, 201, 40, 0.14);
}

.access-stagebar li.is-complete span {
  border-color: #fff;
  color: var(--access-blue);
  background: #fff;
}

.access-main {
  padding-top: clamp(26px, 4.5vh, 48px);
  padding-bottom: clamp(26px, 4.5vh, 48px);
}

.access-view {
  position: relative;
}

.access-view::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30px;
  z-index: -1;
  width: min(78vw, 520px);
  height: min(78vw, 520px);
  border-radius: 50%;
  opacity: 0.28;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 67%);
  transform: translateX(-50%);
  pointer-events: none;
}

.access-avatar {
  filter: drop-shadow(0 22px 38px rgba(0, 39, 107, 0.32));
}

.access-avatar::before {
  inset: -11px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.055);
}

.access-avatar::after {
  content: "";
  position: absolute;
  inset: -23px;
  z-index: -1;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: accessAvatarOrbit 18s linear infinite;
}

.access-avatar img {
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease;
}

.access-avatar:hover img {
  transform: scale(1.04) rotate(2deg);
}

.access-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.access-eyebrow::before,
.access-eyebrow::after {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: #ffc928;
}

.access-view h1 {
  text-wrap: balance;
  text-shadow: 0 7px 0 rgba(0, 61, 160, 0.34);
}

.access-code-form,
.access-wallet-form {
  position: relative;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 26px;
  background: rgba(0, 48, 128, 0.08);
  box-shadow: 0 22px 70px rgba(0, 47, 125, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.access-dots {
  margin-bottom: 3px;
}

.access-code-form input,
.access-wallet-form input {
  box-shadow: 7px 8px 0 var(--access-ink);
}

.access-primary-button {
  position: relative;
  overflow: hidden;
  box-shadow: 7px 8px 0 rgba(255, 255, 255, 0.94);
}

.access-primary-button::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -35%;
  width: 28%;
  height: 220%;
  opacity: 0;
  background: rgba(255, 255, 255, 0.52);
  transform: rotate(18deg);
}

.access-code-form.is-approved .access-primary-button::after {
  animation: accessButtonFlash 620ms ease both;
}

.access-wallet-form label {
  margin: 0 3px 10px;
}

.access-wallet-proof {
  width: min(100%, 510px);
  display: grid;
  gap: 5px;
  margin: 24px auto 0;
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(0, 48, 128, 0.12);
  text-align: left;
}

.access-wallet-proof span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.access-wallet-proof strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-screen.is-verifying-wallet .access-stagebar li[data-access-stage="wallet"] span {
  animation: accessStagePulse 700ms ease-in-out infinite alternate;
}

.access-screen.is-verifying-wallet .access-avatar--approved::after {
  border-color: #ffc928;
  animation-duration: 2.4s;
}

.access-screen.is-wallet-transitioning .access-ambient span {
  color: rgba(255, 201, 40, 0.12);
  transform: translate(-50%, -50%) rotate(0deg) scale(1.18);
}

.access-screen.is-success {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 201, 40, 0.2), transparent 19rem),
    linear-gradient(145deg, #087cff 0%, var(--access-blue) 48%, #0874ef 100%);
}

.access-screen.is-success .access-ambient span {
  color: rgba(255, 255, 255, 0.055);
  transform: translate(-50%, -50%) rotate(-2deg) scale(1.06);
}

.access-success-mark {
  box-shadow:
    10px 11px 0 var(--access-ink),
    0 0 0 10px rgba(255, 255, 255, 0.16),
    0 0 80px rgba(255, 201, 40, 0.46);
}

.access-success-mark::before,
.access-success-mark::after {
  position: absolute;
  left: 50%;
  padding: 5px 9px 4px;
  border: 2px solid var(--access-ink);
  border-radius: 999px;
  color: var(--access-ink);
  background: #fff;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.access-success-mark::before {
  content: "CHONK";
  top: -17px;
}

.access-success-mark::after {
  content: "APPROVED";
  bottom: -17px;
  background: #ffc928;
}

.access-home-button {
  margin-top: 20px;
}

@keyframes accessAmbientFloat {
  0%, 100% { opacity: 0.3; transform: translateY(0) scale(0.85); }
  50% { opacity: 0.75; transform: translateY(-18px) scale(1.12); }
}

@keyframes accessAvatarOrbit {
  to { transform: rotate(360deg); }
}

@keyframes accessButtonFlash {
  0% { left: -35%; opacity: 0; }
  22% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

@keyframes accessStagePulse {
  to { box-shadow: 3px 4px 0 var(--access-ink), 0 0 0 10px rgba(255, 201, 40, 0.24); }
}

@media (max-width: 600px) {
  .access-screen {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .access-topbar a,
  .access-topbar p {
    padding: 7px 9px;
  }

  .access-stagebar {
    width: min(100%, 330px);
    margin-top: 12px;
  }

  .access-stagebar li b {
    font-size: 0.44rem;
  }

  .access-main {
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .access-avatar {
    width: 92px;
    height: 92px;
    margin-bottom: 22px;
  }

  .access-avatar::after {
    inset: -17px;
  }

  .access-view h1 {
    font-size: clamp(3.45rem, 17.5vw, 5rem);
  }

  .access-intro {
    margin-top: 18px;
    font-size: 0.91rem;
  }

  .access-code-form,
  .access-wallet-form {
    margin-top: 24px;
    padding: 12px;
    border-radius: 22px;
  }

  .access-dots {
    padding-top: 4px;
  }

  .access-code-form input,
  .access-wallet-form input {
    height: 56px;
  }

  .access-primary-button,
  .access-home-button {
    min-height: 54px;
  }

  .access-wallet-proof {
    margin-top: 18px;
  }

  .access-preview-note {
    margin-top: 13px;
  }

  .access-success-mark {
    width: 106px;
    height: 106px;
    margin-bottom: 27px;
  }

  .access-success-mark span {
    font-size: 4.8rem;
  }
}

@media (max-height: 740px) {
  .access-stagebar {
    margin-top: 8px;
  }

  .access-main {
    padding-top: 15px;
    padding-bottom: 12px;
  }

  .access-avatar {
    width: 78px;
    height: 78px;
    margin-bottom: 15px;
  }

  .access-avatar::after {
    inset: -14px;
  }

  .access-eyebrow {
    margin-bottom: 10px;
  }

  .access-intro {
    margin-top: 13px;
  }

  .access-code-form,
  .access-wallet-form {
    margin-top: 15px;
  }

  .access-success-mark {
    width: 88px;
    height: 88px;
    margin-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-ambient i,
  .access-avatar::after,
  .access-code-form.is-approved .access-primary-button::after,
  .access-screen.is-verifying-wallet .access-stagebar li[data-access-stage="wallet"] span {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}

/* Final phone overrides live last so every earlier design pass stays responsive. */
@media (max-width: 600px) {
  html,
  body,
  .access-screen {
    width: 100%;
    overflow-x: hidden;
  }

  .access-screen {
    min-height: 100svh;
    padding: max(12px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .access-topbar {
    min-height: 42px;
    justify-content: flex-start;
  }

  .access-topbar a {
    min-height: 42px;
    margin-left: 0;
    padding: 8px 12px;
  }

  .access-stagebar {
    width: min(100%, 300px);
    margin-top: 12px;
  }

  .access-stagebar li {
    gap: 6px;
  }

  .access-main {
    width: 100%;
    min-height: 0;
    padding: 24px 0 18px;
  }

  .access-view {
    width: 100%;
  }

  .access-avatar {
    width: 88px;
    height: 88px;
    margin-bottom: 21px;
    border-width: 3px;
    box-shadow: 7px 8px 0 var(--access-ink);
  }

  .access-avatar::after {
    inset: -17px;
  }

  .access-view h1 {
    max-width: 100%;
    font-size: clamp(3.05rem, 15.8vw, 4.35rem);
    line-height: 0.79;
  }

  .access-eyebrow {
    margin-bottom: 12px;
    font-size: 0.59rem;
  }

  .access-code-form,
  .access-wallet-form {
    width: 100%;
    margin-top: 22px;
    padding: 11px;
    border-radius: 20px;
  }

  .access-dots {
    gap: clamp(7px, 2.5vw, 11px);
    margin-bottom: 8px;
  }

  .access-dots i {
    width: clamp(13px, 4.1vw, 17px);
    height: clamp(13px, 4.1vw, 17px);
  }

  .access-code-form input,
  .access-wallet-form input {
    height: 56px;
    padding: 0 13px;
    border-radius: 15px;
    box-shadow: 5px 6px 0 var(--access-ink);
    font-size: 16px;
  }

  .access-code-form input {
    letter-spacing: 0.1em;
  }

  .access-primary-button,
  .access-home-button {
    width: 100%;
    min-height: 55px;
    border-radius: 15px;
  }

  .access-feedback {
    min-height: 17px;
    margin-top: 13px;
    font-size: 0.53rem;
    line-height: 1.4;
  }

  .access-wallet-proof {
    width: 100%;
    margin-top: 18px;
    padding: 11px 13px;
  }

  .access-wallet-proof strong {
    font-size: 0.72rem;
  }

  .access-success-mark {
    width: 96px;
    height: 96px;
    margin-bottom: 27px;
  }

  .access-success-mark span {
    font-size: 4.25rem;
  }

  .access-preview-note {
    max-width: 270px;
    margin-top: 14px;
    font-size: 0.47rem;
  }
}

@media (max-width: 380px) {
  .access-main {
    padding-top: 18px;
  }

  .access-view h1 {
    font-size: 3rem;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .access-stagebar {
    margin-top: 6px;
  }

  .access-main {
    padding-top: 13px;
    padding-bottom: 10px;
  }

  .access-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
  }

  .access-view h1 {
    font-size: clamp(2.75rem, 14.3vw, 3.5rem);
  }

  .access-code-form,
  .access-wallet-form {
    margin-top: 14px;
  }

  .access-success-mark {
    width: 78px;
    height: 78px;
    margin-bottom: 21px;
  }
}
