/* ==========================================================================
   ADMIN CONSOLE — 논리 도구 (admin-logic-tools.css)
   생년월일 입력(.bi-*), 글자 최소 11pt, 계산 기반(.lo-*), 사주검증 달력 측정(.cal-*), 사이드바 접기, 해석 관점 뱃지·전체 항목 지도
   admin.css 스택의 일부 — 로드 순서는 admin.css 머리 주석 참조. 규칙 순서를 바꾸지 않는다.
   ========================================================================== */

/* --------------------------------------------------------------------------
   생년월일 입력 — 숫자 타이핑과 달력 클릭을 같은 칸에서 받는다.
   -------------------------------------------------------------------------- */
.birth-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.bi-field {
  font-size: 11pt;
  color: #b8a7d4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bi-combo {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.bi-combo .form-input { width: 152px; }
.bi-combo .form-input.is-bad { border-color: var(--neon-yellow); }
.bi-pick {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-box-purple);
  background: var(--bg-card-inner);
  color: var(--text-sub);
  cursor: pointer;
  font-size: 11pt;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bi-pick:hover { background: rgba(0, 229, 255, 0.15); border-color: var(--neon-cyan); }
.bi-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  right: 0;
  top: 0;
}
.bi-hint { font-size: 11pt; color: var(--text-muted); }
.bi-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-box-purple);
  border-radius: 8px;
}
.bi-seg button {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  font-size: 11pt;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.bi-seg button.is-on {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
}

/* 관리자 글자 최소 11pt — theme.css의 .theme-switch 축약 font(12px)보다 우선한다. */
.admin-shell .theme-switch { font-size: 11pt; }

/* 관리자 글자 최소 11pt — 브라우저 기본 컨트롤 글자(13.3px)만 끌어올린다. :where라 클래스 규칙을 덮지 않는다. */
:where(.admin-shell) :where(button, input, select, textarea) { font-size: 11pt; }
/* 천문 보정 탭 — 짧은 안내문·출생지 보정 카드·서머타임 구간표 접기 */
.astro-note { margin: 4px 0 0; color: var(--text-sub); font-size: 11pt; line-height: 1.6; }
.astro-note.is-sub { color: var(--text-muted); }
.astro-city-guide {
  padding: 12px 14px;
  border: 1px solid var(--border-box-purple);
  border-radius: 10px;
  background: var(--bg-card-inner);
  color: var(--text-sub);
  font-size: 11pt;
}
.astro-city-guide dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
}
.astro-city-guide dt { color: var(--text-muted); font-weight: 700; }
.astro-city-guide dd { margin: 0; color: var(--text-pure); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.astro-details summary { cursor: pointer; color: var(--neon-cyan); font-size: 11pt; font-weight: 700; }
.astro-details[open] summary { margin-bottom: 8px; }

/* --------------------------------------------------------------------------
   ② 개념·구성 › 계산 기반 — 핵심은 배지·흐름·칩으로 짧게, 긴 내용은 접는다(보기 전용)
   -------------------------------------------------------------------------- */
.lo-status { margin: 0; color: var(--text-muted); font-size: 11pt; }
.lo-section .panel-header { margin-bottom: 12px; }
.lo-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--border-box-purple); border-radius: var(--radius-pill); background: var(--bg-card-inner); color: var(--text-sub); font-size: 11pt; font-weight: 700; line-height: 1.5; white-space: normal; }
.lo-badge.is-on { border-color: color-mix(in srgb, var(--neon-lime) 55%, transparent); color: var(--neon-lime); }
.lo-badge.is-off { border-color: color-mix(in srgb, var(--neon-pink) 55%, transparent); color: var(--neon-pink); }
.lo-badge.is-set { border-color: color-mix(in srgb, var(--neon-cyan) 55%, transparent); color: var(--neon-cyan); }
.lo-badge.is-hold { border-color: color-mix(in srgb, var(--neon-yellow) 55%, transparent); color: var(--neon-yellow); }
.lo-badge-row { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.lo-note a { color: var(--neon-cyan); font-weight: 700; text-decoration: none; }
.lo-note a:hover { text-decoration: underline; }
.lo-note { margin: 8px 0 0; color: var(--text-muted); font-size: 11pt; line-height: 1.6; overflow-wrap: anywhere; }
.lo-line { margin: 4px 0; color: var(--text-sub); font-size: 11pt; line-height: 1.6; }
.lo-subhead { margin: 14px 0 8px; color: var(--text-pure); font-size: 11pt; font-weight: 800; }
.lo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.lo-card { min-width: 0; padding: 10px 12px; border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); }
.lo-card-title { color: var(--text-pure); font-size: 11pt; }
.lo-members { margin: 4px 0 0; color: var(--text-muted); font-size: 11pt; line-height: 1.5; }

.lo-axis { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.lo-axis-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; }
.lo-axis-label { color: var(--text-pure); font-size: 11pt; font-weight: 700; }
.lo-track { position: relative; height: 24px; border-radius: 7px; background: color-mix(in srgb, var(--border-box-purple) 35%, transparent); overflow: hidden; }
.lo-track.is-ticks { height: 22px; background: none; overflow: visible; }
.lo-seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; padding: 0 4px; border-right: 2px solid var(--bg-box); overflow: hidden; }
.lo-seg-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: 11pt; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.lo-seg.is-external, .lo-seg.is-guaranteed, .lo-key.is-external { background: color-mix(in srgb, var(--neon-lime) 55%, #1b6b3a); }
.lo-seg.is-cross, .lo-seg.is-extended, .lo-key.is-cross { background: color-mix(in srgb, var(--neon-yellow) 50%, #7a5a00); }
.lo-seg.is-formula, .lo-seg.is-independent, .lo-key.is-formula { background: color-mix(in srgb, var(--neon-cyan) 50%, #0b5561); }
.lo-seg.is-reference { background: color-mix(in srgb, var(--text-muted) 60%, #3a2e47); }
.lo-tick { position: absolute; top: 2px; transform: translateX(-50%); color: var(--text-muted); font-size: 11pt; font-variant-numeric: tabular-nums; }
.lo-tick:first-child { transform: none; }
.lo-tick:last-child { transform: translateX(-100%); }
.lo-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.lo-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

.lo-flow, .lo-chipset { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lo-chip-item { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); color: var(--text-pure); font-size: 11pt; font-weight: 700; line-height: 1.5; }
.lo-flow .lo-chip-item { position: relative; }
.lo-flow .lo-chip-item:not(:last-child)::after { content: "→"; margin-left: 4px; color: var(--text-muted); font-weight: 400; }
.lo-flow-no { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); color: var(--text-on-neon); font-size: 11pt; font-weight: 800; }

.lo-folds { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.lo-fold { border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); }
.lo-fold > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 12px; color: var(--neon-cyan); font-size: 11pt; font-weight: 700; cursor: pointer; list-style: none; }
.lo-fold > summary::-webkit-details-marker { display: none; }
.lo-fold > summary::before { content: "▶"; font-size: 11pt; transition: transform .15s ease; }
.lo-fold[open] > summary::before { transform: rotate(90deg); }
.lo-fold > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--neon-cyan) 45%, transparent); outline-offset: 2px; }
.lo-fold-body { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; min-width: 0; }
.expr-check-reference { margin-bottom: 14px; }
.expr-check-reference > summary { position: sticky; top: 0; z-index: 2; background: var(--bg-card-inner); border-radius: 8px; }
.expr-check-scopes { display: flex; flex-wrap: wrap; gap: 7px; }
.expr-check-scope { padding: 6px 9px; border: 1px solid var(--border-box-purple); border-radius: 8px; color: var(--text-sub); font-size: 10pt; }
.expr-check-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.expr-check-group { min-width: 0; padding: 10px 12px; border: 1px solid var(--border-box-purple); border-radius: 9px; }
.expr-check-group h4 { margin: 0 0 4px; color: var(--text-pure); font-size: 11pt; }
.expr-check-group h4 span { margin-left: 4px; color: var(--text-muted); font-size: 10pt; font-weight: 400; }
.expr-check-group p { margin: 0 0 8px; color: var(--text-sub); font-size: 10pt; line-height: 1.45; }
.expr-check-group ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.expr-check-group li { display: grid; gap: 2px; padding-top: 7px; border-top: 1px solid var(--border-box-purple); font-size: 10pt; line-height: 1.4; }
.expr-check-group li strong { color: var(--text-pure); }
.expr-check-group li span { color: var(--text-sub); }
@media (max-width: 900px) { .expr-check-groups { grid-template-columns: 1fr; } }
.lo-preview-label { color: var(--text-sub); font-size: 11pt; font-weight: 700; }
.lo-preview-select { width: auto; max-width: 100%; font-size: 11pt; font-weight: 600; }
.lo-deflist { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 11pt; line-height: 1.6; }
.lo-deflist dt { color: var(--text-pure); font-weight: 700; }
.lo-deflist dd { margin: 0; color: var(--text-sub); overflow-wrap: anywhere; }
.lo-desc-list { margin: 0; padding-left: 20px; color: var(--text-sub); font-size: 11pt; line-height: 1.7; }
.lo-desc-list b { color: var(--text-pure); }
.lo-table-wrap { overflow-x: auto; max-width: 100%; }
.lo-table { width: 100%; font-size: 11pt; }
.lo-table th, .lo-table td { vertical-align: top; }
.lo-table td { min-width: 96px; }
.lo-table .lo-verdict { min-width: 260px; }

@media (max-width: 768px) {
  .lo-axis-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lo-axis-row.is-ticks .lo-axis-label { display: none; }
  .lo-tick.is-minor { display: none; }
  .lo-deflist { grid-template-columns: minmax(0, 1fr); }
  .lo-table thead { display: none; }
  .lo-table, .lo-table tbody, .lo-table tr, .lo-table td { display: block; width: 100%; min-width: 0; }
  .lo-table tr { box-sizing: border-box; margin-bottom: 10px; border: 1px solid var(--border-box-purple); border-radius: 10px; padding: 6px 10px; }
  .lo-table td { box-sizing: border-box; min-width: 0; border: 0; padding: 3px 0; white-space: normal; overflow-wrap: anywhere; }
  .lo-table td::before { content: attr(data-label) " · "; color: var(--text-muted); font-weight: 700; }
  .lo-table .lo-verdict { min-width: 0; }
}

/* ① 설계·정책 › 서비스 가중치 — 서비스 4개(속마음·타이밍·궁합·재회) 가중치를 각각 테두리 상자로 나눈다. */
.weight-service-box { min-width: 0; padding: 12px 14px; border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); line-height: 1.7; }

/* --------------------------------------------------------------------------
   사주검증 › 달력 측정 — 머리(달 이름 + 년주·월주 뱃지), 도구 줄 둘(날짜 찾기 / 윤달 찾기), 범례 뱃지, 달력 칸, 선택한 날
   -------------------------------------------------------------------------- */
.cal-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--border-box-purple) 70%, transparent); }
.cal-head .panel-title { margin: 0; }
.cal-head-month { margin: 6px 0 0; color: var(--text-pure); font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.cal-head-sub { margin: 2px 0 0; color: var(--text-muted); font-size: 11pt; }
.cal-pillars { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: 100%; }
.cal-pillar-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 5px 12px; border: 1px solid var(--border-box-purple); border-radius: var(--radius-pill); background: var(--bg-card-inner); color: var(--text-pure); font-size: 11pt; line-height: 1.4; }
.cal-pillar-badge.is-year { border-color: color-mix(in srgb, var(--neon-pink) 60%, transparent); }
.cal-pillar-badge.is-month { border-color: color-mix(in srgb, var(--neon-cyan) 60%, transparent); }
.cal-pillar-part { display: inline-flex; align-items: baseline; gap: 4px; }
.cal-pillar-emoji { font-size: 16px; }
.cal-pillar-han { color: var(--text-muted); font-weight: 700; }
.cal-pillar-when { color: var(--text-muted); font-size: 11pt; }
.cal-pillar-arrow { color: var(--text-muted); }

.cal-toolbars { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); }
.cal-toolbar.is-leap { border-color: color-mix(in srgb, var(--neon-yellow) 45%, transparent); }
.cal-toolbar-label { flex: 0 0 auto; min-width: 92px; color: var(--text-pure); font-size: 11pt; font-weight: 800; }
.cal-toolbar-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.cal-btn-group { display: inline-flex; }
.cal-btn-group .cal-btn:first-child { border-radius: 8px 0 0 8px; }
.cal-btn-group .cal-btn:last-child { border-radius: 0 8px 8px 0; margin-left: -1px; }
.cal-btn { min-height: 34px; padding: 4px 12px; border: 1px solid var(--border-box-purple); border-radius: 8px; background: var(--bg-box); color: var(--text-pure); font: 700 11pt/1.2 var(--font-main); cursor: pointer; white-space: nowrap; }
.cal-btn:hover:not(:disabled) { border-color: var(--neon-cyan); }
.cal-btn:disabled { opacity: .45; cursor: default; }
.cal-btn.is-primary { border-color: transparent; background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); color: var(--text-on-neon); }
.cal-btn:focus-visible, .cal-input:focus-visible, .cal-legend-chip:focus-visible, .cal-cell:focus-visible { outline: 3px solid color-mix(in srgb, var(--neon-cyan) 45%, transparent); outline-offset: 2px; }
.cal-field { display: inline-flex; align-items: center; gap: 4px; color: var(--text-sub); font-size: 11pt; font-weight: 700; }
.cal-input { min-height: 34px; padding: 4px 8px; border: 1px solid var(--border-box-purple); border-radius: 8px; background: var(--bg-box); color: var(--text-pure); font: 700 11pt/1.2 var(--font-main); font-variant-numeric: tabular-nums; }
.cal-input.is-year { width: 84px; }
.cal-input.is-month { width: 60px; }
.cal-input.is-date { width: 128px; }
.cal-divider { width: 1px; height: 22px; margin: 0 4px; background: var(--border-box-purple); }
.cal-leap-now { padding: 3px 10px; border-radius: var(--radius-pill); color: var(--text-muted); font-size: 11pt; font-weight: 700; }
.cal-leap-now.is-on { color: var(--neon-yellow); background: color-mix(in srgb, var(--neon-yellow) 12%, transparent); }
.cal-error { margin: 8px 0 0; color: var(--neon-pink); font-size: 11pt; font-weight: 700; }

.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; margin-top: 10px; }
.cal-legend-chip { display: inline-flex; align-items: center; padding: 1px 9px; border: 1px solid var(--border-box-purple); border-radius: var(--radius-pill); background: var(--bg-card-inner); color: var(--text-pure); font: 700 11pt/1.5 var(--font-main); white-space: nowrap; cursor: pointer; }
.cal-legend-chip[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.cal-legend-chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--neon-cyan) 70%, transparent); }
.cal-legend-guide { flex-basis: 100%; margin: 2px 0 0; color: var(--text-muted); font-size: 11pt; line-height: 1.5; }

.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; margin-top: 12px; }
.cal-weekday { padding: 6px 0; border-bottom: 2px solid color-mix(in srgb, var(--border-box-purple) 80%, transparent); color: var(--text-sub); font-size: 11pt; font-weight: 800; text-align: center; }
.cal-weekday.is-red, .cal-cell.is-red .cal-day { color: var(--neon-pink); }
.cal-weekday.is-blue, .cal-cell.is-blue .cal-day { color: var(--neon-cyan); }
.cal-blank { min-height: 108px; border-radius: 10px; background: color-mix(in srgb, var(--bg-card-inner) 40%, transparent); }
.cal-cell { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 0; min-height: 108px; padding: 6px 8px; border: 1px solid color-mix(in srgb, var(--border-box-purple) 85%, transparent); border-radius: 10px; background: var(--bg-card-inner); color: var(--text-sub); font: 500 11pt/1.35 var(--font-main); text-align: left; cursor: pointer; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.cal-cell:hover { border-color: color-mix(in srgb, var(--neon-cyan) 65%, transparent); transform: translateY(-1px); }
.cal-cell[aria-pressed="true"] { border-color: var(--neon-cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--neon-cyan) 55%, transparent) inset; }
.cal-cell.is-today { background: color-mix(in srgb, var(--neon-purple) 18%, var(--bg-card-inner)); }
.cal-cell.is-leap { border-style: dashed; border-color: var(--neon-yellow); }
.cal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.cal-day-wrap { display: inline-flex; align-items: baseline; gap: 4px; }
.cal-day { color: var(--text-pure); font-size: 18px; font-weight: 800; line-height: 1.1; }
.cal-today-tag { padding: 0 6px; border-radius: var(--radius-pill); background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple)); color: var(--text-on-neon); font-size: 11pt; font-weight: 800; }
.cal-pillar { color: var(--text-muted); font-size: 11pt; white-space: nowrap; }
.cal-lunar { color: var(--text-muted); font-size: 11pt; white-space: nowrap; }
.cal-lunar.is-first { color: var(--text-pure); font-weight: 800; }
.cal-lunar.is-leap { color: var(--neon-yellow); font-weight: 800; }
.cal-line { display: flex; gap: 3px; min-width: 0; font-size: 11pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-name { overflow: hidden; text-overflow: ellipsis; }
.cal-term { color: var(--neon-cyan); }
.cal-term.is-month { font-weight: 800; }
.cal-ev.is-holiday { color: var(--neon-pink); font-weight: 700; }
.cal-ev.is-festival { color: var(--neon-yellow); }
.cal-ev.is-projection .cal-ev-name { text-decoration: underline dashed; text-underline-offset: 3px; }
.cal-bottom-row { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; margin-top: auto; }
.cal-icons { flex: 1 1 auto; min-width: 0; margin-top: 0; overflow: hidden; font-size: 11pt; letter-spacing: 1px; text-overflow: ellipsis; white-space: nowrap; }
.cal-zodiac { flex: 0 0 auto; margin-left: auto; font-size: 16px; line-height: 1; }

.cal-detail { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--border-box-purple); border-radius: 10px; background: var(--bg-card-inner); }
.cal-detail-head { margin: 0 0 8px; color: var(--text-pure); font-size: 11pt; font-weight: 800; }
.cal-detail-pillars { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cal-detail-pillar { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border: 1px solid var(--border-box-purple); border-radius: 8px; color: var(--text-sub); font-size: 11pt; }
.cal-detail-pillar small { color: var(--text-muted); font-size: 11pt; }
.cal-detail-pillar b { color: var(--text-pure); font-size: 16px; }
.cal-detail-list { margin: 0; padding-left: 18px; color: var(--text-sub); font-size: 11pt; line-height: 1.7; }
.cal-detail-list b { color: var(--text-pure); }

@media (max-width: 768px) {
  .cal-pillars { justify-content: flex-start; }
  .cal-toolbar-label { min-width: 0; flex-basis: 100%; }
  .cal-divider { display: none; }
  .cal-grid { gap: 2px; }
  .cal-cell, .cal-blank { min-height: 66px; }
  .cal-cell { padding: 3px; }
  .cal-day { font-size: 16px; }
  .cal-today-tag, .cal-pillar, .cal-ev-name { display: none; }
  .cal-cell.is-today .cal-day { text-decoration: underline; }
  .cal-lunar { letter-spacing: -.5px; }
  .cal-bottom-row { gap: 1px; }
  .cal-icons { font-size: 10px; }
  .cal-zodiac { font-size: 14px; }
}

/* --------------------------------------------------------------------------
   사이드바 접기(데스크톱) — 아이콘만 남겨 본문 폭을 확보한다. 모바일(≤992px)은 기존 ☰ 오버레이를 쓴다.
   -------------------------------------------------------------------------- */
.btn-sidebar-collapse {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; margin-left: auto; padding: 0;
  border: 1px solid var(--border-box-purple); border-radius: 8px;
  background: var(--bg-card-inner); color: var(--text-sub); cursor: pointer;
}
.btn-sidebar-collapse:hover { color: var(--text-pure); border-color: var(--neon-cyan); }
.btn-sidebar-collapse:focus-visible { outline: 3px solid color-mix(in srgb, var(--neon-cyan) 45%, transparent); outline-offset: 2px; }
.btn-sidebar-collapse .collapse-chevron { transition: transform .2s ease; transform-origin: 14.5px 12px; }

@media (min-width: 993px) {
  .admin-sidebar { transition: width .2s ease; }
  body.sidebar-collapsed .admin-sidebar { width: 72px; }
  body.sidebar-collapsed .sidebar-header { flex-direction: column; justify-content: center; padding: 14px 8px; }
  body.sidebar-collapsed .sidebar-brand,
  body.sidebar-collapsed .sidebar-badge,
  body.sidebar-collapsed .admin-meta,
  body.sidebar-collapsed .btn-home-link { display: none; }
  body.sidebar-collapsed .btn-sidebar-collapse { margin-left: 0; }
  body.sidebar-collapsed .btn-sidebar-collapse .collapse-chevron { transform: scaleX(-1); }
  body.sidebar-collapsed .sidebar-nav { padding: 10px 6px 14px; }
  body.sidebar-collapsed .nav-category { height: 1px; margin: 10px 8px; padding: 0; overflow: hidden; color: transparent; background: var(--border-box-purple); }
  body.sidebar-collapsed .nav-item { position: relative; justify-content: center; padding: 9px 0; }
  body.sidebar-collapsed .nav-item > span {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  body.sidebar-collapsed .sidebar-footer { justify-content: center; padding: 12px 6px; }
}
.nav-step {
  display: none; width: 100%; padding: 4px 0; flex-shrink: 0;
  border: 0; border-top: 1px solid color-mix(in srgb, var(--border-box-purple) 70%, transparent);
  background: var(--bg-card-inner); color: var(--text-sub); font-size: 11pt; line-height: 1; cursor: pointer;
}
.nav-step:hover:not(:disabled) { color: var(--text-pure); background: color-mix(in srgb, var(--neon-cyan) 12%, var(--bg-card-inner)); }
.nav-step:disabled { color: color-mix(in srgb, var(--text-muted) 60%, transparent); cursor: default; }
.nav-step:focus-visible { outline: 3px solid color-mix(in srgb, var(--neon-cyan) 45%, transparent); outline-offset: -3px; }
#nav-step-up { border-top: 0; border-bottom: 1px solid color-mix(in srgb, var(--border-box-purple) 70%, transparent); }
body.sidebar-collapsed .nav-step:not([hidden]) { display: block; }
/* 접힌 메뉴는 버튼으로 옮기므로 스크롤 막대를 두지 않는다 */
body.sidebar-collapsed .sidebar-nav { overflow-y: hidden; scrollbar-width: none; }
body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar { display: none; }

@media (max-width: 992px) {
  .btn-sidebar-collapse { display: none; }
  .nav-step { display: none !important; }
}

/* 사주검증 › 두 사람 계산 — 명식 카드 맨 아래 보정·기준 뱃지 한 줄(긴 설명은 툴팁) */
.probe-badges { display: flex; flex-wrap: wrap; gap: 5px 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--border-box-purple) 70%, transparent); }
.probe-badges .lo-badge { cursor: help; }

/* ③ 해석 관리 › 해석 항목의 기준 관점 뱃지, ② 개념·구성 › 궁합 체계 설계안 */
.s1-lens { background: rgba(131, 56, 236, .16); color: var(--text-pure); border-color: rgba(131, 56, 236, .4); }
/* 관점군(기초·구조·기세와 때·상징·의견)마다 색을 달리해 학파 차이를 눈으로 구분한다(정책 school_difference_display) */
.s1-lens.fam-neutral   { background: rgba(255, 255, 255, .07); color: #d7cdea; border-color: rgba(255, 255, 255, .2); }
.s1-lens.fam-structure { background: rgba(131, 56, 236, .18); color: #cbaaff; border-color: rgba(131, 56, 236, .45); }
.s1-lens.fam-flow      { background: rgba(0, 229, 255, .14); color: #7fe7e0; border-color: rgba(0, 229, 255, .38); }
.s1-lens.fam-symbol    { background: rgba(255, 176, 59, .15); color: #ffc46b; border-color: rgba(255, 176, 59, .38); }
.s1-lens.fam-opinion   { background: rgba(160, 160, 176, .12); color: #b9b4c6; border-color: rgba(160, 160, 176, .34); border-style: dashed; }
.s1-split { background: rgba(255, 122, 184, .14); color: #ff9ec8; border-color: rgba(255, 122, 184, .4); font-weight: 700; }
.s1-legend-group { display: block; margin-top: 4px; }

/* ③ 해석 관리 › 전체 항목 지도 — 항목 하나가 뱃지 줄바꿈의 경계를 소유한다. */
.s1-map-block {
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-box-purple) 88%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-card-inner) 78%, transparent);
}
.s1-map-block:last-child { margin-bottom: 0; }
.s1-map-block-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  color: var(--text-pure);
  cursor: pointer;
  list-style: none;
}
.s1-map-block-summary::-webkit-details-marker { display: none; }
.s1-map-block-summary::before {
  content: '⌄';
  flex: 0 0 1.1em;
  color: var(--neon-cyan);
  font-size: 16px;
  line-height: 1;
  text-align: center;
  transition: transform .15s ease;
}
.s1-map-block[open] > .s1-map-block-summary::before { transform: rotate(180deg); }
.s1-map-block-summary:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: -2px;
}
.s1-map-block-title {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.s1-map-block-count { color: var(--text-muted); font-size: 11pt; font-weight: 500; }
.s1-map-block-summary > .s1-badge { flex: 0 0 auto; margin: 0; }
.s1-concept-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 10px 10px;
  list-style: none;
}
.s1-concept-item {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border: 1px solid color-mix(in srgb, var(--border-box-purple) 72%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-card) 82%, transparent);
}
.s1-concept-item.is-unready { opacity: .64; }
.s1-concept-marker {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--neon-cyan) 55%, var(--border-box-purple));
  border-radius: 50%;
  background: color-mix(in srgb, var(--neon-cyan) 12%, var(--bg-card-inner));
  color: var(--neon-cyan);
  font-size: 10pt;
  font-weight: 800;
  line-height: 1;
}
.s1-concept-content {
  display: grid;
  grid-template-columns: minmax(11rem, .7fr) minmax(0, 1.8fr);
  gap: 10px 16px;
  align-items: center;
  min-width: 0;
}
.s1-concept-label {
  min-width: 0;
  color: var(--text-pure);
  font-size: 11pt;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.s1-concept-badges {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--border-box-purple) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-card-inner) 74%, transparent);
}
.s1-concept-badges:empty { display: none; }
.s1-concept-badges .s1-badge { margin: 0; line-height: 1.4; }

@media (max-width: 640px) {
  .s1-map-block-summary { align-items: flex-start; padding: 10px 11px; }
  .s1-map-block-summary > .s1-badge { white-space: normal; text-align: right; }
  .s1-concept-list { padding: 0 7px 7px; }
  .s1-concept-item { grid-template-columns: 1.9rem minmax(0, 1fr); gap: 8px 9px; padding: 9px; }
  .s1-concept-marker { width: 1.8rem; height: 1.8rem; }
  .s1-concept-content { grid-template-columns: 1fr; gap: 7px; }
}
