/* Show detail — hero, actions, progress, tabs (overview / episodes / cast), aside, sheets.
   Mobile first; ≥1024px follows DesktopShow. ?tab=episodes on mobile becomes a focused full-screen view. */

.page-show .page { gap: 0; }
.page-show .topbar__title { opacity: 0; transition: opacity var(--dur-2); }
.page-show .topbar.is-scrolled .topbar__title { opacity: 1; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ash); }
.dot--ongoing { background: var(--ok); }
.dot--upcoming { background: var(--teal); }
.dot--cancelled { background: var(--danger); }

/* ---------- Hero ---------- */
.show-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; }
.show-hero__bg { position: absolute; inset: -48px -48px auto -48px; height: 440px; z-index: -2; background-size: cover; background-position: center; filter: blur(28px) saturate(1.25); transform: scale(1.1); }
.show-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,4,3,.5) 0px, rgba(10,4,3,0) 90px, rgba(10,4,3,0) 150px, var(--bg) 300px); }
.show-hero__in { padding-top: calc(72px + var(--safe-t)); }
.crumbs { display: none; }
.show-hero__grid { display: flex; flex-direction: column; align-items: center; }
.show-hero__thumb { width: min(304px, 82vw); border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.1); }
.show-hero__thumb .thumb { border-radius: 16px; }
/* Low-res posters (e.g. 270×152) are never blown up much past their natural size */
.show-hero__thumb.is-lowres { width: min(304px, var(--nat-w, 304px), 82vw); }
.show-hero__copy { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; }
.show-hero__meta { order: 2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 15px; color: var(--tx2); }
.show-hero__status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--tx); }
.show-hero__channel { color: inherit; }
.show-hero__eps-long, .show-hero__runtime { display: none; }
.show-hero__title { order: 1; margin-top: 20px; font-family: var(--disp); font-weight: 400; font-size: 38px; line-height: 1.08; overflow-wrap: anywhere; }
.show-hero__tags { order: 3; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; }
.show-hero__genre.chip { min-height: 44px; padding: 0 14px; font-size: 14px; }
.show-hero__rating { flex-basis: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 8px; margin-top: 4px; font-size: 15px; }
.show-hero__rating b { font-weight: 700; }
.show-hero__imdb { color: var(--tx2); }
.show-actions { order: 4; display: flex; gap: 10px; width: 100%; margin-top: 18px; text-align: left; }
.show-status { flex: 1; min-width: 0; border-radius: 16px; }
.show-status--none { background: var(--brand); border-color: transparent; color: var(--on-brand); }
.show-status__icon { display: inline-flex; flex: none; }
.show-status .status-btn__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-status .status-btn__extra:empty { display: none; }
.show-rate { min-height: 56px; padding: 0 18px; border-radius: 16px; font-size: 17px; font-weight: 700; }
.show-actions__watch, .show-actions__share { display: none; }

/* ---------- Body ---------- */
.show-body { display: flex; flex-direction: column; }
.show-body .rail { margin-inline: calc(-1 * var(--gutter)); }

.show-progress { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding: 16px; }
.show-progress__next { display: flex; align-items: center; gap: 12px; }
.show-progress__next-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.show-progress__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tx3); }
.show-progress__ep { font-size: 16px; font-weight: 700; }
.show-progress .btn--gold { gap: 6px; }
.show-progress .progress-head { font-size: 14px; }
.show-progress__time { font-size: 14px; color: var(--tx2); }
.show-progress__time b { color: var(--tx); }
.show-progress__time:empty { display: none; }
.show-invite { margin-top: 14px; color: var(--tx); }
.show-invite__icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); display: inline-flex; align-items: center; justify-content: center; }
.show-invite > svg:last-child { flex: none; color: var(--tx3); }

/* ---------- Tabs ---------- */
.show-tabs { position: sticky; top: calc(var(--bar-h) + var(--safe-t)); z-index: 20; margin: 22px calc(-1 * var(--gutter)) 0; padding-inline: var(--gutter); background: var(--bg); }
.show-tabs > [role="tab"] { min-height: 52px; font-size: 16px; }
.show-tabs > [aria-selected="true"]::after { left: 22%; right: 22%; }

/* ---------- Layout ---------- */
.show-layout { display: flex; flex-direction: column; gap: 30px; padding-top: 22px; }
.show-main { min-width: 0; }
.panel--overview { display: flex; flex-direction: column; gap: 30px; }
.panel--overview[hidden] { display: none; }
.show-aside { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
@media (max-width: 1023px) {
  body:not(.is-tab-overview) .show-aside, body:not(.is-tab-overview) .show-related { display: none; }
}

/* ---------- Story ---------- */
.story__h { margin-bottom: 8px; font-family: var(--disp); font-weight: 400; font-size: var(--fs-h2); line-height: 1.15; }
.story__text { position: relative; font-size: 16px; line-height: 1.65; color: var(--tx2); }
.story__text > p + p { margin-top: 12px; }
.story__text .story__lead { font-size: 17px; line-height: 1.6; color: var(--tx); }
.story__text.is-clamped { max-height: calc(17px * 1.6 * 6); overflow: hidden; }
.story__text.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(rgba(0,0,0,0), var(--bg)); pointer-events: none; }
.story__toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; font-size: 15px; font-weight: 700; color: var(--gold-ink); }
.story__toggle svg { transition: transform var(--dur-2) var(--ease); }
.story__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.watch-link { min-height: 64px; border-radius: 16px; background: var(--s1); color: var(--tx); }
.watch-link .channel-mark { border-radius: 10px; font-size: 14px; }
.watch-link__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tx3); }
.watch-link .ext-link__title { font-size: 17px; }
.watch-link__out { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 120px; font-size: 14px; font-weight: 600; line-height: 1.2; text-align: right; color: var(--tx2); }
.watch-link__out svg { flex: none; }

/* ---------- Aside: details, ratings, cast ---------- */
.side-card__h { margin-bottom: 6px; font-family: var(--disp); font-weight: 400; font-size: var(--fs-h2); line-height: 1.15; }
.ratings-card .side-card__h { margin-bottom: 12px; }
.details { display: grid; grid-template-columns: 112px minmax(0, 1fr); font-size: 16px; }
.details dt, .details dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.details dt { color: var(--tx3); }
.details dd { font-weight: 600; }
.details dt:last-of-type, .details dd:last-of-type { border-bottom: 0; }
.details__link { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

.ratings-card__top { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line2); }
.ratings-card__score { display: flex; flex-direction: column; align-items: center; min-width: 84px; }
.ratings-card__num { font-family: var(--disp); font-size: 48px; line-height: 1; }
.ratings-card__n { margin-top: 4px; font-size: 13px; color: var(--tx3); }
.ratings-card__new { width: 64px; height: 64px; border-radius: 50%; border: 1.5px dashed var(--line); display: inline-flex; align-items: center; justify-content: center; }
.ratings-card__mine { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ratings-card__text { font-size: 15px; line-height: 1.45; color: var(--tx2); }
.ratings-card__text b { display: inline-flex; align-items: center; gap: 3px; color: var(--tx); }
.ratings-card__imdb { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }
.stars { display: inline-flex; gap: 1px; margin-top: 6px; }
.stars__s { position: relative; display: inline-flex; }
.stars__fill { position: absolute; top: 0; left: 0; bottom: 0; overflow: hidden; }
.stars__fill svg { max-width: none; }
.review { margin: 12px 0 0; padding: 14px 16px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line2); display: flex; flex-direction: column; gap: 6px; }
.review__head { display: flex; align-items: center; gap: 10px; }
.review__head .avatar { --size: 32px; font-size: 13px; }
.review__user { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review__stars { display: inline-flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 700; }
.review__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--tx2); overflow-wrap: anywhere; }

.side-cast .section-head h2 { font-family: var(--disp); font-weight: 400; font-size: var(--fs-h2); }
.side-cast__rail { gap: 14px; }
.side-cast__rail .cast-tile { width: 92px; }
.side-cast__list { display: none; }

/* ---------- Cast tab ---------- */
.cast-list { display: flex; flex-direction: column; }
.cast-row { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 8px; margin: 0 -8px; border-radius: 14px; }
.cast-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cast-row__name { font-size: 16px; font-weight: 700; }
.cast-row__char { font-size: 14px; color: var(--tx3); }
.role-pill { flex: none; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s2); color: var(--tx2); font-size: 13px; font-weight: 700; line-height: 28px; }
.role-pill--lead { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- Related ---------- */
.show-related__rail .show-card { width: 176px; }

/* ---------- 404 ---------- */
.show-missing { padding-top: 40px; }

/* ==========================================================================
   Episodes
   ========================================================================== */
.ep-head { display: none; }
.panel--episodes { --eps-sticky: calc(var(--bar-h) + var(--safe-t)); }

.eps-progress { display: flex; flex-direction: column; gap: 8px; padding: 0 0 6px; }
.eps-progress__head { display: flex; align-items: baseline; justify-content: space-between; font-size: 16px; }
.eps-progress__count { font-family: var(--disp); font-weight: 400; font-size: 28px; line-height: 1; }
.eps-progress__pct { font-weight: 700; color: var(--gold-ink); }
.eps-progress__left { font-size: 14px; color: var(--tx3); }
.eps-progress__left:empty { display: none; }
.eps-invite { margin-bottom: 6px; color: var(--tx); }

.eps-tools { display: flex; gap: 8px; padding-top: 10px; }
.eps-jump { flex: 1; min-width: 0; }
.eps-jump__field { position: relative; min-height: 48px; padding: 0 4px 0 2px; border-width: 1px; border-radius: 14px; }
.eps-jump__field input[type="text"] { padding: 0 4px; }
.eps-jump__cal, .eps-jump__go { flex: none; width: 44px; height: 44px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--tx3); }
.eps-jump__cal:active, .eps-jump__go:active { background: var(--s3); }
.eps-jump__go { color: var(--gold-ink); }
.eps-jump__date { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.eps-spoil { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--tx2); font-size: 14px; font-weight: 700; }
.eps-spoil[aria-pressed="true"] { background: var(--s3); color: var(--tx); }
.eps-markall { display: none; }

.eps-quick { display: flex; gap: 8px; margin: 10px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.eps-quick::-webkit-scrollbar { display: none; }
.eps-quick:empty { display: none; }
.eps-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 600; white-space: nowrap; }
.eps-chip--next { border: 1.5px solid var(--gold-line); background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }

.eps-years { display: flex; gap: 6px; margin: 16px calc(-1 * var(--gutter)) 4px; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
.eps-years::-webkit-scrollbar { display: none; }
.eps-years:empty { display: none; }
.eps-year { flex: 1 0 76px; min-height: 48px; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); color: var(--tx); font-size: 15px; font-weight: 700; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.eps-year__n { font-size: 13px; font-weight: 500; opacity: .8; }
.eps-year[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

.eps-list { padding-top: 8px; }
.eps-skel { display: flex; align-items: center; gap: 12px; min-height: 76px; border-bottom: 1px solid var(--line2); }
.eps-skel__body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.eps-error { padding: 24px 0; text-align: center; }

/* Month blocks */
.eps-month__bar { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line2); background: var(--bg); }
.eps-month.is-open .eps-month__bar { position: sticky; top: var(--eps-sticky); z-index: 3; }
.eps-month__h { flex: 1; min-width: 0; margin: 0; font: inherit; }
.eps-month__head { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 4px; text-align: left; border-radius: 0; }
.eps-month__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.eps-month__name { font-size: 17px; font-weight: 700; }
.eps-month__sub { font-size: 13px; color: var(--tx3); }
.eps-month__badge { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--gold-soft); color: var(--gold-ink); font-size: 13px; font-weight: 700; }
.eps-month__chev { flex: none; color: var(--tx3); transition: transform var(--dur-2) var(--ease); }
.eps-month.is-open .eps-month__chev { transform: rotate(180deg); }
.eps-month__mark { flex: none; min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 14px; }
.eps-more { width: 100%; min-height: 48px; border-bottom: 1px solid var(--line2); font-size: 14px; font-weight: 600; color: var(--gold-ink); }
.eps-more[aria-busy="true"] { opacity: .6; }
.eps-month__list { margin: 0; }
.eps-empty-year { padding: 24px 4px; color: var(--tx3); }

/* Episode rows */
.ep { position: relative; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); border-bottom: 1px solid var(--line2); transition: background-color var(--dur-2); }
.ep.is-next { background: var(--gold-soft); }
.ep.is-open { background: var(--s1); }
.ep.is-next.is-open { background: var(--gold-soft); }
.ep.is-flash::before { content: ""; position: absolute; inset: 0; background: var(--gold-soft); border-left: 3px solid var(--gold); pointer-events: none; animation: eps-flash 1.8s var(--ease) both; }
@keyframes eps-flash { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
.ep__row { display: flex; align-items: flex-start; gap: 10px; }
.ep__main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; text-align: left; }
.ep__num { flex: none; width: 48px; padding-top: 2px; font-size: 13px; font-weight: 700; color: var(--tx3); }
.ep__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ep__badge { align-self: flex-start; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--gold); color: var(--on-gold); font-size: 13px; font-weight: 700; line-height: 22px; }
.ep__title { font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--tx); }
.ep.is-watched .ep__title { color: var(--tx2); }
.ep__meta { font-size: 13px; color: var(--tx3); }
.ep__date { display: none; }
.ep__extra { padding: 0 0 14px 58px; margin-top: -8px; }
.ep__syn { font-size: 14px; line-height: 1.45; color: var(--tx2); }
.ep__reveal { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -6px 0 -8px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--tx2); }
.ep__reveal > span { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin: 0 -12px; padding: 0 10px; border-radius: var(--r-pill); background: var(--s3); }
.ep__upto { display: none; }
.ep__check { flex: none; width: 48px; height: 48px; margin: 8px -6px 0 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.ep__tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); color: var(--on-gold); display: inline-flex; align-items: center; justify-content: center; transition: background-color var(--dur-2), border-color var(--dur-2); }
.ep__tick svg { opacity: 0; transform: scale(.5); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-drama); }
.ep.is-watched .ep__tick { background: var(--gold); border-color: var(--gold); }
.ep.is-watched .ep__tick svg { opacity: 1; transform: none; }
.ep__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 14px 58px; }
.ep__actions[hidden] { display: none; }
.ep__actions .btn { min-height: 48px; border-radius: 14px; }
.ep__hint { flex-basis: 100%; font-size: 13px; color: var(--tx3); }

/* ---------- Sheets ---------- */
.sheet__titles { flex: 1; min-width: 0; line-height: 1.25; }
.sheet__sub { font-size: 14px; color: var(--tx3); }
.sheet__head { padding-top: 2px; }
.st-options { display: flex; flex-direction: column; gap: 8px; }
.st-options .option { min-height: 72px; border-radius: 18px; }
.st-options .option__icon { width: 44px; height: 44px; }
.st-options .option__title { font-size: 17px; }
.st-options .option__desc { font-size: 14px; }
.st-options .option[aria-checked="true"] { background: var(--st-bg); border-color: var(--st); }
.st-options .option.st-watching[aria-checked="true"] { border-color: var(--gold-line); }
.st-note { margin-top: 12px; padding: 0 4px; font-size: 14px; line-height: 1.45; color: var(--tx3); }
.st-remove { flex: none; padding: 0 14px; color: var(--danger); font-weight: 700; }

.rate-head { gap: 12px; }
.rate-head__thumb { flex: none; width: 72px; border-radius: 8px; }
.rate-head__thumb .thumb__fallback { display: none; }
.rate-stars { display: flex; justify-content: center; gap: 2px; margin: 18px auto 0; padding: 4px; border-radius: 16px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.rate-star { width: 62px; height: 62px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; transition: transform var(--dur-1) var(--ease); }
.rate-star:active { transform: scale(.92); }
.rate-star__in { position: relative; width: 48px; height: 48px; }
.rate-star__in > svg, .rate-star__fill svg { position: absolute; top: 0; left: 0; width: 48px; height: 48px; max-width: none; }
.rate-star__fill { position: absolute; top: 0; left: 0; bottom: 0; width: 0; overflow: hidden; }
.rate-star.is-full .rate-star__fill { width: 100%; }
.rate-star.is-half .rate-star__fill { width: 50%; }
.rate-star.is-pop .rate-star__in { animation: rate-pop var(--dur-3) var(--ease-drama); }
@keyframes rate-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.rate-readout { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; margin-top: 6px; text-align: center; }
.rate-readout__num { font-family: var(--disp); font-size: 34px; line-height: 1.1; color: var(--gold-ink); }
.rate-readout__label { font-size: 17px; font-weight: 700; }
.rate-readout__hint { font-size: 16px; font-weight: 600; color: var(--tx2); }
.rate-readout__num:empty, .rate-readout__label:empty, .rate-readout__hint:empty { display: none; }
.rate-review { margin-top: 12px; }
.rate-review__label { display: flex; justify-content: space-between; }
.rate-review__label .faint { font-weight: 500; }
.rate-review textarea { min-height: 96px; resize: none; }
.rate-review__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rate-review__count { flex: none; margin-top: 6px; font-size: 13px; color: var(--tx3); }
.rate-review__count.is-near { color: var(--gold-ink); }

.login-sheet { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 8px; text-align: center; }
.login-sheet__title { font-family: var(--disp); font-weight: 400; font-size: 28px; line-height: 1.15; }
.login-sheet__text { max-width: 340px; font-size: 16px; line-height: 1.5; color: var(--tx2); }
.login-sheet__foot { border-top: 0; }

.ep-act { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 6px; border-radius: 12px; text-align: left; font-size: 16px; font-weight: 600; }
.ep-act__icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--s2); color: var(--tx2); display: inline-flex; align-items: center; justify-content: center; }
.ep-act__icon--gold { background: var(--gold-soft); color: var(--gold-ink); }
.ep-act__note { margin: 6px 6px 0; font-size: 13px; line-height: 1.45; color: var(--tx3); }
.confirm-sheet { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }

/* ==========================================================================
   Mobile: ?tab=episodes is a focused full-screen view with its own header
   ========================================================================== */
@media (max-width: 1023px) {
  .is-tab-episodes .topbar,
  .is-tab-episodes .show-hero,
  .is-tab-episodes .show-progress,
  .is-tab-episodes .show-invite,
  .is-tab-episodes .show-tabs { display: none; }
  .is-tab-episodes .ep-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px; height: calc(60px + var(--safe-t)); padding: var(--safe-t) 4px 0; background: var(--bg); border-bottom: 1px solid var(--line2); }
  .is-tab-episodes .show-layout { padding-top: 16px; }
  .is-tab-episodes .panel--episodes { --eps-sticky: calc(60px + var(--safe-t)); }
  .ep-head__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
  .ep-head__title { font-size: 19px; font-weight: 700; }
  .ep-head__sub { font-size: 13px; color: var(--tx3); }
}

/* ---------- Tablet ---------- */
@media (min-width: 600px) and (max-width: 1023px) {
  .show-hero__thumb { width: min(460px, 70vw); }
  .show-hero__thumb.is-lowres { width: min(460px, var(--nat-w, 460px), 70vw); }
  .show-actions { max-width: 560px; }
  .show-hero__meta .show-hero__eps-long { display: inline; }
  .show-hero__meta .show-hero__eps-short { display: none; }
  .show-related__rail .show-card { width: 220px; }
  .ratings-card__top, .review, .show-progress { max-width: 720px; }
}

/* ==========================================================================
   Desktop (DesktopShow)
   ========================================================================== */
@media (min-width: 1024px) {
  .show-hero { text-align: left; }
  .show-hero__bg { inset: -80px; height: auto; filter: blur(48px) saturate(1.3); }
  /* A soft veil behind the copy keeps meta text readable over bright posters (both themes) */
  .show-hero__shade { background: linear-gradient(0deg, var(--bg) 0%, rgba(0,0,0,0) 60%), linear-gradient(180deg, rgba(10,4,3,.25) 0, rgba(0,0,0,0) 120px), linear-gradient(90deg, rgba(0,0,0,0) 20%, color-mix(in srgb, var(--bg) 70%, transparent) 46%, var(--bg) 100%); }
  .crumbs { color: var(--tx); }
  .crumbs [aria-current] { color: var(--tx2); }
  .show-hero__in { padding-top: 28px; padding-bottom: 36px; }
  .crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--tx2); }
  .crumbs a { text-decoration: underline; text-underline-offset: 3px; }
  .crumbs a:hover { color: var(--tx); }
  .show-hero__grid { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 40px; margin-top: 20px; }
  .show-hero__thumb { flex: 0 1 560px; min-width: 280px; width: auto; border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.1); }
  .show-hero__thumb.is-lowres { flex-basis: min(560px, var(--nat-w, 560px)); }
  .show-hero__thumb .thumb { border-radius: 22px; }
  .show-hero__copy { flex: 1 1 420px; align-items: flex-start; }
  .show-hero__meta { order: 0; justify-content: flex-start; gap: 6px 12px; margin-top: 0; font-size: 16px; }
  .show-hero__meta .show-hero__eps-long, .show-hero__runtime { display: inline; }
  .show-hero__meta .show-hero__eps-short { display: none; }
  .show-hero__status { font-weight: 700; }
  .show-hero__status .dot { width: 9px; height: 9px; }
  .show-hero__channel:hover { text-decoration: underline; }
  .show-hero__title { order: 1; margin-top: 10px; font-size: 64px; line-height: 1.02; }
  .show-hero__tags { order: 2; justify-content: flex-start; margin-top: 14px; }
  .show-hero__genre.chip { min-height: 44px; font-size: 15px; }
  .show-hero__rating { flex-basis: auto; margin: 0 0 0 4px; font-size: 16px; }
  .show-hero__rating b { font-weight: 800; }
  .show-actions { order: 3; flex-wrap: wrap; gap: 12px; width: auto; margin-top: 22px; }
  .show-status { flex: none; width: auto; min-height: 54px; padding: 0 18px; border-radius: 14px; }
  .show-rate { min-height: 54px; border-radius: 14px; }
  .show-actions__watch { display: inline-flex; min-height: 54px; padding: 0 18px; border-radius: 14px; font-size: 16px; font-weight: 700; }
  .show-actions__share { display: inline-flex; width: 54px; min-height: 54px; padding: 0; border-radius: 14px; }
  .show-actions .btn--outline:hover, .show-actions .btn--secondary:hover { background: var(--s2); }

  .show-progress { flex-direction: row-reverse; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 0; padding: 18px 22px; }
  .show-progress__bar { flex: 1 1 360px; min-width: 0; }
  .show-progress .progress-head { font-size: 16px; }
  .show-progress__count { font-family: var(--disp); font-weight: 400; font-size: 26px; }
  .show-progress__next { flex: none; gap: 14px; }
  .show-progress__next .btn { min-height: 48px; padding: 0 16px; }
  .show-progress__time { flex-basis: 100%; margin-top: -8px; }
  .show-invite { margin-top: 0; max-width: 640px; }

  .show-tabs { position: static; gap: 8px; margin: 28px 0 0; padding: 0; }
  .show-tabs > [role="tab"] { flex: none; min-height: 56px; padding: 0 18px; font-size: 17px; }
  .show-tabs > [role="tab"]:hover { color: var(--tx); }
  .show-tabs > [aria-selected="true"]::after { left: 14px; right: 14px; }

  .show-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-areas: "main aside" "related aside"; column-gap: 48px; row-gap: 36px; align-items: start; padding-top: 28px; }
  .show-main { grid-area: main; }
  .show-aside { grid-area: aside; gap: 20px; }
  .show-related { grid-area: related; }
  body:not(.is-tab-overview) .show-related { display: none; }

  .story__h { margin-bottom: 10px; font-size: 30px; }
  .story__text { font-size: 17px; line-height: 1.75; max-width: 70ch; }
  .story__text .story__lead { font-size: 18px; line-height: 1.7; }
  .story__text.is-clamped { max-height: none; overflow: visible; }
  .story__text.is-clamped::after, .story__toggle { display: none; }
  .watch-link { display: none; }

  .side-card { padding: 20px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line2); }
  .side-card__h { margin-bottom: 6px; font-family: var(--ui); font-size: 18px; font-weight: 700; }
  .ratings-card .side-card__h { margin-bottom: 12px; }
  .details { grid-template-columns: 100px minmax(0, 1fr); font-size: 15px; }
  .details dt, .details dd { padding: 10px 0; }
  .details__more { display: none; }
  .ratings-card__top { flex-direction: column; align-items: stretch; gap: 14px; padding: 0; border: 0; background: none; }
  .ratings-card__score { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; }
  .ratings-card__num { font-size: 52px; }
  .ratings-card__score .stars { margin-top: 0; }
  .ratings-card__n { margin-top: 0; font-size: 14px; }
  .ratings-card__new { width: 52px; height: 52px; }
  .ratings-card__mine .btn { align-self: stretch; min-height: 48px; }
  .review { background: var(--s2); border-color: transparent; }
  .side-cast { padding: 20px; border-radius: 20px; background: var(--s1); border: 1px solid var(--line2); }
  .side-cast .section-head { margin-bottom: 8px; }
  .side-cast .section-head h2 { font-family: var(--ui); font-size: 18px; font-weight: 700; }
  .side-cast__rail { display: none; }
  .side-cast__list { display: flex; flex-direction: column; gap: 4px; }
  .side-cast__row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 8px; margin: 0 -8px; border-radius: 12px; }
  .side-cast__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; }
  .side-cast__role { flex: none; max-width: 40%; font-size: 13px; color: var(--tx3); }

  .cast-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
  .cast-row { margin: 0; padding: 12px; border-radius: 16px; background: var(--s1); border: 1px solid var(--line2); }
  .cast-row .avatar { --size: 64px; }
  .cast-row__name { font-size: 17px; }
  .role-pill { height: 26px; border-radius: 7px; line-height: 26px; }

  .show-related .section-head h2 { font-size: 30px; }
  .show-body .show-related__rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .show-related__rail .show-card { width: auto; }
  .show-related__rail > :nth-child(n+10) { display: none; }

  /* Episodes */
  .panel--episodes { --eps-sticky: 71px; }
  .eps-progress, .eps-invite { display: none; }
  .eps-tools { flex-wrap: wrap; gap: 8px; padding-top: 0; }
  .eps-jump { flex: 0 1 260px; }
  .eps-jump__field, .eps-spoil, .eps-markall { min-height: 44px; border-radius: 12px; }
  .eps-spoil { font-size: 15px; }
  .eps-markall { display: inline-flex; font-size: 15px; font-weight: 700; }
  .eps-quick { margin: 12px 0 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
  .eps-years { flex-wrap: wrap; margin: 12px 0 0; padding: 0; overflow: visible; }
  .eps-year { flex: none; flex-direction: row; gap: 6px; min-height: 44px; padding: 0 14px; }
  .eps-year__n::before { content: "· "; }
  .eps-list { padding-top: 14px; }
  .eps-month__head { min-height: 56px; padding: 0 8px; }
  .eps-month__name { font-size: 18px; }
  .eps-month__head:hover { background: var(--s1); }

  .ep { margin: 0; padding: 0 8px; }
  .ep:hover { background: var(--s1); }
  .ep__row { align-items: center; gap: 4px; }
  .ep__main { display: grid; grid-template-columns: 64px minmax(0, 1fr) 120px; gap: 16px; align-items: center; padding: 12px 0; }
  .ep__num { width: auto; padding: 0; font-size: 14px; }
  .ep__body { gap: 2px; }
  .ep__title.clamp2 { -webkit-line-clamp: 1; }
  .ep__meta { display: none; }
    .ep__date { display: block; font-size: 14px; color: var(--tx3); }
  .ep__badge { display: none; }
  .ep.is-next .ep__num { color: var(--gold-ink); }
  .ep.is-next .ep__num::after { content: "Up next"; display: block; margin-top: 2px; font-size: 13px; letter-spacing: .02em; }
  .ep__extra { padding: 0 104px 12px 80px; margin-top: -10px; }
  .ep__syn.clamp2 { -webkit-line-clamp: 1; }
  .ep__upto { flex: none; display: inline-flex; width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; color: var(--tx3); }
  .ep__upto:hover { background: var(--s2); color: var(--gold-ink); }
  .ep__check { width: 44px; height: 44px; margin: 0; }
  .ep__tick { width: 28px; height: 28px; }
  .ep__check:hover .ep__tick { border-color: var(--gold); }
  .ep__actions { padding-left: 80px; }

  .rate-stars { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ep.is-flash::before { animation: none; opacity: .6; }
}
