/* ==========================================================================
   운영정책 (policy.html — docs/build_policy_page.py 가 생성) · 2003 감성 상자 위에
   왼쪽 목차(따라 내려옴) | 오른쪽 장별 상자 · 제재 기준표는 구분별 묶음 + 차수 색 딱지
   ========================================================================== */
.pl-page .page-body > .container { width: min(1180px, 100% - 32px); }
body[data-page="policy"] { --hero-npc: url("/img/npc/admin.png"); }
.pl-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 14px; align-items: start; }

/* 목차 */
.pl-toc { position: sticky; top: calc(var(--nav-h) + 12px); max-height: calc(100vh - var(--nav-h) - 24px); overflow: auto; }
.pl-toc ol { list-style: none; margin: 0; padding: 6px 10px 10px; }
.pl-toc li { margin: 0; }
.pl-toc a { display: block; padding: 4px 6px; border-radius: 2px; font-size: 12px; line-height: 1.6; color: #444; text-decoration: none; }
.pl-toc a:hover { color: var(--rt-head); background: #fbf5ef; }
.pl-toc a b { color: var(--rt-head); }
.pl-toc ul { list-style: none; margin: 0 0 4px; padding: 0 0 0 14px; border-left: 1px dotted #d6d6d6; margin-left: 10px; }
.pl-toc ul a { color: #777; }

/* 본문 상자 */
.pl-content { display: grid; gap: 12px; min-width: 0; }
.pl-lead { padding: 14px 16px; font-size: 12px; line-height: 1.9; color: #444; background: #fffdf6; border-color: #e6d6b3; }
.pl-lead p { margin: 0; }
.pl-sec { scroll-margin-top: calc(var(--nav-h) + 12px); }
.pl-sec .mw-head h2 { display: flex; align-items: center; gap: 8px; }
.pl-num { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 2px; background: var(--rt-head); color: #fff; font-family: "Galmuri11"; font-size: 12px; text-shadow: none; }
.pl-body { padding: 10px 16px 16px; font-size: 12px; line-height: 1.9; color: #333; }
.pl-body p { margin: 0 0 8px; }
.pl-body h3 { scroll-margin-top: calc(var(--nav-h) + 12px); margin: 14px 0 6px; padding: 4px 0 4px 10px; font-family: "Galmuri11"; font-weight: 700; font-size: 12px; color: #1d3766; border-left: 3px solid var(--rt-head); background: linear-gradient(90deg, #f5f8fd, transparent); }
.pl-body h3:first-child { margin-top: 0; }
.pl-list { list-style: none; margin: 0 0 6px; padding: 0; }
.pl-list > li { position: relative; padding: 6px 0 6px 14px; border-top: 1px dotted #e1e1e1; }
.pl-list > li:first-child { border-top: 0; }
.pl-list > li::before { content: "▶"; position: absolute; left: 0; top: 7px; font-size: 8px; color: var(--rt-head); }
.pl-list > li.has-term { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
.pl-term { color: #1d3766; }
.pl-steps { margin: 6px 0 2px; padding-left: 22px; }
.pl-steps li { margin: 2px 0; }
.pl-body strong { color: #c2410c; }
.pl-term, .pl-cat { color: #1d3766 !important; }

/* 딱지 색 안내 */
.pl-legend { list-style: none; margin: 0 0 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; background: #f7f7f7; border: 1px solid #e2e2e2; border-radius: 3px; }
.pl-legend li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #666; }

/* 제재 딱지 */
.pn { display: inline-block; min-width: 62px; padding: 1px 6px; border-radius: 2px; font-size: 12px; line-height: 1.5; text-align: center; white-space: nowrap; color: #fff; }
.pn-warn { background: #e8b100; color: #3d2c00; }
.pn-chat { background: #4f86d6; }
.pn-d1 { background: #f0962e; }
.pn-d2 { background: #e0682a; }
.pn-d3 { background: #c2410c; }
.pn-perm { background: #b3261e; box-shadow: inset 0 0 0 1px #7a120c; }
.pn-etc { background: #8a8a8a; }
.pn-none { min-width: 0; padding: 0; color: #c4c4c4; background: none; }

/* 제재 기준표 */
.pl-table-wrap { overflow-x: auto; border: 1px solid #c9c9c9; border-radius: 3px; }
.pl-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 12px; line-height: 1.6; }
.pl-table thead th { position: sticky; top: 0; z-index: 1; padding: 6px 8px; font-weight: 700; color: #fff; background: #5a6f92; border-right: 1px solid #7487a7; text-align: center; white-space: nowrap; }
.pl-table thead th.c-type, .pl-table thead th.c-extra { text-align: left; }
.pl-table td, .pl-table tbody th { padding: 6px 8px; border-top: 1px solid #e3e3e3; vertical-align: middle; }
.pl-table tbody th.c-cat { width: 120px; text-align: left; font-weight: 700; background: #f2f5fa; border-right: 1px solid #dfe5ee; }
.pl-group.is-alt tbody th, .pl-group.is-alt th.c-cat { background: #edf1f7; }
.pl-table tbody tr:hover td { background: #fbf5ef; }
.pl-table td.c-stage { text-align: center; width: 88px; }
.pl-table td.c-type { min-width: 220px; }
.pl-table td.c-extra { color: #555; min-width: 200px; }
.pl-code { display: inline-block; min-width: 34px; margin-right: 6px; color: #999; font-variant-numeric: tabular-nums; }
.pl-group + .pl-group tr:first-child td, .pl-group + .pl-group tr:first-child th { border-top: 2px solid #c9d3e2; }

/* 부칙 */
.pl-annex { padding: 12px 16px; border: 1px solid #c9c9c9; border-radius: 5px; background: #f7f7f7; font-size: 12px; color: #555; }
.pl-annex strong { display: block; margin-bottom: 2px; color: #333; }
.pl-annex p { margin: 0; }

/* 좁은 화면: 목차는 위, 표는 줄마다 카드 */
@media (max-width: 900px) {
  .pl-layout { grid-template-columns: minmax(0, 1fr); }
  .pl-toc { position: static; max-height: none; }
  .pl-toc > ol { columns: 2; column-gap: 10px; }
  .pl-toc ul { display: none; }
}
@media (max-width: 700px) {
  .pl-list > li.has-term { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pl-table-wrap { overflow: visible; border: 0; }
  .pl-table, .pl-table thead, .pl-table tbody, .pl-table tr, .pl-table td, .pl-table th { display: block; min-width: 0; width: auto; }
  .pl-table { min-width: 0; }
  .pl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pl-table tbody th.c-cat { display: none; }
  .pl-table tr { margin: 0 0 8px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; overflow: hidden; }
  .pl-table td { border-top: 1px dotted #e1e1e1; }
  .pl-table td.c-type { border-top: 0; background: #f2f5fa; font-weight: 700; }
  .pl-table td.c-type::before { content: attr(data-cat); display: block; font-weight: 400; color: #e0531f; }
  .pl-table td.c-stage, .pl-table td.c-extra { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: right; }
  .pl-table td.c-stage::before, .pl-table td.c-extra::before { content: attr(data-label); flex: none; color: #777; font-weight: 700; text-align: left; }
  .pl-table td.c-extra { align-items: flex-start; }
  .pl-group + .pl-group tr:first-child td { border-top: 1px dotted #e1e1e1; }
  .pl-group + .pl-group tr:first-child td.c-type { border-top: 0; }
  .pl-toc > ol { columns: 1; }
}
@media (max-width: 700px) {
  .pl-table td.c-stage { width: auto; }
  .pl-table td.c-stage .pn { min-width: 84px; }
}

/* 2026-11-06: 게임 / 디스코드 운영정책 탭, 묶음 목록 */
.pl-tabs { margin-bottom: 0; }
.pl-tabs + .pl-layout { margin-top: 0; }
.pl-tabs .tab-btn { text-decoration: none; }
body[data-policy="discord"] { --hero-npc: url("/img/npc/cassandra.png"); }
.pl-list > li.has-group { padding-top: 8px; }
.pl-group-title { display: block; margin-bottom: 2px; color: #1d3766 !important; }
.pl-sublist { list-style: none; margin: 2px 0 2px; padding: 0 0 0 4px; }
.pl-sublist li { position: relative; padding: 2px 0 2px 12px; color: #444; }
.pl-sublist li::before { content: "·"; position: absolute; left: 2px; top: 1px; font-weight: 700; color: #999; }
.pl-body a { color: var(--rt-link); word-break: break-all; }
