/* Mobile catalogue: a centred, straight-on single page.
   Pages flip in their own footprint instead of hanging from an off-screen spine. */
@media (max-width: 800px) {
  .catalog-main {
    padding: 14px max(12px, env(safe-area-inset-right)) 24px max(12px, env(safe-area-inset-left));
  }

  .book-stage {
    width: 100%;
    height: min(70svh, 680px);
    min-height: 470px;
    overflow: visible;
    perspective: 1800px;
  }

  .book {
    --page-w: min(92vw, 520px);
    --page-h: min(66svh, 680px);
    width: var(--page-w);
    height: var(--page-h);
    margin-inline: auto;
    transform: none;
    isolation: isolate;
    border-radius: 3px 9px 9px 3px;
    background: #d8d2c7;
    box-shadow:
      0 2px 0 #eee9df,
      0 5px 0 #bdb6aa,
      0 8px 0 #ece7dc,
      0 22px 34px rgba(0, 0, 0, .46);
  }

  .book::before {
    content: "";
    position: absolute;
    z-index: 70;
    pointer-events: none;
    left: 0;
    top: 0;
    bottom: 0;
    width: 13px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(90deg, rgba(0,0,0,.42), rgba(255,255,255,.14) 34%, rgba(0,0,0,.12) 68%, transparent);
    mix-blend-mode: multiply;
  }

  .book::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: 12px;
    right: -7px;
    top: 7px;
    bottom: -9px;
    width: auto;
    transform: none;
    border-radius: 0 8px 9px 0;
    background:
      repeating-linear-gradient(180deg,#f4f0e7 0 1px,#cfc8bc 1px 2px,#ebe5da 2px 4px);
    box-shadow: 7px 8px 18px rgba(0,0,0,.28);
  }

  .sheet {
    left: 0;
    width: 100%;
    transform-origin: center center;
    visibility: hidden;
    transform: none !important;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .34));
  }

  .sheet.is-mobile-current { visibility: visible; z-index: 50; }
  .sheet.is-turned { transform: none; }
  .sheet .page { visibility: hidden; backface-visibility: hidden; }
  .sheet .page.is-mobile-active {
    visibility: visible;
    transform: none;
    border-radius: 2px 8px 8px 2px;
    box-shadow:
      inset 12px 0 18px rgba(36,25,13,.12),
      inset -2px 0 0 rgba(255,255,255,.44);
    animation: cataloguePageIn .58s cubic-bezier(.2,.72,.2,1) both;
  }

  .catalog-controls {
    width: 100%;
    max-width: 520px;
    margin-top: 10px;
  }

  .page { min-width: 0; min-height: 0; }
  .page :where(h1,h2,p,address,nav,figure) { max-width: 100%; }
  .page :where(img) { max-width: 100%; }

  .club h2 { margin: 18px 0 10px; font-size: clamp(64px, 18vw, 92px); }
  .club p { margin-block: 0 10px; font-size: 11px; }
  .club-names span { padding: 8px 0; font-size: 15px; }

  .product-index h2 { margin: 20px 0; font-size: clamp(42px, 11vw, 62px); }
  .product-index a { padding: 13px 0; gap: 10px; }
  .product-index b { font-size: 27px; }
  .product-index span { font-size: 8px; }

  .prints { grid-template-rows: auto minmax(0,1fr); }
  .prints header h2 { margin: 12px 0 16px; }
  .print-grid { height: 100%; }
  .print-grid img { min-height: 0; }

  .tees h2 { margin: 18px 0 12px; }
  .tee-row { min-height: 0; }
  .tees > a { margin-top: 12px; }

  .soulbox { grid-template-rows: 58% 42%; }
  .soulbox > div { padding: 20px 6%; }
  .soulbox h2 { top: -30px; }
  .soulbox p { margin: 8px 0; font-size: 10px; }

  .contact-page > img { width: 34%; margin: 3% auto; }
  .contact-page h2 { font-size: clamp(42px, 11vw, 62px); }
  .contact-page address { margin-top: 14px; font-size: 10px; }

  .colophon img { width: 42%; margin: 8% 0; }
  .colophon p { margin: 7px 0; font-size: 8px; }
  .colophon span { font-size: 30px; }

  .cover .cover-copy { inset: 5% 6% auto; }
  .cover .cover-copy > img { width: 39%; margin-bottom: clamp(22px, 4.5svh, 38px); }
  .cover .cover-copy h1 { font-size: clamp(62px, 18vw, 84px); line-height: .76; }
  .cover .cover-copy p { margin-top: 18px; font-size: 9px; }
  .cover > span { right: 6% !important; bottom: 5% !important; font-size: 8px !important; }
}

@keyframes cataloguePageIn {
  0% {
    opacity: .18;
    transform-origin: left center;
    transform: perspective(1400px) rotateY(-16deg) translateX(4%);
    filter: brightness(.76);
  }
  68% { opacity: 1; transform: perspective(1400px) rotateY(1.6deg) translateX(0); }
  100% { opacity: 1; transform: perspective(1400px) rotateY(0) translateX(0); filter: brightness(1); }
}

@media (max-width: 430px) {
  .catalog-header { padding-inline: 14px; }
  .catalog-brand img { width: 102px; }
  .catalog-main { padding-inline: 10px; }
  .catalog-meta { font-size: 8px; margin-bottom: 9px; }
  .book-stage { height: min(69svh, 630px); min-height: 440px; }
  .book { --page-w: min(94vw, 430px); --page-h: min(64svh, 620px); }
  .page { padding: clamp(18px, 5vw, 24px); }
  .catalog-controls { gap: 6px; }
}

@media (max-width: 360px) {
  .catalog-header-actions { gap: 8px; }
  .catalog-sound, .catalog-exit { font-size: 6px; letter-spacing: .1em; }
  .book { --page-w: 94vw; --page-h: min(63svh, 570px); }
  .catalog-controls { grid-template-columns: 40px 1fr 40px; }
  .catalog-page-status { font-size: 8px; letter-spacing: .08em; }
  .concept-page__copy { padding: 14px 16px; }
  .concept-page__copy h2 { font-size: 40px; }
  .concept-page__copy p { font-size: 9px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .catalog-meta, .catalog-hint { display: none; }
  .catalog-main { padding-block: 8px; }
  .book-stage { height: calc(100svh - 126px); min-height: 300px; }
  .book { --page-h: calc(100svh - 126px); --page-w: min(58vw, 480px); }
  .catalog-controls { position: fixed; right: 10px; bottom: 10px; width: min(360px,46vw); z-index: 80; }
}
