/* Stage 1 Guest Landing Page adjustments. All selectors are guest-route scoped. */
.guest-landing-page .guest-library-empty-row {
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  filter: none;
}

.guest-landing-page .guest-library-sign {
  position: relative;
  z-index: 8;
  width: min(310px, 72%);
  margin: 38px 0 0;
  padding: 10px 13px;
  border: 2px solid #6d421f;
  border-radius: 3px;
  background:
    repeating-linear-gradient(3deg, rgba(61, 31, 12, .06) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #c89553, #8c562b);
  box-shadow: inset 0 0 0 1px rgba(244, 205, 132, .2), 0 7px 9px rgba(16, 6, 2, .5);
  color: #241106;
  font: 700 15px/1.25 Georgia, "Times New Roman", serif;
  text-align: center;
  text-shadow: 0 1px rgba(234, 198, 132, .32);
  transform: rotate(-1.8deg);
}

.guest-landing-page .guest-library-sign::before,
.guest-landing-page .guest-library-sign::after {
  position: absolute;
  bottom: 100%;
  width: 1px;
  height: 32px;
  background: #6e4a27;
  box-shadow: 1px 0 rgba(24, 11, 4, .55);
  content: "";
  transform-origin: bottom;
}

.guest-landing-page .guest-library-sign::before { left: 25%; transform: rotate(19deg); }
.guest-landing-page .guest-library-sign::after { right: 25%; transform: rotate(-19deg); }

.guest-landing-page .guest-open-rules-row {
  overflow: visible;
  filter: none;
}

.guest-landing-page .guest-open-rules-books {
  --guest-library-book-width: min(clamp(11px, 1.35vw, 22px), calc((100% - 17px) / 18));
  --guest-bookstop-contact: calc((169.166672px * 203 / 1774) * 6);
  justify-content: flex-start;
  gap: 1px;
  height: 100%;
  min-height: 0;
  padding: 0 0 0 var(--guest-bookstop-contact);
  box-sizing: border-box;
  overflow: visible;
}

.guest-landing-page .guest-open-rules-books .bookshelf-book {
  --guest-shelf-count: max(1, var(--shelf-items));
  flex-basis: min(var(--book-spine-width, 58px), calc(100% / var(--guest-shelf-count)));
  width: min(var(--book-spine-width, 58px), calc(100% / var(--guest-shelf-count)));
  max-width: calc(100% / var(--guest-shelf-count));
}

.guest-landing-page .guest-open-rules-mock-book {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  box-sizing: border-box;
  flex: 0 0 var(--guest-library-book-width);
  width: var(--guest-library-book-width);
  min-width: 0;
  max-width: var(--guest-library-book-width);
  height: var(--mock-book-height, 82%);
  border: 1px solid rgba(12, 7, 3, .88);
  border-radius: 2px 2px 0 0;
  background:
    linear-gradient(90deg, rgba(255, 224, 141, .12), transparent 28%, rgba(0, 0, 0, .25) 88%),
    linear-gradient(180deg, #31513e, #15251d);
  box-shadow:
    inset 1px 0 rgba(242, 201, 116, .18),
    inset -2px 0 rgba(0, 0, 0, .35),
    1px 0 1px rgba(0, 0, 0, .45);
  pointer-events: none;
}

.guest-landing-page .guest-open-rules-mock-book::before,
.guest-landing-page .guest-open-rules-mock-book::after {
  position: absolute;
  right: 1px;
  left: 1px;
  height: 1px;
  background: rgba(211, 167, 81, .72);
  box-shadow: 0 1px rgba(27, 13, 4, .7);
  content: "";
}

.guest-landing-page .guest-open-rules-mock-book::before { top: 9%; }
.guest-landing-page .guest-open-rules-mock-book::after { bottom: 9%; }

.guest-landing-page .guest-open-rules-mock-book__label {
  position: absolute;
  top: 17%;
  right: 25%;
  bottom: 17%;
  left: 25%;
  overflow: hidden;
  color: #d8ad5f;
  font: 700 clamp(3px, .34vw, 7px)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .06em;
  text-align: center;
  text-orientation: mixed;
  text-shadow: 0 1px rgba(0, 0, 0, .8);
  writing-mode: vertical-rl;
}

.guest-landing-page .guest-open-rules-mock-book--tone-2 {
  background: linear-gradient(90deg, rgba(255, 224, 141, .1), transparent 28%, rgba(0, 0, 0, .26) 88%), linear-gradient(180deg, #653326, #2f1510);
}
.guest-landing-page .guest-open-rules-mock-book--tone-3 {
  background: linear-gradient(90deg, rgba(255, 224, 141, .1), transparent 28%, rgba(0, 0, 0, .26) 88%), linear-gradient(180deg, #243f55, #111e29);
}
.guest-landing-page .guest-open-rules-mock-book--tone-4 {
  background: linear-gradient(90deg, rgba(255, 224, 141, .1), transparent 28%, rgba(0, 0, 0, .26) 88%), linear-gradient(180deg, #684a22, #30200e);
}
.guest-landing-page .guest-open-rules-mock-book--tone-5 {
  background: linear-gradient(90deg, rgba(255, 224, 141, .1), transparent 28%, rgba(0, 0, 0, .26) 88%), linear-gradient(180deg, #44314e, #211725);
}
.guest-landing-page .guest-open-rules-mock-book--tone-6 {
  background: linear-gradient(90deg, rgba(255, 224, 141, .1), transparent 28%, rgba(0, 0, 0, .26) 88%), linear-gradient(180deg, #4e552e, #222613);
}

/* Approved Guest bookshelf affordance: lift only the hovered book anchor. */
.guest-landing-page .bookshelf-book:not(.is-examining),
.guest-landing-page .guest-open-rules-mock-book {
  pointer-events: auto;
  transition: transform 200ms ease, filter .3s ease, z-index 0s 200ms;
}

.guest-landing-page .bookshelf-book:hover:not(.is-examining),
.guest-landing-page .guest-open-rules-mock-book:hover {
  transform: perspective(700px) translateY(-10px) translateZ(28px) scale(1.06);
  filter: drop-shadow(0 10px 8px rgba(10, 5, 2, .62)) !important;
  z-index: 3;
}

.guest-landing-page .guest-open-rules-mock-book[data-guest-product-preview] { cursor: pointer; }
.guest-product-preview-link { position: absolute; inset: 0; z-index: 5; display: block; border-radius: inherit; color: inherit; text-decoration: none; cursor: pointer; pointer-events: auto; }
.guest-product-preview-link:focus-visible { outline: 2px solid #f0cf7a; outline-offset: 2px; }
.guest-product-preview { width: min(680px, calc(100vw - 32px)); max-width: 680px; padding: 0; border: 1px solid rgba(225,188,95,.7); border-radius: 8px; background: #1b1811; color: #f6e8c4; box-shadow: 0 24px 80px rgba(0,0,0,.65); }
.guest-product-preview::backdrop { background: rgba(5,7,5,.72); }
.guest-product-preview__panel { position: relative; padding: clamp(22px,4vw,38px); }
.guest-product-preview__close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 1px solid rgba(225,188,95,.45); border-radius: 50%; background: rgba(0,0,0,.22); color: #f6e8c4; font-size: 1.65rem; line-height: 1; cursor: pointer; }
.guest-product-preview__summary { display: grid; grid-template-columns: minmax(130px,190px) 1fr; gap: clamp(20px,4vw,34px); align-items: center; color: inherit; text-decoration: none; }
.guest-product-preview__cover { width: 100%; aspect-ratio: 3/4; object-fit: contain; border: 1px solid rgba(225,188,95,.45); background: #2a2419; }
.guest-product-preview__copy { display: grid; gap: 9px; }
.guest-product-preview__kicker { margin: 0; color: #d9b661; font: 700 .72rem/1.2 "Trebuchet MS",sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.guest-product-preview__copy h2 { margin: 0; color: #fff1c9; font: 700 clamp(1.5rem,3vw,2.3rem)/1.1 Georgia,serif; }
.guest-product-preview__creator, .guest-product-preview__price, .guest-product-preview__copy > p:last-of-type { margin: 0; }
.guest-product-preview__creator { color: #d8c79e; }
.guest-product-preview__price { color: #e9c875; font-weight: 700; }
.guest-product-preview__copy > p:last-of-type { color: #e4dac1; line-height: 1.55; }
.guest-product-preview__summary .button { justify-self: start; margin-top: 6px; }
@media (max-width:560px) { .guest-product-preview__summary { grid-template-columns: 1fr; } .guest-product-preview__cover { max-width: 170px; } }

@media (min-width: 1024px) {
  html.trg-magical-shelves .guest-landing-page [data-magical-bookshelf] .is-magical-pending {
    visibility: hidden;
    opacity: 0;
  }
  html.trg-magical-shelves .guest-landing-page [data-magical-bookshelf] .is-magical-revealed {
    visibility: visible;
    opacity: 1;
    animation: guest-book-materialize 420ms cubic-bezier(.2, .8, .24, 1) both;
  }
  .guest-landing-page .guest-library-bay .shop-wall-shelf-level--upper .guest-library-empty-row {
    box-sizing: border-box;
    padding-right: calc((169.166672px * 203 / 1774) * 6);
  }
  .guest-landing-page .guest-open-rules-books {
    --guest-library-book-width: calc(100% / 18);
    flex-direction: row-reverse;
    gap: 0;
  }
  .guest-landing-page .guest-bookshelf-magic {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
  }
  .guest-landing-page .shop-wall-fixed-cabinet.has-magical-effect {
    position: relative;
    z-index: 7;
  }
  .guest-landing-page .guest-bookshelf-magic__flash {
    position: absolute;
    left: calc(var(--flash-left) + var(--flash-x));
    bottom: calc(var(--flash-bottom) - var(--flash-y));
    width: var(--flash-size);
    height: var(--flash-size);
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--flash-color) 30%, transparent 72%);
    box-shadow: 0 0 8px color-mix(in srgb, var(--flash-color) 72%, transparent);
    transform: translate(-50%, -50%) scale(.2);
    animation: guest-magic-flash var(--flash-duration) ease-out both;
  }
  .guest-landing-page .guest-bookshelf-magic i {
    position: absolute;
    left: calc(var(--spark-left) - 2px);
    bottom: calc(var(--spark-bottom) - 2px);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: hsl(calc(var(--magic-hue) + 48), 100%, 76%);
    box-shadow: 0 0 6px 2px hsla(var(--magic-hue), 100%, 70%, .8);
    animation: guest-magic-spark 700ms ease-out both;
  }
  .guest-landing-page .guest-magic-replay {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    padding: 8px 12px;
    border: 1px solid #cda75c;
    border-radius: 3px;
    background: #173023;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
    color: #f0ddb0;
    font: 700 12px/1.2 Georgia, "Times New Roman", serif;
    cursor: pointer;
  }
  .guest-landing-page .guest-magic-replay:hover,
  .guest-landing-page .guest-magic-replay:focus-visible {
    border-color: #efd58d;
    outline: 2px solid rgba(239, 213, 141, .45);
    outline-offset: 2px;
  }
}

@keyframes guest-book-materialize {
  0% { opacity: 0; filter: brightness(2.1) saturate(1.7); }
  55% { opacity: 1; filter: brightness(1.45) saturate(1.3); }
  100% { opacity: 1; filter: none; }
}

@keyframes guest-magic-flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes guest-magic-spark {
  0% { opacity: 0; transform: rotate(var(--spark-angle)) translateX(0) scale(.5); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--spark-angle)) translateX(var(--spark-distance)) scale(.15); }
}

@media (max-width: 1023px) {
  .guest-landing-page .guest-open-rules-books {
    --guest-bookstop-contact: calc((98px * 203 / 1774) * 6);
  }
  .guest-landing-page .guest-library-sign {
    width: min(270px, 70%);
    margin-top: 24px;
    padding: 7px 10px;
    font-size: 11px;
  }
  .guest-landing-page .guest-library-sign::before,
  .guest-landing-page .guest-library-sign::after { height: 20px; }
}

@media (max-width: 699px) {
  .guest-landing-page .guest-open-rules-books {
    --guest-bookstop-contact: calc((84px * 203 / 1774) * 6);
  }
  body:has(.guest-landing-page) .site-nav {
    justify-content: center;
    gap: 2px;
  }
  body:has(.guest-landing-page) .site-header .site-nav a {
    flex: 0 0 auto;
    padding: 8px 4px;
    font-size: clamp(.62rem, 2.8vw, .72rem);
    letter-spacing: 0;
    white-space: nowrap;
  }
  body:has(.guest-landing-page) .site-header .site-nav a[href="/support.html"] {
    display: flex;
  }
  body:has(.guest-landing-page) .site-header .site-nav a[href="/account.html"] {
    font-size: clamp(.62rem, 2.8vw, .72rem);
  }
  body:has(.guest-landing-page) .site-header .site-nav a[href="/account.html"]::after {
    content: none;
  }
  .guest-landing-page .guest-library-sign {
    width: min(235px, 68%);
    margin-top: 20px;
    padding: 6px 8px;
    font-size: 9px;
  }
  .guest-landing-page .guest-library-sign::before,
  .guest-landing-page .guest-library-sign::after { height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .guest-landing-page .guest-library-sign { scroll-behavior: auto; }
  .guest-landing-page .bookshelf-book:not(.is-examining) {
    transition: none;
  }
  .guest-landing-page .guest-open-rules-mock-book {
    transition: none;
  }
  .guest-landing-page .bookshelf-book:hover:not(.is-examining),
  .guest-landing-page .guest-open-rules-mock-book:hover {
    transform: none;
  }
  .guest-landing-page [data-magical-bookshelf] .is-magical-revealed,
  .guest-landing-page .guest-bookshelf-magic,
  .guest-landing-page .guest-bookshelf-magic__flash,
  .guest-landing-page .guest-bookshelf-magic i { animation: none !important; }
}
