/* =========================================================
   PINKJOURNAL BLUSH-GLASS LIBRARY ENTRANCE V1.1
   Login page only. No journal/library styles are changed.
   ========================================================= */

.library-login-page {
  --door-pink-1: #fff1f7;
  --door-pink-2: #f6d3e1;
  --door-pink-3: #e8b5d3;
  --door-pink-4: #d982ac;
  --door-pink-5: #b85b7c;
  --door-ink: #684559;
  --door-muted: #876879;
  --door-gold: #d6ae73;
  --door-gold-light: #f4deb4;

  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--door-ink);
  background:
    radial-gradient(
      circle at 50% 22%,
      rgba(255,255,255,.82),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      #fbe6f0 0%,
      #f3cadc 45%,
      #e8acc8 74%,
      #d88aac 100%
    );
  font-family: "Inter", system-ui, sans-serif;
}

.library-login-page *,
.library-login-page *::before,
.library-login-page *::after {
  box-sizing: border-box;
}

.library-entrance {
  position: relative;
  min-height: 100dvh;
  isolation: isolate;
  overflow: hidden;
}

.library-sky {
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 72% 27% at 8% 18%,
      rgba(255,255,255,.72),
      transparent 72%
    ),
    radial-gradient(
      ellipse 67% 25% at 92% 27%,
      rgba(255,255,255,.58),
      transparent 72%
    ),
    radial-gradient(
      ellipse 86% 26% at 50% 93%,
      rgba(255,247,251,.62),
      transparent 76%
    );
  filter: blur(12px);
}

.library-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    radial-gradient(
      circle,
      rgba(255,255,255,.9) 0 1px,
      transparent 1.8px
    );
  background-size: 77px 71px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 68%);
}

.entrance-star {
  position: absolute;
  color: rgba(255,255,255,.86);
  filter: drop-shadow(0 0 10px rgba(255,255,255,.8));
  animation: entranceTwinkle 3.2s ease-in-out infinite;
}

.entrance-star-one {
  left: 10%;
  top: 21%;
  font-size: 20px;
}

.entrance-star-two {
  left: 42%;
  top: 12%;
  font-size: 16px;
  animation-delay: -.9s;
}

.entrance-star-three {
  right: 11%;
  top: 35%;
  font-size: 23px;
  animation-delay: -1.7s;
}

.entrance-star-four {
  right: 37%;
  top: 63%;
  font-size: 15px;
  animation-delay: -2.3s;
}

@keyframes entranceTwinkle {
  0%,
  100% {
    opacity: .42;
    transform: scale(.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.entrance-brand {
  position: relative;
  z-index: 20;
  width: min(1220px, calc(100% - 32px));
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 auto;
  padding: 12px 4px;
}

.entrance-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 50%;
  color: #a94f78;
  background: rgba(255,255,255,.56);
  box-shadow: 0 10px 28px rgba(112,54,82,.12);
  backdrop-filter: blur(12px);
}

.entrance-brand strong,
.entrance-brand small {
  display: block;
}

.entrance-brand strong {
  color: #9e3f6c;
  font: 400 25px/1 "DM Serif Display", Georgia, serif;
}

.entrance-brand small {
  margin-top: 4px;
  color: var(--door-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.entrance-layout {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100dvh - 114px);
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(470px, 1.12fr);
  align-items: center;
  gap: clamp(36px, 6vw, 86px);
  margin: 0 auto;
  padding: 28px 0 70px;
}

.entrance-copy {
  max-width: 520px;
  padding: 30px 0;
}

.entrance-eyebrow {
  margin: 0 0 14px;
  color: #a84975;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.entrance-copy h1 {
  max-width: 500px;
  margin: 0;
  color: #84375f;
  font: 400 clamp(54px, 7vw, 88px)/.92 "DM Serif Display", Georgia, serif;
  letter-spacing: -.045em;
  text-shadow: 0 2px rgba(255,255,255,.62);
}

.entrance-intro {
  max-width: 490px;
  margin: 22px 0 0;
  color: #755568;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.65;
}

.entrance-promises {
  display: grid;
  gap: 11px;
  margin-top: 32px;
}

.entrance-promises > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 17px;
  background: rgba(255,255,255,.28);
  box-shadow: inset 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(10px);
}

.entrance-promises > div > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #a84674;
  background: rgba(255,255,255,.52);
}

.entrance-promises p,
.entrance-promises strong,
.entrance-promises small {
  display: block;
  margin: 0;
}

.entrance-promises strong {
  color: #674658;
  font-size: 12px;
}

.entrance-promises small {
  margin-top: 3px;
  color: #856879;
  font-size: 10px;
  line-height: 1.35;
}

.door-stage {
  width: 100%;
  display: grid;
  justify-items: center;
  align-self: stretch;
  align-content: center;
}

.library-doorway {
  position: relative;
  width: min(100%, 520px);
  height: 670px;
  padding: 30px 28px 24px;
  overflow: hidden;
  border: 2px solid rgba(240,211,171,.72);
  border-radius: 230px 230px 30px 30px;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.2),
      transparent 14% 86%,
      rgba(118,65,91,.1)
    ),
    rgba(255,232,242,.34);
  box-shadow:
    inset 0 0 0 7px rgba(255,255,255,.2),
    inset 0 0 0 9px rgba(198,151,101,.18),
    0 34px 72px rgba(91,43,68,.22);
  isolation: isolate;
}

.library-doorway::before {
  content: "";
  position: absolute;
  inset: 17px;
  z-index: 8;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 215px 215px 22px 22px;
  box-shadow:
    inset 0 0 0 2px rgba(215,174,115,.24),
    inset 0 0 30px rgba(255,255,255,.17);
}

.library-doorway::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 12px;
  z-index: 11;
  height: 16px;
  border-radius: 50%;
  background: rgba(108,57,82,.17);
  filter: blur(9px);
}

.doorway-crown {
  position: absolute;
  top: 25px;
  left: 50%;
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.92);
  text-shadow: 0 2px 5px rgba(113,60,88,.22);
}

.doorway-crown strong {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  font: 400 18px "DM Serif Display", Georgia, serif;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}

.library-beyond {
  position: absolute;
  inset: 20px;
  z-index: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 214px 214px 20px 20px;
  opacity: .4;
  background:
    linear-gradient(
      180deg,
      #fff5fa 0%,
      #f3d3e2 47%,
      #d98fb1 100%
    );
  transition: opacity .55s ease .45s;
}

.beyond-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 43% at 50% 28%,
      rgba(255,255,255,.95),
      transparent 72%
    );
}

.library-beyond p {
  position: absolute;
  top: 45%;
  z-index: 3;
  margin: 0;
  color: #8d4268;
  font: 400 27px "DM Serif Display", Georgia, serif;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity .38s ease .72s,
    transform .38s ease .72s;
}

.beyond-shelf {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 5px;
  background: linear-gradient(#dba183,#a6604a);
  box-shadow: 0 8px 0 #824736;
}

.beyond-shelf-one {
  bottom: 165px;
}

.beyond-shelf-two {
  bottom: 80px;
}

.beyond-shelf i {
  width: 25px;
  height: 65px;
  display: block;
  border-radius: 4px 5px 2px 2px;
  background:
    linear-gradient(90deg,rgba(79,35,57,.18),transparent 25%),
    linear-gradient(#f0b4d1,#d96a9f);
  box-shadow: 2px 3px 4px rgba(73,37,54,.16);
}

.beyond-shelf i:nth-child(2n) {
  height: 76px;
  background:
    linear-gradient(90deg,rgba(79,35,57,.18),transparent 25%),
    linear-gradient(#f5cbdc,#c97fa2);
}

.beyond-shelf i:nth-child(3n) {
  height: 58px;
  background:
    linear-gradient(90deg,rgba(79,35,57,.18),transparent 25%),
    linear-gradient(#e7c9df,#b98eb7);
}

.glass-door-set {
  position: absolute;
  inset: 20px;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border-radius: 214px 214px 20px 20px;
  pointer-events: none;
  perspective: 1100px;
}

.glass-door {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.58);
  background:
    linear-gradient(
      120deg,
      rgba(255,255,255,.52),
      rgba(255,255,255,.12) 28%,
      rgba(238,174,207,.22) 58%,
      rgba(255,255,255,.4)
    ),
    rgba(239,178,207,.31);
  box-shadow:
    inset 0 0 40px rgba(255,255,255,.27),
    inset 0 0 0 3px rgba(215,171,117,.12);
  backdrop-filter: blur(16px) saturate(118%);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  transition:
    transform .8s cubic-bezier(.58,.01,.27,1) .35s,
    opacity .45s ease .42s;
}

.glass-door-left {
  border-radius: 214px 0 0 20px;
  transform-origin: left center;
}

.glass-door-right {
  border-radius: 0 214px 20px 0;
  transform-origin: right center;
}

.glass-door-left::after,
.glass-door-right::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background:
    linear-gradient(
      180deg,
      var(--door-gold-light),
      var(--door-gold),
      var(--door-gold-light)
    );
  box-shadow: 0 0 8px rgba(209,166,105,.34);
}

.glass-door-left::after {
  right: 0;
}

.glass-door-right::after {
  left: 0;
}

.glass-etching {
  position: absolute;
  color: rgba(255,255,255,.42);
  text-shadow: 0 1px rgba(176,103,138,.1);
}

.glass-etching-one {
  left: 20%;
  top: 27%;
  font-size: 70px;
}

.glass-etching-two {
  right: 18%;
  top: 18%;
  font-size: 22px;
}

.glass-etching-three {
  left: 18%;
  top: 20%;
  font-size: 22px;
}

.glass-etching-four {
  right: 16%;
  top: 36%;
  font-size: 78px;
}

/*
  No floating banner/card here.
  The inscription and controls sit directly on the blush glass.
*/
.door-access-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  width: min(76%, 360px);
  transform: translate(-50%, -43%);
  transition:
    opacity .3s ease .16s,
    transform .42s ease .12s;
}

.door-inscription {
  text-align: center;
  color: #7f365d;
  text-shadow:
    0 1px rgba(255,255,255,.9),
    0 0 16px rgba(255,255,255,.6);
}

.door-inscription::before,
.door-inscription::after {
  content: "✦";
  display: inline-block;
  margin: 0 8px 7px;
  color: rgba(166,83,122,.62);
  font-size: 10px;
}

.door-inscription p {
  margin: 0 0 5px;
  color: #a64b76;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.door-inscription h2 {
  margin: 0;
  color: #81385f;
  font: 400 clamp(31px, 4vw, 40px)/.98 "DM Serif Display", Georgia, serif;
  overflow-wrap: anywhere;
}

.door-inscription small {
  display: block;
  margin-top: 8px;
  color: #7e6070;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.door-lock-scene {
  position: relative;
  width: 92px;
  height: 61px;
  margin: 21px auto 8px;
}

.heart-lock {
  position: absolute;
  right: 7px;
  bottom: 0;
  width: 48px;
  height: 43px;
  z-index: 3;
}

.lock-shackle {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 28px;
  height: 29px;
  border: 5px solid var(--door-gold);
  border-bottom: 0;
  border-radius: 17px 17px 0 0;
  transform: translateX(-50%);
  transform-origin: 4px 23px;
  transition: transform .32s ease .32s;
}

.lock-heart {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff7e9;
  font-size: 31px;
  text-shadow: 0 1px #9d6e31;
  filter: drop-shadow(0 5px 7px rgba(91,50,34,.17));
}

.lock-heart::before {
  content: "";
  position: absolute;
  inset: 4px 2px 0;
  z-index: -1;
  clip-path: polygon(
    50% 100%,
    6% 48%,
    3% 33%,
    7% 18%,
    17% 7%,
    31% 3%,
    43% 7%,
    50% 18%,
    57% 7%,
    69% 3%,
    83% 7%,
    93% 18%,
    97% 33%,
    94% 48%
  );
  background:
    linear-gradient(
      145deg,
      var(--door-gold-light),
      var(--door-gold) 58%,
      #a8783c
    );
}

.lock-keyhole {
  position: absolute;
  left: 50%;
  top: 21px;
  width: 5px;
  height: 11px;
  border-radius: 999px;
  background: #7f5635;
  transform: translateX(-50%);
}

.door-key {
  position: absolute;
  left: -4px;
  top: 21px;
  z-index: 5;
  width: 65px;
  height: 22px;
  color: var(--door-gold);
  opacity: 0;
  transform: translateX(-24px) rotate(-8deg);
  transition:
    opacity .18s ease,
    transform .48s cubic-bezier(.2,.85,.25,1);
}

.key-bow {
  position: absolute;
  left: 0;
  top: -5px;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 1px #80552d;
}

.key-stem {
  position: absolute;
  left: 24px;
  top: 8px;
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      var(--door-gold-light),
      var(--door-gold)
    );
  box-shadow: 0 1px #80552d;
}

.key-teeth {
  position: absolute;
  right: 2px;
  top: 8px;
  width: 11px;
  height: 13px;
  border-right: 5px solid var(--door-gold);
  border-bottom: 5px solid var(--door-gold);
}

.library-login-form {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  box-shadow:
    inset 0 1px rgba(255,255,255,.32),
    0 14px 30px rgba(106,54,79,.07);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.library-field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.library-field > span {
  padding-left: 2px;
  color: #704d60;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.library-field input {
  width: 100%;
  min-height: 45px;
  padding: 0 14px;
  border: 1px solid rgba(164,75,117,.23);
  border-radius: 13px;
  outline: 0;
  color: #5c4050;
  background: rgba(255,255,255,.49);
  box-shadow:
    inset 0 1px rgba(255,255,255,.62),
    0 6px 15px rgba(102,53,77,.04);
  font: inherit;
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.library-field input::placeholder {
  color: #a98698;
}

.library-field input:focus {
  border-color: rgba(206,82,142,.58);
  background: rgba(255,255,255,.72);
  box-shadow:
    0 0 0 4px rgba(216,95,160,.11),
    0 8px 18px rgba(102,53,77,.06);
}

.unlock-library-button {
  position: relative;
  z-index: 3;
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 2px;
  padding: 0 19px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #e36aa2,
      #bc477e
    );
  box-shadow:
    0 11px 23px rgba(168,60,111,.24),
    inset 0 1px rgba(255,255,255,.26);
  font: 800 13px "Inter", sans-serif;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

.unlock-library-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 27px rgba(168,60,111,.29),
    inset 0 1px rgba(255,255,255,.26);
}

.unlock-library-button:focus-visible {
  outline: 3px solid rgba(255,255,255,.72);
  outline-offset: 3px;
}

.unlock-library-button:disabled {
  cursor: wait;
  opacity: .78;
}

.unlock-button-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  font-size: 11px;
}

.library-login-message {
  min-height: 18px;
  margin: -2px 0 0;
  color: #9d2f59;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px rgba(255,255,255,.7);
}

.library-login-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: -3px;
  color: #997789;
  font-size: 10px;
}

.library-login-links a,
.library-text-button {
  padding: 3px 0;
  border: 0;
  color: #814060;
  background: transparent;
  font: 700 10px "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.library-login-links a:hover,
.library-text-button:hover {
  color: #b73e78;
  text-decoration: underline;
}

.door-caption {
  max-width: 390px;
  margin: 13px 0 0;
  color: rgba(103,70,87,.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .03em;
  text-align: center;
}

.entrance-floor {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -88px;
  z-index: -2;
  height: 250px;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(
      ellipse at 50% 12%,
      rgba(255,255,255,.58),
      rgba(246,213,229,.42) 42%,
      rgba(201,126,161,.18) 76%,
      transparent 77%
    );
  filter: blur(9px);
}

/* Checking credentials */
.library-entrance.is-checking .door-key {
  opacity: .62;
  transform: translateX(-9px) rotate(-3deg);
}

.library-entrance.is-checking .unlock-button-icon {
  animation: keyCheckSpin .8s linear infinite;
}

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

/* Successful unlock */
.library-entrance.is-unlocking .door-key {
  opacity: 1;
  transform: translateX(22px) rotate(0);
}

.library-entrance.is-unlocking .lock-shackle {
  transform: translateX(-50%) rotate(-43deg);
}

.library-entrance.is-unlocking .heart-lock {
  filter: drop-shadow(0 0 13px rgba(255,239,185,.95));
}

.library-entrance.is-unlocking .door-access-layer {
  opacity: 0;
  transform: translate(-50%, -46%) scale(.96);
  pointer-events: none;
}

.library-entrance.is-unlocking .glass-door-left {
  transform: translateX(-96%) rotateY(-14deg);
  opacity: .16;
}

.library-entrance.is-unlocking .glass-door-right {
  transform: translateX(96%) rotateY(14deg);
  opacity: .16;
}

.library-entrance.is-unlocking .library-beyond {
  opacity: 1;
}

.library-entrance.is-unlocking .library-beyond p {
  opacity: 1;
  transform: translateY(0);
}

/* Failed login */
.library-entrance.is-denied .library-doorway {
  animation: deniedKey .34s ease;
}

@keyframes deniedKey {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

@media (max-width: 940px) {
  .entrance-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 8px;
  }

  .entrance-copy {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 0 4px;
    text-align: center;
  }

  .entrance-copy h1,
  .entrance-intro {
    margin-left: auto;
    margin-right: auto;
  }

  .entrance-promises {
    display: none;
  }

  .library-doorway {
    height: 650px;
  }
}

@media (max-width: 580px) {
  .entrance-brand {
    width: calc(100% - 22px);
    min-height: 65px;
    padding-inline: 2px;
  }

  .entrance-brand-mark {
    width: 38px;
    height: 38px;
  }

  .entrance-brand strong {
    font-size: 21px;
  }

  .entrance-brand small {
    font-size: 8px;
  }

  .entrance-layout {
    width: calc(100% - 20px);
    min-height: auto;
    padding: 8px 0 38px;
  }

  .entrance-copy {
    padding-inline: 8px;
  }

  .entrance-eyebrow {
    margin-bottom: 9px;
    font-size: 9px;
  }

  .entrance-copy h1 {
    max-width: 360px;
    font-size: clamp(43px, 13vw, 60px);
  }

  .entrance-intro {
    max-width: 370px;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
  }

  .library-doorway {
    width: min(100%, 420px);
    height: 630px;
    padding-inline: 18px;
    border-radius: 185px 185px 25px 25px;
  }

  .library-doorway::before {
    border-radius: 174px 174px 18px 18px;
  }

  .library-beyond,
  .glass-door-set {
    border-radius: 170px 170px 17px 17px;
  }

  .glass-door-left {
    border-radius: 170px 0 0 17px;
  }

  .glass-door-right {
    border-radius: 0 170px 17px 0;
  }

  .doorway-crown {
    top: 23px;
  }

  .door-access-layer {
    top: 51%;
    width: calc(100% - 58px);
  }

  .door-inscription h2 {
    font-size: 31px;
  }

  .door-inscription small {
    font-size: 10px;
  }

  .library-login-form {
    padding: 16px 17px 14px;
    border-radius: 19px;
  }

  .library-login-links {
    flex-wrap: wrap;
    gap: 5px 8px;
  }

  .door-caption {
    max-width: 320px;
    padding-inline: 12px;
  }
}

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

  .library-doorway {
    height: 605px;
  }

  .door-access-layer {
    top: 52%;
    width: calc(100% - 42px);
  }

  .door-inscription h2 {
    font-size: 28px;
  }

  .library-field input {
    min-height: 44px;
  }

  .unlock-library-button {
    min-height: 47px;
  }
}

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


/* =========================================================
   V1.2 CINEMATIC LIBRARY ENTRY
   Key unlocks, doors open, scene zooms through the doorway.
   ========================================================= */

.library-entrance {
  transform: scale(1);
  transform-origin: 74% 52%;
  transition:
    transform .82s cubic-bezier(.2,.78,.18,1),
    filter .55s ease;
}

.entrance-brand,
.entrance-copy,
.door-caption {
  transition:
    opacity .38s ease,
    transform .5s ease;
}

.library-doorway {
  transition:
    transform .82s cubic-bezier(.2,.78,.18,1),
    box-shadow .5s ease,
    filter .5s ease;
}

.library-beyond {
  transition:
    opacity .45s ease .2s,
    transform .8s cubic-bezier(.2,.78,.18,1);
}

.beyond-shelf {
  transition:
    transform .7s cubic-bezier(.2,.78,.18,1),
    filter .45s ease;
}

.library-entrance::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      circle at 74% 52%,
      rgba(255,255,255,.92),
      rgba(255,240,248,.78) 22%,
      rgba(232,181,211,.38) 48%,
      transparent 72%
    );
  transition: opacity .5s ease;
}

/* The zoom begins after the doors are already moving apart. */
.library-entrance.is-entering {
  transform: scale(1.85);
  filter: saturate(1.08) brightness(1.04);
}

.library-entrance.is-entering .entrance-brand,
.library-entrance.is-entering .entrance-copy,
.library-entrance.is-entering .door-caption {
  opacity: 0;
  transform: translateY(-16px) scale(.96);
}

.library-entrance.is-entering .library-doorway {
  transform: scale(1.08);
  filter: brightness(1.06);
  box-shadow:
    inset 0 0 0 7px rgba(255,255,255,.25),
    inset 0 0 0 9px rgba(198,151,101,.2),
    0 45px 110px rgba(91,43,68,.28),
    0 0 80px rgba(255,232,244,.78);
}

.library-entrance.is-entering .library-beyond {
  opacity: 1;
  transform: scale(1.18);
}

.library-entrance.is-entering .beyond-shelf-one {
  transform: translateY(-6px) scale(1.1);
}

.library-entrance.is-entering .beyond-shelf-two {
  transform: translateY(6px) scale(1.12);
}

.library-entrance.is-entering .beyond-shelf {
  filter: drop-shadow(0 12px 16px rgba(92,45,66,.22));
}

.library-entrance.is-entering .library-beyond p {
  opacity: 0;
  transform: translateY(-14px) scale(1.08);
}

.library-entrance.is-entering::after {
  opacity: .46;
}

/* Final soft pink flash before journal.html appears. */
.library-entrance.is-entering.is-arriving::after {
  opacity: .9;
}

@media (max-width: 940px) {
  .library-entrance {
    transform-origin: 50% 68%;
  }

  .library-entrance.is-entering {
    transform: scale(1.72);
  }

  .library-entrance::after {
    background:
      radial-gradient(
        circle at 50% 68%,
        rgba(255,255,255,.94),
        rgba(255,240,248,.8) 24%,
        rgba(232,181,211,.4) 50%,
        transparent 74%
      );
  }
}

@media (max-width: 580px) {
  .library-entrance {
    transform-origin: 50% 72%;
  }

  .library-entrance.is-entering {
    transform: scale(1.58);
  }
}


/* =========================================================
   V1.3 RELOCKING LOGOUT
   The v1.2 entrance animation now plays backward after logout.
   ========================================================= */

.library-entrance.is-locking .door-access-layer {
  opacity: 0;
  transform: translate(-50%, -46%) scale(.96);
  pointer-events: none;
}

.library-entrance.is-locking .library-beyond {
  opacity: 1;
}

.library-entrance.is-locking .library-beyond p {
  opacity: 1;
  transform: translateY(0);
}

.library-entrance.is-locking .door-key {
  opacity: 1;
}

/*
  Once the doors and heart lock have finished closing, the etched
  sign-in controls gently return to the glass.
*/
.library-entrance.is-locked .door-access-layer {
  animation: lockedDoorControls .5s ease both;
}

@keyframes lockedDoorControls {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(.97);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -43%) scale(1);
  }
}
