:root {
  color-scheme: dark;
  --ink: #eff8ff;
  --muted: #8da4bb;
  --dim: #536a80;
  --night: #02050d;
  --navy: #071426;
  --panel: rgba(8, 20, 38, 0.78);
  --cyan: #16d9ff;
  --blue: #147cff;
  --violet: #8f5bff;
  --magenta: #ff2ea6;
  --gold: #d9a441;
  --line: rgba(132, 207, 255, 0.18);
  --glow: 0 0 18px rgba(22, 217, 255, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 44%, rgba(0, 118, 255, 0.12), transparent 27%),
    radial-gradient(circle at 20% 20%, rgba(143, 91, 255, 0.09), transparent 24%),
    linear-gradient(145deg, #030914, #010208 65%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere::before,
.atmosphere::after {
  position: absolute;
  content: "";
  width: 1px;
  height: 100%;
  top: 0;
  background: linear-gradient(transparent, rgba(22, 217, 255, 0.2), transparent);
}

.atmosphere::before {
  left: 7vw;
}

.atmosphere::after {
  right: 7vw;
}

.aurora {
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.13;
  animation: aurora-drift 16s ease-in-out infinite alternate;
}

.aurora-one {
  top: -36vw;
  right: -14vw;
  background: var(--cyan);
}

.aurora-two {
  bottom: -46vw;
  left: -20vw;
  background: var(--violet);
  animation-delay: -8s;
}

.grid-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3vh;
  height: 45vh;
  opacity: 0.2;
  transform: perspective(620px) rotateX(65deg);
  transform-origin: bottom;
  background-image:
    linear-gradient(rgba(22, 217, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 217, 255, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(transparent, #000 75%);
}

.particle-field {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 18% 22%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 14%, var(--cyan) 0 1px, transparent 1.5px),
    radial-gradient(circle at 32% 72%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 91% 61%, var(--violet) 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 82%, #fff 0 1px, transparent 1.5px);
}

.welcome-shell,
.library-shell {
  width: min(1480px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
}

.masthead,
.library-header {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--ink);
  text-decoration: none;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.22em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.34em;
}

.brand-emblem {
  position: relative;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 217, 255, 0.72);
  border-radius: 13px;
  box-shadow:
    inset 0 0 18px rgba(22, 217, 255, 0.12),
    0 0 24px rgba(22, 217, 255, 0.16);
  transform: rotate(45deg);
}

.brand-emblem i {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  box-shadow: var(--glow);
}

.brand-emblem i:nth-child(1) {
  transform: translateY(-6px);
}

.brand-emblem i:nth-child(2) {
  width: 25px;
}

.brand-emblem i:nth-child(3) {
  transform: translateY(6px);
}

.brand-emblem.small {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.secure-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5dffac;
  box-shadow: 0 0 13px rgba(93, 255, 172, 0.8);
}

.hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  align-items: center;
  gap: 30px;
  padding: 50px 4vw 36px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: #9fc0d6;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: var(--glow);
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.2rem, 6.1vw, 6.8rem);
  font-weight: 670;
  line-height: 0.94;
  letter-spacing: -0.064em;
}

.hero h1 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(90deg, #f8fdff 0%, #5ee8ff 42%, #728cff 78%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(22, 217, 255, 0.16));
}

.hero-intro {
  max-width: 690px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.4vw, 1.28rem);
  line-height: 1.75;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-actions p {
  max-width: 250px;
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-button {
  min-height: 58px;
  padding: 0 10px 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(78, 221, 255, 0.55);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(18, 101, 186, 0.82), rgba(11, 42, 79, 0.94));
  box-shadow:
    inset 0 0 22px rgba(22, 217, 255, 0.12),
    0 0 28px rgba(22, 217, 255, 0.15);
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.primary-button b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(22, 217, 255, 0.14);
  color: var(--cyan);
  font-size: 20px;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow:
    inset 0 0 28px rgba(22, 217, 255, 0.18),
    0 0 38px rgba(22, 217, 255, 0.27);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

#enterButton {
  animation: invitation-pulse 2.6s ease-in-out infinite;
  will-change: filter;
}

.portal-sculpture {
  position: relative;
  width: min(46vw, 540px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.halo,
.orbit,
.energy-core {
  position: absolute;
  border-radius: 50%;
}

.halo {
  border: 1px solid rgba(37, 191, 255, 0.2);
  box-shadow:
    inset 0 0 44px rgba(20, 124, 255, 0.05),
    0 0 34px rgba(22, 217, 255, 0.08);
}

.halo-one {
  inset: 3%;
}

.halo-two {
  inset: 15%;
  border-style: dashed;
  animation: slow-spin 32s linear infinite;
}

.halo-three {
  inset: 28%;
  border-color: rgba(143, 91, 255, 0.34);
  box-shadow: 0 0 64px rgba(143, 91, 255, 0.12);
}

.energy-core {
  width: 30%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 38% 30%, #91f5ff, #0b7df8 31%, #16194d 68%, #030712);
  border: 1px solid rgba(155, 243, 255, 0.8);
  box-shadow:
    inset 0 -18px 34px rgba(0, 0, 0, 0.36),
    0 0 32px rgba(22, 217, 255, 0.62),
    0 0 90px rgba(20, 124, 255, 0.36);
}

.energy-core::before,
.energy-core::after {
  position: absolute;
  content: "";
  inset: -13%;
  border: 1px solid rgba(22, 217, 255, 0.45);
  border-radius: 50%;
  transform: rotateX(68deg);
}

.energy-core::after {
  transform: rotateY(68deg);
}

.energy-core span {
  position: absolute;
  top: 24%;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.42em;
  opacity: 0.75;
}

.energy-core strong {
  font-size: clamp(3.6rem, 7vw, 6rem);
  line-height: 1;
  text-shadow: 0 0 22px rgba(255, 255, 255, 0.65);
}

.orbit {
  inset: 9%;
  border: 1px solid transparent;
  border-top-color: rgba(22, 217, 255, 0.7);
  border-bottom-color: rgba(143, 91, 255, 0.45);
  animation: slow-spin 13s linear infinite;
}

.orbit-two {
  inset: 23%;
  animation-direction: reverse;
  animation-duration: 9s;
}

.orbit i {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
}

.signal {
  position: absolute;
  width: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: var(--glow);
}

.signal-one {
  left: 0;
  transform: rotate(18deg);
}

.signal-two {
  right: 0;
  transform: rotate(-18deg);
}

.collection-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.collection-preview article {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 36px;
  border-right: 1px solid var(--line);
}

.collection-preview article:last-child {
  border-right: 0;
}

.collection-preview article > span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 0 12px rgba(22, 217, 255, 0.7);
}

.collection-preview div {
  display: grid;
  gap: 5px;
}

.collection-preview small {
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.collection-preview strong {
  font-size: 14px;
  letter-spacing: 0.02em;
}

.welcome-footer,
.library-footer {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.welcome-footer span:first-child {
  color: #70dfff;
  text-shadow:
    0 0 6px rgba(22, 217, 255, 0.88),
    0 0 16px rgba(20, 124, 255, 0.62),
    0 0 28px rgba(15, 92, 255, 0.38);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 240ms ease;
}

.login-overlay.is-open {
  opacity: 1;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 10, 0.84);
  backdrop-filter: blur(15px);
}

.login-card {
  position: relative;
  width: min(490px, 100%);
  padding: 42px;
  overflow: hidden;
  border: 1px solid rgba(76, 206, 255, 0.3);
  border-radius: 25px;
  background:
    linear-gradient(145deg, rgba(10, 25, 46, 0.98), rgba(3, 9, 19, 0.99));
  box-shadow:
    0 26px 90px rgba(0, 0, 0, 0.58),
    0 0 55px rgba(22, 217, 255, 0.1);
  transform: translateY(16px) scale(0.98);
  transition: transform 240ms ease;
}

.login-overlay.is-open .login-card {
  transform: translateY(0) scale(1);
}

.login-card::after {
  position: absolute;
  content: "";
  width: 240px;
  height: 240px;
  top: -160px;
  right: -80px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.11;
  filter: blur(50px);
  pointer-events: none;
}

.close-button {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.login-brand p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.login-card h2 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4rem);
  letter-spacing: -0.05em;
}

.login-intro {
  margin: 15px 0 28px;
  color: var(--muted);
  line-height: 1.65;
}

#loginForm {
  display: grid;
  gap: 18px;
}

#loginForm label {
  display: grid;
  gap: 8px;
}

#loginForm label > span:first-child {
  color: #bfd0dd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#loginForm input {
  width: 100%;
  height: 55px;
  padding: 0 16px;
  border: 1px solid rgba(135, 185, 220, 0.22);
  border-radius: 11px;
  background: rgba(1, 6, 14, 0.68);
  color: var(--ink);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

#loginForm input:focus {
  border-color: rgba(22, 217, 255, 0.72);
  box-shadow: 0 0 20px rgba(22, 217, 255, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 68px !important;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 13px;
  padding: 6px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.form-message {
  min-height: 18px;
  margin: -3px 0;
  color: var(--muted);
  font-size: 12px;
}

.form-message.is-error {
  color: #ff8e9d;
}

.form-message.is-success {
  color: #69f7b1;
}

.login-submit {
  width: 100%;
  justify-content: space-between;
  margin-top: 2px;
}

.access-note {
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.local-preview {
  display: block;
  margin: 14px auto 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 11px;
  cursor: pointer;
}

.library-shell {
  padding-bottom: 20px;
}

.member-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.member-controls > div {
  display: grid;
  gap: 3px;
  text-align: right;
}

.member-controls small {
  color: var(--dim);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.member-controls strong {
  font-size: 13px;
}

.member-controls button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(8, 22, 41, 0.7);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.library-hero {
  padding: 84px 4vw 58px;
}

.library-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 5.7vw, 6rem);
  letter-spacing: -0.06em;
}

.library-hero > p:last-child {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.library-section {
  padding: 0 4vw 60px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading small {
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.22em;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 27px;
}

.section-heading > span {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.library-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 18px;
}

.library-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(145deg, rgba(9, 23, 42, 0.9), rgba(3, 8, 17, 0.92));
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(225px, 0.78fr) 1.22fr;
}

.book-cover-wrap {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #d7d2ca;
}

.book-cover-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  box-shadow: inset -22px 0 42px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.book-cover-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 48%;
}

.format-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  padding: 8px 11px;
  border: 1px solid rgba(22, 217, 255, 0.45);
  border-radius: 8px;
  background: rgba(3, 12, 23, 0.86);
  color: var(--cyan);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.card-copy {
  padding: 38px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-kicker {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.card-copy h3,
.future-card h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.card-copy > p:not(.card-kicker),
.future-card > p:not(.card-kicker) {
  color: var(--muted);
  line-height: 1.65;
}

.card-meta {
  width: 100%;
  margin: 22px 0 28px;
  padding: 20px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.card-meta span {
  display: grid;
  gap: 4px;
  color: var(--dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-meta b {
  color: var(--ink);
  font-size: 21px;
}

.future-card {
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.future-glow {
  position: absolute;
  width: 270px;
  height: 270px;
  top: -170px;
  right: -120px;
  border-radius: 50%;
  background: var(--cyan);
  filter: blur(40px);
  opacity: 0.16;
}

.future-glow.violet {
  background: var(--violet);
}

.future-number {
  margin-bottom: auto;
  color: rgba(22, 217, 255, 0.28);
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.coming-soon {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.library-footer {
  margin: 0 4vw;
  border-top: 1px solid var(--line);
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes aurora-drift {
  to {
    transform: translate3d(4vw, 2vw, 0) scale(1.08);
  }
}

@keyframes invitation-pulse {
  0%,
  100% {
    filter:
      drop-shadow(0 0 7px rgba(22, 217, 255, 0.46))
      drop-shadow(0 0 16px rgba(24, 109, 255, 0.3));
  }

  50% {
    filter:
      drop-shadow(0 0 13px rgba(22, 217, 255, 0.98))
      drop-shadow(0 0 30px rgba(24, 109, 255, 0.82))
      drop-shadow(0 0 46px rgba(15, 92, 255, 0.56));
  }
}

@media (min-width: 761px) and (min-height: 600px) {
  body:has(#welcome:not([hidden])) {
    overflow-y: hidden;
  }

  .welcome-shell {
    height: 100svh;
    min-height: 0;
    display: grid;
    grid-template-rows:
      clamp(76px, 11.5vh, 116px)
      minmax(0, 1fr)
      clamp(78px, 11vh, 112px)
      clamp(48px, 7.5vh, 80px);
  }

  .welcome-shell .masthead,
  .welcome-shell .welcome-footer {
    height: 100%;
    min-height: 0;
  }

  .welcome-shell .hero {
    height: 100%;
    min-height: 0;
    padding:
      clamp(14px, 4.5vh, 50px)
      4vw
      clamp(12px, 3vh, 36px);
  }

  .welcome-shell .hero h1 {
    font-size: clamp(3rem, min(6.1vw, 10.7vh), 6.8rem);
  }

  .welcome-shell .eyebrow {
    margin-bottom: clamp(10px, 2.3vh, 24px);
  }

  .welcome-shell .hero-intro {
    margin-top: clamp(12px, 3vh, 30px);
    line-height: 1.55;
  }

  .welcome-shell .hero-actions {
    margin-top: clamp(16px, 3.8vh, 38px);
  }

  .welcome-shell .portal-sculpture {
    width: min(46vw, 60vh, 540px);
  }

  .welcome-shell .collection-preview,
  .welcome-shell .collection-preview article {
    height: 100%;
    min-height: 0;
  }

  .welcome-shell .collection-preview article {
    padding: clamp(10px, 2vh, 20px) 36px;
  }
}

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: 1fr 0.75fr;
  }

  .portal-sculpture {
    width: min(43vw, 430px);
  }

  .library-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .welcome-shell,
  .library-shell {
    width: min(100% - 28px, 1480px);
  }

  .masthead,
  .library-header {
    min-height: 88px;
  }

  .secure-badge {
    display: none;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 66px 10px 42px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 15vw, 5.4rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-sculpture {
    width: min(92vw, 440px);
    margin: 10px auto;
  }

  .collection-preview {
    grid-template-columns: 1fr;
  }

  .collection-preview article {
    min-height: 88px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .collection-preview article:last-child {
    border-bottom: 0;
  }

  .welcome-footer,
  .library-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
  }

  .login-card {
    padding: 34px 24px 26px;
  }

  .member-controls > div {
    display: none;
  }

  .library-hero {
    padding: 62px 10px 46px;
  }

  .library-section {
    padding: 0 10px 50px;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    display: block;
  }

  .book-cover-wrap {
    height: 410px;
  }

  .future-card {
    min-height: 340px;
  }
}

@media (max-width: 480px) {
  .brand-copy small {
    display: none;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

  .primary-button {
    width: 100%;
    justify-content: space-between;
  }

  .card-copy {
    padding: 26px 22px;
  }

  .card-meta {
    gap: 10px;
  }
}

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