/* Keep the global catalog search usable even when navigation links are dense. */
.header-search {
  position: relative;
  flex: 1 1 360px;
  min-width: 260px;
  max-width: 480px;
}
.header-search-cluster { display: flex; flex: 1 1 420px; min-width: 290px; max-width: 560px; gap: 7px; }
.header-search-cluster .header-search { flex: 1 1 auto; min-width: 0; max-width: none; }
.header-advanced-search { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 36px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); background: rgba(255, 255, 255, .025); font-size: .73rem; font-weight: 800; white-space: nowrap; }
.header-advanced-search:hover, .header-advanced-search.active { border-color: var(--accent); color: var(--accent); background: rgba(233, 69, 96, .12); }
.global-search-suggestions { position: absolute; z-index: 500; top: calc(100% + 7px); right: 0; left: 0; display: grid; max-height: min(62vh, 460px); overflow-y: auto; border: 1px solid var(--accent); border-radius: 10px; background: #15172b; box-shadow: 0 18px 42px rgba(0, 0, 0, .48); }
.global-search-suggestions[hidden] { display: none; }
.global-search-suggestions button { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); color: var(--text-primary); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.global-search-suggestions button:last-child { border-bottom: 0; }
.global-search-suggestions button:hover, .global-search-suggestions button[aria-selected="true"] { background: rgba(233, 69, 96, .16); }
.global-search-suggestions strong, .global-search-suggestions small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-suggestions strong { font-size: .84rem; }
.global-search-suggestions small { grid-column: 2; color: var(--text-muted); font-size: .72rem; }
.search-suggestion-type { grid-row: span 2; align-self: center; color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.catalog-entity-page { width: min(100% - 48px, 1500px); margin: 0 auto; padding: 28px 0 48px; }
.entity-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; color: var(--text-muted); font-size: .82rem; }
.entity-breadcrumb a { color: var(--text-secondary); }
.catalog-entity-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 20px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.catalog-entity-heading h1 { margin: 2px 0 5px; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.catalog-entity-heading p { margin: 0; color: var(--text-secondary); }
.catalog-entity-heading .eyebrow { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.catalog-entity-empty { padding: 28px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-secondary); background: var(--bg-card); }
.genre-directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.genre-directory-card { display: grid; min-height: 94px; align-content: center; gap: 5px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary); background: linear-gradient(135deg, var(--bg-card), #191b33); transition: border-color .18s ease, transform .18s ease; }
.genre-directory-card:hover { border-color: var(--accent); color: var(--text-primary); transform: translateY(-2px); }
.genre-directory-card strong { overflow: hidden; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.genre-directory-card span { color: var(--text-secondary); font-size: .78rem; }
@media (max-width: 720px) { .catalog-entity-page { width: min(100% - 24px, 1500px); padding-top: 18px; } .genre-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .genre-directory-card { min-height: 78px; padding: 12px; } .global-search-suggestions { position: fixed; top: var(--header-height); right: 12px; left: 12px; max-height: 56vh; } }

/* Every desktop ad rail is a true 300px column. The previous padded sidebar
   shell squeezed a 300px creative into a 268px interior, causing horizontal
   drift and occasional overlap. */
.ad-label { display: none !important; }
.sidebar-ad-rail { width: 300px; }
.sidebar-ad-rail .sidebar-affiliate-ad,
.sidebar-ad-rail .sidebar-trending-ad { box-sizing: border-box; width: 300px; min-height: 250px; margin: 0 0 16px; padding: 0; overflow: hidden; }
.sidebar-ad-rail .ad-slot { display: grid; width: 300px; min-height: 250px; place-items: center; overflow: hidden; }
.sidebar-ad-rail .ad-slot > iframe,
.sidebar-ad-rail .ad-slot > ins,
.sidebar-ad-rail .ad-slot > a,
.sidebar-ad-rail .ad-slot img { display: block; width: 300px; max-width: 300px; }
.entity-rail { width: 300px; }
.entity-rail .video-page-rail-ad { box-sizing: border-box; display: grid; width: 300px; height: 250px; min-height: 250px; padding: 0; place-items: center; overflow: hidden; }
.entity-rail .video-page-rail-ad > iframe,
.entity-rail .video-page-rail-ad > ins,
.entity-rail .video-page-rail-ad > a,
.entity-rail .video-page-rail-ad img { display: block; width: 300px; max-width: 300px; height: 250px; }
.entity-rail .video-page-rail-ad img { object-fit: cover; }
.ad-unavailable { display: none !important; }

/* Keep popular profile suggestions compact in the fixed 300px right rail.
   This is deliberately self-contained so an older cached entity stylesheet
   cannot let an image expand to its intrinsic dimensions. */
.entity-rail-profiles { box-sizing: border-box; width: 300px; padding: 12px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.entity-rail-profiles > div:last-child { display: grid; gap: 8px; }
.entity-rail-card { display: grid; grid-template-columns: 68px minmax(0, 1fr); height: 64px; min-height: 64px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); background: var(--bg-primary); }
.entity-rail-card:hover { color: var(--text-primary); border-color: var(--accent); }
.entity-rail-card > img,
.entity-rail-card > .studio-code-art-rail { box-sizing: border-box; display: block; grid-area: 1 / 1; width: 68px; height: 62px; min-width: 0; min-height: 0; object-fit: cover; background: var(--bg-secondary); }
.entity-rail-card > span { display: grid; grid-area: 1 / 2; align-content: center; gap: 4px; min-width: 0; padding: 7px 8px; }
.entity-rail-card strong,
.entity-rail-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-rail-card strong { font-size: .75rem; }
.entity-rail-card small { color: var(--text-secondary); font-size: .65rem; }

/* Directory search and sorting are a single responsive control group. These
   rules deliberately live in the late-loaded shared stylesheet so cached
   older entity-page CSS cannot leave native, unstyled controls behind. */
.entity-directory-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 560px); gap: 18px; align-items: end; margin-bottom: 22px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); }
.entity-directory-controls { display: grid; grid-template-columns: minmax(0, 1fr) 148px auto; gap: 8px; width: 100%; align-items: center; }
.entity-directory-controls input,
.entity-directory-controls select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; outline: none; color: var(--text-primary); background: var(--bg-primary); font: inherit; }
.entity-directory-controls input::placeholder { color: var(--text-muted); opacity: 1; }
.entity-directory-controls input:focus,
.entity-directory-controls select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233, 69, 96, .14); }
@media (max-width: 900px) { .entity-directory-header { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .entity-directory-header { grid-template-columns: 1fr; padding: 16px; } .entity-directory-controls { grid-template-columns: minmax(0, 1fr) 118px auto; } }

/* Critical directory layout is kept here as well as the main stylesheet. It
   makes cards resilient to a browser retaining an earlier immutable CSS
   asset, especially Safari's aggressive mobile cache. */
.entity-page-shell { width: min(100% - 32px, 1900px); margin: 0 auto; padding: 24px 0 40px; }
.entity-page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.entity-main { min-width: 0; container-type: inline-size; }
.entity-directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
/* Logos should share one artboard rather than letting their source dimensions
   determine card height. Contain preserves the logo; a neutral matte removes
   the visual jump between transparent and white source images. */
.studio-directory-card { display: grid; grid-template-rows: 180px minmax(0, 1fr); min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 11px; color: var(--text-primary); background: var(--bg-card); }
.studio-directory-card:hover { color: var(--text-primary); border-color: var(--accent); }
.studio-directory-card > img,
.studio-directory-card > .studio-code-art { grid-area: 1 / 1; box-sizing: border-box; display: block; width: 100%; height: 180px; min-width: 0; min-height: 0; }
.studio-directory-card > img { padding: 12px; object-fit: contain; background: #f4f4f6; }
.studio-directory-card > span { display: grid; grid-area: 2 / 1; align-content: start; gap: 5px; min-width: 0; padding: 12px; }
.studio-directory-card strong { overflow: hidden; font-size: .92rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-directory-card small,
.studio-directory-card em { color: var(--text-secondary); font-size: .75rem; font-style: normal; }
.studio-directory-card em { color: #ffc857; }
.studio-directory-card > .studio-code-art { height: 180px; }

@media (max-width: 899px) {
  .entity-page-layout { grid-template-columns: 1fr; }
  .entity-rail { display: none; }
  .entity-directory-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 640px) {
  .entity-page-shell { width: min(100% - 24px, 1900px); padding-top: 15px; }
  .entity-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .studio-directory-card { grid-template-rows: 132px minmax(0, 1fr); min-height: 196px; }
  .studio-directory-card > img,
  .studio-directory-card > .studio-code-art { height: 132px; }
  .studio-directory-card > img { padding: 8px; }
  .studio-directory-card > span { gap: 4px; padding: 9px; }
  .studio-directory-card strong { font-size: .82rem; }
  .studio-directory-card small,
  .studio-directory-card em { font-size: .68rem; }
}

/* A shared fractional five-star meter for catalog, profile, rail, and member
   ratings. The clipped gold fill preserves decimals such as 4.3/5 instead
   of rounding them up to a whole star. */
.rating-stars { --rating: 0; display: inline-block; vertical-align: -.06em; color: #60667c; font-family: Arial, sans-serif; font-size: 1.02em; font-style: normal; font-weight: 700; letter-spacing: .055em; line-height: 1; white-space: nowrap; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .rating-stars { background: linear-gradient(90deg, #ffc857 calc(var(--rating) * 20%), #596078 calc(var(--rating) * 20%)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.rating-stars.is-empty { opacity: .82; }
.entity-average-rating { display: inline-flex; align-items: center; gap: 6px; }
.entity-average-rating small { color: var(--text-secondary); font-size: .78rem; }
.entity-rail-card .rating-stars { font-size: .86rem; }
.card-rating .rating-stars { font-size: .92rem; }
.account-video em .rating-stars { font-size: 1rem; }

/* Advanced search: the primary lookup and performer chooser lead the form;
   grouped ranges and a full-width genre browser keep the dense filters easy
   to scan without affecting the adjacent advertising rail. */
.advanced-search-hero { margin-bottom: 14px; }
.advanced-search-card { padding: 20px; }
.advanced-search-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: start; }
.advanced-primary-field input, .advanced-performer-field input { min-height: 46px; }
.advanced-genres-field, .advanced-performer-field { grid-column: span 3; min-height: 246px; box-sizing: border-box; align-self: stretch; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255, 255, 255, .018); }
.advanced-genres-field .advanced-genre-buttons { max-height: 132px; }
.advanced-search-range-field { padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-primary); }
.advanced-performer-combobox { position: relative; }
.advanced-performer-suggestions { position: absolute; z-index: 80; top: calc(100% + 6px); right: 0; left: 0; display: grid; max-height: 300px; overflow-y: auto; border: 1px solid var(--accent); border-radius: 9px; background: #15172b; box-shadow: 0 18px 38px rgba(0, 0, 0, .42); }
.advanced-performer-suggestions[hidden] { display: none; }
.advanced-performer-suggestions button { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 12px; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--text-primary); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.advanced-performer-suggestions button:last-child { border-bottom: 0; }
.advanced-performer-suggestions button:hover, .advanced-performer-suggestions button[aria-selected="true"] { background: rgba(233, 69, 96, .18); }
.advanced-performer-suggestions strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.advanced-performer-suggestions small { flex: 0 0 auto; color: var(--text-muted); font-size: .71rem; }
.advanced-performer-popular { display: grid; gap: 7px; margin-top: 11px; }
.advanced-performer-popular > span { color: var(--text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.advanced-performer-popular > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 6px; block-size: 132px; overflow-y: scroll; overscroll-behavior: contain; padding-right: 2px; scrollbar-color: var(--border) transparent; }
.advanced-performer-popular button { min-width: 0; min-height: 32px; overflow: hidden; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); background: var(--bg-primary); font: inherit; font-size: .76rem; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.advanced-performer-popular button:hover, .advanced-performer-popular button.active { border-color: var(--accent); color: var(--text-primary); background: rgba(233, 69, 96, .14); }
@media (max-width: 900px) { .advanced-search-card { padding: 17px; } .advanced-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .advanced-genres-field, .advanced-performer-field { grid-column: 1 / -1; min-height: auto; } }
@media (max-width: 600px) { .advanced-genres-field, .advanced-search-range-field { padding: 11px; } .advanced-performer-suggestions { max-height: 240px; } }

/* Entity pages have a fixed 300px rail.  Size both the hero and the card
   grid from their shared main column, rather than viewport breakpoints that
   can create a fourth 340px card inside too little space and overlap the
   rail.  A wider shell provides room for four cards on true wide desktop. */
@media (min-width: 900px) {
  .entity-page-shell { width: min(100% - 32px, 1900px); }
  .entity-page-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .entity-main,
  .entity-profile-hero,
  .entity-release-section,
  .entity-profile-comments { width: 100%; min-width: 0; box-sizing: border-box; }
  .entity-main .video-grid:not(.new-week-grid) { grid-template-columns: 1fr; justify-content: stretch; }
}
@container (min-width: 702px) and (max-width: 1063px) {
  .entity-main .video-grid:not(.new-week-grid) { grid-template-columns: repeat(2, minmax(340px, 1fr)); }
}
@container (min-width: 1064px) and (max-width: 1425px) {
  .entity-main .video-grid:not(.new-week-grid) { grid-template-columns: repeat(3, minmax(340px, 1fr)); }
}
@container (min-width: 1426px) {
  .entity-main .video-grid:not(.new-week-grid) { grid-template-columns: repeat(4, minmax(340px, 1fr)); }
}

/* The header magnet filter intentionally matches Home's catalog control. */
.header-magnet-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.header-magnet-toggle:hover { border-color: rgba(233, 69, 96, .65); color: var(--text-primary); }
.header-magnet-toggle.active { border-color: var(--accent); background: rgba(233, 69, 96, .16); color: #fff; }

/* A studio without curated official art is represented by its catalog code,
   rather than an unrelated release cover. */
.studio-code-art { display: grid; width: 100%; height: 180px; place-items: center; padding: 14px; overflow: hidden; color: #fff; background: linear-gradient(135deg, #10234a, #481739 58%, #151126); font-size: clamp(1.25rem, 3vw, 2.25rem); font-weight: 900; letter-spacing: .08em; line-height: 1; text-align: center; text-shadow: 0 2px 12px rgba(0, 0, 0, .65); overflow-wrap: anywhere; }
.studio-directory-card:hover .studio-code-art { background: linear-gradient(135deg, #15305f, #6b1d50 58%, #22173d); }
.entity-rail-card .studio-code-art-rail { width: 72px; height: 62px; padding: 5px; font-size: .68rem; letter-spacing: .04em; }

@media (max-width: 640px) { .studio-code-art { height: 145px; font-size: 1.1rem; } }

.entity-member-controls { display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.entity-member-controls small { color: var(--text-muted); font-size: .75rem; }
@media (max-width: 640px) { .entity-member-controls { grid-column: 1 / -1; } }

@media (min-width: 900px) and (max-width: 1599px) {
  .main-nav { display: flex; gap: 2px; }
  .main-nav .nav-secondary { display: none; }
  .main-nav a { padding: 7px 8px; font-size: .78rem; }
  .header-search-cluster { flex-basis: 340px; max-width: 440px; }
  .mobile-menu-toggle { display: flex; }
}
@media (min-width: 1600px) { .main-nav { display: flex; } .mobile-menu-toggle { display: none; } }

/* At the compact desktop/tablet breakpoint Home, Actresses, Studios, and the
   magnet filter already live in the header. Keep the overflow menu focused on
   secondary destinations; retain these entries only for the true mobile menu. */
@media (min-width: 721px) {
  .mobile-menu .mobile-menu-primary,
  .mobile-menu .mobile-menu-magnet { display: none !important; }
}

@media (max-width: 720px) {
  .header-inner { height: auto; min-height: var(--header-height); flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; }
  .header-search-cluster { order: 3; flex: 1 0 100%; min-width: 0; max-width: none; }
  .header-search { min-width: 0; min-height: 40px; }
  .header-search input { height: 38px; font-size: .9rem; }
  .header-advanced-search { min-height: 40px; padding: 0 8px; font-size: .7rem; }
}

/* Public discussion at the bottom of actress and studio profiles. */
.entity-profile-comments { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.entity-profile-comments form { display: grid; gap: 9px; margin-top: 16px; }
.entity-profile-comments textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-primary); background: var(--bg-primary); font: inherit; resize: vertical; }
.entity-profile-comments textarea:focus { border-color: var(--accent); outline: 2px solid rgba(233, 69, 96, .15); }
.entity-profile-comments form > div { display: flex; align-items: center; gap: 10px; }
.entity-comment { padding: 12px 0; border-bottom: 1px solid var(--border); }
.entity-comment header { display: flex; justify-content: space-between; gap: 12px; color: var(--text-primary); font-size: .84rem; }
.entity-comment time, .entity-comment-muted { color: var(--text-muted); font-size: .76rem; }
.entity-comment p { margin: 7px 0 0; color: var(--text-secondary); white-space: pre-wrap; line-height: 1.5; }

.entity-directory-series { color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .08em; line-height: 1.1; text-transform: uppercase; }

.entity-profile-copy { min-width: 0; }
.entity-profile-copy .entity-profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.entity-profile-copy .entity-profile-stats > span { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, .025); }
.entity-profile-copy .entity-profile-stats small { color: var(--text-muted); font-size: .66rem; font-weight: 800; letter-spacing: .045em; line-height: 1.1; text-transform: uppercase; }
.entity-profile-copy .entity-profile-stats strong { overflow: hidden; color: var(--text-primary); font-size: .84rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.entity-profile-copy .entity-profile-public-stats { grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); }
.entity-profile-copy .entity-profile-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entity-profile-copy .entity-average-rating { display: grid; align-content: start; gap: 4px; }
.entity-profile-copy .entity-average-rating .rating-stars { font-size: 1.03rem; line-height: 1; }
.entity-profile-source { margin: -4px 0 10px; color: var(--text-muted); font-size: .72rem; }
@media (max-width: 520px) { .entity-profile-copy .entity-profile-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }.entity-profile-copy .entity-profile-stats > span { padding: 7px; }.entity-profile-copy .entity-profile-stats strong { font-size: .76rem; } }
/* Actress profiles use the available main-column width, not viewport width:
   phone = stack, mid-size = cover/info plus gallery below, wide = three equal panels. */
.entity-profile-hero.has-profile-gallery { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.entity-profile-hero.has-profile-gallery > img,
.entity-profile-hero.has-profile-gallery .entity-profile-copy,
.entity-profile-hero.has-profile-gallery .entity-profile-gallery { min-width: 0; grid-column: auto; grid-row: auto; }
.entity-profile-hero.has-profile-gallery > img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; align-self: start; }
.entity-profile-hero.has-profile-gallery .entity-profile-gallery { align-self: start; }
.entity-profile-gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 6px; }
.entity-profile-gallery-heading > span { color: var(--text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.entity-profile-gallery-open { color: var(--accent); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.entity-profile-gallery-stage { position: relative; display: grid; min-height: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); }
.entity-profile-gallery-preview { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.entity-profile-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .18s ease; }
.entity-profile-gallery-preview:hover img { transform: scale(1.04); }
.entity-profile-gallery-arrow { position: absolute; z-index: 2; top: 50%; width: 28px; height: 38px; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; color: #fff; background: rgba(5,7,18,.7); font-size: 1.55rem; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.entity-profile-gallery-arrow:hover { border-color: var(--accent); background: rgba(233,69,96,.34); }.entity-profile-gallery-arrow.prev { left: 6px; }.entity-profile-gallery-arrow.next { right: 6px; }
.entity-profile-gallery-counter { position: absolute; right: 7px; bottom: 6px; z-index: 2; padding: 2px 5px; border-radius: 4px; color: #fff; background: rgba(5,7,18,.72); font-size: .66rem; font-weight: 800; }

/* Dedicated actress gallery: one full image at a time, with thumbnail jump points. */
.actress-gallery-page { width: min(100% - 32px, 1400px); margin: 0 auto; padding: 26px 0 54px; }
.actress-gallery-shell .actress-gallery-page { width: 100%; margin: 0; }
.actress-gallery-header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.actress-gallery-header h1 { margin: 2px 0 0; color: var(--text-primary); font-size: clamp(1.6rem, 3vw, 2.35rem); }
.actress-gallery-header p { margin: 0; color: var(--text-secondary); }
.actress-gallery-stage { position: relative; display: grid; min-height: min(68vh, 780px); place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #070810; }
.actress-gallery-stage img { display: block; width: 100%; height: min(68vh, 780px); object-fit: contain; }
.actress-gallery-arrow { position: absolute; z-index: 2; top: 50%; width: 46px; height: 54px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; color: #fff; background: rgba(5,7,18,.72); font-size: 2rem; line-height: 1; cursor: pointer; transform: translateY(-50%); }
.actress-gallery-arrow:hover { border-color: var(--accent); background: rgba(233,69,96,.3); }
.actress-gallery-arrow.prev { left: 14px; }.actress-gallery-arrow.next { right: 14px; }
.actress-gallery-counter { position: absolute; right: 14px; bottom: 12px; z-index: 2; padding: 4px 8px; border-radius: 5px; color: #fff; background: rgba(5,7,18,.74); font-size: .78rem; font-weight: 800; }
.actress-gallery-thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; margin-top: 14px; }
.actress-gallery-thumbnails button { aspect-ratio: 1 / 1; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--bg-card); cursor: pointer; }
.actress-gallery-thumbnails button.active { border-color: var(--accent); }.actress-gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.actress-gallery-empty { padding: 48px 20px; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-secondary); text-align: center; }
@media (max-width: 640px) { .actress-gallery-page { width: min(100% - 24px, 1400px); padding-top: 18px; }.actress-gallery-header { display: block; }.actress-gallery-header p { margin-top: 5px; }.actress-gallery-stage, .actress-gallery-stage img { min-height: 0; height: 58vh; }.actress-gallery-arrow { width: 38px; height: 46px; }.actress-gallery-arrow.prev { left: 8px; }.actress-gallery-arrow.next { right: 8px; }.actress-gallery-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } }
@media (max-width: 899px) { .actress-gallery-shell .entity-rail { display: grid; width: min(300px, 100%); margin: 0 auto; } }
.entity-profile-lightbox { position: fixed; inset: 0; z-index: 600; display: none; place-items: center; padding: 30px; background: rgba(0, 0, 0, .9); }
.entity-profile-lightbox.active { display: grid; }
.entity-profile-lightbox img { max-width: min(1100px, 88vw); max-height: 84vh; object-fit: contain; }
.entity-profile-lightbox button { position: fixed; top: 14px; right: 20px; border: 0; color: #fff; background: transparent; font-size: 2.4rem; cursor: pointer; }
.entity-profile-lightbox span { margin-top: 8px; color: #fff; font-size: .82rem; font-weight: 700; }

@container (min-width: 620px) {
  .entity-profile-hero.has-profile-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-profile-hero.has-profile-gallery .entity-profile-gallery { grid-column: 1 / -1; width: 100%; }
}
@container (min-width: 980px) {
  .entity-profile-hero.has-profile-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entity-profile-hero.has-profile-gallery .entity-profile-gallery { grid-column: 3; width: auto; }
}
@media (max-width: 640px) {
  .entity-profile-hero.has-profile-gallery { grid-template-columns: minmax(0, 1fr); }
  .entity-profile-hero.has-profile-gallery .entity-profile-gallery { grid-column: auto; width: 100%; }
}

/* Actress pages use their first gallery image as the cover, avoiding a second,
   duplicate cover column. The two panels only stack when the content column is narrow. */
.entity-profile-hero.actress-profile-hero.has-profile-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Keep the visual focal point first: the gallery/cover panel sits on the
   left, with the profile details alongside it on the right. */
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy { grid-column: 2; grid-row: 1; }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery { grid-column: 1; grid-row: 1; width: auto; }

/* Treat the actress gallery and the biography as one composed profile card
   instead of two unrelated blocks. The art remains square; the details panel
   stretches to its height and uses a quiet, well-defined surface. */
.entity-profile-hero.actress-profile-hero.has-profile-gallery {
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery {
  position: relative;
  display: block;
  min-height: 0;
  background: #0b0d18;
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery-heading {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  margin: 0;
  padding: 12px 14px 30px;
  background: linear-gradient(180deg, rgba(5, 7, 18, .82), transparent);
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery-heading > span { color: rgba(255,255,255,.82); }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery-open { color: #fff; }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery-stage {
  border: 0;
  border-radius: 0;
  background: #0b0d18;
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy {
  box-sizing: border-box;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 25px 27px;
  border-left: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(28, 46, 82, .34), rgba(18, 21, 39, .92) 55%);
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 7px;
  padding: 4px 7px;
  border: 1px solid rgba(233, 69, 96, .36);
  border-radius: 999px;
  color: var(--accent);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy h1 { margin: 0 0 9px; font-size: clamp(1.55rem, 2.15vw, 2.25rem); line-height: 1.08; }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-biography { margin: 0 0 14px; color: var(--text-secondary); line-height: 1.48; }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-biography p { margin: 0; white-space: pre-line; }
.entity-biography-toggle { margin-top: 8px; padding: 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; }
.entity-biography-toggle:hover { color: #ff7a91; text-decoration: underline; }
.entity-profile-aliases { margin: -3px 0 11px; color: var(--text-muted); font-size: .78rem; line-height: 1.35; }
.actress-profile-section { margin-top: 22px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); }
.actress-profile-section .section-heading { margin-bottom: 13px; }
.actress-profile-section .section-heading span { color: var(--text-muted); font-size: .76rem; }
.actress-timeline ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.actress-timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding-left: 12px; border-left: 2px solid rgba(233, 69, 96, .55); }
.actress-timeline time { color: var(--accent); font-size: .78rem; font-weight: 800; }
.actress-timeline strong { color: var(--text-primary); font-size: .9rem; }
.actress-timeline p { margin: 4px 0 0; color: var(--text-secondary); font-size: .84rem; line-height: 1.45; }
.actress-featured-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; overflow-x: auto; }
.actress-featured-grid .video-card { min-width: 185px; }
.actress-featured-card { position: relative; min-width: 0; padding-top: 22px; }
.actress-featured-card > span { position: absolute; z-index: 4; top: 0; left: 8px; padding: 4px 7px; border: 1px solid rgba(233, 69, 96, .42); border-radius: 6px; color: var(--accent); background: var(--bg-primary); font-size: .66rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.actress-catalog-insights > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.actress-catalog-insights h3 { margin: 0 0 8px; color: var(--text-muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.actress-catalog-insights p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.actress-catalog-insights span, .actress-catalog-insights a { padding: 4px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-secondary); background: var(--bg-primary); font-size: .73rem; line-height: 1.2; }
.actress-catalog-insights a:hover { border-color: var(--accent); color: var(--accent); }
.actress-catalog-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.actress-catalog-controls label { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .73rem; font-weight: 800; }
.actress-catalog-controls select { max-width: 180px; min-height: 32px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-primary); background: var(--bg-primary); font: inherit; }
@media (max-width: 720px) { .actress-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.actress-catalog-insights > div { grid-template-columns: 1fr; }.actress-timeline li { grid-template-columns: 72px minmax(0, 1fr); gap: 9px; } }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-source { margin: -3px 0 12px; }
.entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-member-controls { margin-top: auto; padding-top: 4px; }
@container (max-width: 620px) {
  .entity-profile-hero.actress-profile-hero.has-profile-gallery { grid-template-columns: minmax(0, 1fr); }
  .entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy,
  .entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-gallery { grid-column: auto; grid-row: auto; width: 100%; }
  .entity-profile-hero.actress-profile-hero.has-profile-gallery .entity-profile-copy { border-top: 1px solid var(--border); border-left: 0; padding: 20px; }
}
@media (max-width: 640px) {
  .entity-profile-hero.actress-profile-hero.has-profile-gallery { grid-template-columns: minmax(0, 1fr); }
}

/* Directory cards use one stable visual language: a fixed artboard, a calm
   details panel, and a subtle image-only hover. Actress cards no longer turn
   into a different layout or recolor their name on hover. */
.actress-directory-card { position: relative; display: grid; grid-template-rows: 172px minmax(0, 1fr); height: 294px; min-height: 0; overflow: hidden; color: var(--text-primary); background: var(--bg-card); }
.actress-directory-card > img { position: static; grid-area: 1 / 1; width: 100%; height: 172px; object-fit: cover; transform: none; transition: transform .32s ease; }
.actress-directory-card > span { position: static; z-index: 2; display: grid; grid-area: 2 / 1; align-content: start; gap: 4px; padding: 10px 12px 12px; background: var(--bg-card); transition: background .24s ease, padding .24s ease; }
.actress-directory-card strong, .actress-directory-card:hover strong { color: var(--text-primary); text-shadow: none; }
.actress-directory-card:hover { z-index: auto; border-color: var(--accent); box-shadow: none; transform: none; }
.actress-directory-card.actress-card-preview-active > img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; transform: scale(1.045); }
.actress-directory-card.actress-card-preview-active > span { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; display: block; padding: 34px 12px 12px; background: linear-gradient(transparent, rgba(5, 7, 18, .93) 62%); }
.actress-directory-card.actress-card-preview-active strong { display: block; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
.actress-directory-card.actress-card-preview-active small, .actress-directory-card.actress-card-preview-active em { display: none; }
.actress-directory-card .entity-card-rating { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: .78rem; font-style: normal; line-height: 1; }
.actress-directory-card .entity-card-rating .rating-stars { color: #ffc857; font-size: 1rem; }
.actress-directory-card .entity-card-rating b { color: var(--text-secondary); font-size: .72rem; font-weight: 700; }
.studio-directory-card { position: relative; }
.studio-card-code { position: absolute; z-index: 2; top: 10px; left: 10px; max-width: calc(100% - 20px); padding: 4px 7px; overflow: hidden; border-radius: 5px; color: #fff; background: rgba(0, 0, 0, .66); font-size: .68rem; font-weight: 900; letter-spacing: .08em; line-height: 1; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.9); white-space: nowrap; }
.card-new-badge { position: absolute; z-index: 3; top: 42px; left: 10px; padding: 3px 7px; border-radius: 4px; color: #062314; background: #42d987; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); font-size: .64rem; font-weight: 900; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.entity-card-new { color: #42d987; font-size: .72rem; font-weight: 800; line-height: 1.15; }
.entity-rail-card .entity-card-new { font-size: .66rem; }
@media (max-width: 640px) { .actress-directory-card { grid-template-rows: 138px minmax(0, 1fr); height: 250px; } .actress-directory-card > img { height: 138px; } .actress-directory-card > span { gap: 3px; padding: 8px 9px 10px; } }
