/* Phone layouts: retain every example and keep the first book first. */
.book-reader>#reader-zoom { position: static; display: block; margin: 0 auto 12px; }
@media (max-width: 640px) {
  html { scroll-padding-top: 80px; }
  html:has(.book-reader[open]) { overflow: hidden; scrollbar-gutter: auto; }
  .chapters { --chapter-width: calc(100% - 36px); font-size: 16px; }
  .chapters .site-header { min-height: 64px; padding-inline: 12px; gap: 7px; }
  .chapters .site-header .brand { font-size: .98rem; gap: 7px; }
  .chapters .site-header>.menu-button { width: 42px; height: 44px; border-color: #fff3; }
  .site-header>.menu-button[aria-expanded="true"] { background: #ffffff14; }
  .site-header>.menu-button[aria-expanded="true"]>span[aria-hidden] { display: none; }
  .site-header>.menu-button[aria-expanded="true"]::before { content: "×"; font: 30px/1 Arial,sans-serif; }
  .site-header>.main-nav { top: 64px; left: 0; right: 0; width: 100%; justify-self: stretch; padding: 12px; max-height: calc(100dvh - 64px); gap: 4px; border-radius: 0 0 22px 22px; box-shadow: 0 18px 28px #03191e35; }
  .site-header>.main-nav a { min-height: 48px; padding: 11px 14px; border-radius: 12px; font-size: 16px; }
  .chapters .main-nav a[aria-current="page"] { background: #ffffff0d; text-decoration: none; }
  .site-header>.main-nav .nav-cta { background: var(--gold); color: var(--ink-deep); border: 0; margin-top: 6px; text-align: center; font-weight: 750; }
  .language-switch a { min-height: 40px; }

  .home-page .hero-copy { padding: 28px 20px 12px; }
  .home-page .hero .eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: .13em; margin-bottom: 14px; }
  .home-page .hero h1 { font-size: clamp(2.3rem, 10.8vw, 2.85rem); line-height: 1.04; letter-spacing: -.045em; }
  .home-page:lang(en) .hero h1 { font-size: clamp(2.05rem, 9.7vw, 2.65rem); }
  .home-page .hero-lede { margin-top: 18px; font-size: 15px; line-height: 1.65; color: #e2e7df; }
  .home-page .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
  .home-page .hero-actions :is(.button,.text-link) { width: 100%; min-height: 50px; padding: 10px 11px; border-radius: 15px; font-size: 14px; line-height: 1.3; text-align: center; }
  .home-page .hero-actions .text-link { display: flex; align-items: center; justify-content: center; border: 1px solid #fff4; text-decoration: none; background: #ffffff06; }
  .home-page .hero-facts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; margin-top: 22px; padding-top: 14px; }
  .home-page .hero-facts li { min-width: 0; }
  .home-page .hero-facts strong { font-size: 11px; line-height: 1.4; font-weight: 600; color: #cddbd6; }
  .home-page .hero-visual { height: clamp(260px, 78vw, 370px); min-height: 0; }
  .home-page .hero-visual img { object-position: 58% 62%; }
  .home-page .hero-visual::after { background: linear-gradient(180deg,#06272c,transparent 26%),linear-gradient(0deg,#06272c44,transparent 22%); }

  .chapters .section { padding: 46px 20px; }
  .chapters .section-heading { margin-bottom: 24px; }
  .chapters .section-heading h2 { font-size: clamp(1.95rem,8.3vw,2.4rem); line-height: 1.08; overflow-wrap: normal; }
  .chapters .section-heading>p:last-child { margin-top: 14px; font-size: 15px; line-height: 1.6; }
  .chapters .eyebrow { font-size: 10px; line-height: 1.55; letter-spacing: .12em; }
  .home-styles .style-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(80vw,310px); align-items: stretch; gap: 14px; margin-inline: -20px; padding: 3px 20px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #b8a88a transparent; }
  .home-styles .style-card { display: flex; flex-direction: column; min-width: 0; border-radius: 20px; scroll-snap-align: start; box-shadow: 0 8px 20px #253b3510; }
  .home-styles .style-cover { height: auto; aspect-ratio: 1.12; }
  .home-styles .style-cover img { height: 100%; object-fit: contain; }
  .home-styles .style-copy { display: flex; flex: 1; flex-direction: column; padding: 17px; }
  .home-styles .style-label { font-size: 10px; line-height: 1.5; margin-bottom: 9px; }
  .home-styles .style-card h3 { font-size: 23px; line-height: 1.14; margin-bottom: 12px; }
  .home-styles .style-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding-top: 0; margin-top: auto; font-size: 13px; }
  .home-styles .style-actions :is(button,a) { min-height: 44px; }
  .section-end-link { margin-top: 18px; }
  .section-end-link .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }

  .showcase-toolbar { gap: 12px; margin-bottom: 20px; }
  .showcase-toolbar>a { font-size: 14px; min-height: 44px; display: flex; align-items: center; }
  .chapters .age-filters { padding: 4px; gap: 2px; }
  .chapters .age-filters button { min-height: 44px; min-width: 0; padding: 8px 16px; font-size: 14px; }
  .home-examples .portfolio-book { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); align-items: start; padding: 15px; gap: 15px; border-radius: 20px; margin-bottom: 14px; }
  .home-examples .portfolio-cover { border-radius: 10px; overflow: hidden; box-shadow: 0 8px 18px #173c3520; }
  .home-examples .portfolio-cover img { aspect-ratio: 4/5; object-fit: contain; background: #e9dfce; }
  .home-examples .portfolio-copy { padding: 0; }
  .home-examples .portfolio-copy .eyebrow { font-size: 10px; line-height: 1.5; margin-bottom: 8px; }
  .home-examples .portfolio-copy h3 { font-size: clamp(1.2rem,5.5vw,1.45rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 10px; }
  .home-examples .portfolio-copy>p:not(.eyebrow) { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
  .home-examples .portfolio-copy>.button { padding: 8px 12px; min-height: 44px; font-size: 13px; line-height: 1.3; border-radius: 12px; }

  .chapter { padding-block: 32px; }
  .chapter-heading { margin-bottom: 24px; }
  .chapter-heading h1 { font-size: clamp(2.3rem,10vw,2.9rem); line-height: 1.05; }
  .chapter-heading>p:last-child:not(.eyebrow) { font-size: 15px; line-height: 1.6; margin-top: 14px; }
  .catalog-toolbar { gap: 14px; margin-bottom: 28px; }
  .catalog-jumps { gap: 18px; }
  .catalog-jumps a { display: flex; align-items: center; min-height: 40px; font-size: 14px; }
  .collection-heading h2 { font-size: 28px; line-height: 1.12; }
  .collection-heading>p { font-size: 14px; line-height: 1.55; margin-top: 12px; }
  .book-collection { margin-bottom: 36px; scroll-margin-top: 80px; }
  .shelf { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .shelf-card { display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 14px; padding: 13px; border-radius: 18px; align-items: start; }
  .jacket { aspect-ratio: 4/5; padding: 4px; border-radius: 9px; }
  .jacket-age { position: static; display: block; padding: 5px 3px; margin-top: 7px; border-radius: 7px; font-size: 10px; line-height: 1.35; text-align: center; }
  .jacket-caption { padding: 1px 0 0; }
  .jacket-caption>p:first-child { font-size: 10px; line-height: 1.4; margin-bottom: 6px; }
  .jacket-caption h3 { font-size: clamp(1.18rem,5.2vw,1.4rem); line-height: 1.15; }
  .jacket-caption .book-summary { font-size: 14px; line-height: 1.5; margin: 9px 0 8px; }
  .jacket-actions { flex-direction: column; align-items: start; gap: 0; font-size: 13px; }
  .jacket-actions :is(a,button) { min-height: 44px; line-height: 1.35; }
  .demo-books { gap: 14px; }
  .demo-book { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); border-radius: 18px; }
  .demo-book-cover { padding: 12px; }
  .demo-book-copy { padding: 15px 14px 14px 0; }
  .demo-book h3 { font-size: 22px; line-height: 1.13; margin-bottom: 10px; }
  .demo-book-style { font-size: 11px; margin-bottom: 8px; }
  .demo-book-copy>p:not(.eyebrow,.demo-book-style) { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
  .demo-book-actions { gap: 0; flex-direction: column; align-items: start; }
  .demo-book-actions .button { font-size: 13px; padding: 9px 12px; min-height: 44px; }
  .demo-book-actions>a { font-size: 13px; }
  .catalog-invite { padding: 23px; border-radius: 20px; gap: 18px; }
  .catalog-invite h2 { font-size: 29px; line-height: 1.12; }
  .catalog-invite p:last-child { font-size: 15px; }
  .catalog-invite>.button { width: 100%; min-height: 48px; font-size: 15px; }

  .order-paths { gap: 14px; }
  .order-path { padding: 21px; border-radius: 18px; }
  .order-path h2 { font-size: 28px; line-height: 1.1; }
  .order-path>p:not(.eyebrow) { font-size: 15px; line-height: 1.6; margin: 12px 0 18px; }
  .order-path .button { min-height: 46px; font-size: 14px; }
  .extra-path { font-size: 14px; }
  .order-steps { display: grid; gap: 10px; font-size: 14px; }
  .order-brief { padding-top: 30px; gap: 22px; }
  .order-brief h2 { font-size: 32px; }
  .brief-intro>p:not(.eyebrow),.brief-intro>a { font-size: 15px; }
  .order-form-panel .story-form { padding: 19px 16px; gap: 18px; border-radius: 20px; }
  .story-form>label,.optional-fields label { font-size: 14px; line-height: 1.45; gap: 8px; }
  .story-form input[type="text"],.story-form select,.story-form textarea { font-size: 16px; line-height: 1.5; padding: 12px; border-radius: 11px; min-height: 48px; }
  .optional-fields { padding: 13px; border-radius: 12px; }
  .optional-fields summary { font-size: 14px; line-height: 1.5; }
  .story-form .submit-button { min-height: 50px; border-radius: 13px; font-size: 15px; }
  .form-hint { font-size: 12px; line-height: 1.5; }
  .order-form-panel .order-draft { border-radius: 18px; padding: 20px 16px; }
  .order-draft .result-actions { width: 100%; }
  .order-draft .result-actions>.button { width: 100%; font-size: 14px; }
  .faq-list summary { padding: 21px 36px 21px 0; font-size: 20px; line-height: 1.3; }
  .faq-list summary::after { top: 14px; }
  .faq-list p { font-size: 15px; line-height: 1.65; }
  .chapters .chapter-footer { padding: 24px 20px; gap: 14px; flex-direction: column; align-items: start; font-size: 14px; }

  .book-reader[open] { display: flex; flex-direction: column; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; overflow: hidden; }
  .reader-header { flex: none; position: static; padding: max(12px,env(safe-area-inset-top)) 13px 10px; gap: 12px; }
  .reader-header h2 { font-size: 17px; line-height: 1.2; }
  .reader-header .eyebrow { font-size: 9px; line-height: 1.4; letter-spacing: .1em; margin-bottom: 5px; }
  .reader-toolbar { flex: none; width: 100%; max-width: none; margin: 0; padding: 6px 13px 10px; gap: 8px; }
  .reader-toolbar button { font-size: 13px; padding-inline: 9px; }
  .reader-stage { flex: 1 1 auto; min-height: 0; max-height: none; padding: 0 8px 8px; overscroll-behavior: contain; }
  .reader-stage>img { width: 100%; max-height: none; }
  .book-reader>#reader-zoom { flex: none; min-height: 44px; font-size: 12px; margin: 3px auto 6px; }
  .reader-thumbnails { flex: none; gap: 6px; padding: 6px 12px; justify-content: start; }
  .reader-thumbnails button { width: 44px; min-height: 44px; }
  .reader-footer { flex: none; padding: 8px 13px max(10px,env(safe-area-inset-bottom)); gap: 0; }
  .reader-footer p { display: none; }
  .reader-footer>.button { width: 100%; min-height: 44px; font-size: 14px; border-radius: 13px; }
}
@media (max-width: 360px) {
  .chapters .site-header { padding-inline: 10px; gap: 5px; }
  .chapters .site-header .brand { font-size: .88rem; gap: 4px; }
  .chapters .site-header>.menu-button { width: 38px; }
  .site-header .language-switch a { min-width: 24px; font-size: 10px; }
  .home-page .hero-copy { padding-inline: 18px; }
  .home-page .hero-actions { grid-template-columns: 1fr; gap: 8px; }
  .home-page .hero-actions :is(.button,.text-link) { font-size: 14px; padding-inline: 12px; }
  .home-page .hero-actions .text-link { min-height: 44px; }
  .home-examples .portfolio-book { padding: 12px; gap: 12px; }
  .home-examples .portfolio-copy .eyebrow { letter-spacing: .05em; }
  .shelf-card { padding: 11px; gap: 12px; }
  .demo-book h3 { font-size: 20px; }
  .demo-book-cover { padding: 8px; }
  .demo-book-copy { padding-right: 12px; }
}
