/* Chat Detective shared design system — approved home is the source of truth.
   Page-specific positioning and game/media controls are intentionally untouched. */
html:root body.cdh-dark[data-view] {
  --cds-font:Inter,"Segoe UI",Arial,sans-serif;
  --cds-text:#f5f6ff;
  --cds-muted:#bac5df;
  --cds-soft:#98a8ca;
  --cds-border:rgba(193,206,255,.24);
  --cds-border-soft:rgba(193,206,255,.16);
  --cds-surface:radial-gradient(ellipse 70% 18% at 32% 0%,rgba(235,244,255,.13),transparent 95%),linear-gradient(125deg,rgba(20,38,80,.44),rgba(24,31,69,.48) 57%,rgba(83,34,90,.37));
  --cds-inner:inset 0 1px rgba(245,249,255,.12);
  --cds-radius:18px;
  --cds-radius-sm:11px;
  --cds-gap:16px;
  --cds-heading:clamp(34px,3.6vw,48px);
  font-family:var(--cds-font);
  color:var(--cds-text);
}
/* Typography: one scale for the main section title, one for section cards.
   Homepage headline remains the approved expressive exception. */
html:root body.cdh-dark[data-view]:not([data-view="home"]) #app h1 {
  font-family:var(--cds-font)!important;
  font-weight:800!important;
  letter-spacing:-.035em!important;
  line-height:1.12!important;
}
html:root body.cdh-dark[data-view="submit"] .cd-sm-heading h1,
html:root body.cdh-dark[data-view="testing"] .cds-intro h1,
html:root body.cdh-dark[data-view="about"] .cd-about-hero h1 {
  font-size:var(--cds-heading)!important;
}
html:root body.cdh-dark[data-view="what-next"] .game-heading-area h1,
html:root body.cdh-dark[data-view="detective"] .game-heading-area h1 {
  font-size:clamp(32px,3.1vw,40px)!important;
}
html:root body.cdh-dark[data-view] #app :is(h2,h3) {
  font-family:var(--cds-font);
  letter-spacing:-.025em;
}
html:root body.cdh-dark[data-view] #app :is(.cd-sm-card h2,.cd-about-step h2,.cds-panel h2,.mod-catalog-card h2,.community-sheet h2) {
  font-size:clamp(20px,2vw,24px);
  line-height:1.2;
  font-weight:800;
}
/* All regular UI text and labels share the same font, but Twitch chat/player
   rendering and badges remain free to carry their original styling. */
html:root body.cdh-dark[data-view] #app :is(
  .cd-sm-root,.community-view,.mod-catalog-view,.cds-testing,.cd-about-page,
  .game-heading-area,.game-head,.game-panel
) {
  font-family:var(--cds-font);
}
html:root body.cdh-dark[data-view] #app :is(
  .cd-sm-heading p,.cd-sm-card p,.cds-intro p,.cd-about-hero p,
  .cd-about-step p,.form-help,.game-subtitle
) {color:var(--cds-muted);line-height:1.55}
/* Familiar glass panels, matching the homepage preview in surface and edges. */
html:root body.cdh-dark[data-view] #app :is(
  .cd-sm-card,.cd-about-hero,.cd-about-step,.cds-intro,.cds-panel,
  .mod-catalog-card,.mod-catalog-toolbar,.mod-workspace-card,
  .community-sheet,.game-panel,.game-card
) {
  border-radius:var(--cds-radius);
}
html:root body.cdh-dark[data-view] #app :is(
  .cd-sm-card,.cd-about-step,.cds-panel,.mod-catalog-card,
  .community-sheet,.game-panel
) {
  border-color:var(--cds-border);
}
/* Consistent fields without disturbing sliders, native media controls,
   custom dropdown popovers, Twitch chat or answer grids. */
html:root body.cdh-dark[data-view] #app :is(
  input[type="text"],input[type="search"],input[type="url"],
  input[type="number"],input[type="email"],textarea,select
) {
  box-sizing:border-box;
  font-family:var(--cds-font);
  border-radius:var(--cds-radius-sm);
}
html:root body.cdh-dark[data-view] #app :is(
  input[type="text"],input[type="search"],input[type="url"],
  input[type="number"],input[type="email"],textarea,select
):focus-visible {
  outline:2px solid rgba(255,141,204,.63);
  outline-offset:2px;
}
/* Shared minimum touch area for text actions. Small moderation chips and
   player buttons keep their compact original proportions. */
html:root body.cdh-dark[data-view] #app :is(
  .form-action,.secondary-action,.cd-about-feature a,
  .cds-intro button
) {
  box-sizing:border-box;
  min-height:44px;
  border-radius:var(--cds-radius-sm);
  font-family:var(--cds-font);
  font-weight:700;
}
html:root body.cdh-dark[data-view] #app :is(
  button,a,[role="button"]
):focus-visible {
  outline:2px solid rgba(255,157,215,.75);
  outline-offset:2px;
}
/* Repeated section spacing is consistent without imposing layout on the
   main hero or the playable clip/answer columns. */
html:root body.cdh-dark[data-view] #app :is(
  .cd-sm-heading,.cds-intro,.cd-about-hero
) {scroll-margin-top:88px}
@media(max-width:760px){
  html:root body.cdh-dark[data-view]{--cds-radius:15px;--cds-radius-sm:10px}
  html:root body.cdh-dark[data-view="what-next"] .game-heading-area h1,
  html:root body.cdh-dark[data-view="detective"] .game-heading-area h1{
    font-size:clamp(28px,7vw,36px)!important;
  }
}

/* Site chrome uses the approved homepage material on EVERY SPA route.
   Earlier baseline styles used a stronger blue/purple fill on non-home
   views, which made the same header and footer look like different components. */
html:root body.cdh-dark[data-view] > .page-shell > :is(.site-header,.site-footer) {
  border-color:transparent!important;
  background:
    radial-gradient(ellipse 38% 18% at 28% 0%,rgba(255,255,255,.30),transparent 100%),
    linear-gradient(120deg,rgba(23,43,96,.20),rgba(41,37,87,.20) 53%,rgba(113,52,95,.20))!important;
  -webkit-backdrop-filter:blur(10px) saturate(145%)!important;
  backdrop-filter:blur(10px) saturate(145%)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.23)!important;
}
/* Identical rail, height and corner geometry regardless of route. */
html:root body.cdh-dark[data-view] > .page-shell > .site-header {
  width:100%!important;
  max-width:1400px!important;
  height:68px!important;
  border-radius:13px!important;
}
html:root body.cdh-dark[data-view] > .page-shell > .site-footer {
  width:100%!important;
  max-width:1400px!important;
  min-height:58px!important;
  margin-bottom:0!important;
  border-radius:17px!important;
}
/* Active navigation is an underline throughout the site. Browser hover/focus
   remains interactive but does not add a second framed-pill selected state. */
html:root body.cdh-dark[data-view] .desktop-nav .nav-link[aria-current="page"],
html:root body.cdh-dark[data-view] .desktop-nav .nav-link.active {
  border-color:transparent!important;
  box-shadow:none!important;
}
@media(max-width:760px) {
  html:root body.cdh-dark[data-view] > .page-shell > .site-header {
    height:58px!important;
  }
}

html:root body.cdh-dark[data-view] .site-header .account-controls { gap:10px!important; }

html:root body.cdh-dark[data-view] .site-header #login-button {font-weight:650!important}


/* Shared chrome contract (2026-11): keep the *same* header internals on every
   SPA route. Older theme/home-editorial rules gave home and editor different
   typography, navigation spacing and action-button dimensions. */
html:root body.cdh-dark[data-view] > .page-shell > .site-header {
  display:flex!important;
  align-items:center!important;
  gap:clamp(10px,1.5vw,20px)!important;
  padding-inline:clamp(12px,2vw,28px)!important;
}
html:root body.cdh-dark[data-view] .site-header .brand {
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  gap:12px!important;
  min-width:0;
}
html:root body.cdh-dark[data-view] .site-header .brand .cdh-logo {
  width:43px!important;
  height:43px!important;
  flex:0 0 auto;
}
html:root body.cdh-dark[data-view] .site-header .brand span {
  font-family:Inter,"Segoe UI",system-ui,sans-serif!important;
  font-size:21px!important;
  font-weight:800!important;
  letter-spacing:.035em!important;
  line-height:1.08!important;
  white-space:nowrap;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav {
  display:flex;
  align-items:center;
  height:100%;
  gap:clamp(14px,2.2vw,32px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav .nav-link {
  display:inline-flex;
  align-items:center;
  height:100%!important;
  font-family:Inter,"Segoe UI",system-ui,sans-serif!important;
  font-size:14px!important;
  font-weight:500!important;
  line-height:1.15!important;
  white-space:nowrap;
}
html:root body.cdh-dark[data-view] .site-header .account-controls {
  display:flex;
  align-items:center;
  flex:0 0 auto;
  gap:10px!important;
  margin-left:0!important;
}
html:root body.cdh-dark[data-view] .site-header :is(.cd-settings-trigger,#login-button) {
  box-sizing:border-box;
  min-height:42px!important;
  height:42px!important;
  border-radius:9px!important;
}
html:root body.cdh-dark[data-view] > .page-shell > .site-footer {
  box-sizing:border-box;
  padding:9px 14px!important;
  gap:12px!important;
  margin-top:auto!important;
  font-family:Inter,"Segoe UI",system-ui,sans-serif;
}
html:root body.cdh-dark[data-view] .site-footer .cd-footer-right {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:13px;
  margin-left:auto;
}
@media(max-width:780px){
  html:root body.cdh-dark[data-view] .site-header .desktop-nav {display:none!important}
  html:root body.cdh-dark[data-view] .site-header .mobile-menu-toggle {display:inline-flex!important}
  html:root body.cdh-dark[data-view] > .page-shell > .site-header {
    padding-inline:10px!important;
    gap:8px!important;
  }
  html:root body.cdh-dark[data-view] .site-header :is(.cd-settings-trigger,#login-button) {
    height:36px!important;min-height:36px!important;
  }
}
@media(max-width:520px){
  html:root body.cdh-dark[data-view] .site-header .brand .cdh-logo {
    width:36px!important;height:36px!important;
  }
  html:root body.cdh-dark[data-view] .site-header .brand span {font-size:16px!important}
  html:root body.cdh-dark[data-view] .site-header .account-controls {gap:5px!important}
  html:root body.cdh-dark[data-view] > .page-shell > .site-footer {
    padding:9px 10px!important;
  }
}


/* Route-independent header palette. Legacy theme.css and site-polish-v16.css
   still assign separate home/editor colors, including hover/active states. */
html:root body.cdh-dark[data-view] .site-header {
  --cd-header-text:#f8f8fa;
  --cd-header-muted:#b3b6c3;
  --cd-header-accent:#ed3a5b;
  --cd-header-action:#e7e8f3;
}
html:root body.cdh-dark[data-view] .site-header .brand,
html:root body.cdh-dark[data-view] .site-header .brand span {
  color:var(--cd-header-text)!important;
}
html:root body.cdh-dark[data-view] .site-header .brand .cdh-logo {
  color:var(--cd-header-accent)!important;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav .nav-link {
  color:var(--cd-header-muted)!important;
  text-shadow:none!important;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav .nav-link:is(:hover,:focus-visible,.active,[aria-current="page"]) {
  color:var(--cd-header-text)!important;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav .nav-link::before {
  content:none!important;
}
html:root body.cdh-dark[data-view] .site-header .desktop-nav .nav-link::after {
  background:var(--cd-header-accent)!important;
  box-shadow:none!important;
}
html:root body.cdh-dark[data-view] .site-header :is(.cd-settings-trigger,#login-button,.mobile-menu-toggle) {
  color:var(--cd-header-action)!important;
}
html:root body.cdh-dark[data-view] .site-header :is(.cd-settings-trigger,#login-button,.mobile-menu-toggle) svg {
  color:inherit!important;
}
html:root body.cdh-dark[data-view] .site-header :is(.cd-settings-trigger,#login-button):hover {
  color:#fff!important;
}
html:root body.cdh-dark[data-view] .mobile-nav a {
  color:var(--cd-header-muted,#b3b6c3)!important;
}
html:root body.cdh-dark[data-view] .mobile-nav a:is(:hover,.active,[aria-current="page"]) {
  color:#f8f8fa!important;
}


/* Twitch's recognizable purple is reserved for the sign-in/profile action. */
html:root body.cdh-dark[data-view] .site-header #login-button {
  color:#fff!important;
  background:linear-gradient(135deg,#a970ff 0%,#9146ff 48%,#772ce8 100%)!important;
  border:1px solid rgba(199,163,255,.85)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.24),0 4px 16px rgba(100,43,206,.22)!important;
}
html:root body.cdh-dark[data-view] .site-header #login-button:hover,
html:root body.cdh-dark[data-view] .site-header #login-button:focus-visible {
  color:#fff!important;
  background:linear-gradient(135deg,#9146ff,#772ce8 80%)!important;
  border-color:#d4b9ff!important;
  box-shadow:inset 0 1px rgba(255,255,255,.3),0 6px 20px rgba(119,44,232,.35)!important;
}
html:root body.cdh-dark[data-view] .site-header #login-button svg {
  color:#fff!important;
}


/* Submission studio: use the approved homepage's blue glass and pink accents.
   This only changes presentation; picker/editor state and video controls stay intact. */
html:root body.cdh-dark[data-view="submit"] {
  --cd-submit-surface:radial-gradient(ellipse 58% 22% at 28% 0%,rgba(239,247,255,.16),transparent 95%),linear-gradient(125deg,rgba(20,39,83,.48),rgba(26,32,70,.54) 57%,rgba(91,38,94,.37));
  --cd-submit-field:linear-gradient(120deg,rgba(20,42,87,.56),rgba(49,37,83,.52));
  --cd-submit-border:rgba(193,206,255,.28);
  --cd-submit-hover:rgba(252,161,215,.72);
}
html:root body.cdh-dark[data-view="submit"] #app .cd-sm-card {
  border-color:var(--cd-submit-border)!important;
  border-radius:18px!important;
  background:var(--cd-submit-surface)!important;
  box-shadow:inset 0 1px rgba(246,250,255,.20),0 16px 34px rgba(6,9,32,.16)!important;
}
html:root body.cdh-dark[data-view="submit"] #app .cd-sm-card:not(:disabled):not([aria-disabled="true"]):hover {
  border-color:var(--cd-submit-hover)!important;
  background:radial-gradient(ellipse 58% 22% at 28% 0%,rgba(245,249,255,.19),transparent 95%),linear-gradient(125deg,rgba(32,55,108,.56),rgba(40,37,85,.60),rgba(119,44,105,.46))!important;
}
html:root body.cdh-dark[data-view="submit"] #app .cd-sm-card-info {
  background:linear-gradient(125deg,rgba(24,51,104,.20),rgba(73,34,86,.16))!important;
}
html:root body.cdh-dark[data-view="submit"] #clip-form > .community-sheet,
html:root body.cdh-dark[data-view="submit"] #submit-auth-gate {
  border-color:var(--cd-submit-border)!important;
  background:var(--cd-submit-surface)!important;
  box-shadow:inset 0 1px rgba(246,250,255,.16),0 12px 32px rgba(5,8,29,.14)!important;
}
html:root body.cdh-dark[data-view="submit"] #clip-form :is(
  .cd-auto-finder,.cd-ref-selected-clip,.cd-ref-ready-block,.ai-draft-panel
) {
  border-color:rgba(193,206,255,.19)!important;
  background:linear-gradient(124deg,rgba(27,49,96,.28),rgba(65,39,88,.22))!important;
}
html:root body.cdh-dark[data-view="submit"] #clip-form :is(
  input[type="text"],input[type="url"],input[type="number"],textarea,
  .cd-menu-control .cd-menu-trigger
) {
  font-family:var(--cds-font)!important;
  color:var(--cds-text)!important;
  border-color:var(--cd-submit-border)!important;
  border-radius:var(--cds-radius-sm)!important;
  background:var(--cd-submit-field)!important;
}
html:root body.cdh-dark[data-view="submit"] #clip-form :is(
  input[type="text"],input[type="url"],input[type="number"],textarea,
  .cd-menu-control .cd-menu-trigger
):is(:hover,:focus-visible) {
  border-color:var(--cd-submit-hover)!important;
}
html:root body.cdh-dark[data-view="submit"] #clip-form .cd-menu-control .cd-menu-list {
  border-color:rgba(193,206,255,.35)!important;
  background:linear-gradient(130deg,rgba(28,47,92,.98),rgba(34,35,74,.98) 60%,rgba(87,39,91,.98))!important;
  z-index:300;
}
html:root body.cdh-dark[data-view="submit"] #clip-form > .community-sheet:has(.cd-menu-trigger[aria-expanded="true"]) {
  position:relative;
  z-index:100;
  overflow:visible;
}
html:root body.cdh-dark[data-view="submit"] #clip-form .cd-menu-control:has(.cd-menu-trigger[aria-expanded="true"]) {
  z-index:101;
}
@media(max-width:760px) {
  html:root body.cdh-dark[data-view="submit"] #app .cd-sm-card {
    border-radius:15px!important;
  }
}


/* Center the empty submission player message within the entire 16:9 stage.
   An older min-height:100% stretched the placeholder but left its flex
   children at the top, making the icon and caption look too high. */
html:root body.cdh-dark[data-view="submit"] #clip-form #clip-inspector > .clip-inspector-placeholder:not([hidden]) {
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  justify-self:stretch;
  width:100%;
  height:100%;
  min-height:0;
  margin:0;
  padding:24px;
  text-align:center;
}


/* Survival keeps the original shared reel and page layout. HP is the sole retained extra. */
body[data-view="what-next"] .game-main .cd-survival-hud,
body[data-view="what-next"] .game-main .cd-survival-film,
body[data-view="what-next"] .game-main .cd-survival-guide,
body[data-view="what-next"] .game-main[data-play-mode="survival"] .cd-player-creator{
  display:none!important;
}
body[data-view="what-next"] .game-main .cd-game-lives[hidden]{display:none!important}
body[data-view="what-next"] .game-main .cd-game-lives:not([hidden]){
  display:flex;align-items:center;gap:10px;
}
body[data-view="what-next"] .game-main .cd-lives-label{
  font-size:12px;font-weight:650;color:#ebbbdb;
}
body[data-view="what-next"] .game-main .cd-lives-count{
  padding-left:10px;border-left:1px solid rgba(232,191,227,.32);
  font-size:14px;font-weight:750;font-variant-numeric:tabular-nums;
}
body[data-view="what-next"] .game-main .cd-game-lives .cd-survival-hearts svg{
  width:23px;height:23px;
}
@media(max-width:620px){
  body[data-view="what-next"] .game-main .cd-lives-label{display:none}
  body[data-view="what-next"] .game-main .cd-lives-count{padding-left:6px;font-size:12px}
  body[data-view="what-next"] .game-main .cd-game-lives .cd-survival-hearts svg{width:19px;height:19px}
}

/* Editorial candidate review: metadata preflight and optional Gemini verdict. */
body[data-view="moderation"] .cd-auto-card .cd-auto-preflight,
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status{
  margin:5px 0 0;padding:7px 9px;border:1px solid rgba(171,192,236,.17);
  border-radius:9px;background:rgba(32,47,85,.19);
  color:#c9d8f5;font-size:11px;line-height:1.5;
}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status{
  color:#d8c9e4;background:rgba(70,39,85,.17);
}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status.is-suitable{
  color:#a5f2c5;border-color:rgba(99,217,151,.35);
}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status.is-unsuitable{
  color:#ffb5cb;border-color:rgba(255,113,155,.32);
}
body[data-view="moderation"] .cd-auto-card .cd-auto-reject-reason{
  min-width:150px;max-width:100%;height:34px;padding:4px 7px;
  color:#f6ecfa;background:rgba(22,30,56,.78);
  border:1px solid rgba(203,186,233,.35);border-radius:8px;font-size:11px;
}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions{
  display:flex;flex-wrap:wrap;align-items:center;gap:7px;
}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions button:disabled{
  opacity:.55;cursor:wait;
}
body.cdh-light[data-view="moderation"] .cd-auto-card .cd-auto-preflight,
body.cdh-light[data-view="moderation"] .cd-auto-card .cd-auto-ai-status{
  color:#4f4261;background:rgba(238,235,255,.7);border-color:rgba(82,68,132,.16);
}
body.cdh-light[data-view="moderation"] .cd-auto-card .cd-auto-reject-reason{
  color:#443450;background:rgba(252,248,255,.94);border-color:rgba(111,91,145,.3);
}

/* Editorial review: compact controls above the AI-shortlisted candidates. */
.cd-auto-review-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0 18px}
.cd-auto-review-tools button{border:1px solid rgba(209,143,255,.42);border-radius:12px;padding:10px 14px;background:rgba(83,37,115,.33);color:#f2deff;cursor:pointer}
.cd-auto-review-tools button:disabled{opacity:.55;cursor:wait}
.cd-auto-review-tools select{min-width:205px;max-width:100%;padding:10px;border-radius:12px}

/* Closed beta invitations — same glass surface as editorial moderation. */
body[data-view="moderation"] .cd-access-panel{margin:0 0 20px;padding:18px 20px;border:1px solid rgba(216,150,223,.32);border-radius:18px;background:rgba(38,32,65,.55);color:#f7eaf9}
body[data-view="moderation"] .cd-access-panel[hidden]{display:none}
body[data-view="moderation"] .cd-access-panel h2{font-size:20px;margin:0 0 6px}
body[data-view="moderation"] .cd-access-panel p{margin:5px 0 12px;line-height:1.5;color:#d7c9de}
body[data-view="moderation"] .cd-access-controls{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
body[data-view="moderation"] .cd-access-controls input,
body[data-view="moderation"] .cd-access-controls select{min-height:41px;max-width:100%;border:1px solid rgba(216,170,229,.35);border-radius:10px;padding:9px 12px;background:rgba(22,28,55,.7);color:#fff}
body[data-view="moderation"] .cd-access-controls input{flex:1 1 190px}
body[data-view="moderation"] .cd-access-panel button{border:1px solid rgba(245,136,193,.4);border-radius:10px;padding:10px 13px;background:#b62d70;color:white;font-weight:700;cursor:pointer}
body[data-view="moderation"] .cd-access-panel button:disabled{opacity:.55;cursor:wait}
body[data-view="moderation"] .cd-access-list{display:grid;gap:6px;max-width:610px}
body[data-view="moderation"] .cd-access-list p{font-size:12px}
body[data-view="moderation"] .cd-access-entry{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;padding:8px 10px;border:1px solid rgba(216,170,229,.2);border-radius:10px}
body[data-view="moderation"] .cd-access-entry button{padding:7px 10px;font-size:12px;background:rgba(128,43,80,.4)}
body.cdh-light[data-view="moderation"] .cd-access-panel{background:rgba(255,251,255,.8);color:#422e50;border-color:rgba(115,68,130,.25)}
body.cdh-light[data-view="moderation"] .cd-access-panel p{color:#63556e}
body.cdh-light[data-view="moderation"] .cd-access-controls input,
body.cdh-light[data-view="moderation"] .cd-access-controls select{background:white;color:#382b46;border-color:rgba(106,74,130,.25)}

/* Profile dropdown and separate admin workspace. */
.account-controls{position:relative}
.cd-account-menu[hidden]{display:none!important}
.cd-account-menu{position:absolute;z-index:300;right:0;top:calc(100% + 11px);width:min(280px,90vw);display:grid;gap:4px;padding:10px;border-radius:16px;background:rgba(23,25,49,.97);border:1px solid rgba(222,155,221,.4);box-shadow:0 15px 50px rgba(0,0,0,.35);backdrop-filter:blur(20px)}
.cd-account-caption{padding:8px 12px;color:#f7a5cf;font-weight:800;border-bottom:1px solid rgba(220,175,232,.17);margin-bottom:5px}
.cd-account-menu a,.cd-account-menu button{display:block;text-align:left;text-decoration:none;border:0;border-radius:10px;padding:12px;color:#f4e7f7;background:transparent;font:inherit;cursor:pointer}
.cd-account-menu a:hover,.cd-account-menu button:hover{background:rgba(230,90,153,.22);color:#fff}
.cd-account-menu button{border-top:1px solid rgba(220,175,232,.17);color:#ffbacd}
.cd-account-page{width:min(1160px,calc(100% - 32px));margin:40px auto 70px;color:#f8e9f6}
.cd-account-page h1{font-size:clamp(28px,4vw,42px);margin:4px 0 25px}
.cd-account-page h2{font-size:23px;margin:0 0 9px}
.cd-account-kicker{color:#f78abc;font-size:12px;font-weight:900;letter-spacing:.14em}
.cd-account-card{padding:clamp(18px,3vw,30px);border:1px solid rgba(225,174,234,.28);border-radius:21px;background:rgba(34,30,62,.58);backdrop-filter:blur(18px)}
.cd-account-card p{color:#d3c3db;line-height:1.6}
.cd-account-link{display:inline-block;margin:8px 15px 0 0;color:#f7a1cb;font-weight:700}
.cd-admin-tabs{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 20px}
.cd-admin-tabs a{display:inline-block;padding:11px 16px;text-decoration:none;color:#ebdbf0;border:1px solid rgba(230,171,232,.3);border-radius:12px;background:rgba(43,34,72,.55)}
.cd-admin-tabs .is-active{background:#c52f78;color:#fff}
.cd-access-controls{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:18px 0}
.cd-access-controls input,.cd-access-controls select{min-height:43px;border:1px solid rgba(220,168,230,.4);border-radius:10px;color:#fff;background:rgba(27,26,53,.9);padding:9px 12px}
.cd-access-controls input{flex:1 1 190px}
.cd-access-controls button,.cd-admin-revoke{min-height:40px;padding:8px 15px;border:1px solid rgba(255,156,210,.35);border-radius:10px;background:#bf3175;color:#fff;font-weight:700;cursor:pointer}
.cd-access-controls button:disabled,.cd-admin-revoke:disabled{opacity:.55}
.cd-admin-invite{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid rgba(220,168,230,.19);border-radius:10px;margin-top:8px}
.cd-admin-muted{font-size:13px}
.cd-admin-revoke{font-size:12px;background:rgba(105,41,74,.5)}
body.cdh-light .cd-account-page{color:#342643}
body.cdh-light .cd-account-card{background:rgba(255,252,255,.8);border-color:rgba(101,71,129,.2)}
body.cdh-light .cd-account-card p{color:#63546d}
body.cdh-light .cd-access-controls input,body.cdh-light .cd-access-controls select{color:#362a44;background:#fff}
@media(max-width:520px){.cd-account-page{width:calc(100% - 24px);margin-top:24px}.cd-admin-invite{flex-wrap:wrap}}

/* Editorial v2 — consistent glass layout and readable candidate workflow. */
body[data-view="moderation"] .cd-auto-discovery{
  width:100%;max-width:none;box-sizing:border-box;min-width:0;
  padding:clamp(18px,2.5vw,34px)!important;
  border-radius:24px!important;border:1px solid rgba(218,166,225,.24)!important;
  background:linear-gradient(126deg,rgba(30,36,69,.77),rgba(63,28,68,.63))!important;
  box-shadow:0 18px 58px rgba(8,8,29,.19);overflow:visible!important
}
body[data-view="moderation"] .cd-auto-heading{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  gap:24px!important;align-items:center!important;margin:0 0 18px!important
}
body[data-view="moderation"] .cd-auto-heading > div{min-width:0;max-width:650px}
body[data-view="moderation"] .cd-auto-heading h2{margin:8px 0;font-size:clamp(25px,2.4vw,34px);line-height:1.15}
body[data-view="moderation"] .cd-auto-heading p{margin:0;color:#c5bed2;line-height:1.55;font-size:14px;max-width:590px}
body[data-view="moderation"] #cd-auto-search{
  min-width:175px;min-height:46px;padding:12px 20px;border-radius:13px;
  background:linear-gradient(135deg,#f2478e,#c72b75);border:1px solid rgba(255,175,212,.45);
  box-shadow:0 7px 22px rgba(205,36,112,.16);color:white;font-weight:800;cursor:pointer
}
body[data-view="moderation"] .cd-auto-review-tools{
  display:flex!important;align-items:center!important;gap:10px!important;
  margin:0 0 18px!important;padding:14px 0!important;
  border-top:1px solid rgba(225,191,236,.12);border-bottom:1px solid rgba(225,191,236,.12)
}
body[data-view="moderation"] .cd-auto-review-tools button,
body[data-view="moderation"] .cd-auto-review-tools select{
  min-height:43px;box-sizing:border-box;border:1px solid rgba(219,161,229,.28);
  border-radius:11px;padding:10px 14px;background:rgba(28,31,63,.73);color:#f5e9fb;
  font-size:13px;font-weight:700
}
body[data-view="moderation"] .cd-auto-review-tools button{background:rgba(153,59,130,.32)}
body[data-view="moderation"] #cd-auto-status{
  margin:0 0 18px;padding:11px 15px;border-radius:12px;
  color:#d5cae2;background:rgba(25,25,51,.44);
  border:1px solid rgba(224,179,236,.12);font-size:12px;line-height:1.6
}
body[data-view="moderation"] #cd-auto-list{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:16px!important;overflow:visible!important;height:auto!important;
  min-height:0!important;max-height:none!important;width:100%!important;
  padding:0!important;margin:0!important;scrollbar-width:auto!important
}
body[data-view="moderation"] #cd-auto-list .cd-auto-card{
  display:flex!important;flex-direction:column!important;min-width:0!important;
  max-width:none!important;width:auto!important;height:auto!important;overflow:hidden!important;
  padding:0!important;margin:0!important;border-radius:17px!important;
  border:1px solid rgba(215,177,232,.2)!important;
  background:linear-gradient(160deg,rgba(28,32,66,.82),rgba(48,28,63,.78))!important;
  transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease
}
body[data-view="moderation"] #cd-auto-list .cd-auto-card:hover{
  transform:translateY(-2px);border-color:rgba(248,143,197,.56)!important;
  box-shadow:0 13px 26px rgba(8,6,27,.22)
}
body[data-view="moderation"] .cd-auto-cover{
  position:relative;aspect-ratio:16/9;overflow:hidden;background:linear-gradient(130deg,#151d3f,#51274b)
}
body[data-view="moderation"] .cd-auto-cover img{display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;border-radius:0!important;margin:0!important}
body[data-view="moderation"] .cd-auto-cover-placeholder{
  display:grid;place-items:center;height:100%;letter-spacing:.15em;color:#9a9bbd;font-size:11px;font-weight:900
}
body[data-view="moderation"] .cd-auto-card-body{display:flex;flex-direction:column;flex:1;min-width:0;padding:15px}
body[data-view="moderation"] .cd-auto-card-body h3{font-size:16px;line-height:1.32;margin:0 0 8px;min-height:0;overflow-wrap:anywhere;color:#fff}
body[data-view="moderation"] .cd-auto-card-body > p:not(.cd-auto-ai-status):not(.cd-auto-preflight){
  font-size:12px;line-height:1.5;color:#aea9bf;margin:0 0 9px
}
body[data-view="moderation"] .cd-auto-card .cd-auto-preflight,
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status{
  box-sizing:border-box;margin:0 0 8px!important;padding:10px 12px!important;
  line-height:1.47!important;font-size:12px!important;border-radius:10px!important;
  overflow-wrap:anywhere;min-height:0!important
}
body[data-view="moderation"] .cd-auto-card .cd-auto-preflight{
  color:#b7c3df;background:rgba(40,48,84,.35);border-color:rgba(116,148,206,.15)
}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status{
  flex:1;color:#d4c8df;background:rgba(36,34,70,.3)
}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status.is-suitable{background:rgba(39,108,78,.15)}
body[data-view="moderation"] .cd-auto-card .cd-auto-ai-status.is-unsuitable{background:rgba(123,48,75,.13)}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions{
  display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;
  margin-top:10px!important;align-items:stretch!important
}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions a,
body[data-view="moderation"] .cd-auto-card .cd-auto-actions button,
body[data-view="moderation"] .cd-auto-card .cd-auto-actions select{
  display:flex;justify-content:center;align-items:center;box-sizing:border-box;min-width:0;width:100%;
  min-height:39px;padding:8px 9px!important;margin:0!important;
  border-radius:10px!important;border:1px solid rgba(220,163,221,.3)!important;
  background:rgba(78,39,85,.42)!important;color:#f8e9f7!important;
  font-size:12px!important;font-weight:700!important;line-height:1.3!important;
  text-align:center;text-decoration:none;white-space:normal;cursor:pointer
}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions a{
  grid-column:1/-1;background:linear-gradient(120deg,rgba(215,49,126,.82),rgba(170,42,125,.77))!important
}
body[data-view="moderation"] .cd-auto-card .cd-auto-actions select{justify-content:initial;min-width:0}
body[data-view="moderation"] .cd-auto-pagination{
  display:flex;justify-content:center;align-items:center;gap:14px;margin:22px 0 0
}
body[data-view="moderation"] .cd-auto-pagination[hidden]{display:none}
body[data-view="moderation"] .cd-auto-pagination button{
  padding:10px 16px;border-radius:10px;border:1px solid rgba(217,151,212,.35);
  background:rgba(71,43,92,.5);color:#ffeefa;font-weight:700;cursor:pointer
}
body[data-view="moderation"] .cd-auto-pagination button:disabled{opacity:.36;cursor:default}
body[data-view="moderation"] .cd-auto-page-label{color:#e3d0e5;font-size:13px;font-weight:700}
body[data-view="moderation"] .cd-auto-empty{grid-column:1/-1;padding:35px;text-align:center;color:#d1c3df}
@media(max-width:1150px){
 body[data-view="moderation"] #cd-auto-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:700px){
 body[data-view="moderation"] .cd-auto-heading{grid-template-columns:1fr!important}
 body[data-view="moderation"] #cd-auto-search{width:100%}
 body[data-view="moderation"] #cd-auto-list{grid-template-columns:1fr!important}
 body[data-view="moderation"] .cd-auto-review-tools>*{flex:1 1 100%}
 body[data-view="moderation"] .cd-auto-card .cd-auto-actions{grid-template-columns:1fr 1fr!important}
}
/* Account navigation: icons, spacing and consistent interactive rows. */
.site-header .cd-account-menu{padding:9px!important;min-width:255px;border-radius:16px!important}
.site-header .cd-account-menu .cd-account-item{
  display:flex!important;align-items:center!important;gap:11px!important;
  width:100%;padding:11px 13px!important;min-height:43px;
  font-size:13px!important;font-weight:650!important;border-radius:10px!important;
  text-align:left;box-sizing:border-box;line-height:1.4
}
.site-header .cd-account-menu .cd-account-item svg{display:block;flex:none;width:18px;height:18px;opacity:.87}
.site-header .cd-account-menu .cd-account-item[hidden]{display:none!important}
.site-header .cd-account-menu .cd-account-logout{margin-top:6px;border-top:1px solid rgba(245,207,233,.13)!important;border-radius:0 0 10px 10px!important}

/* Account workspace refinements, same glass tokens and typography as home. */
.cd-account-page{width:min(1120px,calc(100% - 40px))!important;margin:44px auto 80px!important}
.cd-account-page-head{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:16px;margin:0 0 24px}
.cd-account-page-head h1{font-size:clamp(30px,3vw,43px);line-height:1.15;letter-spacing:-.035em;margin:10px 0}
.cd-account-page-head p{margin:0;color:#c9bbd5;font-size:14px;line-height:1.6}
.cd-account-back{padding:11px 16px;border:1px solid rgba(218,175,229,.3);border-radius:11px;text-decoration:none;color:#ead7ef;background:rgba(34,32,68,.48);font-size:13px;font-weight:700}
.cd-account-page .cd-account-card{
  background:linear-gradient(135deg,rgba(32,39,75,.73),rgba(67,32,73,.63))!important;
  border-color:rgba(222,168,225,.27)!important;border-radius:23px!important;
  box-shadow:0 18px 52px rgba(4,5,20,.2);padding:clamp(20px,3vw,32px)!important
}
.cd-account-page .cd-admin-tabs{margin:0 0 18px;gap:10px}
.cd-account-page .cd-admin-tabs a{padding:12px 19px;border-radius:12px;font-weight:750;font-size:13px}
.cd-account-page .cd-admin-tabs a.is-active{background:linear-gradient(120deg,#e23c89,#bd2d79)}
.cd-admin-card-intro{display:flex;align-items:start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.cd-admin-card-intro h2{font-size:clamp(23px,2.2vw,30px);margin:9px 0}
.cd-admin-card-intro p{max-width:550px;font-size:14px;margin:0}
.cd-admin-live{border:1px solid rgba(120,220,160,.3);background:rgba(31,97,71,.22);border-radius:99px;padding:9px 12px;color:#9ae5bc;font-size:12px;font-weight:750;white-space:nowrap}
.cd-account-page .cd-access-controls{display:grid;grid-template-columns:minmax(180px,1fr) minmax(125px,190px) auto;gap:10px;margin:25px 0 15px}
.cd-account-page .cd-access-controls input,.cd-account-page .cd-access-controls select,.cd-account-page .cd-access-controls button{min-height:46px;border-radius:12px}
.cd-account-page .cd-access-controls button{background:linear-gradient(110deg,#df3c88,#bc2b76);font-weight:800}
.cd-admin-section-label{margin:25px 0 12px;font-size:15px;color:#f7e6f7}
.cd-account-page .cd-admin-invite{padding:13px 15px;margin:8px 0;border-radius:12px;background:rgba(25,28,57,.29)}
.cd-profile-identity{display:flex;align-items:center;gap:19px}
.cd-profile-avatar{width:76px;height:76px;flex:0 0 76px;display:grid;place-items:center;border-radius:21px;background:linear-gradient(140deg,#ee438d,#793cb7);color:white;font-size:37px;font-weight:900;box-shadow:0 12px 25px rgba(171,45,132,.22)}
.cd-profile-identity h2{font-size:clamp(23px,2.4vw,32px);margin:0 0 8px}
.cd-profile-role{display:inline-block;padding:6px 10px;border-radius:99px;border:1px solid rgba(245,143,198,.32);background:rgba(205,57,139,.18);color:#f4a7cf;font-weight:750;font-size:12px}
.cd-profile-intro{margin:24px 0 15px!important;border-top:1px solid rgba(225,175,230,.14);padding-top:18px}
.cd-profile-nav{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}
.cd-profile-nav .cd-account-link{display:inline-flex;align-items:center;margin:0;padding:12px 16px;border-radius:12px;border:1px solid rgba(242,137,193,.38);background:rgba(115,46,101,.27);text-decoration:none}
@media(max-width:680px){
 .cd-account-page{width:calc(100% - 24px)!important;margin-top:24px!important}
 .cd-account-page .cd-access-controls{grid-template-columns:1fr}
 .cd-account-page .cd-admin-tabs a{flex:1;text-align:center}
 .cd-admin-card-intro{display:block}
 .cd-admin-live{display:inline-block;margin:15px 0 0}
}

/* Moderator Gemini assistant — review-first, no silent changes to published rounds. */
body[data-view="moderation"] .mod-ai-panel{
  margin:20px 0 0;padding:22px;border-radius:18px;
  border:1px solid rgba(215,143,226,.32);
  background:linear-gradient(135deg,rgba(52,39,84,.58),rgba(75,38,81,.4));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)
}
body[data-view="moderation"] .mod-ai-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:9px 18px}
body[data-view="moderation"] .mod-ai-heading h3{font-size:20px;margin:0 0 8px;color:#f9ecfa}
body[data-view="moderation"] .mod-ai-help{font-size:13px;color:#cec2d9;line-height:1.55;margin:2px 0 16px}
body[data-view="moderation"] .mod-ai-actions{display:flex;flex-wrap:wrap;gap:9px}
body[data-view="moderation"] .mod-ai-actions button{
  flex:1 1 155px;padding:11px 13px;border-radius:11px!important;
  border:1px solid rgba(230,161,221,.36)!important;
  background:rgba(80,41,99,.55)!important;color:#fceafa!important;
  font-weight:750;font-size:13px;cursor:pointer
}
body[data-view="moderation"] .mod-ai-actions button:disabled{opacity:.5;cursor:wait}
body[data-view="moderation"] .mod-ai-feedback{margin:12px 0 0;color:#e7d5e8;font-size:13px;line-height:1.5}
body[data-view="moderation"] .mod-ai-preview[hidden]{display:none}
body[data-view="moderation"] .mod-ai-preview{
  margin:17px 0 0;padding:19px;border-radius:13px;
  border:1px solid rgba(220,177,232,.23);background:rgba(22,27,55,.45);
}
body[data-view="moderation"] .mod-ai-preview h4{font-size:15px;color:#f5c0dc;margin:0 0 14px}
body[data-view="moderation"] .mod-ai-proposed-question{font-size:16px;color:#fff;font-weight:750;line-height:1.4;margin:0 0 13px}
body[data-view="moderation"] .mod-ai-proposed-answers{display:grid;gap:7px;list-style:upper-alpha;padding:0 0 0 25px;margin:0 0 16px}
body[data-view="moderation"] .mod-ai-proposed-answers li{padding:8px 10px;border:1px solid rgba(215,180,226,.18);border-radius:9px;color:#dfd3e9;font-size:13px;line-height:1.45}
body[data-view="moderation"] .mod-ai-proposed-answers li.is-correct{border-color:rgba(109,220,162,.34);background:rgba(40,125,81,.16);color:#a9f1ce}
body[data-view="moderation"] .mod-ai-proposed-timing{font-size:12px;color:#c9b5dd}
body[data-view="moderation"] .mod-ai-proposed-reveal{font-size:13px;line-height:1.5;color:#ded0e8}
body[data-view="moderation"] .mod-ai-preview > button{margin-top:8px;padding:11px 17px;border-radius:11px}
@media(max-width:650px){body[data-view="moderation"] .mod-ai-panel{padding:15px}}

/* Player error reports use the existing glass controls and keep the round published. */
body[data-view="what-next"] .cd-case-report[hidden],
body[data-view="what-next"] .cd-report-form[hidden],
body[data-view="what-next"] .cd-report-status[hidden]{display:none!important}
body[data-view="what-next"] .cd-case-report{margin-top:12px;padding:12px 0;border-top:1px solid rgba(216,176,232,.2)}
body[data-view="what-next"] .cd-report-toggle{
  border:0;background:none;padding:6px 0;color:#d9badb;
  font:650 12px/1.4 inherit;cursor:pointer;text-align:left
}
body[data-view="what-next"] .cd-report-toggle:hover{color:#ff9dc9}
body[data-view="what-next"] .cd-report-form{display:grid;gap:10px;margin-top:12px;padding:14px;border:1px solid rgba(223,175,235,.28);border-radius:13px;background:rgba(35,29,58,.55)}
body[data-view="what-next"] .cd-report-form label{display:grid;gap:6px;color:#e9d8ef;font-size:12px;font-weight:650}
body[data-view="what-next"] .cd-report-form select,
body[data-view="what-next"] .cd-report-form textarea{width:100%;min-width:0;border:1px solid rgba(214,172,233,.36);border-radius:9px;padding:10px;background:#211c37;color:#fff;font:inherit}
body[data-view="what-next"] .cd-report-actions{display:flex;flex-wrap:wrap;gap:8px}
body[data-view="what-next"] .cd-report-actions button{padding:9px 13px;border:1px solid rgba(242,157,200,.45);border-radius:9px;background:rgba(170,52,115,.32);color:#fff;font-weight:700;cursor:pointer}
body[data-view="what-next"] .cd-report-actions button[type="submit"]{background:#cd3078}
body[data-view="what-next"] .cd-report-actions button:disabled{opacity:.5;cursor:wait}
body[data-view="what-next"] .cd-report-status{color:#c8edd6;font-size:12px}
body.cdh-light[data-view="what-next"] .cd-report-form{background:rgba(255,250,255,.85)}
body.cdh-light[data-view="what-next"] .cd-report-form label{color:#5c3a63}
body.cdh-light[data-view="what-next"] .cd-report-form select,
body.cdh-light[data-view="what-next"] .cd-report-form textarea{background:white;color:#4c3555}

/* Reports stay in moderation, separate from the candidate finder. */
body[data-view="moderation"] .mod-case-reports{margin:0 0 18px;padding:0 16px;border:1px solid rgba(219,161,230,.32);border-radius:15px;background:rgba(37,31,65,.45)}
body[data-view="moderation"] .mod-case-reports>summary{padding:14px 2px;font-size:14px;font-weight:780;color:#f7d8f0;cursor:pointer}
body[data-view="moderation"] .mod-case-reports-list{display:grid;gap:10px;padding:0 0 16px}
body[data-view="moderation"] .mod-report-item{padding:12px 14px;border:1px solid rgba(198,172,231,.24);border-radius:12px;background:rgba(27,24,49,.6)}
body[data-view="moderation"] .mod-report-meta{display:flex;justify-content:space-between;gap:12px;color:#ffe2ee;font-size:13px}
body[data-view="moderation"] .mod-report-meta span{color:#c6b7d7}
body[data-view="moderation"] .mod-report-case{margin:8px 0 3px;color:#f5ebfc;font-weight:720}
body[data-view="moderation"] .mod-report-item>p:not(.mod-report-case){margin:4px 0 12px;color:#d4c8dd;line-height:1.45}
body[data-view="moderation"] .mod-report-actions{display:flex;gap:9px;flex-wrap:wrap}
body[data-view="moderation"] .mod-report-actions button{font-size:12px}
body[data-view="moderation"] .mod-report-empty{padding:4px 2px;color:#cbbad3;font-size:13px}
