@charset "utf-8";

/* ==========================================================================
   1. TRPG 갤러리 리스트 (정사각형 및 마우스오버 줌)
   ========================================================================== */
.trpg-list-wrapper { width: 100%; margin: 20px 0; }
.trpg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.trpg-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trpg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-link { text-decoration: none; color: inherit; display: block; }

/* 1:1 정사각형 썸네일 박스 & 이미지 줌 효과 */
.square-thumb-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f1f3f5;
    position: relative;
}

.square-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-in-out;
}

/* 마우스 오버 시 정사각형 안의 이미지 살짝 확대 */
.trpg-card:hover .square-thumb-box img {
    transform: scale(1.1);
}

.card-body { padding: 15px; }
.card-title {
    font-size: 1.05rem;
    font-weight: bold;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #212529;
}
.card-plpc {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 12px;
}
.card-plpc .divider { margin: 0 4px; color: #dee2e6; }

.trpg-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    background-color: #e9ecef;
    color: #495057;
    margin-right: 4px;
    margin-bottom: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

/* ==========================================================================
   2. 글작성 및 도구함 스타일
   ========================================================================== */
.trpg-meta-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}
.trpg-form-group { margin-bottom: 12px; }
.trpg-form-group.margin-top { margin-top: 15px; }
.trpg-form-group.half { width: 49%; display: inline-block; }
.trpg-form-row { display: flex; justify-content: space-between; }
.trpg-label { font-weight: bold; display: block; margin-bottom: 6px; font-size: 0.9rem; }
.frm_input.full { width: 100%; box-sizing: border-box; }
.frm_input.sm { width: 140px; }
.frm_input.lg { width: 280px; }

.trpg-radio-group label { margin-right: 15px; cursor: pointer; font-size: 0.95rem; }

.trpg-tools-panel {
    background: #eef2f5;
    border: 1px solid #d0d7de;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.tools-title { font-weight: bold; margin-bottom: 10px; color: #333; }
.tool-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.85rem; }
.tool-label { width: 110px; font-weight: 600; }
.color-picker { width: 40px; height: 30px; border: none; cursor: pointer; background: transparent; }

.trpg-btn {
    padding: 5px 12px;
    background: #4a5568;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: none;
}
.trpg-btn:hover { background: #2d3748; }
.trpg-btn.warning { background: #e53e3e; }

/* ==========================================================================
   3. 본문 세션 로그 CSS Isolation (Roll20 / 코코포리아 롤꾸 깨짐 방지)
   ========================================================================== */
.trpg-view-container { max-width: 100%; }
.view-head { border-bottom: 2px solid #212529; padding-bottom: 15px; margin-bottom: 25px; }
.view-title { font-size: 1.6rem; margin-bottom: 15px; }
.view-info-card { display: flex; gap: 20px; background: #f8f9fa; padding: 12px 18px; border-radius: 6px; font-size: 0.9rem; }

/* 로그 격리 래퍼 (외부 레이아웃 보호) */
.trpg-log-wrapper {
    all: initial; /* 외부 CSS 상속 전면 차단 */
    font-family: system-ui, -apple-system, sans-serif;
    display: block;
    width: 100%;
    overflow-x: auto; /* 거대한 가로 로그 스크롤 허용 */
    contain: content;
    isolation: isolate;
    margin: 30px 0;
    background: #ffffff;
}

.trpg-isolated-content {
    width: 100%;
    min-height: 200px;
}

/* 캠페인 모듈 */
.campaign-series-box {
    margin-top: 50px;
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
}
.series-title { font-size: 1.05rem; margin-top: 0; margin-bottom: 12px; }
.series-list { list-style: none; padding: 0; margin: 0; }
.series-list li { padding: 6px 0; border-bottom: 1px border-bottom: 1px solid #e2e8f0; font-size: 0.9rem; }
.series-list li.current-ep { font-weight: bold; color: #2563eb; }
.series-list .badge { font-size: 0.75rem; background: #2563eb; color: #fff; padding: 2px 6px; border-radius: 10px; }

.trpg-list-ft { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; }