/* v8252 — DChan Release Studio global premium visual language.
   Phase 1: all routed Studio tools plus accountShell/profile/social/admin and
   public information pages. Reference: approved Blue Facets Home screenshot.
   Never hide, reorder, replace or intercept actual controls/navigation.
   Editor, modal overlays and the independent read-only MCP pilot are untouched.
*/
:root{
  --dchan-premium-radius:17px;
  --dchan-premium-edge:rgba(97,164,229,.43);
  --dchan-premium-shine:inset 0 1px 0 rgba(247,251,255,.14);
  --dchan-premium-focus:#91dfff;
  --dchan-premium-title:#f5faff;
  --dchan-premium-muted:#b9cee4;
  --dchan-premium-blue:#32c9ff;
}
/* The theme selector stays authoritative; do not turn Black/Purple/Deep Blue
   into Blue Facets. This palette is a finish layer over the active theme. */
html body[data-theme]{
  --dchan-premium-surface:var(--dgt-card,#0b2645);
  --dchan-premium-raised:var(--dgt-card2,#133354);
  --dchan-premium-line:var(--dgt-line-strong,rgba(104,167,226,.48));
  --dchan-premium-accent:var(--dgt-accent,#39bdff);
  --dchan-premium-shadow:var(--dgd-shadow-card,0 12px 27px rgba(0,5,24,.30));
}
html body[data-theme]:not(.editor-open) :is(
  .panel,.settings-list-group,.channel-panel,.channel-card,.upload-card,
  .schedule-item,.schedule-card,.seo-result-card,.playlist-library-card,
  .playlist-card,.release-card,.gi-section,.gi-list-item,.stat-card,
  .dchan-modern-section,.dchan-compact-choice-v7922,
  .dchan-latest-release-card-v7929,.dchan-gt-row-v7200,
  .dchan-gt-editor-v7200,.dchan-audit-intro-v7689,
  .dchan-batch-review-v7725,.dchan-guided-review-v7756
){
  border-color:var(--dchan-premium-line)!important;
  border-radius:var(--dchan-premium-radius)!important;
  box-shadow:var(--dchan-premium-shadow)!important;
}
/* These reusable surfaces inherit theme colors, including the supported black
   and purple variants. The screenshot's blue only appears in Blue Facets. */
html body[data-theme]:not(.editor-open) :is(
  .panel,.settings-list-group,.channel-panel,.channel-card,.upload-card,
  .schedule-item,.schedule-card,.seo-result-card,.playlist-library-card,
  .playlist-card,.release-card,.gi-section,.stat-card
){
  background-color:var(--dchan-premium-surface)!important;
}
html body[data-theme]:not(.editor-open) :is(
  .page.active h1,.page.active h2,.page.active h3,
  .panel-heading h2,.settings-list-group h3
){letter-spacing:-.025em}
html body[data-theme]:not(.editor-open) :is(
  .page.active .small,.page.active .muted,.page.active .helper-text
){color:var(--dgt-muted,#aabfd4)}
html body[data-theme]:not(.editor-open) :is(
  button,.btn,.small-button,.flat-button,.settings-list-link,
  .nav-button,.dchan-compact-choice-v7922
):focus-visible{
  outline:3px solid var(--dchan-premium-focus)!important;
  outline-offset:3px!important;
}
html body[data-theme]:not(.editor-open) :is(
  .page.active input,.page.active textarea,.page.active select
){
  border-radius:13px;
  border-color:var(--dchan-premium-line);
}
/* Fixed five-destination dock: the v7924 icon owner paints the exact reference
   home / people / plus / sparkles / ellipsis icons. No new click handlers. */
html body[data-theme]:not(.editor-open) .bottom-nav .nav-button[data-nav]{
  font-weight:800;
  -webkit-tap-highlight-color:transparent;
}
html body[data-theme]:not(.editor-open) .bottom-nav .nav-button[data-nav] > span{
  font-size:clamp(10px,2.7vw,13px);
  line-height:1.22;
}
html body[data-theme]:not(.editor-open) .bottom-nav .nav-button[data-nav].active{
  border-color:var(--dchan-premium-line)!important;
  color:var(--dchan-premium-accent)!important;
}
@media(max-width:600px){
  html body[data-theme]:not(.editor-open) .page.active{
    min-width:0;max-width:100%;
  }
}
/* Standalone Studio routes (accountShell): sign in, profile, Admin, social,
   followers, inbox, support and linked account views all reuse this finish. */
html body:not([data-theme]):has(>.wrap){
  background:radial-gradient(ellipse 90% 48% at 8% 0%,
    rgba(28,111,189,.25),transparent 72%),
    radial-gradient(ellipse 90% 45% at 100% 5%,
    rgba(103,62,191,.22),transparent 77%),
    linear-gradient(160deg,#041427,#0a1c34 52%,#11172e)!important;
  color:var(--dchan-premium-title);
}
html body:not([data-theme]) .wrap{
  max-width:780px;
}
html body:not([data-theme]) .wrap .brand h1{
  color:var(--dchan-premium-title);
  letter-spacing:-.038em;
}
html body:not([data-theme]) .wrap .brand-logo{
  border:1px solid rgba(110,189,254,.5);
  box-shadow:0 0 0 3px rgba(41,113,213,.10),0 0 21px rgba(32,129,249,.25);
}
html body:not([data-theme]) .wrap :is(
  .card,.notice,.linkbox,.cs-shell,.cs-card,.cs-row,.cs-panel,
  .cp-summary,.cp-section,.cp-photo-card,.cp-about-v8086
){
  border-color:var(--dchan-premium-edge)!important;
  box-shadow:var(--dchan-premium-shine),0 13px 30px rgba(0,8,27,.27)!important;
}
html body:not([data-theme]) .wrap :is(.card,.notice,.linkbox){
  background:linear-gradient(150deg,#103050,#0d213b 68%,#1b2147)!important;
  border-radius:var(--dchan-premium-radius)!important;
}
html body:not([data-theme]) .wrap :is(input,select,textarea){
  font-size:16px;
  background-color:#081d36;
  border-color:rgba(103,165,230,.48);
  border-radius:13px;
  color:#f6faff;
}
html body:not([data-theme]) .wrap :is(input,select,textarea):focus-visible{
  outline:3px solid var(--dchan-premium-focus);
  outline-offset:2px;
}
html body:not([data-theme]) .wrap :is(.btn,button):not(.danger):not(:disabled){
  border-radius:13px;
}
html body:not([data-theme]) .wrap :is(.btn,button,a):focus-visible{
  outline:3px solid var(--dchan-premium-focus)!important;
  outline-offset:3px!important;
}
html body:not([data-theme]) .wrap :is(.small,.muted,.cs-muted){
  color:var(--dchan-premium-muted);
}
/* The existing account and profile action labels remain genuine working links. */
html body:not([data-theme]) .wrap :is(.cs-mini-link,.cp-back){
  color:#a8dcff;
}
@media(max-width:430px){
  html body:not([data-theme]) .wrap{max-width:100%;overflow-wrap:anywhere}
  html body:not([data-theme]) .wrap :is(.card,.cs-row,.cp-section){
    border-radius:16px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  html body:not([data-theme]) .wrap :is(.btn,button),
  html body[data-theme] .bottom-nav .nav-button{
    transition:none!important;
  }
}
/* Public information shell is linked separately and keeps its own nav. */
html body:has(>.shell) .shell :is(.card,.hero,.notice){
  border-radius:var(--dchan-premium-radius);
  border-color:var(--dchan-premium-edge);
  box-shadow:var(--dchan-premium-shine),0 14px 32px rgba(0,7,24,.26);
}
html body:has(>.shell) .shell :is(.nav a,.btn):focus-visible{
  outline:3px solid var(--dchan-premium-focus);
  outline-offset:3px;
}

/* DChan Neon Bloom sign-in skin — scoped to the existing account form. */
html body:has(#dchanUnifiedAuth){
 background:radial-gradient(ellipse 90% 55% at -20% 25%,#1239a466,transparent 75%),radial-gradient(ellipse 85% 65% at 115% 85%,#470d9866,transparent 75%),linear-gradient(145deg,#030b1c,#05102b 55%,#09061d)!important;
 color:#f5f8ff;
}
html body:has(#dchanUnifiedAuth) .wrap>.brand{padding:5px 0 12px}
html body:has(#dchanUnifiedAuth) .brand h1{color:#f5f8ff;text-shadow:0 2px 12px #000a,0 0 20px #279dff33}
html body:has(#dchanUnifiedAuth) .brand p{color:#adc5e6}
html body:has(#dchanUnifiedAuth) .brand .brand-logo{
 border:1px solid #37d7ff!important;
 box-shadow:0 0 10px #10ccff99,0 0 26px #2154ff88,0 0 22px #ac20f866,inset 0 0 10px #6a8fff66!important;
}
html body:has(#dchanUnifiedAuth) .wrap>.card{
 position:relative;border:1px solid #387bef!important;border-radius:24px!important;
 background:radial-gradient(ellipse 85% 35% at 0% 0%,#1b4d8066,transparent 80%),linear-gradient(150deg,#0b2243,#07152f 60%,#160d36)!important;
 box-shadow:inset 0 1px 0 #9adfff55,inset 0 0 22px #245ee51a,0 20px 50px #0009,0 0 12px #1264ff66,0 0 30px #6234dd33!important;
}
html body:has(#dchanUnifiedAuth) .dchan-auth-kicker{color:#6ddfff;text-shadow:0 0 12px #0baaff66}
html body:has(#dchanUnifiedAuth) #dchanAuthTitle{color:#f7fbff;text-shadow:0 2px 9px #0007}
html body:has(#dchanUnifiedAuth) #dchanAuthDescription{color:#b7cce8}
html body:has(#dchanUnifiedAuth) .dchan-auth-mode{
 background:linear-gradient(150deg,#061a35,#080e26)!important;border-color:#2856a3;
 box-shadow:inset 0 2px 9px #0008,0 1px 0 #4e80c733;
}
html body:has(#dchanUnifiedAuth) #dchanAuthMode,
html body:has(#dchanUnifiedAuth) #dchanUnifiedAuth input:not([type="checkbox"]){
 background:linear-gradient(160deg,#0a2348,#06142e)!important;
 border:1px solid #318bed!important;color:#f7fbff;
 box-shadow:inset 0 2px 9px #0009,0 0 7px #087eff44;
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedAuth input::placeholder{color:#9fb8d7;opacity:1}
html body:has(#dchanUnifiedAuth) #dchanAuthMode:focus-visible,
html body:has(#dchanUnifiedAuth) #dchanUnifiedAuth input:not([type="checkbox"]):focus-visible{
 border-color:#61ddff!important;outline:2px solid #91dfff;outline-offset:3px;
 box-shadow:inset 0 2px 9px #0009,0 0 13px #087eff99;
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedAuth input:-webkit-autofill{
 -webkit-text-fill-color:#f7fbff!important;-webkit-box-shadow:0 0 0 1000px #0a2348 inset!important;
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedAuth .dchan-auth-check input{
 accent-color:#24bbff;border-radius:6px!important;
 filter:drop-shadow(0 0 4px #168fff55);
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedSubmit{
 background:linear-gradient(125deg,#0da9eb,#165cf9 48%,#8e27db)!important;
 border:1px solid #59d9ff!important;border-radius:15px!important;
 box-shadow:inset 0 2px 5px #ffffff66,inset 0 -4px 8px #172a9255,0 4px 0 #112d79,0 9px 23px #0008,0 0 14px #108aff88,0 0 22px #9d2cff55!important;
 text-shadow:0 1px 5px #142b7777;
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedSubmit:disabled{opacity:.6;cursor:wait}
html body:has(#dchanUnifiedAuth) #dchanDedicatedResendConfirmation{
 background:linear-gradient(155deg,#173760,#0a1d3d 65%,#241345)!important;
 border:1px solid #4d75c1!important;color:#e6f2ff;
 box-shadow:inset 0 1px 6px #8cbfff33,0 5px 14px #0007,0 0 8px #2757cf44!important;
}
html body:has(#dchanUnifiedAuth) #dchanUnifiedForgot{color:#8fdcff;background:transparent;box-shadow:none}
html body:has(#dchanUnifiedAuth) .dchan-auth-private{color:#9bb0cf;border-top-color:#3b529a66}
html body:has(#dchanUnifiedAuth) #dchanUnifiedMsg.error{color:#ffb4b4}
html body:has(#dchanUnifiedAuth) #dchanUnifiedMsg.ok{color:#9cebc8}
@media(prefers-reduced-motion:reduce){
 html body:has(#dchanUnifiedAuth) button{transition:none!important}
}

/* v8451 — desktop sign-in: wide browser workstation entry, same native form.
   Desktop only; never modify login handlers, inputs, profile routing, or mobile. */
@media (min-width:1024px) {
  html body:has(#dchanUnifiedAuth) {
    background:
      radial-gradient(ellipse 50% 67% at -8% 52%,rgba(0,128,255,.19),transparent 75%),
      radial-gradient(ellipse 36% 65% at 100% 95%,rgba(100,43,255,.17),transparent 77%),
      linear-gradient(128deg,#0e121b 0%,#101725 53%,#080d1a 100%)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap {
    box-sizing:border-box;
    width:min(95vw,1380px)!important;
    min-width:0!important; max-width:1380px!important;
    min-height:100dvh!important; margin:0 auto!important;
    padding:42px clamp(28px,4vw,76px) 30px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.18fr) minmax(405px,.82fr)!important;
    grid-template-rows:minmax(66px,auto) minmax(540px,1fr) auto!important;
    column-gap:clamp(32px,5vw,90px)!important;
    row-gap:15px!important;
    align-items:center!important; justify-content:stretch!important;
    background:radial-gradient(ellipse 50% 75% at 34% 56%,rgba(1,111,220,.08),transparent 80%);
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand {
    grid-column:1/-1; grid-row:1; justify-self:stretch;
    min-width:0; width:100%; margin:0!important; padding:0 0 20px!important;
    border-bottom:1px solid rgba(106,160,218,.19);
    text-align:left!important; align-items:flex-start!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand h1 {
    display:flex!important; justify-content:flex-start!important; align-items:center!important;
    gap:12px!important; margin:0!important; font-size:27px!important;
    color:#f4f9ff!important; letter-spacing:-.035em!important;
    text-shadow:none!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand .brand-logo {
    width:57px!important; height:57px!important; flex-basis:57px!important;
    border-radius:14px!important; object-fit:contain!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand p {
    margin:4px 0 0 69px!important; font-size:10px!important;
    letter-spacing:.17em!important; text-transform:uppercase!important;
    color:#91accd!important; text-align:left!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand:after {
    content:"STUDIO  /  DESKTOP";
    position:absolute; right:clamp(34px,5vw,80px); top:59px;
    padding:11px 14px; border:1px solid rgba(65,153,238,.24);
    border-radius:10px; background:rgba(17,41,74,.38);
    color:#9adfff; font-size:10px; font-weight:800; letter-spacing:.18em;
  }
  html body:has(#dchanUnifiedAuth) .wrap:before {
    content:"Create. Connect. Grow.\A One workspace for your next release.";
    grid-column:1; grid-row:2; align-self:center; justify-self:start;
    max-width:650px; white-space:pre-line;
    color:#f7fbff; font-size:clamp(35px,4.5vw,67px); line-height:1.09;
    font-weight:890; letter-spacing:-.055em;
    text-shadow:0 12px 34px rgba(0,0,0,.23);
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card {
    grid-column:2; grid-row:2; align-self:center; justify-self:stretch;
    width:100%!important; max-width:510px!important;
    padding:clamp(24px,2.4vw,35px)!important; margin:0!important;
    border-radius:20px!important;
    background:linear-gradient(155deg,rgba(25,39,63,.985),rgba(13,23,42,.99))!important;
    border:1px solid rgba(91,159,242,.41)!important;
    box-shadow:0 25px 80px rgba(0,0,0,.39),inset 0 1px rgba(192,219,255,.13),0 0 45px rgba(39,99,255,.07)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card #dchanAuthTitle {
    font-size:30px!important; letter-spacing:-.04em!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card #dchanAuthDescription {
    font-size:12px!important; line-height:1.55!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card :is(input:not([type=checkbox]),select) {
    min-height:49px!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card #dchanUnifiedSubmit {
    min-height:52px!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap > div:last-of-type {
    grid-column:1/-1; grid-row:3;
    margin:0!important; padding:15px 0 0!important;
    border-top:1px solid rgba(88,133,191,.16);
    text-align:center!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand:focus-within,
  html body:has(#dchanUnifiedAuth) .wrap>.card:focus-within {
    isolation:isolate;
  }
}
@media (min-width:1024px) and (max-height:710px) {
  html body:has(#dchanUnifiedAuth) .wrap {
    grid-template-rows:auto minmax(0,1fr) auto!important;
    padding-top:20px!important; padding-bottom:20px!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand:after{top:34px}
}
@media (min-width:1024px) and (prefers-reduced-motion:reduce) {
  html body:has(#dchanUnifiedAuth) .wrap>.card {scroll-behavior:auto!important}
}

/* v8455: on laptop screens the real sign-in form must fit the browser height.
   Long forms remain keyboard-scrollable; no inputs or auth handlers are hidden.
   iPhone/tablet presentation is unchanged. */
@media (min-width:1024px) {
  html body:has(#dchanUnifiedAuth) {
    min-height:100dvh!important;
    overflow-x:clip;
  }
  html body:has(#dchanUnifiedAuth) .wrap {
    width:min(100% - 48px,1380px)!important;
    height:100dvh!important;min-height:0!important;
    padding:clamp(12px,2.4vh,26px) clamp(26px,3.6vw,64px)!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    row-gap:clamp(8px,1.4vh,14px)!important;
    column-gap:clamp(24px,4vw,72px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand {
    padding-bottom:clamp(8px,1.4vh,14px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand h1{
    font-size:clamp(19px,2vw,25px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand .brand-logo{
    width:clamp(35px,4vh,48px)!important;
    height:clamp(35px,4vh,48px)!important;
    flex-basis:clamp(35px,4vh,48px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand p{
    margin-left:58px!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand:after{
    top:clamp(19px,3vh,39px);right:clamp(24px,4vw,76px);
  }
  html body:has(#dchanUnifiedAuth) .wrap:before {
    font-size:clamp(30px,3.9vw,58px)!important;
    line-height:1.12!important;
    max-width:580px;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card {
    box-sizing:border-box!important;
    width:100%!important;max-width:520px!important;
    min-height:0;max-height:100%!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    padding:clamp(15px,2.1vh,27px)!important;
    scrollbar-width:thin;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card #dchanAuthTitle {
    font-size:clamp(22px,2.1vw,28px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card :is(input:not([type=checkbox]),select){
    min-height:clamp(41px,5.4vh,48px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.card #dchanUnifiedSubmit {
    min-height:clamp(43px,5.5vh,51px)!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>div:last-of-type{
    padding-top:8px!important;
  }
}
@media (min-width:1024px) and (max-height:550px){
  html body:has(#dchanUnifiedAuth) .wrap {
    padding-block:8px!important;
    row-gap:6px!important;
  }
  html body:has(#dchanUnifiedAuth) .wrap>.brand:after{top:10px;font-size:8px;}
}
