/* Navigation and shared layouts */
@media screen and (min-width: 1024px) {
  :root {
    --desktop-width: 1220px;
    --desktop-gutter: clamp(28px, 3.4vw, 52px);
    --desktop-canvas: min(calc(100% - 2 * var(--desktop-gutter)), var(--desktop-width));
    --desktop-line: color-mix(in srgb, var(--text) 15%, var(--background));
    --desktop-sidebar-width: clamp(144px, 11.8vw, 172px);
  }
  /* The page and its footer share the space beside the primary navigation. */
  .app-shell,
  body > .site-content:has(.app-shell) + .site-footer {
    margin-inline-start: var(--desktop-sidebar-width);
    min-inline-size: 0;
  }
  /* Keep recovery steps aligned with the sign-in form. */
  .account-recovery-page {
    max-width: 540px;
    margin-inline: auto;
  }
  .account-recovery-page > .page-heading {
    gap: 8px;
    margin-block: 24px 20px;
  }

  /* Keep page titles distinct from card headings without dominating the workspace. */
  #main-content :where(
    .page > header, .page-heading, .films-page-heading, .guest-card,
    .film-journeys-promo, .film-journey-detail-heading, .full-list-heading,
    .list-template-detail-heading, .film-club-room-heading, .list-formation-heading,
    .movie-page-heading, .tier-library-page > header, .custom-compare-container > .card
  ) h1,
  #main-content :where(.page, .catalog-templates-page) > h1,
  #main-content .desktop-custom-title,
  main.page > .page-heading h1,
  .legal-page .legal-document-heading h1,
  .legal-page .page > h1 {
    font-size: clamp(1.625rem, 2.1vw, 1.875rem);
    font-weight: var(--font-weight-medium);
    line-height: 1.18;
    letter-spacing: -.025em;
  }
  .desktop-extra { display: inline-flex; }
  .app-shell > main > .navigation-page-content,
  .app-shell > main > .section-navigation-shell > .section-navigation-content {
    width: var(--desktop-canvas);
    margin-inline: auto;
  }
  .app-shell .section-navigation-shell[data-section] { padding-top: 0; --section-navigation-width: var(--desktop-width); }
  .app-shell .section-navigation-shell[data-section] .section-navigation-frame {
    position: static; width: var(--desktop-canvas); margin: 0 auto;
    min-height: 50px; padding: 0; display: flex; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 24px; border: 0; border-bottom: 1px solid var(--desktop-line);
    background: transparent; backdrop-filter: none; box-shadow: none;
  }
  .app-shell .section-navigation-shell[data-section] .section-navigation-tabs {
    width: auto; max-width: none; padding: 0; margin: 0; display: flex; gap: 3px;
    border: 0; overflow: visible; background: transparent; box-shadow: none;
  }
  .section-navigation-frame .section-navigation-indicator { display: none; }
  .section-navigation-frame .section-navigation-link {
    min-height: 32px; padding: 0 12px; font-size: .85rem; font-weight: 550;
    border-radius: 5px; color: var(--muted); background: transparent; border: none;
  }
  .section-navigation-shell[data-section] .section-navigation-link + .section-navigation-link::before { display: none; }
  .section-navigation-frame .section-navigation-link[aria-current=page] {
    background: var(--surface-raised); color: var(--text); box-shadow: none;
  }
  .section-navigation-frame .section-navigation-link:hover { color: var(--text); background: var(--surface); }
  .desktop-section-companion {
    align-items: center; gap: 7px; padding: 7px 0 7px 8px; border-radius: 3px;
    color: var(--muted); font-size: .82rem; font-weight: 550;
  }
  .desktop-section-companion .nav-icon { width: 15px; height: 15px; }
  .desktop-section-companion:hover { color: var(--accent); }
  .desktop-search-dialog {
    box-sizing: border-box; width: min(520px, 95vw); max-height: 80dvh; margin: auto;
    padding: 0; overflow: auto; background: var(--surface); color: var(--text);
    border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 30px 90px #0009;
  }
  .desktop-search-dialog::backdrop { background: rgb(0 0 0 / 70%); }
  .desktop-search-body { padding: 24px; }
  .desktop-search-body > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .desktop-search-body h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.035em; }
  .desktop-search-body > header button {
    display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%;
    background: var(--surface-raised); color: var(--text); border: 1px solid var(--border);
    font-size: 1.35rem; cursor: pointer;
  }
  .desktop-search-dialog .home-film-actions-card.is-compact.is-open {
    width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent;
  }
  .desktop-search-dialog .home-film-actions-composer { clip-path: none; transform: none; transition: none; }
  .desktop-search-dialog .home-film-actions-search-field { grid-template-columns: auto 1fr; }
  .desktop-search-dialog .films-finder-results { overflow-y: auto; max-height: 32vh; }
  .desktop-search-shortcuts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-block: 20px;
  }
  .desktop-search-shortcuts a {
    display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 9px 12px;
    background: var(--surface-raised); border: 1px solid var(--border); border-radius: 6px; font-size: .9rem;
  }
  .desktop-search-shortcuts .nav-icon { color: var(--accent); }
  .desktop-search-site-link { display: inline-flex; color: var(--accent); font-size: .9rem; font-weight: 600; }
  .desktop-search-shortcuts a:hover, .desktop-search-site-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  .site-footer .site-footer-inner {
    width: var(--desktop-canvas); margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .46fr);
    gap: 36px; padding-block: 24px;
  }
  .site-footer-primary > p { font-weight: 500; }
  .site-footer-primary nav { gap: 3px 16px; }
  .site-footer-primary nav a {
    display: inline-flex; align-items: center; min-height: 30px;
    font-size: .8125rem; font-weight: 500;
  }
  .legal-page-shell:has(.legal-table-of-contents) { width: min(100% - 2 * var(--desktop-gutter), 1120px); }
  .legal-page-shell .legal-document:has(> .legal-table-of-contents) {
    display: grid; grid-template-columns: minmax(215px, .36fr) minmax(0, 1fr);
    align-items: start; column-gap: clamp(28px, 4vw, 60px);
  }
  .legal-document:has(> .legal-table-of-contents) > .legal-document-heading { grid-column: 1 / -1; }
  .legal-document:has(> .legal-table-of-contents) > .legal-table-of-contents {
    grid-column: 1; grid-row: 2; position: sticky; top: calc(var(--local-preview-height, 0px) + 16px);
    max-height: calc(100dvh - var(--local-preview-height, 0px) - 32px); overflow-y: auto; scrollbar-width: thin;
  }
  .legal-document:has(> .legal-table-of-contents) > .legal-document-content { grid-column: 2; grid-row: 2; }
  .legal-table-of-contents ul { grid-template-columns: 1fr; gap: 4px; }
  .legal-table-of-contents a { display: block; padding: 3px 0; font-size: .83rem; }
  .global-search-page { --page-width: 980px; margin-inline: auto; }
  .global-search-page .global-search-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .global-search-page .global-search-quick-grid a { min-height: 86px; padding: 16px 18px; }
}

/* Film discovery and guides */
@media screen and (min-width: 1024px) {
  .page.films-page,
  .page.film-journeys-page,
  .page.film-clubs-page,
  .page.film-journey-detail-page,
  .page.lists-hub,
  .page.movie-page,
  .page.film-games-page,
  .catalog-templates-page,
  .tier-library-page {
    width: min(100%, 1220px);
    margin-inline: auto;
    min-width: 0;
  }

  /* Covers come from the same curated catalog as the linked Journey or template.
     The poster background is applied only on desktop, so phones fetch no artwork. */
  .desktop-journey-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, .94fr);
    align-items: center;
    gap: clamp(22px, 4vw, 60px);
    overflow: hidden;
    isolation: isolate;
    padding: clamp(22px, 2.1vw, 32px);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #f7f2ea;
    background:
      radial-gradient(ellipse at 87% 115%, #77533c 0%, transparent 66%),
      linear-gradient(105deg, #211c1b 0%, #312724 57%, #493932 100%);
  }
  .desktop-journey-story { display: grid; justify-items: start; gap: 13px; text-align: start; }
  .desktop-journey-kicker {
    color: #efb28b;
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .12em;
    text-transform: uppercase;
  }
  .desktop-journey-story h2 {
    max-width: 22ch;
    margin: 0;
    color: inherit;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 2.4vw, 2.125rem);
    font-weight: 400;
    letter-spacing: -.025em;
    line-height: 1.12;
    text-wrap: balance;
  }
  .desktop-journey-story p { max-width: 62ch; margin: 0; color: #dbcec2; line-height: 1.5; }
  .desktop-journey-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
  .desktop-journey-actions .primary-button { width: auto; }
  .desktop-journey-actions > span { color: #dbcec2; font-size: .85rem; }
  .desktop-journey-covers {
    align-items: start;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 1.15vw, 16px);
    width: min(100%, 355px);
    padding: 0; margin: 0; justify-self: end; list-style: none;
  }
  .desktop-journey-covers li { min-width: 0; }
  .desktop-journey-covers a { display: grid; gap: 7px; color: #f5e7da; font-size: .79rem; font-weight: 600; text-decoration: none; }
  .desktop-journey-covers a:hover { color: white; text-decoration: underline; }
  .desktop-journey-covers .desktop-journey-poster {
    position: relative;
    display: grid;
    align-content: end;
    padding: 10px;
    aspect-ratio: 2/3;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(145deg, #775643, #332521 80%);
    color: #fff3df;
    font: 500 clamp(1.15rem, 1.45vw, 1.5rem) / 1.08 Georgia, serif;
    overflow-wrap: anywhere;
    border: 1px solid rgb(255 255 255 / .19);
    border-radius: 5px;
    box-shadow: 0 8px 22px rgb(0 0 0 / .32);
  }
  .desktop-journey-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--desktop-poster, none) center / cover no-repeat;
  }

  .page.films-page { row-gap: clamp(16px, 1.65vw, 24px); }
  .films-page-heading .eyebrow { display: none; }
  .desktop-film-collections { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .desktop-film-collections a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: .91rem;
    font-weight: 600;
    text-decoration: none;
  }
  .desktop-film-collections a:hover, .desktop-film-collections a[aria-current="page"] {
    border-color: var(--accent);
    color: var(--accent);
  }
  .films-page .films-section[aria-labelledby="browse-start-title"] { display: none; }
  .films-page .films-discovery-controls {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, .95fr);
    gap: 14px; align-items: start;
  }
  .films-discovery-controls .films-filters-disclosure.is-sticky { position: static; }
  .films-page .films-discovery-controls:has(.films-filters-disclosure[data-open="true"]) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  .films-page .films-filters-disclosure[data-open="true"] { grid-column: 1/-1; }
  .films-page .films-browse-controls { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .films-section-heading { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .films-section-heading h2 { letter-spacing: -.025em; }
  .films-page .films-poster-card { background: transparent; border: none; padding: 0 1px 5px; }
  .films-page .films-poster-grid.is-rail {
    grid-auto-columns: calc((100% - 80px) / 6);
    column-gap: 16px;
  }
  @media (max-width: 1119px) {
    .films-page .films-poster-grid.is-rail { grid-auto-columns: calc((100% - 64px) / 5); }
  }
  .films-page .films-poster-grid.is-grid { grid-template-columns: repeat(auto-fill, minmax(135px,1fr)); gap: 24px 16px; }
  .films-page .films-poster-artwork { border: 1px solid var(--border); border-radius: 7px; }
  .films-page .films-poster-copy { align-self: start; }
  .films-page .films-poster-copy > a { font-size: .95rem; }

  .film-journeys-page .journey-public-library { display: block; }
  .film-journeys-page .journey-desktop-guest-intro { display: none; }
  .film-journeys-page .film-journeys-promo.film-journeys-intro {
    display: block; padding: 0; margin-bottom: 22px; background: none; border: 0; box-shadow: none;
  }
  .film-journeys-page .film-journeys-promo-action { display: none; }
  .film-journeys-page .film-journeys-promo-copy { max-width: none; }
  .film-journeys-page .desktop-journey-feature { margin-bottom: 28px; }
  .film-journeys-page .film-journey-library-tools { padding: 18px 22px; border-radius: 8px; }
  .film-journeys-page .film-journey-category-filters {
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 12px;
  }
  .film-journeys-page .film-journey-category-disclosure[data-open="true"] { grid-column: 1/-1; }
  .film-journeys-page .film-journey-category-trigger { min-height: 52px; }
  .film-journey-detail-page .film-journey-stops {
    display: grid; max-width: none; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: stretch; gap: 18px;
  }
  .film-journey-detail-heading > a.primary-button { width: fit-content; }
  .film-journey-stops > li { display: flex; flex-direction: column; min-width: 0; }
  .film-journey-stops > li > :last-child { margin-top: auto; }

  .lists-hub .desktop-journey-feature { margin-block: 0 24px; }
  .lists-hub .primary-button + .desktop-journey-feature { margin-top: 26px; }
  .lists-hub > .primary-button { width: fit-content; }
  .catalog-templates-page > h1.sr-only, .film-games-page > h1.sr-only {
    position: static; width: auto; height: auto; overflow: visible; clip: auto;
    clip-path: none; white-space: normal; padding: 0; margin: 0 0 22px;
  }
  .page.full-list-page { width: min(100%, 1220px); }
  .full-list-page .full-list-heading { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
  .page.global-film-chart-page:has(.global-film-chart-switcher) {
    width: min(100%, 1220px);
    display: grid;
    grid-template-columns: minmax(185px, .28fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }
  .global-film-chart-page:has(.global-film-chart-switcher) > h1.sr-only {
    position: static; grid-column: 1/-1; width: auto; height: auto; margin: 0;
    overflow: visible; clip: auto; clip-path: none; white-space: normal;
  }
  .global-film-chart-page .global-film-chart-switcher {
    display: grid; grid-template-columns: 1fr; width: 100%; gap: 4px; margin: 0; padding: 6px;
    position: sticky; top: calc(var(--local-preview-height, 0px) + 16px);
  }
  .global-film-chart-page .global-film-chart-switcher-indicator { display: none; }
  .global-film-chart-page .global-film-chart-switcher-link { justify-content: start; padding: 10px 12px; gap: 12px; }
  .global-film-chart-page .desktop-global-chart-label { display: inline; }
  .global-film-chart-page .global-film-chart-switcher-link.is-active { color: var(--accent); background: var(--surface-raised); }
  .global-film-chart-page .global-film-chart-content { min-width: 0; }
  .global-film-chart-page .global-film-chart-subheading {
    align-items: center; margin: 0 0 16px; padding-bottom: 13px; border-bottom: 1px solid var(--desktop-line);
  }
  .global-film-chart-page .global-film-chart-subheading h2 {
    font-size: clamp(1.14rem, 1.45vw, 1.35rem); font-weight: 550; letter-spacing: -.025em;
  }
  .global-film-chart-page .global-film-chart-content [data-world-chart-artwork] {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: clamp(10px, 1.1vw, 16px);
  }
  .global-film-chart-content [data-world-chart-artwork] a {
    border: 1px solid var(--desktop-line); border-radius: 6px;
  }
  .global-film-chart-content [data-world-chart-artwork] a:hover {
    border-color: var(--accent);
  }
  .global-film-chart-panel .global-film-chart-state { margin-top: 0; border: 0; box-shadow: none; background: none; }
  .global-film-chart-page .global-film-chart-state h2 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
  .page.movie-page .movie-page-hero {
    display: grid; grid-template-columns: clamp(175px, 17vw, 235px) minmax(0,1fr);
    column-gap: clamp(24px, 4vw, 58px); align-items: center; padding: clamp(20px, 3vw, 36px);
  }
  .movie-page-hero .movie-page-heading { max-width: 72ch; }
  .movie-page .movie-page-poster { width: 100%; aspect-ratio: 2/3; }
  .movie-page .movie-page-hero-actions { justify-content: start; }
  .movie-page .movie-detail-panel { padding: clamp(20px, 2.5vw, 32px); }
  .page.movie-page:has(> .movie-watch, > [aria-labelledby="person-popular-films"]) {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 20px;
    align-items: start;
  }
  .movie-page :is(.section-heading, .movie-detail-header, .movie-watch-header) h2 {
    font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -.02em;
  }
  .movie-page:has(> .movie-watch, > [aria-labelledby="person-popular-films"]) > * { grid-column: 1/-1; }
  .movie-page:has(> .movie-watch, > [aria-labelledby="person-popular-films"]) > .movie-page-hero {
    grid-area: 1 / 1;
    grid-template-columns: clamp(125px, 13.6vw, 190px) minmax(0,1fr);
    padding: clamp(16px, 2vw, 28px);
    min-width: 0;
    gap: clamp(14px, 1.7vw, 24px);
  }
  .movie-page .movie-page-heading { padding: 0; }
  .page.movie-page:has(> .movie-watch, > [aria-labelledby="person-popular-films"]) > :is(.movie-watch, [aria-labelledby="person-popular-films"]) {
    grid-area: 1 / 2;
    min-width: 0;
    margin: 0;
    padding: clamp(16px, 2vw, 28px);
  }
  .movie-page .movie-watch-row ul { flex-wrap: wrap; }
  .movie-page .movie-watch-row { align-items: start; }

  .page.film-games-page > section[aria-label="Film games"] { width: 100%; min-height: 0; gap: 22px; }
  .page.film-games-page > h1.sr-only { width: min(100%, 900px); margin-inline: auto; }
  .film-games-page [role="tablist"] {
    width: min(100%, 900px); margin-inline: auto; gap: 12px; padding: 0;
    border: 0; background: transparent;
  }
  .film-games-page button[role="tab"] {
    justify-content: start; gap: 14px; padding: 14px 22px;
    min-height: 62px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  }
  .film-games-page button[role="tab"] span { font-size: 1rem; }
  .film-games-page button[role="tab"] [aria-hidden] { font-size: 1.65rem; }
  .film-games-page button[role="tab"][aria-selected="true"] {
    color: var(--text); border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  }
  .film-games-page [role="tabpanel"] {
    min-width: 0;
    width: min(100%, 900px);
    margin-inline: auto;
  }
  .club-compact-signin { display: none; }
  .page.film-clubs-page { display: grid; gap: 22px; }
  .film-clubs-page .film-club-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); }
  .film-clubs-page .social-section { padding: 20px 24px; }
}

/* Film Clubs and game reference panels */
@media screen and (min-width: 1024px) {
  .desktop-film-anniversaries { display: grid; gap: 16px; padding-block: 18px; border-top: 1px solid var(--border); }
  .desktop-film-anniversaries header { display: grid; gap: 5px; }
  .desktop-film-anniversaries h2, .desktop-film-anniversaries p { margin: 0; }
  .desktop-film-anniversaries h2 { font-size: 1.35rem; font-weight: 600; }
  .desktop-film-anniversaries p { color: var(--muted); }
  .desktop-film-anniversaries ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
  .desktop-film-anniversaries li { min-width: 0; }
  .desktop-film-anniversaries li a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 9px; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-rect); background: var(--surface); text-decoration: none; }
  .desktop-film-anniversaries li a:hover, .desktop-film-anniversaries li a:focus-visible { border-color: var(--accent); }
  .anniversary-art { width: clamp(48px, 4.4vw, 68px); flex: 0 0 auto; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: var(--surface-raised); }
  .anniversary-art img { width: 100%; height: 100%; object-fit: cover; }
  .anniversary-copy { display: grid; align-content: start; gap: 4px; overflow-wrap: anywhere; }
  .anniversary-copy small { color: var(--accent); font-weight: 600; }
  .anniversary-copy strong { font-size: .95rem; line-height: 1.25; }
  .anniversary-copy > span { color: var(--muted); font-size: .8rem; }
  .page.film-clubs-page.club-guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
    grid-template-rows: auto auto 1fr;
    align-items: start;
    gap: 20px clamp(18px, 2.4vw, 34px);
  }
  .club-guide-layout > header { grid-column: 1 / -1; }
  .club-guide-layout > :where(.film-clubs-hub, div, section) { grid-column: 1; min-width: 0; }
  .film-clubs-page :is([data-site-tour-target="learn-host"], [data-site-tour-target="learn-open-clubs"]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: center;
    padding: 20px;
    gap: 14px;
  }
  .film-clubs-page :is([data-site-tour-target="learn-host"], [data-site-tour-target="learn-open-clubs"]) > div {
    padding-inline-end: 14px;
  }
  .desktop-club-guide, .desktop-round-notes {
    display: grid;
    align-self: start;
    align-content: start;
    gap: 12px;
    padding: clamp(16px, 1.8vw, 26px);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: var(--radius-rect);
    background: var(--surface);
    overflow-wrap: anywhere;
  }
  .desktop-club-guide { grid-column: 2; grid-row: 2 / span 2; }
  :is(.desktop-club-guide, .desktop-round-notes) :is(h2, p, ul, ol) { margin: 0; }
  :is(.desktop-club-guide, .desktop-round-notes) h2 { color: var(--text); font-size: clamp(1.07rem, 1.45vw, 1.35rem); font-weight: 600; line-height: 1.2; }
  :is(.desktop-club-guide, .desktop-round-notes) p { color: var(--muted); font-size: .93rem; line-height: 1.52; }
  :is(.desktop-club-guide, .desktop-round-notes) a { color: var(--accent); text-underline-offset: 3px; }
  .desktop-club-guide details { padding-top: 12px; border-top: 1px solid var(--border); }
  .desktop-club-guide summary { cursor: pointer; font-size: .95rem; font-weight: 600; }
  .desktop-club-guide details p, .desktop-club-guide details a { margin-top: 8px; }
  .desktop-club-guide details a { display: inline-block; font-size: .89rem; }
  .film-games-page [role="tabpanel"], .film-games-page [data-game-round-slide],
  .film-games-page [role="tablist"], .page.film-games-page > h1.sr-only { width: min(100%, 1160px); }
  .film-games-page :is([data-game-round-current], [data-game-round-outgoing]):has(> .desktop-round-notes) {
    display: flex;
    justify-content: center;
    align-items: start;
    gap: clamp(14px, 2vw, 26px);
  }
  .film-games-page :is([data-game-round-current], [data-game-round-outgoing]) > section { min-width: 0; }
  .film-games-page :is([data-game-round-current], [data-game-round-outgoing]):has(> .desktop-round-notes) > section { margin-inline: 0; }
  .desktop-round-notes { flex: 0 0 clamp(228px, 23%, 294px); min-width: 0; }
  .desktop-round-notes ul, .desktop-round-notes ol { padding: 0; list-style: none; }
  .desktop-round-notes li { display: grid; gap: 3px; border-top: 1px solid var(--border); padding: 10px 0; }
  .desktop-round-notes li:last-child { padding-bottom: 0; }
  .desktop-round-notes small, .desktop-round-notes .round-notes-source { font-size: .82rem; }
  .desktop-round-notes small { color: var(--muted); }
  .desktop-round-notes .round-notes-kicker { color: var(--accent); font-size: .8rem; font-weight: 600; }
  .round-notes-number { color: var(--text); font-size: clamp(1.3rem, 2.1vw, 1.85rem); font-variant-numeric: tabular-nums; line-height: 1.1; }
  .round-notes-bar { height: 4px; margin: 4px 0 0; border-radius: 3px; background: var(--border); }
  .round-notes-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
}

/* Lists and templates */
@media screen and (min-width: 1024px) {
  .lists-hub > h1.sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 16px;
    padding: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .full-list-page .list-display-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-items: stretch;
  }
  .full-list-page .list-display-grid.is-density-compact {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  }
  .full-list-page .list-display-grid-copy { align-content: start; }
  .full-list-page .list-display-grid-copy .list-display-grid-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .88rem;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .full-list-page .list-display-grid-copy small { font-size: .76rem; }
  .full-list-page .list-display-grid-copy:last-child { grid-column: 1 / -1; }
  .full-list-page .list-display-grid-title:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
  }
  .full-list-page .list-editor-add-search .search-box { max-width: 38rem; }
  .full-list-page .rating-movie-search.is-list-add {
    display: grid;
    grid-template-columns: max-content minmax(0, 38rem);
    gap: 12px 22px;
    align-items: center;
  }
  .full-list-page .rating-movie-search.is-list-add > :is(.rating-search-results, .rating-search-status, button) {
    grid-column: 2;
    justify-self: start;
  }
  .full-list-page .rating-movie-search.is-list-add > .rating-search-results { width: 100%; }
  .lists-hub .custom-list-create-inline { width: min(100%, 760px); margin-inline: auto; }
}

/* Compare, Rate and Games */
@media (min-width: 1024px) {
  .app-shell .page:is(.rank-workspace-page, .rate-workspace-page) {
    --play-gap: clamp(22px, 2.4vw, 36px);
    width: 100%;
    max-width: 1220px;
    margin-inline: auto;
  }

  .app-shell .rank-workspace-page .rank-workspace-heading,
  .app-shell .rate-workspace-page > .list-formation-intro {
    min-height: 64px;
    max-width: none;
    margin: 0 0 24px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--border);
  }
  .app-shell .page.rank-workspace-page { padding-inline: 0; }
  .app-shell .rank-workspace-page > .custom-compare-container {
    display: grid;
    width: 100%;
    max-width: none;
    gap: 20px;
  }
  .custom-compare-container > .rank-subject-selector { justify-self: end; }
  .custom-compare-container > .card { width: min(100%, 720px); padding: clamp(20px, 3vw, 36px); }
  .custom-compare-container > .card h1 { margin: 0; }
  .app-shell .rank-workspace-page .rank-workspace-heading {
    flex-flow: row wrap;
    align-items: center;
    justify-content: space-between;
  }
  .rank-workspace-heading > h1.sr-only,
  [data-desktop-rank-rail] .rank-panel-heading h2.sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }
  .app-shell :is(.rank-workspace-page, [data-desktop-custom-compare]) .rank-subject-selector {
    width: max-content;
    max-width: 100%;
    margin: 0;
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border-radius: 9px;
    box-shadow: none;
    background: var(--surface);
  }
  .app-shell :is(.rank-workspace-page, [data-desktop-custom-compare]) .rank-subject-selector > :is(button, a) {
    display: inline-flex;
    width: auto;
    min-height: 37px;
    padding: 6px 12px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 700;
  }
  .app-shell .rank-workspace-page .rank-subject-selector button > span:last-child {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    overflow: visible;
  }
  :is(.rank-workspace-page, [data-desktop-custom-compare]) .compare-subject-link::after { content: attr(aria-label); }
  .rank-workspace-page .rank-subject-icon { font-size: 19px; }
  .rank-workspace-page .director-preview-note { flex-basis: 100%; }

  .app-shell .rank-workspace-page .rank-workspace-columns,
  .app-shell .rate-workspace-page .rate-workspace-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(290px, 1fr);
    gap: 16px var(--play-gap);
    align-items: start;
  }
  .rank-workspace-page .rank-workspace-columns > details:last-child:not([data-desktop-rank-rail]) {
    grid-column: 1;
  }
  .rank-workspace-page .rank-workspace-columns > [data-desktop-rank-rail] {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 0;
  }
  [data-desktop-rank-rail] > summary { display: none; }
  .app-shell .rank-workspace-page .rank-game-panel {
    --comparison-card-width: clamp(154px, calc((100svh - 468px) * .66667), 285px);
    padding: clamp(16px, 2vw, 28px);
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: none;
  }
  .app-shell .rank-workspace-page .rank-game-panel > .rank-panel-heading {
    align-items: center;
    min-height: 32px;
    margin: 0 0 18px;
  }
  .app-shell .rank-workspace-page .rank-game-panel > .rank-panel-heading h2 {
    font-size: clamp(20px, 1.75vw, 27px);
    line-height: 1.18;
    letter-spacing: -.035em;
  }
  .app-shell .rank-workspace-page .rank-game-pair {
    width: min(100%, calc(2 * var(--comparison-card-width) + 24px));
    margin-inline: auto;
    column-gap: clamp(12px, 1.6vw, 24px);
  }
  .app-shell .rank-workspace-page .rank-game-poster { max-height: none; }
  .app-shell .rank-game-poster:not(.rank-game-film-set) > img { object-fit: contain; }
  .app-shell .rank-workspace-page .rank-game-film-copy strong {
    font-size: .94rem;
    letter-spacing: -.015em;
    line-height: 1.1;
  }
  .app-shell .rank-workspace-page .rank-game-panel:not(.is-actor-ranking) .rank-game-film-copy {
    height: 96px;
    grid-template-rows: 12px 32px 14px;
    padding: 7px 8px 28px;
  }
  .app-shell .rank-workspace-page .guest-rank-progress {
    width: 100%;
    gap: 14px;
    margin-bottom: 12px;
  }
  .app-shell .rank-workspace-page .guest-rank-progress span { color: var(--muted); }
  .app-shell .rank-workspace-page .guest-rank-progress progress { height: 4px; }
  .app-shell .rank-workspace-page [data-desktop-rank-rail] .rank-list-panel,
  .app-shell .rate-workspace-page .rate-greatest-panel,
  .desktop-rank-upcoming[hidden] {
    position: static;
    min-height: 0;
    margin: 0;
    padding: clamp(16px, 1.6vw, 23px);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: none;
  }
  .app-shell .rank-workspace-page [data-desktop-rank-rail] .rank-list-panel {
    height: auto;
    max-height: min(72vh, 700px);
  }
  [data-desktop-rank-rail] .rank-list-scroll-region {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    scrollbar-gutter: auto;
  }
  [data-desktop-rank-rail] .rank-panel-heading,
  .rate-workspace-page .rate-greatest-panel-heading {
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  [data-desktop-rank-rail] .rank-panel-heading h2,
  .app-shell .rate-workspace-page .rate-greatest-panel-heading h2,
  .desktop-rank-upcoming h2 {
    margin: 0;
    font-size: clamp(17px, 1.35vw, 21px);
    letter-spacing: -.026em;
    line-height: 1.2;
  }
  [data-desktop-rank-rail] .rank-list-empty {
    min-height: 0;
    justify-content: start;
    margin: 0;
    padding: 8px 0 2px;
    text-align: left;
  }
  [data-desktop-rank-rail] .rank-panel-heading small { white-space: nowrap; }
  [data-desktop-rank-rail] .guest-rank-list-panel .eyebrow { display: none; }
  [data-desktop-rank-rail] .guest-rank-list-panel .rank-workspace-row {
    padding: 5px 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
  }
  [data-desktop-rank-rail] .rank-workspace-film:has(.desktop-rank-thumbnail) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0 8px;
  }
  .desktop-rank-thumbnail[hidden] {
    display: block;
    grid-row: span 2;
    width: 26px;
    aspect-ratio: 2 / 3;
    border-radius: 3px;
    background: var(--surface-raised) var(--rank-thumbnail) center top / cover no-repeat;
  }
  .desktop-rank-upcoming[hidden] { display: block; margin-top: 14px; }
  .desktop-rank-upcoming ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
  .desktop-rank-upcoming li { display: flex; align-items: center; gap: 10px; }
  .desktop-rank-upcoming strong, .desktop-rank-upcoming small { display: block; line-height: 1.35; }
  .desktop-rank-upcoming strong { font-size: .87rem; }
  .desktop-rank-upcoming small { color: var(--muted); font-size: .75rem; }

  .app-shell .rate-workspace-page .rate-workspace-columns {
    grid-template-areas: "rating greatest" "search greatest";
  }
  .app-shell .rate-workspace-page .rate-greatest-panel { height: auto; }
  .rate-workspace-page .rate-greatest-copy strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .rate-workspace-page .rate-greatest-copy:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
  }
  .rate-workspace-page .rate-greatest-panel :is(.rate-greatest-empty, .rate-greatest-unavailable) {
    min-height: 0;
    padding: 8px 0 2px;
    border: 0;
    text-align: left;
  }
  .app-shell .rate-workspace-page .rate-workspace-rating-column > .rating-page {
    display: grid;
    grid-template-columns: minmax(0, .94fr) minmax(260px, 1fr);
    align-items: center;
    padding: clamp(14px, 1.75vw, 24px);
    gap: clamp(14px, 1.75vw, 24px);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  .app-shell .rate-workspace-page .rating-page > :is(.rating-movie, [aria-label="Films to rate"]) {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    margin: 0;
    border: 0;
  }
  .app-shell .rate-workspace-page .rating-page .rating-poster { background-size: contain; }
  .app-shell .rate-workspace-page [aria-label="Films to rate"] button[aria-label^="Open film page"] { width: 86%; }
  .app-shell .rate-workspace-page .rate-workspace-rating-column .rating-page .rating-form,
  .app-shell .rate-workspace-page .rating-page .rating-callout {
    position: static;
    inset: auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    border: 0;
    overflow: visible;
    background: transparent;
  }
  .app-shell .rate-workspace-page .rating-form .rating-form-heading { display: block; margin: 0; }
  .app-shell .rate-workspace-page .rating-form-heading h2,
  .app-shell .rate-workspace-page .desktop-rate-film h2 {
    margin: 0;
    font-size: clamp(22px, 2vw, 31px);
    line-height: 1.13;
    letter-spacing: -.04em;
  }
  .rate-workspace-page .desktop-rate-film > span { color: var(--accent); font-size: .8rem; font-weight: 700; }
  .app-shell .rate-workspace-page .desktop-rate-film p,
  .app-shell .rate-workspace-page .desktop-rate-summary[hidden] {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
  }
  .app-shell .rate-workspace-page .desktop-rate-summary[hidden] { margin: 0; }
  .app-shell .rate-workspace-page .rating-callout > h2 { margin: 0; font-size: 1rem; }
  .app-shell .rate-workspace-page .rating-callout > p { margin: -8px 0 0; font-size: .85rem; }
  .app-shell .rate-workspace-page .quality-star-buttons { gap: 0; }
  .app-shell .rate-workspace-page .quality-star-icon { width: min(100%, 29px); height: auto; }
  .app-shell .rate-workspace-page .rate-workspace-columns > .rating-movie-search { margin: 0; }
  .desktop-guest-rate .rate-greatest-panel > p {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.5;
  }
  .desktop-guest-rate .rate-greatest-panel ol { margin: 14px 0 0; padding-left: 1.7em; }
  .desktop-guest-rate .rate-greatest-panel li { padding: 3px 0; color: var(--muted); font-size: .85rem; }
  .desktop-guest-rate .rate-greatest-panel li button {
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 6px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    cursor: pointer;
  }
  .desktop-guest-rate .rate-greatest-panel li button:is(:hover, [aria-current="true"]) { color: var(--accent); }
  .desktop-guest-rate .rate-greatest-panel li small { color: var(--muted); }
  .desktop-guest-rate .rate-greatest-panel li strong { white-space: nowrap; }
  .desktop-guest-rate [data-desktop-rate-error] { display: block; }
  .desktop-guest-rate .rating-form a.primary-button { display: grid; place-items: center; font-size: .8rem; }
  .app-shell .rate-workspace-page .rating-page [aria-label="Films to rate"] {
    max-width: max(190px, min(330px, calc((100svh - 420px) * .66667)));
    justify-self: center;
  }
  .app-shell [data-desktop-custom-compare] {
    width: 100%;
    max-width: 1220px;
    padding: 18px 0 50px;
    grid-template-columns: minmax(0, 1.85fr) minmax(290px, 1fr);
    gap: 12px clamp(22px, 2.4vw, 36px);
    align-content: start;
    align-items: start;
  }
  [data-desktop-custom-compare] > * { grid-column: 1; }
  [data-desktop-custom-compare] > .desktop-custom-title {
    grid-row: 1;
    align-self: center;
    margin: 0;
  }
  [data-desktop-custom-compare] > .rank-subject-selector {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  [data-desktop-custom-compare] > [data-desktop-custom-picker] {
    grid-column: 2;
    grid-row: 2 / span 5;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  [data-desktop-custom-picker] > h2 { margin: 0 0 12px; font-size: 1.2rem; }
  [data-desktop-custom-picker] > #custom-comparison-options {
    position: static;
    max-height: min(65vh, 610px);
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--border);
    box-shadow: none;
    background: transparent;
  }
  [data-desktop-custom-picker]:has(ol) > #custom-comparison-options { max-height: min(22vh, 190px); }
  [data-desktop-custom-compare] > header h1 { font-size: clamp(20px, 1.75vw, 27px); }
  [data-desktop-custom-stage] {
    display: grid;
    justify-items: center;
    padding: clamp(16px, 2vw, 28px);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  [data-desktop-custom-stage] > div { width: min(100%, clamp(360px, 52svh, 590px)); }
  [data-desktop-custom-stage] button[aria-label^="Choose "] > div { max-height: none; }
  [data-desktop-custom-stage] button img { object-fit: contain; }
}

/* Feed, Profile and Friends */
@media screen and (min-width: 1024px) {
  .page:is(.social-home-page,.profile-home,.social-friends-page,.social-notifications-page,.desktop-personal-gate),
  .page:has(> .social-profile) {
    width: 100%;
    padding: clamp(25px, 3.2vw, 46px) 0 70px;
  }

  .page.desktop-personal-gate {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .9fr);
    align-items: center;
    gap: clamp(36px, 7vw, 104px);
    min-height: 510px;
    padding-inline: clamp(0px, 2.4vw, 32px);
  }
  .desktop-personal-gate > .page-heading { display: block; margin: 0; max-width: 42rem; }
  .desktop-personal-gate > .page-heading h1 {
    text-wrap: balance;
  }
  .desktop-personal-gate .page-description { max-width: 35rem; font-size: 1.04rem; line-height: 1.65; }
  .desktop-personal-gate .action-row { margin-top: 23px; }

  .desktop-profile-explore, .desktop-double-feature {
    min-width: 0;
    padding: clamp(16px, 1.8vw, 26px);
    display: grid;
    gap: 16px;
    border: 1px solid var(--desktop-line, var(--border));
    border-radius: 12px;
    background: var(--surface);
  }
  .desktop-double-feature h2, .desktop-profile-explore h2 {
    margin: 0;
    font-size: clamp(1.2rem, 1.6vw, 1.45rem);
    line-height: 1.1;
    letter-spacing: -.035em;
  }
  .desktop-double-feature header { display: grid; justify-items: start; gap: 8px; }
  .desktop-double-feature header a { color: var(--accent); font-size: .83rem; line-height: 1.35; }
  .desktop-double-films { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 12px; }
  .desktop-double-films a { display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--text); }
  .desktop-double-art {
    position: relative; isolation: isolate; display: grid; align-items: end; aspect-ratio: 2 / 3;
    container-type: inline-size; margin-bottom: 5px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
    background: repeating-linear-gradient(135deg, transparent 0 22px, #ffffff0a 22px 24px), linear-gradient(145deg, #3b655f, #142a2a 85%);
  }
  .desktop-double-films a:nth-child(2) .desktop-double-art {
    background: repeating-linear-gradient(45deg, transparent 0 22px, #ffffff0a 22px 24px), linear-gradient(155deg, #6a4638, #382a2a 85%);
  }
  .desktop-double-fallback {
    display: block; margin: 0 10% 15%; border-top: 1px solid #ffffff75; padding-top: 7%;
    color: #f6f1e7; font-size: clamp(.85rem, 13cqw, 1.8rem); line-height: 1.06; font-weight: 740; letter-spacing: -.04em; overflow-wrap: anywhere;
  }
  .desktop-double-art picture { position: absolute; inset: 0; }
  .desktop-double-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .desktop-double-films strong { font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }
  .desktop-double-films small { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
  .desktop-double-feature a:hover, .desktop-profile-explore a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
  .desktop-profile-explore { gap: 0; padding-bottom: 6px; }
  .desktop-profile-explore h2 { padding-bottom: 16px; }
  .desktop-profile-explore a {
    position: relative; display: grid; gap: 3px;
    padding: 14px 22px 14px 0; border-top: 1px solid var(--desktop-line, var(--border));
  }
  .desktop-profile-explore a::after {
    content: ""; position: absolute; right: 3px; top: calc(50% - 3px); width: 7px; height: 7px;
    border: solid var(--accent); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
  }
  .desktop-profile-explore a span { color: var(--muted); font-size: .83rem; line-height: 1.4; }

  .social-home-page:has(> .site-tour-feed-activity) {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .9fr);
    grid-template-rows: repeat(6, max-content) minmax(0, 1fr);
    gap: 10px clamp(24px, 3.2vw, 48px);
    align-content: start;
    align-items: start;
  }
  .social-home-page > .site-tour-feed-activity { width: 100%; margin: 0; grid-column: 1; grid-row: 1 / span 7; }
  .social-home-page .site-tour-feed-activity > header { margin: 0 0 15px; min-height: 45px; }
  .film-log-feed-entry > .social-feed-card-header { margin-bottom: 12px; }
  .social-home-page .site-tour-feed-heading, .profile-home .profile-film-log-heading h2 {
    color: var(--text); margin: 0; font-size: clamp(1.8rem, 2.5vw, 2.45rem); line-height: 1.05;
    text-transform: none; letter-spacing: -.045em;
  }
  .social-home-page > button[aria-haspopup="dialog"] { grid-column: 2; grid-row: 1; margin: 0 0 3px; }
  .social-home-page .home-feature-disclosure { width: 100%; margin: 0; grid-column: 2; border-color: var(--desktop-line, var(--border)); box-shadow: none; }
  .social-home-page .home-feature-disclosure.is-watch-tonight { grid-row: 2; }
  .social-home-page .home-feature-disclosure.is-trivia { grid-row: 3; }
  .social-home-page .home-feature-disclosure.is-daily-vote { grid-row: 4; }
  .social-home-page .home-feature-disclosure.is-games { grid-row: 5; }
  .social-home-page > .desktop-double-feature { grid-column: 2; grid-row: 6; margin-top: 8px; }
  .social-home-page .home-feature-disclosure-summary {
    padding: 8px 38px 8px 13px; min-height: 45px; justify-content: start;
    background: var(--surface); box-shadow: none; text-align: left;
  }
  .social-home-page .home-feature-disclosure-summary:hover { background: var(--surface-raised); }
  .social-home-page .home-feature-disclosure-label { font-size: .88rem; }
  .social-home-page .home-feature-disclosure-icon { width: 26px; height: 26px; flex-basis: 26px; font-size: 1.35rem; }
  .social-home-page .home-feature-disclosure-chevron { right: 15px; }

  .social-home-page .is-watch-tonight .watch-tonight-home-card {
    display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 15px;
    background: var(--surface);
  }
  .social-home-page .watch-tonight-home-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .social-home-page .watch-tonight-home-copy :is(.eyebrow,h2) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .social-home-page .watch-tonight-home-copy > p:not(.eyebrow) { margin: 0; line-height: 1.5; }
  .social-home-page .watch-tonight-home-watchlist-link { flex-shrink: 0; padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; color: var(--accent); font-size: .77rem; font-weight: 600; }
  .social-home-page .watch-tonight-home-interaction { gap: 12px; }
  .social-home-page .watch-tonight-scope { background: var(--background); padding: 3px; }
  .social-home-page .watch-tonight-modes { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .social-home-page .watch-tonight-scope button { padding: 5px 4px; min-height: 34px; }
  .social-home-page .watch-tonight-scope button[aria-pressed=true] { color: var(--text); background: var(--surface-raised); box-shadow: inset 0 -2px var(--accent); }
  .social-home-page .watch-tonight-flip-face { grid-template-columns: 72px minmax(0,1fr); padding: 13px; gap: 15px; }
  .social-home-page .watch-tonight-flip-card, .social-home-page .watch-tonight-flip-inner, .social-home-page .watch-tonight-flip-face { min-height: 142px; }
  .social-home-page .watch-tonight-home-face-copy .eyebrow { display: none; }
  .social-home-page .watch-tonight-home-face-copy strong { font-size: 1.1rem; font-weight: 600; }
  .social-home-page .watch-tonight-home-meta { font-size: .81rem; }
  .social-home-page .watch-tonight-home-status { min-height: 0; line-height: 1.5; }

  .profile-home .profile-content-grid, .social-profile .social-profile-columns, .social-public-profile .public-profile-content {
    grid-template-columns: minmax(295px, .9fr) minmax(0, 1.75fr);
    column-gap: clamp(23px, 3.2vw, 46px);
  }
  .profile-home .profile-core-column { padding-right: 0; gap: 12px; }
  .profile-home { gap: 16px; }
  .desktop-profile-library-loading { position:relative; display:block; min-height:clamp(310px,31vw,402px); }
  .desktop-profile-library-loading::after {
    content: ""; position:absolute; inset:0; margin:auto; visibility:hidden;
    width:20px; height:20px; border-radius:50%; border:2px solid var(--border);
    border-top-color:var(--accent); border-right-color:var(--accent);
    animation: profile-shelf-reveal 0s 1s forwards, profile-shelf-spin .8s 1s linear infinite;
  }
  @keyframes profile-shelf-reveal { to { visibility:visible; } }
  @keyframes profile-shelf-spin { to { transform:rotate(1turn); } }
  @media (prefers-reduced-motion: reduce) {
    .desktop-profile-library-loading::after { animation: profile-shelf-reveal 0s 1s forwards; }
  }
  .profile-home .profile-hero, .profile-home .profile-hero-content { min-height: 188px; }
  .profile-home .profile-hero-content { padding: 72px 22px 18px; grid-template-columns: 92px minmax(0,1fr); gap: 18px; }
  .profile-home .profile-avatar { width:92px; height:92px; }
  .profile-home .profile-hero-copy p { margin: 3px 0; }
  .profile-home .desktop-profile-shortcuts { display:flex; gap: 13px; margin-top:6px; }
  .desktop-profile-shortcuts a { font-size: .78rem; color: #fff; text-underline-offset:3px; text-decoration: underline; }
  #film-log-heading { scroll-margin-top: 110px; }
  .desktop-log-filters { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .desktop-log-filters input, .desktop-log-filters select {
    min-height: 36px; max-width:100%; min-width:0; padding:6px 10px; border:1px solid var(--border);
    border-radius:6px; color: var(--text); background:var(--surface); font:inherit; font-size:.84rem;
  }
  .desktop-log-filters input { flex: 1 1 180px; }
  .desktop-log-filters button { color:var(--accent); font-size:.8rem; }
  .profile-home .profile-activity-column, .social-profile .social-profile-activity { padding-left: 0; border-left: 0; gap: 16px; }
  .profile-home .profile-mobile-disclosure, .social-profile .profile-mobile-disclosure { box-shadow: none; }
  .profile-home .profile-mobile-disclosure-trigger, .social-profile .profile-mobile-disclosure-trigger { min-height: 52px; border: none; padding-inline: 16px; }
  .profile-home .profile-mobile-disclosure-trigger:focus-visible, .social-profile .profile-mobile-disclosure-trigger:focus-visible {
    outline: 2px solid var(--accent); outline-offset: -3px;
  }
  .profile-home .profile-film-log-heading, .social-profile-section-heading:has([aria-label="Film Log view"]) {
    display: flex; align-items: center; flex-direction: row; justify-content: space-between; gap: 12px;
  }
  .profile-home .profile-film-log-column > button[aria-haspopup="dialog"] {
    width: fit-content; min-width: 170px; min-height: 40px; padding: 7px 18px; font-size: .92rem;
  }
  .social-profile [aria-label="Film Log posters"], .profile-home [aria-label="Film Log posters"] {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px;
  }
  [aria-label="Film Log view"] button:has(.desktop-log-view-label) { display: inline-flex; justify-content: center; align-items: center; gap: 6px; width: auto; min-height: 32px; padding: 4px 9px; cursor: pointer; }
  .desktop-log-view-label { display: inline; font-size: .78rem; font-weight: 650; }
  .desktop-log-poster-title { display: block; overflow: hidden; margin-top: 7px; font-size: .85rem; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
  .desktop-log-poster-title + div { justify-content: flex-start; margin-top: 2px; }
  .social-public-profile .public-profile-reviews { grid-column: 2; }
  .social-public-profile .public-profile-review-card { padding: 16px; }

  .social-friends-page .social-friends-layout:not([hidden]) {
    grid-template-columns: minmax(265px, 1fr) minmax(0, 1.65fr);
    grid-template-rows: max-content max-content minmax(0, 1fr);
    align-items: start; gap: 15px clamp(24px, 3vw, 40px);
  }
  .social-friends-layout > [aria-labelledby="invite-friends-heading"] { grid-column: 1; grid-row: 1; }
  .social-friends-layout > .social-section:has(> .social-search) { grid-column: 1; grid-row: 2; }
  .social-friends-page .social-connection-sections { grid-column: 2; grid-row: 1 / span 3; }
  .social-friends-page .friends-hub { gap: 22px; }
  .social-notifications-page { max-width: 1000px; }
  .social-notifications-page > .social-feed-card { margin: 0 0 16px; }
  .social-notifications-page > details > summary { cursor: pointer; }
  #main-content :is(.desktop-settings-hub.page, .page.personalization-page) {
    width: min(100%, 1040px); margin-inline: auto;
  }
  .desktop-settings-hub .desktop-log-default { display: contents; }
  .personalization-form { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .personalization-form > :is([aria-labelledby="personalization-default-view"], .personalization-save-row) {
    grid-column: 1 / -1;
  }
  .personalization-form .personalization-section { align-content: start; padding: 20px; }
  .personalization-form .personalization-choice-grid:not(.is-density) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .personalization-form .personalization-choice-grid.is-density { grid-template-columns: 1fr; }
  .personalization-form .personalization-toggle-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .account-data-page .import-history-link {
    justify-self: start; color: var(--accent); text-decoration: underline; text-underline-offset: .2em;
  }
  .account-data-page .import-data-download-content { max-width: 76ch; line-height: 1.55; }
}

/* The desktop rail uses the same links and account controls as the compact header. */
@media screen and (min-width: 1024px) {


  /* Keep the header's measured top occlusion accurate for the tour and resize logic. */
  .app-shell .desktop-header {
    height: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }
  .desktop-header .desktop-header-inner {
    position: fixed;
    inset: var(--local-preview-height, 0px) auto 0 0;
    width: var(--desktop-sidebar-width);
    min-height: 0;
    margin: 0;
    padding: 16px 10px 12px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    background: var(--surface);
    border-right: 1px solid var(--desktop-line);
  }
  .desktop-header-inner > .brand {
    margin: 0;
    flex: none;
    min-height: 38px;
    padding-inline: 6px;
    display: flex;
    align-items: center;
  }
  .desktop-header .brand .brand-logo img { width: 100%; max-width: 142px; height: auto; }
  .desktop-header-inner > .desktop-nav {
    display: grid;
    align-content: start;
    align-self: stretch;
    gap: 3px;
    flex: none;
  }
  .desktop-nav .nav-link {
    width: auto;
    min-width: 0;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 40px;
    height: auto;
    padding: 7px 10px;
    gap: 10px;
    color: var(--text);
    font-size: .94rem;
    font-weight: 600;
    border-radius: 7px;
  }
  .desktop-nav > .primary-navigation-indicator { display: none; }
  .desktop-nav .nav-link[aria-controls^="rail-sections-"]::before {
    content: ""; position: absolute; inset: 0 -11px 0 auto; width: 12px;
  }
  .desktop-nav .nav-link > span {
    position: static; width: auto; height: auto; margin: 0; overflow: visible;
    white-space: nowrap; clip: auto;
  }
  .desktop-section-flyout {
    position: fixed;
    z-index: 3;
    left: calc(var(--desktop-sidebar-width) - 1px);
    width: max-content;
    min-width: 180px;
    max-height: calc(100dvh - var(--local-preview-height, 0px) - 8px);
    overflow-y: auto;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--desktop-line);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgb(0 0 0 / .2);
  }
  .desktop-section-flyout a {
    display: flex; align-items: center; gap: 10px;
    min-height: 36px; padding: 6px 10px; border-radius: 5px;
    color: var(--text); font-size: .86rem; font-weight: 550;
  }
  .desktop-section-flyout a:hover, .desktop-section-flyout a:focus-visible { background: var(--surface-raised); }
  .desktop-section-flyout a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .desktop-section-flyout a[aria-current=page] { background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
  .desktop-nav .desktop-section-flyout .nav-icon, .rail-trivia-icon { width: 17px; height: 17px; flex: none; }
  .desktop-nav .nav-link > .nav-icon { display: none; }
  .desktop-nav .nav-link > .rail-nav-emoji {
    display: inline-grid; place-items: center; width: 20px; height: 22px; flex: none;
    font: 18px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  }
  .desktop-nav .nav-link:hover { background: var(--surface-raised); }
  .desktop-nav .nav-link[aria-current=page] {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  }
  .desktop-nav .nav-link[aria-current=page]::after {
    content: ""; position: absolute; background: var(--primary);
    inset: 8px auto 8px 0;
    width: 3px;
    height: auto;
    border-radius: 3px;
  }

  .desktop-header :is(.header-account-actions, .header-guest-actions) {
    margin-top: auto;
    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid var(--desktop-line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 5px;
    flex: none;
  }
  .desktop-header .header-guest-actions { grid-template-columns: minmax(0, 1fr); }
  .desktop-header .rail-action-label[hidden], .desktop-header .rail-account-name[hidden] { display: block; }
  .desktop-header .global-search-link:not(.desktop-search-trigger) {
    width: 100%;
    height: auto;
    min-height: 42px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    color: var(--muted);
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 550;
  }
  .desktop-header .global-search-link:not(.desktop-search-trigger) .nav-icon { width: 17px; height: 17px; }
  .desktop-header .global-search-link:not(.desktop-search-trigger):hover,
  .desktop-header .global-search-link[aria-current=page] { color: var(--text); background: var(--surface-raised); }
  .desktop-header :is(.desktop-search-trigger, .global-search-link.initial-rail-search) {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    min-height: 36px;
    height: 36px;
    padding: 0 8px;
    gap: 7px;
    border: 1px solid var(--desktop-line);
    border-radius: 7px;
    background: var(--background);
    color: var(--muted);
    font-size: .8125rem;
  }
  .desktop-header .desktop-search-trigger .nav-icon { width: 16px; height: 16px; }
  .desktop-header .desktop-search-trigger kbd {
    margin-left: auto; justify-content: center; width: 18px; border: 1px solid var(--desktop-line);
    border-radius: 3px; font: inherit; font-size: .75rem; line-height: 18px;
  }
  .desktop-header .desktop-search-trigger:hover { color: var(--text); border-color: var(--muted); }
  .desktop-header .header-auth-link { width: 100%; min-height: 36px; height: 36px; font-size: .84rem; }
  .desktop-header .account-menu-root,
  .desktop-header .initial-rail-profile { grid-column: 1 / -1; }
  .desktop-header .account-avatar-link,
  .desktop-header .global-search-link.initial-rail-profile {
    width: 100%;
    min-height: 40px;
    height: auto;
    padding: 5px !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    border-radius: 7px;
    text-align: left;
    color: var(--text);
  }
  .desktop-header .account-avatar-link:hover,
  .desktop-header .account-avatar-link[aria-expanded=true] { background: var(--surface-raised) !important; }
  .desktop-header .account-avatar-link::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-inline: auto 3px;
    border-top: 1.5px solid var(--muted);
    border-right: 1.5px solid var(--muted);
    transform: rotate(45deg);
    flex: none;
  }
  .desktop-header .account-avatar { width: 27px; flex: none; font-size: .77rem; }
  .desktop-header .rail-account-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 650;
  }
  .desktop-header .account-avatar-notification-count { top: 1px; left: 16px; right: auto; }
  .desktop-header .account-menu-panel {
    position: fixed;
    inset: auto auto 12px calc(var(--desktop-sidebar-width) + 6px);
    max-height: calc(100dvh - var(--local-preview-height, 0px) - 24px);
    overflow: auto;
    overscroll-behavior: contain;
  }
  .desktop-header .account-menu-panel::before { display: none; }
  .desktop-header :is(.brand, .nav-link, .global-search-link, .header-auth-link, .account-menu-item):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
  }
  .desktop-header .navigation-route-progress {
    position: fixed;
    inset: var(--local-preview-height, 0px) 0 auto var(--desktop-sidebar-width);
  }
}
