/* A decorative reaction to existing access states. It does not control access. */
.access-gag {
  --access-frame-ratio: 1;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 22px;
  text-align: center;
  pointer-events: none;
}
.access-gag[hidden] { display: none !important; }
.access-characters {
  width: 100%;
  aspect-ratio: var(--access-frame-ratio);
  background-image: url('/assets/access-no-no.webp');
  background-size: 300% 100%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  border-radius: 16px;
}
.access-gag .access-gag-line,
.access-gag .access-no {
  margin: 8px 0 0;
  color: #d5b1ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
}
#account-signed-out .access-gag { max-width: 260px; margin: 16px auto 22px; }
#download-denial-gag { max-width: 240px; margin: 0 0 18px; }
#account-signed-out .button,
#download-account-gate .button,
#download-account-gate .quiet-link { min-height: 44px; }
#download-account-gate .quiet-link { display: inline-flex; align-items: center; }

.access-denied-page {
  box-sizing: border-box;
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: radial-gradient(ellipse at 50% 0%, #38214e 0, transparent 65%), #111019;
  color: #eee6f7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.access-denied-page * { box-sizing: border-box; }
.access-denied-card {
  width: 100%;
  max-width: 650px;
  min-width: 0;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #6b4787;
  border-radius: 24px;
  background: linear-gradient(145deg, #2a1c37, #18141f 65%);
  box-shadow: 0 22px 70px #0005, 0 0 38px #a35be712;
  overflow-wrap: anywhere;
  text-align: center;
}
.access-denied-kicker {
  margin: 0 0 18px;
  color: #c8a0ef;
  font: 600 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.access-denied-card h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.access-denied-card > p:not(.access-denied-kicker) {
  max-width: 470px;
  margin: 18px auto 0;
  color: #c7b7d6;
  font-size: 15px;
}
.access-denied-card > p.access-denied-note { font-size: 12px; color: #b19bc4; }
.access-denied-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.access-denied-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid #795394;
  border-radius: 9px;
  background: #271d34;
  color: #e3caff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.access-denied-actions a:first-child { background: #dab8ff; border-color: #dab8ff; color: #251332; }
.access-denied-actions a:hover { border-color: #e3caff; background: #382449; }
.access-denied-actions a:first-child:hover { background: #ead5ff; }
.access-denied-actions a:focus-visible { outline: 3px solid #eddaff; outline-offset: 4px; }

@keyframes access-finger-wag {
  0%, 24%, 48%, 72%, 92%, 100% { background-position: 50% 50%; }
  12%, 60% { background-position: 0% 50%; }
  36%, 84% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: no-preference) {
  /* Repeat two deliberate wags with a neutral hold between cycles. */
  .access-characters { animation: access-finger-wag 3s steps(1, end) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .access-characters { animation: none; background-position: 50% 50%; }
}
@media (max-width: 540px) {
  .access-denied-page { padding: 20px 16px; }
  .access-denied-card { padding: 24px 20px; border-radius: 18px; }
  .access-denied-actions { flex-direction: column; }
  .access-denied-actions a { width: 100%; }
  #account-signed-out .access-gag { max-width: 240px; }
  #download-denial-gag { max-width: 220px; }
}
