.msc-wrap{
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  color: #111;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  overflow-x: hidden;
}


.msc-card{
  width: 100%;
  background: #fff;
  border: 1px solid #111;
  border-radius: 14px;
  padding: 22px 20px;
box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.msc-title{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.2px;
  padding-bottom: 12px;
  border-bottom: 2px solid #111;
  margin-bottom: 16px;
}
.msc-subcard{
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.msc-kv{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
}
.msc-k{
  display: inline-block;
  min-width: 72px;
  font-weight: 700;
}
.msc-v{ opacity: 0.92; }

.msc-form{
  display: grid;
  gap: 14px;
}
.msc-field label{
  display:block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.msc-field input[type="date"],
.msc-field input[type="time"],
.msc-select{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
}
.msc-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.msc-btn{
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px 14px;
  border: 2px solid #111;
  background: #111;
  color: #fff;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}
.msc-btn:hover{
  background: #fff;
  color: #111;
}
.msc-btn-secondary{
  background: #fff;
  color: #111;
}
.msc-btn-secondary:hover{
  background: #111;
  color: #fff;
}
.msc-note{
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.55;
  margin-top: 10px;
}
.msc-badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.msc-badge{ display:inline-block; padding:6px 10px; border:1px solid rgba(0,0,0,0.25); border-radius:999px; font-size:12px; font-weight:800; letter-spacing:-0.2px; }
.msc-badge--solid{ background:#111; color:#fff; border-color:#111; }

.msc-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px){
  .msc-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.msc-pillar{
  border: 1px solid rgba(0,0,0,0.20);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.msc-pillar-label{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.2px;
  opacity: 0.9;
  margin-bottom: 10px;
}
.msc-pillar-main{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 12px 0 8px;
  border-top: 1px solid rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(0,0,0,0.10);
}
.msc-stem, .msc-branch{
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}
.msc-branch{ opacity: 0.92; }
.msc-pillar-sub{
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.5;
}
.msc-meta{
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.70;
}

.msc-proof-title{
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}
.msc-proof{
  font-size: 13px;
  line-height: 1.65;
}
.msc-proof-box{
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,0.35);
  border-radius: 12px;
}

.msc-actions{
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.msc-section{
  margin-top: 18px;
  padding-top: 2px;
}
.msc-section-title{
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 10px;
}
.msc-body{
  font-size: 13px;
  line-height: 1.65;
  display: grid;
  gap: 10px;
}
.msc-paragraph{
  padding: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
}

.msc-table-wrap{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

/* For tables that must never show a horizontal scrollbar */
.msc-table-wrap--noscr{
  overflow-x: hidden;
}
.msc-table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.msc-table th, .msc-table td{
  border: 1px solid rgba(0,0,0,0.15);
  padding: 10px 8px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Element distribution table (목/화/토/금/수): keep 5 columns equal */
.msc-table--five th,
.msc-table--five td{
  width: 20%;
  text-align: center;
}

/* Ten-gods table: widen first 3 columns slightly, reduce last column */
.msc-table--ten-gods th:nth-child(1),
.msc-table--ten-gods td:nth-child(1){ width: 15%; }
.msc-table--ten-gods th:nth-child(2),
.msc-table--ten-gods td:nth-child(2){ width: 15%; }
.msc-table--ten-gods th:nth-child(3),
.msc-table--ten-gods td:nth-child(3){ width: 15%; }
.msc-table--ten-gods th:nth-child(4),
.msc-table--ten-gods td:nth-child(4){ width: 55%; text-align: left; }
.msc-table th{
  font-weight: 900;
}

.msc-mt{ margin-top: 14px; }
.msc-mt-lg{ margin-top: 18px; }

@media (max-width: 980px){
  .msc-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .msc-row{ grid-template-columns: 1fr; }
  .msc-grid{ grid-template-columns: 1fr; }
  .msc-card{ padding: 16px; }
}


/* Utility: hover black background + white text (use with secondary buttons) */
.msc-hover-invert:hover,
.msc-hover-invert:focus,
.msc-hover-invert:active{
  background: #111 !important;
  color: #fff !important;
}
.msc-hover-invert:hover *,
.msc-hover-invert:focus *,
.msc-hover-invert:active *{
  color: #fff !important;
}
a.msc-hover-invert:hover,
a.msc-hover-invert:focus{
  color: #fff !important;
}

/* Theme override guard for link hover colors */
a.msc-btn-secondary:hover{ color:#fff !important; }


/* Optional: full-bleed to viewport (use on wrapper if needed) */
.msc-fullbleed{ width:100vw; margin-left: calc(50% - 50vw); }


.msc-ads{
  width: 100%;
  min-height: 10px;
}


/* Layout guard: keep sidebar on the right in flex-based themes */
body.msc-has-manse #primary,
body.msc-has-manse .content-area,
body.msc-has-manse .site-content,
body.msc-has-manse .site-main{
  min-width: 0 !important;
}

/* Extra layout guard for common WP themes (Astra/OceanWP/GP/etc.) */
body.msc-has-manse #content,
body.msc-has-manse .ast-container,
body.msc-has-manse .ast-row,
body.msc-has-manse .oceanwp-content-layout,
body.msc-has-manse .oceanwp-content-left-sidebar,
body.msc-has-manse .oceanwp-content-right-sidebar{
  min-width: 0 !important;
}
body.msc-has-manse #primary,
body.msc-has-manse .content-area{
  overflow-x: hidden;
}

/* Ads/iframe guard: prevent fixed-width ad units from forcing layout to wrap */
.msc-result-ads{ max-width:100%; overflow:hidden; }
.msc-result-ads .msc-ads-inner{ display:block; transform-origin: top center; margin: 0 auto; max-width: 100%; }
.msc-result-ads ins,
.msc-result-ads iframe{
  max-width:100% !important;
}
