/* Phone editorial system. Independent of the desktop compositions.
   Keep the reading scale in rem, then tune the layout rather than zooming a page. */
@media (max-width: 760px), (max-width: 932px) and (pointer: coarse) and (max-height: 500px) {
  :root {
    --gutter: clamp(15px, 4.1vw, 22px);
    --m-s1: 4px; --m-s2: 7px; --m-s3: 10px; --m-s4: 14px; --m-s5: 18px; --m-s6: 22px;
    --m-hero: clamp(1.625rem, 7.3vw, 2rem);
    --m-section: clamp(1.125rem, 4.85vw, 1.375rem);
    --m-card: clamp(.9375rem, 3.95vw, 1.0625rem);
    --m-feature: clamp(1.125rem, 4.85vw, 1.375rem);
    --m-body: .875rem; --m-meta: .6875rem; --m-label: .75rem; --m-control: .8125rem;
    --type-section: var(--m-section);
    --type-winner: var(--m-feature);
    --type-category: .9rem;
    --type-dialog: 1rem;
    --type-meta: var(--m-meta);
    --type-control: var(--m-control);
    --type-utility: var(--m-meta);
  }
  .section-heading h2,.mood-collections .section-heading h2 { font-size: var(--m-section); line-height: 1.13; }
  .archive-card h3 { font-size: var(--m-card); line-height: 1.18; margin: 4px 0 4px; }
  .archive-card-copy p:last-of-type { font-size: var(--m-label); line-height: 1.46; }
  .archive-card-copy { padding-top: 8px; }
  .archive-directory { padding-block: var(--m-s6); }
  .archive-directory + .archive-directory { padding-top: 4px; }
  .archive-directory .section-heading { margin-bottom: var(--m-s3); }
  .archive-card-grid { gap: var(--m-s5) var(--m-s3); }
  .section-aside { line-height: 1.35; text-wrap: pretty; }
  /* Let the still and title introduce each home destination on a phone. */
  body[data-page="home"] .archive-hero .hero-foot > a,
  body[data-page="home"] .archive-directory .archive-card-copy > p,
  body[data-page="home"] .home-lab-copy > p,
  body[data-page="home"] .archive-hero .hero-bottom,
  :is(body[data-page="list"],body[data-page="snubs"]) .archive-list-hero .hero-bottom,
  :is(body[data-page="list"],body[data-page="snubs"]) .archive-list-hero .hero-topline > span,
  :is(body[data-page="list"],body[data-page="snubs"]) .archive-list-hero .hero-foot > a,
  .sr-land-hero-copy :is(.sr-land-eyebrow,.sr-land-subtitle,.sr-land-framework),
  .sr-land-section-heading > p,
  .sr-land-card-copy :is(small,.sr-land-card-meta),
  .cp-intro-cover-copy :is(.cp-eyebrow,.cp-intro-subtitle,.cp-intro-framework),
  .cp-intro-page :is(.cp-edition-description,.cp-edition-note),
  .cp-intro-works-heading > a,
  body[data-page="awards"] :is(.section-heading .eyebrow,.section-aside,.chapter-heading .eyebrow,.award-description),
  .sr-journey-intro > p,.sr-journey-tile-copy > small { display: none; }
  body[data-page="home"] .archive-hero .hero-title { padding-bottom: 44px; }
  body[data-page="home"] .archive-hero .hero-foot { justify-content: flex-start; }
  body[data-page="home"] .archive-directory .archive-card-copy > h3 { margin-bottom: 0; }
  /* The frame is the feature. Move its credit out of the picture, without
     changing the editorial desktop composition or obscuring the still. */
  body[data-page="home"] .screening-daily-card { display: grid; gap: 7px; aspect-ratio: auto; background: transparent; overflow: visible; }
  body[data-page="home"] .screening-daily-card img { display:block; width:100%; height:auto; object-fit:contain; border-radius:4px; }
  body[data-page="home"] .screening-daily-card::after { display:none; background:none; }
  body[data-page="home"] .screening-daily-caption { position:static; gap:8px; align-items:baseline; }
  body[data-page="home"] .screening-daily-caption strong { font:500 var(--m-label)/1.35 var(--body); color:var(--muted); }
  body[data-page="home"] .screening-daily-caption small { font-size: var(--m-meta); }
  body[data-page="home"] .screening-daily-heading { font-size:var(--m-label); }
  body[data-page="home"] .screening-daily-heading time { font-size:var(--m-meta); }
}

@media (max-width: 680px), (max-width: 932px) and (pointer: coarse) and (max-height: 500px) {
  :root { --header: 54px; --nav: 46px; }
  body { line-height: 1.5; }
  .masthead { min-height: var(--header); gap: 8px; }
  .masthead .wordmark b { font-size: clamp(.9rem, 3.7vw, 1rem); letter-spacing: .025em; }
  .masthead .topnav a { font-size: .72rem; letter-spacing: .025em; min-height: 38px; }
  /* Preserve the existing responsive navigation visibility rules. */
  .masthead .topnav a[hidden] { display: none; }
  .masthead-tools { gap: 5px; }
  .masthead .profile .avatar { width: 34px; height: 34px; }
  .masthead .archive-search-open { width: 36px; height: 40px; }
  footer { padding-block: 20px; gap: 10px 16px; }
  footer .wordmark b { font-size: 1.05rem; }
  footer p { font-size: var(--m-label); }
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(1rem, var(--m-control)); }

  /* Home and editorial covers: keep the film full bleed, expose content sooner. */
  :is(.archive-hero,.archive-list-hero) { min-height: clamp(285px, 40svh, 365px); }
  :is(.archive-hero,.archive-list-hero) h1 { font-size: var(--m-hero); line-height: .99; }
  :is(.archive-hero,.archive-list-hero) .hero-title { padding-top: 56px; padding-bottom: 44px; }
  :is(.archive-hero,.archive-list-hero) .hero-bottom { gap: 5px; margin-top: 8px; }
  :is(.archive-hero,.archive-list-hero) .hero-bottom p { font-size: clamp(.94rem,4vw,1.08rem); line-height: 1.25; }
  :is(.archive-hero,.archive-list-hero) .hero-topline { font-size: var(--m-meta); }
  :is(.archive-hero,.archive-list-hero) .hero-foot { bottom: 14px; gap: 5px; font-size: var(--m-meta); }
  body[data-page="home"] .archive-hero .hero-title h1 br { display: none; }
  body[data-page="home"] .archive-hero .hero-title h1 > span { margin-inline-start: .19em; }
  body[data-page="home"] .archive-hero .hero-topline { display: none; }
  body[data-page="awards"][data-award-view] .legacy-awards-hero { min-height: clamp(285px, 40svh, 365px); }
  body[data-page="awards"][data-award-view] .legacy-awards-hero h1 { font-size: var(--m-hero); }
  body[data-page="awards"][data-award-view] .legacy-awards-hero .hero-title { padding-bottom: 40px; }
  body[data-page="awards"][data-award-view] .legacy-awards-hero .hero-edition-awards { font-size: var(--m-meta); }
  .hero-caption { font-size: var(--m-meta); }
  .home-directory-heading { column-gap: 8px; align-items: flex-start; }
  .home-discovery { gap: 3px; }
  .home-discover { font-size: var(--m-label); min-height: 38px; padding: 6px 8px; }
  .screening-mobile-link { min-height: 30px; font-size: var(--m-label); }
  .home-lab-card { min-height: clamp(178px, 51vw, 235px); padding: 11px 12px 27px; }
  .home-lab-copy h3 { font-size: var(--m-feature); line-height: 1.12; margin-bottom: 4px; }
  .home-lab-daily { min-height: 44px; margin-top: 6px; font-size: var(--m-label); }
  .daily-frame-entry { padding-block: 20px var(--m-s6); }
  .screening-entry.daily-frame-entry h2 { font-size: var(--m-section); }
  .daily-frame-entry .screening-entry-copy > p { font-size: var(--m-control); }
  body[data-page="home"] .daily-frame-entry .screening-daily-heading { margin-bottom: 8px; }
  /* Phone directory: pairs of compact stills, with the Lab as a full-row
     feature. This shows both decades together instead of a long desktop stack. */
  body[data-page="home"] .archive-directory .archive-card-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 10px;
  }
  body[data-page="home"] .archive-directory .archive-card { min-width:0; }
  body[data-page="home"] .archive-directory .archive-card > img { aspect-ratio: 1.65; }
  body[data-page="home"] .archive-directory .archive-card h3 { font-size: var(--m-card); text-wrap: pretty; }
  body[data-page="home"] .archive-directory .archive-card-copy { padding-top: 5px; }

  /* Awards and lists: a readable hierarchy, compact chapter rhythm, unchanged art. */
  body[data-award-view="cinematic"] .chapter { padding-top: 21px; }
  body[data-award-view="cinematic"] .chapter + .chapter { padding-top: 27px; }
  body[data-award-view="cinematic"] .award-grid { row-gap: 23px; }
  body[data-award-view] .chapter-heading { min-height: 64px; gap: 7px; padding: 9px 10px; }
  body[data-award-view] .chapter-heading h2,
  body[data-award-view="compact"] .chapter-heading h2 { font-size: var(--m-section); line-height: 1.12; }
  body[data-award-view="cinematic"] .chapter-heading { margin-bottom: 12px; }
  body[data-award-view] .award-heading h3,
  body[data-award-view="cinematic"] .featured-award .award-heading h3 { font-size: .875rem; line-height: 1.3; }
  body[data-award-view="cinematic"] .featured-award .winner-title,
  body[data-award-view="cinematic"] .enhanced-card .performance-copy .winner-title,
  body[data-award-view="cinematic"] .award-card .winner-title { font-size: var(--m-feature); line-height: 1.11; }
  body[data-award-view="compact"] .enhanced-card .winner-title,
  body[data-award-view="compact"] .enhanced-card .performance-copy .winner-title { font-size: var(--m-card); line-height: 1.3; }
  body[data-award-view="cinematic"] :is(.winner-detail,.winner-credit-line,.artist-context,.nominee-list) { font-size: var(--m-label); }
  body[data-award-view] .edition-quote { margin-block: 18px; }
  body[data-award-view] .edition-quote blockquote { font-size: clamp(.9375rem,3.9vw,1.1875rem); line-height: 1.4; }
  body[data-award-view] #opening-line .edition-quote.opening { margin-block: 16px 20px; padding-block: 9px; }
  body[data-award-view] .edition-quote.opening figcaption { margin-top: 8px; }
  body[data-award-view] .edition-strip { padding-bottom: 9px; }
  body[data-award-view] .edition-utilities { gap: 8px 12px; }
  .edition-tools { gap: 10px; }
  .edition-tools .ceremony-entry { min-height: 38px; font-size: var(--m-label); }
  :is(.spotlights,.final-cut,.double-feature,.snub-list) { padding-block: 24px; }
  :is(#snub-entries,#list-items) { gap: 15px; }
  .snub-card,.collection-entry { gap: 11px; }
  .snub-card h3,.collection-entry h2 { font-size: var(--m-card); line-height: 1.3; }
  .snub-card p:not(.eyebrow),.collection-entry p { font-size: var(--m-label); line-height:1.45; }
  .ts-r2-07 .ts-ceremony-intertitle { min-height: min(43dvh,355px); padding: 22px 14px; }
  .ts-r2-07 .ts-ceremony-title { gap: 11px; }
  .ts-r2-07 .ts-ceremony-title h3 { font-size: var(--m-feature); }
  #film-file-dialog { --file-gutter: 14px; }
  #film-file-dialog #film-file-title { font-size: 1.0625rem; line-height: 1.3; }
  #film-file-dialog .file-year,.file-tally { font-size: var(--m-meta); }
  #film-file-dialog .file-group-summary { min-height: 44px; }
  #film-file-dialog .file-group-summary strong { font-size: var(--m-control); }
  #index-dialog input[type="search"],#index-query { font-size: 1rem; min-height: 44px; }

  /* Cinema Lab: the programme and the activities use different densities.
     Keep controls reachable, but let the film/question lead the viewport. */
  #screening-landing[data-layout="programme"] .sr-land-hero { height: clamp(260px, 72vw, 320px); }
  #screening-landing[data-layout="programme"] .sr-land-hero-copy { bottom: 29px; }
  .sr-land-hero h1 { font-size: var(--m-hero); line-height: 1.06; }
  .sr-land-content { gap: 10px; padding-block: 10px var(--m-s6); }
  .sr-land-section-heading h2 { font-size: var(--m-section); }
  #screening-landing[data-layout="programme"] :is(.sr-land-grid,.sr-land-explore-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; }
  #screening-landing[data-layout="programme"] :is(.sr-land-grid,.sr-land-explore-grid) .sr-land-card { display:flex; flex-direction:column; align-items:stretch; gap:5px; padding:0; border:0; }
  #screening-landing[data-layout="programme"] :is(.sr-land-grid,.sr-land-explore-grid) .sr-land-art { aspect-ratio:1.85; }
  #screening-landing[data-layout="programme"] :is(.sr-land-grid,.sr-land-explore-grid) .sr-land-card-title strong { font:500 var(--m-card)/1.2 var(--body); }
  .sr-land-explore-heading { margin-top: 6px; padding-top: 13px; }
  .sr-land-hero-actions { margin-top:10px; }
  .sr-land-hero-actions .sr-primary { min-height: 44px; padding: 8px 13px; font-size: var(--m-control); }
  .screening-page { width: calc(100% - 2 * var(--gutter)); padding-top: var(--m-s3); padding-bottom: var(--m-s6); }
  .screening-intro { margin-bottom: 3px; }
  .screening-intro h1 { font-size: var(--m-section); line-height: 1.1; }
  .screening-intro p { display:none; }
  .screening-navigation { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0 14px; overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .screening-navigation a { flex: none; white-space: nowrap; font-size: var(--m-label); min-height: 42px; }
  .screening-quiz-navigation:not([hidden]) { display:none; }
  #sr-mobile-quiz-picker:not([hidden]) { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; margin:9px 0 8px; }
  #sr-mobile-quiz-picker label { color:var(--muted); font-size:var(--m-meta); font-weight:500; }
  #sr-mobile-quiz-picker select { min-width:0; width:100%; min-height:44px; border:1px solid var(--surface-border); border-radius:3px; padding:8px 12px; background:var(--panel); color:var(--text); font:400 1rem/1.3 var(--body); }
  .screening-activity { padding-top: 8px; }
  .sr-toolbar { gap: 8px; margin-bottom: 12px; }
  .sr-memory-tools .sr-segment { flex-wrap:nowrap; max-width:100%; min-width:0; overflow-x:auto; scrollbar-width:thin; }
  .sr-memory-tools .sr-segment button { flex:none; white-space:nowrap; }
  .sr-quiz-heading,.sr-ballot-heading,.sr-winner-heading { margin-bottom: 10px; }
  .sr-quiz-heading h2,.sr-ballot-heading h2 { font-size: 1rem; line-height: 1.35; }
  .sr-winner-heading h2,.sr-game-heading h2,.sr-matchup-heading h2,.ts-r2-12 .sr-matchup-heading h2,
  .sr-journey-intro h2,.sr-journey-heading h2,.sr-results-header h2 { font-size: var(--m-feature); line-height: 1.15; }
  .sr-memory-clue { font-size: var(--m-feature); line-height: 1.3; }
  .sr-memory-prompt { min-height: 105px; padding: 11px 10px; }
  .sr-memory-prompt .sr-memory-label,.screening-kicker { font-size:var(--m-meta); }
  .sr-question-grid { gap: 10px; }
  .sr-answer,.ts-r2-12 .sr-answer { min-height: 44px; padding: 7px 10px; font-size: var(--m-body); line-height: 1.35; }
  .sr-primary,.sr-secondary { min-height:44px; font-size:var(--m-control); padding:7px 12px; }
  .sr-game-heading { gap: 7px 10px; margin-bottom: 10px; }
  .sr-game-heading p:not(.screening-kicker) { font-size: var(--m-control); line-height: 1.5; }
  .sr-game-actions { gap: 10px; margin-top: 14px; padding-top: 12px; }
  .sr-editor-moves button { min-height: 40px; }
  .sr-taste-hero-copy h2 { font-size: var(--m-hero); }
  .sr-taste-section-heading h3 { font-size: var(--m-section); }
  .sr-journey-tile-copy strong { font-size: var(--m-card); line-height: 1.23; }
  .sr-journey-tile-copy,.ts-journey-grid .sr-journey-tile-copy { gap: 3px; padding-block: 7px 9px; }
  .ts-r2-12 .sr-match-copy strong { font-size:var(--m-card); }
  .sr-matchup-meta > span { display:none; }
  .sr-result-list strong,.sr-ballot-entry strong { font-size:var(--m-body); }
  .sr-result-list small,.sr-ballot-entry small { font-size:var(--m-label); }

  /* Cinema Profile: the assessment is a reading experience, not a tiny desktop.
     Give guidance its own full-width row, and compact the repeated question cards. */
  .cp-body.cp-intro-page { --cp-intro-header-h: var(--header); }
  .cp-body .cp-masthead { height: var(--header); }
  .cp-body .cp-masthead .wordmark b { font-size: .95rem; }
  .cp-body .cp-wrap,.cp-body .cp-wrap-wide { width: calc(100% - 2 * var(--gutter)); }
  .cp-body .cp-footer { min-height: 0; padding-block: 18px; }
  .cp-intro-cover { height: clamp(250px, 68vw, 305px); }
  .cp-intro-cover-copy { bottom: 32px; }
  .cp-root .cp-intro-title { font-size: var(--m-hero); line-height: 1.06; }
  .cp-root[dir="rtl"] .cp-intro-title { font-size: clamp(1.4rem,5.8vw,1.75rem); }
  .cp-intro-content { gap: var(--m-s5); padding-bottom: var(--m-s6); }
  .cp-intro-start-row { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .cp-intro-start-copy { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .cp-intro-page .cp-start-actions { justify-content: flex-start; }
  .cp-intro-page .cp-start-actions .cp-button { min-height: 44px; font-size: var(--m-control); }
  .cp-intro-page .cp-start-facts,.cp-intro-page .cp-start-facts strong { font-size: var(--m-control); }
  .cp-intro-page .cp-start-guidance,.cp-intro-page .cp-edition-description { font-size: var(--m-label); line-height: 1.5; }
  .cp-intro-page .cp-edition-option { min-height:44px; gap:5px; padding:7px 8px; }
  .cp-intro-page .cp-edition-option strong { font-size: var(--m-label); }
  .cp-intro-works-heading h2 { font-size: var(--m-section); }
  .cp-root[dir="rtl"] .cp-intro-works-heading h2 { font-size: var(--m-section); }
  .cp-intro-works-grid .cp-hero-film-caption { font-size: var(--m-meta); }
  .cp-intro-works-grid .cp-hero-film-caption span:last-child { font-size: .72rem; }
  .cp-progress-row { font-size: var(--m-label); margin-bottom: 8px; }
  .cp-question,.ts-r2-12 .cp-quiz .cp-visual-question { margin-top: 8px; }
  .cp-body .cp-root .cp-question-title,
  .ts-r2-12 .cp-body .cp-root .cp-visual-heading .cp-question-title,
  .cp-root .cp-cf-quiz .cp-visual-heading .cp-question-title { font-size: clamp(1.0625rem,4.6vw,1.25rem); line-height: 1.3; }
  .cp-body .cp-root[dir="rtl"] .cp-question-title,
  .ts-r2-12 .cp-body .cp-root[dir="rtl"] .cp-visual-heading .cp-question-title { font-size: clamp(1.0625rem,4.5vw,1.25rem); line-height: 1.5; }
  .cp-root .cp-visual-heading,.ts-r2-12 .cp-visual-heading { min-height:0; margin-bottom: 7px; }
  .cp-root .cp-visual-grid,.ts-r2-12 .cp-visual-grid { gap: 7px; }
  .cp-root .cp-visual-art,.ts-r2-12 .cp-root .cp-visual-art { aspect-ratio: 2.4; }
  .cp-root .cp-visual-meta { padding: 6px 9px; }
  .cp-root :is(.cp-visual-meta strong,.cp-rating-frame strong),.ts-r2-12 :is(.cp-visual-meta strong,.cp-rating-frame strong) { font-size:var(--m-body); }
  .cp-adaptive .cp-scene-choice .cp-cinema-answer { min-height: 48px; }
  .cp-adaptive .cp-scene-choice .cp-cinema-answer strong { font-size: var(--m-body); line-height: 1.45; font-weight: 500; }
  .cp-root[dir="rtl"] .cp-scene-choice .cp-cinema-answer strong { line-height: 1.65; }
  .cp-root .cp-small { font-size: var(--m-label); line-height: 1.55; }
  .cp-question-tools,.cp-familiarity-options { gap: 3px 12px; }
  .cp-root .cp-question-tools .cp-text-button,.cp-root .cp-familiarity-options .cp-text-button { font-size:var(--m-label); }
  .cp-root .cp-scenario-copy { font-size:var(--m-body); line-height:1.5; margin-top:7px; }
  .cp-root .cp-scenario-choices { gap:7px; margin-top:7px; }
  .cp-root .cp-scenario-choices .cp-scenario-choice { min-height:52px; padding:9px 11px; font-size:var(--m-body); line-height:1.5; }
  .cp-question-footer,.ts-r2-12 .cp-question-footer { margin-top: 11px; padding-top: 8px; }
  .cp-root .cp-button { font-size: var(--m-control); min-height: 44px; padding: 9px 13px; }
  .cp-root .cp-section-heading { font-size: var(--m-section); }
  .cp-root .cp-subheading { font-size: 1rem; }
  .cp-root .cp-result-marker .cp-signature-name { font-size: clamp(1.5rem,6.2vw,1.8rem); }
  .cp-root[dir="rtl"] .cp-result-marker .cp-signature-name { font-size: 1.5rem; }
  .cp-root .cp-portrait-name,.cp-root .cp-portrait-name.is-open { font-size:clamp(1.875rem,8vw,2.75rem); line-height:1.04; }
  .cp-root[dir="rtl"] .cp-portrait-name { font-size:clamp(1.65rem,7vw,2.35rem); line-height:1.4; }
  .cp-root .cp-portrait-copy > .cp-eyebrow { display:none; }
  .cp-root .cp-portrait-label,.cp-root .cp-portrait-confidence { font-size:var(--m-meta); }
  .cp-root .cp-portrait-formula,.cp-root .cp-portrait-description { font-size:var(--m-body); }
  .cp-root .cp-portrait-traits { margin-top:11px; padding-block:9px; }
  .cp-root .cp-portrait-traits strong { font-size:var(--m-control); }
  .cp-results-grid { gap: 12px; }
  .cp-results-grid .cp-panel { padding: 13px; }
  .cp-result-head .cp-display { font-size: var(--m-hero); }
}

@media (max-width: 360px) {
  .masthead { gap: 6px; }
  .masthead .profile .avatar { width: 32px; height: 32px; }
  .masthead .archive-search-open { width: 32px; }
  .cp-body.cp-intro-page .cp-masthead .nav-profile-short { font-size: .65rem; }
  .home-discover { font-size: .75rem; padding-inline: 7px; }
  .screening-navigation,.screening-quiz-navigation:not([hidden]) { gap: 0 12px; }
}

@media (max-width: 932px) and (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  :is(.archive-hero,.archive-list-hero),body[data-page="awards"][data-award-view] .legacy-awards-hero { min-height: max(360px, 88svh); }
  #screening-landing[data-layout="programme"] .sr-land-hero,.cp-intro-cover { height: max(320px, 88svh); }
}
