/* Every visual rule is phone-scoped. Tablet and desktop retain their baseline. */
@media (max-width: 600px), (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .book-detail .detail-intro > .photo-gallery-quick-stat.mobile-gallery-entry {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0;
    min-height: 48px !important;
    margin: .7rem 0 !important;
    padding: .8rem 1rem !important;
    border: 1px solid #c79b45 !important;
    border-radius: 7px !important;
    background: linear-gradient(145deg, #fff0bd, #e7bd68 65%, #d29b43) !important;
    color: #302317 !important;
    box-shadow: inset 0 1px 0 #fff8da, 0 3px 10px #291b1726 !important;
    font: 700 clamp(.95rem, 3.8vw, 1.1rem)/1.3 Georgia, 'Times New Roman', serif;
    text-align: center !important;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .book-detail .detail-intro > .mobile-gallery-entry::after {
    content: none !important;
  }
  .book-detail .detail-intro .photo-gallery-quick-stat.is-empty {
    display: none !important;
  }
  .book-detail .detail-intro > .mobile-gallery-entry:focus-visible {
    outline: 3px solid #fff0bb;
    outline-offset: 3px;
  }
  /* A phone landscape row can be short even when its columns are wide.
     Let the protected prompt determine the frame height. */
  .visual-gallery-page .gallery-thumbnail.has-spoiler-blanket .gallery-thumbnail-media {
    aspect-ratio: auto;
  }
  /* Leave the owner toolbar intact; allow every last-row control to scroll above it. */
  .visual-gallery-page {
    padding-bottom: calc(1.5rem + var(--mobile-gallery-toolbar-clearance, 0px) + env(safe-area-inset-bottom));
  }
  .visual-gallery-page button {
    scroll-margin-bottom: calc(1rem + var(--mobile-gallery-toolbar-clearance, 0px));
  }
  .book-detail:not(.series-detail) .detail-intro > h1,
  .book-detail:not(.series-detail) .detail-intro > .byline {
    text-align: center !important;
  }
  .book-detail:not(.series-detail) .private-detail-cover-badges {
    flex-wrap: nowrap;
    justify-content: center;
    gap: .4rem;
  }
  .book-detail:not(.series-detail) .private-detail-cover-badges .completed-file-seal {
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    border-width: 2px;
    font-size: .85rem;
    box-shadow: 0 2px 5px #0006, 0 0 0 2px #4a2b04b3, 0 0 8px #ffd34f80;
  }
  .book-detail:not(.series-detail) .private-detail-cover-badges .completed-file-ribbon {
    padding: 3px 6px !important;
    font-size: .62rem;
    letter-spacing: .05em;
    white-space: nowrap;
  }
  /* This is a clickable submission action, not underlined body text. */
  .book-detail .detail-stat-grid .art-drop-quick-stat > small {
    display: block;
    border: 0;
    padding: 0;
    margin-top: .3rem;
  }
  /* Make the existing form opener visibly actionable on phones. */
  .book-detail .detail-stat-grid .art-drop-quick-stat {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    padding: .8rem;
    border: 1px solid #b88634;
    border-radius: 7px;
    background: #f8edcf;
    min-height: 48px;
    cursor: pointer;
  }
  .book-detail .art-drop-quick-title strong {
    display: block;
    text-decoration: underline;
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
  }
  .book-detail .art-drop-quick-title strong::after {
    content: ' →';
    white-space: nowrap;
  }

  .art-drop-dialog .art-drop-legal-note { text-align: center; }
  .book-detail .detail-intro > .reader-detail-save {
    margin-inline: auto;
    width: 100%;
  }
  .book-detail .reader-detail-save .reader-card-preview-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  .book-detail .reader-detail-save .reader-card-mark-label {
    text-align: center;
  }
}
