/* The supplied mobile artwork is shown at its native proportions. */
.mobile-artwork-picture { display: contents; }
.mobile-artwork-reader,
.mobile-readable,
.mobile-hero-ordered,
.mobile-cta-label,
.mobile-inside-preorder,
.night-mobile-heading-art,
.night-mobile-photo-frame,
.mobile-author-heading-ornament,
.mobile-author-photo { display: none; }
.night-mobile-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.preorder-gold-divider { display: none; }
.site-footer { flex-wrap: nowrap; }
.site-footer p,
.site-footer .contact-trigger { white-space: nowrap; }
.faq-eye-ornament {
  display: block;
  width: 42px;
  height: 42px;
  margin: 2px auto 0;
}

@media (max-width:760px), (max-width:1024px) and (hover:none) and (pointer:coarse) {
  html { scroll-padding-top: 14px; }
  body { font-size: 16px; line-height: 1.58; }
  .mobile-artwork-picture { display: contents; }
  .mobile-readable,
  .mobile-hero-ordered { display: none !important; }

  .hero.uploaded-banner,
  .night.uploaded-night,
  .archetypes,
  .inside.uploaded-inside,
  .rose.uploaded-rose,
  .about.uploaded-author {
    position: relative;
    display: block !important;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    overflow: visible;
    background: none !important;
    text-align: initial;
  }
  .night.uploaded-night { padding-bottom: 24px !important; }
  .night.uploaded-night > .banner-image-frame { display: none !important; }
  .rose.uploaded-rose {
    padding-bottom: 12px !important;
    background-color: #fce5d7 !important;
  }
  .night .night-mobile-heading-art {
    display: block;
    width: 100%;
    aspect-ratio: 1122 / 270;
    background-image: url("assets/mobile-approved/night-heading.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto;
  }
  .night .night-mobile-story {
    position: relative;
    display: block;
    background-color: var(--paper);
    background-image:
      url("assets/mobile-approved/night-rails-left.png"),
      url("assets/mobile-approved/night-rails-right.png");
    background-position: left top, right top;
    background-repeat: repeat-y, repeat-y;
    background-size: 6.42% auto, 6.42% auto;
  }
  .night .night-mobile-photo-frame {
    display: block;
    width: min(calc(100% - 112px), 440px);
    margin: 18px auto 26px;
    padding: 4px;
    border: 3px double #b98a45;
    background: var(--paper);
    line-height: normal;
  }
  .night .night-mobile-photo {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
  }
  .night .night-mobile-copy {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 clamp(48px, 7.2vw, 72px) !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
  }
  .night .night-mobile-copy p {
    margin: 0 auto 18px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.5;
  }
  .night .night-mobile-copy p:last-child { margin-bottom: 0; }
  .hero.uploaded-banner::before,
  .hero.uploaded-banner::after,
  .night.uploaded-night::before,
  .night.uploaded-night::after,
  .archetypes::before,
  .archetypes::after,
  .inside.uploaded-inside::before,
  .inside.uploaded-inside::after,
  .rose.uploaded-rose::before,
  .rose.uploaded-rose::after,
  .about.uploaded-author::before,
  .about.uploaded-author::after {
    display: none !important;
    content: none !important;
  }
  /* Existing copy remains available to assistive technology without adding layout. */
  .banner-accessible-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  .hero > .banner-image-frame,
  .banner-image-frame {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    line-height: 0;
  }
  .uploaded-banner-image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
  }

  /* Optional artwork zoom targets stay below all preorder hotspots. */
  .mobile-artwork-reader {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: transparent;
    cursor: zoom-in;
    touch-action: manipulation;
  }
  .about .author-full-photo { display: none !important; }
  .about .mobile-artwork-reader { display: none !important; }
  .about.uploaded-author > .banner-image-frame { display: none !important; }
  .about.uploaded-author > .banner-accessible-title {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 28px 22px 32px !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
  }
  .about.uploaded-author {
    background-color: var(--paper) !important;
    background-image:
      url("assets/mobile-approved/author-leaves-left.png"),
      url("assets/mobile-approved/author-leaves-right.png") !important;
    background-position: left top, right top !important;
    background-repeat: repeat-y, repeat-y !important;
    background-size: 14.26% auto, 14.26% auto !important;
  }
  .about.uploaded-author > .banner-accessible-title > h2 {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto 5px !important;
    padding: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-align: center;
  }
  .about .mobile-author-heading-ornament {
    display: block;
    width: min(70%, 260px);
    height: auto;
    margin: 0 auto 16px;
  }
  .about .mobile-author-photo {
    display: block;
    width: min(75%, 480px);
    height: auto;
    margin: 0 auto 28px;
    border: 0;
    border-radius: 0;
    object-fit: contain;
    box-shadow: none;
  }
  .about.uploaded-author > .banner-accessible-title > p {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 19px;
    color: inherit;
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.5;
    text-align: left;
  }
  .about.uploaded-author > .banner-accessible-title > p:last-child { margin-bottom: 0; }

  /* CTA positions are measured from the supplied native mobile PNGs. */
  .hero .banner-preorder,
  .inside .mobile-inside-preorder,
  .rose .bonus-rose-preorder {
    position: absolute;
    z-index: 2;
    display: block;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: transparent;
    font-size: 0;
    cursor: pointer;
    touch-action: manipulation;
  }
  .hero .banner-preorder {
    left: 50%;
    top: 60.13%;
    width: 60.52%;
    height: max(44px, 7.70%);
    transform: translate(-50%, -50%);
  }
  .inside .mobile-inside-preorder {
    left: 50%;
    top: 91.30%;
    width: 53.56%;
    height: max(44px, 7.28%);
    transform: translate(-50%, -50%);
  }
  .rose .bonus-rose-preorder {
    left: 50%;
    top: min(95.76%, calc(100% - max(22px, 3.11%)));
    width: 76.74%;
    height: max(44px, 6.21%);
    transform: translate(-50%, -50%);
  }

  /* Keep the native lower preorder form, FAQ, and footer order and styling. */
  .preorder {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 31px 22px 36px;
  }
  .preorder-art { order: 1; width: min(100%, 340px); min-height: 0; margin: 16px auto 0; }
  .bottom-cover { width: 100%; max-width: 100%; height: auto; }
  .preorder-copy { display: contents; }
  .preorder-copy > h2 { order: 0; }
  .preorder-copy > .preorder-gold-divider {
    display: block;
    order: -1;
    width: 78px;
    height: 1px;
    margin: 0 auto 14px;
    background: #b98a45;
  }
  .preorder-copy > :not(h2) { order: 2; }
  .preorder-copy > * {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 560px;
    align-self: center;
    text-align: center;
  }
  .preorder-copy h2 { font-size: clamp(36px, 10vw, 42px); }
  .preorder-copy > .script-subtitle { margin: 12px 0 24px; font-size: 31px; font-weight: 700; }
  .preorder .pill-button,
  .preorder .submit-button {
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid #b98a45;
    border-radius: 999px;
    background: #022d26;
    color: #f4eee0;
    box-shadow: inset 0 0 0 1px rgba(198, 149, 64, .24);
    font-size: 18px;
    letter-spacing: .055em;
  }
  .preorder .pill-button { gap: 12px; }
  .preorder .button-star {
    flex-basis: 15px;
    width: 15px;
    height: 15px;
    background: linear-gradient(135deg, #f1d292, #b07a2b, #e9bd68);
    clip-path: polygon(50% 0,56% 37%,85% 15%,64% 44%,100% 50%,64% 56%,85% 85%,56% 64%,50% 100%,44% 64%,15% 85%,36% 56%,0 50%,36% 44%,15% 15%,44% 36%);
  }
  .preorder .pill-button:hover,
  .preorder .submit-button:hover { background: #022d26; color: #f4eee0; }
  .preorder-message,
  .form-message { min-height: 1.5em; font-size: 18px; }
  .form-intro { margin-top: 18px; padding-top: 14px; text-align: center; }
  .form-intro p { color: #153f38; font-size: 19px; }
  .bonus-form { grid-template-columns: 1fr; gap: 11px; margin-top: 13px; }
  .form-field label { margin-bottom: 4px; font-size: 18px; }
  .bonus-form input {
    min-height: 48px;
    height: 48px;
    padding: 0 12px;
    border-radius: 0;
    font-size: 18px;
  }
  .preorder .submit-button { justify-self: stretch; margin-top: 4px; }

  .faq { padding: 34px 22px 38px; background-color: #fae2d5; }
  .faq-heading { margin-bottom: 19px; }
  .faq-heading h2 { font-size: 39px; }
  .faq-list { width: 100%; }
  .faq-list summary { min-height: 48px; padding: 12px 38px 12px 4px; font-size: 20px; }
  .faq-list summary:after { top: 10px; font-size: 24px; }
  .faq-list details p { padding: 0 14px 14px 4px; font-size: 18px; }
  .site-footer {
    gap: 8px;
    padding: 8px 10px;
    flex-wrap: nowrap;
    justify-content: space-between;
    background: #022d26;
    color: #f4eee0;
    white-space: nowrap;
  }
  .site-footer p,
  .contact-trigger {
    flex: 0 0 auto;
    margin: 0;
    color: #f4eee0;
    font-size: clamp(11px, 3.2vw, 14px);
    letter-spacing: 0;
    white-space: nowrap;
  }
  .site-footer p { min-width: 0; }
  .contact-trigger {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 8px 4px;
  }

  #artworkReader {
    box-sizing: border-box;
    width: calc(100vw - 16px);
    max-width: 1240px;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #c8a566;
    border-radius: 12px;
    background: #f7eee4;
    color: #173d36;
    box-shadow: 0 18px 64px rgba(35, 42, 34, .28);
  }
  #artworkReader[open] { display: flex; flex-direction: column; }
  #artworkReader::backdrop { background: rgba(27, 40, 34, .68); }
  .reader-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }
  .reader-header h2 {
    min-width: 0;
    margin: 0;
    color: #123d37;
    font: 500 clamp(23px, 6vw, 34px)/1.05 var(--serif);
  }
  .reader-controls { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; margin-bottom: 9px; }
  .reader-header button,
  .reader-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 15px;
    border: 1px solid #b98a45;
    border-radius: 999px;
    background: #022d26;
    color: #f4eee0;
    font: 500 18px/1 var(--serif);
    cursor: pointer;
  }
  #readerViewport {
    width: 100%;
    flex: 1 1 auto;
    max-height: calc(100dvh - 150px);
    min-height: 120px;
    overflow: auto;
    overscroll-behavior: contain;
    background: #e9dfd0;
    border: 1px solid rgba(174, 132, 63, .42);
    touch-action: pan-x pan-y;
  }
  #readerImage {
    display: block;
    width: var(--reader-width, 1600px);
    max-width: none;
    height: auto;
    margin: 0 auto;
  }
}
