/* ===== 감사 수첩 ===== */
.cb-app {
  display: flex;
  height: 100%;
  background: #fbf7ea;
  color: #2b2419;
}

.cb-side {
  flex: 0 0 230px;
  display: flex;
  flex-direction: column;
  background: #f1e9d2;
  border-right: 1px solid #d9cfb4;
  overflow-y: auto;
}

.cb-me { display: flex; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid #d9cfb4; }
.cb-me-avatar { width: 40px; height: 40px; border-radius: 50%; background: #6b5a3a; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.cb-me-body { min-width: 0; font-size: 12px; line-height: 1.45; }
.cb-me-name { font-size: 14px; font-weight: 700; }
.cb-me-rank b { color: #a0522d; }
.cb-me-id { white-space: nowrap; } /* 사번이 하이픈에서 꺾이지 않게 */
.cb-me-stat { color: #6b5a3a; }
.cb-me-next { color: #8a7a5a; font-size: 11px; }

.cb-list-title { font-size: 11px; letter-spacing: 2px; color: #8a7a5a; padding: 12px 14px 4px; }
.cb-case { padding: 8px 14px; cursor: default; border-left: 3px solid transparent; }
.cb-case:hover { background: rgba(255,255,255,0.45); }
.cb-case.is-active { background: #fbf7ea; border-left-color: #a0522d; }
.cb-case.is-locked { color: #a89f8c; }
.cb-case-top { display: flex; justify-content: space-between; font-size: 11px; color: #8a7a5a; }
.cb-case.is-open .cb-case-status { color: #a0522d; font-weight: 700; }
.cb-case.is-solved .cb-case-status { color: #1e6b3a; font-weight: 700; }
.cb-case.is-giveup .cb-case-status { color: #a3261a; }
.cb-case-title { font-size: 13px; font-weight: 600; margin-top: 2px; }

.cb-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: 18px 26px 30px;
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(120, 100, 60, 0.10) 28px);
  font-family: "Segoe UI", "Malgun Gothic", "맑은 고딕", sans-serif;
}
.cb-empty { padding: 60px 20px; text-align: center; color: #8a7a5a; line-height: 1.8; }

.cb-kicker { font-size: 11px; letter-spacing: 1px; color: #8a7a5a; }
.cb-title { font-size: 22px; margin: 4px 0 6px; }
.cb-logline { margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; color: #4a3f2e; }

.cb-sec { margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px dashed rgba(120, 100, 60, 0.35); }
.cb-sec-title { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: #5a4a2e; }
.cb-sec-sub { font-size: 11px; font-weight: 400; color: #8a7a5a; margin-left: 6px; }
.cb-muted { color: #8a7a5a; font-size: 12px; }
.cb-mono { font-family: Consolas, monospace; font-size: 12px; }
.cb-text { font-size: 13px; line-height: 1.65; white-space: pre-line; }

.cb-entry { font-size: 13px; line-height: 1.6; padding: 8px 12px; background: rgba(255,255,255,0.55); border-radius: 6px; }
.cb-note { margin-top: 6px; font-size: 12px; color: #6b5a3a; padding-left: 10px; border-left: 3px solid #c9b88f; }
.cb-link { border: none; background: transparent; color: #a0522d; text-decoration: underline; font-size: 12px; padding: 0; }

.cb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; background: rgba(255,255,255,0.5); }
.cb-table th { text-align: left; font-weight: 600; color: #8a7a5a; padding: 4px 8px; border-bottom: 1px solid #d9cfb4; font-size: 11px; }
.cb-table td { padding: 5px 8px; border-bottom: 1px solid rgba(120,100,60,0.15); }

.cb-targets { display: flex; flex-direction: column; gap: 6px; }
.cb-target { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255,255,255,0.6); border: 1px solid #d9cfb4; border-radius: 6px; }
.cb-target.is-here { border-color: #a0522d; background: #fff3e8; }
.cb-target-icon svg { width: 26px; height: 26px; }
.cb-target-body { flex: 1 1 auto; min-width: 0; }
.cb-target-name { font-size: 13px; font-weight: 600; }
.cb-target-dept { font-weight: 400; color: #6b5a3a; font-size: 12px; }
.cb-target-reason { font-size: 11.5px; color: #6b5a3a; }
.cb-target-expired { font-size: 11px; color: #a3261a; }

.cb-records { display: flex; flex-direction: column; }
.cb-rec { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dotted rgba(120,100,60,0.3); }
.cb-rec-no { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 1.5px solid #7a6a4a; color: #7a6a4a; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.cb-rec-title { font-size: 13px; font-weight: 600; }
.cb-rec-app { font-size: 10px; font-weight: 400; color: #fff; background: #8a7a5a; border-radius: 3px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.cb-rec-said { font-size: 10px; font-weight: 700; color: #fff; background: #b5452f; border-radius: 3px; padding: 1px 5px; vertical-align: 1px; } /* 진술: 주장일 뿐 입증된 사실이 아니다 */
.cb-rec-text { font-size: 12.5px; line-height: 1.5; color: #4a3f2e; margin-top: 2px; user-select: text; }

.cb-hints { display: flex; flex-direction: column; gap: 6px; }
.cb-hint { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: rgba(255,255,255,0.5); border-radius: 6px; font-size: 12.5px; }
.cb-hint.is-open { flex-direction: column; align-items: flex-start; gap: 4px; }
.cb-hint.is-locked { color: #a89f8c; }
.cb-hint-no { font-weight: 700; font-size: 12px; color: #5a4a2e; flex: 0 0 auto; }
.cb-hint-text { line-height: 1.55; }

.cb-form { display: flex; flex-direction: column; gap: 10px; }
.cb-field { display: flex; flex-direction: column; gap: 4px; }
.cb-field-label { font-size: 12.5px; font-weight: 600; }
.cb-input { height: 32px; padding: 0 10px; border: 1px solid #c9b88f; border-radius: 5px; background: #fff; font: inherit; font-size: 13px; max-width: 420px; }
.cb-form-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cb-form-note { font-size: 12px; color: #a3261a; }

.cb-btn { height: 30px; padding: 0 14px; border: 1px solid var(--btn-border); border-radius: 5px; background: var(--btn-bg); font-size: 12.5px; font-weight: 600; color: var(--btn-fg); }
.cb-btn:hover { background: var(--btn-bg-hover); }
.cb-btn-primary { background: #a0522d; border-color: #8a4624; color: #fff; }
.cb-btn-primary:hover { background: #8a4624; }
.cb-btn-danger { color: #a3261a; border-color: #d9a39b; }
.cb-btn-danger:hover { background: #fdeeec; }

.cb-result { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 2px solid #1e6b3a; border-radius: 8px; background: #eef7f0; }
.cb-result.is-giveup { border-color: #a3261a; background: #fdf0ee; }
.cb-result-score { display: flex; align-items: baseline; gap: 2px; }
.cb-result-num { font-size: 40px; font-weight: 800; line-height: 1; }
.cb-result-unit { font-size: 14px; }
.cb-result-label { font-size: 14px; font-weight: 700; }
.cb-result-note { font-size: 12px; color: #6b5a3a; }

.cb-answer { font-size: 13px; }
.cb-answer-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0; }
.cb-answer-k { color: #6b5a3a; }
.cb-answer-v { font-weight: 700; }
.cb-answer-mine { color: #8a7a5a; font-size: 12px; }
.cb-solution { margin-top: 6px; padding: 8px 12px; background: rgba(255,255,255,0.6); border-radius: 6px; line-height: 1.55; }
.cb-ded { margin-bottom: 8px; }
.cb-ded-head { font-size: 12px; font-weight: 700; color: #5a4a2e; }
.cb-next { margin-top: 10px; }

.win--casebook .win-titlebar { background: #f1e9d2; border-bottom: 1px solid #d9cfb4; }

/* 보안사고 */
.cb-incident { border: 2px solid #a3261a; background: #fdf0ee; border-radius: 8px; padding: 10px 14px; }
.cb-incident-title { font-size: 13px; font-weight: 800; color: #a3261a; margin-bottom: 4px; }
.cb-incident-text { font-size: 12.5px; line-height: 1.55; }
.cb-warn { color: #a3261a; font-weight: 700; }
.cb-me-plan { display: inline-block; margin-top: 2px; font-size: 10px; padding: 0 6px; border-radius: 3px; background: #6b5a3a; color: #fff; }
.cb-result-num { font-size: 32px; }

.cb-rec-meta { font-size: 11px; color: #8a7a5a; margin-top: 3px; }
.cb-case.is-ready .cb-case-status { color: #1f6feb; font-weight: 700; }

/* 보상형 광고 (모의) */
.ad-overlay { position: fixed; inset: 0; z-index: 17000; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; }
.ad-box { width: min(420px, calc(100vw - 24px)); background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.5); font-family: "Segoe UI", "Malgun Gothic", sans-serif; }
.ad-tag { background: #111; color: #fff; font-size: 11px; padding: 4px 10px; letter-spacing: 1px; }
.ad-body { padding: 26px 20px; text-align: center; background: repeating-linear-gradient(45deg, #f3f4f6 0 12px, #e5e7eb 12px 24px); }
.ad-title { font-size: 18px; font-weight: 700; color: #374151; }
.ad-sub { font-size: 12.5px; color: #4b5563; margin: 8px 0 14px; }
.ad-timer { font-size: 22px; font-weight: 800; color: #111; }
.ad-skip { width: 100%; border: none; border-top: 1px solid var(--btn-border); background: var(--btn-bg); padding: 10px; font-size: 12.5px; color: var(--btn-fg); }
.ad-skip:hover { background: var(--btn-bg-hover); }

/* 근거 선택 (조사 결론 카드 시범) */
.cb-evidence .cb-ev-list { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.cb-ev { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; cursor: pointer; }
.cb-ev input { margin-top: 2px; flex: none; }
.cb-ev-result { padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.cb-ev-result.is-ok { background: #e8f5ec; color: #1f6b3a; }
.cb-ev-result.is-weak { background: #fff4e0; color: #8a5a00; }
.cb-ev-picked { margin: 6px 0 0 18px; padding: 0; font-size: 12px; }
.cb-ded-replay { animation: cb-ded-in .5s ease both; }
.cb-ded.is-mine { border-left: 3px solid #2f6fde; padding-left: 8px; }
.cb-ded-mine { font-size: 11px; color: #2f6fde; white-space: nowrap; }
@keyframes cb-ded-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 진급 신청 단추 (수첩 상단) */
.cb-promote { margin-top: 6px; width: 100%; white-space: nowrap; }

/* 해결한 사건의 엔딩 그림 (16:9 그대로, 누르면 사진 뷰어) */
.cb-ending-fig { margin: 0; }
.cb-ending-open { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid #d9cfb4; border-radius: 6px; background: #1b1b1b; overflow: hidden; cursor: default; }
.cb-ending-open:focus-visible { outline: 2px solid #1f6feb; outline-offset: 2px; }
.cb-ending-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cb-ending-cap { margin-top: 6px; font-size: 11.5px; color: #8a7a5a; }
