@charset "utf-8";
/* ══════════════════════════════════════════════════════
   reels 스킨 — 인스타그램 릴스 프롬프트 안내

   릴스는 전부 9:16 세로다. tubevideo 처럼 가로/세로를 섞어 담을 필요가 없으므로
   메이슨리 없이 균일한 세로 카드 그리드로 간다.
   ══════════════════════════════════════════════════════ */

.rl_wrap { margin: 0 auto; }
.rl_wrap * { box-sizing: border-box; }

.rl_notice {
    margin: 0 0 16px; padding: 12px 16px; border-radius: 8px;
    background: #fff4f4; border: 1px solid #f2c9c9; color: #b13; font-size: 14px;
}

/* ── 상단 ───────────────────────────────────────────── */
.rl_top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rl_total { font-size: 14px; color: #555; }
.rl_total strong { color: #d6249f; font-size: 16px; }
.rl_page { margin-left: 8px; color: #999; font-size: 13px; }
.rl_btn_tx { margin-left: 4px; }

.rl_cate { margin-bottom: 14px; }
.rl_cate h2 { position: absolute; left: -9999px; }
.rl_cate #bo_cate_ul { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.rl_cate #bo_cate_ul li a {
    display: inline-block; padding: 6px 14px; border: 1px solid #e2e2e6; border-radius: 999px;
    font-size: 13px; color: #555; background: #fff; text-decoration: none;
}
.rl_cate #bo_cate_ul li a:hover { border-color: #d6249f; color: #d6249f; }
.rl_cate #bo_cate_ul li a.bo_cate_on { background: #d6249f; border-color: #d6249f; color: #fff; }

.rl_allchk { margin-bottom: 10px; }

/* ── 카드 그리드 ────────────────────────────────────── */
.rl_grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 22px 16px; padding: 0; margin: 0 0 24px; list-style: none;
}
.rl_item { min-width: 0; }
.rl_card { display: flex; flex-direction: column; height: 100%; }

.rl_thumb {
    position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden;
    background: #14141a;
}
/* aspect-ratio 미지원 구형 브라우저 폴백 */
@supports not (aspect-ratio: 9 / 16) {
    .rl_thumb { height: 0; padding-bottom: 177.78%; }
}
.rl_thumb_link { display: block; width: 100%; height: 100%; }
.rl_thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 썸네일 없는 카드 — 인스타가 서버 스크래핑을 막아 대부분 이 상태가 된다.
   빈 회색 칸 대신 인스타 그라데이션 위에 제목을 얹어 카드 구실을 하게 한다. */
.rl_noimg {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center;
    background: linear-gradient(160deg, #f09433 0%, #dc2743 50%, #bc1888 100%);
    color: rgba(255, 255, 255, .95);
}
.rl_noimg .fa { font-size: 34px; opacity: .85; }
.rl_noimg em {
    font-style: normal; font-size: 13px; line-height: 1.5; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.rl_play {
    position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
    border: 0; background: transparent; cursor: pointer; padding: 0;
}
.rl_play_ico {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px);
    border: 2px solid rgba(255, 255, 255, .85);
    opacity: 0; transition: opacity .18s ease, transform .18s ease;
}
.rl_play_ico::after {
    content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%);
    border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.rl_thumb:hover .rl_play_ico,
.rl_play:focus .rl_play_ico { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }

.rl_badge {
    position: absolute; z-index: 3; padding: 3px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 1.5; color: #fff; pointer-events: none;
}
.rl_badge_ig { left: 8px; top: 8px; background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.rl_badge_prompt { right: 8px; top: 8px; background: rgba(20, 20, 26, .78); }
.rl_badge_notice { left: 8px; bottom: 8px; background: #2f6fed; }
.rl_chk { position: absolute; z-index: 4; right: 8px; bottom: 8px; }

.rl_body { padding: 10px 2px 0; }
.rl_cate_link {
    display: inline-block; margin-bottom: 4px; font-size: 11px; color: #d6249f;
    text-decoration: none; font-weight: 600;
}
.rl_tit {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 14px; line-height: 1.45; color: #1a1a1e; text-decoration: none; font-weight: 600;
}
.rl_tit:hover { text-decoration: underline; }
.rl_meta { margin-top: 6px; font-size: 12px; color: #8a8a92; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rl_meta .fa { margin-right: 2px; }
.rl_author { color: #d6249f; text-decoration: none; font-weight: 600; }
.rl_author:hover { text-decoration: underline; }
.rl_dot { width: 2px; height: 2px; border-radius: 50%; background: #c8c8ce; }
.rl_meta_r { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }

.rl_empty {
    grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: #9a9aa2;
    border: 1px dashed #e2e2e6; border-radius: 12px;
}
.rl_empty .fa { font-size: 38px; display: block; margin-bottom: 12px; }
.rl_empty p { margin: 0 0 14px; }

/* ── 임베드 ─────────────────────────────────────────── */
/* 인스타 임베드는 9:16 영상이 아니라 "영상 + 캡션" 카드다. 비율로 묶으면 잘리므로
   폭만 제한하고 높이는 넉넉히 준다. */
.rl_embed { width: 100%; max-width: 420px; margin: 0 auto; }
.rl_embed iframe {
    width: 100%; height: 720px; border: 0; display: block;
    border-radius: 12px; background: #fff;
}

/* ── 목록 바로재생 모달 ─────────────────────────────── */
.rl_modal { position: fixed; inset: 0; z-index: 9999; }
.rl_modal[hidden] { display: none; }
.rl_modal_bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }
.rl_modal_box {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(420px, 94vw); max-height: 94vh; display: flex; flex-direction: column;
}
.rl_modal_head { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; color: #fff; }
.rl_modal_head strong { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl_modal_cls { border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; padding: 0 4px; }
.rl_modal_player { flex: 1; min-height: 0; }
.rl_modal_player iframe {
    width: 100%; height: min(760px, 84vh); border: 0; border-radius: 12px; background: #fff; display: block;
}
body.rl_modal_open { overflow: hidden; }

/* ── 상세 페이지 ────────────────────────────────────── */
.rl_view { margin: 0 auto; }
.rl_v_stage { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 24px; }
.rl_v_player { flex: 0 0 420px; max-width: 420px; }
.rl_v_side { flex: 1; min-width: 0; }

.rl_v_head #bo_v_title { margin: 0 0 8px; font-size: 22px; line-height: 1.4; }
.rl_v_head .bo_v_cate {
    display: inline-block; margin-right: 8px; padding: 3px 10px; border-radius: 999px;
    background: #fdf0f8; color: #d6249f; font-size: 12px; font-weight: 600; vertical-align: middle;
}
.rl_v_source { margin: 0 0 18px; font-size: 13px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rl_v_origin { color: #666; text-decoration: none; }
.rl_v_origin:hover { color: #d6249f; }

.rl_v_prompt { border: 1px solid #e6e6ea; border-radius: 12px; overflow: hidden; background: #fbfbfd; }
.rl_v_prompt_head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; background: #f2f2f6; border-bottom: 1px solid #e6e6ea;
}
.rl_v_prompt_head h3 { margin: 0; font-size: 14px; color: #333; }
.rl_copy_btn {
    border: 1px solid #d6249f; background: #d6249f; color: #fff; border-radius: 6px;
    padding: 5px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.rl_copy_btn:hover { filter: brightness(1.08); }
.rl_copy_btn.is-done { background: #2f9e5b; border-color: #2f9e5b; }
.rl_v_prompt pre {
    margin: 0; padding: 14px; max-height: 460px; overflow: auto;
    white-space: pre-wrap; word-break: break-word;
    font-family: "D2Coding", Consolas, Menlo, monospace; font-size: 13px; line-height: 1.7; color: #24242a;
}
.rl_v_noprompt {
    padding: 16px; border: 1px dashed #e2e2e6; border-radius: 10px;
    color: #9a9aa2; font-size: 13px; margin: 0;
}

.rl_view #bo_v_con { margin: 20px 0; line-height: 1.8; }
.rl_view .rl_desc { line-height: 1.8; }

/* ── 관련 릴스 ──────────────────────────────────────── */
.rl_relsec { margin: 32px 0 8px; }
.rl_relsec_h { margin: 0 0 12px; font-size: 17px; }
.rl_relsec_h a { color: #1a1a1e; text-decoration: none; }
.rl_relsec_h span { color: #d6249f; }
.rl_relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
.rl_relcard { display: block; text-decoration: none; }
.rl_relthumb {
    position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 10px;
    overflow: hidden; background: #14141a;
}
.rl_relthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rl_relplay {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .5);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.rl_reltitle {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-top: 7px; font-size: 13px; line-height: 1.4; color: #333;
}

/* ── 글쓰기 ─────────────────────────────────────────── */
.rl_write .write_div { margin-bottom: 16px; }
.rl_w_label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #333; }
.rl_w_status { margin: 6px 0 0; font-size: 12px; color: #8a8a92; }
.rl_w_status.rl_ok { color: #2f9e5b; }
.rl_w_status.rl_ng { color: #d33; }
.rl_w_status .rl_badge { position: static; display: inline-block; margin-right: 4px; }
.rl_w_preview { margin-top: 12px; }
.rl_write textarea { width: 100%; padding: 12px; line-height: 1.7; }
.rl_write #rl_prompt_in {
    font-family: "D2Coding", Consolas, Menlo, monospace; font-size: 13px;
}
/* 실제 저장용 wr_content 는 화면에서 감춘다 (sound_only 로도 접근 가능하게 둔다) */
.rl_write #wr_content { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .rl_v_stage { flex-direction: column; }
    .rl_v_player { flex: none; width: 100%; max-width: 420px; margin: 0 auto; }
    .rl_v_side { width: 100%; }
}
@media (max-width: 640px) {
    .rl_grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 10px; }
    .rl_tit { font-size: 13px; }
    .rl_embed iframe { height: 640px; }
    .rl_v_head #bo_v_title { font-size: 19px; }
    .rl_relgrid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
