/* Shared visual layer. Player geometry remains in styles.css. */
:root {
  --bg-page: #101013;
  --bg-sidebar: #151418;
  --bg-header: #151418;
  --surface-1: #19181d;
  --surface-2: #211f25;
  --surface-3: #2a272f;
  --surface-hover: #332f38;
  --surface-soft: var(--surface-2);
  --border-subtle: #302c35;
  --border-default: #453e49;
  --border-strong: #877989;
  --text-primary: #f7f5f7;
  --text-secondary: #cdc5ce;
  --text-muted: #b0a6b4;
  --accent: #b02c47;
  --accent-hover: #c13753;
  --accent-muted: #35212b;
  --accent-text: #ff9ab2;
  --accent-line: #96556b;
  --focus-ring: #ffb4c8;
  --input-border: #877989;
  --success: #78d8a7;
  --warning: #f0c779;
  --danger: #ff9ca9;
  --radius-lg: 8px;
  --radius-xl: 8px;
  --shadow-sm: none;
  --shadow-md: 0 12px 32px #00000026;
  --topbar-height: 132px;
}

:root[data-theme="light"] {
  --bg-page: #f6f5f7;
  --bg-sidebar: #ffffff;
  --bg-header: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f0edf2;
  --surface-3: #e8e3eb;
  --surface-hover: #e3dde7;
  --border-subtle: #ded7e1;
  --border-default: #c6bbc9;
  --border-strong: #786a7d;
  --text-primary: #231d27;
  --text-secondary: #514656;
  --text-muted: #65596b;
  --accent: #a42b46;
  --accent-hover: #8b203a;
  --accent-muted: #f9e6ed;
  --accent-text: #9f2544;
  --accent-line: #a95c74;
  --focus-ring: #9f2544;
  --input-border: #87738e;
  --success: #176b48;
  --warning: #815900;
  --danger: #a7233e;
  --shadow-menu: 0 12px 36px #34223e24;
}

html { scroll-padding-top: calc(var(--topbar-height) + 24px); }
body, :root[data-theme="light"] body {
  background: var(--bg-page);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}
h1, h2, h3 { color: var(--text-primary); font-weight: 700; line-height: 1.25; }
h1, .pageHeader h1 { font-size: 32px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { line-height: 1.65; }
a:hover { color: var(--accent-text); }
strong { font-weight: 700; }
button, a, input, select, textarea { touch-action: manipulation; }
:root :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
input, select, textarea { font-size: 16px; border-color: var(--input-border); }
input:not([type="checkbox"]):not([type="range"]):not([type="hidden"]), select { min-height: 46px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 20px; height: 20px; flex: 0 0 auto; }
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
label { min-width: 0; gap: 8px; color: var(--text-secondary); font-size: 14px; font-weight: 600; line-height: 1.5; }
label > input, label > select, label > textarea { font-weight: 400; }
button:disabled { cursor: not-allowed; opacity: .65; }
button, a, summary { -webkit-tap-highlight-color: #ff9ab229; }
.skipLink {
  position: fixed; top: 12px; left: 16px; z-index: 200;
  padding: 12px 18px; color: #fff; background: #a42b46;
  border-radius: 6px; transform: translateY(-160%);
}
.skipLink:focus { transform: translateY(0); color: #fff; }

/* Brand, global search and account first; destinations on their own row. */
.topbar {
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 540px) minmax(180px, 1fr);
  gap: 8px 28px;
  padding: max(12px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left));
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: none;
}
.brand { grid-column: 1; grid-row: 1; font-size: 21px; font-weight: 700; min-height: 48px; }
.brandLogo { width: 66px; height: 44px; filter: none; }
.brand span { display: inline; }
.search { grid-column: 2; grid-row: 1; order: 0; }
.search input { height: 46px; background: var(--surface-2); box-shadow: none; }
.userBox { grid-column: 3; grid-row: 1; justify-self: end; }
.languageSelect { height: 44px; width: 65px; font-size: 14px; font-weight: 600; }
.profileButton { min-height: 46px; padding: 4px 10px 4px 6px; border-color: transparent; background: transparent; }
.profileButton #currentUser { max-width: 150px; font-size: 14px; font-weight: 600; }
.smallAvatarShell { width: 34px; height: 34px; flex: 0 0 34px; }
.mainNav {
  grid-column: 1 / -1; grid-row: 2; order: 0;
  width: 100%; gap: 10px; padding: 0;
  background: none; border: 0; border-radius: 0;
  scrollbar-width: thin; overscroll-behavior-inline: contain;
  scroll-padding-inline: 6px;
}
.navButton {
  position: relative; flex: 0 0 auto; min-height: 50px;
  padding: 8px 14px 12px; border-radius: 0;
  font-size: 15px; font-weight: 600;
}
.navButton.active { color: var(--text-primary); background: none; box-shadow: inset 0 -3px var(--accent-text); }
.navButton:hover { background: var(--surface-2); color: var(--text-primary); }
.navButton:focus-visible { outline-offset: -4px; }
.profileMenu { top: calc(100% + 10px); width: 240px; padding: 8px; border-color: var(--border-default); background: var(--surface-1); border-radius: 8px; }
.profileMenu button, .profileMenu a { min-height: 46px; padding: 10px 12px; color: var(--text-primary); font-size: 15px; font-weight: 500; }

/* Page rhythm and unframed sections. */
main { width: min(100%, 1600px); padding: 36px 40px 64px; }
main:focus { outline: none; }
.viewPanel { animation: panelIn 180ms ease-out; }
.pageHeader { gap: 6px; max-width: 960px; margin-bottom: 28px; }
.pageHeader h1 { margin: 0; }
.pageHeader p { margin-bottom: 0; max-width: 72ch; font-size: 16px; }
.pageHeader .eyebrow { color: var(--accent-text); font-size: 13px; font-weight: 700; }
.eyebrow { margin-bottom: 4px; color: var(--accent-text); font-size: 13px; line-height: 1.5; font-weight: 700; text-transform: none; }
.sectionHead { align-items: center; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.sectionHead span, #resultCount, #artistCount, #recommendationCount, #forumCount, #usersCount, #adminForumCount, #composerCounter { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.adminHint, .composerHint, .formMessage, .authMessage, .viewerStatus { font-size: 14px; line-height: 1.6; }
.controls, .modelToolbar {
  gap: 16px; padding: 20px 0; margin-bottom: 28px;
  background: none; border: 0; border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default);
  border-radius: 0;
}
.controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modelToolbar { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(160px, 260px)); }
.advancedFilters { padding-top: 12px; }
.advancedFilters summary { min-height: 44px; padding: 10px 0; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.advancedFilterGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.catalogFilters { padding: 8px 0; margin-bottom: 28px; border-block: 1px solid var(--border-default); }
.catalogFilters > summary { min-height: 44px; padding: 10px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.catalogFilters .controls { margin: 0; border: 0; padding: 12px 0; }
.catalogPage > .artistRail, .catalogPage > .smartRailPanel { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-default); }
.searchInterpretation { margin: -8px 0 24px; padding: 14px 16px; font-size: 14px; }
.primaryButton, .secondaryButton, .dangerButton, .loadMore, .tinyButton, .quickFilterButton, .authTab {
  min-height: 44px; padding: 10px 16px; border-radius: 6px;
  font-size: 15px; font-weight: 600; line-height: 1.4;
}
.primaryButton { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: none; }
.primaryButton:hover { color: #fff; background: var(--accent-hover); border-color: var(--accent-hover); }
.secondaryButton, .loadMore { color: var(--text-primary); background: var(--surface-2); border-color: var(--input-border); }
.tinyButton { padding: 8px 12px; font-size: 14px; }
.dangerButton { color: var(--danger); background: var(--surface-2); border-color: var(--danger); }
.primaryButton:hover, .secondaryButton:hover, .loadMore:hover, .tinyButton:hover { transform: none; }
.empty { min-height: 130px; display: grid; align-content: center; padding: 24px; font-size: 16px; line-height: 1.6; border: 1px dashed var(--border-default); border-radius: 8px; color: var(--text-secondary); }

/* The library opens directly onto actual content. */
.homePage .hero { display: flex; min-height: 400px; padding: 0; margin: 0 0 32px; position: relative; isolation: isolate; }
.homePage .hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(90deg, #08080bf5 0%, #08080bc7 38%, #08080b22 100%), var(--hero-image); background-position: center, center 35%; background-size: cover; }
.heroContent { width: 100%; padding: 36px; border: 0; border-radius: 0; box-shadow: none; background: none; }
.heroContent::after { display: none; }
.homePage .heroContent { max-width: 760px; }
.homePage #heroTitle { color: #fff; margin: 0 0 12px; font-size: 44px; overflow-wrap: anywhere; }
.homePage .heroContent p:not(.eyebrow) { color: #e2dbe4; }
.homePage .heroStats { gap: 12px; }
.homePage .heroStats span { padding: 0; color: #ece6ee; background: none; border: 0; font-size: 15px; font-weight: 500; }
.homePage .hero .secondaryButton { color: #fff; background: #211e25; border-color: #948696; }
.homePage .artistRail, .homeRecent { margin-top: 36px; }
.homePage .rail { grid-auto-columns: 230px; }
.homePage .discoverRail { grid-auto-columns: 240px; }
.heroActions { margin: 24px 0; }

/* Media is separated from its caption; secondary details remain readable. */
.modelsGrid, .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 22px; }
.modelsGrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rail, .recommendationRail, .discoverRail { gap: 18px; padding: 4px 4px 16px; margin: -4px; scroll-padding-inline: 4px; }
.artistCard, .modelCard, .mediaCard, .recommendationCard { border-radius: 8px; }
.mediaCard, .recommendationCard { background: none; border-color: transparent; overflow: visible; }
.mediaCard:hover, .recommendationCard:hover { background: none; border-color: transparent; transform: none; }
.thumb { border-radius: 8px; }
.cardBody { padding: 14px 0 0; }
.cardTitle, .artistName, .modelCardTitle { font-size: 17px; font-weight: 700; line-height: 1.4; }
.cardTitle { white-space: normal; overflow-wrap: anywhere; }
.artistMeta, .cardMeta, .forumMeta, .modelCardBody p { color: var(--text-muted); font-size: 14px; font-weight: 400; line-height: 1.6; }
.cardMeta { margin-top: 4px; }
.artistCard { min-height: 160px; padding: 20px; }
.artistCard, .modelSpotlight, .modelHero, .discoverHeroPanel { color: #fff; }
.artistCard .artistName, .modelSpotlight h2, .modelHero h1, .discoverHeroPanel h2 { color: #fff; }
.artistCard .artistMeta { color: #e2dbe4; }
.artistCard::before, .modelCard::before { opacity: 1; background-image: linear-gradient(180deg, #0000 10%, #08080bf2 100%), var(--cover); }
.modelCard { min-height: 0; flex-direction: column; align-items: stretch; justify-content: start; background: var(--surface-1); }
.modelCard::before { position: relative; inset: auto; width: 100%; aspect-ratio: 4 / 3; flex: 0 0 auto; background-image: var(--cover); }
.modelCard:hover::before { transform: none; }
.modelCardBody { padding: 18px; }
.modelCardTitle { color: var(--text-primary); }
.modelCard .tagCloud .tagChip:nth-child(n+3) { display: none; }
.modelStat, .badge, .pill { font-size: 12px; font-weight: 600; line-height: 1.5; padding: 4px 8px; text-transform: none; }
.badgeRow .badge { color: #fff; background: #141217e8; border-color: #9d8e9f; }
.modelCard .modelStat { color: var(--text-secondary); background: var(--surface-2); border-color: var(--border-default); }
.tagSuggestion, .tagChip { min-height: 36px; padding: 6px 10px; font-size: 13px; font-weight: 500; border-radius: 6px; border-color: var(--border-default); }
.tagSuggestion span { font-size: 12px; }
.ratingStars { gap: 0; }
.starButton { width: 32px; height: 36px; font-size: 19px; }
.ratingStars span { font-size: 13px; font-weight: 400; }
.favoriteButton { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
.favoriteOverlay { color: #fff; background: #151017e6; border-color: #a794ad; }
.favoriteFilters { flex-wrap: wrap; padding: 4px; }
.favoriteFilters button { min-height: 44px; font-size: 15px; }
.artistCard, .modelHero, .modelSpotlight, .discoverHeroPanel, .homePage .hero {
  --text-primary: #ffffff; --text-secondary: #e2dbe4; --text-muted: #c4b9cb;
  --surface-2: #211f25; --surface-hover: #332f38; --focus-ring: #ffb4c8;
}
:root[data-theme="light"] .starButton.active { color: #876000; }
:root[data-theme="light"] :is(.artistCard, .modelHero, .modelSpotlight, .discoverHeroPanel, .viewer) .starButton.active { color: #f5c451; }
.artistCard .tagChip { color: #eee8f1; background: #211c26ed; border-color: #67566c; }
.modelSpotlight { min-height: 300px; border-radius: 8px; box-shadow: none; }
.modelsPage .modelSpotlight { display: none; }
.modelSpotlightCopy, .discoverHeroCopy { padding: 32px; }
.modelSpotlightCopy h2, .discoverHeroCopy h2 { font-size: 36px; line-height: 1.2; }
.modelSpotlightCopy p, .modelHeroCopy p, .discoverHeroCopy p { color: #eee8f1; overflow-wrap: anywhere; }
.modelHero { min-height: 430px; border: 0; border-radius: 0; box-shadow: none; }
.modelHeroCopy { padding: 36px; }
.modelHeroCopy h1 { font-size: 48px; line-height: 1.15; overflow-wrap: anywhere; }
.spotlightMetrics span { background: #151017dc; color: #e4dce9; border-color: #67566c; padding: 10px 14px; font-size: 14px; }
.modelProfilePanel, .modelRailPanel, .discoverPanel { padding: 24px 0; border: 0; border-top: 1px solid var(--border-default); border-radius: 0; box-shadow: none; background: none; }
.modelProfilePanel { padding-right: 24px; }
.modelOverviewStats article, .modelInsightSummary > div { background: var(--surface-1); border-radius: 8px; }
.modelOverviewStats span, .modelInsightSummary span, .modelBreakdownRow span, .modelServiceList span { font-size: 14px; font-weight: 500; }
.modelAnalyticsGrid, .modelAnalyticsGrid > *, .modelBreakdown { min-width: 0; }
.modelActivityTimeline { min-width: 0; max-width: 100%; overflow-x: auto; }
.modelBreakdownRow > div:first-child { flex-wrap: wrap; }
.discoverHeroPanel { min-height: 380px; border-radius: 0; border: 0; box-shadow: none; }
.discoverGrid { gap: 32px; }
.discoverStackItem, .discoverArtistItem { border-radius: 6px; padding: 14px; }
.discoverStackItem span, .discoverStackItem small, .discoverArtistItem small { font-size: 14px; color: var(--text-muted); }

/* Forum: discussions first, publication alongside them. */
.forumLayout { grid-template-columns: minmax(0, 1fr) minmax(310px, 360px); gap: 32px; }
.forumComposer { grid-column: 2; grid-row: 1; top: calc(var(--topbar-height) + 24px); }
.forumComposer, .adminLayout > form, .maintenanceAdmin, .adsAdmin { display: grid; gap: 20px; }
.forumLayout > div.adminPanel { grid-column: 1; grid-row: 1; }
.adminPanel, .authPanel { background: var(--surface-1); border-radius: 8px; box-shadow: none; padding: 24px; }
.forumLayout > div.adminPanel { padding: 0; background: none; border: 0; }
.forumToolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.forumToolbar input { grid-column: 1 / -1; }
.forumStats { gap: 16px; margin-bottom: 32px; }
.forumStatCard { background: none; border: 0; border-left: 2px solid var(--accent-line); padding: 4px 16px; border-radius: 0; }
.forumStatCard span { font-size: 14px; font-weight: 500; text-transform: none; }
.forumStatCard strong { font-size: 28px; }
.forumStatCard p { font-size: 14px; color: var(--text-muted); }
.forumThread { border-radius: 6px; padding: 20px; gap: 16px; }
.forumThreadTitle { font-size: 18px; line-height: 1.4; font-weight: 700; }
.forumThreadBody { min-width: 0; }
.forumPost { padding: 24px 0; background: none; border: 0; border-bottom: 1px solid var(--border-default); border-radius: 0; }
.forumPostBody { max-width: 78ch; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.threadPanel { margin-top: 32px; }
.replyForm textarea { font-size: 16px; }

/* Administration: predictable landmarks and readable data. */
.adminSectionNav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border-default); }
.adminSectionNav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; color: var(--text-secondary); border: 1px solid var(--border-default); border-radius: 6px; font-size: 14px; }
.adminSectionNav a:hover { background: var(--surface-2); color: var(--text-primary); }
.adminSectionHeading { margin: 40px 0 20px; }
.adminPage > .adminPanel { padding: 28px 0; background: none; border: 0; border-top: 1px solid var(--border-default); border-radius: 0; margin-top: 24px; }
.adminLayout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.adminLayout .adminPanel { margin: 0; align-content: start; }
.kpiGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; }
.kpiCard { padding: 20px 24px; background: var(--surface-1); border-color: var(--border-default); border-radius: 8px; }
.kpiCard span, .profileStats span, .healthCard span, .trustGrid span { color: var(--text-secondary); font-size: 14px; line-height: 1.5; font-weight: 500; text-transform: none; }
.kpiCard strong, .profileStats strong { font-size: 30px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.kpiCard p, .healthCard p { font-size: 14px; color: var(--text-muted); }
.opsHero, .opsActions { background: var(--surface-1); border-radius: 8px; box-shadow: none; border-color: var(--border-default); padding: 24px; }
.opsHero h2 { font-size: 24px; }
.opsHero p { font-size: 15px; }
.opsScore span { font-size: 13px; }
.opsActions .secondaryButton { white-space: normal; }
.adminChartsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.adminChartCard { background: var(--surface-1); border-radius: 8px; border-color: var(--border-default); box-shadow: none; padding: 24px; }
.adminChartCard h3 { font-size: 18px; }
.healthCard, .trustGrid article { background: var(--surface-1); box-shadow: none; border-radius: 8px; }
.healthGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.healthCard.wide { grid-column: span 2; }
.healthCard, .artistToolBox, .interactionCard { border-radius: 8px; box-shadow: none; }
.artistAdminGrid, .interactionDashboard { gap: 24px; }
.userRow, .adminForumRow, .taxonomyRow { gap: 16px; padding: 20px; background: var(--surface-1); border-radius: 6px; border-color: var(--border-default); }
.userRow strong, .interactionHead strong, .logMain strong { font-size: 16px; font-weight: 700; }
.userRow small, .userRow span, .logMain p, .logMeta, .logMedia, .taxonomyRow small, .interactionMetrics span { font-size: 14px; font-weight: 400; line-height: 1.6; }
.rowActions { flex-wrap: wrap; gap: 8px; }
.logCard { border-radius: 6px; padding: 20px; background: var(--surface-1); border-color: var(--border-default); }
.logMedia { overflow-wrap: anywhere; }
.logMeta { color: var(--text-muted); }
.chartLegend, .chartLegend span, .barRow span { font-size: 14px; font-weight: 500; }
.databaseView { max-width: 100%; overflow: auto; font-size: 14px; }
.databaseView pre { font-size: 14px; line-height: 1.7; }
.databaseView table { width: 100%; border-collapse: collapse; }
.databaseView td, .databaseView th { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-default); }
.maintenanceActions { flex-wrap: wrap; gap: 12px; }
.profileForm { max-width: 960px; padding: 0; background: none; border: 0; }
.profileStats { margin: 24px 0; gap: 16px; }
.profileStats div { padding: 20px; border-radius: 8px; border-color: var(--border-default); }
.passwordBox { border-top: 1px solid var(--border-default); padding-top: 24px; }
.changelogCard { padding: 28px 0; border: 0; border-top: 1px solid var(--border-default); border-radius: 0; background: none; box-shadow: none; }
.changelogCard li { margin: 8px 0; color: var(--text-secondary); font-size: 16px; }

/* Authentication uses the same quiet, high-contrast form language. */
.authBody { min-height: 100dvh; }
.authShell { width: min(100%, 1020px); min-height: 100dvh; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: center; gap: 64px; padding: 48px 32px; }
.authHero { min-height: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.authHero h1 { font-size: 38px; line-height: 1.2; }
.authHero p { max-width: 40ch; font-size: 17px; }
.authBrand { margin-bottom: 32px; }
.authBrand .brandLogo { width: 100px; height: 72px; }
.authBadges { gap: 16px; }
.authBadges span { color: var(--text-secondary); background: none; border: 0; padding: 0; font-size: 14px; font-weight: 500; }
.authPanel { width: 100%; padding: 32px; border-color: var(--border-default); }
.authForm { gap: 20px; }
.authForm h2 { font-size: 28px; margin-bottom: 0; }
.authForm p { font-size: 15px; }
.authForm .primaryButton { margin-top: 4px; }
.captchaBox { padding: 12px; border-color: var(--border-default); background: var(--surface-2); }
.captchaBox span { color: var(--text-secondary); font-size: 14px; }
.ageGatePanel { max-width: 560px; padding: 32px; background: var(--surface-1); border-radius: 8px; }
.ageGatePanel h2 { font-size: 26px; line-height: 1.35; }
.ageGatePanel p { color: var(--text-secondary); }
.ageGateActions { margin-bottom: 0; }

/* Player colors stay dark in both themes; do not change fullscreen geometry. */
.viewer { --text-primary: #f7f5f7; --text-secondary: #d7d0dc; --text-muted: #bfb4c6; --surface-1: #19181d; --surface-2: #211f25; --surface-3: #2a272f; --surface-hover: #332f38; --border-default: #514658; --focus-ring: #ffb4c8; color-scheme: dark; }
.viewerInfo { padding: 24px; }
.viewerInfo h3 { font-size: 20px; line-height: 1.4; }
.viewerInfo p, .viewerStatus { font-size: 14px; }
.viewerInfo .eyebrow { color: #ff9ab2; }
.viewer :focus-visible { outline-color: #ffb4c8; }
.closeButton { min-height: 44px; min-width: 44px; }
.videoTime { font-size: 14px; font-variant-numeric: tabular-nums; }
.videoTitleButton span { font-size: 18px; font-weight: 700; }
.videoTitleButton small { font-size: 14px; }
.videoQualityMenu button { font-size: 15px; min-height: 44px; }

@media (min-width: 1700px) {
  .topbar { padding-left: max(40px, calc((100vw - 1520px) / 2)); padding-right: max(40px, calc((100vw - 1520px) / 2)); }
}
@media (min-width: 1200px) {
  .controls { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpiGrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: auto minmax(180px, 1fr) auto; gap: 8px 20px; padding-inline: 24px; }
  .brand { font-size: 19px; }
  .profileButton #currentUser { display: none; }
  main { padding: 28px 24px 48px; }
  .forumLayout { grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
  .forumToolbar { grid-template-columns: 1fr 1fr; }
  .adminLayout { grid-template-columns: 1fr 1fr; }
  .authShell { gap: 32px; }
  .discoverGrid { gap: 24px; }
}
@media (max-width: 800px) {
  :root { --topbar-height: 184px; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; padding: max(10px, env(safe-area-inset-top)) 20px 0; gap: 10px; }
  .brand { grid-column: 1; grid-row: 1; font-size: 20px; }
  .brandLogo { width: 60px; height: 40px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .userBox { grid-column: 2; grid-row: 1; }
  .mainNav { grid-row: 3; gap: 4px; }
  .navButton { font-size: 15px; min-height: 48px; padding-inline: 12px; }
  .profileButton { max-width: none; }
  .controls, .modelToolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modelToolbar > label:first-child { grid-column: 1 / -1; }
  .advancedFilterGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forumLayout, .adminLayout { grid-template-columns: 1fr; }
  .forumComposer { grid-column: 1; grid-row: 2; position: static; }
  .forumLayout > div.adminPanel { grid-column: 1; grid-row: 1; }
  .healthGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .authShell { grid-template-columns: 1fr; width: min(100%, 560px); min-height: 0; gap: 28px; padding: 32px 24px; }
  .authHero h1 { font-size: 30px; margin-bottom: 12px; }
  .authBrand { margin-bottom: 20px; }
  .authBrand .brandLogo { width: 72px; height: 50px; }
  .authBadges { display: none; }
  .modelProfilePanel { padding-right: 0; }
}
@media (max-width: 600px) {
  .topbar { padding-inline: 16px; }
  main { padding: 24px 16px 40px; }
  h1, .pageHeader h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .pageHeader { margin-bottom: 24px; }
  .pageHeader p { font-size: 15px; }
  .pageHeader .eyebrow { font-size: 13px; }
  .brand { gap: 8px; font-size: 19px; }
  .brandLogo { width: 50px; height: 36px; }
  .userBox { gap: 4px; }
  .languageSelect { width: 60px; padding: 0 6px; }
  .profileButton { padding: 4px; gap: 4px; }
  .menuChevron { display: none; }
  .controls, .modelToolbar { gap: 14px 12px; padding: 18px 0; }
  .controls label, .modelToolbar label { font-size: 14px; }
  .grid, .modelsGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .cardTitle, .modelCardTitle { font-size: 16px; }
  .cardMeta { font-size: 13px; }
  .ratingStars span { margin-left: 0; flex-basis: 100%; }
  .starButton { width: 28px; height: 36px; font-size: 18px; }
  .modelCard { min-height: 0; }
  .modelCardBody { padding: 14px; }
  .modelCard .tagCloud { display: none; }
  .modelCardTitle { white-space: normal; overflow-wrap: anywhere; }
  .modelStat { padding: 4px 6px; }
  .modelCardStats { gap: 4px; }
  .heroContent { padding: 24px; }
  .homePage .hero { min-height: 380px; margin-inline: -16px; }
  .homePage #heroTitle { font-size: 34px; }
  .homePage .heroStats { grid-template-columns: 1fr 1fr; }
  .homePage .hero::before { background-image: linear-gradient(90deg, #08080bee, #08080b90), var(--hero-image); }
  .homePage .rail { grid-auto-columns: 190px; }
  .homePage .discoverRail { grid-auto-columns: 200px; }
  .modelSpotlight { min-height: 290px; }
  .modelAnalyticsGrid { grid-template-columns: minmax(0, 1fr); }
  .modelSpotlightCopy, .discoverHeroCopy { padding: 24px; }
  .modelSpotlightCopy h2, .discoverHeroCopy h2 { font-size: 30px; }
  .discoverHeroPanel { min-height: 340px; }
  .modelHero { min-height: 420px; margin-inline: -16px; }
  .modelHeroCopy { padding: 24px; }
  .modelHeroCopy h1 { font-size: 36px; }
  .spotlightMetrics { gap: 8px; }
  .spotlightMetrics span { padding: 8px 10px; font-size: 13px; }
  .adminPanel, .authPanel { padding: 20px; }
  .forumStats { gap: 20px 12px; }
  .forumStatCard { padding: 4px 12px; }
  .forumThread { padding: 16px; gap: 12px; }
  .forumThreadTitle { font-size: 17px; }
  .forumThreadTop { flex-wrap: wrap; }
  .forumPostHeader { flex-wrap: wrap; }
  .adminSectionNav { gap: 8px; }
  .adminSectionNav a { flex: 1 1 40%; justify-content: center; }
  .kpiGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kpiCard { padding: 16px; }
  .kpiCard strong { font-size: 26px; }
  .adminChartsGrid { grid-template-columns: 1fr; gap: 20px; }
  .adminChartCard.wide { grid-column: 1; }
  .opsHero { grid-template-columns: 1fr; }
  .opsScore { width: 112px; justify-self: start; }
  .opsActions { grid-template-columns: 1fr 1fr; gap: 12px; }
  .healthGrid { grid-template-columns: 1fr; }
  .healthCard.wide { grid-column: 1; }
  .userRow, .taxonomyRow, .logCard { padding: 16px; }
  .profileStats { grid-template-columns: 1fr; }
  .profileIdentity { gap: 20px; }
  .authPanel { padding: 24px; }
  .authShell { padding: 24px 16px; }
  .ageGatePanel { padding: 24px; }
  .ageGateActions { flex-direction: column; }
  .viewerInfo { padding: 20px; }
  .videoTime { font-size: 12px; gap: 3px; }
  .videoTime strong, .videoTime span:not([data-video-duration]) { display: inline; }
  .videoTitleButton span { font-size: 16px; }
}
@media (max-width: 360px) {
  .brand { font-size: 17px; gap: 5px; }
  .brandLogo { width: 42px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .modelsGrid { gap: 12px; }
  .modelCardBody { padding: 10px; }
  .modelStat { font-size: 11px; }
  .controls { grid-template-columns: 1fr; }
  .opsActions { grid-template-columns: 1fr; }
  .videoTime span { display: none; }
  .videoTime span:not([data-video-duration]) { display: none; }
  .videoVolumeGroup { width: 38px; }
  .videoControlSpacer { min-width: 0; }
  .qualityPill { min-width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .navButton.active { border-bottom: 3px solid Highlight; }
  .favoriteButton[aria-pressed="true"], .starButton.active { outline: 2px solid Highlight; }
  input, select, textarea, button, .mediaCard { border: 1px solid ButtonText; }
}
