:root {
  color-scheme: dark;
  --access-night: #080d1a;
  --access-silver: #c7cfdf;
  --access-muted: #9ba8c0;
}

.access-page {
  display: grid;
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  padding: 24px;
  place-items: center;
  overflow: auto;
  color: #e8ebf4;
  background:
    radial-gradient(circle at 18% 22%, rgb(225 233 249 / 80%) 0 1px, transparent 1.8px),
    radial-gradient(circle at 78% 17%, rgb(225 233 249 / 58%) 0 1px, transparent 1.8px),
    radial-gradient(circle at 84% 77%, rgb(225 233 249 / 65%) 0 1px, transparent 1.8px),
    radial-gradient(ellipse at 50% 100%, rgb(41 57 89 / 36%), transparent 48%),
    linear-gradient(155deg, #101a31 0%, var(--access-night) 60%, #070b16 100%);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.access-card {
  width: min(100%, 410px);
  padding: 46px 42px 38px;
  border: 1px solid rgb(190 204 230 / 15%);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(20 31 53 / 92%), rgb(11 17 31 / 96%));
  box-shadow: 0 24px 70px rgb(0 0 0 / 38%), inset 0 1px rgb(255 255 255 / 5%);
  text-align: center;
  animation: access-arrive 800ms cubic-bezier(.2, .7, .2, 1) both;
}

.access-moon {
  position: relative;
  width: 54px;
  height: 54px;
  margin: 0 auto 22px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(140deg, #f0f2f7, #adb8cb);
  box-shadow: 0 0 34px rgb(212 223 246 / 22%);
}

.access-moon::after {
  position: absolute;
  top: -5px;
  left: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #141e33;
  content: "";
}

.access-eyebrow {
  margin: 0 0 8px;
  color: var(--access-muted);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.access-card h1 {
  margin: 0;
  color: #edf0f7;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.9rem, 8vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.015em;
}

.access-card h1 span {
  color: var(--access-silver);
  font-style: italic;
}

.access-copy {
  margin: 16px 0 27px;
  color: #aeb9cc;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
}

.access-form {
  display: grid;
  gap: 10px;
  text-align: left;
}

.access-form label {
  color: #c9d1e0;
  font-size: 0.76rem;
  letter-spacing: 0.045em;
}

.access-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgb(190 204 230 / 23%);
  border-radius: 9px;
  outline: none;
  background: rgb(5 10 20 / 62%);
  color: #f0f2f7;
  font: inherit;
  letter-spacing: 0.12em;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.access-form input:focus-visible {
  border-color: rgb(214 224 242 / 70%);
  box-shadow: 0 0 0 3px rgb(195 208 233 / 12%);
}

.access-form button {
  min-height: 45px;
  margin-top: 7px;
  border: 1px solid rgb(219 227 241 / 42%);
  border-radius: 999px;
  background: linear-gradient(135deg, #d8deea, #aebbd1);
  color: #10182a;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: filter 180ms ease, transform 180ms ease;
}

.access-form button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.access-form button:focus-visible {
  outline: 2px solid #edf1f8;
  outline-offset: 3px;
}

.access-status {
  min-height: 1.2em;
  margin: 19px 0 0;
  color: #c4cede;
  font-size: 0.76rem;
  line-height: 1.5;
}

.session-logout {
  position: fixed;
  z-index: 10;
  top: max(16px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

html.session-stale body {
  visibility: hidden;
}

.session-logout button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgb(193 207 232 / 20%);
  border-radius: 999px;
  background: rgb(12 19 34 / 65%);
  color: #aeb9cc;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.session-logout button:hover {
  border-color: rgb(211 221 238 / 36%);
  background: rgb(211 221 238 / 9%);
  color: #f2f4f8;
}

.session-logout button:focus-visible {
  outline: 2px solid #dce4f1;
  outline-offset: 3px;
}

@keyframes access-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .access-page { padding: 18px; }
  .access-card { padding: 38px 25px 29px; }
  .session-logout { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
