@charset "UTF-8";

/* 토닷 사건파일 — 탐정 수첩 스타일 위젯 */
.tt-case-widget {
    --case-green: #11875d;
    --case-ink: #202d2b;
    --case-muted: #7a8783;
    --case-line: #e9ece8;
    width: 100%;
    padding: 1rem;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #e6ebe7;
    border-radius: var(--radius);
    box-sizing: border-box;
}

.tt-case-widget *, .tt-case-widget *::before, .tt-case-widget *::after { box-sizing: border-box; }
.tt-case-widget a { color: inherit; text-decoration: none; }

.tt-case-header, .tt-case-heading, .tt-case-heading h3,
.tt-case-info-top, .tt-case-info-bottom { display: flex; align-items: center; }
.tt-case-header { justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.tt-case-heading { gap: 10px; min-width: 0; }

.tt-case-mascot {
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    font-size: 25px;
    background: #fff6df;
    border: 1px solid #f6eac8;
    border-radius: 13px;
    transform: rotate(-5deg);
}
.tt-case-heading-copy { min-width: 0; }
.tt-case-heading h3 { flex-wrap: wrap; gap: 7px; margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; }
.tt-case-heading p { margin: 3px 0 0; color: var(--case-muted); font-size: 11px; line-height: 1.4; }

.tt-case-all {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #426255 !important;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: #f3f9f4;
    border: 1px solid #e5f0e7;
    border-radius: 20px;
    transition: background .2s, color .2s;
}
.tt-case-all:hover { color: var(--white) !important; background: var(--case-green); }
.tt-case-all span { margin-left: 3px; }

.tt-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.tt-case-card {
    display: flex;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    min-height: 117px;
    padding: 10px;
    border: 1px solid var(--case-line);
    border-radius: 12px;
    background: linear-gradient(155deg, #fffdf7 0%, #fff 57%, #f8fcf8 100%);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tt-case-card:hover { border-color: #b8d9c8; transform: translateY(-2px); box-shadow: 0 5px 13px rgba(16, 94, 59, .08); }

.tt-case-picture {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 97px;
    width: 97px;
    min-height: 95px;
    overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #fff6ca, #faebd5 48%, #e3f4dc 100%);
    border: 1px solid #f3ebd9;
    border-radius: 9px;
}
.tt-case-picture.has-photo { background: #f3f4f2; border-color: #edf0ec; }
.tt-case-picture > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.tt-case-illustration { position: relative; font-size: 43px; filter: drop-shadow(0 3px 2px rgba(70, 60, 29, .12)); }
.tt-case-illustration span { position: absolute; right: -10px; bottom: -10px; font-size: 30px; }
.tt-case-picture-corner { position: absolute; top: 5px; right: 7px; color: #f0af35; font-size: 18px;}

.tt-case-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.tt-case-info-top { flex-wrap: wrap; gap: 5px; min-height: 20px; margin-bottom: 5px; }
.tt-case-number, .tt-case-new { padding: 3px 6px; border-radius: 4px; font-size: 9px; line-height: 1.1; font-weight: 800; letter-spacing: .2px; }
.tt-case-number { color: #94701d; background: #fff1c6; }
.tt-case-new { color: var(--white); background: var(--active-bg); }
.tt-case-subject {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.tt-case-info-bottom { justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--case-muted); font-size: 10px; white-space: nowrap; }
.tt-case-views { margin-left: auto; }
.tt-case-arrow { display: grid; place-items: center; flex: 0 0 20px; height: 20px; color: var(--case-green); background: #eaf6ec; border-radius: 50%; font-size: 13px; font-weight: 800; }

.tt-case-footer { padding-top: 10px; color: #84918b; font-size: 12px; text-align: right; line-height: 1.5; }
.tt-case-empty { padding: 30px 10px; color: #79877d; font-size: 13px; text-align: center; background: #fbfdf9; border: 1px dashed #e2e9df; border-radius: 10px; }

@media (max-width: 930px) { .tt-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
    .tt-case-heading h3 { font-size: 15px; }
    .tt-case-heading p { font-size: 10px; }
    .tt-case-mascot { flex-basis: 38px; width: 38px; height: 38px; font-size: 23px; }
    .tt-case-all { padding: 7px 8px; font-size: 10px; }
    .tt-case-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tt-case-card { min-height: 105px; }
    .tt-case-picture { flex-basis: 90px; width: 90px; min-height: 83px; }
    .tt-case-footer { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .tt-case-card, .tt-case-all { transition: none; } }

/* 관리자에게만 표시되는 조회 진단 */
.tt-case-debug { margin:8px 0 0; padding:8px; border-radius:7px; background:#fff9e8; color:#865c21; font-size:11px; overflow-wrap:anywhere; }
