#authgate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: auto;
  overscroll-behavior: contain;
  color: #fff5e6;
  background: #343f35;
  font: 15px/1.5 system-ui, sans-serif;
}
body:has(#authgate) > :not(#authgate) { visibility: hidden; }
#authgate * { box-sizing: border-box; }
#authgate .welcome-inner { max-width: 1120px; margin: auto; }
#authgate .welcome-header, #authgate .welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px clamp(18px, 5vw, 52px);
}
#authgate .welcome-header { border-bottom: 1px solid #6d7969; }
#authgate .welcome-brand { display: flex; align-items: center; gap: 10px; font: 24px Georgia, serif; }
#authgate .welcome-brand img { border-radius: 9px; }
#authgate #googlelogin {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #a2bc9d;
  border-radius: 9px;
  background: #a2bc9d;
  color: #22362a;
  font: 600 14px system-ui, sans-serif;
}
#authgate #autherror { color: #ffcfbf; margin: 8px clamp(18px, 5vw, 52px) 0; }
#authgate #autherror:empty { display: none; }
#authgate .welcome-content { padding: 28px clamp(18px, 5vw, 52px) 26px; }
#authgate .welcome-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 28px;
  margin: 14px 0 38px;
}
#authgate h1 { margin: 0 0 15px; color: inherit; font: clamp(34px, 5.6vw, 62px)/1.04 Georgia, serif; letter-spacing: -.035em; }
#authgate p { margin: 0; color: #e0e4d6; }
#authgate .welcome-shelf {
  --wood: url('/welcome-walnut.webp?v=seednotes-mwk2yqw2-3cb2c6b141');
  position: relative;
  margin: 0;
  padding: 5px;
  border: 1px solid #74533c;
  border-radius: 6px;
  background: linear-gradient(150deg,#fff2d02c,#2e180e38 74%), var(--wood) center/100% 75px;
  box-shadow: 0 5px 11px #36251c34, inset 0 1px #fff0cc56;
}
#authgate .welcome-shelf > figcaption { position: absolute; top: -21px; left: 0; color: #e0e4d6; font-size: 12px; }
#authgate .welcome-books {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  gap: clamp(10px, 2vw, 21px);
  padding: clamp(12px, 2.4vw, 24px) clamp(13px, 3vw, 25px) 11px;
  border-radius: 2px;
  background: linear-gradient(180deg,#1b0e09ad,#38211652 44%,#211207a1), var(--wood) center/100% auto;
  box-shadow: inset 0 5px 10px #21130998, inset 5px 0 9px #25150cc0, inset -5px 0 9px #25150c91;
}
#authgate .welcome-books::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22px;
  z-index: -1;
  background: linear-gradient(180deg,#1b100b54,#eed3a140 50%,#25150c8c 53%,#26170ed1), var(--wood) center/100% 47px;
  border-top: 1px solid #9b7656;
}
#authgate .welcome-book { position: relative; flex: 1; min-width: 0; aspect-ratio: 5/7; margin: 0; overflow: hidden; border-radius: 4% 6% 6% 4%; box-shadow: 4px 3px 7px #150b07ab; }
#authgate .welcome-book img { display: block; width: 100%; height: 100%; object-fit: cover; }
#authgate .welcome-book figcaption { position: absolute; left: 10%; right: 14%; top: 13%; color: #f4e5ba; font: 600 clamp(12px, 1.7vw, 18px)/1.12 Georgia, serif; }
#authgate .welcome-journal figcaption { color: #39271e; }
#authgate .welcome-anatomy { container-type: inline-size; isolation: isolate; }
#authgate .welcome-anatomy .welcome-skull {
  position: absolute;
  right: 5%;
  bottom: 4%;
  width: 67%;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(2);
  mix-blend-mode: screen;
  clip-path: polygon(40% 0,100% 0,100% 100%,0 100%,0 25%,20% 15%);
  opacity: .9;
}
#authgate .welcome-anatomy figcaption { top: 8%; left: 12%; right: 8%; color: #faf0d8; font-size: clamp(8px, 12cqw, 15px); line-height: 1.12; }
#authgate .welcome-anatomy em { display: block; margin-top: 5%; font-size: .65em; }
#authgate .welcome-features { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; border-top: 1px solid #6d7969; padding-top: 21px; }
#authgate .welcome-features h2 { margin: 5px 0; color: inherit; font: 19px Georgia, serif; }
#authgate .welcome-features p, #authgate .welcome-footer { font-size: 13px; }
#authgate .welcome-footer { border-top: 1px solid #6d7969; color: #e0e4d6; }
#authgate .welcome-footer a { color: #e0e4d6; }
@media (max-width: 650px) {
  #authgate .welcome-hero { grid-template-columns: minmax(0,1fr); gap: 28px; margin-bottom: 25px; }
  #authgate .welcome-features { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
