/* 7FCLAB Gate12 Header Visual Preview R9 — scoped PC layout, not production. */
@media (min-width: 1181px) {
  body .topbar {
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:54px!important;
    overflow:visible!important;
  }
  body .topbar>.site-brand {
    position:relative!important;
    margin-right:auto!important;
    flex:0 0 auto!important;
    z-index:2!important;
  }
  body .topbar #pcTopbarActions {
    position:relative!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    margin:0 0 0 auto!important;
    width:max-content!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    z-index:5!important;
  }
  body .topbar #pcTopbarActionMain {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body .topbar #pcTopbarActions>.version {
    align-self:center!important;
    margin:0!important;
    font-size:9px!important;
    opacity:.7!important;
  }
  body .main>.editor-view-tabs {
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
  }
  body .main>.editor-view-tabs #cloud-account-control {
    order:99!important;
    margin:0 0 0 auto!important;
    flex:0 0 auto!important;
    z-index:50!important;
  }
}
/* Narrower desktop: keep account in the original topbar rather than crowding tabs. */
@media (min-width:761px) and (max-width:1180px) {
  body .topbar #pcTopbarActions { margin-left:auto!important; }
  body .topbar #cloud-account-control { margin-left:12px!important; }
}
/* The account panel must escape navigation clipping; layout set by R9.1 JS. */
#cloud-account-control #cloud-account-popover {
  position:fixed!important;
  z-index:2147483000!important;
  overflow-y:auto;
  max-width:calc(100vw - 16px);
}

/* R9.5: account popover is portaled to document.body to escape nav clipping. */
body > #cloud-account-popover {position:fixed!important; z-index:2147483000!important; width:210px; box-sizing:border-box; padding:10px; background:#141b22; border:1px solid rgba(213,172,96,.48); border-radius:11px; box-shadow:0 18px 45px rgba(0,0,0,.75); color:#d5d9df; overflow-y:auto;}
body > #cloud-account-popover[hidden] {display:none!important;}
body > #cloud-account-popover [hidden] {display:none!important;}
body > #cloud-account-popover .cloud-account-label{padding:5px 7px 10px;margin-bottom:4px;color:#c8aa71;font-size:12px;font-weight:600;border-bottom:1px solid rgba(213,172,96,.2);overflow-wrap:anywhere;}
body > #cloud-account-popover a,body > #cloud-account-popover button{display:block;width:100%;padding:10px 8px;border:0;border-radius:6px;text-align:left;background:transparent;color:#d8dadd;text-decoration:none;font-size:12px;font-weight:500;line-height:1.4;font-family:inherit;cursor:pointer;}
body > #cloud-account-popover a:hover,body > #cloud-account-popover button:hover{background:rgba(213,172,96,.12);}
@media (min-width:761px) and (max-width:1599px) {
 body .topbar #cloud-account-control {margin-left:12px!important;flex:0 0 auto!important;}
}
/* Restore the accepted four-control header group. */
body .topbar #pcTopbarActions{max-width:100%;min-width:0}
body .topbar #pcTopbarActionMain{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap;justify-content:flex-end!important}
body .topbar #pcTopbarActionMain #cloud-account-control{margin:0!important;order:4;flex:0 0 auto}
body .topbar #pcTopbarActionMain :is(#pcLangButton,#pcPremiumThemeButton,#pcContactAuthorButton){box-sizing:border-box!important;height:36px!important;min-height:36px!important;border-radius:9px!important;border:1px solid rgba(149,167,170,.23)!important;background:linear-gradient(180deg,#1c282c,#111c20)!important;padding:0 12px!important;font-size:12px!important;line-height:1.2!important;display:flex!important;align-items:center!important;justify-content:center!important}

body > #cloud-account-popover{padding:6px;background:linear-gradient(160deg,#1b252d,#131b22);border:1px solid rgba(183,162,116,.32);border-radius:12px;box-shadow:0 14px 38px #0008}
body > #cloud-account-popover :is(a,button){min-height:38px;padding:10px 12px;color:#c4cbd0;font-size:13px}
body > #cloud-account-popover :is(a,button):focus-visible{outline:1px solid #b6a078;outline-offset:-2px}

/* Version follows the account button without being clipped by the nav's
   horizontal scroller. Wide desktop tools share its distance from the rule. */
body>.version.pc-account-version{position:fixed!important;z-index:49!important;display:block;width:max-content!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#64717a!important;opacity:.8!important;font:650 9px/12px system-ui!important;letter-spacing:.03em;text-align:right;pointer-events:none}
body>.version.pc-account-version[hidden]{display:none!important}
@media(min-width:1600px){body .topbar #pcTopbarActions{align-self:flex-end!important;margin-bottom:7px!important;padding-bottom:0!important}}
@media(max-width:1599px){body .topbar #pcTopbarActions{padding-bottom:18px!important}}
