/* ══════════════════════════════════════════════════════════════
   CITHRD 정기 경영 보고서 — 인쇄용 공통 (cithrd-report.css)
   · 설명 보기 버튼 · 마우스 반전 · 휴대폰 반응형 · 탭 반전(아래 자동 생성)
   · 화면 전용 규칙이라 인쇄 · PDF 결과에는 영향 없음
   · 이 파일 하나를 고치면 report 폴더의 모든 월별 보고서에 반영됩니다
   ══════════════════════════════════════════════════════════════ */
/* ── 설명 보기 버튼 ── */
.btn-explain { display: inline-flex; align-items: center; font-family: inherit; font-size: 12px; font-weight: 700; padding: 7px 16px; border-radius: 4px;
               color: #fff; text-decoration: none; background: rgba(205,172,79,.28); border: 1px solid rgba(205,172,79,.75); transition: all .2s; white-space: nowrap; }
.btn-explain:hover { background: #CDAC4F; color: #0E2347; }
.toolbar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.lbl-short { display: none; }

/* ── 1. 마우스를 올리면 반대색 (마우스가 있는 기기에서만) ── */
@media screen and (hover: hover) and (pointer: fine) {
  .issue-card, .tip-item, .support-tab-item, .rnd-step-card, .ceo-check-item, .alert-box, .summary-note, .year-cal-note,
  .schedule-table td, .compare-table td, .dx-table td, .action-table td, .year-cal-table td, .acct-def-table td {
    transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
  /* 반전 시 글씨가 테두리에 붙지 않도록 화면에서만 살짝 여백 */
  .tip-item, .support-tab-item, .alert-box { padding-left: 8px !important; padding-right: 8px !important; border-radius: 4px; }

  /* 카드 단위 */
  .issue-card:hover, .rnd-step-card:hover, .ceo-check-item:hover, .tip-item:hover, .support-tab-item:hover,
  .alert-box:hover, .summary-note:hover, .year-cal-note:hover {
    background: #172c46 !important; color: #fff !important; border-color: #172c46 !important; }
  .issue-card:hover *, .rnd-step-card:hover *, .ceo-check-item:hover *, .tip-item:hover *, .support-tab-item:hover *,
  .alert-box:hover *, .summary-note:hover *, .year-cal-note:hover * { color: #fff !important; }
  .issue-card:hover .issue-domain, .tip-item:hover .tip-tag { background: #fff !important; color: #172c46 !important; }
  .issue-card:hover .issue-rec { background: rgba(255,255,255,.12) !important; }
  .issue-card:hover .issue-date { color: rgba(255,255,255,.7) !important; }
  .rnd-step-card:hover .rnd-step-title, .ceo-check-item:hover .ceo-check-num, .support-tab-item:hover .support-tab-name,
  .support-tab-item:hover .support-tab-limit, .alert-box:hover strong, .summary-note:hover strong { color: #b9d8cc !important; }
  .rnd-step-card:hover .rnd-step-badge { background: #fff !important; color: #172c46 !important; }
  .support-tab-item:hover .support-tab-dot { background: #CDAC4F !important; }
  .ceo-check-item:hover .ceo-check-box { border-color: #fff !important; }

  /* 표 : 마우스가 올라간 행 전체 반전 (제목 칸 포함) */
  .schedule-table tbody tr:hover td, .compare-table tbody tr:hover td, .dx-table tbody tr:hover td,
  .action-table tbody tr:hover td, .year-cal-table tbody tr:hover td, .acct-def-table tr:hover td {
    background: #172c46 !important; color: #fff !important; border-color: #2b4766 !important; }
  .schedule-table tbody tr:hover td *, .compare-table tbody tr:hover td *, .dx-table tbody tr:hover td *,
  .action-table tbody tr:hover td :not(.priority-tag), .year-cal-table tbody tr:hover td *, .acct-def-table tr:hover td * { color: #fff !important; }
  .schedule-table tbody tr:hover td.date-strong, .compare-table tbody tr:hover td.highlight-col, .compare-table tbody tr:hover td.plus-col,
  .dx-table tbody tr:hover td.step-name, .action-table tbody tr:hover td.deadline-text, .year-cal-table tbody tr:hover td.rowlabel,
  .acct-def-table tr:hover td.lbl { color: #b9d8cc !important; }
}

/* ── 2. 휴대폰 반응형 ── */
@media screen and (max-width: 640px) {
  body { font-size: 14px; }
  .toolbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .toolbar-brand { min-width: 0; }
  .toolbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
  .toolbar-doc-type { display: none; }
  .btn-reset { display: none; }
  .lbl-full { display: none; } .lbl-short { display: inline; }
  .btn-explain, .btn-print { padding: 8px 12px !important; font-size: 12.5px; min-height: 36px; }

  .outer { padding: calc(64px + env(safe-area-inset-top, 0px)) 8px 24px; }
  .doc-wrapper { width: 100%; min-width: 0; border-radius: 8px; }
  .cover-top-bar { padding: 7px 16px; }
  .cover-main { flex-direction: column; padding: 20px 16px 18px; gap: 14px; }
  .cover-title { white-space: normal; font-size: 21px; }
  .cover-subtitle { font-size: 12.5px; line-height: 1.7; margin-bottom: 14px; }
  .cover-meta { flex-direction: column; align-items: stretch; gap: 6px; }
  .cover-meta-item { justify-content: space-between; gap: 12px; }
  .cover-meta-label { font-size: 12px; } .cover-meta-value { font-size: 12.5px; white-space: normal; text-align: right; }
  .cover-right { text-align: left; margin-left: 0; }
  .cover-contact strong { font-size: 13.5px; } .cover-contact p { font-size: 12.5px; }
  .doc-body { padding: 0 12px 24px; }

  .sec-title { font-size: 15px; flex-wrap: wrap; row-gap: 2px; }
  .sec-title-note { font-size: 12px; margin-left: 12px; }
  .sub-title { font-size: 14px; }
  .fixed-label, .event-label { font-size: 11px; }
  .section-divider { margin-top: 36px; }

  .issue-grid { grid-template-columns: 1fr; }
  .issue-card { min-height: 0; text-align: left; }
  .issue-domain { font-size: 11.5px; } .issue-text { font-size: 14px; } .issue-date { font-size: 12px; } .issue-rec { font-size: 12.5px; }
  .summary-note, .year-cal-note { font-size: 12.5px; }
  .alert-text { font-size: 13.5px; line-height: 1.75; }
  .tip-box-header { flex-wrap: wrap; } .tip-box-title { font-size: 13.5px; } .tip-box-subtitle { margin-left: 0; font-size: 12px; }
  .tip-item { flex-direction: column; gap: 4px; font-size: 13.5px; } .tip-tag { font-size: 11.5px; }
  .policy-section-header { flex-wrap: wrap; font-size: 13.5px; row-gap: 2px; } .policy-section-sub { font-size: 11.5px; margin-left: 0; }
  .support-items-grid { grid-template-columns: 1fr; }
  .support-items-grid > div + div .support-tab-item:first-child { border-top: 1px dotted #e0e8f4; }
  .support-tab-item { font-size: 13.5px; } .support-tab-item:nth-last-child(-n+2) { border-bottom: 1px dotted #e0e8f4; }
  .support-tab-limit { font-size: 12px; } .support-tab-desc { font-size: 12px; }
  .rnd-step-grid { grid-template-columns: 1fr 1fr; }
  .rnd-step-title { font-size: 13.5px; } .rnd-step-desc { font-size: 12px; } .rnd-step-badge { font-size: 11px; }
  .ceo-check-item { font-size: 13.5px; }
  .doc-footer { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 16px; }
  .footer-company { font-size: 12.5px; } .footer-contact { font-size: 11.5px; }

  /* 표 → 카드형 (각 칸에 열 제목 표시 · cithrd-common.js가 붙여 줌) */
  .schedule-table thead, .compare-table thead, .dx-table thead, .action-table thead, .year-cal-table thead { display: none; }
  .schedule-table, .compare-table, .dx-table, .action-table, .year-cal-table, .acct-def-table,
  .schedule-table tbody, .compare-table tbody, .dx-table tbody, .action-table tbody, .year-cal-table tbody, .acct-def-table tbody { display: block; width: 100%; }
  .schedule-table tr, .compare-table tr, .dx-table tr, .action-table tr, .year-cal-table tr, .acct-def-table tr { display: block; border-bottom: 6px solid #eef2f7; }
  .schedule-table tr:last-child, .compare-table tr:last-child, .dx-table tr:last-child, .action-table tr:last-child,
  .year-cal-table tr:last-child, .acct-def-table tr:last-child { border-bottom: 0; }
  .schedule-table td, .compare-table td, .dx-table td, .action-table td, .year-cal-table td, .acct-def-table td {
    display: grid; grid-template-columns: 84px 1fr; gap: 10px; text-align: left !important; white-space: normal !important;
    border: 0 !important; border-bottom: 1px solid #edf1f4 !important; padding: 10px 14px !important; font-size: 13px !important; line-height: 1.65; }
  .schedule-table td::before, .compare-table td::before, .dx-table td::before, .action-table td::before, .year-cal-table td::before {
    content: attr(data-label); font-size: 11.5px; font-weight: 700; color: #7b8a9e; }
  .schedule-table td:first-child, .compare-table td:first-child, .dx-table td:first-child, .action-table td:first-child,
  .year-cal-table td:first-child, .acct-def-table td.lbl {
    display: block; width: auto !important; background: #172c46 !important; color: #fff !important; font-size: 13.5px !important; font-weight: 700; }
  .schedule-table td:first-child::before, .compare-table td:first-child::before, .dx-table td:first-child::before,
  .action-table td:first-child::before, .year-cal-table td:first-child::before { display: none; }
  .schedule-table td:first-child *, .compare-table td:first-child *, .dx-table td:first-child *, .year-cal-table td:first-child * { color: #fff !important; }
  .year-cal-table td.rowlabel br, .dx-table td.step-name br { display: none; }
  .acct-def-table td { display: block; }
  .action-table td:first-child { font-weight: 600; }
  .priority-tag { font-size: 11.5px; justify-self: start; }
}

/* ═══ 터치 기기 : 탭하면 반전 (자동 생성 · 마우스 반전 규칙과 동일) ═══ */
/* 이 아래는 build 시 자동으로 다시 만들어집니다. 직접 고치지 말고 위의 마우스 반전 규칙을 고치세요. */
:root { --tap-targets: ".issue-card, .rnd-step-card, .ceo-check-item, .tip-item, .support-tab-item, .alert-box, .summary-note, .year-cal-note, .schedule-table tbody tr, .compare-table tbody tr, .dx-table tbody tr, .action-table tbody tr, .year-cal-table tbody tr, .acct-def-table tr"; }
@media screen {   /* 화면 전용 : 인쇄 · PDF에는 영향 없음 */
.issue-card, .tip-item, .support-tab-item, .rnd-step-card, .ceo-check-item, .alert-box, .summary-note, .year-cal-note, .schedule-table td, .compare-table td, .dx-table td, .action-table td, .year-cal-table td, .acct-def-table td {transition: background-color .15s ease, color .15s ease, border-color .15s ease;}
.tip-item, .support-tab-item, .alert-box {padding-left: 8px !important; padding-right: 8px !important; border-radius: 4px;}
.issue-card.tap-on,
.rnd-step-card.tap-on,
.ceo-check-item.tap-on,
.tip-item.tap-on,
.support-tab-item.tap-on,
.alert-box.tap-on,
.summary-note.tap-on,
.year-cal-note.tap-on {background: #172c46 !important; color: #fff !important; border-color: #172c46 !important;}
.issue-card.tap-on *,
.rnd-step-card.tap-on *,
.ceo-check-item.tap-on *,
.tip-item.tap-on *,
.support-tab-item.tap-on *,
.alert-box.tap-on *,
.summary-note.tap-on *,
.year-cal-note.tap-on * {color: #fff !important;}
.issue-card.tap-on .issue-domain,
.tip-item.tap-on .tip-tag {background: #fff !important; color: #172c46 !important;}
.issue-card.tap-on .issue-rec {background: rgba(255,255,255,.12) !important;}
.issue-card.tap-on .issue-date {color: rgba(255,255,255,.7) !important;}
.rnd-step-card.tap-on .rnd-step-title,
.ceo-check-item.tap-on .ceo-check-num,
.support-tab-item.tap-on .support-tab-name,
.support-tab-item.tap-on .support-tab-limit,
.alert-box.tap-on strong,
.summary-note.tap-on strong {color: #b9d8cc !important;}
.rnd-step-card.tap-on .rnd-step-badge {background: #fff !important; color: #172c46 !important;}
.support-tab-item.tap-on .support-tab-dot {background: #CDAC4F !important;}
.ceo-check-item.tap-on .ceo-check-box {border-color: #fff !important;}
.schedule-table tbody tr.tap-on td,
.compare-table tbody tr.tap-on td,
.dx-table tbody tr.tap-on td,
.action-table tbody tr.tap-on td,
.year-cal-table tbody tr.tap-on td,
.acct-def-table tr.tap-on td {background: #172c46 !important; color: #fff !important; border-color: #2b4766 !important;}
.schedule-table tbody tr.tap-on td *,
.compare-table tbody tr.tap-on td *,
.dx-table tbody tr.tap-on td *,
.action-table tbody tr.tap-on td :not(.priority-tag),
.year-cal-table tbody tr.tap-on td *,
.acct-def-table tr.tap-on td * {color: #fff !important;}
.schedule-table tbody tr.tap-on td.date-strong,
.compare-table tbody tr.tap-on td.highlight-col,
.compare-table tbody tr.tap-on td.plus-col,
.dx-table tbody tr.tap-on td.step-name,
.action-table tbody tr.tap-on td.deadline-text,
.year-cal-table tbody tr.tap-on td.rowlabel,
.acct-def-table tr.tap-on td.lbl {color: #b9d8cc !important;}
}
