/*
 * 공개 페이지 inline style 외부 분리 — CSP `style-src 'self'` strict 전환 (admin chain 제외).
 *
 * 이 파일의 클래스는 디자이너 시안에 없는 영역 (flash/error message, error 페이지,
 * stats/detail, layout fragment 등) + 시안에 있던 inline `style="..."` 의 외부화에 사용.
 *
 * 디자이너 다음 시안과 충돌 없도록 의미 있는 BEM 식 이름 + 영역별 prefix 사용.
 */

/* === 공통 alert / message ===
 *   .alert / .alert-success / .alert-info / .alert-warning / .alert-danger 정의는
 *   디자이너 v9 자산 (static/resource/css/ui/ui_content.css 7581~7611) 이 단일 출처.
 *   여기서 override 금지 — 시안 토큰 (#a94442 / #f2dede / padding 15 / margin-bottom 20) 그대로.
 *
 *   폼 검증 inline 에러는 시안 30 가이드 .writeForm-wrap.error-msg .msgTxt 사용 (#ff3101). */

/* === OTP 검증 실패 메시지 — 시안 30 가이드 .error-msg .msgTxt 와 동일 색 (#ff3101) ===
 *   시안 11(OTP)의 placeholder 마크업이 .se-textfld+.msgTxt 패턴이 아닌 단독 p.error-msg 라
 *   가이드의 selector(.error-msg .se-textfld + .msgTxt) 가 매칭되지 않아 색 누락.
 *   가이드 색 토큰 그대로 단독 p.error-msg 에 적용. */
.code-list > .error-msg { color: var(--redColor1, #ff3101); font-size: 0.875rem; margin-top: 10px; }

/* === 공통 link/button utility === */
.btn-plain         { background:none; border:0; padding:0; cursor:pointer; }
.btn-plain-inherit { background:none; border:0; padding:0; cursor:pointer; color:inherit; }
.link-plain        { text-decoration:none; color:inherit; }
.d-inline          { display:inline; }
.d-none            { display:none; }

/* === stats/detail.html === */
.stats-page        { padding:24px; max-width:1100px; margin:0 auto; }
.stats-back        { margin:0 0 8px 0; }
.stats-title       { font-size:24px; margin:0 0 8px 0; }
.stats-meta        { color:#666; font-size:13px; margin:0 0 16px 0; }
.stats-meta-sep    { margin:0 8px; }
.stats-card        { background:#fff; padding:24px; border-radius:6px; margin-bottom:24px; }
.stats-card-last   { background:#fff; padding:24px; border-radius:6px; }
.stats-section-h2  { font-size:16px; margin:0 0 12px 0; }
.stats-chart-area  { width:100%; height:400px; }
.stats-data-table  { width:100%; border-collapse:collapse; }
.stats-thead-bg    { background:#f5f5f5; }
.stats-cell-l      { padding:8px; text-align:left; }
.stats-cell-c      { padding:8px; text-align:center; }
.stats-cell-c-w120 { padding:8px; text-align:center; width:120px; }
.stats-cell-r      { padding:8px; text-align:right; font-variant-numeric:tabular-nums; }
/* 헤더의 연도(2번째 이후 컬럼) 도 우측 정렬 — 데이터(td.stats-cell-r) 와 시각 정렬 맞춤.
   첫 컬럼 "구분" 은 좌측 유지. 모바일에서 좌·우 정렬 혼재로 인한 가독성 저하 해소. */
.stats-data-table thead th:nth-child(n+2) { text-align: right; }
.stats-row         { border-top:1px solid #e5e7eb; }
.stats-cell-sm     { padding:8px; font-size:13px; }
.stats-btn-xs      { padding:4px 10px; font-size:12px; }
.stats-btn-spaced  { margin-left:8px; padding:4px 10px; }
.stats-empty       { color:#888; font-size:13px; }

/* === advisory/view.html — 댓글 영역 === */
.cmt-disabled      { color:#888; margin-top:10px; }
.cmt-empty         { padding:24px 0; text-align:center; color:#888; }

/* 댓글 수정 다이얼로그 — 시안 30 .preview-card 가이드 매칭 (border #e5e7eb / radius 8px /
   header padding 12 16 + border-bottom / body padding 16 / footer padding 12 16 + border-top).
   <dialog> element 의 default UA 스타일 (padding/border/inset) 도 reset. */
.cmt-dialog {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.cmt-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.cmt-dialog-h3 {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
}
.cmt-dialog form > textarea.cmt-textarea {
    display: block;
    width: calc(100% - 32px);
    margin: 16px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    color: #374151;
    outline: none;
    box-shadow: none;
}
.cmt-dialog form > textarea.cmt-textarea:focus {
    border-color: var(--primaryColor, #1E58AF);
}
/* HTML5 :invalid 의 빨강 outline/glow 제거 (시안 가이드 외 UA default 잡음 제거) */
.cmt-dialog form > textarea.cmt-textarea:invalid {
    outline: none;
    box-shadow: none;
    border-color: #d1d5db;
}
.cmt-actions {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 0;
}
.cmt-actions .btn {
    height: 34px;
    line-height: 32px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: var(--primaryColor, #1E58AF);
    border: 1px solid var(--primaryColor, #1E58AF);
}
.cmt-actions .btn:hover { background: var(--primaryColor, #1E58AF); color: #fff; }
.cmt-actions .btn.btn-primary {
    background: var(--primaryColor, #1E58AF);
    color: #fff;
    border: 1px solid var(--primaryColor, #1E58AF);
}
.cmt-actions .btn.btn-primary:hover { filter: brightness(1.08); }

/* === editor (write 페이지) === */
.editor-host       { min-height:400px; }

@media (max-width: 767px) {
    .editor-host .toastui-editor-toolbar {
        height: auto;
        min-height: 46px;
    }

    .editor-host .toastui-editor-defaultUI-toolbar {
        box-sizing: border-box;
        flex-wrap: wrap;
        height: auto;
        min-height: 45px;
        max-width: 100%;
        overflow: visible;
        padding-inline: 12px;
    }

    .editor-host .toastui-editor-toolbar-group {
        flex: 0 0 auto;
    }

    .editor-host .toastui-editor-dropdown-toolbar {
        flex-direction: column;
        height: auto;
    }

    .editor-host .toastui-editor-dropdown-toolbar .toastui-editor-toolbar-divider {
        display: none;
    }
}

/* === auth 페이지 === */
.auth-admin-hint   { margin-bottom:24px; color:#888; font-size:14px; }
.auth-qr-box       { background:#fff; text-align:center; padding:16px; }

/* OTP setup 페이지의 .input-key — 32자 Base32 (RFC 6238 / 160-bit) 한 줄 표시.
   시안 11 의 placeholder 는 16자라 inline 가능했지만, 실제 32자에서는 dt+dd 세로 배치 +
   dd font-size 축소·letter-spacing 0 으로 한 줄 유지. 사이드 이펙트 isolate 위해 추가 클래스. */
.auth-otp-key { flex-direction: column !important; align-items: center; gap: 6px !important; }
.auth-otp-key dd { font-size: 1rem; letter-spacing: 0; white-space: nowrap; word-break: keep-all; }
.auth-qr-img       { width:200px; height:200px; }
.auth-secret-mono  { font-family:monospace; word-break:break-all; overflow-wrap:anywhere; letter-spacing:1px; }

/* === home/main.html ===
 * margin-top -8: 부모 .ai-main-graph-item-con 의 flex gap 8 을 상쇄해 타이틀↔차트 거리 0.
 * canvas 자체는 main-charts 에서 컨테이너(150)보다 15px 크게 그려져 toast UI 의 fixed
 * bottom-padding 영역이 overflow:hidden 으로 잘림 → 컨테이너 안에서는 라벨 끝 = 바닥선.
 * yAxis 최대 라벨은 canvas 안 y≈12 에 그려지므로 -8 만큼 위로 올라가도 타이틀 영역과 겹치지 않음. */
.chart-mini        { height:150px; margin-top:-8px; }

/* 대시보드 미니 차트: 마우스 인터랙션 차단 (정책: 지표 정확값 비공개 + dot hover 색·크기 변화 X).
 * canvas 와 toast UI wrapper 만 hit-test 차단해 dot hover / tooltip trigger 가 발생하지 않게.
 * chart-area 자체는 hit-test 받아 카드 클릭(=상세 페이지 이동) 전파가 정상 동작.
 * /stats/{no} 상세 페이지의 .stats-chart-area 는 영향 없음 (셀렉터 한정). */
.chart-mini canvas,
.chart-mini .toastui-chart-wrapper { pointer-events:none; }

/* 보호망 — 어떤 경로로든 tooltip 만은 절대 노출 안 되게 강제. */
.chart-mini .toastui-chart-tooltip,
.chart-mini .toastui-chart-tooltip-container { display:none !important; }

/* 다이얼로그/상세 페이지 차트의 tooltip — toast UI 내부 inline padding/margin 이 매우 커서
 * CSS 로 모두 0 으로 강제한 뒤 wrapper 만 작은 패딩 부여. 콤팩트 표시. */
.stat-dialog-popup .toastui-chart-tooltip *,
.stats-chart-area .toastui-chart-tooltip * {
    padding:0 !important;
    margin:0 !important;
    line-height:1.25 !important;
    font-size:11px !important;
}
.stat-dialog-popup .toastui-chart-tooltip,
.stats-chart-area .toastui-chart-tooltip {
    background:rgba(255,255,255,0.96) !important;
    border:1px solid #d1d5db !important;
    border-radius:4px !important;
    padding:6px 12px !important;
    font-size:11px !important;
    box-shadow:0 2px 6px rgba(0,0,0,0.08) !important;
}
.stat-dialog-popup .toastui-chart-tooltip-category,
.stats-chart-area .toastui-chart-tooltip-category {
    text-align:center !important;
    font-weight:bold !important;
    color:#1f2937 !important;
    margin-bottom:2px !important;
}
/* toast UI 의 실제 class 명: toastui-chart-series-name / toastui-chart-series-value */
.stat-dialog-popup .toastui-chart-series-name,
.stats-chart-area .toastui-chart-series-name { text-align:left !important; color:#374151 !important; }
.stat-dialog-popup .toastui-chart-series-value,
.stats-chart-area .toastui-chart-series-value { text-align:right !important; color:#374151 !important; font-variant-numeric:tabular-nums; }

/* series-name 안의 색상 아이콘(<i class="toastui-chart-icon">) 숨김 — 표가 이미 시리즈명을
 * 차트 색으로 표시하므로 중복. 숨겨야 "계" 같은 텍스트가 구분선 좌측 시작점과 정확히 일치. */
.stat-dialog-popup .toastui-chart-icon,
.stats-chart-area .toastui-chart-icon { display:none !important; }
/* 시리즈 행 — 구분명 좌측, 숫자 우측, 사이 적당한 간격. gap 으로 최소 거리 확보. */
.stat-dialog-popup .toastui-chart-tooltip-series,
.stats-chart-area .toastui-chart-tooltip-series {
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    gap:10px !important;
    white-space:nowrap !important;
}
/* tooltip 전체 — label↔value 사이 적정 여백. min-width 너무 크면 빈 공간이 많아 가운데
 * 모인 듯 보이고, 너무 작으면 label/value 가 붙어 보임. 측정상 120px 가 균형점. */
.stat-dialog-popup .toastui-chart-tooltip,
.stats-chart-area .toastui-chart-tooltip {
    min-width:120px !important;
    max-width:200px !important;
    width:max-content !important;
}

/* 차트 커스텀 범례 — user-agent stylesheet 의 ul 기본 margin(16px) 차단.
 * width:100% + min-width:0 + box-sizing — 차트 영역이 viewport resize 로 좁아질 때
 * 범례 ul 이 자식 max-content 따라 부풀어 차트 우측보다 더 오른쪽으로 튀어나가는 현상 차단.
 * 페이지별 spacing 은 아래 selector 에서 override. */
.aigov-chart-legend {
    margin: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* 대시보드 카드 안 범례만 부모 flex gap(8) 을 음수 margin 으로 흡수해 차트↔범례 거리 0.
 * 다른 페이지(/stats/{no} 상세 등) 의 범례는 기본 margin:0 유지 (gap 부모 layout 에 위임). */
.ai-main-graph-item-con > .aigov-chart-legend { margin-top:-8px; }

/* === 지표 상세 dialog (대시보드 카드 클릭 시 SweetAlert) === */
.stat-dialog-popup           { max-width:1400px !important; }
.stat-dialog-body            { text-align:left; }
.stat-dialog-body #stat-dialog-chart { width:100%; height:360px; }
.stat-dialog-table           { width:100%; overflow-x:auto; }
.stat-dialog-table table     { width:100%; }
/* 상세 페이지 (/stats/{no}) 표 wrapper — 모바일 좁은 viewport 에서 표가 viewport 폭 초과 시
   가로 스크롤로 우측 셀 노출 (잘림 차단). */
#data-table-wrap             { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
#data-table-wrap table       { min-width:max-content; }

/* === admin/stats/form (v7 시안 23번) === */
.admin-grid-editor-wrap     { overflow-x:auto; }
.admin-content .stats-indicator-tabs.se-tab.ty-main > ul > li > .se-tab-btn {
    font-size: 1rem;
}
.admin-content .stats-indicator-tabs.se-tab.ty-main.ty-tab01 > ul > li > .se-tab-btn {
    padding: 10px 15px;
    margin: 0;
}
.admin-content .stats-indicator-tabs.se-tab.ty-main.ty-tab01 > ul > li::after {
    display: none;
}
.admin-stats-guide          { font-size:13px; color:#666; margin:8px 0; }
.admin-history-time         { font-size:12px; color:#666; }
.admin-history-when         { font-size:12px; }
.admin-history-empty        { color:#888; }

/* === admin xlsx upload (v7 시안 22번 / 24번) === */
.admin-upload-guide        { background:#f9fafb; padding:16px; border:1px solid #e5e7eb; border-radius:6px; margin:16px 0; }
.admin-upload-guide-title  { font-size:16px; margin:0 0 8px 0; }
.admin-upload-guide-cols   { display:block; background:#fff; padding:8px; border-radius:4px; font-size:13px; }
.admin-upload-guide-list   { font-size:13px; color:#444; margin-top:8px; }
.admin-upload-result-summary { margin:12px 0; }
.admin-upload-status-ok    { color:#166534; font-weight:600; }
.admin-upload-status-update{ color:#1e40af; font-weight:600; }
.admin-upload-status-fail  { color:#dc2626; font-weight:600; }

/* 관리자 엑셀 미리보기 file input — 브라우저 기본 file input 이 시안 톤과 안 어울려 다듬음.
   디자이너 자산 미수정(우리 override). ::file-selector-button 을 디자이너 버튼(--primaryColor) 톤으로. */
.admin-file-input {
    display: inline-flex;
    align-items: center;       /* 버튼·파일명 텍스트 수직 중앙 */
    padding: 0;
    max-width: 380px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    font-size: 0.95rem;
    color: #475467;
    cursor: pointer;
}
.admin-file-input::file-selector-button {
    align-self: stretch;       /* 버튼이 input 높이를 꽉 채움 */
    margin: 0 12px 0 0;
    padding: 0 16px;
    border: 0;
    border-right: 1px solid #d0d5dd;
    border-radius: 5px 0 0 5px;
    background: #f8f9fb;
    color: var(--primaryColor);
    font-weight: 600;
    line-height: 36px;         /* 버튼 텍스트 수직 중앙 — 1px 위로 */
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
/* 파일명 텍스트도 1px 위로 — 버튼과 베이스라인 맞춤 */
.admin-file-input { line-height: 36px; }
.admin-file-input::file-selector-button:hover {
    background: var(--primaryColor);
    color: #fff;
}

/* LNB override — admin 메뉴 8개로 늘어나 시안 CSS (admin 6개 + 큰 viewport 가정) 기준으로
   작은 viewport 에서 메뉴가 잘림. 시안 의도 보존하면서 메뉴 영역 확보:
   1) .relate-site-wrap 의 margin-top:auto 제거 — free space 를 #lnb 에 양보
   2) .relate-site-wrap 의 padding-top 145 → 30 — Family Site content 위 빈 padding 줄임
   3) #lnb 가 남는 공간 차지 + 메뉴가 더 많아지면 자체 scroll (슬림 scrollbar 표시) */
.ai-lnb .relate-site-wrap {
    margin-top: 0;
    padding-top: 30px;
}
.ai-lnb #lnb {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.25) transparent;
}
.ai-lnb #lnb::-webkit-scrollbar { width: 6px; }
.ai-lnb #lnb::-webkit-scrollbar-track { background: transparent; }
.ai-lnb #lnb::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 3px; }

/* 23번 지표 입력 — grid editor 셀 input. 기본 투명 + hover/focus 시 자연스러운 강조. */
.stats-cell-input {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 8px;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.stats-cell-input.stats-num-cell { text-align: right; }
.stats-cell-input.stats-cat-name { text-align: center; font-weight: 600; }
.stats-cell-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}
.stats-cell-input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* 본문 영역 (게시판/자문위 상세) 의 이미지 자동 축소 — 원본이 크면 폭 100% 로 맞춤.
 * 셀렉터를 본문 컨테이너 어떤 이름이든 잡도록 broader 하게:
 *   - .noticeViewArea (시안 기본)
 *   - .toastui-editor-contents (Toast UI 기본 렌더 영역 — 미리보기/위지윅 공용)
 *   - .post-detail .content, .post-view .content (대안)
 *   - .ai-main-content .content (대시보드 안의 본문 영역) */
.ai-main-content .noticeViewArea img,
.toastui-editor-contents img,
.post-detail .content img,
.post-view .content img,
.ai-main-content .content img,
[class*="postBody"] img {
    max-width: 100%;
    height: auto;
}

/* 본문 표 — Toast UI Editor 의 table 보더가 안 보이는 경우 대비. 게시판/자문위 상세 view. */
.ai-main-content .noticeViewArea table,
.toastui-editor-contents table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}
.ai-main-content .noticeViewArea table th,
.ai-main-content .noticeViewArea table td,
.toastui-editor-contents table th,
.toastui-editor-contents table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
}
.ai-main-content .noticeViewArea table th,
.toastui-editor-contents table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* ──────────────────────────────────────────────────────────────────────────
 * Toast UI Editor 잔여 UI override.
 *
 * 디자이너 시안 ui_content.css 의 광범위 layout 규칙이 Toast UI Editor 가 inline
 * style="display:none" 으로 숨기는 popup·tooltip·md-tab-container 의 display 를
 * block 으로 무력화시키는 현상 fix. WYSIWYG 모드에서 마크다운 미리보기 탭이 노출되고
 * 본문 영역 위에 tooltip arrow(작은 검정 사각형) 가 보이는 회귀 차단.
 *
 * 정책:
 *   - Toast UI 가 inline display:none 으로 표시한 영역은 그대로 숨김 (라이브러리 의도 보존)
 *   - WYSIWYG 모드에서 마크다운 미리보기 탭 컨테이너는 항상 숨김 (Toast UI 공식 동작)
 *     — previewStyle 옵션은 마크다운 모드 전용
 * ────────────────────────────────────────────────────────────────────────── */
.toastui-editor-tooltip[style*="display:none"],
.toastui-editor-tooltip[style*="display: none"],
.toastui-editor-popup[style*="display:none"],
.toastui-editor-popup[style*="display: none"],
.toastui-editor-md-tab-container[style*="display:none"],
.toastui-editor-md-tab-container[style*="display: none"] {
    display: none !important;
}

/* ──────────────────────────────────────────────────────────────────────────
 * /intro (AI 민주정부 소개) — sketch screens-sketch.html "AI 민주정부 소개" 매핑.
 * 3개 카드 (AI민주정부란/목표/추진과제). 디자이너 차기 차수에서 별도 시안 도착 시 교체.
 * ────────────────────────────────────────────────────────────────────────── */
.intro-sections { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.intro-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
}
.intro-card-title {
    margin: 0;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}
.intro-card-body { padding: 20px; line-height: 1.8; font-size: 0.95rem; color: #374151; }
.intro-card-body p { margin: 0; }
.intro-card-body p + p { margin-top: 12px; }
.intro-card-body strong { color: #1d4ed8; font-weight: 700; margin-right: 4px; }

/* === 28 패밀리사이트 — drag & drop 순서 변경 === */
.family-sites-tbody tr[draggable=true] { cursor: default; }
.family-sites-tbody .drag-handle {
    display: inline-block;
    margin-right: 6px;
    color: #9ca3af;
    cursor: grab;
    font-size: 16px;
    line-height: 1;
    user-select: none;
}
.family-sites-tbody .drag-handle:hover { color: #4b5563; }
.family-sites-tbody tr.dragging { opacity: 0.5; }
.family-sites-tbody tr.new-row { background: #f8fafc; }
.family-sites-tbody tr.new-row .se-textfld input { width: 100%; }
.family-sites-actions { margin-top: 16px; }

/* === LNB 토글 후 우측 overflow 차단 + 카드/차트 내부 보더 침범 차단 (flexbox 정석) ===
   증상-A: 작은 모니터(1366·1280) 에서 LNB 닫음 → 펼침 시 자식이 부모 폭(1166)을 무시하고
          SVG/차트의 max-content 폭(1728+) 으로 부풀어 우측이 viewport 밖 렌더.
   증상-B: 1080·1280 에서 대시보드 카드 안 큰 숫자(예: 16,171,429) 가 카드 우측 padding 잠식 → 보더 침범.
   증상-C: 차트 그래프 2영역에 분할 렌더 (1080 측정: graphList 944 안에 child 680×3 = 2040).
   원인: flex item 의 기본 min-width:auto = 자식의 max-content. flex container 가 줄이지 못함.
   해법: flex 컨테이너 + num-list 카드 아이템 에만 min-width:0 적용.
        ⚠️ graph-item 직접 적용 금지 — Toast UI Chart 가 자기 폭을 0 으로 측정 후 다시 그리며
        ResizeObserver feedback loop 발생, 화면 떨림·차트 미렌더 유발. */
.ai-content-wrap { min-width: 0; }
.ai-content-section,
.ai-content-area,
.ai-main-content { min-width: 0; }
.ai-main-graph-section,
.ai-main-graph-list,
.ai-main-num-list { min-width: 0; }
.ai-main-graph-list > .ai-main-graph-item,
.ai-main-num-list > .ai-main-graph-item { min-width: 0; }
/* 차트 컨테이너 자체 — canvas 의 intrinsic width 가 element 폭을 고정시켜
   부모 viewport 변동 시 chart-area 가 안 줄어드는 현상 차단.
   width:100% + min-width:0 으로 부모 폭 강제 추적 + canvas max-width 보호. */
.chart-area      { width: 100%; min-width: 0; }
.chart-area canvas { max-width: 100%; }
/* 카드 안 큰 숫자(.count) 가 7자리 콤마(예: "16,171,429") 1단어로 인식되어 break 안 됨.
   text-align:right 와 결합되면 우측 padding 영역 잠식 → 시각적 보더 침범.
   word-break 로 자식 폭 강제 클램프, overflow 숨김으로 부모 보더 안 유지. */
.ai-service-num { min-width: 0; overflow: hidden; }
.ai-service-num .count { word-break: break-all; font-variant-numeric: tabular-nums; }
/* 큰 숫자(예: 1,031,485,298)의 콤마와 소수점 구분이 안 되는 폰트 한계 보완.
   main-charts.js 가 콤마를 <span class="num-comma"> 로 wrap → 콤마 뒤 미세 여백 + 굵게. */
/* 합계 영역(국민비서) 콤마 descender 잘림 해소 — line-height 충분히 + padding-bottom 으로
   콤마 꼬리 공간 확보. 부모 overflow 영향도 차단(visible). */
.ai-main-all-sum,
.ai-main-all-sum dd {
    overflow: visible;
}
.ai-main-all-sum dd {
    line-height: 1.6;
    padding-bottom: 4px;
}
.ai-main-all-sum dd .count {
    font-weight: 500;
    line-height: 1.6;
    display: inline-block;
    padding-bottom: 2px;
    /* 표(.stats-cell-r) 와 동일하게 tabular-nums 등폭 숫자 — 콤마 폭 일치. */
    font-variant-numeric: tabular-nums;
}

/* breadcrumb 홈 아이콘 click 가능 — CSS only 는 click 불가, anchor 분리. */
.breadcrumb-home {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
    background: url("/resource/images/ic_home.svg") no-repeat center center;
    background-size: 20px 20px;
    text-indent: -9999px;
    overflow: hidden;
    cursor: pointer;
}
/* anchor 분리 시 ul background 의 home icon 중복 표시 차단. */
.has-home-link.breadcrumbs-user {
    background: none;
    padding-left: 0;
}
/* breadcrumb-home 을 ul 안 첫 li 로 이동 시 (.inner flex-direction: column 회피),
   홈 li 앞 '>' 마커 + padding 숨김 — 홈 자체는 첫 항목이므로 separator 불필요. */
.has-home-link.breadcrumbs-user > li:first-child {
    padding-left: 0;
}
.has-home-link.breadcrumbs-user > li:first-child:before {
    content: none;
}

/* 카드 subtitle 텍스트와 우측 35px 아이콘(::after) 영역이 겹쳐 글자 침범 발생.
   원인: 시안 padding-right 미설정 + 한글 긴 단어("행정정보공동이용정보")가 wrap 안 되어
        sub-title 폭을 넘어 ::after 영역까지 흐름.
   해법: padding-right 40px (아이콘 35 + 여백 5) + overflow-wrap:anywhere 로 한글 단어 wrap 허용. */
.ai-main-num-list .ai-main-graph-item .ai-main-sub-title {
    padding-right: 40px;
    min-width: 0;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
.ai-main-num-list .ai-main-graph-item .ai-main-sub-title > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* 카드 내부 grid 표 반응형 — 좁은 viewport(1080 LNB 열림)에서 큰 숫자 셀 침범 방지.
   증상: grid-td.grid20 (20% 폭) 의 "2,372,227" 같은 7자리 숫자가 셀 폭 38px > 텍스트 58px
        → 우측 셀 보더 넘어 옆 셀 침범.
   해법: 모든 grid 셀 min-width:0 + 내부 span word-break + 셀 overflow:hidden 으로
        부모 셀 안 유지. text-overflow ellipsis 는 숫자 잘림 위험이라 word-break 우선. */
.grid-th, .grid-td { min-width: 0; overflow: hidden; }
.grid-td span, .grid-th span { word-break: break-all; overflow-wrap: anywhere; }
/* 카드 합계 박스(ai-main-all-sum .count)도 큰 숫자 가능 — 보더 안 유지. */
.ai-main-all-sum dd { min-width: 0; overflow: hidden; }
.ai-main-all-sum dd .count { word-break: break-all; overflow-wrap: anywhere; }

/* === 헤더 우상단 sub-info-wrap (로그인/사용자/로그아웃) 폰트 14px 고정 ===
   시안 0.875rem 은 html font-size 단계 축소(1280 이하 13px / 768 이하 12px) 와 결합 시
   9~11px 까지 줄어 가독성 미달. family-site 와 동일 패턴으로 절대값 14px 고정. */
.sub-info-wrap { font-size: 14px; }

/* === 헤더 우상단 "전체메뉴" 텍스트+아이콘 숨김 ===
   디자이너 합의(2026-05-19): 사이트맵 오버레이 진입점을 헤더에서 노출하지 않음.
   시안 마크업(fragments/layout.html 의 <li class="utill-sitemap">)은 보존하되
   시각만 차단. 다른 진입점(footer/모바일 nav 등)이 추가되면 별도 활성화. */
.sub-info-wrap li.utill-sitemap { display: none; }

/* === 로그인 실패 안내 메시지 간격 ===
   증상: 비밀번호 입력 영역 바로 아래(gap 0)에 alert 가 붙어 시각적으로 답답.
   해법: alert 위 marginTop 으로 호흡 확보 + 박스 다듬기(로그인 폼 톤과 일관). */
.login-con .alert.alert-danger {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #f1c0bf;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
}

/* admin/boards/form.html — 홍보센터 정책 경고 안내 (빨간 톤). inline style 제거. */
.setting-help.setting-help-warn { color: #a94442; }

/* === breadcrumbs-user 클릭 이동 회복 (사용자 페이지) ===
   증상: 사용자 페이지 breadcrumb 가 단순 <li> 텍스트라 클릭해도 이동 안 됨.
   해법:
   1. 카테고리·보드명을 <a> 로 감싸 부모 페이지 이동 가능 (각 페이지 마크업에서 처리).
   2. 좌측 홈 아이콘 영역도 클릭 가능 — <li class="bc-home"> 안에 <a href="/"> 를 absolute
      포지셔닝으로 ::before background ic_home.svg 위에 오버레이 (디자이너 자산 background-image
      는 보존하면서 클릭 영역만 추가). */
.breadcrumbs-user { position: relative; }
.breadcrumbs-user > li.bc-home {
    position: absolute;
    left: -25px;
    top: 0;
    width: 25px;
    height: 100%;
    padding: 0;
    min-height: 24px;
}
.breadcrumbs-user > li.bc-home:before { display: none; }
.breadcrumbs-user > li.bc-home > a {
    display: block;
    width: 100%;
    height: 100%;
}
.breadcrumbs-user > li.bc-home > a:focus-visible {
    outline: 2px solid var(--primaryColor);
    outline-offset: 2px;
    border-radius: 2px;
}
.breadcrumbs-user > li > a {
    color: inherit;
    text-decoration: none;
}
.breadcrumbs-user > li > a:hover {
    color: var(--primaryColor);
    text-decoration: underline;
}
.breadcrumbs-user > li > a:focus-visible {
    outline: 2px solid var(--primaryColor);
    outline-offset: 2px;
    border-radius: 2px;
}

/* === mobile-nav: sub-menu 없는 li 의 펼침 아이콘 숨김 ===
   증상: Dashboard / AI민주정부 소개 메뉴는 단일 링크인데도 화살표 아이콘이 표시됨.
   원인: 시안 CSS 가 `.gnb > li > .first-menu a span:after` 일괄 화살표 적용.
   해법: :has() 로 sub-menu 자식 없는 li 만 아이콘 숨김 (마크업 변경 없이). */
.mobile-nav-body .gnb > li:not(:has(> .sub-menu)) > .first-menu a span:after {
    display: none;
}

/* === 모바일 nav 터치 타깃 44px 보장 (WCAG 2.5.5 + 정부 모바일 가이드) ===
   시안의 .first-menu padding 은 부모 div 에 있어 실제 <a> 의 boundingRect 가
   18px(텍스트)에 불과 → 사용자 터치 영역 미달. padding 을 a 로 이전 (시각 동일).
   .sub-menu·mobile-user-login-btn 도 동일 정책 적용. */
.mobile-nav-body .gnb > li > .first-menu { padding: 0; }
.mobile-nav-body .gnb > li > .first-menu a {
    display: flex;
    align-items: center;
    padding: 12px;
    min-height: 44px;
    box-sizing: border-box;
}
.mobile-nav-body .gnb .sub-menu > li > a {
    padding: 12px 1.428571428571429rem;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}
.mobile-user-login-btn a {
    min-height: 44px;
    line-height: 44px;
    box-sizing: border-box;
}

/* === 모바일 viewport(≤1024) — 헤더·검색·페이지네이션 터치 타깃 44px ===
   시안 의도(햄버거 30, 검색 34, 페이지네이션 32) 는 데스크톱 시각 우선 디자인.
   모바일에서는 정부 모바일 가이드 + WCAG 2.5.5 의 44px 보장 필요 → 미디어쿼리로
   분기. 시각 아이콘은 가운데 정렬로 보존, 터치 영역만 확대. */
@media screen and (max-width: 1024px) {
    .btn-toggle-menu {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .main-btn-search {
        min-width: 44px;
        min-height: 44px;
    }
    .paging a,
    .paging .go {
        min-width: 44px;
        min-height: 44px;
        line-height: 44px;
    }
    /* 헤더 로고 — 시안 시각 보존 + 터치 영역 44px (flex 가운데 정렬) */
    .ai-logo a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    /* 큰 버튼(.btn-lg) — 시안 45px 인데 border/padding 으로 boundingRect 41px → 모바일 44px 보장 */
    .se-btn.btn-lg {
        min-height: 44px;
    }
    /* 분과 탭(.se-tab-btn) — 시안 40px → 모바일 44px (자문위 분과 탭 등) */
    .se-tab-btn {
        min-height: 44px;
    }
}

/* === 감사 로그 상세 컬럼 — JSON diff 라인 표시 ===
   admin-audit-list.js 가 .detail-cell 안 JSON 을 ul.audit-diff-list 로 변환.
   각 li: <strong>라벨:</strong> <span.old>old</span> → <span.new>new</span>.
   상세 컬럼은 의미상 텍스트(좌측 정렬) — table caption 의 기본 정렬과 무관 강제. */
.detail-cell {
    text-align: left !important;
}
.audit-diff-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}
.audit-diff-item {
    padding: 0;
    margin: 0 0 2px 0;
}
.audit-diff-item:last-child {
    margin-bottom: 0;
}
.audit-diff-old {
    color: #6b7280;
    text-decoration: line-through;
}
.audit-diff-new {
    color: #1e58af;
    font-weight: 600;
}
.audit-diff-arrow {
    color: #9ca3af;
    margin: 0 2px;
}
.audit-diff-note {
    color: #ff7700;
    font-size: 0.75rem;
    margin-left: 4px;
}

/* === login_history stage 배지 — #182. PASSWORD vs OTP 단계 구분. === */
.status-stage-pw {
    background: #e5e7eb;
    color: #374151;
}
.status-stage-otp {
    background: #dbeafe;
    color: #1e58af;
}

/* === 게시판 권한 매트릭스 — admin/boards/form ===
   행=대상(비로그인/역할/분과) × 열=액션(접근/글쓰기/댓글). 시각적으로 한 눈에 파악 + 분과 종속 표현.
   자문위 그룹 행은 회색 배경 (구분), 분과 행은 들여쓰기 + 연한 회색.
   비활성 (분과 상위 미체크) 분과 row 는 opacity 0.4 + cursor not-allowed. */
.permission-matrix {
    /* 폭을 좁혀 헤더(접근/글쓰기/댓글)가 대상명 셀 바로 옆에 인접하도록 */
    width: auto;
    max-width: 560px;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 0.875rem;
    table-layout: fixed;
}
.permission-matrix col.perm-col-subject { width: 260px; }
.permission-matrix col.perm-col-action { width: 90px; }
.permission-matrix thead th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 2px solid #e5e7eb;
    text-align: center;
}
.permission-matrix thead th.perm-col-subject { text-align: left; }
.permission-matrix tbody td,
.permission-matrix tbody th {
    padding: 6px 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.permission-matrix tbody td { text-align: center; }
.permission-matrix tbody td input[type=checkbox] { vertical-align: middle; margin: 0; }
.permission-matrix tbody .perm-cell-na { line-height: 1; }
.permission-matrix tbody th {
    text-align: left;
    font-weight: 500;
    color: #1f2937;
}
.permission-matrix tbody th small { color: #9ca3af; font-weight: 400; font-size: 0.72rem; margin-left: 4px; }
.permission-matrix tbody tr.perm-row:hover { background: #fafafa; }
.permission-matrix tbody tr.perm-row-public { background: #f9fafb; }
.permission-matrix tbody tr.perm-row-group th { font-weight: 600; color: #1e58af; }
.permission-matrix tbody tr.perm-row-dept th {
    padding-left: 20px;
    color: #6b7280;
    font-size: 0.825rem;
}
.permission-matrix .perm-cell-na {
    color: #d1d5db;
    font-size: 0.9rem;
}
.permission-matrix input[type=checkbox]:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.permission-matrix input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
/* === 게시판 권한 badge — admin/boards/list 의 컬럼 표시 === */
.board-perm-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 3px 2px 0;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.board-perm-badge.perm-public { background: #f3f4f6; color: #6b7280; }
.board-perm-badge.perm-role { background: #dbeafe; color: #1e58af; }
.board-perm-badge.perm-dept { background: #cffafe; color: #0e7490; }
.board-perm-empty { color: #9ca3af; font-size: 0.8rem; }

/* === 게시판 관리 목록 — 게시판명 컬럼 좌측 정렬 ===
   첫 컬럼 (게시판명) 은 트리 들여쓰기(└) 가 들어가 좌측 정렬이 가독성 좋음.
   기본 td 가 center 정렬이라 명시적으로 좌측 강제. */
.table_type1 .board-row > td:first-child {
    text-align: left !important;
}

/* === 사이트 설정 카드 2열 grid — 유사 그룹 가까이 배치 ===
   기본정보/게시판 ↘ 관리자 페이지/로그인 ↘ 비밀번호 정책.
   1280px 미만은 1열로 자동 fallback (좁은 화면 가독성). */
.site-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 1279px) {
    .site-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* === 슈퍼 관리자 row 강조 — 시안 v9 파랑 톤 (primary #1e58af) 일관 ===
   삭제·강등 불가 한 특수 row 임을 시안과 어울리는 옅은 파랑 + 좌측 border 로 표시. */
.user-row-super > td {
    background: #eff6ff;
}
.user-row-super:hover > td {
    background: #dbeafe;
}
.user-row-super > td:first-child {
    box-shadow: inset 3px 0 0 #1e58af;
}

/* === ADMIN role 보호 표시 (admin/users/form) ===
   ADMIN 사용자 update 시 role radio 대신 라벨 + 안내문 노출. */
.role-locked {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.role-locked-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #1e58af;
    color: #fff;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}
.role-locked-hint {
    color: #6b7280;
    font-size: 0.8rem;
}

/* === 폼 하단 버튼 폭·높이 표준화 — 시안 22/24/30 가이드 ===
   .sp-btnset 안의 [취소][저장/등록] 같은 액션 버튼은 텍스트 길이 무관 동일 폭/높이.
   글쓰기·등록·수정 form 일관성 (취소 "취소" 2자 vs 등록 "등록"·"저장하기" 폭 차이 제거).
   button vs a 의 user-agent style 차이로 line-height/font-size 가 달라지는 문제도
   sp-btnset 컨텍스트에서 강제 통일.
   - btn-lg: min-width 120px / line-height 44px (글쓰기)
   - btn-md: min-width 100px / line-height 38px (admin form 일반)
   - btn-sm: 규칙 영향 X (row 내 inline 액션) */
/* 상세 하단 [수정][삭제][목록](.detail-btnset) — 시안은 셋 다 <a> 지만 삭제는 POST 라 <form> 으로 감싼다.
   form 을 배치에서 빼 버튼이 바로 flex 항목이 되게 하고, 아래 폭·높이 통일 규칙에서도 빼서
   시안(ai_homepage_18 0201·0202 상세) 크기 그대로 둔다. <button> 기본 글꼴만 <a> 와 맞춘다. */
.sp-btnset.tac > form.d-inline {
    display: contents;
}
.detail-btnset > form.d-inline > button.se-btn {
    font-family: inherit;
}
.sp-btnset:not(.detail-btnset) > .se-btn.btn-lg,
.sp-btnset:not(.detail-btnset) > .se-btn.btn-lg.btn-solid {
    min-width: 120px;
    height: 46px;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 1rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sp-btnset > .se-btn.btn-md,
.sp-btnset > .se-btn.btn-md.btn-solid {
    min-width: 100px;
    height: 40px;
    line-height: 38px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.95rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* condensed: 액션 버튼이 많은 목록 상단(.users/list 등) 에서 폭 축소·통일.
   8개 버튼이 한 줄 + 텍스트 길이 차이로 인한 폭 비대칭 제거 (엑셀 다운로드/업로드 등).
   고정 width 로 모든 버튼 동일 폭. font-size 살짝 축소 + padding 최소화로 긴 텍스트도 한 줄. */
.sp-btnset.condensed > .se-btn.btn-md {
    /* 텍스트 길이 기준 자연 폭 — width 고정 해제, padding 으로만 여백 확보. */
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.82rem;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .sp-btnset.condensed > .se-btn.btn-md {
        width: 100%;
    }

    .admin-content .table_type1 .sp-btnset > form.d-inline {
        width: 100%;
    }

    .admin-content .table_type1 .sp-btnset > form.d-inline > .se-btn {
        width: 100%;
    }
}

/* === 게시글 상세 — 이전/다음 글 nav 클릭 영역 확장 ===
   시안: li 가 padding 20px 30px 보유, a 는 li 자식.
   문제: a 의 boundingRect = dl 텍스트 한 줄(18px) → 모바일 터치 어려움.
   해결: 시안 li padding/dl 룰 완전 보존 + a 에만 negative margin 트릭으로
        li 의 padding 영역까지 침범시켜 클릭 영역 = li 전체 (시각 100% 보존).
        a 없는 li(다음/이전 글 없음)는 변경 0 — 시각 동일 → 좌측 시작점 일관. */
.nextPrevious ul li > a {
    display: block;
    padding: 20px 30px;
    margin: -20px -30px;
    box-sizing: border-box;
    min-height: 44px;
}

/* === 관리자 사용자관리 검색 영역 레이아웃 보정 (디자이너 자산 ui_content.css 미수정) ===
   필터(.se-select/.se-textfld)에 너비 제약이 없어 전체 너비(100%)로 각각 한 줄씩
   쌓이던 문제. 자식에 flex-basis 를 줘 한 줄에 여러 개가 들어가도록 보정한다.
   se-select/se-textfld 의 내부 select/input 은 기존대로 wrapper 100% 를 채운다. */
.admin-search-area .se-select,
.admin-search-area .se-textfld {
    flex: 0 1 220px;
    min-width: 160px;
    width: auto;
}
.admin-search-area .se-select select,
.admin-search-area .se-textfld input {
    width: 100%;
    box-sizing: border-box;
}
.admin-search-area > button {
    flex: 0 0 auto;
    align-self: center;
}

@media (max-width: 768px) {
    .admin-search-area {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-search-area .se-select,
    .admin-search-area .se-textfld {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }
}

/* 날짜 범위 필터(.sp-formset)도 같은 줄에 배치 — 지표입력 수정이력(stats/history) 검색영역.
   원인(측정): 디자이너 .se-date input 이 너비 제약 없이 281px 로 늘어나 .sp-formset 이
   admin-search-area 전체 너비(584px)를 차지 → 셀렉트/날짜/검색버튼이 3줄로 쌓이던 문제.
   se-date input 을 콘텐츠 너비로 되돌리고 sp-formset 을 콘텐츠 크기로 축소해 한 줄에 정렬.
   admin-search-area 안에서만 적용 — 디자이너 .sp-formset/.se-date 의 다른 사용처 영향 없음. */
.admin-search-area > .sp-formset {
    flex: 0 1 auto;
    width: auto;
    align-self: center;
}
.admin-search-area .se-date input {
    width: auto;
    min-width: 140px;
}

/* 필터가 많은 검색영역(로그인 이력 6개, 감사 로그 5개)을 한 줄에 — board_top 직계 자식인
   admin-search-area 가 콘텐츠 폭(약 875px)으로 줄어 6개 필터가 3개씩 2줄로 쌓이던 문제.
   board_top(1560px)의 전체 폭을 쓰게 해 한 줄에 모두 배치한다.
   · stats/history 는 검색영역이 .pack-right 안에 중첩(직계 아님)이라 제외 — 우측 정렬 유지.
   · users 는 버튼 묶음과 한 줄에 배치하므로 제외. */
.board_top:not(.board_top--stacked):not(.admin-users-toolbar) > .admin-search-area {
    flex: 1 1 100%;
    width: 100%;
}

@media (min-width: 769px) {
    .admin-users-toolbar {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .admin-users-toolbar > .admin-search-area {
        flex: 1 1 0;
        min-width: 0;
    }

    .admin-users-toolbar > .admin-search-area .se-select,
    .admin-users-toolbar > .admin-search-area .se-textfld {
        flex: 1 1 0;
        min-width: 0;
    }

    .admin-users-toolbar > .pack-right {
        flex: 0 0 auto;
    }
}

/* 소통혁신24 국민 제안 — 원 사이트의 4열 카드 구조를 현재 사이트 톤으로 축약. */
.sotong-proposal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 34px 0 18px;
    color: #64748b;
    font-size: 0.95rem;
}

.sotong-proposal-count {
    color: #334155;
    white-space: nowrap;
}

.sotong-proposal-count strong {
    margin-left: 4px;
    color: var(--primaryColor);
    font-size: 1.35rem;
}

.sotong-proposal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.sotong-proposal-grid > li {
    min-width: 0;
}

.sotong-proposal-card {
    display: flex;
    min-height: 270px;
    height: 100%;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sotong-proposal-card:hover {
    border-color: var(--primaryColor);
    box-shadow: 0 10px 24px rgba(15, 44, 84, 0.1);
}

.sotong-proposal-card:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

.sotong-proposal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
}

.sotong-proposal-category {
    color: #c00072;
    font-size: 0.82rem;
    font-weight: 700;
}

.sotong-proposal-status {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.sotong-proposal-status.is-open {
    background: #e8f0cf;
    color: #526800;
}

.sotong-proposal-status.is-closed {
    background: #e2e8f0;
    color: #475569;
}

.sotong-proposal-title {
    display: -webkit-box;
    min-height: 4.5em;
    overflow: hidden;
    color: #172033;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sotong-proposal-meta {
    display: grid;
    gap: 7px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.sotong-proposal-meta > div {
    display: flex;
    gap: 10px;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.45;
}

.sotong-proposal-meta dt {
    flex: 0 0 auto;
    color: #64748b;
}

.sotong-proposal-meta dd {
    min-width: 0;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sotong-proposal-detail {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 18px;
    color: var(--primaryColor);
    font-size: 0.88rem;
    font-weight: 700;
}

.sotong-proposal-empty {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    text-align: center;
}

.sotong-proposal-empty i {
    color: #94a3b8;
    font-size: 3rem;
}

.sotong-proposal-empty strong {
    color: #334155;
    font-size: 1.15rem;
}

@media (max-width: 1280px) {
    .sotong-proposal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .sotong-proposal-page .project-notice {
        padding: 28px 22px;
    }

    .sotong-proposal-page .project-notice dl {
        padding-left: 58px;
    }

    .sotong-proposal-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .sotong-proposal-grid {
        grid-template-columns: 1fr;
    }

    .sotong-proposal-card {
        min-height: 240px;
    }
}

/* 중점추진과제 표 제목 — 시안의 인라인 style="margin-top:15px; margin-bottom:5px;" 를 옮김
   (CSP style-src 'self' 라 인라인 style 속성은 적용되지 않는다) */
.project-detail h4.task-table-title {
    margin-top: 15px;
    margin-bottom: 5px;
}
