/* Studio Website — branded chrome + hero carousel + section layouts.
   Pairs with shatter.css for shared variables (colors, fonts). Templates link
   both stylesheets; website.css overrides body styles where the studio chrome
   needs a different look than the shatter feed pages. */

:root {
    --studio-bg: #0a0e13;
    --studio-card: #16202a;
    --studio-card-border: #2f3a44;
    --studio-text: #e7e9ea;
    --studio-muted: #8b98a5;
    --studio-accent: #ff7a1a;
    --studio-accent-hover: #ff8a3a;
    --studio-header-h: 64px;
    --studio-max: 1200px;
}

body.studio-body {
    background: var(--studio-bg);
    color: var(--studio-text);
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ============================================================== Header */
.studio-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 14, 19, 0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--studio-card-border);
}
.studio-header-inner {
    max-width: var(--studio-max);
    margin: 0 auto;
    padding: 0 16px;
    height: var(--studio-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.studio-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--studio-text);
    font-weight: 800;
    line-height: 1.05;
}
.studio-header-logo { max-height: 40px; max-width: 140px; object-fit: contain; display: block; }
.studio-header-brand-text {
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 0.05em;
    white-space: pre-line;
}
.studio-header-nav {
    display: flex;
    gap: 24px;
}
.studio-header-nav-link {
    color: var(--studio-text);
    font-size: 15px;
    font-weight: 500;
    padding: 4px 2px;
    position: relative;
    transition: color 0.15s;
}
.studio-header-nav-link:hover { color: var(--studio-accent); }
.studio-header-nav-link.is-active {
    color: var(--studio-accent);
}
.studio-header-nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--studio-accent);
    border-radius: 1px;
}
.studio-header-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--studio-text);
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}
.studio-header-menu-toggle:hover { background: rgba(255, 255, 255, 0.08); }

@media (max-width: 800px) {
    .studio-header { position: relative; }
    .studio-header-inner { padding: 0 12px; gap: 10px; }
    .studio-header-brand-text { font-size: 14px; }
    .studio-header-menu-toggle { display: flex; }
    .studio-header-nav {
        display: none;
        position: absolute;
        top: var(--studio-header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 8px 0;
        background: rgba(10, 14, 19, 0.98);
        border-bottom: 1px solid var(--studio-card-border);
    }
    .studio-header-nav.is-open { display: flex; }
    .studio-header-nav .studio-header-nav-link { padding: 12px 16px; }
    .studio-header-nav .studio-header-nav-link.is-active::after { display: none; }
}

/* ============================================================== Main + sections */
.studio-main {
    max-width: var(--studio-max);
    margin: 0 auto;
    padding: 16px 16px 60px;
}
.studio-section { margin: 28px 0; }
.studio-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.studio-section-title {
    color: var(--studio-accent);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.studio-section-view-all {
    color: var(--studio-muted);
    font-size: 14px;
}
.studio-section-view-all:hover { color: var(--studio-accent); }
.studio-empty { color: var(--studio-muted); padding: 16px; }

/* ============================================================== Hero carousel */
.studio-hero {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 28px;
    background: var(--studio-card);
}
.studio-hero-track {
    position: relative;
    height: clamp(360px, 50vh, 520px);
    overflow: hidden;
}
.studio-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center right;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.studio-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.studio-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 14, 19, 0.95) 0%, rgba(10, 14, 19, 0.7) 40%, rgba(10, 14, 19, 0) 70%);
}
.studio-hero-content {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(560px, 60%);
    /* Left padding clears the prev-arrow button (which sits at left:16,
       width:44 → ends at 60px) so the headline / eyebrow / subtitle text
       doesn't tuck underneath it. */
    padding: 36px 36px 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.studio-hero-eyebrow {
    color: var(--studio-accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}
.studio-hero-headline {
    color: var(--studio-text);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.studio-hero-subtitle {
    color: rgba(231, 233, 234, 0.92);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.5;
    margin: 0;
    max-width: 480px;
}
.studio-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.studio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    border: 2px solid transparent;
}
.studio-btn-primary { background: var(--studio-accent); color: #fff; }
.studio-btn-primary:hover { background: var(--studio-accent-hover); }
.studio-btn-ghost {
    background: transparent;
    border-color: rgba(231, 233, 234, 0.4);
    color: var(--studio-text);
}
.studio-btn-ghost:hover { border-color: var(--studio-text); }
.studio-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 14, 19, 0.45);
    color: var(--studio-accent);
    border: 1px solid rgba(255, 122, 26, 0.4);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.studio-hero-arrow:hover { background: rgba(10, 14, 19, 0.75); }
.studio-hero-arrow-prev { left: 16px; }
.studio-hero-arrow-next { right: 16px; }
.studio-hero-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.studio-hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(231, 233, 234, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
}
.studio-hero-dot.is-active { background: var(--studio-accent); }
.studio-hero-empty {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--studio-muted);
}
.studio-hero-empty-inner { text-align: center; }
.studio-hero-empty-inner .studio-hero-headline { font-size: 36px; }

/* ============================================================== Featured actors + Actor feed (paired row) */
/* When Featured Actors + Actor Social Feed are adjacent in the section order
   the template renders them inside a `.studio-row-pair` wrapper so they sit
   side-by-side on the home page (mockup-faithful) instead of stacking. The
   two children share equal flex space and stretch to a common height so the
   iframe and the 3-actor grid line up. */
.studio-row-pair {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin: 28px 0;
}
.studio-row-pair > .studio-section {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.studio-row-pair > .studio-section .studio-actors-carousel {
    flex: 1;
    min-height: 0;
}
.studio-row-pair > .studio-section .studio-actors-grid {
    flex: 1;
    /* Equal-share vertical split so each card grows with the row height (set
       by the iframe's min-height of 380px). align-items: stretch makes the
       cards fill their grid cell rather than sitting at intrinsic size. */
    grid-auto-rows: 1fr;
    align-items: stretch;
}
/* In row-pair mode, override the default 3/4 aspect-ratio so the card grows
   vertically to match the iframe; mobile-stack guard preserves a sensible
   minimum height when the layout collapses to a column. */
.studio-row-pair .studio-actor-card {
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
}
.studio-row-pair .studio-actor-feed-frame {
    flex: 1;
    height: auto;
    min-height: 380px;
}
/* Episode tiles inside a row-pair (actor profile Featured Episodes + Social
   Feed pair) — drop from the default 4-col grid down to 2 cols so each tile
   stays a useful size inside the narrower half-width column. The 900px
   media block below already flattens row-pair to a single column, so this
   only applies on desktop. */
.studio-row-pair > .studio-section .studio-episodes-row {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
    .studio-row-pair { flex-direction: column; }
    .studio-row-pair .studio-actor-feed-frame { min-height: 360px; }
}

.studio-actors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.studio-actor-card {
    position: relative;
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center top;
    background-color: var(--studio-card);
    border-radius: 6px;
    overflow: hidden;
    display: block;
    transition: transform 0.15s;
}
.studio-actor-card:hover { transform: translateY(-2px); }
.studio-actor-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.85) 100%);
}
.studio-actor-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 2;
}
.studio-actor-card-name { margin: 0; font-size: 3em; line-height: 1.05; font-weight: 700; color: #fff; }
/* Home-page Featured Actors carousel uses the same card class but lives in a
   much smaller tile — shrink the name back down (3em is for the show-page Cast). */
.studio-section-featured-actors .studio-actor-card-name {
    font-size: 1em;
    line-height: 1.2;
}
.studio-actor-card-role { margin: 4px 0 0; font-size: 12px; color: var(--studio-muted); }
/* The "currently pinned" state mirrors which actor the Social Feed iframe is
   showing — accent outline so users see their click took effect (the iframe
   swap is instant but a passive viewer might miss it). */
.studio-actor-card.is-pinned {
    outline: 3px solid var(--studio-accent);
    outline-offset: -3px;
}

/* Flip-card cast on the show page. Front shows the actor's per-show portrait
   + name; back shows modifier-perk badges (per-show overrides actually in
   effect) and View Actor / View on Shatter actions. JS toggles `.is-flipped`
   on click / Enter / Space. */
.studio-actor-flip-card {
    position: relative;
    perspective: 1000px;
    aspect-ratio: 3 / 4;
    cursor: pointer;
    background: transparent;
    outline: none;
}
.studio-actor-flip-card:focus-visible .studio-actor-flip-card-inner {
    box-shadow: 0 0 0 3px var(--studio-accent);
    border-radius: 6px;
}
.studio-actor-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}
.studio-actor-flip-card.is-flipped .studio-actor-flip-card-inner {
    transform: rotateY(180deg);
}
.studio-actor-flip-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 6px;
    overflow: hidden;
}
/* backface-visibility hides the off-axis face visually but the browser still
   hit-tests it — without these rules, clicks on the back face's action buttons
   (View Actor / Shatter @handle) land on the front face and trigger a flip
   instead of navigating. Pointer-events toggle in lockstep with .is-flipped
   so the visible face is always the click target. */
.studio-actor-flip-card .studio-actor-flip-card-back  { pointer-events: none; }
.studio-actor-flip-card .studio-actor-flip-card-front { pointer-events: auto; }
.studio-actor-flip-card.is-flipped .studio-actor-flip-card-back  { pointer-events: auto; }
.studio-actor-flip-card.is-flipped .studio-actor-flip-card-front { pointer-events: none; }
.studio-actor-flip-card-front {
    background-size: cover;
    background-position: center top;
    background-color: var(--studio-card);
}
/* Front-of-card perk chips — small icon pills in the top-left corner. The
   admin's per-show overrides surface here so users can see at a glance which
   episodes deviate from the actor's default appearance/name/description. */
.studio-actor-flip-front-perks {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    display: flex;
    gap: 4px;
}
.studio-actor-flip-perk-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--studio-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1;
}
/* Two-arrows flip indicator — top-right of the front face. Signals to users
   that the card is interactive (rotates on click). */
.studio-actor-flip-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    padding: 3px;
    width: 22px;
    height: 22px;
}

/* Collector-card back face: optional Shatter banner background + dark
   overlay so the bio + buttons stay readable. */
.studio-actor-flip-card-back {
    transform: rotateY(180deg);
    background: var(--studio-card);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--studio-card-border);
    overflow: hidden;
    /* padding lives on the inner content wrapper so the overlay can fill
       edge-to-edge. */
}
.studio-actor-flip-card-back-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 19, 0.85) 0%, rgba(10, 14, 19, 0.95) 100%);
}
.studio-actor-flip-card-back-content {
    position: relative;
    z-index: 2;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.studio-actor-flip-back-name {
    margin: 0;
    font-size: 1.4em;
    font-weight: 800;
    color: var(--studio-text);
    line-height: 1.1;
}
.studio-actor-flip-back-bio {
    flex: 1;
    margin: 0;
    color: var(--studio-text);
    overflow: hidden;
    font-weight: 600;
    /* font-size + line-height set inline per-card from a piecewise formula
       that scales 3em → 0.7em based on bio character count. */
}
/* Block-level inner so JS can measure scrollHeight + translateY-animate it.
   pointer-events:none keeps the user from interrupting the ping-pong scroll. */
.studio-actor-flip-back-bio-inner {
    display: block;
    pointer-events: none;
    will-change: transform;
}
.studio-actor-flip-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}
.studio-actor-flip-action {
    font-size: 13px;
    padding: 8px 12px;
    justify-content: center;
}
/* Shatter @handle button — square logo to the left of the @handle text. */
.studio-actor-flip-action-shatter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.studio-actor-flip-shatter-logo {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex: 0 0 16px;
}

/* Show page — Episodes + Social Media magazine layout. When the cast has any
   Shatter-enabled actor, the Episodes grid switches to a 4-column track with
   the Social Media tile pinned to column 4, rows 1-3 (= height of 3 episode
   tiles). grid-auto-flow:dense lets episode cards fill the remaining cells
   in columns 1-3 rows 1-3 first, then continue across all 4 columns from
   row 4 onward. */
.studio-episodes-grid-with-social {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense;
    /* Each row sized like an episode card's natural 16:10 ratio at the 1fr
       column width, so the social tile's 3-row span lines up with 3 episode
       cards. */
    grid-auto-rows: 1fr;
    gap: 12px;
}
.studio-show-social-tile {
    /* Spans the right HALF of the 4-col grid (cols 3-4) so the social tile
       has a substantial focal-point footprint; episodes fill cols 1-2
       rows 1-3 (= 6 tiles top-left) and then continue across all 4 cols
       from row 4 onward via grid-auto-flow:dense. */
    grid-column: 3 / span 2;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    background: var(--studio-card);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.studio-show-social-label {
    color: var(--studio-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    background: rgba(10, 14, 19, 0.75);
}
.studio-show-social-tile .studio-actor-feed-frame {
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: 0;
    background: transparent;
}
/* Mobile — stack the social tile above the episodes (1-2 columns). */
@media (max-width: 900px) {
    .studio-episodes-grid-with-social {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .studio-show-social-tile {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 360px;
    }
}
@media (max-width: 520px) {
    .studio-episodes-grid-with-social { grid-template-columns: 1fr; }
}

/* Hero — Show Logo overlay. The Logo helper falls back to the show's
   featured image so this <img> is what users see whenever ANY image is set;
   only when no image at all exists do we fall back to the plain text title
   (see template). drop-shadow follows the transparent PNG's silhouette. */
.studio-show-hero-logo {
    display: block;
    max-width: min(520px, 80%);
    max-height: clamp(120px, 22vh, 220px);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 0 12px;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.7));
}
@media (max-width: 600px) {
    .studio-show-hero-logo {
        max-width: 90%;
        max-height: 140px;
        margin-bottom: 8px;
    }
}

/* Show-page episode cards stack premise + date + title vertically (no logo
   on the left like Newest Episodes has). Without this override, the
   .studio-episode-card-info flex-row default would put the premise side-by-
   side with the text block. */
.studio-show-episode-card .studio-episode-card-info {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

/* Season tabs — sit next to the "Episodes" title in the section header
   when the show's episode-id strings encode multiple seasons. JS toggles
   `.is-active` (visual) and `.is-season-hidden` on cards for filtering. */
.studio-season-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.studio-season-tab {
    background: transparent;
    color: var(--studio-muted);
    border: 1px solid var(--studio-card-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.studio-season-tab:hover {
    color: var(--studio-text);
    border-color: var(--studio-text);
}
.studio-season-tab.is-active {
    color: var(--studio-accent);
    border-color: var(--studio-accent);
    background: rgba(255, 122, 26, 0.1);
}
/* Episode card hidden by season toggle. Needs display:none because both
   grid contexts (4-col with-social and auto-fill default) ignore [hidden]
   spacing without it. */
.studio-episodes-grid-with-social .studio-show-episode-card.is-season-hidden,
.studio-episodes-grid .studio-show-episode-card.is-season-hidden {
    display: none;
}

/* Featured Actors carousel — column layout with optional info-block on top,
   then a horizontal row containing prev-arrow / 3-card grid / next-arrow.
   Arrows are server-hidden when the pool is ≤3 actors. */
.studio-actors-carousel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.studio-actors-carousel-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.studio-actors-carousel .studio-actors-grid {
    flex: 1;
    min-width: 0;
}
/* Selected-actor info panel — JS-populated, mobile-only. Desktop hides it
   entirely; mobile reveals when JS un-sets the [hidden] attr after a pick. */
.studio-actors-selected-info { display: none; }
.studio-actors-carousel-arrow {
    flex: 0 0 32px;
    align-self: stretch;
    background: rgba(10, 14, 19, 0.55);
    color: var(--studio-text);
    border: 1px solid var(--studio-card-border);
    border-radius: 6px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.studio-actors-carousel-arrow:hover {
    background: rgba(10, 14, 19, 0.85);
    border-color: var(--studio-accent);
    color: var(--studio-accent);
}
.studio-actors-carousel-arrow[hidden] { display: none; }

/* Actor Social Feed iframe block */
.studio-actor-feed-frame {
    background: var(--studio-card);
    border-radius: 6px;
    overflow: hidden;
    height: 380px;
    position: relative;
}
.studio-actor-feed-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.studio-actor-feed-frame-tall { height: 720px; }
/* Loading overlay shown while the iframe navigates to a new actor set
   (clicked actor isn't in the currently-loaded set). JS toggles `hidden`. */
.studio-actor-feed-spinner {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 19, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.studio-actor-feed-spinner[hidden] { display: none; }
.studio-actor-feed-spinner::before {
    content: '';
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 122, 26, 0.25);
    border-top-color: var(--studio-accent);
    border-radius: 50%;
    animation: studio-actor-feed-spin 0.8s linear infinite;
}
@keyframes studio-actor-feed-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================== Episode rows */
.studio-episodes-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    overflow-x: auto;
}
.studio-section-featured-show .studio-episodes-row {
    grid-template-columns: repeat(5, 1fr);
}
.studio-episode-card {
    position: relative;
    aspect-ratio: 16 / 10;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--studio-card);
    border-radius: 6px;
    overflow: hidden;
    display: block;
    transition: transform 0.15s;
}
.studio-episode-card:hover { transform: translateY(-2px); }
/* Full-card click target → episode page. The logo-link inside the info
   block sits at a higher stacking context and gets its own clicks (→ show
   page); the overlay + text are pointer-events:none so clicks fall through
   to this base link. */
.studio-episode-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.studio-episode-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--studio-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}
.studio-episode-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}
.studio-episode-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    z-index: 2;
    display: flex;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}
.studio-episode-card-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 36px;
    pointer-events: auto;
    cursor: pointer;
}
.studio-episode-card-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    object-fit: contain;
    /* drop-shadow follows the PNG's transparent silhouette — keeps the logo
       readable against any thumbnail backdrop without a hard rectangle. */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.studio-episode-card-text {
    flex: 1;
    min-width: 0;
}
.studio-episode-show {
    color: var(--studio-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.studio-episode-title { font-size: 14px; font-weight: 600; color: #fff; }
.studio-episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* Featured Shows row — show posters (more vertical than episode thumbs) so a
   3:4 aspect ratio sits well across 4-up rows. */
.studio-shows-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.studio-show-card {
    position: relative;
    aspect-ratio: 3 / 4;
    background-size: cover;
    background-position: center top;
    background-color: var(--studio-card);
    border-radius: 6px;
    overflow: hidden;
    display: block;
    transition: transform 0.15s;
}
.studio-show-card:hover { transform: translateY(-2px); }
.studio-show-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.9) 100%);
}
.studio-show-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 2;
}
.studio-show-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* Eyebrow line above the title — `5 EPISODES · 3 ACTORS` style summary. */
.studio-show-card-meta {
    margin: 0 0 4px;
    color: var(--studio-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
/* Cast row — small round headshots along the bottom of the show tile, with a
   `+N` chip when the show has more actors than the row can comfortably fit. */
.studio-show-card-cast {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}
.studio-show-card-headshot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--studio-card);
    background: var(--studio-card);
    flex-shrink: 0;
}
.studio-show-card-headshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}
.studio-show-card-headshot-more {
    color: var(--studio-text);
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.6);
}
/* The show's featured-image PNG (usually a transparent logo) sits in the
   top-left corner as a brand mark on top of the scene/location background.
   drop-shadow keeps it readable against a busy backdrop. */
.studio-show-card-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: clamp(60px, 35%, 120px);
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

/* Production-type tag badges on show tiles (VIDEO / FRAMES / 3D). Cluster
   sits top-right, opposite the show logo (top-left), wraps when a show
   carries multiple production-type tags. */
.studio-show-card-tags {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    pointer-events: none;
    max-width: 60%;
}
.studio-show-card-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 3px 7px;
    border-radius: 3px;
    color: #fff;
    text-transform: uppercase;
    background: var(--studio-accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.studio-show-card-tag-video   { background: rgba(209, 45, 45, 0.7); }
.studio-show-card-tag-frames  { background: rgba(29, 155, 240, 0.7); }
.studio-show-card-tag-3d      { background: rgba(124, 77, 255, 0.7); }
.studio-show-card-tag-youtube { background: rgba(255, 0, 0, 0.7); }
.studio-show-card-tag-in-game { background: rgba(0, 180, 90, 0.7); }

/* Episode-card production tags — same VIDEO/FRAMES/3D/YOUTUBE pills as the
   show-card variant, but anchored on the LEFT side just below the date
   badge (top-right is occupied by the episode-id pill). Inherits each tag
   value from the parent show by default; episode-level overrides win when
   present (see get_episode_production_tags). */
.studio-episode-card-prod-tags {
    position: absolute;
    top: 30px;
    right: 8px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    pointer-events: none;
    max-width: 60%;
}
.studio-episode-card-prod-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 3px;
    color: #fff;
    text-transform: uppercase;
    background: var(--studio-accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.studio-episode-card-prod-tag-video   { background: rgba(209, 45, 45, 0.7); }
.studio-episode-card-prod-tag-frames  { background: rgba(29, 155, 240, 0.7); }
.studio-episode-card-prod-tag-3d      { background: rgba(124, 77, 255, 0.7); }
.studio-episode-card-prod-tag-youtube { background: rgba(255, 0, 0, 0.7); }
.studio-episode-card-prod-tag-in-game { background: rgba(0, 180, 90, 0.7); }

@media (max-width: 900px) {
    .studio-episodes-row { grid-template-columns: repeat(2, 1fr); }
    .studio-shows-row    { grid-template-columns: repeat(2, 1fr); }
    .studio-actors-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .studio-episodes-row,
    .studio-shows-row,
    .studio-actors-grid { grid-template-columns: 1fr; }
}

/* ============================================================== Show / Episode / Actor heroes */
.studio-show-hero, .studio-episode-hero, .studio-actor-hero {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 28px;
    background: var(--studio-card);
    min-height: 320px;
    background-size: cover;
    background-position: center;
}
.studio-show-hero-overlay, .studio-episode-hero-overlay, .studio-actor-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 19, 0) 0%, rgba(10, 14, 19, 0.9) 100%);
}
.studio-show-hero-content, .studio-episode-hero-content {
    position: relative;
    padding: 48px 32px 32px;
    z-index: 2;
}
.studio-show-title, .studio-episode-title-large {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    margin: 0 0 12px;
    text-transform: uppercase;
}
.studio-show-desc, .studio-episode-desc {
    max-width: 700px;
    color: rgba(231, 233, 234, 0.9);
    font-size: 16px;
    margin: 0 0 14px;
}
.studio-episode-show-link { margin: 0 0 8px; }
.studio-episode-show-link a { color: var(--studio-accent); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 0.05em; }
.studio-episode-actions { margin-top: 18px; }

/* Episode placeholder — playback not built yet. Hero background + centered
   "PLAYBACK COMING SOON" message. */
.studio-episode-placeholder {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 28px;
    background: var(--studio-card);
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.studio-episode-placeholder-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 19, 0.55) 0%, rgba(10, 14, 19, 0.85) 100%);
}
.studio-episode-placeholder-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 48px 24px;
    max-width: 720px;
}
.studio-episode-coming-soon {
    color: var(--studio-accent);
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 24px 0 0;
}

.studio-actor-hero { min-height: 360px; }
.studio-actor-hero-content {
    position: relative;
    padding: 32px;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    z-index: 2;
    min-height: 360px;
}
.studio-actor-hero-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--studio-bg);
    flex: 0 0 160px;
    background: var(--studio-card);
}
.studio-actor-hero-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.studio-actor-hero-info { flex: 1; min-width: 0; }
.studio-actor-hero-name { font-size: 32px; font-weight: 800; margin: 0 0 4px; }
.studio-actor-hero-handle { color: var(--studio-muted); margin-bottom: 10px; }
.studio-actor-hero-bio { max-width: 600px; margin: 0 0 12px; }
.studio-actor-hero-shows-label { color: var(--studio-muted); font-size: 13px; margin-right: 8px; }
.studio-show-badge {
    display: inline-block;
    background: var(--studio-card);
    border: 1px solid var(--studio-card-border);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    margin-right: 6px;
    margin-top: 4px;
}
.studio-show-badge:hover { border-color: var(--studio-accent); color: var(--studio-accent); }

/* ============================================================== Footer */
.studio-footer {
    border-top: 1px solid var(--studio-card-border);
    margin-top: 60px;
    padding: 24px 16px;
}
.studio-footer-inner {
    max-width: var(--studio-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--studio-muted);
    font-size: 13px;
}
.studio-footer-brand { color: var(--studio-text); font-weight: 700; }

/* ============================================================== Mobile overrides
   Phones (<=600px): hero carousel reflows + Featured Actors becomes a 3-up
   row of small square photo chips with a separate selected-actor info
   block above the strip. */
@media (max-width: 600px) {
    /* --- Hero carousel --- */
    .studio-hero-track { height: clamp(280px, 60vh, 420px); }
    .studio-hero-overlay {
        background: linear-gradient(180deg, rgba(10, 14, 19, 0.45) 0%, rgba(10, 14, 19, 0.95) 70%);
    }
    .studio-hero-slide { background-position: center top; }
    .studio-hero-content {
        position: absolute;
        left: 0; right: 0; top: auto; bottom: 0;
        width: 100%;
        padding: 16px 16px 56px;
        gap: 8px;
    }
    .studio-hero-eyebrow { font-size: 11px; }
    .studio-hero-headline { font-size: clamp(24px, 7vw, 32px); }
    .studio-hero-subtitle { font-size: 13px; line-height: 1.4; }
    .studio-hero-actions { gap: 8px; flex-wrap: wrap; }
    .studio-hero-actions .studio-btn { padding: 9px 14px; font-size: 13px; }
    .studio-hero-arrow {
        width: 32px; height: 32px;
        font-size: 22px;
    }
    .studio-hero-arrow-prev { left: 8px; }
    .studio-hero-arrow-next { right: 8px; }
    .studio-hero-dots { bottom: 12px; }

    /* --- Featured Actors carousel --- */
    /* Higher specificity than the generic 1-col stack rule below so we keep
       3 in a row on phones. */
    .studio-actors-carousel .studio-actors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        max-width: 280px;
        margin: 0 auto;
    }
    .studio-actors-carousel .studio-actor-card {
        aspect-ratio: 1 / 1;
        min-height: 0;
        height: auto;
    }
    .studio-actors-carousel .studio-actor-card-overlay,
    .studio-actors-carousel .studio-actor-card-info { display: none; }

    .studio-actors-carousel-arrow { flex: 0 0 28px; font-size: 22px; }

    .studio-actors-selected-info {
        display: block;
        text-align: center;
        padding: 0 8px 8px;
    }
    .studio-actors-selected-info[hidden] { display: none; }
    .studio-actors-selected-name {
        color: var(--studio-text);
        font-size: 18px;
        font-weight: 700;
        margin: 0 0 4px;
    }
    .studio-actors-selected-bio {
        color: var(--studio-muted);
        font-size: 13px;
        margin: 0;
    }
}

/* Shmotime episode ID — small monospace pill anchored top-right on every
   episode tile across the Studio Website. Date badge (.studio-episode-badge)
   keeps top-left; the two don't collide. */
.studio-episode-badge-id {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--studio-text);
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}
/* Show-page-only top row: no date badge competing for top-left, so put the
   episode ID there and lift the production tags to top: 8px so both pills
   sit on the same horizontal line (ID left, tags right). */
.studio-show-episode-card .studio-episode-badge-id {
    left: 8px;
    right: auto;
}
.studio-show-episode-card .studio-episode-card-prod-tags {
    top: 8px;
}

/* Show page — Episodes grid: artwork fills the tile, and everything except
   the episode-id badge fades in on hover. Scoped to .studio-body-show so the
   home page Newest Episodes row (which shares .studio-episode-card) is
   untouched. */
.studio-body-show .studio-show-episode-card { background-size: cover; }
.studio-body-show .studio-show-episode-card .studio-episode-card-overlay,
.studio-body-show .studio-show-episode-card .studio-episode-card-info,
.studio-body-show .studio-show-episode-card .studio-episode-card-prod-tags {
    opacity: 0;
    transition: opacity 0.2s;
}
.studio-body-show .studio-show-episode-card:hover .studio-episode-card-overlay,
.studio-body-show .studio-show-episode-card:hover .studio-episode-card-info,
.studio-body-show .studio-show-episode-card:hover .studio-episode-card-prod-tags {
    opacity: 1;
}

/* Episodes index + home Newest Episodes — artwork fills the tile; only the
   date badge + show logo are visible by default, the rest fades in on hover.
   We fade .studio-episode-card-text (show-name + episode-title) but NOT the
   parent .studio-episode-card-info, so the logo (a sibling of -text) stays
   visible. */
.studio-body-episodes .studio-episode-card,
.studio-body-home .studio-episode-card { background-size: cover; }
.studio-body-episodes .studio-episode-card .studio-episode-card-overlay,
.studio-body-episodes .studio-episode-card .studio-episode-card-text,
.studio-body-episodes .studio-episode-card .studio-episode-card-prod-tags,
.studio-body-episodes .studio-episode-card .studio-episode-badge-id,
.studio-body-home .studio-episode-card .studio-episode-card-overlay,
.studio-body-home .studio-episode-card .studio-episode-card-text,
.studio-body-home .studio-episode-card .studio-episode-card-prod-tags,
.studio-body-home .studio-episode-card .studio-episode-badge-id {
    opacity: 0;
    transition: opacity 0.2s;
}
.studio-body-episodes .studio-episode-card:hover .studio-episode-card-overlay,
.studio-body-episodes .studio-episode-card:hover .studio-episode-card-text,
.studio-body-episodes .studio-episode-card:hover .studio-episode-card-prod-tags,
.studio-body-episodes .studio-episode-card:hover .studio-episode-badge-id,
.studio-body-home .studio-episode-card:hover .studio-episode-card-overlay,
.studio-body-home .studio-episode-card:hover .studio-episode-card-text,
.studio-body-home .studio-episode-card:hover .studio-episode-card-prod-tags,
.studio-body-home .studio-episode-card:hover .studio-episode-badge-id {
    opacity: 1;
}

/* ============================================================== Cast "Show More" tile
   Sits as the last grid cell when the cast count exceeds the initial visible
   page. Click reveals the next batch of hidden cards; once nothing's hidden
   the JS removes the tile from the layout. */
.studio-actor-flip-card.is-actor-hidden { display: none; }
.studio-actor-show-more-card {
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--studio-card);
    border: 2px dashed var(--studio-card-border);
    border-radius: 6px;
    color: var(--studio-text);
    cursor: pointer;
    font: inherit;
    padding: 16px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.studio-actor-show-more-card:hover {
    border-color: var(--studio-accent);
    color: var(--studio-accent);
    background: rgba(255, 122, 26, 0.05);
}
.studio-actor-show-more-icon  { font-size: 48px; line-height: 1; font-weight: 300; }
.studio-actor-show-more-label { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.studio-actor-show-more-count { font-size: 12px; opacity: 0.75; }

/* ============================================================== Locations grid + lightbox
   Magazine-style auto-fill grid; each tile is a clickable anchor with thumb,
   gradient overlay, and the location's title pinned to the bottom-left. */
.studio-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.studio-location-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid var(--studio-card-border);
    background: var(--studio-card);
    cursor: zoom-in;
}
.studio-location-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.studio-location-card:hover img { transform: scale(1.04); }
.studio-location-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}
.studio-location-card-name {
    position: absolute;
    left: 12px; right: 12px; bottom: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Tag badges — rendered in hero sections (show + episode) from post_tag terms.
   Episode template falls back to the parent show's tags when the episode has
   none of its own, so a per-episode tag override is just "tag the episode". */
.studio-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
}
.studio-tag-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Standalone lightbox — JS mounts a single instance on first init, persists
   for re-use. Same layout as the Shatter lightbox but with no shatter.js
   dependency, so the show page works whether or not Shatter is on the page. */
.studio-lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.studio-lightbox[hidden] { display: none; }
.studio-lightbox-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}
.studio-lightbox-img {
    position: relative;
    max-width: min(95vw, 1600px);
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
}
.studio-lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.studio-lightbox-close:hover { background: #fff; }

/* Locations "Show More" tile — same reveal-in-batches pattern as the cast
   tile but scoped to the locations grid and matched to its 4:3 aspect. */
.studio-location-card.is-location-hidden { display: none; }
.studio-location-show-more-card {
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--studio-card);
    border: 2px dashed var(--studio-card-border);
    border-radius: 6px;
    color: var(--studio-text);
    cursor: pointer;
    font: inherit;
    padding: 16px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.studio-location-show-more-card:hover {
    border-color: var(--studio-accent);
    color: var(--studio-accent);
    background: rgba(255, 122, 26, 0.05);
}
.studio-location-show-more-icon  { font-size: 48px; line-height: 1; font-weight: 300; }
.studio-location-show-more-label { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.studio-location-show-more-count { font-size: 12px; opacity: 0.75; }

/* Episodes "Show More" tile — slots into both the show-page episodes grid
   AND the /website/episodes listing row. Aspect ratio matches typical episode
   thumbs so the tile sits naturally next to its siblings. */
.studio-episode-card.is-episode-hidden { display: none; }
.studio-episode-show-more-card {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--studio-card);
    border: 2px dashed var(--studio-card-border);
    border-radius: 6px;
    color: var(--studio-text);
    cursor: pointer;
    font: inherit;
    padding: 16px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.studio-episode-show-more-card:hover {
    border-color: var(--studio-accent);
    color: var(--studio-accent);
    background: rgba(255, 122, 26, 0.05);
}
.studio-episode-show-more-icon  { font-size: 48px; line-height: 1; font-weight: 300; }
.studio-episode-show-more-label { font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.studio-episode-show-more-count { font-size: 12px; opacity: 0.75; }

/* Actors-list "Show More" tile — used on the /website/actors listing. Mirrors
   the cast Show More but lives in the .studio-actors-grid alongside actor cards
   that have 3:4 aspect. */
.studio-actor-card.is-actor-list-hidden { display: none; }
.studio-actor-list-show-more-card {
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--studio-card);
    border: 2px dashed var(--studio-card-border);
    border-radius: 6px;
    color: var(--studio-text);
    cursor: pointer;
    font: inherit;
    padding: 16px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.studio-actor-list-show-more-card:hover {
    border-color: var(--studio-accent);
    color: var(--studio-accent);
    background: rgba(255, 122, 26, 0.05);
}

/* Actors index page only — half-size cards (6 cols desktop, 4 tablet, 2 mobile).
   .studio-body-actors is set on the /website/actors document; other surfaces
   (home Featured Actors carousel, show-page Cast) keep their existing sizes. */
body.studio-body-actors .studio-actors-grid {
    grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 900px) {
    body.studio-body-actors .studio-actors-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 520px) {
    body.studio-body-actors .studio-actors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Listing-page search input — sits inside .studio-section-head, right-aligned.
   The matching JS lives in initListingSearch (assets/js/website.js). */
.studio-search {
    margin-left: auto;
}
.studio-search-input {
    width: 220px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--studio-card-border);
    border-radius: 4px;
    background: var(--studio-card);
    color: var(--studio-text);
    font: inherit;
    font-size: 14px;
    transition: border-color 0.15s;
}
.studio-search-input:focus {
    outline: none;
    border-color: var(--studio-accent);
}
.studio-search-input::placeholder { color: var(--studio-muted); }

/* Search-state interactions: while the parent grid carries .is-searching,
   reveal cards that Show More had hidden (so matches in the unrendered
   batch still surface) and hide the Show More tile (the list is being
   filtered, not paged). */
.studio-actors-grid.is-searching .studio-actor-card.is-actor-list-hidden { display: block; }
.studio-actors-grid.is-searching .studio-actor-list-show-more-card       { display: none; }
.studio-shows-row.is-searching   .studio-show-card.is-show-hidden        { display: block; }
.studio-episodes-row.is-searching .studio-episode-card.is-episode-hidden { display: block; }
.studio-episodes-row.is-searching .studio-episode-show-more-card         { display: none; }

/* Cards whose title doesn't match the active query. */
.studio-actor-card.is-search-hidden,
.studio-show-card.is-search-hidden,
.studio-episode-card.is-search-hidden { display: none !important; }
