/*
 * HEXODRAMA PRISM / original design system
 * Release: 2026-10-19
 * Loaded AFTER the historical stylesheets. These tokens intentionally take
 * precedence over dark-only declarations from older releases.
 * Light mode is the default; JS restores explicit user preference.
 */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --hx-bg: #f5f7fb;
  --hx-panel: #fff;
  --hx-panel-2: #f0f3f8;
  --hx-panel-3: #e7ecf4;
  --hx-text: #151b2a;
  --hx-text-soft: #344158;
  --hx-text-muted: #5c687d;
  --hx-outline: #dce3ee;
  --hx-outline-strong: #c3cedd;
  --hx-brand: #d32859;
  --hx-brand-soft: #fff0f5;
  --hx-brand-contrast: #fff;
  --hx-link: #aa1744;
  --hx-positive: #126a4b;
  --hx-positive-bg: #e4f8ee;
  --hx-warning: #946100;
  --hx-warning-bg: #fff2d7;
  --hx-negative: #a4283d;
  --hx-negative-bg: #fff0f1;
  --hx-topbar: rgb(255 255 255 / .93);
  --hx-shadow: 0 5px 18px rgb(21 29 51 / .045), 0 24px 55px rgb(21 29 51 / .042);
  --hx-focus: #ab1345;
  --hx-radius: 19px;
  --hx-easing: cubic-bezier(.2,.75,.2,1);
  --nv-bg: var(--hx-bg);
  --nv-surface: var(--hx-panel);
  --nv-surface-2: var(--hx-panel-2);
  --nv-ink: var(--hx-text);
  --nv-ink-soft: var(--hx-text-soft);
  --nv-muted: var(--hx-text-muted);
  --nv-border: var(--hx-outline);
  --nv-hover: var(--hx-panel-2);
  --nv-brand: var(--hx-brand);
  --nv-brand-ink: var(--hx-brand-contrast);
  --nv-header: var(--hx-topbar);
  --nv-focus: var(--hx-focus);
  --hd-bg: var(--hx-bg);
  --hd-surface: var(--hx-panel);
  --hd-surface-raised: var(--hx-panel-2);
  --hd-text: var(--hx-text);
  --hd-muted: var(--hx-text-muted);
  --hd-line: var(--hx-outline);
  --hd-accent: var(--hx-brand);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --hx-bg: #0c111c;
  --hx-panel: #151d2b;
  --hx-panel-2: #1e293a;
  --hx-panel-3: #29374b;
  --hx-text: #f6f7fb;
  --hx-text-soft: #d4dceb;
  --hx-text-muted: #acb9cf;
  --hx-outline: #303e52;
  --hx-outline-strong: #45566d;
  --hx-brand: #ff7195;
  --hx-brand-soft: #402234;
  --hx-brand-contrast: #190d16;
  --hx-link: #ff92ad;
  --hx-positive: #90e9c0;
  --hx-positive-bg: #173b31;
  --hx-warning: #ffd391;
  --hx-warning-bg: #453522;
  --hx-negative: #ffb2bd;
  --hx-negative-bg: #4c2733;
  --hx-topbar: rgb(16 23 35 / .96);
  --hx-shadow: 0 12px 30px rgb(0 0 0 / .20), 0 25px 60px rgb(0 0 0 / .13);
  --hx-focus: #ffb3c7;
  --nv-bg: var(--hx-bg);
  --nv-surface: var(--hx-panel);
  --nv-surface-2: var(--hx-panel-2);
  --nv-ink: var(--hx-text);
  --nv-ink-soft: var(--hx-text-soft);
  --nv-muted: var(--hx-text-muted);
  --nv-border: var(--hx-outline);
  --nv-hover: var(--hx-panel-3);
  --nv-brand: var(--hx-brand);
  --nv-brand-ink: var(--hx-brand-contrast);
  --nv-header: var(--hx-topbar);
  --nv-focus: var(--hx-focus);
  --hd-bg: var(--hx-bg);
  --hd-surface: var(--hx-panel);
  --hd-surface-raised: var(--hx-panel-2);
  --hd-text: var(--hx-text);
  --hd-muted: var(--hx-text-muted);
  --hd-line: var(--hx-outline);
  --hd-accent: var(--hx-brand);
}
/* Apply compatible tokens to all historical components. */
body.hd-app,body.hd-auth-page,body.hx-admin,body.hx-auth-staff {
  --bg: var(--hx-bg);
  --surface: var(--hx-panel);
  --surface2: var(--hx-panel-2);
  --stroke: var(--hx-outline);
  --text: var(--hx-text);
  --muted: var(--hx-text-muted);
  --gold: var(--hx-brand);
  --gold2: var(--hx-brand);
  --hx-line: var(--hx-outline);
  background: var(--hx-bg) !important;
  color: var(--hx-text) !important;
  font-family: Inter, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 450;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html { background:var(--hx-bg); scroll-behavior:smooth; }
*,*::before,*::after { box-sizing:border-box; }
.hx-icon { stroke:currentColor; color:inherit; display:inline-block; vertical-align:middle; flex:none; }
body :is(h1,h2,h3,h4,h5,h6) { letter-spacing:-.025em; }
body.hd-app :is(h1,h2,h3,h4,h5,h6),
body.hd-auth-page :is(h1,h2,h3,h4,h5,h6),
body.hx-admin :is(h1,h2,h3,h4,h5,h6) { color:var(--hx-text); }
body :is(button,input,textarea,select) { font:inherit; }
body :is(button,a,input,textarea,select,summary):focus-visible {
  outline:3px solid var(--hx-focus); outline-offset:3px;
}
body :is(button,select) { cursor:pointer; }
body .muted,body :is(.hd-card-meta,.nova-card-meta) { color:var(--hx-text-muted); }
body :is(.alert.good,.alert.bad) { border:1px solid transparent; border-radius:12px; }
body .alert.good { color:var(--hx-positive); background:var(--hx-positive-bg); border-color:color-mix(in srgb,var(--hx-positive) 18%,transparent); }
body .alert.bad { color:var(--hx-negative); background:var(--hx-negative-bg); border-color:color-mix(in srgb,var(--hx-negative) 20%,transparent); }
body .skip-link { position:absolute;left:12px;top:-100px;z-index:200;color:var(--hx-text);background:var(--hx-panel);padding:10px; }
body .skip-link:focus { top:8px; }
body .sr-only { position:absolute!important;clip:rect(0,0,0,0)!important;width:1px!important;height:1px!important;overflow:hidden!important;white-space:nowrap!important; }

/* === Consistent theme control: circular icon surface, theme-aware SVG. === */
.nova-theme-toggle {
  display:inline-grid;place-items:center;position:relative;
  width:44px;height:44px;min-width:44px;padding:0;
  background:var(--hx-panel-2);border:1px solid var(--hx-outline);
  color:var(--hx-text);border-radius:14px;box-shadow:none;
  transition:background .16s var(--hx-easing),color .16s,transform .16s;
}
.nova-theme-toggle:hover { color:var(--hx-brand);background:var(--hx-panel-3);transform:translateY(-1px); }
.nova-theme-toggle [data-theme-icon="sun"] { display:none; }
:root[data-theme="dark"] .nova-theme-toggle [data-theme-icon="sun"] { display:inline-flex; }
:root[data-theme="dark"] .nova-theme-toggle [data-theme-icon="moon"] { display:none; }
.nova-theme-toggle .hx-icon { width:21px;height:21px;stroke-width:1.9; }

/* === Public shell === */
body.hd-app .hd-topbar { height:70px;top:0;z-index:80;background:var(--hx-topbar);border-bottom:1px solid var(--hx-outline);box-shadow:0 2px 16px rgb(20 31 56 / .025); }
body.hd-app .hd-topbar-inner { max-width:1400px;padding-inline:clamp(16px,3vw,34px);gap:clamp(14px,2.5vw,35px); }
body.hd-app .hd-brand { color:var(--hx-text);font-size:1.12rem;letter-spacing:-.055em; }
body.hd-app .hd-mark,body.hd-auth-page .hd-mark { background:var(--hx-brand);color:var(--hx-brand-contrast);box-shadow:none;border-radius:12px; }
body.hd-app .hd-desktop-links { gap:clamp(15px,2vw,28px); }
body.hd-app .hd-desktop-links a { color:var(--hx-text-muted);font-weight:670; }
body.hd-app .hd-desktop-links a:hover,body.hd-app .hd-desktop-links a[aria-current="page"] { color:var(--hx-text); }
body.hd-app .hd-desktop-links a[aria-current="page"] { position:relative; }
body.hd-app .hd-desktop-links a[aria-current="page"]::after { content:"";position:absolute;left:2px;right:2px;bottom:-20px;height:3px;border-radius:4px;background:var(--hx-brand); }
body.hd-app .hd-top-search { background:var(--hx-panel-2);border:1px solid var(--hx-outline);color:var(--hx-text-muted);min-height:44px;border-radius:14px; }
body.hd-app .hd-top-search input { background:transparent;color:var(--hx-text); }
body.hd-app .hd-top-search input::placeholder { color:var(--hx-text-muted); }
body.hd-app .hd-top-search button { color:var(--hx-text-soft); }
body.hd-app .hd-top-actions { gap:9px; }
body.hd-app .hd-profile-link,body.hd-app .hd-icon-link { border:1px solid var(--hx-outline);border-radius:14px;background:var(--hx-panel-2);color:var(--hx-text);width:44px;height:44px; }
body.hd-app .hd-profile-link:hover,body.hd-app .hd-icon-link:hover { color:var(--hx-brand); }
body.hd-app .hd-main { background:var(--hx-bg);min-height:65vh; }
body.hd-app .hd-footer { border-top:1px solid var(--hx-outline);background:var(--hx-panel);color:var(--hx-text-muted); }
body.hd-app .hd-footer a { color:var(--hx-text-soft); }
body.hd-app .hd-footer a:hover { color:var(--hx-brand); }
body.hd-app .hd-footer strong { color:var(--hx-text); }
body.hd-app .hd-bottom-nav { z-index:90;border-top:1px solid var(--hx-outline);background:var(--hx-topbar);box-shadow:0 -7px 30px rgb(0 0 0 / .035); }
body.hd-app .hd-bottom-nav a { color:var(--hx-text-muted);transition:color .16s; }
body.hd-app .hd-bottom-nav a[aria-current="page"] { color:var(--hx-brand);font-weight:780; }
body.hd-app .hd-bottom-nav a[aria-current="page"] .hx-icon { stroke-width:2.25; }

/* === Mobile streaming homepage === */
.nova-page { max-width:1400px;margin:0 auto;padding:clamp(18px,2.7vw,40px) clamp(16px,3vw,34px) 95px; }
.nova-intro { align-items:center;gap:14px;margin:0 0 22px; }
.nova-kicker,.nova-section-overline { color:var(--hx-link);font-weight:820;letter-spacing:.115em;font-size:.7rem; }
.nova-intro h1,.nova-catalog-heading h1 { font-size:clamp(2rem,4.9vw,3.6rem);font-weight:870;line-height:1.09;letter-spacing:-.055em;color:var(--hx-text); }
.nova-intro p,.nova-catalog-heading p { color:var(--hx-text-muted); }
.nova-premium-cta { color:var(--hx-brand-contrast);background:var(--hx-brand);border-radius:13px;padding:12px 18px;font-weight:790;box-shadow:0 9px 20px color-mix(in srgb,var(--hx-brand) 13%,transparent); }
.nova-premium-cta:hover { color:var(--hx-brand-contrast); }
.nova-search { background:var(--hx-panel);border:1px solid var(--hx-outline);color:var(--hx-text-muted);border-radius:17px;box-shadow:var(--hx-shadow); }
.nova-search:focus-within { border-color:var(--hx-brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--hx-brand) 13%,transparent); }
.nova-search input { color:var(--hx-text);min-height:42px; }
.nova-search input::placeholder { color:var(--hx-text-muted); }
.nova-search button { color:var(--hx-brand-contrast);background:var(--hx-brand);border-radius:12px; }
.nova-search button:hover { filter:brightness(.96); }
.nova-filter-caption { color:var(--hx-text-soft); }
.nova-filter-caption span { color:var(--hx-text-muted); }
.nova-filter-rail { gap:9px; }
.nova-chip { color:var(--hx-text-soft);border:1px solid var(--hx-outline);background:var(--hx-panel);padding:10px 15px;min-height:44px;font-weight:720;box-shadow:0 2px 8px rgb(11 25 49 / .016); }
.nova-chip.is-active { color:var(--hx-brand-contrast);background:var(--hx-brand);border-color:var(--hx-brand); }
.nova-chip:not(.is-active):hover { color:var(--hx-text);border-color:var(--hx-outline-strong);background:var(--hx-panel-2); }
.nova-chip .hx-icon { stroke-width:2; }
.nova-spotlight { isolation:isolate;background:#101828;box-shadow:0 20px 45px rgb(13 21 40 / .14);border-radius:24px; }
.nova-spotlight-copy h2,.nova-spotlight h2 { color:#fff!important; }
.nova-spotlight-label { color:#ffb5c8; }
.nova-spotlight-provider { color:#c9d2e1; }
.nova-spotlight p { color:#dce3ef; }
.nova-primary-btn { background:#e23564;color:#fff;border-radius:12px; }
.nova-primary-btn:hover { color:#fff; }
.nova-secondary-btn { background:#ffffff1c;color:#fff;border:1px solid #ffffff50;border-radius:12px; }
.nova-secondary-btn:hover { color:#fff; }
.nova-section-title h2 { color:var(--hx-text);font-size:clamp(1.23rem,3vw,1.82rem); }
.nova-section-title p { color:var(--hx-text-muted); }
.nova-all-link { color:var(--hx-link); }
.nova-all-link:hover { color:var(--hx-brand); }
.nova-poster-grid { gap:clamp(16px,2vw,23px) clamp(10px,1.6vw,20px); }
.nova-poster { background:var(--hx-panel-2);border:1px solid var(--hx-outline);border-radius:13px;box-shadow:0 8px 22px rgb(15 20 35 / .055); }
.nova-card { color:var(--hx-text);min-width:0; }
.nova-card-title { color:var(--hx-text);font-weight:760;font-size:clamp(.79rem,1.1vw,.92rem);line-height:1.34; }
.nova-card:hover .nova-card-title { color:var(--hx-link); }
.nova-card-meta { color:var(--hx-text-muted);font-size:.75rem; }
.nova-card-tag { background:#1c2335dd;color:#fff;border-radius:6px;font-weight:780; }
.nova-card-play { background:#fff;color:#152137;opacity:1;transform:none;box-shadow:0 5px 15px rgb(0 0 0 / .12); }
.nova-empty { color:var(--hx-text-muted);background:var(--hx-panel);border-color:var(--hx-outline); }
.nova-empty strong { color:var(--hx-text); }
.nova-results-title { color:var(--hx-text); }
.nova-results-title span { color:var(--hx-text-muted); }
.nova-pagination :is(a,span) { color:var(--hx-text); }

/* === Reusable surfaces/forms (for public pages and admin). === */
body.hd-app :is(.hd-status-empty,.hd-episode-item,.hd-fav-action,.hd-outline-btn),
body.hd-auth-page .hd-auth-card,
body.hx-admin :is(.admin-card,.stat,.fleet-provider),
body.hd-app :is(.hx-redeem-card,.hx-membership) {
  border:1px solid var(--hx-outline);
  background:var(--hx-panel);
  color:var(--hx-text);
  box-shadow:var(--hx-shadow);
}
body.hd-app :is(.hd-episode-number,.hd-detail-genres a) { background:var(--hx-panel-2);color:var(--hx-text);border-color:var(--hx-outline); }
body.hd-app :is(.hd-detail-copy h1,.hd-episode-heading h2,.hd-player-heading h1,.inner-heading h1),
body.hd-auth-page :is(.hd-auth-heading h1,.hx-form-header h1) { color:var(--hx-text); }
body.hd-app :is(.hd-detail-provider,.hd-detail-metadata,.hd-detail-back,.hd-episode-heading>span,.hd-player-heading p,.hd-player-info,.hd-status-empty p),
body.hd-auth-page :is(.hd-auth-heading p,.hx-form-header p) { color:var(--hx-text-muted); }
body.hd-app :is(.hd-detail-synopsis,.hd-episode-description small) { color:var(--hx-text-soft); }
body.hd-app .hd-episode-play { background:var(--hx-brand);color:var(--hx-brand-contrast); }
body.hd-app .hd-episode-locked { opacity:1; }
body.hd-app .hd-episode-lock { color:var(--hx-text-muted); }
body.hd-app :is(.hd-fav-action,.hd-outline-btn) { color:var(--hx-text); }
body.hd-app .hd-detail-back:is(:hover,:focus-visible) { color:var(--hx-link); }
body.hd-app .hd-video-shell { background:#03060d;border-color:var(--hx-outline); }
body.hd-app .hx-membership { background:linear-gradient(132deg,var(--hx-panel),var(--hx-panel-2)); }
body.hd-app .hx-membership :is(h2,p),body.hd-app .hx-redeem-card :is(h2,p) { color:var(--hx-text); }
body.hd-app .hx-membership p,body.hd-app .hx-redeem-card p,body.hd-app .hx-redeem-card small { color:var(--hx-text-muted); }
body.hd-app .hx-membership-expiry { color:var(--hx-positive)!important; }
body.hd-app :is(.pricing-grid,.price-card) { color:var(--hx-text); }
body.hd-app .price-card { background:var(--hx-panel);border:1px solid var(--hx-outline);box-shadow:var(--hx-shadow); }
body.hd-app .price-card :is(h2,h3,small,strong,li) { color:var(--hx-text); }
body.hd-app .price-card .price { color:var(--hx-link); }
body.hd-app .price-card.selected { border-color:var(--hx-brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--hx-brand) 24%,transparent); }
body .responsive-table { width:100%;max-width:100%;overflow-x:auto;scrollbar-width:thin; }
body table { border-collapse:collapse;min-width:530px;max-width:100%; }
body th { text-align:left;color:var(--hx-text-soft);background:var(--hx-panel-2);font-weight:780;letter-spacing:.01em;border-color:var(--hx-outline); }
body td { color:var(--hx-text-soft);border-color:var(--hx-outline); }
body tr:hover td { background:color-mix(in srgb,var(--hx-panel-2) 40%,transparent); }
body td a { color:var(--hx-link);font-weight:700; }
body .btn { display:inline-flex;justify-content:center;align-items:center;gap:9px;min-height:44px;border-radius:12px;font-weight:750;padding:10px 15px; }
body .btn.primary { background:var(--hx-brand);color:var(--hx-brand-contrast);border:1px solid transparent; }
body .btn.primary:hover { background:color-mix(in srgb,var(--hx-brand) 90%,#000);color:var(--hx-brand-contrast); }
body .btn.subtle { background:var(--hx-panel-2);color:var(--hx-text);border:1px solid var(--hx-outline); }
body .btn.subtle:hover { background:var(--hx-panel-3);color:var(--hx-text); }
body :is(.admin-card,.hx-redeem-card,.auth-box,.hd-auth-card,.hx-login-form,.hd-auth-form) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
body :is(.fleet-provider,.nova-page,.hx-admin-panel) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
  background:var(--hx-panel-2);border:1px solid var(--hx-outline-strong);
  color:var(--hx-text);border-radius:11px;min-height:44px;
  padding:10px 13px;max-width:100%;
}
body :is(.admin-card,.hx-redeem-card,.auth-box,.hd-auth-card,.hx-login-form,.hd-auth-form,.fleet-provider) input::placeholder { color:var(--hx-text-muted);opacity:1; }
body :is(input,select,textarea) { accent-color:var(--hx-brand); }
body :is(input,select,textarea):disabled { opacity:.68;cursor:not-allowed; }
body label { color:var(--hx-text-soft); }
body .checkrow { color:var(--hx-text-soft); }
body input[type="checkbox"],body input[type="radio"] { background:var(--hx-panel);accent-color:var(--hx-brand); }
body code { color:var(--hx-link);background:var(--hx-panel-2);padding:2px 5px;border-radius:5px;overflow-wrap:anywhere; }

/* === Member login === */
body.hd-auth-page .hd-auth-layout { background:var(--hx-bg); }
body.hd-auth-page .hd-auth-feature { color:#fff;background:linear-gradient(140deg,#111a29,#25152c 75%,#41172a); }
body.hd-auth-page .hd-auth-feature :is(h1,p,.hd-auth-brand) { color:#fff; }
body.hd-auth-page .hd-auth-content { background:var(--hx-bg); }
body.hd-auth-page .hd-auth-card { border-radius:23px; }
body.hd-auth-page :is(.hd-auth-form label,.hx-login-form label,.hd-auth-switch) { color:var(--hx-text-soft); }
body.hd-auth-page :is(.hd-auth-card a,.hd-auth-back) { color:var(--hx-link); }
body.hd-auth-page .hd-auth-mobile-logo a { color:var(--hx-text); }
body.hd-auth-page .hd-auth-card h1 { color:var(--hx-text); }
body.hd-auth-page .hd-auth-card p { color:var(--hx-text-muted); }

/* === Admin workspace (distinct from public site) === */
body.hx-admin { font-size:14px;line-height:1.55; }
body.hx-admin .hx-admin-shell { background:var(--hx-bg); }
body.hx-admin .admin-sidebar { z-index:100;background:var(--hx-panel);border-right:1px solid var(--hx-outline);color:var(--hx-text); }
body.hx-admin .hx-admin-identity { color:var(--hx-text); }
body.hx-admin .hx-admin-identity strong { color:var(--hx-text)!important;letter-spacing:-.02em; }
body.hx-admin .hx-admin-identity small { color:var(--hx-text-muted); }
body.hx-admin .hx-admin-brand-icon { background:var(--hx-brand);color:var(--hx-brand-contrast);box-shadow:none; }
body.hx-admin .hx-side-group { color:var(--hx-text-muted);letter-spacing:.13em; }
body.hx-admin .admin-sidebar > a:not(.hx-admin-identity),body.hx-admin .admin-sidebar button { color:var(--hx-text-soft);border-radius:11px;display:flex;align-items:center;gap:12px;min-height:43px; }
body.hx-admin .admin-sidebar > a:not(.hx-admin-identity) .hx-icon { color:var(--hx-text-muted);stroke-width:1.9; }
body.hx-admin .admin-sidebar > a.active { background:var(--hx-brand-soft);color:var(--hx-link);font-weight:790;box-shadow:inset 3px 0 var(--hx-brand); }
body.hx-admin .admin-sidebar > a.active .hx-icon { color:var(--hx-brand);stroke-width:2.15; }
body.hx-admin .admin-sidebar > a:not(.hx-admin-identity):hover,body.hx-admin .admin-sidebar button:hover { color:var(--hx-text);background:var(--hx-panel-2); }
body.hx-admin .hx-side-footer { border-color:var(--hx-outline); }
body.hx-admin .hx-admin-panel { min-width:0;background:var(--hx-bg); }
body.hx-admin .hx-admin-topbar { background:var(--hx-topbar);border-color:var(--hx-outline); }
body.hx-admin .hx-admin-top-left { color:var(--hx-text-muted); }
body.hx-admin .hx-admin-top-left span:last-child { color:var(--hx-text-soft);font-weight:800; }
body.hx-admin .hx-admin-top-sep { color:var(--hx-outline-strong); }
body.hx-admin .hx-admin-person { color:var(--hx-text-soft);font-weight:700; }
body.hx-admin .hx-admin-avatar { background:var(--hx-panel-2);border:1px solid var(--hx-outline);color:var(--hx-text); }
body.hx-admin .admin-main { background:var(--hx-bg);color:var(--hx-text); }
body.hx-admin .hx-admin-heading h1 { color:var(--hx-text); }
body.hx-admin .hx-admin-heading p { color:var(--hx-text-muted); }
body.hx-admin .hx-admin-overline,.hx-kicker { color:var(--hx-link); }
body.hx-admin .admin-card { background:var(--hx-panel);border:1px solid var(--hx-outline);box-shadow:var(--hx-shadow);color:var(--hx-text);border-radius:17px;padding:clamp(16px,2.1vw,25px); }
body.hx-admin .admin-card :is(h1,h2,h3,h4) { color:var(--hx-text); }
body.hx-admin .admin-card p,body.hx-admin .admin-card small { color:var(--hx-text-muted); }
body.hx-admin .admin-card :is(a,.hx-panel-heading) { color:var(--hx-link); }
body.hx-admin .stat { background:var(--hx-panel);border:1px solid var(--hx-outline);box-shadow:var(--hx-shadow);color:var(--hx-text);border-radius:16px; }
body.hx-admin .stat strong { color:var(--hx-text);font-variant-numeric:tabular-nums; }
body.hx-admin .stat small,body.hx-admin .hx-metric-foot,body.hx-admin .hx-shortcut-list small { color:var(--hx-text-muted); }
body.hx-admin .hx-metric-icon,body.hx-admin .hx-shortcut-list>a>span { color:var(--hx-link);background:var(--hx-brand-soft);border:1px solid color-mix(in srgb,var(--hx-brand) 16%,transparent); }
body.hx-admin .hx-shortcut-list>a { border-color:var(--hx-outline);color:var(--hx-text); }
body.hx-admin .hx-shortcut-list>a:hover { background:var(--hx-panel-2); }
body.hx-admin .hx-shortcut-list strong { color:var(--hx-text); }
body.hx-admin .hx-panel-heading h2 { color:var(--hx-text); }
body.hx-admin .hx-admin-mobile-links { background:var(--hx-panel);border-bottom:1px solid var(--hx-outline); }
body.hx-admin .hx-admin-mobile-links a { color:var(--hx-text-soft); }
body.hx-admin .hx-admin-mobile-links a:hover { color:var(--hx-link); }
body.hx-admin :is(th,td) { border-color:var(--hx-outline); }
body.hx-admin th { color:var(--hx-text-soft);background:var(--hx-panel-2); }
body.hx-admin td { color:var(--hx-text-soft); }
body.hx-admin td a { color:var(--hx-link); }
body.hx-admin .fleet-provider { background:var(--hx-panel);color:var(--hx-text);border-color:var(--hx-outline); }
body.hx-admin .fleet-provider .muted { color:var(--hx-text-muted); }
body.hx-admin .fleet-metrics .admin-card strong { color:var(--hx-text); }
body.hx-admin .fleet-status { border:1px solid var(--hx-outline);background:var(--hx-panel-2);color:var(--hx-text-soft); }
body.hx-admin .fleet-error { color:var(--hx-negative)!important; }
body.hx-admin :is(.hx-note-line,.hx-operational-note>p) { color:var(--hx-text-soft); }
body.hx-admin .responsive-table { border-radius:12px;border:1px solid var(--hx-outline); }
body.hx-admin .responsive-table table { width:100%; }
body.hx-admin .nova-admin-actions { display:flex;align-items:center;gap:12px; }

/* === Staff-only login === */
body.hx-auth-staff { min-height:100dvh;background:var(--hx-bg);color:var(--hx-text); }
body.hx-auth-staff .hx-staff-login-shell { max-width:560px; }
body.hx-auth-staff .hx-staff-login-panel { background:var(--hx-panel);border:1px solid var(--hx-outline);color:var(--hx-text);box-shadow:var(--hx-shadow);border-radius:21px; }
body.hx-auth-staff .hx-staff-login-brand,body.hx-auth-staff .hx-form-header h1 { color:var(--hx-text); }
body.hx-auth-staff .hx-staff-login-brand small,body.hx-auth-staff .hx-form-header p { color:var(--hx-text-muted); }
body.hx-auth-staff .hx-login-form label { color:var(--hx-text-soft); }
body.hx-auth-staff .hx-login-form input { width:100%;min-height:46px;background:var(--hx-panel-2);color:var(--hx-text);border:1px solid var(--hx-outline-strong);border-radius:11px;padding:12px 14px; }
body.hx-auth-staff .hx-login-form input::placeholder { color:var(--hx-text-muted); }
body.hx-auth-staff .hx-staff-login-foot { color:var(--hx-text-muted); }
body.hx-auth-staff .hx-staff-login-foot a { color:var(--hx-link); }
body.hx-auth-staff .hx-staff-login-status { color:var(--hx-link); }
body.hx-auth-staff .hx-staff-login-line { background:var(--hx-outline); }
body.hx-auth-staff .hx-auth-theme { position:fixed;right:max(20px,env(safe-area-inset-right));top:max(15px,env(safe-area-inset-top));z-index:20; }

/* === Responsive admin drawer / mobile-first storefront === */
.hx-admin-menu-trigger { display:none;width:44px;height:44px;align-items:center;justify-content:center;border:1px solid var(--hx-outline);color:var(--hx-text);background:var(--hx-panel-2);border-radius:12px; }
.hx-admin-sidebar-backdrop { display:none; }
@media (max-width:1100px) {
  body.hx-admin .hx-admin-shell { grid-template-columns:230px minmax(0,1fr); }
  body.hx-admin .admin-sidebar { width:auto; }
  body.hx-admin .hx-admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:800px) {
  body.hd-app .hd-topbar { height:64px; }
  body.hd-app .hd-topbar-inner { gap:9px;padding-inline:14px; }
  body.hd-app .hd-top-actions { margin-left:auto;gap:7px; }
  body.hd-app .hd-top-search { display:none; }
  body.hd-app .hd-icon-link { display:grid; }
  body.hd-app .hd-profile-link { display:none; }
  body.hd-app .hd-desktop-links { display:none; }
  body.hd-app .hd-bottom-nav { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding-bottom:max(8px,env(safe-area-inset-bottom)); }
  body.hd-app .hd-bottom-nav a { min-height:49px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.68rem; }
  body.hd-app .hd-bottom-nav .hx-icon { width:22px;height:22px; }
  body.hd-app .hd-main { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
  body.hx-admin .hx-admin-shell { display:block; }
  body.hx-admin .hx-admin-panel { width:100%;min-width:0; }
  body.hx-admin .hx-admin-topbar { padding:10px 14px;gap:8px;min-height:62px; }
  .hx-admin-menu-trigger { display:inline-flex;flex:none; }
  body.hx-admin .admin-sidebar {
    display:flex!important;flex-direction:column!important;position:fixed!important;
    top:0!important;bottom:0!important;left:0!important;z-index:122!important;
    width:min(85vw,310px)!important;max-width:310px;overflow-y:auto!important;
    border-radius:0!important;transform:translateX(-105%);
    background:var(--hx-panel)!important;padding:18px 13px calc(20px + env(safe-area-inset-bottom));
    transition:transform .24s var(--hx-easing);box-shadow:20px 0 45px rgb(0 0 0 / .14);
    overscroll-behavior:contain;
  }
  body.hx-admin[data-sidebar-open="true"] .admin-sidebar { transform:translateX(0); }
  .hx-admin-sidebar-backdrop { display:block;position:fixed;inset:0;z-index:121;background:rgb(8 12 23 / .58);opacity:0;pointer-events:none;border:0;transition:opacity .2s; }
  body.hx-admin[data-sidebar-open="true"] .hx-admin-sidebar-backdrop { opacity:1;pointer-events:auto; }
  body.hx-admin .hx-admin-mobile-links { display:flex;white-space:nowrap;overflow-x:auto;gap:8px;padding:10px 14px; }
  body.hx-admin .hx-admin-mobile-links a { min-height:38px;padding:8px 12px;border:1px solid var(--hx-outline);background:var(--hx-panel-2);border-radius:10px;display:inline-flex;align-items:center;gap:6px;flex:none; }
  body.hx-admin .admin-main { width:100%;max-width:none;padding:clamp(14px,3vw,25px); }
  body.hx-admin .hx-admin-heading h1 { font-size:clamp(1.5rem,5vw,2.1rem); }
  body.hx-admin .admin-card { padding:16px; }
  body.hx-admin .fleet-actions { grid-template-columns:1fr!important; }
  body.hx-admin .fleet-provider-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  .nova-page { padding:20px 14px calc(107px + env(safe-area-inset-bottom)); }
  .nova-intro h1 { font-size:clamp(2rem,8.5vw,2.65rem); }
  .nova-intro p { font-size:.89rem; }
  .nova-kicker,.nova-section-overline { font-size:.64rem; }
  .nova-filter-rail { margin-inline:-14px;padding-inline:14px; }
  .nova-filter-caption span { display:none; }
  .nova-filter { margin-top:18px;margin-bottom:18px; }
  .nova-spotlight { min-height:0;display:flex;flex-direction:column;border-radius:19px; }
  .nova-spotlight-art { width:100%;height:205px;min-height:0; }
  .nova-spotlight-art img { width:100%;height:100%;object-fit:cover;object-position:center 30%; }
  .nova-spotlight-art::after { background:linear-gradient(0deg,#101828 2%,transparent 85%); }
  .nova-spotlight-copy { padding:0 18px 20px;min-width:0; }
  .nova-spotlight h2 { font-size:clamp(1.4rem,6vw,2rem); }
  .nova-spotlight p { display:-webkit-box;-webkit-line-clamp:2; }
  .nova-spotlight-actions { width:100%; }
  .nova-primary-btn,.nova-secondary-btn { min-height:43px;padding:9px 13px; }
  .nova-section-title { align-items:flex-start; }
  .nova-section-title p { font-size:.76rem; }
  .nova-all-link { white-space:nowrap;flex:none; }
  .nova-poster-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px; }
  .nova-poster-rail .nova-card { flex-basis:clamp(124px,37vw,159px); }
  .nova-card-play { width:30px;height:30px;right:7px;bottom:7px; }
  .nova-card-play .hx-icon { width:17px;height:17px; }
  body.hx-admin .hx-admin-metrics { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  body.hx-admin .stat { padding:14px; }
  body.hx-admin .stat strong { font-size:clamp(1.2rem,5vw,1.6rem);line-height:1.45; }
  body.hx-admin .hx-admin-bottom-grid { grid-template-columns:1fr; }
  body.hx-admin .admin-cards,body.hx-admin .fleet-provider-grid { grid-template-columns:1fr; }
  body.hx-admin .hx-admin-person > span:last-child { display:none; }
  body.hd-app .hx-account-overview { grid-template-columns:1fr; }
  body.hd-app .pricing-grid { grid-template-columns:1fr; }
}
@media (max-width:375px) {
  body.hd-app .hd-wordmark { font-size:1rem; }
  body.hd-app .hd-topbar-inner { padding:0 10px; }
  .nova-theme-toggle,body.hd-app .hd-icon-link { width:40px;min-width:40px;height:40px; }
  .nova-card-title { font-size:.77rem; }
  .nova-poster-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.hx-admin .hx-admin-top-left .hx-admin-top-sep,body.hx-admin .hx-admin-top-left span:last-child { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition-duration:.001ms!important;animation-duration:.001ms!important; }
}

/* Last-mile contrast coverage for legacy content / smaller devices. */
body.hd-app { font-size:16px; }
body.hd-app .nova-brand-dot { color:var(--hx-brand); }
body.hd-app :is(.breadcrumbs,.hd-breadcrumbs) { color:var(--hx-text-muted); }
body.hd-app :is(.breadcrumbs,.hd-breadcrumbs) a { color:var(--hx-link); }
body.hd-app :is(.section-bar h2,.hx-transactions h2,.account-panel h2) { color:var(--hx-text); }
body.hd-app .account-panel { background:var(--hx-panel);border:1px solid var(--hx-outline);color:var(--hx-text); }
body.hd-app .account-panel p { color:var(--hx-text-muted); }
body.hd-app .empty-state { color:var(--hx-text-muted);background:var(--hx-panel);border-color:var(--hx-outline); }
body.hd-app :is(.hd-browse-search,.large-search input) { color:var(--hx-text);background:var(--hx-panel-2);border-color:var(--hx-outline-strong); }
body.hd-app :is(.hd-browse-search,.large-search input)::placeholder { color:var(--hx-text-muted); }
body.hx-admin :is(.admin-card p,.admin-card li,.admin-card label,.fleet-intro p) { color:var(--hx-text-soft); }
body.hx-admin :is(.fleet-intro h2,.fleet-provider-top strong,.fleet-counter strong) { color:var(--hx-text); }
body.hx-admin .fleet-status-active { color:var(--hx-positive);background:var(--hx-positive-bg); }
body.hx-admin .fleet-status-maintenance { color:var(--hx-warning);background:var(--hx-warning-bg); }
body.hx-admin .fleet-status-error { color:var(--hx-negative);background:var(--hx-negative-bg); }
body.hx-admin :is(.hx-issued-codes,.hx-operational-note) { background:var(--hx-panel);color:var(--hx-text);border-color:var(--hx-outline); }
body.hx-admin :is(.hx-issued-codes small,.hx-operational-note p) { color:var(--hx-text-muted); }
body.hd-app .hd-auth-back { color:var(--hx-link); }
:root[data-theme="dark"] body.hd-app .nova-section-overline,
:root[data-theme="dark"] body.hd-app .nova-kicker { color:#ffa1bb; }
@media (max-width:620px) {
  .nova-premium-cta { display:inline-flex!important;align-self:flex-start;min-height:41px;padding:9px 14px;font-size:.77rem;margin-top:3px; }
  .nova-intro { gap:9px; }
  .nova-spotlight h2 { color:#fff!important; }
  .nova-spotlight-copy { gap:2px; }
  .nova-spotlight-provider { font-size:.74rem; }
}
@media (max-width:800px) {
  body.hx-admin .hx-admin-top-left { flex:1;min-width:0;font-size:.67rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  body.hx-admin .hx-admin-top-left span { white-space:nowrap; }
}
