/* Mobile redesign r3 (self-check fixes on r2: bottom-sheet view picker, type scale restored, dead rules removed).
   r2: floating tab bar, nothing under it, motion.
   Based on r1. Phones only (≤719px); desktop and tablet keep their current layout.
   Bottom tab bar, auto-hiding header, browse rails, two-column film grid, a watch page that
   reaches the film's own content before the discussion, compact plan cards, readable small type. */
@media (max-width: 719px) {
  /* ---------- Shell: floating tab bar ---------- */
  :root { --m-ease: cubic-bezier(.32, .72, 0, 1); --m-spring: cubic-bezier(.34, 1.4, .5, 1); --m-tab-space: calc(84px + env(safe-area-inset-bottom, 0px)); }
  html.m-tabs body { padding-bottom: var(--m-tab-space); }
  .m-tabbar {
    position: fixed; z-index: 95; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 24px; isolation: isolate;
    background: linear-gradient(180deg, rgba(28, 36, 48, .72), rgba(10, 14, 20, .82));
    -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .35),
      inset 0 1px 0 rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(185, 209, 225, .1);
    transform: translate3d(0, 0, 0); opacity: 1;
    transition: transform .5s var(--m-ease), opacity .35s ease;
  }
  html.m-tabs-enter .m-tabbar { transform: translate3d(0, 140%, 0); opacity: 0; }
  html.m-hide-tabs .m-tabbar, html.m-typing .m-tabbar, html.m-menu-open .m-tabbar {
    transform: translate3d(0, calc(100% + 24px + env(safe-area-inset-bottom, 0px)), 0); opacity: .4;
  }
  .m-tab-ink {
    position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 5);
    border-radius: 18px; pointer-events: none;
    background: radial-gradient(120% 140% at 50% 0%, rgba(179, 217, 235, .26), rgba(179, 217, 235, .1) 75%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(179, 217, 235, .2);
    transform: translate3d(calc(var(--m-ink, 0) * 100%), 0, 0);
    transition: transform .55s var(--m-spring);
  }
  .m-tabbar.is-still .m-tab-ink { transition: none; }
  .m-tabbar a {
    position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 54px; border-radius: 18px; color: #7f909c; text-decoration: none;
    font: 500 10.5px/1 'Sora', 'Segoe UI', sans-serif; letter-spacing: .02em;
    -webkit-tap-highlight-color: transparent; transition: color .3s ease, transform .35s var(--m-spring);
  }
  .m-tabbar a svg { width: 23px; height: 23px; transition: transform .45s var(--m-spring), stroke-width .3s; }
  .m-tabbar a .m-fill { fill: currentColor; fill-opacity: 0; transition: fill-opacity .35s ease; }
  .m-tabbar a[aria-current] { color: #f4f7f8; }
  .m-tabbar a[aria-current] svg { transform: translateY(-1px); stroke-width: 1.8; }
  .m-tabbar a[aria-current] .m-fill { fill-opacity: .22; }
  .m-tabbar a:active { transform: scale(.9); transition-duration: .12s; }

  header.masthead { transition: transform .5s var(--m-ease), background-color .3s ease, box-shadow .3s ease !important; will-change: transform; }
  html.m-hide-head header.masthead { transform: translate3d(0, -110%, 0) !important; }
  html.m-scrolled header.masthead {
    background: rgba(5, 7, 11, .78) !important; -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 1px 0 rgba(185, 209, 225, .08), 0 10px 30px -18px rgba(0, 0, 0, .9);
  }
  /* Account lives in the tab bar; the header keeps the logo and the menu. */
  html.m-tabs .masthead .header-tools .nav-links { display: none !important; }


  /* ---------- Home: series become swipeable rails ---------- */
  .film-journey .episode-rail--story {
    display: flex !important; grid-template-columns: none !important; gap: 12px;
    overflow-x: auto !important; overflow-y: hidden !important; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--site-gutter, 20px)) !important; padding: 4px var(--site-gutter, 20px) 14px !important;
    scroll-padding-inline: var(--site-gutter, 20px); scrollbar-width: none;
    width: calc(100% + 2 * var(--site-gutter, 20px)); max-width: 100vw; min-width: 0; contain: inline-size;
  }
  .film-journey, .film-journey > .chapter, #solar-system { min-width: 0; max-width: 100%; }
  .film-journey .episode-rail--story::-webkit-scrollbar { display: none; }
  .film-journey .episode-rail--story > .episode-card--story {
    flex: 0 0 min(80vw, 330px); min-width: 0; scroll-snap-align: start;
    margin: 0 !important; padding-bottom: 0; border-bottom: 0;
  }
  .film-journey .episode-card--story .cover-link { border-radius: 12px; overflow: hidden; }
  .film-journey .episode-card--story > p {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  .film-journey .chapter-heading { margin-bottom: 8px; }

  /* ---------- Films: sticky search, scrolling chips, two-column grid ---------- */
  main .wrap > .sub.sub-lines { font-size: 14px; line-height: 1.55; margin-bottom: 12px; }
  /* Search on its own row; view picker and series chips share one swipeable row with an edge fade. */
  .library-controls { position: static !important; margin: 4px 0 8px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
  .library-controls .toolbar { display: block !important; margin: 0 0 12px !important; }
  .library-controls .library-search { display: block !important; width: 100% !important; margin: 0 !important; }
  .library-controls .library-search .search { width: 100% !important; min-height: 48px !important; border-radius: 14px !important; font-size: 16px !important; }
  .library-controls :is(.library-search > span, #view-filter-label) {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .library-controls .library-view { display: none !important; }
  .m-filter-row {
    display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--site-gutter, 20px)); padding: 2px var(--site-gutter, 20px) 4px; scroll-padding-inline: var(--site-gutter, 20px);
  }
  /* Edge fade drawn as an overlay: a mask would clip the picker sheet and trap it in a stacking context. */
  .library-controls { position: relative !important; }
  .library-controls::after {
    content: ""; position: absolute; right: calc(-1 * var(--site-gutter, 20px)); bottom: 0; width: 36px; height: 52px; pointer-events: none;
    background: linear-gradient(90deg, rgba(5, 7, 11, 0), #05070b 85%);
  }
  .m-filter-row::-webkit-scrollbar { display: none; }
  .m-filter-row > .library-view { display: block !important; flex: 0 0 auto; margin: 0 !important; width: auto !important; }
  .m-filter-row .library-picker-trigger {
    height: 44px !important; min-height: 44px !important; padding: 0 14px !important; border-radius: 999px !important; width: auto !important; gap: 6px;
    font-size: 14px !important; white-space: nowrap; background: rgba(179, 217, 235, .08) !important; border-color: rgba(179, 217, 235, .28) !important;
  }
  .m-filter-row .library-picker-trigger svg { width: 16px; height: 16px; }
  /* The view picker opens as a bottom sheet: the swipeable row would clip a dropdown. */
  .m-filter-row .library-picker-list:not([hidden]) {
    position: fixed !important; z-index: 140 !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
    width: auto !important; max-height: 70vh; overflow-y: auto; margin: 0 !important; transform: none !important;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px)) !important; border-radius: 22px 22px 0 0 !important; border: 0 !important;
    background: #111a24 !important; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55), 0 -12px 40px rgba(0, 0, 0, .5) !important;
    animation: m-sheet .38s var(--m-ease);
  }
  .m-filter-row .library-picker-list::before {
    content: ""; display: block; width: 36px; height: 4px; margin: 2px auto 10px; border-radius: 2px; background: rgba(185, 209, 225, .35);
  }
  .m-filter-row .library-picker-option { display: flex !important; align-items: center; min-height: 48px; padding: 0 14px !important; border-radius: 12px; font-size: 16px !important; }
  .m-filter-row .library-picker-option.is-active, .m-filter-row .library-picker-option[aria-selected="true"] { background: rgba(179, 217, 235, .12); }
  html.m-sheet-open .m-tabbar { transform: translate3d(0, calc(100% + 24px + env(safe-area-inset-bottom, 0px)), 0); opacity: 0; }
  @keyframes m-sheet { from { transform: translateY(100%); } }
  .m-filter-row .m-filter-sep { flex: 0 0 1px; align-self: stretch; margin: 8px 2px; background: rgba(185, 209, 225, .18); }
  .library-controls .filters, .m-filter-row .filters {
    display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; overflow: visible !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; flex: 0 0 auto;
  }
  .m-filter-row .filters .filter {
    flex: 0 0 auto; height: 44px; min-height: 44px; padding: 0 16px !important; border-radius: 999px !important; white-space: nowrap;
    font-size: 14px !important; border: 1px solid rgba(185, 209, 225, .2) !important; background: transparent !important; color: #c3d1da !important;
  }
  .m-filter-row .filters .filter.on, .m-filter-row .filters .filter[aria-pressed="true"] {
    background: #f4f7f8 !important; color: #05070b !important; border-color: #f4f7f8 !important;
  }
  .library-catalog .lib-group:not(.lib-coming) > .grid,
  .library-catalog .library-extras > .grid {
    display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 18px 12px;
  }
  .library-catalog .lib-group:not(.lib-coming) .card .thumb { border-radius: 10px; }
  .library-catalog .lib-group:not(.lib-coming) .card .card-body { padding-top: 8px; }
  .library-catalog .lib-group:not(.lib-coming) .card h3 { font-size: 14px; line-height: 1.32; margin: 0 0 3px; }
  .library-catalog .lib-group:not(.lib-coming) .card .meta { font-size: 12px; line-height: 1.35; }
  .library-catalog .card .thumb :is(.tag, .dur, .lock) { font-size: 10.5px; }
  .library-catalog .cal-group { margin-top: 8px; }

  /* ---------- Watch: the film first, then explainers and more films; discussion folded ---------- */
  main.player-page .player-main { display: flex !important; flex-direction: column; }
  main.player-page .player-main > * { order: 20; }
  main.player-page .player-main > .stage { order: 0; }
  main.player-page .player-main > #youtube-tools { order: 1; }
  main.player-page .player-main > #v-tag { order: 2; margin-top: 18px; }
  main.player-page .player-main > #v-title { order: 3; }
  main.player-page .player-main > #v-en { order: 4; }
  main.player-page .player-main > #v-meta { order: 5; }
  main.player-page .player-main > #film-payment { order: 6; margin-top: 16px; }
  main.player-page .player-main > #watch-comment-entry { order: 7; }
  main.player-page .player-main > .watch-desc-box { order: 8; }
  main.player-page .player-main > #comments { order: 9; }
  main.player-page .player-main > nav.meta { order: 10; }
  main.player-page .player-main > .film-explainer-cards { order: 11; }
  main.player-page .player-main > .film-reading-cards { order: 12; }
  main.player-page .player-main > #column-rec { order: 13; }
  main.player-page .player-main > .related-block { order: 14; }

  #comment-log.m-folded > .ytc-thread:nth-child(n + 4) { display: none; }
  .m-comments-more {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 6px 0 8px;
    border: 1px solid rgba(185, 209, 225, .22); border-radius: 12px; background: rgba(255, 255, 255, .03);
    color: #f4f7f8; font: 500 14px/1.2 'Sora', 'Segoe UI', sans-serif; cursor: pointer;
  }
  .m-comments-more:active { background: rgba(255, 255, 255, .08); }
  .ytc-actions .ytc-act { min-height: 44px; min-width: 44px; padding-inline: 10px; }
  .ytc-actions { margin-left: -10px; gap: 8px; }
  .ytc-thread button[aria-expanded] { min-height: 44px !important; display: inline-flex !important; align-items: center; }
  .ytc-more { display: inline-flex !important; align-items: center; min-height: 44px; margin-bottom: 2px; }
  :is(.ytc-replies-toggle, [data-replies-toggle], .ytc-toggle) { min-height: 44px; }
  .comment-bar :is(.emoji-btn, [data-emoji], .ytc-emoji, button[aria-label*="moji"]) { min-width: 44px; min-height: 44px; }
  .film-journey .episode-card--story h3 a { display: inline-block; padding-block: 8px; margin-block: -8px; }
  footer .footer-links { row-gap: 4px !important; }

  /* Explainer and article cards: a compact row instead of a full-width poster each. */
  .player-main .column-rec > .column-rec-card:not(.is-text-only) {
    display: grid !important; grid-template-columns: 42% minmax(0, 1fr); gap: 12px; align-items: center;
  }
  .player-main .column-rec > .column-rec-card .thumb { margin: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; }
  .player-main .column-rec > .column-rec-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .player-main .column-rec > .column-rec-card h3 { font-size: 15px; line-height: 1.3; margin: 0 0 4px; }
  .player-main .column-rec > .column-rec-card .column-rec-copy p:not(.film-explainer-credit) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13px;
  }

  /* ---------- Plans: what you get first, then the details ---------- */
  html.m-plans .wrap > :is(.plans-jump, .plans-season-highlight) { display: none !important; }
  .m-plan-picker { display: grid; gap: 12px; margin: 18px 0 30px; }
  .m-plan {
    position: relative; display: grid; gap: 10px; padding: 18px; border-radius: 20px; overflow: hidden; isolation: isolate;
    background: linear-gradient(160deg, rgba(30, 40, 54, .9), rgba(12, 17, 24, .95));
    box-shadow: inset 0 0 0 1px rgba(185, 209, 225, .12), 0 20px 40px -28px rgba(0, 0, 0, .9);
  }
  .m-plan--featured { box-shadow: inset 0 0 0 1px rgba(232, 197, 110, .55), 0 24px 50px -26px rgba(232, 197, 110, .35); }
  .m-plan--featured::before {
    content: ""; position: absolute; z-index: -1; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(232, 197, 110, .22), transparent);
  }
  .m-plan__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .m-plan__name { margin: 0; font: 600 18px/1.2 'Sora', 'Segoe UI', sans-serif; color: #f4f7f8; }
  .m-plan__badge {
    justify-self: start; padding: 4px 10px; border-radius: 999px; font: 600 11px/1.2 'Sora', sans-serif; letter-spacing: .06em; text-transform: uppercase;
    color: #1c1405; background: linear-gradient(90deg, #f3d891, #e2b75c);
  }
  .m-plan__price { font: 600 24px/1 'Sora', 'Segoe UI', sans-serif; color: #f4f7f8; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .m-plan__price small { display: block; margin-top: 5px; font-size: 12px !important; line-height: 1 !important; font-weight: 500; color: #9fb3c0; text-align: right; }
  .m-plan--single .m-plan__actions { grid-template-columns: 1fr; }
  .m-plan--single .m-plan__more { display: none; }
  .m-plan__lead { margin: 0; font-size: 15px; line-height: 1.45; color: #dbe6ec; }
  .m-plan__value { margin: 0; font-size: 13px; color: #e8c56e; font-weight: 600; }
  .m-plan__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
  .m-plan__list li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.45; color: #c3d1da; }
  .m-plan__list li::before {
    content: ""; position: absolute; left: 2px; top: .38em; width: 13px; height: 7px; border: solid #b3d9eb; border-width: 0 0 2px 2px;
    transform: rotate(-45deg); transform-origin: center; border-radius: 1px;
  }
  .m-plan__actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 4px; }
  .m-plan__buy, .m-plan__more {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px;
    font: 600 15px/1 'Sora', 'Segoe UI', sans-serif; text-decoration: none; cursor: pointer; border: 0;
    transition: transform .35s var(--m-spring), background-color .2s;
  }
  .m-plan__buy { background: #f4f7f8; color: #05070b; }
  .m-plan--featured .m-plan__buy { background: linear-gradient(90deg, #f3d891, #e2b75c); color: #1c1405; }
  .m-plan__more { background: rgba(255, 255, 255, .06); color: #e6eef3; box-shadow: inset 0 0 0 1px rgba(185, 209, 225, .2); }
  .m-plan__buy:active, .m-plan__more:active { transform: scale(.96); }
  .m-plan-notes { margin-top: 28px; }
  .m-plan-notes p { font-size: 12.5px !important; line-height: 1.55; color: #8ea2af !important; }

  /* Single films: one tidy row each, the price lives in the button. */
  #plans.pricing { display: grid !important; grid-template-columns: 1fr !important; gap: 10px; }
  #plans.pricing > .price-card {
    display: grid !important; grid-template-columns: 116px minmax(0, 1fr) !important; grid-template-rows: none !important;
    grid-auto-rows: auto !important; grid-auto-flow: row !important; column-gap: 14px; row-gap: 3px; align-items: center;
    text-align: left !important; padding: 12px !important; min-height: 0 !important; border-radius: 18px !important;
  }
  #plans.pricing > .price-card > .shop-cover {
    grid-column: 1 !important; grid-row: 1 / 4 !important; align-self: center !important; margin: 0 !important;
    width: 116px !important; height: auto !important; aspect-ratio: 16 / 9 !important; min-height: 0 !important;
    border-radius: 10px !important; overflow: hidden; background: #0b1118;
  }
  #plans.pricing > .price-card > .shop-cover img { display: block; width: 100% !important; height: 100% !important; object-fit: cover !important; }
  #plans.pricing > .price-card > :not(.shop-cover) { grid-column: 2 !important; margin: 0 !important; text-align: left !important; }
  #plans.pricing > .price-card > .kicker { grid-row: 1 !important; font-size: 11px; align-self: end; }
  #plans.pricing > .price-card > h3 { grid-row: 2 !important; font-size: 16px !important; line-height: 1.25 !important; }
  #plans.pricing > .price-card > .plan-art-pack { grid-row: 3 !important; font-size: 12px !important; align-self: start; }
  #plans.pricing > .price-card > :is(.amount, p.meta:not(.plan-art-pack)) { display: none !important; }
  #plans.pricing > .price-card > .btn {
    grid-column: 1 / -1 !important; grid-row: 4 !important; margin-top: 10px !important; min-height: 46px; border-radius: 12px !important;
  }

  /* ---------- Blog index and the homepage blog: the newest post large, the rest as compact rows ---------- */
  .blog-list > .blog-card.has-image:not(:first-child) > a,
  .home-blog-side > .home-blog-side-card {
    display: grid !important; grid-template-columns: 38% minmax(0, 1fr); column-gap: 14px; align-items: start;
  }
  .blog-list > .blog-card.has-image:not(:first-child) { padding-block: 14px !important; margin: 0 !important; }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-card-media,
  .home-blog-side > .home-blog-side-card .home-blog-media {
    margin: 0 !important; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; align-self: start;
  }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-card-media img,
  .home-blog-side > .home-blog-side-card .home-blog-media img { width: 100%; height: 100%; object-fit: cover; }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-card-copy,
  .home-blog-side > .home-blog-side-card .home-blog-copy { padding: 0 !important; min-width: 0; }
  .blog-list > .blog-card.has-image:not(:first-child) h2,
  .home-blog-side > .home-blog-side-card h3 { font-size: 15px !important; line-height: 1.3 !important; margin: 4px 0 0 !important; }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-meta { font-size: 12px !important; gap: 8px; }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-meta span { display: none; }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-card-summary,
  .home-blog-side > .home-blog-side-card :is(.home-blog-summary, p:not(.blog-date)) {
    display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    font-size: 13px !important; line-height: 1.45 !important; margin: 6px 0 0 !important;
  }
  .blog-list > .blog-card.has-image:not(:first-child) .blog-card-read,
  .home-blog-side > .home-blog-side-card .home-blog-read { display: none !important; }
  .home-blog-side > .home-blog-side-card { padding-block: 12px !important; }
  .home-blog-side > .home-blog-side-card .home-blog-media { grid-column: 1 !important; grid-row: 1 / 4 !important; }
  .home-blog-side > .home-blog-side-card .home-blog-copy > * { grid-column: 2 !important; }
  .home-blog-side > .home-blog-side-card .home-blog-copy > .blog-date { grid-row: 1 !important; }
  .home-blog-side > .home-blog-side-card .home-blog-copy > h3 { grid-row: 2 !important; }
  .home-blog-side > .home-blog-side-card .home-blog-copy > :not(.blog-date):not(h3) { grid-row: 3 !important; }
  .home-blog-side > .home-blog-side-card .home-blog-copy {
    display: block !important; grid-column: 2 !important; grid-row: 1 !important; text-align: left !important;
  }
  .home-blog-side > .home-blog-side-card .blog-date { font-size: 12px !important; margin: 0 !important; }

  .ytc-more { min-height: 40px !important; display: inline-flex; align-items: center; }

  /* ---------- Nothing sits under the tab bar ---------- */
  html.m-tabs #worlds .world-hero-content { padding-bottom: calc(var(--m-tab-space) + 8px) !important; }
  html.m-tabs :is(.privacy-banner, .pwa-install-hint) { bottom: calc(var(--m-tab-space) + 4px) !important; transition: bottom .5s var(--m-ease); }
  html.m-tabs.m-hide-tabs :is(.privacy-banner, .pwa-install-hint) { bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important; }

  /* ---------- Rails: focus, progress ---------- */
  .film-journey .episode-rail--story > .episode-card--story {
    --f: 0; transform-origin: 50% 60%;
    transform: scale(calc(1 - var(--f) * .06)); opacity: calc(1 - var(--f) * .45);
    will-change: transform, opacity;
  }
  .film-journey .episode-card--story .cover-link img { transform: scale(calc(1.06 - var(--f) * .06)); transition: transform .6s var(--m-ease); }
  .m-rail-progress {
    position: relative; height: 2px; margin: 2px 0 6px; border-radius: 2px; overflow: hidden;
    background: rgba(185, 209, 225, .12);
  }
  .m-rail-progress > i {
    position: absolute; inset: 0 auto 0 0; width: var(--m-w, 30%); border-radius: inherit;
    background: linear-gradient(90deg, rgba(179, 217, 235, .5), #e8f3f8);
    transform: translate3d(var(--m-x, 0%), 0, 0);
  }

  /* ---------- Touch feedback ---------- */
  :is(.library-catalog .card, .episode-card--story .cover-link, .blog-list > .blog-card > a, .home-blog-side-card,
      .column-rec-card, .related-card, #plans .price-card, .m-comments-more, .library-controls .filter) {
    transition: transform .4s var(--m-spring), opacity .4s ease;
    -webkit-tap-highlight-color: transparent;
  }
  :is(.library-catalog .card, .episode-card--story .cover-link, .blog-list > .blog-card > a, .home-blog-side-card,
      .column-rec-card, .related-card, .m-comments-more, .library-controls .filter):active { transform: scale(.97); transition-duration: .12s; }
  #plans .price-card .btn:active { transform: scale(.97); }

  /* ---------- Entrances: items rise in as they reach the screen ---------- */
  .m-rv { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); }
  .m-rv.m-in {
    opacity: 1; transform: none;
    transition: opacity .7s ease, transform .8s var(--m-ease);
    transition-delay: calc(var(--m-i, 0) * 55ms);
  }
  #comment-log > .ytc-thread.m-pop { animation: m-pop .55s var(--m-ease) both; animation-delay: calc(var(--m-i, 0) * 40ms); }
  @keyframes m-pop { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
  .m-comments-more { position: relative; overflow: hidden; }
  .m-comments-more::after {
    content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%);
    transform: translateX(-100%); animation: m-sheen 2.8s ease-in-out 1s 2;
  }
  @keyframes m-sheen { to { transform: translateX(100%); } }

  /* ---------- Player: ambient fill, one clear action before playback, a calm control bar ---------- */
  main.player-page .stage {
    position: relative; border-radius: 16px !important; overflow: hidden; isolation: isolate; background: #05070b !important;
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(185, 209, 225, .08);
  }
  main.player-page .stage::before {
    content: ""; position: absolute; z-index: -1; inset: -12%; pointer-events: none;
    background: var(--m-poster, none) center / cover no-repeat; filter: blur(26px) saturate(140%) brightness(.45);
    opacity: .9; transition: opacity .6s ease;
  }
  main.player-page .stage > :is(video, .stage-cover) { background: transparent !important; }
  main.player-page .stage > .stage-cover { object-fit: contain !important; }
  main.player-page .stage.is-youtube::before { display: none; }

  /* Before the first play: only the big play button. */
  main.player-page .stage.has-cover:not(.is-playing) #pc,
  main.player-page .stage.has-cover:not(.is-playing) #stage-toast { opacity: 0 !important; visibility: hidden !important; }
  main.player-page .stage #pc-center {
    width: 68px !important; height: 68px !important; border-radius: 50% !important; border: 0 !important;
    background: rgba(255, 255, 255, .14) !important; color: #fff;
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 10px 30px rgba(0, 0, 0, .45);
    transition: transform .4s var(--m-spring), opacity .3s ease, background-color .2s;
  }
  main.player-page .stage #pc-center svg { width: 28px; height: 28px; margin-left: 3px; }
  main.player-page .stage #pc-center:active { transform: translate(-50%, -50%) scale(.9); }
  main.player-page .stage #stage-toast.m-autoplay-hint { display: none !important; }
  main.player-page .stage #stage-toast {
    left: 50% !important; right: auto !important; top: auto !important; bottom: 64px !important; transform: translateX(-50%);
    max-width: calc(100% - 32px); padding: 8px 14px !important; border-radius: 999px !important; font-size: 13px !important;
    background: rgba(5, 7, 11, .72) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  main.player-page .stage .player-load-status {
    position: absolute !important; left: 50% !important; top: 50% !important; right: auto !important; bottom: auto !important;
    transform: translate(-50%, calc(-50% - 46px)); margin: 0 !important; padding: 6px 12px !important; border-radius: 999px;
    font-size: 12.5px !important; white-space: nowrap; background: rgba(5, 7, 11, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }

  /* Control bar */
  main.player-page .stage #pc {
    left: 0 !important; right: 0 !important; bottom: 0 !important; padding: 28px 8px 4px !important;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .78)) !important;
    transition: opacity .35s ease, transform .45s var(--m-ease), visibility .35s;
  }
  main.player-page .stage.is-chrome-off #pc { opacity: 0; transform: translateY(8px); }
  main.player-page .stage #pc .pc-bar { display: flex !important; align-items: center !important; gap: 6px !important; min-height: 44px; }
  main.player-page .stage #pc :is(.pc-time, .pc-dur) {
    position: static !important; transform: none !important; font: 500 13px/1 'Sora', 'Segoe UI', sans-serif !important;
    font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .92) !important; letter-spacing: 0;
  }
  main.player-page .stage #pc .pc-dur { color: rgba(255, 255, 255, .6) !important; margin-left: 4px; }
  main.player-page .stage #pc .pc-spacer { flex: 1 1 auto; }
  main.player-page .stage #pc :is(#pc-vol, #quality, .pc-settings-label) { display: none !important; }
  main.player-page .stage #pc :is(.pc-btn, .pc-text) {
    min-width: 44px !important; min-height: 44px !important; padding: 0 !important; display: inline-flex !important;
    align-items: center; justify-content: center; border-radius: 12px; transition: transform .3s var(--m-spring), background-color .2s;
  }
  main.player-page .stage #pc :is(.pc-btn, .pc-text) svg { width: 22px; height: 22px; }
  main.player-page .stage #pc :is(.pc-btn, .pc-text):active { transform: scale(.88); background: rgba(255, 255, 255, .12); }
  /* Seek: a 44px touch strip with a thin track that thickens while dragging. */
  main.player-page .stage #pc .pc-timeline { position: relative; margin: 0 8px; }
  main.player-page .stage #pc .pc-seek { height: 28px !important; display: flex; align-items: center; touch-action: none; }
  main.player-page .stage #pc .pc-seek::before {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 3px;
    background: rgba(255, 255, 255, .22); transition: height .25s var(--m-ease), margin .25s var(--m-ease);
  }
  main.player-page .stage #pc :is(.pc-buf, .pc-played) {
    top: 50% !important; height: 3px !important; margin-top: -1.5px; border-radius: 3px; bottom: auto !important;
    transition: height .25s var(--m-ease), margin .25s var(--m-ease);
  }
  main.player-page .stage #pc .pc-buf { background: rgba(255, 255, 255, .32) !important; }
  main.player-page .stage #pc .pc-played { background: linear-gradient(90deg, #b3d9eb, #f4f7f8) !important; }
  main.player-page .stage #pc .pc-played::after {
    content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 4px rgba(179, 217, 235, .25), 0 2px 6px rgba(0, 0, 0, .5);
    transform: scale(.85); transition: transform .3s var(--m-spring);
  }
  main.player-page .stage.is-touch-seeking #pc :is(.pc-seek::before, .pc-buf, .pc-played),
  main.player-page .stage #pc .pc-seek:active :is(.pc-buf, .pc-played) { height: 6px !important; margin-top: -3px; }
  main.player-page .stage.is-touch-seeking #pc .pc-played::after,
  main.player-page .stage #pc .pc-seek:active .pc-played::after { transform: scale(1.25); }
  main.player-page .stage #pc .pc-tip {
    bottom: 26px !important; padding: 5px 9px !important; border-radius: 8px !important; font: 600 12px/1 'Sora', sans-serif !important;
    background: rgba(5, 7, 11, .85) !important; font-variant-numeric: tabular-nums;
  }
  /* Settings as a bottom sheet. */
  main.player-page .stage .player-set-panel[open], main.player-page .player-set-panel:not([hidden]) {
    border-radius: 20px 20px 0 0 !important; max-height: 70vh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  main.player-page .player-set-panel :is(select, button, .set-row) { min-height: 44px; }

  /* YouTube films: two clear buttons under the embed. */
  main.player-page #youtube-tools:not([hidden]) { display: block !important; margin-top: 12px; padding: 0 !important; background: none !important; border: 0 !important; }
  main.player-page #youtube-tools .youtube-tools-bar { display: flex !important; flex-wrap: wrap; gap: 8px !important; padding: 0 !important; background: none !important; border: 0 !important; }
  main.player-page #youtube-tools .youtube-tools-bar > :is(a, button):not([hidden]) {
    flex: 1 1 0; min-width: max-content; white-space: nowrap;
    display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 14px !important; border-radius: 14px !important;
    background: rgba(255, 255, 255, .06) !important; box-shadow: inset 0 0 0 1px rgba(185, 209, 225, .18); border: 0 !important; color: #e6eef3 !important;
    font: 500 14px/1 'Sora', 'Segoe UI', sans-serif !important; text-decoration: none !important;
    transition: transform .35s var(--m-spring), background-color .2s;
  }
  main.player-page #youtube-tools .youtube-tools-bar > button[aria-pressed="true"] { background: rgba(179, 217, 235, .14) !important; box-shadow: inset 0 0 0 1px rgba(179, 217, 235, .35); }
  main.player-page #youtube-tools :is(.youtube-cast-guide, .youtube-tools-status) { margin-top: 10px; font-size: 13px; line-height: 1.5; }
  main.player-page #youtube-tools :is(a, button):active { transform: scale(.96); }

  /* ---------- Arrows are drawn, never left to emoji fonts ---------- */
  .m-arrow { display: inline-block; width: 1em; height: 1em; vertical-align: -.14em; flex: none; transition: transform .35s var(--m-spring); }
  a:active > .m-arrow, a:hover > .m-arrow { transform: translateX(2px); }
  .m-arrow--back { transform: none; }

  /* ---------- Footer: comfortable tap targets ---------- */
  footer .footer-links { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  footer .footer-links a { display: flex; align-items: center; min-height: 44px; }

  /* ---------- Article pages: bigger inline-link targets at the end of a post ---------- */
  :is(.blog-reader-tools, .blog-post-footer) a { min-height: 40px; display: inline-flex; align-items: center; }
}

@media (max-width: 719px) and (prefers-reduced-motion: reduce) {
  .m-tabbar, .m-tab-ink, .m-tabbar a, .m-tabbar a svg, header.masthead { transition: none !important; }
  .film-journey .episode-rail--story > .episode-card--story { transform: none; opacity: 1; }
  .m-rv { opacity: 1; transform: none; }
  #comment-log > .ytc-thread.m-pop, .m-comments-more::after { animation: none; }
}
