
.mss-shell{width:min(1400px,calc(100% - 32px));margin:0 auto;display:grid;gap:28px}
.mss-shell.no-sidebar{grid-template-columns:minmax(0,1fr)}
.mss-shell.has-sidebar{grid-template-columns:minmax(0,1fr) 300px}
.mss-main,.mss-sidebar{min-width:0}
@media(max-width:900px){
  .mss-shell,.mss-shell.has-sidebar{grid-template-columns:1fr;width:min(100% - 20px,1400px)}
}


/* v1.0.6
 * Marchive Site System이 직접 렌더링하는 페이지에서는
 * GeneratePress/기존 플러그인의 사이드바가 다시 나타나지 않게 정리합니다.
 * 새 MSS 사이드바(.mss-sidebar)는 유지합니다.
 */
body.mss-managed #right-sidebar,
body.mss-managed #left-sidebar,
body.mss-managed .widget-area:not(.mss-sidebar),
body.mss-managed aside#right-sidebar,
body.mss-managed aside#left-sidebar,
body.mss-managed .sidebar:not(.mss-sidebar){
  display:none !important;
}

/* 이전 Marchive Article Actual Layout이 footer에서 삽입되더라도 숨김 */
body.mss-page-article .mvactual-shell,
body.mss-page-article #mvactual-style{
  display:none !important;
}

/* 테마 본문 컨테이너가 옆 공간을 예약하지 않게 함 */
body.mss-managed #primary,
body.mss-managed .content-area,
body.mss-managed main.site-main{
  width:auto !important;
  max-width:none !important;
  float:none !important;
  margin-right:0 !important;
}

/* 새 시스템의 사이드바는 반드시 표시 */
body.mss-managed .mss-sidebar{
  display:block !important;
}


/* v1.0.7 failsafe
 * 옛 Article Actual Layout JS가 캐시에서 남아 실행되더라도
 * 새 MSS article 본문을 숨기지 못하게 복구합니다.
 */
body.mss-page-article .mart-card.mvactual-original-hidden,
body.mss-page-article .mart.mvactual-original-hidden,
body.mss-page-article .mss-main.mvactual-original-hidden{
  display:block !important;
}


/* v1.0.9 — actual article 완전 통합
 * 실제 글 페이지는 MSS shell/header/sidebar만 사용하고
 * GeneratePress/옛 Article Actual Layout의 잔여 레이아웃을 전부 제거합니다.
 */
body.mss-page-article{
  background:#f7f4ed !important;
}

/* v1.1.3 — 글페이지에서 과거 로그인/바둑판 floating UI가 MSS 코어 헤더와 겹치지 않게 제거 */
body.mss-page-article #pfm-auth-slot,
body.mss-page-article .pfm-floating-fallback,
body.mss-page-article .pfm-grid-button,
body.mss-page-article .pfm-floating-tools,
body.mss-page-article .pfm-auth-floating{display:none!important}


body.mss-page-article .site,
body.mss-page-article #page,
body.mss-page-article .site-content,
body.mss-page-article .grid-container,
body.mss-page-article .container{
  max-width:none !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
}

/* MSS가 만든 요소는 항상 우선 */
body.mss-page-article #marchive-common-header{
  display:block !important;
}

body.mss-page-article .mss-shell{
  display:grid !important;
  width:min(1400px,calc(100% - 32px)) !important;
  max-width:1400px !important;
  margin:0 auto !important;
  padding:18px 0 56px !important;
  grid-template-columns:minmax(0,1fr) 300px !important;
  gap:18px !important;
  align-items:start !important;
}

body.mss-page-article .mss-main,
body.mss-page-article .mss-sidebar{
  min-width:0 !important;
}

/* 옛 article 화면은 어떤 형태로 남아도 감춤 */
body.mss-page-article .mvactual-shell,
body.mss-page-article .mvactual-original-hidden,
body.mss-page-article .inside-article:not(.mart-card),
body.mss-page-article article.post:not(.mart-card),
body.mss-page-article .entry-header:not(.mart-card *),
body.mss-page-article .entry-content:not(.mart-content){
  display:none !important;
}

/* MSS actual article는 반드시 표시 */
body.mss-page-article .mart,
body.mss-page-article .mart-card,
body.mss-page-article .mart-content,
body.mss-page-article .mss-sidebar,
body.mss-page-article .marside{
  display:block !important;
}

/* theme sidebar/widget area 제거 */
body.mss-page-article #right-sidebar,
body.mss-page-article #left-sidebar,
body.mss-page-article .widget-area:not(.mss-sidebar),
body.mss-page-article aside.sidebar:not(.mss-sidebar){
  display:none !important;
}

@media(max-width:900px){
  body.mss-page-article .mss-shell{
    width:min(760px,calc(100% - 20px)) !important;
    grid-template-columns:1fr !important;
  }
}


/* v1.1.12 — 중분류 글목록(category) 폭을 1400px로 확정
 * 과거 People First Middle Hub 템플릿이 자체 1200px 래퍼를 가지고 있거나
 * MSS 직접 렌더링이 꺼져 있어도 글목록 화면만 좁아지지 않도록 합니다.
 */
body.category .site.grid-container,
body.category #page,
body.category .site-content,
body.category .content-area,
body.category main.site-main,
body.category .pfmh-shell,
body.category .pfmh-main{
  width:100% !important;
  max-width:none !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}
body.category .pfmh-layout,
body.archive.category .pfmh-layout,
body.mss-page-middle .pfmh-layout{
  width:min(1400px,calc(100% - 32px)) !important;
  max-width:1400px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  box-sizing:border-box !important;
}
body.category .pfmh-content,
body.category .pfmh-inner,
body.category .middle-page,
body.category .middle-inner{
  min-width:0 !important;
  max-width:none !important;
  box-sizing:border-box !important;
}
@media(max-width:900px){
  body.category .pfmh-layout,
  body.archive.category .pfmh-layout,
  body.mss-page-middle .pfmh-layout{
    width:min(100% - 20px,1400px) !important;
  }
}
