/* Mobile layouts for the content collections. Desktop rules remain in their own files. */
@media (max-width: 980px) {
  /* Existing film and director layouts already stack; make their controls finger friendly. */
  .film-search input,
  .director-search input,
  .director-tools select { font-size: 16px; min-height: 44px; }
  .director-tools > .director-reset { min-height: 44px; }
  .film-section-nav a,
  .director-section-nav a { flex: 0 0 auto; min-height: 44px; }
  .film-lightbox-close,
  .film-lightbox-controls button,
  .film-lightbox-download { min-height: 44px; display: inline-flex; align-items: center; }
  .film-lightbox-title { overflow-wrap: anywhere; }

  /* Book covers and the embedded reader fit the available page width. */
  .book-teaser { padding-top: 48px; padding-bottom: 60px; }
  .book-teaser-body,
  .book-index-feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .book-teaser-cover,
  .book-index-cover { height: 380px; padding: 30px; }
  .book-teaser-copy { padding: 0; }
  .book-teaser-copy h3 { font-size: 36px; margin: 16px 0; }
  .book-teaser-stats { flex-wrap: wrap; gap: 16px 28px; margin: 24px 0; }
  .book-teaser-compact { grid-template-columns: 82px minmax(0, 1fr); gap: 18px; padding: 25px 0; margin: 25px 0 35px; }
  .book-compact-cover { height: 122px; padding: 10px; }
  .book-teaser-compact h2 { font-size: 26px; }
  .book-teaser-compact h2 > span { display: block; margin: 5px 0 0; line-height: 1.6; }
  .book-teaser-compact p { font-size: 13px; }
  .book-compact-meta { flex-wrap: wrap; gap: 8px 16px; }
  .book-teaser-compact > .text-link { grid-column: 1 / -1; justify-self: start; }
  .book-index-heading { padding-top: 118px; padding-bottom: 38px; }
  .book-index-heading h1 { font-size: 42px; }
  .book-index-heading h1 > sup { top: 8px; margin-left: 10px; }
  .book-index-heading > p { font-size: 14px; }
  .book-index-feature { padding-top: 38px; padding-bottom: 46px; }
  .book-index-copy h2 { font-size: 36px; margin: 15px 0 20px; }
  .book-index-description { font-size: 14px; }
  .book-facts { gap: 16px; grid-template-columns: 1fr 1fr; margin: 24px 0; }
  .book-facts > div:last-child { grid-column: 1 / -1; }
  .book-facts dd { white-space: normal; font-size: 15px; }
  .book-primary-link { width: 100%; gap: 18px; font-size: 14px; }
  .book-directory { padding-bottom: 55px; }
  .book-directory .section-heading { align-items: start; flex-wrap: wrap; }
  .book-directory-hint { line-height: 1.8; }
  .book-group-row { grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 15px; padding: 23px 0; }
  .book-group-row h3 { font-size: 26px; }
  .book-group-row h3 > sup { margin-left: 8px; top: 5px; }
  .book-group-page { grid-column: 2; grid-row: 2; margin-top: -6px; }
  .book-group-arrow { grid-column: 3; grid-row: 1 / 3; }
  .book-group-row:hover { padding-left: 0; padding-right: 0; }
  .book-reader-heading { padding-top: 115px; padding-bottom: 22px; }
  .book-reader-heading-row { display: block; }
  .book-reader-heading h1 { font-size: 31px; line-height: 1.45; }
  .book-reader-heading-note { flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; line-height: 1.8; }
  .book-reader-heading-note a { display: inline-flex; align-items: center; min-height: 44px; }
  .book-reader-shell { padding-bottom: 40px; }
  .book-reader-frame-wrap { min-width: 0; height: 82vh; height: 82dvh; min-height: 560px; max-height: 980px; }
  .book-reader-caption { flex-direction: column; gap: 8px; }

  /* Character filters, two-column portraits and full-width version tabs. */
  .character-teaser { padding-top: 48px; padding-bottom: 60px; }
  .character-teaser-intro { font-size: 14px; margin-bottom: 26px; }
  .character-teaser-grid,
  .character-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
  .character-entry { grid-template-columns: minmax(0, 1fr); gap: 25px; padding: 30px 0; margin: 30px 0; }
  .character-entry-copy h2 { font-size: 30px; }
  .character-entry-portraits { gap: 10px; }
  .character-index-heading h1 { font-size: 42px; line-height: 1.4; }
  .character-index-heading .page-heading-row > p { max-width: none; font-size: 15px; }
  .character-stats { flex-wrap: wrap; gap: 12px 20px; margin-top: 26px; line-height: 1.8; }
  .character-stats > span:last-child { width: 100%; margin-left: 0; font-size: 11px; }
  .character-collection { padding-top: 28px; padding-bottom: 48px; }
  .character-collection-top { flex-wrap: wrap; gap: 14px; padding-bottom: 18px; }
  .character-collection-top > .eyebrow { width: 100%; }
  .character-search { width: 100%; margin-left: 0; }
  .character-search > span { white-space: nowrap; }
  .character-search input { width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
  .character-selected-filter { min-height: 44px; }
  .character-selected-filter input { width: 18px; height: 18px; }
  .character-tag-filters { padding: 20px 0; }
  .character-filter-row { align-items: start; gap: 12px; margin-bottom: 14px; }
  .character-filter-row > span { width: 30px; padding-top: 13px; }
  .character-filter-row > div { gap: 7px; min-width: 0; }
  .character-filter-row button { min-height: 44px; padding: 9px 12px; }
  .character-filter-summary { align-items: start; gap: 12px; }
  .character-filter-summary > button { flex-shrink: 0; min-height: 44px; }
  .character-pagination { justify-content: space-between; gap: 8px; padding: 20px 0; }
  .character-pagination > span { min-width: 0; font-size: 10px; }
  .character-pagination > button { flex-shrink: 0; min-height: 44px; }
  .character-grid .character-card h2 { font-size: 21px; min-height: 0; }
  .character-grid .character-card-meta { flex-wrap: wrap; gap: 3px; font-size: 10px; }
  .character-grid .character-card-meta > span:last-child { text-align: left; }
  .character-card-tags > button { min-height: 36px; display: inline-flex; align-items: center; }
  .character-choice { min-height: 44px; padding: 10px 12px; }
  .character-state-tools > div { flex-wrap: wrap; gap: 10px 22px; }
  .character-state-tools p { flex-basis: 100%; }
  .character-state-tools button { min-height: 44px; }
  .character-detail-heading { padding-top: 118px; padding-bottom: 30px; }
  .character-detail-heading .page-kicker { margin-bottom: 26px; }
  .character-detail-heading h1 { font-size: 42px; }
  .character-detail-byline { flex-wrap: wrap; gap: 10px 18px; font-size: 12px; line-height: 1.8; }
  .character-ai-label { margin-left: 0; }
  .character-detail-content { padding-top: 25px; }
  .character-detail-tags-row { align-items: start; gap: 14px; }
  #character-edit-tags { min-height: 44px; }
  .character-tag-editor { padding: 20px 16px; }
  .character-tag-editor fieldset { display: block; }
  .character-tag-editor legend { float: none; width: auto; margin-bottom: 9px; }
  .character-tag-editor fieldset > div { gap: 6px 16px; }
  .character-tag-editor label { min-height: 38px; }
  .character-tag-editor input { width: 18px; height: 18px; }
  .character-tag-editor-actions { flex-wrap: wrap; gap: 12px; }
  .character-tag-editor-actions > button { min-height: 44px; }
  #character-reset-tags { margin-left: 0; }
  .character-model-tabs { display: block; }
  .character-model-tabs-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .character-model-tab { min-width: 0; flex-direction: column; align-items: start; gap: 9px; padding: 9px; }
  .character-model-tab > img { width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .character-model-tab > span { padding-right: 0; gap: 5px; }
  .character-model-tab strong { white-space: normal; line-height: 1.6; }
  .character-model-tabs > span { display: block; margin-top: 12px; font-size: 11px; }
  .character-full-figure figcaption { display: block; }
  .character-full-figure figcaption > div { flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
  .character-full-figure figcaption a { display: inline-flex; align-items: center; min-height: 44px; white-space: normal; }
  .character-full-frame > p { left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; font-size: 12px; }
  .character-prompt-section { padding-top: 32px; margin-top: 32px; }
  .character-prompt-heading { flex-wrap: wrap; gap: 14px; }
  .character-prompt-heading h2 { font-size: 30px; }
  .character-prompt-heading > span { margin-left: 0; }
  .character-prompt-heading > div:last-child { width: 100%; gap: 25px; }
  .character-prompt-heading button,
  .character-prompt-heading a { min-height: 44px; display: inline-flex; align-items: center; }
  #character-prompt-text { padding: 22px 18px; font-size: 14px; max-height: 70vh; }
  .character-detail-navigation { flex-wrap: wrap; gap: 10px 20px; }
  .character-detail-navigation > div { width: 100%; justify-content: space-between; gap: 18px; }
  .character-detail-navigation a { display: inline-flex; align-items: center; min-height: 44px; }
  .character-toast { max-width: calc(100vw - 32px); white-space: normal; line-height: 1.8; text-align: center; }

  /* Skill navigation becomes a compact grid and cards keep their full controls. */
  .sk-page { --bkh-gutter: var(--gutter, 24px); }
  .sk-heading { padding-top: 118px; padding-bottom: 30px; }
  .sk-heading .page-kicker { margin-bottom: 24px; }
  .sk-heading-row { display: block; }
  .sk-heading h1 { font-size: 48px; white-space: normal; }
  .sk-heading h1 sup { top: 12px; margin-left: 12px; }
  .sk-heading-row > p { font-size: 15px; margin-top: 18px; padding-bottom: 0; }
  .sk-heading-foot { flex-wrap: wrap; gap: 10px 20px; line-height: 1.8; }
  .sk-heading-foot > a { min-height: 44px; }
  .sk-catalog { padding-top: 26px; padding-bottom: 55px; }
  .sk-search-row { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 22px; }
  .sk-search { flex: none; }
  .sk-search > button { min-width: 44px; min-height: 44px; }
  .sk-search > kbd { display: none; }
  .sk-suggestions { flex-wrap: wrap; gap: 5px 18px; font-size: 12px; }
  .sk-suggestions > button { min-height: 44px; }
  .sk-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .sk-categories > button { font-size: 13px; white-space: normal; align-items: center; gap: 4px; line-height: 1.6; }
  .sk-categories > button sup { flex-shrink: 0; }
  .sk-toolbar { flex-wrap: wrap; gap: 14px; margin: 25px 0; }
  .sk-result-heading { flex-wrap: wrap; gap: 6px 12px; white-space: normal; }
  .sk-result-heading h2 { font-size: 28px; }
  .sk-controls { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .sk-controls select { min-height: 44px; max-width: 100%; font-size: 16px; }
  .sk-official { min-height: 44px; }
  .sk-official input { width: 18px; height: 18px; }
  .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 22px; }
  .sk-card-top { gap: 12px; }
  .sk-card-meta { flex-wrap: wrap; justify-content: end; gap: 6px 12px; }
  .sk-card h3 { font-size: 25px; overflow-wrap: anywhere; }
  .sk-description { min-height: 0; }
  .sk-fit-line { flex-wrap: wrap; gap: 8px 12px; }
  .sk-tags { min-height: 0; }
  .sk-tags > button { min-height: 36px; }
  .sk-details > summary { min-height: 44px; }
  .sk-card-footer { flex-wrap: wrap; gap: 8px 18px; }
  .sk-card-footer > a { min-height: 44px; }
  .sk-card-footer > button { min-height: 44px; padding: 10px 14px; }
  .sk-guide { padding-top: 40px; margin-top: 44px; }
  .sk-guide-head { grid-template-columns: 1fr; gap: 10px; margin-bottom: 28px; }
  .sk-guide h2 { font-size: 34px; }
  .sk-guide-head > p { text-align: left; line-height: 1.8; }
  .sk-guide-grid { grid-template-columns: 1fr; gap: 28px; }
  .sk-guide-links { flex-wrap: wrap; gap: 8px 20px; line-height: 1.9; }
  .sk-guide-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .sk-dialog { width: calc(100vw - 28px); max-width: none; max-height: calc(100dvh - 28px); padding: 22px 18px; }
  .sk-dialog h2 { font-size: 29px; }
  .sk-dialog-top > button { flex-shrink: 0; width: 44px; height: 44px; }
  #skills-dialog-message { font-size: 16px; }
  .sk-dialog summary { min-height: 44px; }
  .sk-dialog textarea { font-size: 16px; height: 220px; padding: 12px; }
  .sk-dialog-actions { flex-wrap: wrap; }
  .sk-primary,
  .sk-secondary { min-height: 44px; }
  .sk-teaser { padding-bottom: 60px; }
  .sk-teaser-compact { padding: 35px 0; margin-bottom: 35px; }
  .sk-teaser-body { grid-template-columns: 1fr; gap: 25px; }
  .sk-teaser-body > p { max-width: none; font-size: 14px; }
  .sk-teaser-icons { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 18px; }
  .sk-teaser-icons > a { white-space: normal; line-height: 1.7; }

  /* Motion library controls wrap above a two-column gallery. */
  body[data-page="motion"] { min-width: 0; }
  .motion-heading h1 { font-size: 44px; }
  .motion-heading .page-heading-row > p { max-width: none; font-size: 15px; }
  .motion-heading-foot { align-items: start; flex-direction: column; gap: 10px; margin-top: 24px; }
  .motion-heading-foot > span { font-size: 11px; white-space: normal; }
  .motion-library { padding-bottom: 50px; }
  .motion-root .toolbar { position: static; flex-direction: column; align-items: stretch; gap: 15px; padding: 18px 0; }
  .motion-root .filters { flex-wrap: wrap; gap: 7px; }
  .motion-root .filter { min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .motion-root .toolbar-actions { justify-content: space-between; gap: 18px; }
  .motion-root .search { flex: 1; min-width: 0; width: auto; height: 44px; }
  .motion-root .search input { font-size: 16px; }
  .motion-root kbd { display: none; }
  .motion-root .play-toggle { height: 44px; }
  .motion-root .results-heading { flex-wrap: wrap; gap: 8px 20px; line-height: 1.8; }
  .motion-root .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .motion-root .card-title { font-size: 25px; }
  .motion-root .card-description { min-height: 0; }
  .motion-root .card-copy { min-height: 44px; }
  .motion-library-foot { align-items: start; flex-direction: column; gap: 12px; }
  .motion-library-foot > span { white-space: normal; }
  .motion-library-foot button { min-height: 44px; }
  .motion-root dialog { width: calc(100vw - 24px); max-width: none; max-height: calc(100dvh - 24px); }
  .motion-root .detail-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .motion-root .detail-visual { padding: 20px; }
  .motion-root .icon-button { width: 44px; height: 44px; flex-shrink: 0; }
  .motion-root .detail-canvas-wrap { margin-top: 22px; }
  .motion-root .detail-name { margin-top: 22px; }
  .motion-root .detail-name h2 { font-size: 31px; }
  .motion-root .detail-navigation { padding-top: 12px; }
  .motion-root .detail-navigation button { min-height: 44px; }
  .motion-root .detail-content { padding: 25px 20px; max-height: none; }
  .motion-root .prompt-tabs { gap: 22px; margin-top: 20px; }
  .motion-root .prompt-tabs button { min-height: 44px; padding-bottom: 10px; }
  .motion-root #prompt-text { min-height: 220px; max-height: 60vh; padding: 16px; font-size: 13px; }
  .motion-root .primary-copy { min-height: 48px; }
  .motion-root .download-example { min-height: 44px; display: inline-flex; align-items: center; }
  .motion-root #license-dialog { width: calc(100vw - 24px); padding: 22px 20px; }
  .motion-root #license-dialog h2 { font-size: 28px; }
  .motion-root #motion-license-text { overflow-wrap: anywhere; }
  .motion-teaser { padding-top: 48px; padding-bottom: 60px; }
  .motion-teaser-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .motion-teaser-compact { padding-top: 30px; padding-bottom: 35px; }

  /* Inspiration cards retain readable body text and original-image controls. */
  .ideas-heading { padding-top: 118px; padding-bottom: 30px; }
  .ideas-heading .page-kicker { margin-bottom: 25px; }
  .ideas-heading-row { grid-template-columns: 1fr; gap: 18px; }
  .ideas-heading h1 { font-size: 44px; white-space: normal; }
  .ideas-heading-row > p { max-width: none; font-size: 14px; }
  .ideas-heading-foot { flex-direction: column; align-items: start; gap: 14px; margin-top: 22px; padding-top: 15px; }
  .ideas-heading-foot nav { flex-wrap: wrap; gap: 2px 22px; font-size: 13px; }
  .ideas-heading-foot a { min-height: 44px; display: inline-flex; align-items: center; }
  .ideas-page .insight-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; padding-block: 28px; }
  .ideas-page .insight-lead { grid-column: 1 / -1; }
  .ideas-page .insight-lead > strong { font-size: 26px; }
  .ideas-page .insight-lead > strong br { display: none; }
  .ideas-page .collection-stat { padding-left: 12px; gap: 8px; }
  .ideas-page .collection-stat b { font-size: 35px; }
  .ideas-page .collection-stat > span { font-size: 11px; }
  .ideas-page .insight-period { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; white-space: normal; }
  .ideas-page .explore { padding-top: 38px; padding-bottom: 55px; }
  .ideas-page .section-heading { display: block; margin-bottom: 26px; }
  .ideas-page .section-heading h2 { font-size: 32px; }
  .ideas-page .section-heading > p { margin-top: 15px; font-size: 13px; }
  .ideas-page .search-and-sort { flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
  .ideas-page .search-field { flex-basis: 100%; }
  .ideas-page .search-field kbd { display: none; }
  .ideas-page .sort-field { margin-left: auto; }
  .ideas-page select { font-size: 16px; max-width: 100%; }
  .ideas-page .category-filters { gap: 0 20px; }
  .ideas-page .category-filter { font-size: 13px; padding-bottom: 12px; }
  .ideas-page .filter-footer { flex-wrap: wrap; gap: 12px; margin: 18px 0 25px; }
  .ideas-page .view-filters { flex-wrap: wrap; gap: 2px 18px; }
  .ideas-page .case-grid,
  .ideas-page .designer-grid,
  .ideas-page .extension-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 22px; }
  .ideas-page .case-title,
  .ideas-page .designer-card h3,
  .ideas-page .extension-card h3 { font-size: 25px; }
  .ideas-page .card-kicker { flex-wrap: wrap; gap: 5px 12px; }
  .ideas-page .source-link { display: inline-flex; align-items: center; min-height: 44px; }
  .ideas-page .text-card-decoration,
  .ideas-page .designer-text-visual { padding: 20px; }
  .ideas-page .text-card-decoration > p,
  .ideas-page .designer-text-visual > p { font-size: 23px; max-width: 100%; }
  .ideas-page .designer-section { padding-block: 45px 55px; }
  .ideas-page .designer-section-intro { flex-direction: column; align-items: start; gap: 10px; margin-bottom: 28px; }
  .ideas-page .designer-picks-count { font-size: 11px; margin-left: 10px; }
  .ideas-page .designer-card-source a { min-height: 44px; display: inline-flex; align-items: center; }
  .ideas-page .extensions-section { padding-block: 50px 55px; }
  .ideas-page .extension-disclaimer { max-width: none; margin-top: 16px; }
  .ideas-page .extension-sources > a { min-height: 40px; display: inline-flex; align-items: center; }
  .ideas-page .research-note { grid-template-columns: 1fr; gap: 28px; padding-block: 45px 55px; }
  .ideas-page .research-note h2 { font-size: 33px; margin-top: 14px; }
  .ideas-page .research-star { display: none; }
  .ideas-page .evidence-key { grid-template-columns: 1fr; gap: 10px; }
  .ideas-page .evidence-key > span { justify-self: start; }
  .ideas-page .evidence-key > p { margin-bottom: 10px; }
  .ideas-page .lightbox { width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .ideas-page .lightbox[open] { display: flex; flex-direction: column; }
  .ideas-page .lightbox-bar { flex: 0 0 auto; height: auto; padding: 16px; flex-wrap: wrap; gap: 12px; }
  .ideas-page .lightbox-bar > div:first-child { min-width: 0; width: 100%; }
  .ideas-page .lightbox h2 { font-size: 21px; overflow-wrap: anywhere; }
  .ideas-page .lightbox-tools { width: 100%; justify-content: space-between; gap: 12px; }
  .ideas-page .lightbox-tools a { min-height: 44px; display: inline-flex; align-items: center; }
  .ideas-page .lightbox-stage { flex: 1 1 0; min-height: 120px; height: auto; padding: 15px 12px 65px; }
  .ideas-page .lightbox-arrow { top: auto; bottom: 12px; transform: none; }
  .ideas-page .lightbox-arrow.prev { left: 16px; }
  .ideas-page .lightbox-arrow.next { right: 16px; }
  .ideas-page .lightbox-bottom { height: auto; flex: 0 0 auto; padding: 12px 16px; flex-wrap: wrap; gap: 8px; font-size: 11px; line-height: 1.8; }
  .ideas-page .toast { max-width: calc(100vw - 32px); width: max-content; line-height: 1.8; text-align: center; }
  .ideas-teaser { padding-bottom: 60px; }
  .ideas-teaser-compact { padding-bottom: 40px; }
  .ideas-teaser-row { grid-template-columns: 1fr; gap: 25px; }
  .ideas-teaser-title { font-size: 32px; margin-bottom: 16px; }
  .ideas-teaser-images { gap: 12px; }

  /* The comparison archive uses chapter chips, stacked samples and scrollable tables. */
  .pk-page { min-width: 0; --pk-gap: 22px; }
  .pk-page .pk-heading { padding-top: 118px; padding-bottom: 30px; }
  .pk-page .pk-heading > .eyebrow { position: static; margin: 20px 0 12px; }
  .pk-page .pk-heading-row { display: block; }
  .pk-page .pk-heading-row h1 { font-size: 44px; white-space: normal; line-height: 1.3; }
  .pk-page .pk-heading-row > p { max-width: none; margin-top: 18px; font-size: 14px; }
  .pk-page .pk-heading-foot { flex-wrap: wrap; gap: 12px; }
  .pk-page .pk-heading-foot a { min-height: 44px; }
  .pk-page .pk-layout { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-top: 24px; padding-bottom: 55px; }
  .pk-page .pk-sidebar { position: static; max-height: none; padding-right: 0; overflow: visible; }
  .pk-page .nav-caption { margin-bottom: 10px; }
  .pk-page #pk-nav { display: flex; flex-wrap: wrap; gap: 7px; }
  .pk-page .nav-link { border: 1px solid var(--line); padding: 10px 12px; min-height: 44px; gap: 6px; font-size: 12px; }
  .pk-page .nav-link .nav-index { flex-basis: auto; font-size: 10px; }
  .pk-page .nav-link.active::before { width: 2px; }
  .pk-page .nav-divider { flex-basis: 100%; height: 0; margin: 0; }
  .pk-page .pk-side-note { margin-top: 15px; padding-top: 12px; font-size: 11px; }
  .pk-page .pk-side-note br { display: none; }
  .pk-page .pk-view-heading { flex-wrap: wrap; align-items: start; gap: 12px; }
  .pk-page .pk-view-heading h2 { font-size: 30px; }
  .pk-page .ranking { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .pk-page .rank-label { font-size: 9px; letter-spacing: 0; flex-wrap: wrap; gap: 4px; }
  .pk-page .rank-label > span { width: 100%; margin-left: 0; font-size: 10px; }
  .pk-page .rank-card :is(h2, h3) { font-size: 18px; white-space: normal; min-height: 2.8em; }
  .pk-page .rank-score { font-size: 32px; }
  .pk-page .rank-score small { display: block; margin-left: 0; margin-top: 5px; font-size: 10px; }
  .pk-page .rank-total { font-size: 10px; }
  .pk-page .rank-art { aspect-ratio: 1.4; }
  .pk-page .rank-art-caption { font-size: 10px; }
  .pk-page .rank-art-caption > span:last-child { white-space: normal; }
  .pk-page .section-line { display: block; }
  .pk-page .section-line h2 { font-size: 27px; }
  .pk-page .section-line p { margin-top: 8px; text-align: left; }
  .pk-page .panel { max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .pk-page .matrix-key { flex-direction: column; gap: 6px; }
  .pk-page .overview-notes,
  .pk-page .rubric,
  .pk-page .method-grid,
  .pk-page .source-grid { grid-template-columns: minmax(0, 1fr); }
  .pk-page .rubric > div { padding: 18px; }
  .pk-page .rubric > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .pk-page .score-strip { grid-template-columns: minmax(0, 1fr); }
  .pk-page .strip-cell,
  .pk-page .strip-cell:first-child,
  .pk-page .strip-cell:last-child { padding: 14px 0; }
  .pk-page .strip-cell + .strip-cell { border-left: 0; border-top: 1px solid var(--line); }
  .pk-page .strip-cell h2 { font-size: 13px; }
  .pk-page .strip-cell strong { font-size: 30px; }
  .pk-page .branch-jump { column-gap: 20px; }
  .pk-page .branch-jump a { min-height: 44px; }
  .pk-page .branch-heading { flex-wrap: wrap; gap: 5px 16px; }
  .pk-page .branch-heading h2 { font-size: 27px; }
  .pk-page .reference { flex-wrap: wrap; gap: 12px; padding: 15px; }
  .pk-page .reference > div { flex: 1; min-width: 0; }
  .pk-page .reference .reference-open { min-height: 44px; }
  .pk-page .comparison { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pk-page .model-title > span:first-child { font-size: 25px; }
  .pk-page .model-title .branch-score { font-size: 25px; }
  .pk-page .prompt summary { padding: 15px 18px; }
  .pk-page .prompt-content { padding: 0 18px 20px; }
  .pk-page .copy-prompt { float: none; margin: 0 0 15px; min-height: 44px; }
  .pk-page .prompt-text { font-size: 15px; }
  .pk-page .report-body { font-size: 15px; }
  .pk-page .report-body h2 { font-size: 28px; }
  .pk-page .report-body h3 { font-size: 25px; }
  .pk-page .report-body table { font-size: 12px; }
  .pk-page .limits { padding: 20px 18px; }
  .pk-page .limits h2 { font-size: 25px; }
  .pk-page #pk-viewer { inset: 10px; width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .pk-page .viewer-top { gap: 15px; padding: 14px; }
  .pk-page #pk-close-viewer { flex-basis: 44px; width: 44px; min-height: 44px; }
  .pk-page .viewer-toolbar { flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; }
  .pk-page .viewer-toolbar button,
  .pk-page .viewer-toolbar a { min-height: 44px; display: inline-flex; align-items: center; }
  .pk-page .viewer-toolbar > span { margin-left: auto; }
  .pk-page .viewer-bottom { flex-wrap: wrap; gap: 8px 14px; padding: 9px 14px; }
  .pk-page .viewer-bottom button { min-height: 44px; }
  .pk-page .viewer-bottom > span { order: 3; width: 100%; font-size: 10px; }
  .pk-page #pk-next-image { margin-left: auto; }
  .pk-teaser { padding-block: 45px 60px; }
  .pk-teaser-compact { padding-block: 30px 35px; }
  .pk-teaser-body { grid-template-columns: 1fr; gap: 25px; }
  .pk-teaser-models { flex-wrap: wrap; gap: 12px 22px; font-size: 18px; }
}

@media (max-width: 540px) {
  .film-prompt { padding: 20px; }
  .film-lightbox-controls { gap: 12px; }
  .film-lightbox-controls button { padding-inline: 10px; }
  .director-lightbox .film-lightbox-bar { flex-wrap: wrap; }
  .director-lightbox .film-lightbox-title { width: 100%; }
  .director-lightbox .film-lightbox-bar > div { width: 100%; }
  .book-teaser-cover,
  .book-index-cover { height: 340px; }
  .book-index-heading h1 { font-size: 36px; }
  .book-teaser-copy h3,
  .book-index-copy h2 { font-size: 32px; }
  .book-teaser-compact { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; }
  .book-teaser-compact h2 { font-size: 23px; }
  .book-group-row { grid-template-columns: 22px minmax(0, 1fr) 36px; gap: 10px; }
  .book-group-row h3 { font-size: 23px; }
  .book-group-arrow { width: 36px; height: 36px; }
  .character-index-heading h1 { font-size: 35px; }
  .character-detail-heading h1 { font-size: 37px; }
  .character-entry-copy h2 { font-size: 28px; }
  .character-prompt-heading h2 { font-size: 28px; }
  .character-detail-navigation > span { width: 100%; }
  .sk-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .sk-heading h1 { font-size: 42px; }
  .sk-card-top { gap: 20px; }
  .sk-card-meta { gap: 12px; }
  .sk-dialog-actions { flex-direction: column; }
  .sk-dialog-actions > button { width: 100%; }
  .motion-heading h1 { font-size: 38px; }
  .motion-root .gallery { grid-template-columns: minmax(0, 1fr); }
  .motion-root .card-description { -webkit-line-clamp: unset; }
  .motion-root .detail-topline { gap: 10px; }
  .motion-root .detail-topline > span { overflow-wrap: anywhere; }
  .ideas-heading h1 { font-size: 36px; }
  .ideas-page .case-grid,
  .ideas-page .designer-grid,
  .ideas-page .extension-grid { grid-template-columns: minmax(0, 1fr); }
  .ideas-page .section-heading h2 { font-size: 29px; }
  .ideas-page .designer-picks-count { display: inline-block; margin-left: 0; margin-top: 6px; }
  .ideas-page .text-card-decoration > p,
  .ideas-page .designer-text-visual > p { font-size: 25px; }
  .ideas-teaser-images { gap: 8px; }
  .ideas-teaser-images figcaption { font-size: 11px; }
  .pk-page .pk-heading-row h1 { font-size: 38px; }
  .pk-page .ranking { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pk-page .rank-info { position: relative; padding: 15px 110px 15px 0; }
  .pk-page .rank-label { font-size: 11px; flex-wrap: nowrap; }
  .pk-page .rank-label > span { width: auto; margin-left: 8px; }
  .pk-page .rank-card :is(h2, h3) { font-size: 25px; min-height: 0; }
  .pk-page .rank-score { position: absolute; top: 22px; right: 0; font-size: 38px; }
  .pk-page .rank-score small { text-align: right; font-size: 11px; }
  .pk-page .rank-total { font-size: 11px; }
  .pk-page .rank-art { aspect-ratio: 16 / 6; }
  .pk-page .rank-art-caption { font-size: 11px; }
}

@media (max-width: 980px) and (hover: none) {
  .motion-root .preview-label,
  .pk-page .image-button .view-image { opacity: 1; transform: none; }
}

/* Narrow desktop and landscape tablet windows also fit the embedded assets. */
@media (min-width: 981px) and (max-width: 1199px) {
  body[data-page="motion"] { min-width: 0; }
  .motion-root .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-reader-frame-wrap { min-width: 0; }
}
