/* v403: desktop and tablet are a standalone layer (Sample 2, Apple Media Pro).
   Nothing below applies under 700px, so the phone app is byte for byte the
   same experience. The wordmark keeps the app's own serif (Newsreader). */

/* ============================ TABLET 700-1023 ============================ */
@media (min-width: 700px) and (max-width: 1023px) {
  /* iPad style rail: icons with small labels, content gets the rest. */
  html.film #tsbBar.tsb-bar { left:16px !important; right:auto !important; top:20px !important; bottom:20px !important; transform:none !important; width:78px !important; max-width:78px !important; height:auto !important; min-height:0 !important; border-radius:24px !important; border:1px solid rgba(20,18,14,.08) !important; background:rgba(255,255,255,.92) !important; padding:14px 0 !important; display:flex !important; flex-direction:column !important; justify-content:center !important; gap:4px !important; box-shadow:0 22px 44px -28px rgba(40,28,10,.35) !important; }
  html.film #tsbBar.tsb-bar.tsb-bar--off { transform:translateX(-120px) !important; }
  html.film #tsbBar .tsb-bar__item { width:100% !important; min-height:56px !important; flex:0 0 auto !important; justify-content:center !important; padding:6px 0 !important; gap:3px !important; }
  html.film #tsbBar .tsb-bar__item::before { inset:4px 8px !important; border:0 !important; border-radius:14px !important; }
  html.film #tsbBar .tsb-bar__lbl { display:block !important; font-size:9.5px !important; }
  html.film #tsbBar .tsb-bar__item svg { width:21px !important; height:21px !important; }

  html.film body > main:not(#rmApp), html.film .cm-head, html.film .cm-tabs, html.film .cm-top, html.film .footer { margin-left:108px !important; margin-right:24px !important; }
  html.film .dd-main .pc-ab__grid { grid-template-columns:repeat(auto-fill,minmax(148px,1fr)) !important; gap:20px !important; }
  html.film #pcShowList { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)) !important; gap:16px !important; }

  /* Today becomes a spread, not a phone column with empty margins. */
  html.fv-today .ft { max-width:920px; padding:38px 32px 118px; display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); column-gap:18px; align-items:start; }
  html.fv-today .ft-hd, html.fv-today .ft-search { grid-column:1 / span 7; }
  html.fv-today .ft-search { margin-top:20px; }
  html.fv-today .ft-hero { grid-column:1 / span 7; margin-top:18px; padding:20px; }
  html.fv-today .ft-hero .f-cover { width:96px; height:144px; }
  html.fv-today .ft-hero__t { font-size:25px; }
  html.fv-today .ft-mp { grid-column:8 / -1; grid-row:1 / span 3; height:262px; margin-top:0; align-self:end; }
  html.fv-today .ft-mp__f, html.fv-today .ft-mp__b { padding:20px; }
  html.fv-today .ft-mp__q, html.fv-today .ft-mp__line { font-size:21px; }
  html.fv-today .ft-cont { grid-column:1 / span 5; margin-top:20px; }
  html.fv-today .ft-orig { grid-column:6 / -1; margin-top:20px; }
  html.fv-today .ft-sec, html.fv-today .ft-row, html.fv-today .ft-foot { grid-column:1 / -1; }
  html.fv-today .ft-tiles { grid-column:1 / span 7; margin-top:14px; }
  html.fv-today .ft-prompt { grid-column:8 / -1; margin-top:14px; }
}

/* ============================ DESKTOP 1024+ ============================== */
@media (min-width: 1024px) {
  html.film { scroll-behavior:smooth; }
  html.film:not(.dark):not(.fv-reader) body { background:#f5f5f7; }

  /* ---- the sidebar: the phone action bar, standing up ---- */
  html.film #tsbBar.tsb-bar { left:22px !important; right:auto !important; top:22px !important; bottom:22px !important; transform:none !important; width:234px !important; max-width:234px !important; height:auto !important; min-height:0 !important; border-radius:26px !important; border:1px solid rgba(20,18,14,.07) !important; background:rgba(255,255,255,.94) !important; padding:20px 14px !important; display:flex !important; flex-direction:column !important; justify-content:flex-start !important; align-items:stretch !important; gap:4px !important; box-shadow:0 26px 54px -34px rgba(30,25,15,.35) !important; }
  html.dark #tsbBar.tsb-bar { background:rgba(29,26,21,.96) !important; border-color:rgba(245,239,226,.1) !important; }
  html.film #tsbBar.tsb-bar::before { content:"TheSmallBook"; display:block; font-family:var(--font-head, "Newsreader", Georgia, serif); font-size:23px; font-weight:600; letter-spacing:-.01em; color:#1d1d1f; padding:4px 12px 20px; }
  html.dark #tsbBar.tsb-bar::before { color:#f5efe2; }
  html.film #tsbBar.tsb-bar.tsb-bar--off { transform:translateX(-290px) !important; opacity:0 !important; }
  html.film #tsbBar .tsb-bar__item { width:100% !important; min-height:46px !important; flex:0 0 auto !important; flex-direction:row !important; justify-content:flex-start !important; align-items:center !important; padding:0 13px !important; gap:12px !important; border-radius:13px !important; color:#3a3a3c !important; }
  html.dark #tsbBar .tsb-bar__item { color:#b8ae99 !important; }
  html.film #tsbBar .tsb-bar__item::before { inset:0 !important; border:0 !important; border-radius:13px !important; }
  html.film #tsbBar .tsb-bar__item.is-active { color:#14120e !important; }
  html.film #tsbBar .tsb-bar__item svg { width:21px !important; height:21px !important; flex:none; }
  html.film #tsbBar .tsb-bar__lbl, html.film[data-bar-labels="icons"] #tsbBar .tsb-bar__lbl, html.film .tsb-bar--icons-only .tsb-bar__lbl { display:block !important; font-size:14px !important; font-weight:600 !important; letter-spacing:0 !important; margin:0 !important; text-align:left !important; }
  html.film #tsbBar .tsb-bar__item svg { margin:0 !important; }
  html.film #tsbBar .tsb-bar__item--plus { justify-content:flex-start !important; }
  html.film #tsbBar .tsb-bar__plus { width:38px; height:38px; border-radius:12px; border:0; }

  /* ---- every page sits in the same desk ---- */
  html.film body > main:not(#rmApp) { margin-left:max(282px, calc(258px + (100vw - 258px - 1180px)/2)) !important; margin-right:max(34px, calc((100vw - 258px - 1180px)/2)) !important; max-width:1180px !important; }
  html.film .cm-head, html.film .cm-tabs, html.film .cm-top, html.film .sty-top { margin-left:max(282px, calc(258px + (100vw - 258px - 1180px)/2)) !important; margin-right:max(34px, calc((100vw - 258px - 1180px)/2)) !important; max-width:1180px; }
  html.film .footer { padding-left:max(300px, calc(276px + (100vw - 258px - 1180px)/2)); padding-right:max(40px, calc((100vw - 258px - 1180px)/2)); }

  /* ---- Today: the daily book, quotes and shelves as one desk ---- */
  html.fv-today .ft { max-width:none; margin-left:max(124px,calc((100vw - 1180px)/2)); margin-right:max(34px,calc((100vw - 1180px)/2)); padding:54px 0 124px; display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); column-gap:24px; align-items:start; }
  html.fv-today .ft > .pip-line { grid-column:1 / span 7; width:auto !important; }
  html.fv-today .ft-hd { grid-column:1 / span 7; padding:5px 0 0; }
  html.fv-today .ft-search { grid-column:1 / span 7; margin-top:24px; }
  html.fv-today .ft-hero { grid-column:1 / span 7; margin-top:22px; min-height:244px; padding:26px 28px; }
  html.fv-today .ft-hero .f-cover { width:144px; height:216px; }
  html.fv-today .ft-hero__t { font-size:34px; }
  html.fv-today .ft-hero__a { font-size:15px; }
  html.fv-today .ft-mp { grid-column:8 / -1; grid-row:1 / span 3; height:332px; margin-top:0; align-self:end; }
  html.fv-today .ft-mp__f, html.fv-today .ft-mp__b { padding:28px; border-radius:30px; }
  html.fv-today .ft-mp__q, html.fv-today .ft-mp__line { font-size:28px; line-height:1.12; }
  html.fv-today .ft-cont { grid-column:1 / span 4; margin-top:24px; }
  html.fv-today .ft-orig { grid-column:5 / -1; margin-top:24px; }
  html.fv-today .ft-sec { grid-column:1 / -1; margin-top:36px; }
  html.fv-today .ft-row { grid-column:1 / -1; max-width:none; overflow:visible; gap:18px; }
  html.fv-today .ft-tiles { grid-column:1 / span 7; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:14px; }
  html.fv-today .ft-prompt { grid-column:8 / -1; margin-top:14px; min-height:126px; box-sizing:border-box; }
  html.fv-today .ft-foot { grid-column:1 / -1; margin-top:44px; }
  html.fv-today .ft-rb { width:150px; flex:0 0 150px; }
  html.fv-today .ft-rb .f-cover { width:150px; height:225px; }
  html.film:not(.dark) .ft-hero, html.film:not(.dark) .ft-cont, html.film:not(.dark) .ft-orig, html.film:not(.dark) .ft-prompt { background:#ffffff; border:1px solid rgba(20,18,14,.06); border-radius:26px; box-shadow:0 22px 44px -32px rgba(30,25,15,.28); }

  /* ---- Listen room: shelves become a media library ---- */
  html.film .dd-main .pc-ab__grid { grid-template-columns:repeat(auto-fill,minmax(158px,1fr)) !important; gap:24px !important; }
  html.film #pcShowList { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)) !important; gap:18px !important; align-items:start; }
  html.film .dd-main .pc-hero h1, html.film .dd-main .pc-hero h2 { letter-spacing:-.01em; }
  html.film .dd-main .ln-jump { top:14px; z-index:40; }
  html.film:not(.dark) .dd-main .pc-ab__card, html.film:not(.dark) .dd-main .pc-show, html.film:not(.dark) .dd-main .pc-myshelf { background:#ffffff; border:1px solid rgba(20,18,14,.06); border-radius:22px; box-shadow:0 18px 38px -30px rgba(30,25,15,.25); }

  /* ---- Stories: the feed reads in two clean columns ---- */
  html.film .cm-feed { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)) !important; gap:20px !important; align-items:start; }
  html.film .cm-feed .cm-rail, html.film .cm-feed .cm-sect { grid-column:1 / -1; }
  html.film:not(.dark) .cm-feed > * { background:#ffffff; border:1px solid rgba(20,18,14,.06); border-radius:22px; box-shadow:0 18px 38px -30px rgba(30,25,15,.22); }

  /* ---- a book page: cover and text side by side, then a calm column ---- */
  html.fv-book .bookhero, html.fv-book .bigidea, html.fv-book .section-head, html.fv-book .lessons, html.fv-book .quotes, html.fv-book .bookkit { margin-left:max(282px, calc(258px + (100vw - 258px - 1020px)/2)) !important; margin-right:max(34px, calc((100vw - 258px - 1020px)/2)) !important; max-width:1020px; }
  html.fv-book .bigidea, html.fv-book .lessons, html.fv-book .quotes, html.fv-book .bookkit { max-width:860px !important; }
  html.fv-book .nav { margin-left:258px; }

  /* ---- reading columns stay reading columns, just centred in the desk ---- */
  html.film #post.cm-post, html.film .seopage { max-width:760px !important; margin-left:max(300px, calc(258px + (100vw - 258px - 760px)/2)) !important; margin-right:auto !important; }
  html.film body.cmpage, html.film body.fnt, html.film body.frd, html.film body.fwr, html.film body.dmpage { margin:0 !important; max-width:none !important; }
  html.film .seopage { max-width:920px; margin-left:max(300px,calc(258px + (100vw - 258px - 920px)/2)); margin-right:auto; }

  /* ---- account, settings, notes, notifications: quiet centred cards ---- */
  html.film body > main.set:not(#rmApp), html.film body > main.fy:not(#rmApp) { max-width:720px !important; }
  html.film body > main.nt-wrap:not(#rmApp) { max-width:900px !important; }
  html.film body > main.cm-wrap:not(#rmApp) { max-width:820px !important; }
  html.film #tsb-ask-root { margin-left:258px; }
  html.film .qw-head { padding-left:282px; }
  html.film .qw-vp { margin-left:258px; width:calc(100vw - 258px); }

  /* hover is a surface change, never a jump (unslop motion pass) */
  html.film .pc-ab__card, html.film .pc-show, html.film .cm-feed > *, html.film .ft-rb { transition:box-shadow .18s ease, background-color .18s ease; }
  html.film .pc-ab__card:hover, html.film .pc-show:hover, html.film .cm-feed > *:hover { box-shadow:0 26px 48px -30px rgba(30,25,15,.35); }
}
@media (min-width: 1440px) {
  html.fv-today .ft { grid-template-columns:repeat(12,minmax(0,1fr)); column-gap:30px; }
  html.fv-today .ft-hero { min-height:268px; }
  html.fv-today .ft-mp { height:356px; }
}
@media (prefers-reduced-motion: reduce) {
  html.film { scroll-behavior:auto; }
}

/* v404: the real front door sign replaces the plain text wordmark. */
@media (min-width: 700px) and (max-width: 1023px) {
  html.film #tsbBar .tsb-bar__brand {
    display: flex; align-items: center; justify-content: center;
    padding: 4px 0 12px; text-decoration: none;
  }
  html.film #tsbBar .tsb-bar__mark {
    width: 40px; height: 40px; border-radius: 12px; background: var(--f-yel, #FFC800);
    display: grid; place-items: center; transform: rotate(-6deg);
    box-shadow: 0 8px 16px -8px rgba(40, 28, 10, .5);
  }
  html.film #tsbBar .tsb-bar__mark svg { width: 24px; height: 24px; }
  html.film #tsbBar .tsb-bar__word { display: none; }
}
@media (min-width: 1024px) {
  html.film #tsbBar.tsb-bar::before { content: none; }
  html.film #tsbBar .tsb-bar__brand {
    display: flex; align-items: center; gap: 11px;
    padding: 2px 10px 20px; text-decoration: none; color: #1d1d1f;
  }
  html.dark #tsbBar .tsb-bar__brand { color: #f5efe2; }
  html.film #tsbBar .tsb-bar__mark {
    width: 42px; height: 42px; flex: none; border-radius: 12px; background: #FFC800;
    display: grid; place-items: center; transform: rotate(-6deg);
    box-shadow: 0 10px 18px -10px rgba(120, 78, 0, .55);
    transition: transform .2s ease;
  }
  html.film #tsbBar .tsb-bar__brand:hover .tsb-bar__mark { transform: rotate(4deg) scale(1.04); }
  html.film #tsbBar .tsb-bar__mark svg { width: 25px; height: 25px; }
  html.film #tsbBar .tsb-bar__word {
    font-family: var(--font-head, Newsreader, Georgia, serif);
    font-size: 19px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase;
    white-space: nowrap;
  }
  html.film #tsbBar .tsb-bar__small { color: #D23A3A; }
  html.dark #tsbBar .tsb-bar__small { color: #FF7A6B; }
}

/* v404: Settings reads as a desk of cards, not one endless corridor. */
@media (min-width: 700px) and (max-width: 1023px) {
  html.film main.set { max-width: 760px !important; }
}
@media (min-width: 1024px) {
  html.film main.set {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
    align-items: start;
    max-width: var(--desk-max) !important;
  }
  html.film main.set > * { min-width: 0; }
  html.film main.set > .set-cat,
  html.film main.set > :first-child { grid-column: 1 / -1; }
  html.film main.set #barCustomCard { grid-column: 1 / -1; }
  html.film main.set .setcard { margin: 0 !important; height: 100%; box-sizing: border-box; }
  html.film main.set .set-cat { margin-top: 14px; }
}

/* ============================================================
   v404 DESKTOP AND TABLET
   One shell for every page: the rail on the left, a single
   aligned content column, wider artwork, stronger hierarchy.
   The phone keeps the layout it already had.
   ============================================================ */
@media (min-width: 700px) and (max-width: 1023px) {
  html.film body {
    padding-left: 118px !important;
    padding-right: max(22px, env(safe-area-inset-right));
  }
  html.film body > main,
  html.film body > #shellEnd {
    width: min(880px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
  html.film #tsbBar.tsb-bar {
    width: 104px; top: 0; bottom: 0;
    border-radius: 0;
    border-right: 1px solid var(--f-line, #E7DFCE);
    padding: 22px 10px 18px;
  }
  html.film .tsb-bar__link { min-height: 64px; }
  html.film .ft,
  html.film #shellEnd .ln {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
  }
  html.film .ft-hero {
    background-size: auto 116%, auto 116%, auto 116%, cover !important;
    background-position: 0 0, 0 0, 0 0, center 24% !important;
  }
  html.film .ft-book__t { font-size: clamp(34px, 5.6vw, 46px); }
  html.film .ft-mp__q, html.film .ft-mp__line { font-size: 23px; line-height: 1.18; }
  html.film .ln-hm { grid-template-columns: 1.06fr .94fr; gap: 22px; }
  html.film .ln-shows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.film .ln-foryou__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  html.film {
    --desk-max: 1170px;
    --desk-side: 220px;
  }
  html.film body {
    padding-left: calc(var(--desk-side) + 30px) !important;
    padding-right: max(30px, env(safe-area-inset-right));
  }
  html.film body > main,
  html.film body > #shellEnd {
    width: min(var(--desk-max), calc(100vw - var(--desk-side) - 60px));
    margin-left: auto;
    margin-right: auto;
  }

  /* the rail: one edge, one rhythm, the app's own front-door sign */
  html.film #tsbBar.tsb-bar {
    width: var(--desk-side); top: 0; bottom: 0;
    border-radius: 0;
    border-right: 1px solid var(--f-line, #E7DFCE);
    padding: 26px 16px 20px;
  }
  html.film .tsb-bar__link {
    min-height: 52px;
    padding: 8px 12px;
    margin: 2px 0;
  }
  html.film .tsb-bar__sh {
    inset: 8px auto 8px 0;
    border-radius: 0 14px 14px 0;
  }

  /* Today: a twelve column grid with one shared left edge */
  html.film .ft {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
    max-width: none;
    padding-top: 40px;
    padding-bottom: var(--film-bottom-pad, 56px);
  }
  html.film .ft > * { min-width: 0; margin-top: 0 !important; }
  html.fv-today .ft-hd { grid-column: 1 / span 7; grid-row: 1; align-self: start; }
  html.fv-today h1.ft-hd__g { font-size: clamp(38px, 3.6vw, 50px); }
  html.fv-today .ft-hd__d { margin-top: 12px; }
  html.fv-today .ft-hd__st { margin-top: 8px; }
  html.fv-today .ft-search { grid-column: 1 / span 7; grid-row: 2; }
  html.fv-today .ft-hero {
    grid-column: 1 / span 7; grid-row: 3;
    width: auto; height: 100%; min-height: 368px; margin: 0;
    padding: 28px 30px;
    background-size: auto 108%, auto 108%, auto 108%, cover !important;
    background-position: 0 0, 0 0, 0 0, center 24% !important;
  }
  html.fv-today .ft-mp {
    grid-column: 8 / -1; grid-row: 1 / span 3;
    width: auto; height: 100%; min-height: 348px; margin: 0 !important;
    align-self: stretch;
  }
  html.fv-today .ft-mp__f, html.fv-today .ft-mp__b {
    padding: 28px; border-radius: 30px; height: 100%; box-sizing: border-box;
  }
  html.fv-today .ft-mp__q, html.fv-today .ft-mp__line { font-size: 27px; line-height: 1.16; }
  html.fv-today .ft-book__t { font-size: clamp(38px, 3.5vw, 48px); }
  html.fv-today .ft-book__m { max-width: 480px; }
  html.fv-today .ft-row,
  html.fv-today .ft-tiles { grid-column: 1 / -1; }
  html.fv-today .ft-orig { grid-column: 5 / span 4; }
  html.fv-today .ft-prompt { grid-column: 8 / -1; }

  /* Listen: the audio room fills the same wide desk */
  html.film #shellEnd .ln {
    max-width: none;
    padding-top: 40px;
  }
  html.film #shellEnd .ln-foryou,
  html.film #shellEnd .ln-hmwrap { grid-column: 1 / -1; }
  html.film .ln-hm { grid-template-columns: 1.12fr .88fr; gap: 26px; }
  html.film .ln-foryou__track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.film .ln-shows { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html.film .ln-jump { margin-left: 0; margin-right: 0; }

  /* the reader's wide desk matches, footnotes and progress included */
  html.film #rmApp { max-width: 1240px; }
  html.film .rm-progress-line { right: 0; }

  /* You: stats and shelves breathe at desk width */
  html.film .you-hero__row { max-width: var(--desk-max); }
}

/* ============================================================
   v404 ALIGNMENT REPAIR
   The earlier desk mixed two offset systems at once: the body
   was padded for a rail and every page was also margined for
   it, so content started twice as far in and ran off the right
   edge. One system now: a flush rail, and every page margined
   from that same edge by the same formula.
   ============================================================ */
@media (min-width: 700px) and (max-width: 1023px) {
  html.film #tsbBar.tsb-bar {
    left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: 88px !important; max-width: 88px !important;
    border-radius: 0 !important; border: 0 !important;
    border-right: 1px solid var(--f-line, #E7DFCE) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, .9) !important;
    justify-content: flex-start !important;
    padding: 20px 0 !important;
  }
  html.dark #tsbBar.tsb-bar { background: rgba(29, 26, 21, .96) !important; }
  html.film body { padding-left: 0 !important; padding-right: 0 !important; }
  html.fv-today .ft-mp { align-self: stretch; height: auto; min-height: 300px; }
}

@media (min-width: 1024px) {
  html.film body { padding-left: 0 !important; padding-right: 0 !important; }
  html.film #tsbBar.tsb-bar {
    left: 0 !important; top: 0 !important; bottom: 0 !important;
    width: 240px !important; max-width: 240px !important;
    border-radius: 0 !important; border: 0 !important;
    border-right: 1px solid var(--f-line, #E7DFCE) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, .88) !important;
    padding: 26px 16px 20px !important;
  }
  html.film body > main:not(#rmApp),
  html.film .cm-head, html.film .cm-tabs, html.film .cm-top, html.film .sty-top {
    margin-left: calc(240px + max(36px, (100vw - 240px - 1180px) / 2)) !important;
    margin-right: max(36px, (100vw - 240px - 1180px) / 2) !important;
    width: auto !important;
    max-width: 1180px !important;
  }
  html.film body > #shellEnd:has(.ln) {
    margin-left: calc(240px + max(36px, (100vw - 240px - 1180px) / 2));
    margin-right: max(36px, (100vw - 240px - 1180px) / 2);
    max-width: 1180px;
  }
  html.film .footer {
    padding-left: calc(240px + max(52px, (100vw - 240px - 1180px) / 2));
    padding-right: max(52px, (100vw - 240px - 1180px) / 2);
  }
  html.fv-book .bookhero, html.fv-book .bigidea, html.fv-book .section-head,
  html.fv-book .lessons, html.fv-book .quotes, html.fv-book .bookkit {
    margin-left: calc(240px + max(36px, (100vw - 240px - 1020px) / 2)) !important;
    margin-right: max(36px, (100vw - 240px - 1020px) / 2) !important;
  }
  html.fv-book .nav { margin-left: 240px; }
  html.film #post.cm-post, html.film .seopage {
    margin-left: calc(240px + max(36px, (100vw - 240px - 820px) / 2)) !important;
    margin-right: auto !important;
  }
  html.film body > main.set:not(#rmApp) { max-width: 1180px !important; }
  html.film #tsb-ask-root { margin-left: 240px; }
  html.film .qw-head { padding-left: 276px; }
  html.film .qw-vp { margin-left: 240px; width: calc(100vw - 240px); }
  /* the rail is flush, so the hidden state slides fully away */
  html.film #tsbBar.tsb-bar.tsb-bar--off { transform: translateX(-260px) !important; }
}

/* v405: the supplied book icon leads on desktop, with a bookstore wordmark. */
.tsb-bar__icon { display: none; }
@media (min-width: 1024px) {
  html.film #tsbBar .tsb-bar__brand { gap: 10px; padding: 0 8px 22px; }
  html.film #tsbBar .tsb-bar__mark {
    width: 46px; height: 46px; border-radius: 13px;
    background: transparent; box-shadow: none; transform: none; overflow: hidden;
  }
  html.film #tsbBar .tsb-bar__brand:hover .tsb-bar__mark { transform: none; }
  html.film #tsbBar .tsb-bar__mark svg { display: none; }
  html.film #tsbBar .tsb-bar__icon {
    display: block; width: 100%; height: 100%; object-fit: cover;
  }
  html.film #tsbBar .tsb-bar__word {
    font-family: Newsreader, Georgia, serif;
    font-size: 21px; font-weight: 700; line-height: 1;
    letter-spacing: -0.015em; text-transform: none; white-space: nowrap;
  }
}

/* ============================================================
   v406 · DESKTOP MOTION REPAIR
   On desktop the room felt frozen: cards only changed shadow,
   the rail snapped instead of sliding, and sidebar items had
   no travel at all. Motion is back, on a spring curve, and it
   still switches fully off for reduced motion.
   ============================================================ */
@media (min-width: 700px) and (prefers-reduced-motion: no-preference) {
  html.film #tsbBar.tsb-bar {
    transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .3s ease !important;
  }
  html.film #tsbBar .tsb-bar__item {
    transition: background-color .22s ease, color .22s ease, transform .22s cubic-bezier(.22,1,.36,1);
  }
}
@media (min-width: 700px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  html.film #tsbBar .tsb-bar__item:hover { transform: translateX(3px); }
  html.film .pc-ab__card, html.film .pc-show, html.film .ft-card, html.film .cm-feed > * {
    transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1), background-color .22s ease;
  }
  html.film .pc-ab__card:hover, html.film .pc-show:hover, html.film .ft-card:hover, html.film .cm-feed > *:hover {
    transform: translateY(-4px);
  }
  html.film .ft-card img, html.film .pc-ab__cover { transition: transform .45s cubic-bezier(.22,1,.36,1); }
  html.film .ft-card:hover img, html.film .pc-ab__card:hover .pc-ab__cover { transform: scale(1.025); }
}

/* ============================================================
   v409 · TABLET SCROLL, FIXED AT THE PAINT LAYER
   Diagnosis on an iPad profile: the page itself scrolled fine,
   but every frame repainted a full height backdrop blur on the
   rail (blur 26px), a blurred top nav and large soft card
   shadows. Real tablet GPUs pay for that per frame, which is
   exactly "laggy, not even scrolling". At tablet widths the
   glass becomes solid, shadows shrink to a whisper, and scroll
   chaining stops at the page edge so a fling never lands on a
   white rubber band in dark mode.
   ============================================================ */
@media (min-width: 700px) and (max-width: 1023px) {
  html.film #tsbBar.tsb-bar, html.film .nav, html.film .ln-jump {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  html.film #tsbBar.tsb-bar { background: #FFFDF8 !important; }
  html.dark #tsbBar.tsb-bar { background: #1D1915 !important; }
  html.film .nav { background: var(--f-paper) !important; }
  html.film .pc-show, html.film .pc-ab__card, html.film .ft-card, html.film .cm-feed > * {
    box-shadow: 0 8px 18px -14px rgba(30, 25, 15, .28) !important;
  }
}
@media (min-width: 700px) {
  html.film, html.film body { overscroll-behavior: none; }
}
